@@ -106,7 +106,7 @@ |
||
106 | 106 | /** |
107 | 107 | * Get the services provided by the provider. |
108 | 108 | * |
109 | - * @return array |
|
109 | + * @return string[] |
|
110 | 110 | */ |
111 | 111 | public function provides() |
112 | 112 | { |
@@ -45,13 +45,13 @@ |
||
45 | 45 | $this->mergeConfigFrom(__DIR__.self::PATH, 'haljson'); |
46 | 46 | $this->app->singleton( |
47 | 47 | \NilPortugues\Laravel5\HalJsonSerializer\HalJsonSerializer::class, |
48 | - function ($app) { |
|
48 | + function($app) { |
|
49 | 49 | $mapping = $app['config']->get('haljson'); |
50 | 50 | $key = \md5(\json_encode($mapping)); |
51 | 51 | |
52 | 52 | return Cache::rememberForever( |
53 | 53 | $key, |
54 | - function () use ($mapping) { |
|
54 | + function() use ($mapping) { |
|
55 | 55 | return new HalJsonSerializer(new HalJsonTransformer(self::parseRoutes(new Mapper($mapping)))); |
56 | 56 | } |
57 | 57 | ); |
@@ -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\HalJsonSerializer; |
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: 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\HalJsonSerializer\Mapper; |
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\HalJsonSerializer\Mapper; |
12 | 12 |