Completed
Push — master ( 7a0180...875ce0 )
by Alexandr
02:39
created
src/Introspection/QueryType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         if ($value && $value->getKind() == TypeMap::KIND_ENUM) {
59 59
             $data = [];
60 60
             foreach ($value->getValues() as $enumValue) {
61
-                if(!$args['includeDeprecated'] && (isset($enumValue['isDeprecated']) && $enumValue['isDeprecated'])) {
61
+                if (!$args['includeDeprecated'] && (isset($enumValue['isDeprecated']) && $enumValue['isDeprecated'])) {
62 62
                     continue;
63 63
                 }
64 64
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         }
92 92
 
93 93
         /** @var AbstractObjectType $value */
94
-        return array_filter($value->getConfig()->getFields(), function ($field) use ($args) {
94
+        return array_filter($value->getConfig()->getFields(), function($field) use ($args) {
95 95
             /** @var $field Field */
96 96
             if (in_array($field->getName(), ['__type', '__schema']) || (!$args['includeDeprecated'] && $field->isDeprecated())) {
97 97
                 return false;
Please login to merge, or discard this patch.
src/Config/AbstractConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $validator = ConfigValidator::getInstance();
60 60
 
61 61
         if (!$validator->validate($this->data, $this->getContextRules(), $this->extraFieldsAllowed)) {
62
-            throw new ConfigurationException('Config is not valid for ' . ($this->contextObject ? get_class($this->contextObject) : null) . "\n" . implode("\n", $validator->getErrorsArray(false)));
62
+            throw new ConfigurationException('Config is not valid for '.($this->contextObject ? get_class($this->contextObject) : null)."\n".implode("\n", $validator->getErrorsArray(false)));
63 63
         }
64 64
     }
65 65
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         } elseif (substr($method, 0, 2) == 'is') {
152 152
             $propertyName = lcfirst(substr($method, 2));
153 153
         } else {
154
-            throw new \Exception('Call to undefined method ' . $method);
154
+            throw new \Exception('Call to undefined method '.$method);
155 155
         }
156 156
 
157 157
         return $this->get($propertyName);
Please login to merge, or discard this patch.
src/Execution/Container/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         if (isset($this->values[$id])) {
48 48
             unset($this->values[$id]);
49 49
         }
50
-        $this->keyset[$id]   = true;
50
+        $this->keyset[$id] = true;
51 51
     }
52 52
 
53 53
     public function remove($id)
Please login to merge, or discard this patch.
Tests/StarWars/Schema/StarWarsQueryType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
                 'args'    => [
37 37
                     'episode' => ['type' => new EpisodeEnum()]
38 38
                 ],
39
-                'resolve' => function ($root, $args) {
39
+                'resolve' => function($root, $args) {
40 40
                     return StarWarsData::getHero(isset($args['episode']) ? $args['episode'] : null);
41 41
                 },
42 42
             ])
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                 'args'    => [
47 47
                     'id' => new IdType()
48 48
                 ],
49
-                'resolve' => function ($value = null, $args = []) {
49
+                'resolve' => function($value = null, $args = []) {
50 50
                     $humans = StarWarsData::humans();
51 51
 
52 52
                     return isset($humans[$args['id']]) ? $humans[$args['id']] : null;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 'args'    => [
59 59
                     'id' => new IdType()
60 60
                 ],
61
-                'resolve' => function ($value = null, $args = []) {
61
+                'resolve' => function($value = null, $args = []) {
62 62
                     $droids = StarWarsData::droids();
63 63
 
64 64
                     return isset($droids[$args['id']]) ? $droids[$args['id']] : null;
Please login to merge, or discard this patch.
src/Relay/Connection/Connection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $edgeFields = !empty($config['edgeFields']) ? $config['edgeFields'] : [];
53 53
 
54 54
         $edgeType = new ObjectType([
55
-            'name'        => $name . 'Edge',
55
+            'name'        => $name.'Edge',
56 56
             'description' => 'An edge in a connection.',
57 57
             'fields'      => array_merge([
58 58
                 'node'   => [
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $connectionFields = !empty($config['connectionFields']) ? $config['connectionFields'] : [];
85 85
 
86 86
         $connectionType = new ObjectType([
87
-            'name'        => $name . 'Connection',
87
+            'name'        => $name.'Connection',
88 88
             'description' => 'A connection to a list of items.',
89 89
             'fields'      => array_merge([
90 90
                 'pageInfo' => [
Please login to merge, or discard this patch.
src/Type/SchemaTypesList.php 1 patch
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.
examples/02_blog/schema-bootstrap.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -2,13 +2,13 @@
 block discarded – undo
2 2
 
3 3
 namespace BlogTest;
4 4
 
5
-require_once __DIR__ . '/../../../../../vendor/autoload.php';
6
-require_once __DIR__ . '/Schema/DataProvider.php';
7
-require_once __DIR__ . '/Schema/PostType.php';
8
-require_once __DIR__ . '/Schema/PostStatus.php';
9
-require_once __DIR__ . '/Schema/ContentBlockInterface.php';
10
-require_once __DIR__ . '/Schema/LikePostField.php';
11
-require_once __DIR__ . '/Schema/BannerType.php';
12
-require_once __DIR__ . '/Schema/ContentBlockUnion.php';
13
-require_once __DIR__ . '/Schema/PostInputType.php';
14
-require_once __DIR__ . '/Schema/BlogSchema.php';
5
+require_once __DIR__.'/../../../../../vendor/autoload.php';
6
+require_once __DIR__.'/Schema/DataProvider.php';
7
+require_once __DIR__.'/Schema/PostType.php';
8
+require_once __DIR__.'/Schema/PostStatus.php';
9
+require_once __DIR__.'/Schema/ContentBlockInterface.php';
10
+require_once __DIR__.'/Schema/LikePostField.php';
11
+require_once __DIR__.'/Schema/BannerType.php';
12
+require_once __DIR__.'/Schema/ContentBlockUnion.php';
13
+require_once __DIR__.'/Schema/PostInputType.php';
14
+require_once __DIR__.'/Schema/BlogSchema.php';
Please login to merge, or discard this patch.
examples/02_blog_inline/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 use Youshido\GraphQL\Type\Object\ObjectType;
8 8
 
9 9
 
10
-require_once __DIR__ . '/../../../../../vendor/autoload.php';
11
-require_once __DIR__ . '/inline-schema.php';
10
+require_once __DIR__.'/../../../../../vendor/autoload.php';
11
+require_once __DIR__.'/inline-schema.php';
12 12
 /** @var ObjectType $rootQueryType */
13 13
 
14 14
 $processor = new Processor(new Schema([
@@ -17,4 +17,4 @@  discard block
 block discarded – undo
17 17
 $payload = '{ latestPost { title(truncated: true), summary } }';
18 18
 
19 19
 $processor->processPayload($payload);
20
-echo json_encode($processor->getResponseData()) . "\n";
20
+echo json_encode($processor->getResponseData())."\n";
Please login to merge, or discard this patch.
examples/01_sandbox/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use Youshido\GraphQL\Type\Object\ObjectType;
7 7
 use Youshido\GraphQL\Type\Scalar\StringType;
8 8
 
9
-require_once __DIR__ . '/../../../../../vendor/autoload.php';
9
+require_once __DIR__.'/../../../../../vendor/autoload.php';
10 10
 
11 11
 $processor = new Processor(new Schema([
12 12
     'query' => new ObjectType([
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
         'fields' => [
15 15
             'currentTime' => [
16 16
                 'type'    => new StringType(),
17
-                'resolve' => function () {
17
+                'resolve' => function() {
18 18
                     return date('Y-m-d H:ia');
19 19
                 }
20 20
             ]
@@ -23,4 +23,4 @@  discard block
 block discarded – undo
23 23
 ]));
24 24
 
25 25
 $processor->processPayload('{ currentTime }');
26
-echo json_encode($processor->getResponseData()) . "\n";
26
+echo json_encode($processor->getResponseData())."\n";
Please login to merge, or discard this patch.