Passed
Push — master ( 3415c1...9028fd )
by Lukáš
02:04
created
src/Http/Request/RequestHandler.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
      * We inject our deserialized entity into method parameters
124 124
      *
125 125
      * @param $parameters
126
-     * @return array
126
+     * @return RequestInterface[]
127 127
      */
128 128
     public function bindRequest(array $parameters)
129 129
     {
Please login to merge, or discard this patch.
src/Serializers/LaravelSerializer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
      */
26 26
     protected function addCollectionHandler()
27 27
     {
28
-        return function (HandlerRegistry $registry) {
28
+        return function(HandlerRegistry $registry) {
29 29
             $registry->registerHandler(
30 30
                 GraphNavigator::DIRECTION_SERIALIZATION,
31 31
                 Collection::class,
32 32
                 'json',
33
-                function (VisitorInterface $visitor, Collection $collection, array $type, Context $context) {
33
+                function(VisitorInterface $visitor, Collection $collection, array $type, Context $context) {
34 34
                     return $visitor->visitArray($collection->values(), $type, $context);
35 35
                 }
36 36
             );
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 GraphNavigator::DIRECTION_DESERIALIZATION,
40 40
                 Collection::class,
41 41
                 'json',
42
-                function (VisitorInterface $visitor, array $data, array $type, Context $context) {
42
+                function(VisitorInterface $visitor, array $data, array $type, Context $context) {
43 43
                     $data = $visitor->visitArray($data, $type, $context);
44 44
 
45 45
                     return new Collection($data);
Please login to merge, or discard this patch.
src/Http/Request/RequestDeserializationHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
         $data = $this->purifier->clean($event->getData());
93 93
 
94 94
         if (is_array($data)) {
95
-            array_walk_recursive($data, function (&$value) {
95
+            array_walk_recursive($data, function(&$value) {
96 96
                 $value = is_string($value) ? htmlspecialchars($value) : $value;
97 97
             });
98 98
         } else {
Please login to merge, or discard this patch.
src/Validation/Purifier.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function clean($dirty, $config = null)
18 18
     {
19 19
         if (is_array($dirty)) {
20
-            $output = array_map(function ($item) use ($config) {
20
+            $output = array_map(function($item) use ($config) {
21 21
                 return $this->clean($item, $config);
22 22
             }, $dirty);
23 23
         } else {
Please login to merge, or discard this patch.
src/Providers/LaravelServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,19 +63,19 @@  discard block
 block discarded – undo
63 63
         //region Annotations
64 64
         AnnotationRegistry::registerLoader('class_exists');
65 65
 
66
-        $this->app->singleton('app.annotation_reader', function (Application $app) {
66
+        $this->app->singleton('app.annotation_reader', function(Application $app) {
67 67
             return new AnnotationReader;
68 68
         });
69 69
         //endregion
70 70
 
71 71
         //region Serializer
72
-        $this->app->singleton('api.serializer', function (Application $app) {
72
+        $this->app->singleton('api.serializer', function(Application $app) {
73 73
             return $this->prepareSerializer()->build();
74 74
         });
75 75
         //endregion
76 76
 
77 77
         //region JSON Schema Constraint
78
-        $this->app->singleton('api.schema.constraint', function (Application $app) {
78
+        $this->app->singleton('api.schema.constraint', function(Application $app) {
79 79
             $fileRetriever = new FileGetContents;
80 80
             $fileRetriever->setBasePath(config(self::CONFIG_KEY . '.request.schema_path') . DIRECTORY_SEPARATOR);
81 81
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         //endregion
91 91
 
92 92
         //region JSON Schema Validator
93
-        $this->app->singleton('api.schema.validator', function (Application $app) {
93
+        $this->app->singleton('api.schema.validator', function(Application $app) {
94 94
             return new Validator(
95 95
                 $app->make('api.schema.constraint')
96 96
             );
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
         //endregion
99 99
 
100 100
         //region RequestHandler
101
-        $this->app->singleton(RequestHandler::class, function (Application $app) {
101
+        $this->app->singleton(RequestHandler::class, function(Application $app) {
102 102
             $serializer = $this->prepareSerializer()
103
-                ->configureListeners(function (EventDispatcher $dispatcher) use ($app) {
103
+                ->configureListeners(function(EventDispatcher $dispatcher) use ($app) {
104 104
                     $dispatcher->addSubscriber(
105 105
                         new RequestDeserializationHandler(
106 106
                             $app->make('api.schema.validator'),
Please login to merge, or discard this patch.