Completed
Push — master ( 8a12d1...a9e060 )
by Tom
01:46
created
src/Exception.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@
 block discarded – undo
6 6
  * @version         1.2                                                             */
7 7
  namespace Transphporm;
8 8
 class Exception extends \Exception {
9
-    const PROPERTY = 'property';
10
-    const TSS_FUNCTION = 'function';
11
-    const PSEUDO = 'pseudo';
12
-    const FORMATTER = 'formatter';
9
+	const PROPERTY = 'property';
10
+	const TSS_FUNCTION = 'function';
11
+	const PSEUDO = 'pseudo';
12
+	const FORMATTER = 'formatter';
13 13
 
14
-    public function __construct(RunException $runException, $file, $line) {
15
-        $message = $runException->getMessage() . ' on Line ' . $line . ' of ' . ($file === null ? 'tss' : $file);
14
+	public function __construct(RunException $runException, $file, $line) {
15
+		$message = $runException->getMessage() . ' on Line ' . $line . ' of ' . ($file === null ? 'tss' : $file);
16 16
 
17
-        parent::__construct($message, 0, $runException->getPrevious());
18
-    }
17
+		parent::__construct($message, 0, $runException->getPrevious());
18
+	}
19 19
 }
Please login to merge, or discard this patch.
src/TSSValidator.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -7,48 +7,48 @@
 block discarded – undo
7 7
  namespace Transphporm;
8 8
 use Transphporm\Parser\Tokenizer;
9 9
 class TSSValidator {
10
-    private $error;
10
+	private $error;
11 11
 
12
-    public function validate($tss) {
13
-        $this->error = null;
14
-        $tokens = $this->tokenize($tss);
12
+	public function validate($tss) {
13
+		$this->error = null;
14
+		$tokens = $this->tokenize($tss);
15 15
 
16
-        foreach ($tokens as $token)
17
-            if (!$this->validateRule($token)) return false;
16
+		foreach ($tokens as $token)
17
+			if (!$this->validateRule($token)) return false;
18 18
 
19
-        return true;
20
-    }
19
+		return true;
20
+	}
21 21
 
22
-    public function getLastError() {
23
-        return $this->error;
24
-    }
22
+	public function getLastError() {
23
+		return $this->error;
24
+	}
25 25
 
26
-    private function validateRule($token) {
27
-        if ($token['type'] !== Tokenizer::OPEN_BRACE) return true;
26
+	private function validateRule($token) {
27
+		if ($token['type'] !== Tokenizer::OPEN_BRACE) return true;
28 28
 
29
-        return $this->checkBraces($token) && $this->checkSemicolons($token)
30
-            && $this->checkParenthesis($token);
31
-    }
29
+		return $this->checkBraces($token) && $this->checkSemicolons($token)
30
+			&& $this->checkParenthesis($token);
31
+	}
32 32
 
33
-    private function checkBraces($token) {
34
-        return strpos($token['string'], '{') === false;
35
-    }
33
+	private function checkBraces($token) {
34
+		return strpos($token['string'], '{') === false;
35
+	}
36 36
 
37
-    private function checkSemicolons($braceToken) {
38
-        $splitTokens = $braceToken['value']->splitOnToken(Tokenizer::COLON);
39
-        array_shift($splitTokens); array_pop($splitTokens);
40
-        foreach ($splitTokens as $tokens)
41
-            if (!in_array(Tokenizer::SEMI_COLON, array_column(iterator_to_array($tokens), 'type'))) return false;
37
+	private function checkSemicolons($braceToken) {
38
+		$splitTokens = $braceToken['value']->splitOnToken(Tokenizer::COLON);
39
+		array_shift($splitTokens); array_pop($splitTokens);
40
+		foreach ($splitTokens as $tokens)
41
+			if (!in_array(Tokenizer::SEMI_COLON, array_column(iterator_to_array($tokens), 'type'))) return false;
42 42
 
43
-        return true;
44
-    }
43
+		return true;
44
+	}
45 45
 
46
-    private function checkParenthesis($token) {
47
-        return substr_count($token['string'], '(') === substr_count($token['string'], ')');
48
-    }
46
+	private function checkParenthesis($token) {
47
+		return substr_count($token['string'], '(') === substr_count($token['string'], ')');
48
+	}
49 49
 
50
-    private function tokenize($tss) {
51
-        if (is_file($tss)) $tss = file_get_contents($tss);
52
-        return (new Parser\Tokenizer($tss))->getTokens();
53
-    }
50
+	private function tokenize($tss) {
51
+		if (is_file($tss)) $tss = file_get_contents($tss);
52
+		return (new Parser\Tokenizer($tss))->getTokens();
53
+	}
54 54
 }
