Completed
Push — master ( 8cfee0...e8dfcd )
by Alexandr
03:32
created
src/Schema/AbstractSchema.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,6 @@
 block discarded – undo
10 10
 
11 11
 
12 12
 use Youshido\GraphQL\Config\Schema\SchemaConfig;
13
-use Youshido\GraphQL\Type\Object\ObjectType;
14
-use Youshido\GraphQL\Type\TypeInterface;
15 13
 
16 14
 abstract class AbstractSchema
17 15
 {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             $config['mutation'] = new InternalSchemaMutationObject(['name' => $this->getName() . 'Mutation']);
29 29
         }
30 30
         if (!array_key_exists('types', $config)) {
31
-          $config['types'] = [];
31
+            $config['types'] = [];
32 32
         }
33 33
 
34 34
         $this->config = new SchemaConfig($config, $this);
Please login to merge, or discard this patch.
src/Introspection/Field/TypesField.php 1 patch
Indentation   +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
         foreach ($value->getTypes() as $type) {
48
-          $this->collectTypes($type);
48
+            $this->collectTypes($type);
49 49
         }
50 50
 
51 51
         return array_values($this->types);
Please login to merge, or discard this patch.
src/Type/SchemaTypesList.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         if (!is_array($types)) {
25 25
             throw new \Exception('addTypes accept only array of types');
26 26
         }
27
-        foreach($types as $type) {
27
+        foreach ($types as $type) {
28 28
             $this->addType($type);
29 29
         }
30 30
         return $this;
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@  discard block
 block discarded – undo
42 42
     public function addType(TypeInterface $type)
43 43
     {
44 44
         $typeName = $this->getTypeName($type);
45
-        if ($this->isTypeNameRegistered($typeName)) return $this;
45
+        if ($this->isTypeNameRegistered($typeName)) {
46
+            return $this;
47
+        }
46 48
 
47 49
         $this->typesList[$typeName] = $type;
48 50
         return $this;
@@ -54,7 +56,9 @@  discard block
 block discarded – undo
54 56
     }
55 57
 
56 58
     private function getTypeName($type) {
57
-        if (is_string($type)) return $type;
59
+        if (is_string($type)) {
60
+            return $type;
61
+        }
58 62
         if (is_object($type) && $type instanceof AbstractType) {
59 63
             return $type->getName();
60 64
         }
Please login to merge, or discard this patch.