Passed
Push — EXTRACT_CLASSES ( 0382f2...c25e41 )
by Rafael
52:18
created
Dolibarr/Code/Core/Classes/lessc_parser.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -133,17 +133,17 @@  discard block
 block discarded – undo
133 133
 
134 134
 		if (!self::$operatorString) {
135 135
 			self::$operatorString =
136
-				'('.implode('|', array_map(
136
+				'(' . implode('|', array_map(
137 137
 					array('lessc', 'preg_quote'),
138 138
 					array_keys(self::$precedence)
139
-				)).')';
139
+				)) . ')';
140 140
 
141 141
 			$commentSingle = Lessc::preg_quote(self::$commentSingle);
142 142
 			$commentMultiLeft = Lessc::preg_quote(self::$commentMultiLeft);
143 143
 			$commentMultiRight = Lessc::preg_quote(self::$commentMultiRight);
144 144
 
145
-			self::$commentMulti = $commentMultiLeft.'.*?'.$commentMultiRight;
146
-			self::$whitePattern = '/'.$commentSingle.'[^\n]*\s*|('.self::$commentMulti.')\s*|\s+/Ais';
145
+			self::$commentMulti = $commentMultiLeft . '.*?' . $commentMultiRight;
146
+			self::$whitePattern = '/' . $commentSingle . '[^\n]*\s*|(' . self::$commentMulti . ')\s*|\s+/Ais';
147 147
 		}
148 148
 	}
149 149
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		while (false !== $this->parseChunk());
177 177
 
178 178
 		if ($this->count != strlen($this->buffer)) {
179
-			$this->throwError('parse error count '.$this->count.' != len buffer '.strlen($this->buffer));
179
+			$this->throwError('parse error count ' . $this->count . ' != len buffer ' . strlen($this->buffer));
180 180
 
181 181
 		}
182 182
 
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
 		// mixin
384 384
 		if ($this->mixinTags($tags) &&
385 385
 			$this->argumentDef($argv, $isVararg) &&
386
-			$this->keyword($suffix)  && $this->end()
386
+			$this->keyword($suffix) && $this->end()
387 387
 		) {
388 388
 			$tags = $this->fixTags($tags);
389 389
 			$this->append(array('mixin', $tags, $argv, $suffix), $s);
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 			"|",
408 408
 			array_map(array("lessc", "preg_quote"), $directives)
409 409
 		);
410
-		$pattern = '/^(-[a-z-]+-)?('.$pattern.')$/i';
410
+		$pattern = '/^(-[a-z-]+-)?(' . $pattern . ')$/i';
411 411
 
412 412
 		return preg_match($pattern, $dirname);
413 413
 	}
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 			$needWhite = $whiteBefore && !$this->inParens;
492 492
 
493 493
 			$m = array();
