@@ -142,7 +142,7 @@ |
||
| 142 | 142 | * @param string $cleanedVariableName |
| 143 | 143 | * @param string $currentClassName |
| 144 | 144 | * @param mixed $val |
| 145 | - * @return bool |
|
| 145 | + * @return boolean|null |
|
| 146 | 146 | */ |
| 147 | 147 | protected function includeClassProperty(array& $data, $cleanedVariableName, $currentClassName, $val) |
| 148 | 148 | { |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | protected function extractAndSetSingleDepthProperties( |
| 87 | 87 | array $data, |
| 88 | 88 | array& $breadth, |
| 89 | - \ReflectionClass& $reflection, |
|
| 89 | + \ReflectionClass & $reflection, |
|
| 90 | 90 | $object |
| 91 | 91 | ) |
| 92 | 92 | { |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | protected function extractAndSetMultipleDepthProperties( |
| 143 | 143 | array& $breadth, |
| 144 | - \ReflectionClass& $reflection, |
|
| 144 | + \ReflectionClass & $reflection, |
|
| 145 | 145 | $object |
| 146 | 146 | ) |
| 147 | 147 | { |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | if ($this->isWithinBounds()) { |
| 188 | 188 | $this->incrementCurrentDepth(); |
| 189 | 189 | |
| 190 | - $objAsArray = is_object($baseObject) ? (array)$baseObject : $baseObject; |
|
| 190 | + $objAsArray = is_object($baseObject) ? (array) $baseObject : $baseObject; |
|
| 191 | 191 | |
| 192 | 192 | if (true === SerializerFactory::canIterate($objAsArray)) { |
| 193 | 193 | $this->iterateClassProperties( |
@@ -50,8 +50,7 @@ |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | return (true === is_null($configurationKey)) ? |
| 53 | - self::$configurationData : |
|
| 54 | - self::$configurationData[$configurationKey]; |
|
| 53 | + self::$configurationData : self::$configurationData[$configurationKey]; |
|
| 55 | 54 | } |
| 56 | 55 | |
| 57 | 56 | /** |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | 'classInfo' => new SimpleClass() |
| 33 | 33 | ); |
| 34 | 34 | |
| 35 | - for ($i=0; $i<5; ++$i) { |
|
| 35 | + for ($i = 0; $i < 5; ++$i) { |
|
| 36 | 36 | $this->assocArray['position_' . $i] = $i; |
| 37 | 37 | $this->numArray[] = $i; |
| 38 | 38 | } |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | public function testConstructorWithArgumentsIsCorrectlyHandled() |
| 132 | 132 | { |
| 133 | 133 | $expected = 'This is a test string value'; |
| 134 | - $instance = new ConstructorWithArgumentsClass($expected); |
|
| 134 | + $instance = new ConstructorWithArgumentsClass($expected); |
|
| 135 | 135 | |
| 136 | 136 | $this->assertEquals($expected, $instance->__get('someValue')); |
| 137 | 137 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | |
| 119 | 119 | public function testPropertiesAreMapped() |
| 120 | 120 | { |
| 121 | - $mockedSerializedInstance = (array)$this->instance; |
|
| 121 | + $mockedSerializedInstance = (array) $this->instance; |
|
| 122 | 122 | |
| 123 | 123 | foreach ($mockedSerializedInstance as $key=>$val) { |
| 124 | 124 | $mockedSerializedInstance[str_replace('*', '', $key)] = $val; |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | $this->assertNotEquals($remappedClass, $mappedClass); |
| 153 | 153 | |
| 154 | - foreach($remappedClass as $item) { |
|
| 154 | + foreach ($remappedClass as $item) { |
|
| 155 | 155 | $this->assertTrue(in_array($item, $mappedClass)); |
| 156 | 156 | } |
| 157 | 157 | |
@@ -185,9 +185,9 @@ discard block |
||
| 185 | 185 | $this->serializer->getConfiguration() |
| 186 | 186 | ); |
| 187 | 187 | |
| 188 | - $mappedArray = (array)$mappedInstance; |
|
| 188 | + $mappedArray = (array) $mappedInstance; |
|
| 189 | 189 | |
| 190 | 190 | $this->assertArrayHasKey($expectedProperty, $mappedArray); |
| 191 | - $this->assertArrayNotHasKey('*' . $initialProperty, $mappedArray); |
|
| 191 | + $this->assertArrayNotHasKey('*' . $initialProperty, $mappedArray); |
|
| 192 | 192 | } |
| 193 | 193 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | |
| 16 | 16 | public function __construct() |
| 17 | 17 | { |
| 18 | - $this->pluginName = 'testPlugin' . uniqid(); |
|
| 18 | + $this->pluginName = 'testPlugin' . uniqid(); |
|
| 19 | 19 | parent::__construct(); |
| 20 | 20 | } |
| 21 | 21 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | * @codeCoverageIgnore |
| 4 | 4 | */ |
| 5 | 5 | call_user_func(function() { |
| 6 | - if ( ! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) { |
|
| 6 | + if (!is_file($autoloadFile = __DIR__ . '/../vendor/autoload.php')) { |
|
| 7 | 7 | throw new \RuntimeException('Did not find vendor/autoload.php. Did you run "composer install --dev"?'); |
| 8 | 8 | } |
| 9 | 9 | |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * @codeCoverageIgnore |
|
| 4 | - */ |
|
| 3 | + * @codeCoverageIgnore |
|
| 4 | + */ |
|
| 5 | 5 | call_user_func(function() { |
| 6 | 6 | if ( ! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) { |
| 7 | 7 | throw new \RuntimeException('Did not find vendor/autoload.php. Did you run "composer install --dev"?'); |
@@ -3,8 +3,6 @@ |
||
| 3 | 3 | namespace BDBStudios\BreakfastSerializerTests; |
| 4 | 4 | |
| 5 | 5 | use BDBStudios\BreakfastSerializer\Serializer; |
| 6 | -use BDBStudios\BreakfastSerializerTest\Fixtures\ComplexClass; |
|
| 7 | -use BDBStudios\BreakfastSerializerTest\Fixtures\TypeHandlers\DateTimeType; |
|
| 8 | 6 | |
| 9 | 7 | class SerializerTest extends \PHPUnit_Framework_TestCase |
| 10 | 8 | { |