@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | function __construct($s, $mode = self::TOKEN_CONTROL) |
36 | 36 | { |
37 | 37 | $m = []; |
38 | - if (preg_match('/^(.*) ' . self::REGEX_COMP_OPER . ' (.*)$/', $s, $m)) { |
|
38 | + if (preg_match('/^(.*) '.self::REGEX_COMP_OPER.' (.*)$/', $s, $m)) { |
|
39 | 39 | $this->param1 = new Text($m[1], Text::TOKEN_HTML); |
40 | 40 | $this->param2 = new Text($m[3], Text::TOKEN_HTML); |
41 | 41 | $this->operator = $m[2]; |
@@ -59,14 +59,14 @@ discard block |
||
59 | 59 | switch ($this->operator) { |
60 | 60 | case 'equals': |
61 | 61 | case 'equal': |
62 | - return $p1 . ' == ' . $p2; |
|
62 | + return $p1.' == '.$p2; |
|
63 | 63 | case 'notequals': |
64 | 64 | case 'notequal': |
65 | - return $p1 . ' != ' . $p2; |
|
65 | + return $p1.' != '.$p2; |
|
66 | 66 | case 'less': |
67 | - return $p1 . ' < ' . $p2; |
|
67 | + return $p1.' < '.$p2; |
|
68 | 68 | case 'greater': |
69 | - return $p1 . ' > ' . $p2; |
|
69 | + return $p1.' > '.$p2; |
|
70 | 70 | case 'has': |
71 | 71 | return "in_array($p2, $p1)"; |
72 | 72 | case 'starts': |
@@ -47,9 +47,9 @@ |
||
47 | 47 | function toPHP() |
48 | 48 | { |
49 | 49 | if (is_numeric($this->scope)) { |
50 | - return 'Hamle\\Scope::get(' . Text::varToCode($this->scope) . ')'; |
|
50 | + return 'Hamle\\Scope::get('.Text::varToCode($this->scope).')'; |
|
51 | 51 | } else { |
52 | - return 'Hamle\\Scope::getName(' . Text::varToCode($this->scope) . ')'; |
|
52 | + return 'Hamle\\Scope::getName('.Text::varToCode($this->scope).')'; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | throw new ParseError("Unable to parse filter expression \"$s\""); |
68 | 68 | } |
69 | 69 | if (method_exists(Filter::class, $this->filter)) { |
70 | - $this->filter = Filter::class . '::' . $this->filter; |
|
70 | + $this->filter = Filter::class.'::'.$this->filter; |
|
71 | 71 | } elseif ( |
72 | 72 | in_array($this->filter, ['round', 'strtoupper', 'strtolower', 'ucfirst']) |
73 | 73 | ) { |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | function toHTML($escape = false) |
88 | 88 | { |
89 | 89 | if ($escape) { |
90 | - return '<?=htmlspecialchars(' . $this->toPHP() . ')?>'; |
|
90 | + return '<?=htmlspecialchars('.$this->toPHP().')?>'; |
|
91 | 91 | } |
92 | - return '<?=' . $this->toPHP() . '?>'; |
|
92 | + return '<?='.$this->toPHP().'?>'; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | function toPHPpre() |
@@ -109,14 +109,14 @@ discard block |
||
109 | 109 | } |
110 | 110 | $o = ''; |
111 | 111 | foreach ($this->vars as $v) { |
112 | - $o .= ',' . $this->varToCode($v); |
|
112 | + $o .= ','.$this->varToCode($v); |
|
113 | 113 | } |
114 | 114 | return "$o)$post"; |
115 | 115 | } |
116 | 116 | |
117 | 117 | function toPHP() |
118 | 118 | { |
119 | - return $this->toPHPpre() . $this->what->toPHPVar() . $this->toPHPpost(); |
|
119 | + return $this->toPHPpre().$this->what->toPHPVar().$this->toPHPpost(); |
|
120 | 120 | // $o = [$this->what->toPHPVar()] ; |
121 | 121 | // foreach($this->vars as $v) |
122 | 122 | // $o[] = $this->varToCode($v); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | $m = []; |
44 | 44 | if ( |
45 | - !preg_match('/^ +([><]) +(' . self::REGEX_FUNCSEL . '+)(.*)$/', $s, $m) |
|
45 | + !preg_match('/^ +([><]) +('.self::REGEX_FUNCSEL.'+)(.*)$/', $s, $m) |
|
46 | 46 | ) { |
47 | 47 | throw new ParseError("Unable to read \$ sub func in '$s'"); |
48 | 48 | } |
@@ -71,18 +71,18 @@ discard block |
||
71 | 71 | public function toPHP() |
72 | 72 | { |
73 | 73 | $limit = |
74 | - Hamle\Text::varToCode($this->sortlimit['sort']) . |
|
75 | - ',' . |
|
76 | - $this->sortlimit['limit'] . |
|
77 | - ',' . |
|
78 | - $this->sortlimit['offset'] . |
|
79 | - ',' . |
|
74 | + Hamle\Text::varToCode($this->sortlimit['sort']). |
|
75 | + ','. |
|
76 | + $this->sortlimit['limit']. |
|
77 | + ','. |
|
78 | + $this->sortlimit['offset']. |
|
79 | + ','. |
|
80 | 80 | $this->grouptype['grouptype']; |
81 | - $sub = $this->sub ? '->' . $this->sub->toPHP() : ''; |
|
82 | - return 'hamleRel(' . |
|
83 | - $this->dir . |
|
84 | - ',' . |
|
85 | - Hamle\Text::varToCode($this->filt['tag']) . |
|
81 | + $sub = $this->sub ? '->'.$this->sub->toPHP() : ''; |
|
82 | + return 'hamleRel('. |
|
83 | + $this->dir. |
|
84 | + ','. |
|
85 | + Hamle\Text::varToCode($this->filt['tag']). |
|
86 | 86 | ",$limit)$sub"; |
87 | 87 | } |
88 | 88 | |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | if (!$model->valid()) { |
99 | 99 | if (!$parent instanceof Hamle\WriteModel) { |
100 | 100 | throw new \Exception( |
101 | - 'Cant create model, ' . |
|
102 | - get_class($parent) . |
|
101 | + 'Cant create model, '. |
|
102 | + get_class($parent). |
|
103 | 103 | ' must implement Hamle\\WriteModel.', |
104 | 104 | ); |
105 | 105 | } |
@@ -38,11 +38,11 @@ |
||
38 | 38 | |
39 | 39 | function toPHP() |
40 | 40 | { |
41 | - return '$form->getField(' . Text::varToCode($this->var) . ')->getValue()'; |
|
41 | + return '$form->getField('.Text::varToCode($this->var).')->getValue()'; |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | function toHTML($escape = false) |
45 | 45 | { |
46 | - return '<?=' . $this->toPHP() . '?>'; |
|
46 | + return '<?='.$this->toPHP().'?>'; |
|
47 | 47 | } |
48 | 48 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | $s = implode("\n", $as); |
52 | 52 | |
53 | - require_once ME_DIR . '/lib/phpsass/SassParser.php'; |
|
53 | + require_once ME_DIR.'/lib/phpsass/SassParser.php'; |
|
54 | 54 | $sp = new SassParser([ |
55 | 55 | 'cache' => false, |
56 | 56 | 'style' => stdConf::get('me.developer') |
@@ -62,6 +62,6 @@ discard block |
||
62 | 62 | $tree = $sp->toTree($s); |
63 | 63 | $out = $tree->render(); |
64 | 64 | $pad = str_pad('', $indent, ' '); |
65 | - return $pad . str_replace("\n", "\n$pad", trim($out)); |
|
65 | + return $pad.str_replace("\n", "\n$pad", trim($out)); |
|
66 | 66 | } |
67 | 67 | } |
@@ -43,9 +43,9 @@ |
||
43 | 43 | |
44 | 44 | static function filterText($s) |
45 | 45 | { |
46 | - return "/*<![CDATA[*/\n" . |
|
46 | + return "/*<![CDATA[*/\n". |
|
47 | 47 | /*preg_replace(HamlParser::MATCH_INTERPOLATION, '<?php echo \1; ?>', $text)*/ |
48 | - $s . |
|
48 | + $s. |
|
49 | 49 | '/*]]>*/'; |
50 | 50 | } |
51 | 51 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | function setup() |
48 | 48 | { |
49 | 49 | throw new Exception\RunTime( |
50 | - 'You must configure the form in the setup ' . |
|
50 | + 'You must configure the form in the setup '. |
|
51 | 51 | "function, by adding fields to the \$this->fields array", |
52 | 52 | ); |
53 | 53 | } |
@@ -25,8 +25,8 @@ |
||
25 | 25 | { |
26 | 26 | if (!$model instanceof Model) { |
27 | 27 | throw new Unsupported( |
28 | - 'Unsupported Model (' . |
|
29 | - get_class($model) . |
|
28 | + 'Unsupported Model ('. |
|
29 | + get_class($model). |
|
30 | 30 | '), Needs to implement hamleModel Interface', |
31 | 31 | ); |
32 | 32 | } |