Please login to merge, or discard this patch.
src/Parser/TokenFilterIterator.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -6,39 +6,39 @@
 block discarded – undo
6 6
  * @version         1.2                                                             */
7 7
 namespace Transphporm\Parser;
8 8
 class TokenFilterIterator implements \Iterator {
9
-    private $ignore;
10
-    private $tokens;
9
+	private $ignore;
10
+	private $tokens;
11 11
 
12
-    public function __construct(Tokens $tokens, array $ignore) {
13
-        $this->ignore = $ignore;
14
-        $this->tokens = $tokens;
15
-    }
12
+	public function __construct(Tokens $tokens, array $ignore) {
13
+		$this->ignore = $ignore;
14
+		$this->tokens = $tokens;
15
+	}
16 16
 
17
-    public function current() {
18
-        return $this->tokens->current();
19
-    }
17
+	public function current() {
18
+		return $this->tokens->current();
19
+	}
20 20
 
21
-    public function key() {
22
-        return $this->tokens->key();
23
-    }
21
+	public function key() {
22
+		return $this->tokens->key();
23
+	}
24 24
 
25
-    public function valid() {
26
-        return $this->tokens->valid();
27
-    }
25
+	public function valid() {
26
+		return $this->tokens->valid();
27
+	}
28 28
 
29
-    public function next() {
30
-        do {
31
-            $this->tokens->next();
32
-        }
33
-        while ($this->shouldContinue());
34
-    }
29
+	public function next() {
30
+		do {
31
+			$this->tokens->next();
32
+		}
33
+		while ($this->shouldContinue());
34
+	}
35 35
 
36
-    public function rewind() {
37
-        $this->tokens->rewind();
38
-        while ($this->shouldContinue()) $this->tokens->next();
39
-    }
36
+	public function rewind() {
37
+		$this->tokens->rewind();
38
+		while ($this->shouldContinue()) $this->tokens->next();
39
+	}
40 40
 
41
-    private function shouldContinue() {
42
-        return $this->tokens->valid() && in_array($this->tokens->current()['type'], $this->ignore);
43
-    }
41
+	private function shouldContinue() {
42
+		return $this->tokens->valid() && in_array($this->tokens->current()['type'], $this->ignore);
43
+	}
44 44
 }
Please login to merge, or discard this patch.
src/RunException.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
  * @version         1.2                                                             */
7 7
  namespace Transphporm;
8 8
 class RunException extends \Exception {
9
-    public function __construct($operationType, $operationName, \Exception $previous) {
10
-        $message = 'TSS Error: Problem carrying out ' . $operationType . ' \'' . $operationName . '\'';
9
+	public function __construct($operationType, $operationName, \Exception $previous) {
10
+		$message = 'TSS Error: Problem carrying out ' . $operationType . ' \'' . $operationName . '\'';
11 11
 
12
-        parent::__construct($message, 0, $previous);
13
-    }
12
+		parent::__construct($message, 0, $previous);
13
+	}
14 14
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
  namespace Transphporm;
8 8
 class RunException extends \Exception {
9 9
     public function __construct($operationType, $operationName, \Exception $previous) {
10
-        $message = 'TSS Error: Problem carrying out ' . $operationType . ' \'' . $operationName . '\'';
10
+        $message = 'TSS Error: Problem carrying out '.$operationType.' \''.$operationName.'\'';
11 11
 
12 12
         parent::__construct($message, 0, $previous);
13 13
     }
Please login to merge, or discard this patch.
src/Formatter/HTMLFormatter.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@
 block discarded – undo
6 6
  * @version         1.2                                                             */
7 7
  namespace Transphporm\Formatter;
8 8
 class HTMLFormatter {
9
-    private $templateFunction;
9
+	private $templateFunction;
10 10
 
11
-    public function __construct(\Transphporm\TSSFunction\Template $templateFunction) {
12
-        $this->templateFunction = $templateFunction;
13
-    }
11
+	public function __construct(\Transphporm\TSSFunction\Template $templateFunction) {
12
+		$this->templateFunction = $templateFunction;
13
+	}
14 14
 
15
-    public function html($val) {
15
+	public function html($val) {
16 16
 		return $this->templateFunction->run(['<template>' . $val . '</template>']);
17 17
 	}
18 18
 
Please login to merge, or discard this patch.
src/Property/ContentPseudo.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
  namespace Transphporm\Property;
8 8
 
9 9
 interface ContentPseudo {
10
-    public function run($value, $pseudoArgs, $element, \Transphporm\Hook\PseudoMatcher $pseudoMatcher);
10
+	public function run($value, $pseudoArgs, $element, \Transphporm\Hook\PseudoMatcher $pseudoMatcher);
11 11
 }
Please login to merge, or discard this patch.