Completed
Push — master ( 200493...fdd355 )
by Alexandr
08:14 queued 04:55
created
src/Type/Scalar/FloatType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
 
24 24
     public function getDescription()
25 25
     {
26
-        return 'The `Float` scalar type represents signed double-precision fractional ' .
27
-               'values as specified by ' .
26
+        return 'The `Float` scalar type represents signed double-precision fractional '.
27
+               'values as specified by '.
28 28
                '[IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).';
29 29
     }
30 30
 
Please login to merge, or discard this patch.
src/Type/Config/Traits/ArgumentsAwareTrait.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
     public function addArgument($name, $type, $config = [])
29 29
     {
30 30
         if (!TypeMap::isInputType($type)) {
31
-            throw new ConfigurationException('Argument input type ' . $type . ' is not supported');
31
+            throw new ConfigurationException('Argument input type '.$type.' is not supported');
32 32
         }
33 33
 
34 34
         $config['name'] = $name;
Please login to merge, or discard this patch.
src/Type/Config/Config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $this->data          = $configData;
52 52
         $this->validator     = new ConfigValidator($contextObject);
53 53
         if (!$this->validator->validate($this->data, $this->getRules())) {
54
-            throw new ConfigurationException('Config is not valid for ' . get_class($contextObject) . "\n" . implode("\n", $this->validator->getErrorsArray(false)));
54
+            throw new ConfigurationException('Config is not valid for '.get_class($contextObject)."\n".implode("\n", $this->validator->getErrorsArray(false)));
55 55
         }
56 56
         $this->build();
57 57
     }
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             return $this->get($propertyName);
97 97
         }
98 98
 
99
-        throw new \Exception('Call to undefined method ' . $method);
99
+        throw new \Exception('Call to undefined method '.$method);
100 100
     }
101 101
 
102 102
 
Please login to merge, or discard this patch.
src/Type/TypeMap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
                 $name = $name == 'Datetime' ? 'DateTime' : $name;
77 77
                 $name = $name == 'Datetimetz' ? 'DateTimeTz' : $name;
78 78
 
79
-                $className                       = 'Youshido\GraphQL\Type\Scalar\\' . $name . 'Type';
79
+                $className                       = 'Youshido\GraphQL\Type\Scalar\\'.$name.'Type';
80 80
                 self::$scalarObjectsCache[$type] = new $className();
81 81
             }
82 82
 
Please login to merge, or discard this patch.
src/Validator/ConfigValidator/ConfigValidator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             if (array_key_exists('required', $fieldRules)) {
47 47
                 unset($fieldRules['required']);
48 48
                 if (!array_key_exists($fieldName, $data)) {
49
-                    $this->addError(new ValidationException('Field \'' . $fieldName . '\' of ' . $this->getContextName() . ' is required'));
49
+                    $this->addError(new ValidationException('Field \''.$fieldName.'\' of '.$this->getContextName().' is required'));
50 50
                     continue;
51 51
                 }
52 52
             } elseif (!array_key_exists($fieldName, $data)) {
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
             /** Validation of all other rules*/
57 57
             foreach ($fieldRules as $ruleName => $ruleInfo) {
58 58
                 if (!array_key_exists($ruleName, $this->validationRules)) {
59
-                    $this->addError(new ValidationException('Field \'' . $fieldName . '\' has invalid rule \'' . $ruleInfo . '\''));
59
+                    $this->addError(new ValidationException('Field \''.$fieldName.'\' has invalid rule \''.$ruleInfo.'\''));
60 60
                     continue;
61 61
                 }
62 62
 
63 63
                 if (!$this->validationRules[$ruleName]->validate($data[$fieldName], $ruleInfo)) {
64 64
                     $this->addError(
65
-                        new ValidationException('Field \'' . $fieldName . '\' of ' . $this->getContextName()
66
-                                                . ' expected to be ' . $ruleName . ': \'' . (string)$ruleInfo . '\', but got: ' . gettype($data[$fieldName])));
65
+                        new ValidationException('Field \''.$fieldName.'\' of '.$this->getContextName()
66
+                                                . ' expected to be '.$ruleName.': \''.(string)$ruleInfo.'\', but got: '.gettype($data[$fieldName])));
67 67
                 }
68 68
             }
