Completed
Push — master ( b4459a...5882cd )
by Alexandr
03:37
created
Tests/StarWars/Schema/CharacterInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             ->addField('id', TypeMap::TYPE_ID, ['required' => true])
22 22
             ->addField('name', TypeMap::TYPE_STRING, ['required' => true])
23 23
             ->addField('friends', new ListType(new CharacterInterface()), [
24
-                'resolve' => function ($value) {
24
+                'resolve' => function($value) {
25 25
                     return $value['friends'];
26 26
                 }
27 27
             ])
Please login to merge, or discard this patch.
Tests/StarWars/Schema/DroidType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     {
29 29
         parent::build($config);
30 30
 
31
-        $config->getField('friends')->getConfig()->set('resolve', function ($droid) {
31
+        $config->getField('friends')->getConfig()->set('resolve', function($droid) {
32 32
             return StarWarsData::getFriends($droid);
33 33
         });
34 34
 
Please login to merge, or discard this patch.
src/Type/NonNullType.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,6 @@
 block discarded – undo
9 9
 namespace Youshido\GraphQL\Type;
10 10
 
11 11
 
12
-use Youshido\GraphQL\Type\Config\TypeConfigInterface;
13
-
14 12
 class NonNullType extends AbstractType implements CompositeTypeInterface
15 13
 {
16 14
     private $_typeOf;
Please login to merge, or discard this patch.
src/Type/Object/AbstractUnionType.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Youshido\GraphQL\Type\AbstractType;
13 13
 use Youshido\GraphQL\Type\Config\Object\UnionTypeConfig;
14 14
 use Youshido\GraphQL\Type\Config\Traits\ConfigCallTrait;
15
-use Youshido\GraphQL\Type\Config\TypeConfigInterface;
16 15
 use Youshido\GraphQL\Type\Traits\AutoNameTrait;
17 16
 use Youshido\GraphQL\Type\TypeMap;
18 17
 
Please login to merge, or discard this patch.
examples/01_sandbox/index.php 1 patch
Spacing   +2 added lines, -2 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();
12 12
 $processor->setSchema(new Schema([
@@ -24,4 +24,4 @@  discard block
 block discarded – undo
24 24
 ]));
25 25
 
26 26
 $processor->processRequest('{ currentTime }');
27
-echo json_encode($processor->getResponseData()) . "\n";
27
+echo json_encode($processor->getResponseData())."\n";
Please login to merge, or discard this patch.
examples/02_blog_inline/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@
 block discarded – undo
9 9
 use Youshido\GraphQL\Type\Scalar\StringType;
10 10
 
11 11
 
12
-require_once __DIR__ . '/../../vendor/autoload.php';
13
-require_once __DIR__ . '/inline-schema.php';
12
+require_once __DIR__.'/../../vendor/autoload.php';
13
+require_once __DIR__.'/inline-schema.php';
14 14
 /** @var ObjectType $rootQueryType */
15 15
 
16 16
 $processor = new Processor();
17 17
 $processor->setSchema(new Schema([
18 18
     'query' => $rootQueryType
19 19
 ]));
20
-$payload  = '{ latestPost { title(truncated: true), summary } }';
20
+$payload = '{ latestPost { title(truncated: true), summary } }';
21 21
 
22 22
 $processor->processRequest($payload);
23
-echo json_encode($processor->getResponseData()) . "\n";
24 23
\ No newline at end of file
24
+echo json_encode($processor->getResponseData())."\n";
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
examples/02_blog/Schema/LikePost.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Youshido\GraphQL\Type\AbstractType;
13 13
 use Youshido\GraphQL\Type\Config\Object\UnionTypeConfig;
14 14
 use Youshido\GraphQL\Type\Config\Traits\ConfigCallTrait;
15
-use Youshido\GraphQL\Type\Config\TypeConfigInterface;
16 15
 use Youshido\GraphQL\Type\Traits\AutoNameTrait;
17 16
 use Youshido\GraphQL\Type\TypeMap;
18 17
 
Please login to merge, or discard this patch.
src/Type/ListType/AbstractListType.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Youshido\GraphQL\Type\AbstractType;
13 13
 use Youshido\GraphQL\Type\Config\Object\UnionTypeConfig;
14 14
 use Youshido\GraphQL\Type\Config\Traits\ConfigCallTrait;
15
-use Youshido\GraphQL\Type\Config\TypeConfigInterface;
16 15
 use Youshido\GraphQL\Type\Traits\AutoNameTrait;
17 16
 use Youshido\GraphQL\Type\TypeMap;
18 17
 
Please login to merge, or discard this patch.
examples/02_blog/test.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 //require_once __DIR__ . '/../../vendor/autoload.php';
13 13
 //require_once __DIR__ . '/Schema/PostType.php';       // including PostType definition
14 14
 
15
-require_once __DIR__ .'/schema-bootstrap.php';
15
+require_once __DIR__.'/schema-bootstrap.php';
16 16
 
17 17
 $rootQueryType = new ObjectType([
18 18
     'name' => 'RootQueryType',
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     ]
23 23
 ]);
24 24
 
25
-$rootMutationType =  new ObjectType([
25
+$rootMutationType = new ObjectType([
26 26
     'name'   => 'RootMutationType',
27 27
     'fields' => [
28 28
         'likePost' => [
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
             'args'    => [
31 31
                 'id' => new NonNullType(new IntType())
32 32
             ],
33
-            'resolve' => function ($value, $args, $type) {
33
+            'resolve' => function($value, $args, $type) {
34 34
                 // adding like count code goes here
35 35
                 return [
36
-                    'title' => 'Title for the post #' . $args['id'],
36
+                    'title' => 'Title for the post #'.$args['id'],
37 37
                     'summary' => 'We can now get a richer response from the mutation',
38 38
                     'likeCount' => 2
39 39
                 ];
@@ -49,6 +49,6 @@  discard block
 block discarded – undo
49 49
     'mutation' => $rootMutationType,
50 50
 ]));
51 51
 
52
-$payload  = 'mutation { likePost(id:5) }';
52
+$payload = 'mutation { likePost(id:5) }';
53 53
 $processor->processRequest($payload);
54
-echo json_encode($processor->getResponseData()) . "\n";
54
+echo json_encode($processor->getResponseData())."\n";
Please login to merge, or discard this patch.