Update PSR-2

This commit is contained in:
Sławomir Kaleta
2018-06-12 09:58:15 +02:00
parent cc4d8fa1a0
commit 2404095783
190 changed files with 3833 additions and 3119 deletions
@@ -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
*/