Completed
Push — master ( 647396...bc3153 )
by Nil
02:27
created
Laravel5/JsonSerializer/Laravel5JsonSerializerServiceProvider.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
     /**
100 100
      * Get the services provided by the provider.
101 101
      *
102
-     * @return array
102
+     * @return string[]
103 103
      */
104 104
     public function provides()
105 105
     {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@
 block discarded – undo
42 42
     public function register()
43 43
     {
44 44
         $this->mergeConfigFrom(__DIR__.self::PATH, 'jsonapi');
45
-        $this->app->singleton(\NilPortugues\Laravel5\JsonSerializer\JsonSerializer::class, function ($app) {
45
+        $this->app->singleton(\NilPortugues\Laravel5\JsonSerializer\JsonSerializer::class, function($app) {
46 46
                 $mapping = $app['config']->get('jsonapi');
47 47
                 $key = md5(json_encode($mapping));
48 48
 
49
-                return Cache::rememberForever($key, function () use ($mapping) {
49
+                return Cache::rememberForever($key, function() use ($mapping) {
50 50
                     return new JsonSerializer(new JsonTransformer(self::parseRoutes(new Mapper($mapping))));
51 51
                 });
52 52
             });
Please login to merge, or discard this patch.
src/NilPortugues/Laravel5/JsonSerializer/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.
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.
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\JsonSerializer\Mapper;
12 12
 
Please login to merge, or discard this patch.
src/NilPortugues/Laravel5/JsonSerializer/Mapper/MappingFactory.php 2 patches
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\JsonSerializer\Mapper;
12 12
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             $value = $reflection->newInstanceWithoutConstructor();
40 40
 
41 41
             if (is_subclass_of($value, Model::class, true)) {
42
-                $attributes =  array_merge(
42
+                $attributes = array_merge(
43 43
                     Schema::getColumnListing($value->getTable()),
44 44
                     self::getRelationshipMethodsAsPropertyName($value, $className, $reflection)
45 45
                 );
Please login to merge, or discard this patch.