Completed
Push — master ( eb26d8...e68f13 )
by Nil
03:47
created
src/NilPortugues/Laravel5/JSendSerializer/JSendSerializer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         if (is_subclass_of($value, Model::class, true)) {
61 61
 
62 62
             $stdClass = (object) $value->getAttributes();
63
-            $data =  $this->serializeData($stdClass);
63
+            $data = $this->serializeData($stdClass);
64 64
             $data[self::CLASS_IDENTIFIER_KEY] = get_class($value);
65 65
 
66 66
             $methods = $this->getRelationshipMethodsAsPropertyName($value, get_class($value), new ReflectionClass($value));
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
                                     if (is_object($model)) {
110 110
                                         $stdClass = (object) $model->getAttributes();
111
-                                        $data =  $this->serializeData($stdClass);
111
+                                        $data = $this->serializeData($stdClass);
112 112
                                         $data[self::CLASS_IDENTIFIER_KEY] = get_class($model);
113 113
 
114 114
                                         $items[] = $data;
Please login to merge, or discard this patch.
Laravel5/JSendSerializer/Laravel5JSendSerializerServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     public function register()
43 43
     {
44 44
         $this->mergeConfigFrom(__DIR__.self::PATH, 'jsend');
45
-        $this->app->singleton(\NilPortugues\Laravel5\JSendSerializer\JSendSerializer::class, function ($app) {
45
+        $this->app->singleton(\NilPortugues\Laravel5\JSendSerializer\JSendSerializer::class, function($app) {
46 46
                 $mapping = $app['config']->get('jsend');
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 JSendSerializer(new JSendTransformer(self::parseRoutes(new Mapper($mapping))));
51 51
                 });
52 52
             });
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             $mappingProperty->setAccessible(true);
71 71
 
72 72
             $otherUrls = (array) $mappingProperty->getValue($mapping);
73
-            if(!empty($otherUrls)) {
73
+            if (!empty($otherUrls)) {
74 74
                 foreach ($otherUrls as &$url) {
75 75
                     $url = urldecode(route($url));
76 76
                 }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $mappingProperty->setAccessible(true);
95 95
         $value = $mappingProperty->getValue($mapping);
96 96
 
97
-        if(!empty($value)) {
97
+        if (!empty($value)) {
98 98
             $value = urldecode(route($value));
99 99
             $mappingProperty->setValue($mapping, $value);
100 100
         }
Please login to merge, or discard this patch.
src/NilPortugues/Laravel5/JSendSerializer/Mapper/Mapper.php 1 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/JSendSerializer/Mapper/MappingFactory.php 1 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.