Passed
Push — master ( e8b00c...89139c )
by Anton
07:46
created
src/Prototype/tests/ClassNode/ConflictResolver/NamespacesTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $cd = ClassNode::create('class\name');
27 27
 
28
-        foreach ($stmts as $alias => $name) {
28
+        foreach ($stmts as $alias => $name){
29 29
             $cd->addImportUsage($name, $alias);
30 30
         }
31 31
 
32
-        foreach (Fixtures\Params::getParams('paramsSource') as $param) {
32
+        foreach (Fixtures\Params::getParams('paramsSource') as $param){
33 33
             $cd->addParam($param);
34 34
         }
35 35
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $this->namespaces()->resolve($cd);
38 38
 
39 39
         $resolved = [];
40
-        foreach ($cd->dependencies as $dependency) {
40
+        foreach ($cd->dependencies as $dependency){
41 41
             $resolved[$dependency->property] = $dependency->type->getAliasOrShortName();
42 42
         }
43 43
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,11 +25,13 @@  discard block
 block discarded – undo
25 25
     {
26 26
         $cd = ClassNode::create('class\name');
27 27
 
28
-        foreach ($stmts as $alias => $name) {
28
+        foreach ($stmts as $alias => $name)
29
+        {
29 30
             $cd->addImportUsage($name, $alias);
30 31
         }
31 32
 
32
-        foreach (Fixtures\Params::getParams('paramsSource') as $param) {
33
+        foreach (Fixtures\Params::getParams('paramsSource') as $param)
34
+        {
33 35
             $cd->addParam($param);
34 36
         }
35 37
 
@@ -37,7 +39,8 @@  discard block
 block discarded – undo
37 39
         $this->namespaces()->resolve($cd);
38 40
 
39 41
         $resolved = [];
40
-        foreach ($cd->dependencies as $dependency) {
42
+        foreach ($cd->dependencies as $dependency)
43
+        {
41 44
             $resolved[$dependency->property] = $dependency->type->getAliasOrShortName();
42 45
         }
43 46
 
Please login to merge, or discard this patch.
src/Prototype/tests/TraitTest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,8 @@
 block discarded – undo
64 64
         $c->bindSingleton(TestClass::class, $t);
65 65
         $p->bindProperty('testClass', TestClass::class);
66 66
 
67
-        $r = ContainerScope::runScope($c, static function () use ($t) {
67
+        $r = ContainerScope::runScope($c, static function () use ($t)
68
+        {
68 69
             return $t->getTest();
69 70
         });
70 71
 
Please login to merge, or discard this patch.
src/Prototype/tests/Fixtures/Dependencies.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     public static function convert(array $deps): array
19 19
     {
20 20
         $converted = [];
21
-        foreach ($deps as $name => $type) {
21
+        foreach ($deps as $name => $type){
22 22
             $converted[$name] = Dependency::create($name, $type);
23 23
         }
24 24
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,8 @@
 block discarded – undo
18 18
     public static function convert(array $deps): array
19 19
     {
20 20
         $converted = [];
21
-        foreach ($deps as $name => $type) {
21
+        foreach ($deps as $name => $type)
22
+        {
22 23
             $converted[$name] = Dependency::create($name, $type);
23 24
         }
24 25
 
Please login to merge, or discard this patch.
src/Prototype/tests/UtilsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
     public function trailingProvider(): array
32 32
     {
33 33
         return [
34
-            ['name7', 7, 'name',],
35
-            ['name', 0, 'name',],
36
-            ['name0', 0, 'name',],
34
+            ['name7', 7, 'name', ],
35
+            ['name', 0, 'name', ],
36
+            ['name0', 0, 'name', ],
37 37
             ['name1', 1, 'name'],
38 38
             ['name-1', 1, 'name-'],
39 39
             ['name-1', -1, 'name'],
Please login to merge, or discard this patch.
src/Prototype/tests/Storage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 
27 27
     public function store(string $name): void
28 28
     {
29
-        $this->storage[$name] = file_get_contents($this->dir . $name);
29
+        $this->storage[$name] = file_get_contents($this->dir.$name);
30 30
     }
31 31
 
32 32
     public function restore(string $name): void
33 33
     {
34
-        file_put_contents($this->dir . $name, $this->storage[$name]);
34
+        file_put_contents($this->dir.$name, $this->storage[$name]);
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/Stempler/src/Loader/Source.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,12 +57,12 @@
 block discarded – undo
57 57
     {
58 58
         $line = 0;
59 59
 
60
-        for ($i = 0; $i < $offset; $i++) {
61
-            if (!isset($content[$i])) {
60
+        for ($i = 0; $i < $offset; $i++){
61
+            if (!isset($content[$i])){
62 62
                 break;
63 63
             }
64 64
 
65
-            if ($content[$i] === "\n") {
65
+            if ($content[$i] === "\n"){
66 66
                 $line++;
67 67
             }
68 68
         }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,12 +57,15 @@
 block discarded – undo
57 57
     {
58 58
         $line = 0;
59 59
 
60
-        for ($i = 0; $i < $offset; $i++) {
61
-            if (!isset($content[$i])) {
60
+        for ($i = 0; $i < $offset; $i++)
61
+        {
62
+            if (!isset($content[$i]))
63
+            {
62 64
                 break;
63 65
             }
64 66
 
65
-            if ($content[$i] === "\n") {
67
+            if ($content[$i] === "\n")
68
+            {
66 69
                 $line++;
67 70
             }
68 71
         }
Please login to merge, or discard this patch.
src/Stempler/src/Loader/StringLoader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function load(string $path): Source
34 34
     {
35
-        if (!array_key_exists($path, $this->paths)) {
35
+        if (!array_key_exists($path, $this->paths)){
36 36
             throw new LoaderException("Unable to load path `{$path}`");
37 37
         }
38 38
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@
 block discarded – undo
32 32
      */
33 33
     public function load(string $path): Source
34 34
     {
35
-        if (!array_key_exists($path, $this->paths)) {
35
+        if (!array_key_exists($path, $this->paths))
36
+        {
36 37
             throw new LoaderException("Unable to load path `{$path}`");
37 38
         }
38 39
 
Please login to merge, or discard this patch.
src/Stempler/src/Loader/DirectoryLoader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
             $this->extension
51 51
         );
52 52
 
53
-        if (!file_exists($filename)) {
53
+        if (!file_exists($filename)){
54 54
             throw new LoaderException("Unable to load `{$path}`, no such file");
55 55
         }
56 56
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,8 @@
 block discarded – undo
50 50
             $this->extension
51 51
         );
52 52
 
53
-        if (!file_exists($filename)) {
53
+        if (!file_exists($filename))
54
+        {
54 55
             throw new LoaderException("Unable to load `{$path}`, no such file");
55 56
         }
56 57
 
Please login to merge, or discard this patch.
src/Stempler/src/Transform/BlockFetcher.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $blocks = ['context' => []];
33 33
 
34
-        foreach ($caller->attrs as $attr) {
35
-            if (!$attr instanceof Attr || $attr->name instanceof NodeInterface) {
34
+        foreach ($caller->attrs as $attr){
35
+            if (!$attr instanceof Attr || $attr->name instanceof NodeInterface){
36 36
                 // ignore name when attribute is dynamic
37 37
                 $blocks[sprintf('attr-%s', count($blocks))] = $attr;
38 38
                 continue;
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
             $blocks[$attr->name] = new QuotedValue($attr->value);
43 43
         }
44 44
 
45
-        foreach ($caller->nodes as $node) {
46
-            if ($node instanceof Block) {
45
+        foreach ($caller->nodes as $node){
46
+            if ($node instanceof Block){
47 47
                 $blocks[$node->name] = $node->nodes;
48
-            } else {
48
+            }else{
49 49
                 $blocks['context'][] = $node;
50 50
             }
51 51
         }
52 52
 
53
-        if ($blocks['context'] === []) {
53
+        if ($blocks['context'] === []){
54 54
             unset($blocks['context']);
55 55
         }
56 56
 
Please login to merge, or discard this patch.
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,10 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $blocks = ['context' => []];
33 33
 
34
-        foreach ($caller->attrs as $attr) {
35
-            if (!$attr instanceof Attr || $attr->name instanceof NodeInterface) {
34
+        foreach ($caller->attrs as $attr)
35
+        {
36
+            if (!$attr instanceof Attr || $attr->name instanceof NodeInterface)
37
+            {
36 38
                 // ignore name when attribute is dynamic
37 39
                 $blocks[sprintf('attr-%s', count($blocks))] = $attr;
38 40
                 continue;
@@ -42,15 +44,20 @@  discard block
 block discarded – undo
42 44
             $blocks[$attr->name] = new QuotedValue($attr->value);
43 45
         }
44 46
 
45
-        foreach ($caller->nodes as $node) {
46
-            if ($node instanceof Block) {
47
+        foreach ($caller->nodes as $node)
48
+        {
49
+            if ($node instanceof Block)
50
+            {
47 51
                 $blocks[$node->name] = $node->nodes;
48
-            } else {
52
+            }
53
+            else
54
+            {
49 55
                 $blocks['context'][] = $node;
50 56
             }
51 57
         }
52 58
 
53
-        if ($blocks['context'] === []) {
59
+        if ($blocks['context'] === [])
60
+        {
54 61
             unset($blocks['context']);
55 62
         }
56 63
 
Please login to merge, or discard this patch.