Completed
Pull Request — master (#672)
by Tortue
12:32
created
tests/Unit/FactoryMuffin.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         foreach ($attr as $key => $kind) {
23 23
             $value = $this->factory->generate($kind, $model, $this);
24 24
 
25
-            $setter = 'set'.ucfirst(static::camelize($key));
25
+            $setter = 'set' . ucfirst(static::camelize($key));
26 26
             // check if there is a setter and use it instead
27 27
             if ($model instanceof Entity && is_callable([$model, $setter])) {
28 28
                 $model->$setter($value);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@  discard block
 block discarded – undo
5 5
 use League\FactoryMuffin\FactoryMuffin as OriginalFactoryMuffin;
6 6
 use OCP\AppFramework\Db\Entity;
7 7
 
8
-class FactoryMuffin extends OriginalFactoryMuffin
9
-{
8
+class FactoryMuffin extends OriginalFactoryMuffin {
10 9
     /**
11 10
      * Generate and set the model attributes.
12 11
      * NOTE: Patch the original method to support dynamic setter and getter
@@ -17,8 +16,7 @@  discard block
 block discarded – undo
17 16
      *
18 17
      * @return void
19 18
      */
20
-    protected function generate($model, array $attr = [])
21
-    {
19
+    protected function generate($model, array $attr = []) {
22 20
         foreach ($attr as $key => $kind) {
23 21
             $value = $this->factory->generate($kind, $model, $this);
24 22
 
Please login to merge, or discard this patch.