Completed
Push — master ( 24bdc2...dcf687 )
by Alexandr
03:27 queued 37s
created
src/Type/TypeService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,9 +129,9 @@
 block discarded – undo
129 129
         if (is_object($data)) {
130 130
             $getter = $path;
131 131
             if (substr($path, 0, 2) != 'is') {
132
-                $getter = 'get' . self::classify($path);
132
+                $getter = 'get'.self::classify($path);
133 133
                 if (!is_callable([$data, $getter])) {
134
-                    $getter = 'is' . self::classify($path);
134
+                    $getter = 'is'.self::classify($path);
135 135
                 }
136 136
                 if (!is_callable([$data, $getter])) {
137 137
                     $getter = self::classify($path);
Please login to merge, or discard this patch.
src/Parser/Ast/ArgumentValue/Variable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
             if ($this->hasDefaultValue()) {
72 72
                 return $this->defaultValue;
73 73
             }
74
-            throw new \LogicException('Value is not set for variable "' . $this->name . '"');
74
+            throw new \LogicException('Value is not set for variable "'.$this->name.'"');
75 75
         }
76 76
 
77 77
         return $this->value;
Please login to merge, or discard this patch.
Tests/Schema/VariablesTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
                         'args'    => [
24 24
                             'ids' => new ListType(new NonNullType(new IdType())),
25 25
                         ],
26
-                        'resolve' => function () {
26
+                        'resolve' => function() {
27 27
                             return 'item';
28 28
                         },
29 29
                     ],
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                         'args'    => [
101 101
                             'sortOrder' => new StringType(),
102 102
                         ],
103
-                        'resolve' => function ($args) {
103
+                        'resolve' => function($args) {
104 104
                             return sprintf('Result with %s order', empty($args['sortOrder']) ? 'default' : $args['sortOrder']);
105 105
                         },
106 106
                     ],
Please login to merge, or discard this patch.
Tests/Library/Type/ScalarTypeTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         foreach (TypeFactory::getScalarTypesNames() as $typeName) {
24 24
             $scalarType     = TypeFactory::getScalarType($typeName);
25
-            $testDataMethod = 'get' . $typeName . 'TestData';
25
+            $testDataMethod = 'get'.$typeName.'TestData';
26 26
 
27 27
             $this->assertNotEmpty($scalarType->getDescription());
28 28
             $this->assertEquals($scalarType->getKind(), TypeMap::KIND_SCALAR);
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
                 $this->assertParse($scalarType, $data, $serialized, $typeName);
39 39
 
40 40
                 if ($isValid) {
41
-                    $this->assertTrue($scalarType->isValidValue($data), $typeName . ' validation for :' . serialize($data));
41
+                    $this->assertTrue($scalarType->isValidValue($data), $typeName.' validation for :'.serialize($data));
42 42
                 } else {
43
-                    $this->assertFalse($scalarType->isValidValue($data), $typeName . ' validation for :' . serialize($data));
43
+                    $this->assertFalse($scalarType->isValidValue($data), $typeName.' validation for :'.serialize($data));
44 44
                 }
45 45
             }
46 46
         }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     private function assertSerialization(AbstractScalarType $object, $input, $expected)
63 63
     {
64
-        $this->assertEquals($expected, $object->serialize($input), $object->getName() . ' serialize for: ' . serialize($input));
64
+        $this->assertEquals($expected, $object->serialize($input), $object->getName().' serialize for: '.serialize($input));
65 65
     }
66 66
 
67 67
     private function assertParse(AbstractScalarType $object, $input, $expected, $typeName)
@@ -72,6 +72,6 @@  discard block
 block discarded – undo
72 72
             $parsed   = \DateTime::createFromFormat('Y-m-d H:i:s', $parsed->format('Y-m-d H:i:s'));
73 73
         }
74 74
 
75
-        $this->assertEquals($expected, $parsed, $object->getName() . ' parse for: ' . serialize($input));
75
+        $this->assertEquals($expected, $parsed, $object->getName().' parse for: '.serialize($input));
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
src/Type/ListType/AbstractListType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 
78 78
     public function parseValue($value)
79 79
     {
80
-        foreach ((array) $value as $keyValue => $valueItem) {
80
+        foreach ((array)$value as $keyValue => $valueItem) {
81 81
             $value[$keyValue] = $this->getItemType()->parseValue($valueItem);
82 82
         }
83 83
 
Please login to merge, or discard this patch.
src/Config/Schema/SchemaConfig.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,6 +28,9 @@  discard block
 block discarded – undo
28 28
      */
29 29
     private $directiveList;
30 30
 
31
+    /**
32
+     * @param \Youshido\GraphQL\Schema\AbstractSchema $contextObject
33
+     */
31 34
     public function __construct(array $configData, $contextObject = null, $finalClass = false)
32 35
     {
33 36
         $this->typesList = new SchemaTypesList();
@@ -88,7 +91,7 @@  discard block
 block discarded – undo
88 91
     }
89 92
 
90 93
     /**
91
-     * @param $query AbstractObjectType
94
+     * @param ObjectType $query AbstractObjectType
92 95
      *
93 96
      * @return SchemaConfig
94 97
      */
Please login to merge, or discard this patch.
src/Parser/Ast/Directive.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@  discard block
 block discarded – undo
21 21
 
22 22
     /**
23 23
      * @param string         $name
24
-     * @param ValueInterface $value
25 24
      * @param Location       $location
26 25
      */
27 26
     public function __construct($name, array $arguments, Location $location)
@@ -33,7 +32,7 @@  discard block
 block discarded – undo
33 32
     }
34 33
 
35 34
     /**
36
-     * @return mixed
35
+     * @return string
37 36
      */
38 37
     public function getName()
39 38
     {
Please login to merge, or discard this patch.
src/Type/SchemaDirectivesList.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@  discard block
 block discarded – undo
41 41
     public function addDirective(DirectiveInterface $directive)
42 42
     {
43 43
         $directiveName = $this->getDirectiveName($directive);
44
-        if ($this->isDirectiveNameRegistered($directiveName)) return $this;
44
+        if ($this->isDirectiveNameRegistered($directiveName)) {
45
+            return $this;
46
+        }
45 47
 
46 48
         $this->directivesList[$directiveName] = $directive;
47 49
 
@@ -50,7 +52,9 @@  discard block
 block discarded – undo
50 52
 
51 53
     private function getDirectiveName($directive)
52 54
     {
53
-        if (is_string($directive)) return $directive;
55
+        if (is_string($directive)) {
56
+            return $directive;
57
+        }
54 58
         if (is_object($directive) && $directive instanceof DirectiveInterface) {
55 59
             return $directive->getName();
56 60
         }
Please login to merge, or discard this patch.
src/Introspection/DirectiveType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
                 'type'    => new NonNullType(new ListType(new NonNullType(new InputValueType()))),
60 60
                 'resolve' => [$this, 'resolveArgs'],
61 61
             ])
62
-            ->addField('locations',[
62
+            ->addField('locations', [
63 63
                 'type'  =>  new NonNullType(new ListType(new NonNullType(new DirectiveLocationType()))),
64 64
                 'resolve' => [$this, 'resolveLocations'],
65 65
             ]);
Please login to merge, or discard this patch.