Passed
Pull Request — master (#5)
by Gerard van
06:43
created
src/Zicht/Tool/Packager/Cmd/BuildCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $result = $packager->package($input->getArgument('file'), $input->getOption('force'));
55 55
 
56 56
         if ($output->getVerbosity() > OutputInterface::VERBOSITY_NORMAL) {
57
-            $output->writeln(sprintf("Built {$result} in %.2f seconds", microtime(true) -$t));
57
+            $output->writeln(sprintf("Built {$result} in %.2f seconds", microtime(true)-$t));
58 58
         }
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
src/Zicht/Tool/Container/ContainerBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $this->config = $config;
34 34
 
35
-        $this->exprcompiler  = new Compiler(new ExpressionParser(), new ExpressionTokenizer());
35
+        $this->exprcompiler = new Compiler(new ExpressionParser(), new ExpressionTokenizer());
36 36
         $this->scriptcompiler = new Compiler();
37 37
     }
38 38
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function addExpressionPath($callable)
47 47
     {
48
-        $this->expressionPaths[]= $callable;
48
+        $this->expressionPaths[] = $callable;
49 49
     }
50 50
 
51 51
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             function($path, $node) use($containerNode) {
104 104
                 $containerNode->append($node);
105 105
             },
106
-            function ($path, $node) {
106
+            function($path, $node) {
107 107
                 return $node instanceof Node;
108 108
             },
109 109
             Traverser::AFTER
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 return
272 272
                     count($path) == 4
273 273
                     && $path[0] == 'tasks'
274
-                    && in_array($path[2], array('do', 'pre' ,'post'))
274
+                    && in_array($path[2], array('do', 'pre', 'post'))
275 275
                 ;
276 276
             },
277 277
             Traverser::BEFORE
Please login to merge, or discard this patch.
src/Zicht/Tool/Container/Container.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 $opts = array();
68 68
                 foreach (array('FORCE', 'VERBOSE', 'EXPLAIN', 'DEBUG') as $opt) {
69 69
                     if ($z->has($opt) && $z->get($opt)) {
70
-                        $opts[]= '--' . strtolower($opt);
70
+                        $opts[] = '--' . strtolower($opt);
71 71
                     }
72 72
                 }
73 73
                 return join(' ', $opts);
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
         $this->set(array('z', 'cmd'), $_SERVER['argv'][0]);
77 77
         $this->decl(
78 78
             'STDIN',
79
-            function () {
79
+            function() {
80 80
                 return stream_get_contents(STDIN);
81 81
             }
82 82
         );
83 83
         $this->fn('confirm', function() {
84 84
             return false;
85 85
         });
86
-        $this->set('cwd',  getcwd());
86
+        $this->set('cwd', getcwd());
87 87
         $this->set('user', getenv('USER'));
88 88
 
89 89
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $this->fn('str_replace', 'str_replace');
100 100
         $this->fn(
101 101
             'sha1',
102
-            function () {
102
+            function() {
103 103
                 return sha1(join("", func_get_args()));
104 104
             }
105 105
         );
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
         // -----------------------------------------------------------------
158 158
         // encoding / decoding
159
-        $this->fn('json_encode', function ($v) {
159
+        $this->fn('json_encode', function($v) {
160 160
             return json_encode($v, JSON_UNESCAPED_SLASHES);
161 161
         });
162 162
         $this->fn('json_decode');
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
      */
394 394
     public function evaluate($expression, &$code = null)
395 395
     {
396
-        $exprcompiler  = new ScriptCompiler(new ExpressionParser(), new ExpressionTokenizer());
396
+        $exprcompiler = new ScriptCompiler(new ExpressionParser(), new ExpressionTokenizer());
397 397
 
398 398
         $z = $this;
399 399
         $_value = null;
@@ -537,10 +537,10 @@  discard block
 block discarded – undo
537 537
     public function str($value)
538 538
     {
539 539
         if (is_array($value)) {
540
-            $allScalar = function ($a, $b) {
540
+            $allScalar = function($a, $b) {
541 541
                 return $a && is_scalar($b);
542 542
             };
543
-            if (! array_reduce($value, $allScalar, true)) {
543
+            if (!array_reduce($value, $allScalar, true)) {
544 544
                 throw new UnexpectedValueException("Unexpected complex type " . Util::toPhp($value));
545 545
             }
546 546
             return join(' ', $value);
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
      */
558 558
     public function addPlugin(PluginInterface $plugin)
559 559
     {
560
-        $this->plugins[]= $plugin;
560
+        $this->plugins[] = $plugin;
561 561
         $plugin->setContainer($this);
562 562
     }
563 563
 
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
      */
571 571
     public function addCommand(Command $command)
572 572
     {
573
-        $this->commands[]= $command;
573
+        $this->commands[] = $command;
574 574
     }
575 575
 
576 576
 
Please login to merge, or discard this patch.
src/Zicht/Tool/Container/Task.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
         $ret = array();
215 215
         if (!empty($this->taskDef['opts'])) {
216 216
             foreach ($this->taskDef['opts'] as $opt) {
217
-                $ret[]= $opt->name;
217
+                $ret[] = $opt->name;
218 218
             }
219 219
         }
220 220
         return $ret;
Please login to merge, or discard this patch.
src/Zicht/Tool/Container/ContainerCompiler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $mutex = new Mutex($this->file . '.lock', true);
51 51
 
52 52
         $ret = $mutex->run(
53
-            function () {
53
+            function() {
54 54
                 if ($this->needsRecompile()) {
55 55
                     file_put_contents($this->file, $this->compileContainerCode());
56 56
                 }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             }
59 59
         );
60 60
 
61
-        if (! ($ret instanceof Container)) {
61
+        if (!($ret instanceof Container)) {
62 62
             throw new \LogicException("The container must be returned by the compiler");
63 63
         }
64 64
         foreach ($this->plugins as $plugin) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function addPlugin(PluginInterface $p)
78 78
     {
79
-        $this->plugins[]= $p;
79
+        $this->plugins[] = $p;
80 80
     }
81 81
 
82 82
 
Please login to merge, or discard this patch.
src/Zicht/Tool/Container/Traverser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function addVisitor($callable, $condition, $when = self::BEFORE)
87 87
     {
88
-        $this->visitors[]= array($when, $condition, $callable);
88
+        $this->visitors[] = array($when, $condition, $callable);
89 89
 
90 90
         return $this;
91 91
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     private function doTraverse($node, $path = array())
113 113
     {
114 114
         foreach ($node as $name => $value) {
115
-            $path[]= $name;
115
+            $path[] = $name;
116 116
             $value = $this->doVisit($path, $value, self::BEFORE);
117 117
 
118 118
             if (is_array($value)) {
Please login to merge, or discard this patch.
src/Zicht/Tool/Script/Node/Task/ArgNode.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function __construct($name, $expr)
27 27
     {
28 28
         parent::__construct();
29
-        $this->nodes[0]= $expr;
29
+        $this->nodes[0] = $expr;
30 30
         $this->name = $name;
31 31
     }
32 32
 
Please login to merge, or discard this patch.