Completed
Push — master ( dcfc04...697864 )
by Neomerx
04:30
created
src/Package/FluteContainerConfigurator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         $container[FactoryInterface::class] = $factory;
55 55
 
56
-        $container[JsonSchemasInterface::class] = function (PsrContainerInterface $container) use ($factory) {
56
+        $container[JsonSchemasInterface::class] = function(PsrContainerInterface $container) use ($factory) {
57 57
             $settings     = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
58 58
             $modelSchemas = $container->get(ModelSchemaInfoInterface::class);
59 59
 
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
             );
65 65
         };
66 66
 
67
-        $container[ParametersMapperInterface::class] = function (PsrContainerInterface $container) {
67
+        $container[ParametersMapperInterface::class] = function(PsrContainerInterface $container) {
68 68
             return new ParametersMapper($container->get(JsonSchemasInterface::class));
69 69
         };
70 70
 
71
-        $container[EncoderInterface::class] = function (PsrContainerInterface $container) use ($factory) {
71
+        $container[EncoderInterface::class] = function(PsrContainerInterface $container) use ($factory) {
72 72
             /** @var JsonSchemasInterface $jsonSchemas */
73 73
             $jsonSchemas = $container->get(JsonSchemasInterface::class);
74 74
             $settings    = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
@@ -84,19 +84,19 @@  discard block
 block discarded – undo
84 84
             return $encoder;
85 85
         };
86 86
 
87
-        $container[RelationshipPaginationStrategyInterface::class] = function (PsrContainerInterface $container) {
87
+        $container[RelationshipPaginationStrategyInterface::class] = function(PsrContainerInterface $container) {
88 88
             $settings = $container->get(SettingsProviderInterface::class)->get(FluteSettings::class);
89 89
 
90 90
             return new BasicRelationshipPaginationStrategy($settings[FluteSettings::KEY_DEFAULT_PAGING_SIZE]);
91 91
         };
92 92
 
93
-        $container[JsonApiParserFactoryInterface::class] = function (PsrContainerInterface $container) {
93
+        $container[JsonApiParserFactoryInterface::class] = function(PsrContainerInterface $container) {
94 94
             $factory = new JsonApiParserFactory($container);
95 95
 
96 96
             return $factory;
97 97
         };
98 98
 
99
-        $container[FormValidatorFactoryInterface::class] = function (PsrContainerInterface $container) {
99
+        $container[FormValidatorFactoryInterface::class] = function(PsrContainerInterface $container) {
100 100
             $factory = new FormValidatorFactory($container);
101 101
 
102 102
             return $factory;
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public static function configureExceptionHandler(LimoncelloContainerInterface $container)
116 116
     {
117
-        $container[ThrowableHandlerInterface::class] = function (PsrContainerInterface $container) {
117
+        $container[ThrowableHandlerInterface::class] = function(PsrContainerInterface $container) {
118 118
             /** @var CacheSettingsProviderInterface $provider */
119 119
             $provider      = $container->get(CacheSettingsProviderInterface::class);
120 120
             $appConfig     = $provider->getApplicationConfiguration();
Please login to merge, or discard this patch.
src/Encoder/Encoder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 
125 125
         parse_str($this->getOriginalUri()->getQuery(), $queryParams);
126 126
 
127
-        return function ($offset) use ($pageSize, $queryParams) {
127
+        return function($offset) use ($pageSize, $queryParams) {
128 128
             $paramsWithPaging = array_merge($queryParams, [
129 129
                 BaseQueryParserInterface::PARAM_PAGE => [
130 130
                     JsonApiQueryParserInterface::PARAM_PAGING_OFFSET => $offset,
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                 ],
133 133
             ]);
134 134
             $newUri  = $this->getOriginalUri()->withQuery(http_build_query($paramsWithPaging));
135
-            $fullUrl = (string)$newUri;
135
+            $fullUrl = (string) $newUri;
136 136
             $link    = $this->getFactory()->createLink(false, $fullUrl, false);
137 137
 
138 138
             return $link;
Please login to merge, or discard this patch.
src/Http/ThrowableHandlers/FluteThrowableHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
             $details  = null;
131 131
             if ($this->isDebug === true) {
132 132
                 $message = $throwable->getMessage();
133
-                $details = (string)$throwable;
133
+                $details = (string) $throwable;
134 134
             }
135 135
             $errors->add(new Error(null, null, null, $httpCode, null, $message, $details));
136 136
         }
Please login to merge, or discard this patch.
src/Http/Traits/DefaultControllerMethodsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
         $modelClass = $schemaClass::MODEL;
647 647
         assert($schemaInfo->hasRelationship($modelClass, $modelRelName));
648 648
         assert(
649
-            ($type =$schemaInfo->getRelationshipType($modelClass, $modelRelName)) === RelationshipTypes::BELONGS_TO ||
649
+            ($type = $schemaInfo->getRelationshipType($modelClass, $modelRelName)) === RelationshipTypes::BELONGS_TO ||
650 650
             $type === RelationshipTypes::BELONGS_TO_MANY
651 651
         );
652 652
 
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
     ): string {
903 903
         $schema    = $jsonSchemas->getSchema($model);
904 904
         $selfLink  = $schema->getSelfLink($model);
905
-        $urlPrefix = (string)$requestUri->withPath('')->withQuery('')->withFragment('');
905
+        $urlPrefix = (string) $requestUri->withPath('')->withQuery('')->withFragment('');
906 906
         $fullUrl   = $selfLink->getStringRepresentation($urlPrefix);
907 907
 
908 908
         return $fullUrl;
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
      */
916 916
     private static function assertClassValueDefined(?string $value): void
917 917
     {
918
-        assert(empty($value) === false, 'Value should be defined in `' . static::class . '`.');
918
+        assert(empty($value) === false, 'Value should be defined in `'.static::class.'`.');
919 919
     }
920 920
 
921 921
     /**
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
     {
929 929
         assert(
930 930
             array_key_exists($interface, class_implements($class)) === true,
931
-            "Class `$class` should implement `" . $interface . '` interface.'
931
+            "Class `$class` should implement `".$interface.'` interface.'
932 932
         );
933 933
     }
934 934
 }
Please login to merge, or discard this patch.
src/Schema/Schema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -235,14 +235,14 @@  discard block
 block discarded – undo
235 235
         // if we are here then relationship contains paginated data, so we have to add pagination links
236 236
         $offset    = $relationshipData->getOffset();
237 237
         $limit     = $relationshipData->getLimit();
238
-        $urlPrefix = $this->getRelationshipSelfSubUrl($model, $jsonRelName) . '?';
239
-        $buildLink = function (int $offset, int $limit) use ($urlPrefix) : LinkInterface {
238
+        $urlPrefix = $this->getRelationshipSelfSubUrl($model, $jsonRelName).'?';
239
+        $buildLink = function(int $offset, int $limit) use ($urlPrefix) : LinkInterface {
240 240
             $paramsWithPaging = [
241 241
                 JsonApiQueryParserInterface::PARAM_PAGING_OFFSET => $offset,
242 242
                 JsonApiQueryParserInterface::PARAM_PAGING_LIMIT  => $limit,
243 243
             ];
244 244
 
245
-            $subUrl = $urlPrefix . http_build_query($paramsWithPaging);
245
+            $subUrl = $urlPrefix.http_build_query($paramsWithPaging);
246 246
 
247 247
             return $this->getFactory()->createLink(true, $subUrl, false);
248 248
         };
@@ -341,6 +341,6 @@  discard block
 block discarded – undo
341 341
      */
342 342
     private function getRelationshipSelfSubUrl(ModelInterface $model, string $jsonRelName): string
343 343
     {
344
-        return $this->getSelfSubUrl($model) . '/relationships/' . $jsonRelName;
344
+        return $this->getSelfSubUrl($model).'/relationships/'.$jsonRelName;
345 345
     }
346 346
 }
Please login to merge, or discard this patch.