Passed
Push — master ( b9d836...e906dc )
by Kirill
02:56
created
src/SDL/TypeLoader/TypeLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
     {
57 57
         $extension = $this->filterExtension($extension);
58 58
 
59
-        $filter = function (string $haystack) use ($extension): bool {
59
+        $filter = function(string $haystack) use ($extension): bool {
60 60
             return $haystack !== $extension;
61 61
         };
62 62
 
Please login to merge, or discard this patch.
src/SDL/TypeLoader/DirectoryLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
     public function load(string $type, Definition $from = null): ?Readable
42 42
     {
43 43
         foreach ($this->fileExtensions as $extension) {
44
-            $pathName = $this->directory . '/' . $type . '.' . $extension;
44
+            $pathName = $this->directory.'/'.$type.'.'.$extension;
45 45
 
46 46
             if (\is_file($pathName)) {
47 47
                 return File::fromPathname($pathName);
Please login to merge, or discard this patch.
src/SDL/Compiler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
      */
81 81
     private function typeLoader(): \Closure
82 82
     {
83
-        return function (string $type, Definition $from = null): ?DocumentInterface {
83
+        return function(string $type, Definition $from = null): ?DocumentInterface {
84 84
             foreach ($this->loaders as $loader) {
85 85
                 if ($file = $loader->load($type, $from)) {
86 86
                     return $this->compile($file);
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
10 10
 namespace Railt\SDL;
11 11
 
12 12
 use Railt\Io\Exception\ExternalFileException;
13
-use Railt\Io\File;
14 13
 use Railt\Io\Readable;
15 14
 use Railt\Reflection\Contracts\Definition;
16 15
 use Railt\Reflection\Contracts\Document as DocumentInterface;
Please login to merge, or discard this patch.
src/SDL/Builder/Definition/SchemaBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
         /** @var RuleInterface $child */
35 35
         foreach ($this->ast as $child) {
36
-            $this->async(function () use ($child, $schema): void {
36
+            $this->async(function() use ($child, $schema): void {
37 37
                 if ($child->is('SchemaFieldDefinition')) {
38 38
                     $this->buildField($child, $schema);
39 39
                 }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         $result = $this->load($name, $definition, $type->getOffset());
113 113
 
114
-        if (! $result::getType()->is(Type::OBJECT)) {
114
+        if (!$result::getType()->is(Type::OBJECT)) {
115 115
             $error = 'Schema %s field type should be an %s, but %s given';
116 116
             $error = \sprintf($error, $field, Type::OBJECT, $result);
117 117
 
Please login to merge, or discard this patch.
src/SDL/Builder/Invocation/DirectiveBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             }
43 43
         }
44 44
 
45
-        $this->async(function () use ($directive): void {
45
+        $this->async(function() use ($directive): void {
46 46
             $this->loadDirective($directive);
47 47
 
48 48
             $this->definition->withDirective($directive);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     private function checkType(DirectiveInvocation $directive, Definition $definition): void
81 81
     {
82
-        if (! $definition::getType()->is(Type::DIRECTIVE)) {
82
+        if (!$definition::getType()->is(Type::DIRECTIVE)) {
83 83
             $error = \sprintf('Can not use %s as directive', $definition);
84 84
 
85 85
             $exception = new TypeException($error);
Please login to merge, or discard this patch.