@@ -135,7 +135,7 @@ discard block |
||
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 |
||
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 | { |
@@ -45,14 +45,14 @@ |
||
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 | ); |
@@ -15,7 +15,7 @@ |
||
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 | { |
@@ -1,12 +1,12 @@ |
||
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 |
@@ -20,7 +20,6 @@ |
||
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 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
4 | - * Date: 11/14/15 |
|
5 | - * Time: 11:46 AM. |
|
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/14/15 |
|
5 | + * Time: 11:46 AM. |
|
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; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
4 | - * Date: 8/18/15 |
|
5 | - * Time: 11:19 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: 8/18/15 |
|
5 | + * Time: 11:19 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; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
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 |