Completed
Push — master ( db8922...013eb5 )
by Nil
11:20
created
src/NilPortugues/Laravel5/JsonApi/Controller/JsonApiController.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     /**
63 63
      * Returns the total number of results available for the current resource.
64 64
      *
65
-     * @return callable
65
+     * @return \Closure
66 66
      */
67 67
     protected function totalAmountResourceCallable()
68 68
     {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Returns a list of resources based on pagination criteria.
85 85
      *
86
-     * @return callable
86
+     * @return \Closure
87 87
      */
88 88
     protected function listResourceCallable()
89 89
     {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     /**
119 119
      * @param Request $request
120 120
      *
121
-     * @return callable
121
+     * @return \Closure
122 122
      */
123 123
     protected function findResourceCallable(Request $request)
124 124
     {
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     /**
149 149
      * Reads the input and creates and saves a new Eloquent Model.
150 150
      *
151
-     * @return callable
151
+     * @return \Closure
152 152
      */
153 153
     protected function createResourceCallable()
154 154
     {
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     }
199 199
 
200 200
     /**
201
-     * @return callable
201
+     * @return \Closure
202 202
      */
203 203
     protected function updateResourceCallable()
204 204
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     protected function totalAmountResourceCallable()
68 68
     {
69
-        return function () {
69
+        return function() {
70 70
             $idKey = $this->getDataModel()->getKeyName();
71 71
 
72 72
             return $this->getDataModel()->query()->get([$idKey])->count();
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function listResourceCallable()
89 89
     {
90
-        return function () {
90
+        return function() {
91 91
             return EloquentHelper::paginate($this->serializer, $this->getDataModel()->query())->get();
92 92
         };
93 93
     }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     protected function findResourceCallable(Request $request)
124 124
     {
125
-        return function () use ($request) {
125
+        return function() use ($request) {
126 126
             $idKey = $this->getDataModel()->getKeyName();
127 127
 
128 128
             return $this->getDataModel()->query()->where($idKey, $request->id)->first();
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     protected function createResourceCallable()
154 154
     {
155
-        return function (array $data, array $values) {
155
+        return function(array $data, array $values) {
156 156
             $model = $this->getDataModel()->newInstance();
157 157
 
158 158
             foreach ($values as $attribute => $value) {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     protected function updateResourceCallable()
204 204
     {
205
-        return function (Model $model, array $values, ErrorBag $errorBag) {
205
+        return function(Model $model, array $values, ErrorBag $errorBag) {
206 206
             foreach ($values as $attribute => $value) {
207 207
                 $model->$attribute = $value;
208 208
             }
Please login to merge, or discard this patch.
src/NilPortugues/Laravel5/JsonApi/Laravel5JsonApiServiceProvider.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     /**
136 136
      * @param array $value
137 137
      *
138
-     * @return mixed|string
138
+     * @return string
139 139
      */
140 140
     private static function calculateRoute(array $value)
141 141
     {
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     /**
153 153
      * Get the services provided by the provider.
154 154
      *
155
-     * @return array
155
+     * @return string[]
156 156
      */
157 157
     public function provides()
158 158
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@
 block discarded – undo
45 45
         $this->mergeConfigFrom(__DIR__.self::PATH, 'jsonapi');
46 46
         $this->app->singleton(
47 47
             \NilPortugues\Laravel5\JsonApiSerializer\JsonApiSerializer::class,
48
-            function ($app) {
48
+            function($app) {
49 49
 
50 50
                 $mapping = $app['config']->get('jsonapi');
51 51
                 $key = \md5(\json_encode($mapping));
52 52
 
53 53
                 return Cache::rememberForever(
54 54
                     $key,
55
-                    function () use ($mapping) {
55
+                    function() use ($mapping) {
56 56
                         return new JsonApiSerializer(new JsonApiTransformer(self::parseRoutes(new Mapper($mapping))));
57 57
                     }
58 58
                 );
Please login to merge, or discard this patch.
src/NilPortugues/Laravel5/JsonApi/Mapper/Mapper.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     /**
16 16
      * @param string|array $mappedClass
17 17
      *
18
-     * @return array
18
+     * @return \NilPortugues\Api\Mapping\Mapping
19 19
      */
20 20
     protected function buildMapping($mappedClass)
21 21
     {
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Author: Nil Portugués Calderó <[email protected]>
4
- * Date: 10/16/15
5
- * Time: 8:59 PM.
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
3
+     * Author: Nil Portugués Calderó <[email protected]>
4
+     * Date: 10/16/15
5
+     * Time: 8:59 PM.
6
+     *
7
+     * For the full copyright and license information, please view the LICENSE
8
+     * file that was distributed with this source code.
9
+     */
10 10
 
11 11
 namespace NilPortugues\Laravel5\JsonApiSerializer\Mapper;
12 12
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,6 @@
 block discarded – undo
20 20
     protected function buildMapping($mappedClass)
21 21
     {
22 22
         return (\is_string($mappedClass) && \class_exists($mappedClass, true)) ?
23
-            MappingFactory::fromClass($mappedClass) :
24
-            MappingFactory::fromArray($mappedClass);
23
+            MappingFactory::fromClass($mappedClass) : MappingFactory::fromArray($mappedClass);
25 24
     }
26 25
 }
Please login to merge, or discard this patch.
src/NilPortugues/Laravel5/JsonApi/Eloquent/EloquentHelper.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Author: Nil Portugués Calderó <[email protected]>
4
- * Date: 11/27/15
5
- * Time: 7:47 PM.
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
3
+     * Author: Nil Portugués Calderó <[email protected]>
4
+     * Date: 11/27/15
5
+     * Time: 7:47 PM.
6
+     *
7
+     * For the full copyright and license information, please view the LICENSE
8
+     * file that was distributed with this source code.
9
+     */
10 10
 
11 11
 namespace NilPortugues\Laravel5\JsonApi\Eloquent;
12 12
 
Please login to merge, or discard this patch.
src/NilPortugues/Laravel5/JsonApi/Mapper/MappingFactory.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Author: Nil Portugués Calderó <[email protected]>
4
- * Date: 10/16/15
5
- * Time: 8:59 PM.
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
3
+     * Author: Nil Portugués Calderó <[email protected]>
4
+     * Date: 10/16/15
5
+     * Time: 8:59 PM.
6
+     *
7
+     * For the full copyright and license information, please view the LICENSE
8
+     * file that was distributed with this source code.
9
+     */
10 10
 
11 11
 namespace NilPortugues\Laravel5\JsonApiSerializer\Mapper;
12 12
 
Please login to merge, or discard this patch.
tests/NilPortugues/Laravel5/JsonApi/Controller/JsonApiControllerTest.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Author: Nil Portugués Calderó <[email protected]>
4
- * Date: 12/9/15
5
- * Time: 3:05 PM.
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
3
+     * Author: Nil Portugués Calderó <[email protected]>
4
+     * Date: 12/9/15
5
+     * Time: 3:05 PM.
6
+     *
7
+     * For the full copyright and license information, please view the LICENSE
8
+     * file that was distributed with this source code.
9
+     */
10 10
 
11 11
 namespace NilPortugues\Tests\Laravel5\JsonApi\Controller;
12 12
 
Please login to merge, or discard this patch.
tests/NilPortugues/Laravel5/JsonApi/Eloquent/EloquentHelperTest.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Author: Nil Portugués Calderó <[email protected]>
4
- * Date: 12/9/15
5
- * Time: 2:27 PM.
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
3
+     * Author: Nil Portugués Calderó <[email protected]>
4
+     * Date: 12/9/15
5
+     * Time: 2:27 PM.
6
+     *
7
+     * For the full copyright and license information, please view the LICENSE
8
+     * file that was distributed with this source code.
9
+     */
10 10
 
11 11
 namespace NilPortugues\Tests\Laravel5\JsonApi\Eloquent;
12 12
 
Please login to merge, or discard this patch.
tests/NilPortugues/Laravel5/JsonApi/Facades/JsonApiSerializerTest.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Author: Nil Portugués Calderó <[email protected]>
4
- * Date: 12/9/15
5
- * Time: 2:10 PM.
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
3
+     * Author: Nil Portugués Calderó <[email protected]>
4
+     * Date: 12/9/15
5
+     * Time: 2:10 PM.
6
+     *
7
+     * For the full copyright and license information, please view the LICENSE
8
+     * file that was distributed with this source code.
9
+     */
10 10
 
11 11
 namespace NilPortugues\Tests\Laravel5\JsonApi\Facades;
12 12
 
Please login to merge, or discard this patch.
tests/NilPortugues/Laravel5/JsonApi/LaravelTestCase.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Author: Nil Portugués Calderó <[email protected]>
4
- * Date: 12/9/15
5
- * Time: 5:24 PM.
6
- *
7
- * For the full copyright and license information, please view the LICENSE
8
- * file that was distributed with this source code.
9
- */
3
+     * Author: Nil Portugués Calderó <[email protected]>
4
+     * Date: 12/9/15
5
+     * Time: 5:24 PM.
6
+     *
7
+     * For the full copyright and license information, please view the LICENSE
8
+     * file that was distributed with this source code.
9
+     */
10 10
 
11 11
 namespace NilPortugues\Tests\Laravel5\JsonApi;
12 12
 
Please login to merge, or discard this patch.