Completed
Push — master ( c1a156...8cadde )
by Kirill
08:14
created
src/Compiler/System/TypeHintSystem.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     ];
46 46
 
47 47
     /**
48
-     * @param Definition|HasTypeIndication|TypeDefinition $definition
48
+     * @param Definition $definition
49 49
      * @param RuleInterface $ast
50 50
      */
51 51
     public function resolve(Definition $definition, RuleInterface $ast): void
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
             $definition->withModifiers($hint->getModifiers());
57 57
 
58
-            $this->linker(function () use ($hint, $definition) {
58
+            $this->linker(function() use ($hint, $definition) {
59 59
                 /** @var TypeDefinition $resolved */
60 60
                 $resolved = $this->get($hint->getFullName(), $definition);
61 61
 
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
                 $error = null;
77 77
 
78 78
                 switch ($behaviour) {
79
-                    case self::IS_RENDERABLE && ! $hint->isRenderable():
79
+                    case self::IS_RENDERABLE && !$hint->isRenderable():
80 80
                         $error = '%s "%s" can contain only renderable type (unions, objects, etc), but %s given';
81 81
                         break;
82
-                    case self::IS_INPUTABLE && ! $hint->isInputable():
82
+                    case self::IS_INPUTABLE && !$hint->isInputable():
83 83
                         $error = '%s "%s" can contain only inputable type (inputs, scalars, etc), but %s given';
84 84
                         break;
85 85
                 }
Please login to merge, or discard this patch.
src/Compiler/System/Provider/DirectivesSystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
     {
33 33
         if ($definition instanceof ProvidesDirectives && $ast instanceof ProvidesDirectiveNodes) {
34 34
             foreach ($ast->getDirectiveNodes() as $child) {
35
-                $this->deferred(function () use ($definition, $child) {
35
+                $this->deferred(function() use ($definition, $child) {
36 36
                     /** @var DirectiveInvocation $directive */
37 37
                     $directive = $this->process->build($child, $definition);
38 38
 
39
-                    $this->linker(function () use ($definition, $directive) {
39
+                    $this->linker(function() use ($definition, $directive) {
40 40
                         $this->validateDefinition($directive);
41 41
 
42 42
                         $definition->withDirective($directive);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $definition = $directive->getDefinition();
56 56
 
57
-        if (! $definition instanceof DirectiveDefinition) {
57
+        if (!$definition instanceof DirectiveDefinition) {
58 58
             $error = \sprintf('Can not use %s as directive', $definition);
59 59
             throw (new TypeConflictException($error))->in($directive);
60 60
         }
Please login to merge, or discard this patch.
src/Compiler/System/Provider/DocumentSystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
     {
31 31
         if ($document instanceof Document) {
32 32
             foreach ($ast as $child) {
33
-                $this->deferred(function () use ($document, $child) {
33
+                $this->deferred(function() use ($document, $child) {
34 34
                     $definition = $this->process->build($child, $document);
35 35
 
36 36
                     if ($definition instanceof TypeDefinition) {
37
-                        $this->deferred(function () use ($definition, $document) {
37
+                        $this->deferred(function() use ($definition, $document) {
38 38
                             if ($document->getDictionary()->has($definition->getName())) {
39 39
                                 throw $this->redeclareException($definition);
40 40
                             }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
 
47 47
                     if ($definition instanceof DirectiveInvocation) {
48
-                        $this->complete(function () use ($definition, $document) {
48
+                        $this->complete(function() use ($definition, $document) {
49 49
                             $document->withDirective($definition);
50 50
                         });
51 51
                     }
Please login to merge, or discard this patch.
src/Compiler/Dictionary.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     private function addLoggerListener(): void
46 46
     {
47
-        parent::onTypeNotFound(function (string $type, ?Definition $from): void {
47
+        parent::onTypeNotFound(function(string $type, ?Definition $from): void {
48 48
             if ($this->logger) {
49 49
                 $direct = 'Try to load type %s from direct method executing';
50 50
                 $context = 'Try to load type %s from %s (%s:%d)';
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function onTypeNotFound(\Closure $then): void
65 65
     {
66
-        parent::onTypeNotFound(function (string $type, ?Definition $from) use ($then): void {
66
+        parent::onTypeNotFound(function(string $type, ?Definition $from) use ($then) : void {
67 67
             if (($file = $then($type, $from)) instanceof Readable) {
68 68
                 $this->compiler->compile($file);
69 69
             }
Please login to merge, or discard this patch.
src/Compiler/Process/Deferred.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      * @param \Closure $exception
49 49
      * @return DeferredInterface
50 50
      */
51
-    public function catch(\Closure $exception): DeferredInterface
51
+    public function catch (\Closure $exception): DeferredInterface
52 52
     {
53 53
         $this->interceptors->push($exception);
54 54
 
Please login to merge, or discard this patch.
src/Compiler/Process/DeferredInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
      * @param \Closure $exception
25 25
      * @return DeferredInterface
26 26
      */
27
-    public function catch(\Closure $exception): DeferredInterface;
27
+    public function catch (\Closure $exception): DeferredInterface;
28 28
 }
Please login to merge, or discard this patch.
src/Compiler/Process/Pipeline.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $this->log($handler);
100 100
         }
101 101
 
102
-        if (! \array_key_exists($priority, $this->queue)) {
102
+        if (!\array_key_exists($priority, $this->queue)) {
103 103
             $this->queue[$priority] = $this->createCollection();
104 104
         }
105 105
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function count(): int
123 123
     {
124
-        $accumulator = function (int $result, \SplQueue $queue): int {
124
+        $accumulator = function(int $result, \SplQueue $queue): int {
125 125
             return $result + $queue->count();
126 126
         };
127 127
 
128
-        return (int)\array_reduce($this->queue, $accumulator, 0);
128
+        return (int) \array_reduce($this->queue, $accumulator, 0);
129 129
     }
130 130
 }
Please login to merge, or discard this patch.
src/Console/SDLCompileCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@
 block discarded – undo
52 52
 
53 53
         $output = $this->option('out') ?: \dirname($schema->getPathname());
54 54
 
55
-        if (! \is_dir($output)) {
56
-            throw new NotReadableException('Output directory "' . $output . '" not exists');
55
+        if (!\is_dir($output)) {
56
+            throw new NotReadableException('Output directory "'.$output.'" not exists');
57 57
         }
58 58
 
59
-        $outputPathname = $output . '/' . \basename($schema->getPathname()) . '.json';
59
+        $outputPathname = $output.'/'.\basename($schema->getPathname()).'.json';
60 60
 
61 61
         \file_put_contents($outputPathname, \json_encode($result));
62 62
     }
Please login to merge, or discard this patch.
src/Console/SDLAnalyzeCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@
 block discarded – undo
65 65
                 continue;
66 66
             }
67 67
 
68
-            $position = $def->getFile()->getPathname() . ':' . $def->getLine();
68
+            $position = $def->getFile()->getPathname().':'.$def->getLine();
69 69
 
70
-            $this->writeln('<fg=white;bg=green> ' . \str_repeat(' ', \strlen($position)) . ' </>');
71
-            $this->writeln('<fg=white;bg=green> ' . $position . ' </>');
72
-            $this->writeln('<fg=white;bg=green> ' . \str_repeat(' ', \strlen($position)) . ' </>');
70
+            $this->writeln('<fg=white;bg=green> '.\str_repeat(' ', \strlen($position)).' </>');
71
+            $this->writeln('<fg=white;bg=green> '.$position.' </>');
72
+            $this->writeln('<fg=white;bg=green> '.\str_repeat(' ', \strlen($position)).' </>');
73 73
 
74 74
             $this->render($def);
75 75
             $this->writeln("\n\n");
Please login to merge, or discard this patch.