494
-			if ($this->match(self::$operatorString.($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) {
494
+			if ($this->match(self::$operatorString . ($needWhite ? '\s' : ''), $m) && self::$precedence[$m[1]] >= $minP) {
495 495
 				if (!$this->inParens && isset($this->env->currentProperty) && $m[1] == "/" && empty($this->env->supressedDivision)) {
496 496
 					foreach (self::$supressDivisionProps as $pattern) {
497 497
 						if (preg_match($pattern, $this->env->currentProperty)) {
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 		// css hack: \0
654 654
 		$m = array();
655 655
 		if ($this->literal('\\') && $this->match('([0-9]+)', $m)) {
656
-			$value = array('keyword', '\\'.$m[1]);
656
+			$value = array('keyword', '\\' . $m[1]);
657 657
 			return true;
658 658
 		} else {
659 659
 			$this->seek($s);
@@ -777,7 +777,7 @@  discard block
 block discarded – undo
777 777
 			$stop = array_merge($stop, $rejectStrs);
778 778
 		}
779 779
 
780
-		$patt = '(.*?)('.implode("|", $stop).')';
780
+		$patt = '(.*?)(' . implode("|", $stop) . ')';
781 781
 
782 782
 		$nestingLevel = 0;
783 783
 
@@ -851,8 +851,8 @@  discard block
 block discarded – undo
851 851
 		$content = array();
852 852
 
853 853
 		// look for either ending delim , escape, or string interpolation
854
-		$patt = '([^\n]*?)(@\{|\\\\|'.
855
-			Lessc::preg_quote($delim).')';
854
+		$patt = '([^\n]*?)(@\{|\\\\|' .
855
+			Lessc::preg_quote($delim) . ')';
856 856
 
857 857
 		$oldWhite = $this->eatWhiteDefault;
858 858
 		$this->eatWhiteDefault = false;
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
 
1200 1200
 		while (true) {
1201 1201
 			$m = array();
1202
-			if ($this->match('(['.$chars.'0-9]['.$chars.']*)', $m)) {
1202
+			if ($this->match('([' . $chars . '0-9][' . $chars . ']*)', $m)) {
1203 1203
 				$parts[] = $m[1];
1204 1204
 				if ($simple) {
1205 1205
 					break;
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
 			if (!empty($sub)) {
1313 1313
 				$name = array('variable', $sub);
1314 1314
 			} else {
1315
-				$name = $this->lessc->vPrefix.$name;
1315
+				$name = $this->lessc->vPrefix . $name;
1316 1316
 			}
1317 1317
 			return true;
1318 1318
 		}
@@ -1499,7 +1499,7 @@  discard block
 block discarded – undo
1499 1499
 			$validChars = $allowNewline ? "." : "[^\n]";
1500 1500
 		}
1501 1501
 		$m = array();
1502
-		if (!$this->match('('.$validChars.'*?)'.Lessc::preg_quote($what), $m, !$until)) {
1502
+		if (!$this->match('(' . $validChars . '*?)' . Lessc::preg_quote($what), $m, !$until)) {
1503 1503
 			return false;
1504 1504
 		}
1505 1505
 		if ($until) {
@@ -1516,7 +1516,7 @@  discard block
 block discarded – undo
1516 1516
 			$eatWhitespace = $this->eatWhiteDefault;
1517 1517
 		}
1518 1518
 
1519
-		$r = '/'.$regex.($eatWhitespace && !$this->writeComments ? '\s*' : '').'/Ais';
1519
+		$r = '/' . $regex . ($eatWhitespace && !$this->writeComments ? '\s*' : '') . '/Ais';
1520 1520
 		if (preg_match($r, $this->buffer, $out, 0, $this->count)) {
1521 1521
 			$this->count += strlen($out[0]);
1522 1522
 			if ($eatWhitespace && $this->writeComments) {
@@ -1554,7 +1554,7 @@  discard block
 block discarded – undo
1554 1554
 		if (is_null($from)) {
1555 1555
 			$from = $this->count;
1556 1556
 		}
1557
-		$r = '/'.$regex.'/Ais';
1557
+		$r = '/' . $regex . '/Ais';
1558 1558
 		$result = preg_match($r, $this->buffer, $out, 0, $from);
1559 1559
 
1560 1560
 		return $result;
@@ -1674,7 +1674,7 @@  discard block
 block discarded – undo
1674 1674
 				case '"':
1675 1675
 				case "'":
1676 1676
 					$m = array();
1677
-					if (preg_match('/'.$min[0].'.*?(?<!\\\\)'.$min[0].'/', $text, $m, 0, $count)) {
1677
+					if (preg_match('/' . $min[0] . '.*?(?<!\\\\)' . $min[0] . '/', $text, $m, 0, $count)) {
1678 1678
 						$count += strlen($m[0]) - 1;
1679 1679
 					}
1680 1680
 					break;
@@ -1699,12 +1699,12 @@  discard block
 block discarded – undo
1699 1699
 				$count += strlen($min[0]);
1700 1700
 			}
1701 1701
 
1702
-			$out .= substr($text, 0, $count).str_repeat("\n", $newlines);
1702
+			$out .= substr($text, 0, $count) . str_repeat("\n", $newlines);
1703 1703
 			$text = substr($text, $count + $skip);
1704 1704
 
1705 1705
 			$min = null;
1706 1706
 		}
1707 1707
 
1708
-		return $out.$text;
1708
+		return $out . $text;
1709 1709
 	}
1710 1710
 }
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/lessc_formatter_classic.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 	public function property($name, $value)
90 90
 	{
91
-		return $name.$this->assignSeparator.$value.";";
91
+		return $name . $this->assignSeparator . $value . ";";
92 92
 	}
93 93
 
94 94
 	protected function isEmpty($block)
@@ -120,25 +120,25 @@  discard block
 block discarded – undo
120 120
 			$this->indentLevel++;
121 121
 
122 122
 			if ($this->breakSelectors) {
123
-				$selectorSeparator = $this->selectorSeparator.$this->break.$pre;
123
+				$selectorSeparator = $this->selectorSeparator . $this->break . $pre;
124 124
 			} else {
125 125
 				$selectorSeparator = $this->selectorSeparator;
126 126
 			}
127 127
 
128
-			echo $pre.
128
+			echo $pre .
129 129
 				implode($selectorSeparator, $block->selectors);
130 130
 			if ($isSingle) {
131 131
 				echo $this->openSingle;
132 132
 				$inner = "";
133 133
 			} else {
134
-				echo $this->open.$this->break;
134
+				echo $this->open . $this->break;
135 135
 				$inner = $this->indentStr();
136 136
 			}
137 137
 		}
138 138
 
139 139
 		if (!empty($block->lines)) {
140
-			$glue = $this->break.$inner;
141
-			echo $inner.implode($glue, $block->lines);
140
+			$glue = $this->break . $inner;
141
+			echo $inner . implode($glue, $block->lines);
142 142
 			if (!$isSingle && !empty($block->children)) {
143 143
 				echo $this->break;
144 144
 			}
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
 			}
155 155
 
156 156
 			if ($isSingle) {
157
-				echo $this->closeSingle.$this->break;
157
+				echo $this->closeSingle . $this->break;
158 158
 			} else {
159
-				echo $pre.$this->close.$this->break;
159
+				echo $pre . $this->close . $this->break;
160 160
 			}
161 161
 
162 162
 			$this->indentLevel--;
Please login to merge, or discard this patch.