@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
4 | - * Date: 11/21/15 |
|
5 | - * Time: 4:46 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/21/15 |
|
5 | + * Time: 4:46 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\Serializer\Drivers\Eloquent; |
12 | 12 |
@@ -122,7 +122,7 @@ |
||
122 | 122 | */ |
123 | 123 | protected static function isAllowedEloquentModelFunction($name) |
124 | 124 | { |
125 | - return false === in_array($name, self::$forbiddenFunction, true); |
|
125 | + return false === in_array($name, self::$forbiddenFunction, true); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -88,11 +88,11 @@ |
||
88 | 88 | if (\is_object($relationData)) { |
89 | 89 | //Collection with Models |
90 | 90 | foreach ($relationData as $model) { |
91 | - if(\is_object($model)) { |
|
91 | + if (\is_object($model)) { |
|
92 | 92 | $items[] = self::getModelData($serializer, $model); |
93 | 93 | } |
94 | 94 | } |
95 | - } elseif(\is_object($relationData) && $relationData instanceof Model) { |
|
95 | + } elseif (\is_object($relationData) && $relationData instanceof Model) { |
|
96 | 96 | //Single element returned. |
97 | 97 | $items[] = self::getModelData($serializer, $relationData); |
98 | 98 | } |