@@ -4,14 +4,14 @@ |
||
4 | 4 | |
5 | 5 | //JATE SUFF |
6 | 6 | require_once (end($GLOBALS["JATEPath"])."jate/functions/requirer.php"); |
7 | - requireComponent ("functions/folder.php"); |
|
8 | - requireComponent ("modules/JConfig/JConfig.php"); |
|
9 | - requireComponents ("functions"); |
|
10 | - requireModules ("modules"); |
|
7 | + requireComponent("functions/folder.php"); |
|
8 | + requireComponent("modules/JConfig/JConfig.php"); |
|
9 | + requireComponents("functions"); |
|
10 | + requireModules("modules"); |
|
11 | 11 | |
12 | 12 | //USER STUFF |
13 | - requireComponent ("config.php",false); |
|
14 | - requireModules ("modules",false); |
|
15 | - requireComponents ("bundles/models",false); |
|
16 | - requireComponents ("bundles/controllers",false); |
|
13 | + requireComponent("config.php", false); |
|
14 | + requireModules("modules", false); |
|
15 | + requireComponents("bundles/models", false); |
|
16 | + requireComponents("bundles/controllers", false); |
|
17 | 17 | ?> |
@@ -5,24 +5,24 @@ discard block |
||
5 | 5 | return ob_start(); |
6 | 6 | } |
7 | 7 | |
8 | - function jBlockClose( $_parameter = "html" ) { |
|
8 | + function jBlockClose($_parameter = "html") { |
|
9 | 9 | return jBlockEnd($_parameter); |
10 | 10 | } |
11 | 11 | |
12 | - function jBlockFile( $_path ) { |
|
12 | + function jBlockFile($_path) { |
|
13 | 13 | $extension = explode(".", $_path); |
14 | - $extension = $extension[count($extension)-1]; |
|
14 | + $extension = $extension[count($extension) - 1]; |
|
15 | 15 | $extension = strtolower($extension); |
16 | 16 | $temp = file_get_contents($_path); |
17 | 17 | return jBlockParsing($extension, $temp); |
18 | 18 | } |
19 | 19 | |
20 | - function jBlockEnd( $_parameter = "html" ) { |
|
20 | + function jBlockEnd($_parameter = "html") { |
|
21 | 21 | $temp = ob_get_clean(); |
22 | 22 | return jBlockParsing($_parameter, $temp); |
23 | 23 | } |
24 | 24 | |
25 | - function jBlockParsing( $_parameter = "html", $_string = "" ) { |
|
25 | + function jBlockParsing($_parameter = "html", $_string = "") { |
|
26 | 26 | switch ($_parameter) { |
27 | 27 | case "pug": |
28 | 28 | case "jade": |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | function minifyOutput($_buffer) { |
44 | - $search = array ( '/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s' ); |
|
45 | - $replace = array ( '>', '<', '\\1' ); |
|
46 | - if (preg_match("/\<html/i",$_buffer) == 1 && preg_match("/\<\/html\>/i",$_buffer) == 1) |
|
44 | + $search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s'); |
|
45 | + $replace = array('>', '<', '\\1'); |
|
46 | + if (preg_match("/\<html/i", $_buffer) == 1 && preg_match("/\<\/html\>/i", $_buffer) == 1) |
|
47 | 47 | $_buffer = preg_replace($search, $replace, utf8_decode($_buffer)); |
48 | 48 | return utf8_encode($_buffer); |
49 | 49 | } |
@@ -2,6 +2,6 @@ |
||
2 | 2 | |
3 | 3 | // autoload.php @generated by Composer |
4 | 4 | |
5 | -require_once __DIR__ . '/composer' . '/autoload_real.php'; |
|
5 | +require_once __DIR__.'/composer'.'/autoload_real.php'; |
|
6 | 6 | |
7 | 7 | return ComposerAutoloaderInitb1e7ddc74da87434be0b5632a8bb4210::getLoader(); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | */ |
178 | 178 | protected function closingTag() |
179 | 179 | { |
180 | - return '?>' . ($this->prettyprint ? ' ' : ''); |
|
180 | + return '?>'.($this->prettyprint ? ' ' : ''); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | |
194 | 194 | // Separate in several lines to get a useable line number in case of an error occurs |
195 | 195 | if ($this->phpSingleLine) { |
196 | - $code = str_replace(array('<?php', '?>'), array("<?php\n", "\n" . $this->closingTag()), $code); |
|
196 | + $code = str_replace(array('<?php', '?>'), array("<?php\n", "\n".$this->closingTag()), $code); |
|
197 | 197 | } |
198 | 198 | // Remove the $ wich are not needed |
199 | 199 | return $code; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | protected function buffer($line, $indent = null) |
224 | 224 | { |
225 | 225 | if ($indent === true || ($indent === null && $this->prettyprint)) { |
226 | - $line = $this->indent() . $line . $this->newline(); |
|
226 | + $line = $this->indent().$line.$this->newline(); |
|
227 | 227 | } |
228 | 228 | |
229 | 229 | $this->buffer[] = $line; |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | */ |
237 | 237 | protected function isConstant($str) |
238 | 238 | { |
239 | - return preg_match('/^' . static::CONSTANT_VALUE . '$/', trim($str)); |
|
239 | + return preg_match('/^'.static::CONSTANT_VALUE.'$/', trim($str)); |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | /** |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | $quote = substr($match[1], 0, 1); |
291 | 291 | |
292 | 292 | if (strlen(trim($match[2]))) { |
293 | - throw new \ErrorException('Unexpected value: ' . $match[2], 8); |
|
293 | + throw new \ErrorException('Unexpected value: '.$match[2], 8); |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | array_push($resultsString, $match[1]); |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | $arg = static::convertVarPath($arg); |
353 | 353 | |
354 | 354 | // add dollar if missing |
355 | - if (preg_match('/^' . static::VARNAME . '(\s*,.+)?$/', $arg)) { |
|
355 | + if (preg_match('/^'.static::VARNAME.'(\s*,.+)?$/', $arg)) { |
|
356 | 356 | $arg = static::addDollarIfNeeded($arg); |
357 | 357 | } |
358 | 358 | |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | } |
364 | 364 | |
365 | 365 | // if we have a php variable assume that the string is good php |
366 | - if (strpos('{[', substr($arg, 0, 1)) === false && preg_match('/&?\${1,2}' . static::VARNAME . '|[A-Za-z0-9_\\\\]+::/', $arg)) { |
|
366 | + if (strpos('{[', substr($arg, 0, 1)) === false && preg_match('/&?\${1,2}'.static::VARNAME.'|[A-Za-z0-9_\\\\]+::/', $arg)) { |
|
367 | 367 | array_push($variables, $arg); |
368 | 368 | continue; |
369 | 369 | } |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | try { |
393 | 393 | return $this->handleCode(preg_replace('#/\*(.*)\*/#', '', $arg)); |
394 | 394 | } catch (\Exception $e) { |
395 | - throw new ParserException('Pug.php did not understand ' . $arg, 10, $e); |
|
395 | + throw new ParserException('Pug.php did not understand '.$arg, 10, $e); |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | } |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | protected function createPhpBlock($code, $statements = null) |
407 | 407 | { |
408 | 408 | if ($statements === null) { |
409 | - return '<?php ' . $code . ' ' . $this->closingTag(); |
|
409 | + return '<?php '.$code.' '.$this->closingTag(); |
|
410 | 410 | } |
411 | 411 | |
412 | 412 | $codeFormat = array_pop($statements); |
@@ -415,20 +415,20 @@ discard block |
||
415 | 415 | if (count($statements) === 0) { |
416 | 416 | $phpString = call_user_func_array('sprintf', $codeFormat); |
417 | 417 | |
418 | - return '<?php ' . $phpString . ' ' . $this->closingTag(); |
|
418 | + return '<?php '.$phpString.' '.$this->closingTag(); |
|
419 | 419 | } |
420 | 420 | |
421 | 421 | $stmtString = ''; |
422 | 422 | foreach ($statements as $stmt) { |
423 | - $stmtString .= $this->newline() . $this->indent() . $stmt . ';'; |
|
423 | + $stmtString .= $this->newline().$this->indent().$stmt.';'; |
|
424 | 424 | } |
425 | 425 | |
426 | - $stmtString .= $this->newline() . $this->indent(); |
|
426 | + $stmtString .= $this->newline().$this->indent(); |
|
427 | 427 | $stmtString .= call_user_func_array('sprintf', $codeFormat); |
428 | 428 | |
429 | 429 | $phpString = '<?php '; |
430 | 430 | $phpString .= $stmtString; |
431 | - $phpString .= $this->newline() . $this->indent() . ' ' . $this->closingTag(); |
|
431 | + $phpString .= $this->newline().$this->indent().' '.$this->closingTag(); |
|
432 | 432 | |
433 | 433 | return $phpString; |
434 | 434 | } |
@@ -183,7 +183,7 @@ |
||
183 | 183 | 'AndAttributes', |
184 | 184 | 'Text', |
185 | 185 | ) as $tokenType) { |
186 | - if ($token = $this->{'scan' . $tokenType}()) { |
|
186 | + if ($token = $this->{'scan'.$tokenType}()) { |
|
187 | 187 | return $token; |
188 | 188 | } |
189 | 189 | } |
@@ -43,8 +43,8 @@ |
||
43 | 43 | $extensions[] = $extension; |
44 | 44 | } |
45 | 45 | foreach ($extensions as $extension) { |
46 | - if (file_exists($path . $extension)) { |
|
47 | - return realpath($path . $extension); |
|
46 | + if (file_exists($path.$extension)) { |
|
47 | + return realpath($path.$extension); |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $path = ($isAbsolutePath |
74 | 74 | ? rtrim($this->options['basedir'], '/\\') |
75 | 75 | : dirname($this->filename) |
76 | - ) . DIRECTORY_SEPARATOR . $path; |
|
76 | + ).DIRECTORY_SEPARATOR.$path; |
|
77 | 77 | $extensions = new ExtensionsHelper($this->extension); |
78 | 78 | |
79 | 79 | return $extensions->findValidTemplatePath($path, ''); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | try { |
186 | 186 | $ast = $parser->parse(); |
187 | 187 | } catch (\Exception $e) { |
188 | - throw new ParserException($parser->getFilename() . ' (' . $block->line . ') : ' . $e->getMessage(), 23, $e); |
|
188 | + throw new ParserException($parser->getFilename().' ('.$block->line.') : '.$e->getMessage(), 23, $e); |
|
189 | 189 | } |
190 | 190 | $this->context(); |
191 | 191 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $lineNumber = $this->line(); |
209 | 209 | $lines = explode("\n", $this->input); |
210 | 210 | $lineString = isset($lines[$lineNumber]) ? $lines[$lineNumber] : ''; |
211 | - throw new \ErrorException("\n" . sprintf('Expected %s, but got %s in %dth line : %s', $type, $this->peekType(), $lineNumber, $lineString) . "\n", 24); |
|
211 | + throw new \ErrorException("\n".sprintf('Expected %s, but got %s in %dth line : %s', $type, $this->peekType(), $lineNumber, $lineString)."\n", 24); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | protected function accept($type) |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | $_types = array('tag', 'mixin', 'block', 'case', 'when', 'default', 'extends', 'include', 'doctype', 'filter', 'comment', 'text', 'each', 'customKeyword', 'code', 'call', 'interpolation'); |
224 | 224 | |
225 | 225 | if (in_array($this->peekType(), $_types)) { |
226 | - $_method = 'parse' . ucfirst($this->peekType()); |
|
226 | + $_method = 'parse'.ucfirst($this->peekType()); |
|
227 | 227 | |
228 | 228 | return $this->$_method(); |
229 | 229 | } |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | return $this->parseExpression(); |
246 | 246 | |
247 | 247 | default: |
248 | - throw new \ErrorException($this->filename . ' (' . $this->line() . ') : Unexpected token "' . $this->peekType() . '"', 25); |
|
248 | + throw new \ErrorException($this->filename.' ('.$this->line().') : Unexpected token "'.$this->peekType().'"', 25); |
|
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | try { |
456 | 456 | $ast = $parser->parse(); |
457 | 457 | } catch (\Exception $e) { |
458 | - throw new \ErrorException($path . ' (' . $parser->lexer->lineno . ') : ' . $e->getMessage(), 27); |
|
458 | + throw new \ErrorException($path.' ('.$parser->lexer->lineno.') : '.$e->getMessage(), 27); |
|
459 | 459 | } |
460 | 460 | $this->context(); |
461 | 461 | $ast->filename = $path; |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | break; |
537 | 537 | |
538 | 538 | default: |
539 | - $this->parseInlineTags($block, $indent . $this->advance()->value); |
|
539 | + $this->parseInlineTags($block, $indent.$this->advance()->value); |
|
540 | 540 | } |
541 | 541 | } |
542 | 542 | |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | $peek = $this->peek(); |
657 | 657 | $escaped = isset($peek->escaped, $peek->escaped[$type]) && $peek->escaped[$type]; |
658 | 658 | $value = $escaped || !isset($peek->attributes, $peek->attributes[$type]) |
659 | - ? "'" . $token->value . "'" |
|
659 | + ? "'".$token->value."'" |
|
660 | 660 | : $peek->attributes[$type]; |
661 | 661 | $tag->setAttribute($token->type, $value, $escaped); |
662 | 662 | unset($peek->attributes[$type]); |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | |
665 | 665 | case 'class': |
666 | 666 | $token = $this->advance(); |
667 | - $tag->setAttribute($token->type, "'" . $token->value . "'"); |
|
667 | + $tag->setAttribute($token->type, "'".$token->value."'"); |
|
668 | 668 | continue; |
669 | 669 | |
670 | 670 | case 'attributes': |
@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | { |
57 | 57 | $quote = $match[1]; |
58 | 58 | |
59 | - return str_replace('\\#{', '#{', preg_replace_callback('/(?<!\\\\)#{([^}]+)}/', function ($match) use ($quote) { |
|
60 | - return $quote . ' . ' . CommonUtils::addDollarIfNeeded(preg_replace_callback( |
|
59 | + return str_replace('\\#{', '#{', preg_replace_callback('/(?<!\\\\)#{([^}]+)}/', function($match) use ($quote) { |
|
60 | + return $quote.' . '.CommonUtils::addDollarIfNeeded(preg_replace_callback( |
|
61 | 61 | '/(?<![a-zA-Z0-9_\$])(\$?[a-zA-Z_][a-zA-Z0-9_]*)\.([a-zA-Z_][a-zA-Z0-9_]*)(?![a-zA-Z0-9_])/', |
62 | - function ($match) { |
|
62 | + function($match) { |
|
63 | 63 | return CommonUtils::getGetter($match[1], $match[2]); |
64 | 64 | }, |
65 | 65 | $match[1] |
66 | - )) . ' . ' . $quote; |
|
66 | + )).' . '.$quote; |
|
67 | 67 | }, $match[0])); |
68 | 68 | } |
69 | 69 | |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | protected function getParseFunction(&$key, &$val, &$quote, $states, &$escapedAttribute, &$previousChar, &$previousNonBlankChar, $parser) |
166 | 166 | { |
167 | - return function ($char, $nextChar = '') use (&$key, &$val, &$quote, $states, &$escapedAttribute, &$previousChar, &$previousNonBlankChar, $parser) { |
|
167 | + return function($char, $nextChar = '') use (&$key, &$val, &$quote, $states, &$escapedAttribute, &$previousChar, &$previousNonBlankChar, $parser) { |
|
168 | 168 | $parser->parseChar($char, $nextChar, $key, $val, $quote, $states, $escapedAttribute, $previousChar, $previousNonBlankChar); |
169 | 169 | $previousChar = $char; |
170 | 170 | if (trim($char) !== '') { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | protected function testIndent($indent) |
65 | 65 | { |
66 | - if (!preg_match('/^' . $indent . '/', substr($this->input, 1), $matches)) { |
|
66 | + if (!preg_match('/^'.$indent.'/', substr($this->input, 1), $matches)) { |
|
67 | 67 | return; |
68 | 68 | } |
69 | 69 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | return array( |
75 | - "\n" . $matches[0], |
|
75 | + "\n".$matches[0], |
|
76 | 76 | $matches[0], |
77 | 77 | ); |
78 | 78 | } |