@@ -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 | } |
@@ -132,15 +132,15 @@ discard block |
||
| 132 | 132 | if (!is_null($this->setValue)) { |
| 133 | 133 | return $this->setValue; |
| 134 | 134 | } |
| 135 | - if (isset($_REQUEST[$this->form . '_' . $this->name])) { |
|
| 136 | - return $_REQUEST[$this->form . '_' . $this->name]; |
|
| 135 | + if (isset($_REQUEST[$this->form.'_'.$this->name])) { |
|
| 136 | + return $_REQUEST[$this->form.'_'.$this->name]; |
|
| 137 | 137 | } |
| 138 | 138 | return $this->opt['default']; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | function getInputAttStatic(&$atts, &$type, &$content) |
| 142 | 142 | { |
| 143 | - $atts['id'] = $atts['name'] = $this->form . '_' . $this->name; |
|
| 143 | + $atts['id'] = $atts['name'] = $this->form.'_'.$this->name; |
|
| 144 | 144 | $atts['type'] = 'text'; |
| 145 | 145 | $atts['class'][] = str_replace( |
| 146 | 146 | ['Seufert\\', '\\'], |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | ['', '_'], |
| 175 | 175 | get_class($this), |
| 176 | 176 | ); |
| 177 | - $atts['for'] = $this->form . '_' . $this->name; |
|
| 177 | + $atts['for'] = $this->form.'_'.$this->name; |
|
| 178 | 178 | $content = [$this->opt['label']]; |
| 179 | 179 | } |
| 180 | 180 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | function __construct($message = '', $code = 0, $previous = null) |
| 34 | 34 | { |
| 35 | 35 | ///@todo Include Line number & file name within parse error exceptions |
| 36 | - $message .= ', on line ' . Hamle\Hamle::getLineNo() . ' in file ?.hamle'; |
|
| 36 | + $message .= ', on line '.Hamle\Hamle::getLineNo().' in file ?.hamle'; |
|
| 37 | 37 | parent::__construct($message, $code, $previous); |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | { |
| 159 | 159 | $ind = $minify ? '' : str_pad('', $indent); |
| 160 | 160 | $oneliner = !(count($this->content) > 1 || $this->tags); |
| 161 | - $out = $ind . $this->renderStTag() . ($oneliner || $minify ? '' : "\n"); |
|
| 161 | + $out = $ind.$this->renderStTag().($oneliner || $minify ? '' : "\n"); |
|
| 162 | 162 | if ($this->content) { |
| 163 | 163 | $out .= $this->renderContent($ind, $oneliner || $minify); |
| 164 | 164 | } |
@@ -166,8 +166,8 @@ discard block |
||
| 166 | 166 | $out .= $tag->render($indent + self::INDENT_SIZE, $minify); |
| 167 | 167 | } |
| 168 | 168 | $out .= |
| 169 | - ($minify || $oneliner ? '' : $ind) . |
|
| 170 | - $this->renderEnTag() . |
|
| 169 | + ($minify || $oneliner ? '' : $ind). |
|
| 170 | + $this->renderEnTag(). |
|
| 171 | 171 | ($minify ? '' : "\n"); |
| 172 | 172 | return $out; |
| 173 | 173 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | { |
| 184 | 184 | $out = ''; |
| 185 | 185 | foreach ($this->content as $c) { |
| 186 | - $out .= ($oneliner ? '' : $pad) . $c . ($oneliner ? '' : "\n"); |
|
| 186 | + $out .= ($oneliner ? '' : $pad).$c.($oneliner ? '' : "\n"); |
|
| 187 | 187 | } |
| 188 | 188 | return $out; |
| 189 | 189 | } |