69 69
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             foreach (array_keys($data) as $fieldName) {
73 73
                 if (!in_array($fieldName, $processedFields)) {
74 74
                     $this->addError(
75
-                        new ValidationException('Field \'' . $fieldName . '\' is not expected in ' . $this->getContextName()));
75
+                        new ValidationException('Field \''.$fieldName.'\' is not expected in '.$this->getContextName()));
76 76
 
77 77
                 }
78 78
             }
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
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 use Youshido\GraphQL\Type\ListType\ListType;
13 13
 use Youshido\GraphQL\Type\Object\ObjectType;
14 14
 
15
-require_once __DIR__ . '/../../vendor/autoload.php';
16
-require_once __DIR__ . '/Schema/DataProvider.php';
17
-require_once __DIR__ . '/Schema/PostType.php';
18
-require_once __DIR__ . '/Schema/PostStatus.php';
19
-require_once __DIR__ . '/Schema/ContentBlockInterface.php';
20
-require_once __DIR__ . '/Schema/LikePost.php';
21
-require_once __DIR__ . '/Schema/BannerType.php';
22
-require_once __DIR__ . '/Schema/ContentBlockUnion.php';
23
-require_once __DIR__ . '/Schema/PostInputType.php';
24
-require_once __DIR__ . '/Schema/BlogSchema.php';
15
+require_once __DIR__.'/../../vendor/autoload.php';
16
+require_once __DIR__.'/Schema/DataProvider.php';
17
+require_once __DIR__.'/Schema/PostType.php';
18
+require_once __DIR__.'/Schema/PostStatus.php';
19
+require_once __DIR__.'/Schema/ContentBlockInterface.php';
20
+require_once __DIR__.'/Schema/LikePost.php';
21
+require_once __DIR__.'/Schema/BannerType.php';
22
+require_once __DIR__.'/Schema/ContentBlockUnion.php';
23
+require_once __DIR__.'/Schema/PostInputType.php';
24
+require_once __DIR__.'/Schema/BlogSchema.php';
25 25
 
26 26
 /**
27 27
 $rootQueryType = new ObjectType([
Please login to merge, or discard this patch.
examples/02_blog/router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 use Youshido\GraphQL\Processor;
12 12
 use Youshido\GraphQL\Schema;
13 13
 
14
-require_once __DIR__ . '/schema-bootstrap.php';
14
+require_once __DIR__.'/schema-bootstrap.php';
15 15
 /** @var Schema $schema */
16 16
 $schema = new BlogSchema();
17 17
 
Please login to merge, or discard this patch.
examples/02_blog/Schema/BlogSchema.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,19 +18,19 @@
 block discarded – undo
18 18
             'latestPost'           => new PostType(),
19 19
             'randomBanner'         => [
20 20
                 'type'    => new BannerType(),
21
-                'resolve' => function () {
21
+                'resolve' => function() {
22 22
                     return DataProvider::getBanner(rand(1, 10));
23 23
                 }
24 24
             ],
25 25
             'pageContentUnion'     => [
26 26
                 'type'    => new ListType(new ContentBlockUnion()),
27
-                'resolve' => function () {
27
+                'resolve' => function() {
28 28
                     return [DataProvider::getPost(1), DataProvider::getBanner(1)];
29 29
                 }
30 30
             ],
31 31
             'pageContentInterface' => [
32 32
                 'type'    => new ListType(new ContentBlockInterface()),
33
-                'resolve' => function () {
33
+                'resolve' => function() {
34 34
                     return [DataProvider::getPost(2), DataProvider::getBanner(3)];
35 35
                 }
36 36
             ]
Please login to merge, or discard this patch.
examples/02_blog/Schema/PostType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
                 'args'              => [
26 26
                     'truncated' => new BooleanType()
27 27
                 ],
28
-                'resolve'           => function ($value, $args) {
29
-                    return (!empty($args['truncated'])) ? explode(' ', $value)[0] . '...' : $value;
28
+                'resolve'           => function($value, $args) {
29
+                    return (!empty($args['truncated'])) ? explode(' ', $value)[0].'...' : $value;
30 30
                 }
31 31
             ])
32 32
             ->addField('title', new NonNullType(new StringType()))
Please login to merge, or discard this patch.