mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-04 11:44:16 +02:00
Update PSR-2
This commit is contained in:
@@ -65,8 +65,8 @@ abstract class Smarty_Internal_CompileBase
|
||||
* the corresponding list. The keyword '_any' specifies that any attribute will be accepted
|
||||
* as valid
|
||||
*
|
||||
* @param object $compiler compiler object
|
||||
* @param array $attributes attributes applied to the tag
|
||||
* @param object $compiler compiler object
|
||||
* @param array $attributes attributes applied to the tag
|
||||
*
|
||||
* @return array of mapped attributes for further processing
|
||||
*/
|
||||
@@ -103,8 +103,10 @@ abstract class Smarty_Internal_CompileBase
|
||||
if (isset($this->optionMap[ $v ])) {
|
||||
$_indexed_attr[ $k ] = $this->optionMap[ $v ];
|
||||
} else {
|
||||
$compiler->trigger_template_error("illegal value '" . var_export($v, true) .
|
||||
"' for option flag '{$k}'", null, true);
|
||||
$compiler->trigger_template_error(
|
||||
"illegal value '" . var_export($v, true) .
|
||||
"' for option flag '{$k}'", null, true
|
||||
);
|
||||
}
|
||||
}
|
||||
// must be named attribute
|
||||
@@ -124,8 +126,12 @@ abstract class Smarty_Internal_CompileBase
|
||||
if ($this->optional_attributes !== array('_any')) {
|
||||
if (!isset($this->mapCache[ 'all' ])) {
|
||||
$this->mapCache[ 'all' ] =
|
||||
array_fill_keys(array_merge($this->required_attributes, $this->optional_attributes,
|
||||
$this->option_flags), true);
|
||||
array_fill_keys(
|
||||
array_merge(
|
||||
$this->required_attributes, $this->optional_attributes,
|
||||
$this->option_flags
|
||||
), true
|
||||
);
|
||||
}
|
||||
foreach ($_indexed_attr as $key => $dummy) {
|
||||
if (!isset($this->mapCache[ 'all' ][ $key ]) && $key !== 0) {
|
||||
@@ -162,8 +168,8 @@ abstract class Smarty_Internal_CompileBase
|
||||
* Pop closing tag
|
||||
* Raise an error if this stack-top doesn't match with expected opening tags
|
||||
*
|
||||
* @param object $compiler compiler object
|
||||
* @param array|string $expectedTag the expected opening tag names
|
||||
* @param object $compiler compiler object
|
||||
* @param array|string $expectedTag the expected opening tag names
|
||||
*
|
||||
* @return mixed any type the opening tag's name or saved data
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user