@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | public function __construct(array $options = array()) |
| 66 | 66 | { |
| 67 | 67 | if (is_null($this->options['stream'])) { |
| 68 | - $this->options['stream'] = $this->streamName . '.stream'; |
|
| 68 | + $this->options['stream'] = $this->streamName.'.stream'; |
|
| 69 | 69 | } |
| 70 | 70 | $this->options = array_merge($this->options, $options); |
| 71 | 71 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | { |
| 82 | 82 | return extension_loaded($extension) && |
| 83 | 83 | false === strpos( |
| 84 | - ini_get($extension . '.executor.include.whitelist'), |
|
| 84 | + ini_get($extension.'.executor.include.whitelist'), |
|
| 85 | 85 | $this->options['stream'] |
| 86 | 86 | ); |
| 87 | 87 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | if ($name) { |
| 112 | 112 | if (!isset($requirements[$name])) { |
| 113 | - throw new \InvalidArgumentException($name . ' is not in the requirements list (' . implode(', ', array_keys($requirements)) . ')', 19); |
|
| 113 | + throw new \InvalidArgumentException($name.' is not in the requirements list ('.implode(', ', array_keys($requirements)).')', 19); |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | return $requirements[$name]; |
@@ -220,8 +220,8 @@ discard block |
||
| 220 | 220 | $compiler = new Compiler($this->options, $this->filters, $parser->getFilename()); |
| 221 | 221 | $php = $compiler->compile($parser->parse()); |
| 222 | 222 | if (version_compare(PHP_VERSION, '7.0.0') < 0) { |
| 223 | - $php = preg_replace_callback('/(' . preg_quote('\\Jade\\Compiler::getPropertyFromAnything', '/') . '\\(((?>[^()]+)|(?-2))*\\))[ \t]*(\\(((?>[^()]+)|(?-2))*\\))/', function ($match) { |
|
| 224 | - return 'call_user_func(' . $match[1] . ', ' . $match[4] . ')'; |
|
| 223 | + $php = preg_replace_callback('/('.preg_quote('\\Jade\\Compiler::getPropertyFromAnything', '/').'\\(((?>[^()]+)|(?-2))*\\))[ \t]*(\\(((?>[^()]+)|(?-2))*\\))/', function($match) { |
|
| 224 | + return 'call_user_func('.$match[1].', '.$match[4].')'; |
|
| 225 | 225 | }, $php); |
| 226 | 226 | } |
| 227 | 227 | $postRender = $this->getOption('postRender'); |
@@ -273,14 +273,14 @@ discard block |
||
| 273 | 273 | public function stream($input) |
| 274 | 274 | { |
| 275 | 275 | if ($this->whiteListNeeded('suhosin')) { |
| 276 | - throw new \ErrorException('To run Pug.php on the fly, add "' . $this->options['stream'] . '" to the "suhosin.executor.include.whitelist" settings in your php.ini file.', 4); |
|
| 276 | + throw new \ErrorException('To run Pug.php on the fly, add "'.$this->options['stream'].'" to the "suhosin.executor.include.whitelist" settings in your php.ini file.', 4); |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | if (!in_array($this->options['stream'], stream_get_wrappers())) { |
| 280 | 280 | stream_wrapper_register($this->options['stream'], 'Jade\Stream\Template'); |
| 281 | 281 | } |
| 282 | 282 | |
| 283 | - return $this->options['stream'] . '://data;' . $input; |
|
| 283 | + return $this->options['stream'].'://data;'.$input; |
|
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | /** |
@@ -11,19 +11,19 @@ discard block |
||
| 11 | 11 | } |
| 12 | 12 | |
| 13 | 13 | return is_null($valueCheck) |
| 14 | - ? ' ' . $key . '=' . $this->quote . $value . $this->quote |
|
| 14 | + ? ' '.$key.'='.$this->quote.$value.$this->quote |
|
| 15 | 15 | : $this->createCode('if (true === ($__value = %1$s)) { ', $valueCheck) |
| 16 | 16 | . $this->getBooleanAttributeDisplayCode($key) |
| 17 | 17 | . $this->createCode('} else if (\\Jade\\Compiler::isDisplayable($__value)) { ') |
| 18 | - . ' ' . $key . '=' . $this->quote . $value . $this->quote |
|
| 18 | + . ' '.$key.'='.$this->quote.$value.$this->quote |
|
| 19 | 19 | . $this->createCode('}'); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | protected function getBooleanAttributeDisplayCode($key) |
| 23 | 23 | { |
| 24 | - return ' ' . $key . ($this->terse |
|
| 24 | + return ' '.$key.($this->terse |
|
| 25 | 25 | ? '' |
| 26 | - : '=' . $this->quote . $key . $this->quote |
|
| 26 | + : '='.$this->quote.$key.$this->quote |
|
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $statements = $this->createStatements($value); |
| 46 | 46 | $classes[] = $statements[0][0]; |
| 47 | 47 | } |
| 48 | - $addClasses = '" " . implode(" ", array(' . implode(', ', $classes) . '))'; |
|
| 48 | + $addClasses = '" " . implode(" ", array('.implode(', ', $classes).'))'; |
|
| 49 | 49 | $classes = array(); |
| 50 | 50 | $classesCheck = array(); |
| 51 | 51 | } |
@@ -53,25 +53,25 @@ discard block |
||
| 53 | 53 | $statements = $this->createStatements($value); |
| 54 | 54 | |
| 55 | 55 | return $this->createCode( |
| 56 | - '$__attributes = ' . $this->getValueStatement($statements) . ';' . |
|
| 57 | - 'if (is_array($__attributes)) { ' . |
|
| 58 | - '$__attributes["class"] = trim(' . |
|
| 59 | - '$__classes = (empty($__classes) ? "" : $__classes . " ") . ' . |
|
| 60 | - '(isset($__attributes["class"]) ? (is_array($__attributes["class"]) ? implode(" ", $__attributes["class"]) : $__attributes["class"]) : "") . ' . |
|
| 61 | - $addClasses . |
|
| 62 | - '); ' . |
|
| 63 | - 'if (empty($__attributes["class"])) { ' . |
|
| 64 | - 'unset($__attributes["class"]); ' . |
|
| 65 | - '} ' . |
|
| 66 | - '} ' . |
|
| 67 | - '\\Jade\\Compiler::displayAttributes($__attributes, ' . var_export($this->quote, true) . ', ' . var_export($this->terse, true) . ');'); |
|
| 56 | + '$__attributes = '.$this->getValueStatement($statements).';'. |
|
| 57 | + 'if (is_array($__attributes)) { '. |
|
| 58 | + '$__attributes["class"] = trim('. |
|
| 59 | + '$__classes = (empty($__classes) ? "" : $__classes . " ") . '. |
|
| 60 | + '(isset($__attributes["class"]) ? (is_array($__attributes["class"]) ? implode(" ", $__attributes["class"]) : $__attributes["class"]) : "") . '. |
|
| 61 | + $addClasses. |
|
| 62 | + '); '. |
|
| 63 | + 'if (empty($__attributes["class"])) { '. |
|
| 64 | + 'unset($__attributes["class"]); '. |
|
| 65 | + '} '. |
|
| 66 | + '} '. |
|
| 67 | + '\\Jade\\Compiler::displayAttributes($__attributes, '.var_export($this->quote, true).', '.var_export($this->terse, true).');'); |
|
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | protected function getClassAttribute($value, &$classesCheck) |
| 71 | 71 | { |
| 72 | 72 | $statements = $this->createStatements($value); |
| 73 | 73 | $value = is_array($statements[0]) ? $statements[0][0] : $statements[0]; |
| 74 | - $classesCheck[] = '(is_array($_a = ' . $value . ') ? implode(" ", $_a) : $_a)'; |
|
| 74 | + $classesCheck[] = '(is_array($_a = '.$value.') ? implode(" ", $_a) : $_a)'; |
|
| 75 | 75 | |
| 76 | 76 | return $this->keepNullAttributes ? '' : 'null'; |
| 77 | 77 | } |
@@ -154,11 +154,11 @@ discard block |
||
| 154 | 154 | protected function getClassesCode(&$classes, &$classesCheck) |
| 155 | 155 | { |
| 156 | 156 | return trim($this->createCode( |
| 157 | - '$__classes = implode(" ", ' . |
|
| 158 | - 'array_unique(explode(" ", (empty($__classes) ? "" : $__classes) . ' . |
|
| 159 | - var_export(implode(' ', $classes), true) . ' . ' . |
|
| 160 | - 'implode(" ", array(' . implode(', ', $classesCheck) . ')) ' . |
|
| 161 | - ')) ' . |
|
| 157 | + '$__classes = implode(" ", '. |
|
| 158 | + 'array_unique(explode(" ", (empty($__classes) ? "" : $__classes) . '. |
|
| 159 | + var_export(implode(' ', $classes), true).' . '. |
|
| 160 | + 'implode(" ", array('.implode(', ', $classesCheck).')) '. |
|
| 161 | + ')) '. |
|
| 162 | 162 | ');' |
| 163 | 163 | )); |
| 164 | 164 | } |
@@ -166,12 +166,12 @@ discard block |
||
| 166 | 166 | protected function getClassesDisplayCode() |
| 167 | 167 | { |
| 168 | 168 | return trim($this->createCode( |
| 169 | - 'if (!empty($__classes)) { ' . |
|
| 170 | - '?> ' . (isset($this->options['classAttribute']) |
|
| 169 | + 'if (!empty($__classes)) { '. |
|
| 170 | + '?> '.(isset($this->options['classAttribute']) |
|
| 171 | 171 | ? $this->options['classAttribute'] |
| 172 | 172 | : 'class' |
| 173 | - ) . '=' . $this->quote . '<?php echo $__classes; ?>' . $this->quote . '<?php ' . |
|
| 174 | - '} ' . |
|
| 173 | + ).'='.$this->quote.'<?php echo $__classes; ?>'.$this->quote.'<?php '. |
|
| 174 | + '} '. |
|
| 175 | 175 | 'unset($__classes); ' |
| 176 | 176 | )); |
| 177 | 177 | } |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $fqn = get_class($node); |
| 33 | 33 | $parts = explode('\\', $fqn); |
| 34 | 34 | $name = strtolower(end($parts)); |
| 35 | - $method = 'visit' . ucfirst($name); |
|
| 35 | + $method = 'visit'.ucfirst($name); |
|
| 36 | 36 | |
| 37 | 37 | try { |
| 38 | 38 | return $this->$method($node); |
@@ -42,10 +42,10 @@ discard block |
||
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | throw new \ErrorException( |
| 45 | - 'Error on the ' . $name . |
|
| 46 | - (isset($node->name) ? ' "' . $node->name . '"' : '') . |
|
| 47 | - ($this->filename ? ' in ' . $this->filename : '') . |
|
| 48 | - ' line ' . $node->line . ":\n" . $e->getMessage(), |
|
| 45 | + 'Error on the '.$name. |
|
| 46 | + (isset($node->name) ? ' "'.$node->name.'"' : ''). |
|
| 47 | + ($this->filename ? ' in '.$this->filename : ''). |
|
| 48 | + ' line '.$node->line.":\n".$e->getMessage(), |
|
| 49 | 49 | 34, |
| 50 | 50 | 1, |
| 51 | 51 | __FILE__, |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | ? $this->doctypes[$doc] |
| 90 | 90 | : "<!DOCTYPE {$doc}>"; |
| 91 | 91 | |
| 92 | - $this->buffer($str . $this->newline()); |
|
| 92 | + $this->buffer($str.$this->newline()); |
|
| 93 | 93 | |
| 94 | 94 | $this->terse = (strtolower($str) === '<!doctype html>'); |
| 95 | 95 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | protected function visitComment(Comment $comment) |
| 125 | 125 | { |
| 126 | 126 | if ($comment->buffer) { |
| 127 | - $this->buffer('<!--' . $comment->value . '-->'); |
|
| 127 | + $this->buffer('<!--'.$comment->value.'-->'); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | return $match[0]; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - $var = ($match[0] === ',' ? ',' : '') . $match[1]; |
|
| 52 | + $var = ($match[0] === ',' ? ',' : '').$match[1]; |
|
| 53 | 53 | foreach (explode('.', substr($match[2], 1)) as $name) { |
| 54 | 54 | if (!empty($name)) { |
| 55 | 55 | $var = CommonUtils::getGetter($var, $name, false); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | protected static function convertVarPath($arg, $regexp = '/^%s|,%s/') |
| 71 | 71 | { |
| 72 | - $pattern = '\s*(\\${0,2}' . static::VARNAME . ')((\.' . static::VARNAME . ')*)'; |
|
| 72 | + $pattern = '\s*(\\${0,2}'.static::VARNAME.')((\.'.static::VARNAME.')*)'; |
|
| 73 | 73 | |
| 74 | 74 | return preg_replace_callback( |
| 75 | 75 | str_replace('%s', $pattern, $regexp), |
@@ -11,17 +11,17 @@ discard block |
||
| 11 | 11 | */ |
| 12 | 12 | protected function visitTagAttributes(Tag $tag, $newLinePrettyPrint, $close = '>') |
| 13 | 13 | { |
| 14 | - $open = '<' . $tag->name; |
|
| 14 | + $open = '<'.$tag->name; |
|
| 15 | 15 | |
| 16 | 16 | if (count($tag->attributes)) { |
| 17 | - $this->buffer($this->indent() . $open, false); |
|
| 17 | + $this->buffer($this->indent().$open, false); |
|
| 18 | 18 | $this->visitAttributes($tag->attributes); |
| 19 | - $this->buffer($this->getClassesDisplayCode() . $close . $this->newline(), false); |
|
| 19 | + $this->buffer($this->getClassesDisplayCode().$close.$this->newline(), false); |
|
| 20 | 20 | |
| 21 | 21 | return; |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - $this->buffer($open . $close, $newLinePrettyPrint ? null : false); |
|
| 24 | + $this->buffer($open.$close, $newLinePrettyPrint ? null : false); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | if (isset($tag->buffer)) { |
| 33 | 33 | if (preg_match('`^[a-z][a-zA-Z0-9]+(?!\()`', $tag->name)) { |
| 34 | - $tag->name = '$' . $tag->name; |
|
| 34 | + $tag->name = '$'.$tag->name; |
|
| 35 | 35 | } |
| 36 | - $tag->name = trim($this->createCode('echo ' . $tag->name . ';')); |
|
| 36 | + $tag->name = trim($this->createCode('echo '.$tag->name.';')); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | if (!$selfClosing) { |
| 75 | 75 | $this->visitTagContents($tag); |
| 76 | - $this->buffer('</' . $tag->name . '>', $tag->keepWhiteSpaces() ? false : null); |
|
| 76 | + $this->buffer('</'.$tag->name.'>', $tag->keepWhiteSpaces() ? false : null); |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | public static function addDollarIfNeeded($call) |
| 19 | 19 | { |
| 20 | 20 | if ($call === 'Inf') { |
| 21 | - throw new \InvalidArgumentException($call . ' cannot be read from PHP', 16); |
|
| 21 | + throw new \InvalidArgumentException($call.' cannot be read from PHP', 16); |
|
| 22 | 22 | } |
| 23 | 23 | if ($call === 'undefined') { |
| 24 | 24 | return 'null'; |
@@ -26,13 +26,13 @@ discard block |
||
| 26 | 26 | $firstChar = substr($call, 0, 1); |
| 27 | 27 | if ( |
| 28 | 28 | !in_array($firstChar, array('$', '\\')) && |
| 29 | - !preg_match('#^(?:' . CompilerConfig::VARNAME . '\\s*\\(|(?:null|false|true)(?![a-z]))#i', $call) && |
|
| 29 | + !preg_match('#^(?:'.CompilerConfig::VARNAME.'\\s*\\(|(?:null|false|true)(?![a-z]))#i', $call) && |
|
| 30 | 30 | ( |
| 31 | - preg_match('#^' . CompilerConfig::VARNAME . '#', $call) || |
|
| 31 | + preg_match('#^'.CompilerConfig::VARNAME.'#', $call) || |
|
| 32 | 32 | $firstChar === '_' |
| 33 | 33 | ) |
| 34 | 34 | ) { |
| 35 | - $call = '$' . $call; |
|
| 35 | + $call = '$'.$call; |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | return $call; |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | */ |
| 64 | 64 | public static function getGetter($anything, $key) |
| 65 | 65 | { |
| 66 | - return '\\Jade\\Compiler::getPropertyFromAnything(' . |
|
| 67 | - static::addDollarIfNeeded($anything) . ', ' . |
|
| 68 | - var_export($key, true) . |
|
| 66 | + return '\\Jade\\Compiler::getPropertyFromAnything('. |
|
| 67 | + static::addDollarIfNeeded($anything).', '. |
|
| 68 | + var_export($key, true). |
|
| 69 | 69 | ')'; |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | unset($arguments[$key]); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - $defaultAttributes[] = var_export($tab[0], true) . ' => ' . $tab[1]; |
|
| 31 | + $defaultAttributes[] = var_export($tab[0], true).' => '.$tab[1]; |
|
| 32 | 32 | $arguments[$newArrayKey][$tab[0]] = static::decodeValue($tab[1]); |
| 33 | 33 | continue; |
| 34 | 34 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | $newArrayKey = null; |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | - return array_map(function ($argument) { |
|
| 40 | + return array_map(function($argument) { |
|
| 41 | 41 | if (is_array($argument)) { |
| 42 | 42 | $argument = var_export($argument, true); |
| 43 | 43 | } |
@@ -94,28 +94,28 @@ discard block |
||
| 94 | 94 | $arguments = func_get_args(); |
| 95 | 95 | $begin = array_shift($arguments); |
| 96 | 96 | $begin = is_array($begin) |
| 97 | - ? $begin[0] . 'function ' . $begin[1] |
|
| 98 | - : $begin . 'function '; |
|
| 99 | - $params = implode(', ', array_map(function ($name) { |
|
| 100 | - return (substr($name, 0, 1) === '$' ? '' : '$') . $name; |
|
| 97 | + ? $begin[0].'function '.$begin[1] |
|
| 98 | + : $begin.'function '; |
|
| 99 | + $params = implode(', ', array_map(function($name) { |
|
| 100 | + return (substr($name, 0, 1) === '$' ? '' : '$').$name; |
|
| 101 | 101 | }, $arguments)); |
| 102 | 102 | |
| 103 | 103 | if ($this->restrictedScope) { |
| 104 | - return $this->buffer($this->createCode($begin . '(' . $params . ') {')); |
|
| 104 | + return $this->buffer($this->createCode($begin.'('.$params.') {')); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - $params = '&$__varHandler, ' . $params; |
|
| 107 | + $params = '&$__varHandler, '.$params; |
|
| 108 | 108 | |
| 109 | 109 | $this->buffer( |
| 110 | - $this->createCode($begin . '(' . $params . ') {') . |
|
| 111 | - $this->createCode($this->indent() . 'extract($__varHandler, EXTR_SKIP);') |
|
| 110 | + $this->createCode($begin.'('.$params.') {'). |
|
| 111 | + $this->createCode($this->indent().'extract($__varHandler, EXTR_SKIP);') |
|
| 112 | 112 | ); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | protected function renderClosureClosing($code, $arguments = array()) |
| 116 | 116 | { |
| 117 | 117 | if (!$this->restrictedScope) { |
| 118 | - $arguments = array_filter(array_map(function ($argument) { |
|
| 118 | + $arguments = array_filter(array_map(function($argument) { |
|
| 119 | 119 | $argument = explode('=', $argument); |
| 120 | 120 | $argument = trim($argument[0]); |
| 121 | 121 | |
@@ -124,13 +124,13 @@ discard block |
||
| 124 | 124 | : false; |
| 125 | 125 | }, array_slice($arguments, 1))); |
| 126 | 126 | $exception = count($arguments) |
| 127 | - ? ' && !in_array($key, ' . var_export($arguments, true) . ')' |
|
| 127 | + ? ' && !in_array($key, '.var_export($arguments, true).')' |
|
| 128 | 128 | : ''; |
| 129 | 129 | $this->buffer($this->createCode( |
| 130 | - 'foreach ($__varHandler as $key => &$val) {' . |
|
| 131 | - 'if ($key !== \'__varHandler\'' . $exception . ') {' . |
|
| 132 | - '$val = ${$key};' . |
|
| 133 | - '}' . |
|
| 130 | + 'foreach ($__varHandler as $key => &$val) {'. |
|
| 131 | + 'if ($key !== \'__varHandler\''.$exception.') {'. |
|
| 132 | + '$val = ${$key};'. |
|
| 133 | + '}'. |
|
| 134 | 134 | '}' |
| 135 | 135 | )); |
| 136 | 136 | } |
@@ -161,19 +161,19 @@ discard block |
||
| 161 | 161 | $strings = array(); |
| 162 | 162 | $arguments = preg_replace_callback( |
| 163 | 163 | '#([\'"])(.*(?!<\\\\)(?:\\\\{2})*)\\1#U', |
| 164 | - function ($match) use (&$strings) { |
|
| 164 | + function($match) use (&$strings) { |
|
| 165 | 165 | $nextIndex = count($strings); |
| 166 | 166 | $strings[] = $match[0]; |
| 167 | 167 | |
| 168 | - return 'stringToReplaceBy' . $nextIndex . 'ThCapture'; |
|
| 168 | + return 'stringToReplaceBy'.$nextIndex.'ThCapture'; |
|
| 169 | 169 | }, |
| 170 | 170 | $arguments |
| 171 | 171 | ); |
| 172 | 172 | $arguments = array_map( |
| 173 | - function ($arg) use ($strings) { |
|
| 173 | + function($arg) use ($strings) { |
|
| 174 | 174 | return preg_replace_callback( |
| 175 | 175 | '#stringToReplaceBy([0-9]+)ThCapture#', |
| 176 | - function ($match) use ($strings) { |
|
| 176 | + function($match) use ($strings) { |
|
| 177 | 177 | return $strings[intval($match[1])]; |
| 178 | 178 | }, |
| 179 | 179 | $arg |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $this->buffer($this->createCode('$__varHandler = get_defined_vars();')); |
| 201 | 201 | $paramsPrefix = '$__varHandler, '; |
| 202 | 202 | } |
| 203 | - $codeFormat = str_repeat('%s;', count($arguments) - 1) . "{$name}({$paramsPrefix}%s)"; |
|
| 203 | + $codeFormat = str_repeat('%s;', count($arguments) - 1)."{$name}({$paramsPrefix}%s)"; |
|
| 204 | 204 | |
| 205 | 205 | array_unshift($arguments, $codeFormat); |
| 206 | 206 | |
@@ -268,10 +268,10 @@ discard block |
||
| 268 | 268 | */ |
| 269 | 269 | protected function visitMixin(Mixin $mixin) |
| 270 | 270 | { |
| 271 | - $name = strtr($mixin->name, '-', '_') . '_mixin'; |
|
| 271 | + $name = strtr($mixin->name, '-', '_').'_mixin'; |
|
| 272 | 272 | $blockName = var_export($mixin->name, true); |
| 273 | 273 | if ($this->allowMixinOverride) { |
| 274 | - $name = '$GLOBALS[\'' . $name . '\']'; |
|
| 274 | + $name = '$GLOBALS[\''.$name.'\']'; |
|
| 275 | 275 | } |
| 276 | 276 | $attributes = static::decodeAttributes($mixin->attributes); |
| 277 | 277 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $this->visit($node->block); |
| 72 | 72 | |
| 73 | 73 | $code = $this->createCode('break;'); |
| 74 | - $this->buffer($code . $this->newline()); |
|
| 74 | + $this->buffer($code.$this->newline()); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $filter = new $filter(); |
| 89 | 89 | } |
| 90 | 90 | if (!is_callable($filter)) { |
| 91 | - throw new \InvalidArgumentException($node->name . ': Filter must be callable', 18); |
|
| 91 | + throw new \InvalidArgumentException($node->name.': Filter must be callable', 18); |
|
| 92 | 92 | } |
| 93 | 93 | $this->buffer($filter($node, $this)); |
| 94 | 94 | } |
@@ -175,10 +175,10 @@ discard block |
||
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | foreach (array('begin', 'end') as $key) { |
| 178 | - $data[$key] = (isset($data[$key . 'Php']) |
|
| 179 | - ? $this->createCode($data[$key . 'Php']) |
|
| 178 | + $data[$key] = (isset($data[$key.'Php']) |
|
| 179 | + ? $this->createCode($data[$key.'Php']) |
|
| 180 | 180 | : '' |
| 181 | - ) . (isset($data[$key]) |
|
| 181 | + ).(isset($data[$key]) |
|
| 182 | 182 | ? $data[$key] |
| 183 | 183 | : '' |
| 184 | 184 | ); |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | { |
| 83 | 83 | return isset($anything->$key) |
| 84 | 84 | ? $anything->$key |
| 85 | - : (method_exists($anything, $method = 'get' . ucfirst($key)) |
|
| 85 | + : (method_exists($anything, $method = 'get'.ucfirst($key)) |
|
| 86 | 86 | ? $anything->$method() |
| 87 | 87 | : (method_exists($anything, $key) |
| 88 | 88 | ? array($anything, $key) |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | $value = static::joinAny($attribute['value']); |
| 127 | 127 | $attributes['class'] = empty($attributes['class']) |
| 128 | 128 | ? $value |
| 129 | - : static::joinAny($attributes['class']) . ' ' . $value; |
|
| 129 | + : static::joinAny($attributes['class']).' '.$value; |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | if (isset($attributes['class'])) { |
@@ -148,10 +148,10 @@ discard block |
||
| 148 | 148 | foreach ($attributes as $key => $value) { |
| 149 | 149 | if ($key !== 'class' && $value !== false && $value !== 'null') { |
| 150 | 150 | if ($value === true) { |
| 151 | - echo ' ' . $key . ($terse ? '' : '=' . $quote . $key . $quote); |
|
| 151 | + echo ' '.$key.($terse ? '' : '='.$quote.$key.$quote); |
|
| 152 | 152 | continue; |
| 153 | 153 | } |
| 154 | - echo ' ' . $key . '=' . $quote . htmlspecialchars($value) . $quote; |
|
| 154 | + echo ' '.$key.'='.$quote.htmlspecialchars($value).$quote; |
|
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | } |