|
@@ -183,7 +183,7 @@ discard block |
|
|
block discarded – undo |
|
183
|
183
|
$values = $reverse ? array_values(array_diff($all, $values)) : $values; |
|
184
|
184
|
} |
|
185
|
185
|
|
|
186
|
|
- return array_map(static function ($id) use ($property) { |
|
|
186
|
+ return array_map(static function($id) use ($property) { |
|
187
|
187
|
return 'id' === $property ? static::create($id) : static::from($property, $id); |
|
188
|
188
|
}, $values); |
|
189
|
189
|
} |
|
@@ -244,11 +244,11 @@ discard block |
|
|
block discarded – undo |
|
244
|
244
|
|
|
245
|
245
|
foreach ($reflection->getReflectionConstants() as $reflectionConstant) { |
|
246
|
246
|
if (false === $reflectionConstant->isPrivate()) { |
|
247
|
|
- throw new LogicException(sprintf('Constant "%s" of class "%s" must be private by design.', $reflectionConstant->getName(), static::class, )); |
|
|
247
|
+ throw new LogicException(sprintf('Constant "%s" of class "%s" must be private by design.', $reflectionConstant->getName(), static::class,)); |
|
248
|
248
|
} |
|
249
|
249
|
|
|
250
|
250
|
if (!is_int($reflectionConstant->getValue())) { |
|
251
|
|
- throw new LogicException(sprintf('Constants "%s" of class "%s" must be type of integer by design.', $reflectionConstant->getName(), static::class, )); |
|
|
251
|
+ throw new LogicException(sprintf('Constants "%s" of class "%s" must be type of integer by design.', $reflectionConstant->getName(), static::class,)); |
|
252
|
252
|
} |
|
253
|
253
|
} |
|
254
|
254
|
|
|
@@ -258,11 +258,11 @@ discard block |
|
|
block discarded – undo |
|
258
|
258
|
self::$properties[static::class][$property->getName()] = $property; |
|
259
|
259
|
|
|
260
|
260
|
if ($property->isPublic()) { |
|
261
|
|
- throw new LogicException(sprintf('Property "%s" of class "%s" must be private or protected by design.', $property->getName(), static::class, )); |
|
|
261
|
+ throw new LogicException(sprintf('Property "%s" of class "%s" must be private or protected by design.', $property->getName(), static::class,)); |
|
262
|
262
|
} |
|
263
|
263
|
|
|
264
|
264
|
if (!$property->isStatic()) { |
|
265
|
|
- throw new LogicException(sprintf('Property "%s" of class "%s" must be static by design.', $property->getName(), static::class, )); |
|
|
265
|
+ throw new LogicException(sprintf('Property "%s" of class "%s" must be static by design.', $property->getName(), static::class,)); |
|
266
|
266
|
} |
|
267
|
267
|
|
|
268
|
268
|
if (array_values($constants) !== array_keys($property->getValue())) { |