diff options
Diffstat (limited to 'tests/Unit/FactoryMuffin.php')
-rw-r--r-- | tests/Unit/FactoryMuffin.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/Unit/FactoryMuffin.php b/tests/Unit/FactoryMuffin.php index 50e92c7f..48ba9696 100644 --- a/tests/Unit/FactoryMuffin.php +++ b/tests/Unit/FactoryMuffin.php @@ -5,8 +5,7 @@ namespace OCA\Polls\Tests\Unit; use League\FactoryMuffin\FactoryMuffin as OriginalFactoryMuffin; use OCP\AppFramework\Db\Entity; -class FactoryMuffin extends OriginalFactoryMuffin -{ +class FactoryMuffin extends OriginalFactoryMuffin { /** * Generate and set the model attributes. * NOTE: Patch the original method to support dynamic setter and getter @@ -17,12 +16,11 @@ class FactoryMuffin extends OriginalFactoryMuffin * * @return void */ - protected function generate($model, array $attr = []) - { + protected function generate($model, array $attr = []) { foreach ($attr as $key => $kind) { $value = $this->factory->generate($kind, $model, $this); - $setter = 'set'.ucfirst(static::camelize($key)); + $setter = 'set' . ucfirst(static::camelize($key)); // check if there is a setter and use it instead if ($model instanceof Entity && is_callable([$model, $setter])) { $model->$setter($value); |