@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | if ($constraint->multiple) { |
| 19 | 19 | $set = (array) array_rand($options, mt_rand(1, count($options))); |
| 20 | - $set = array_map(function ($el) use ($options) { |
|
| 20 | + $set = array_map(function($el) use ($options) { |
|
| 21 | 21 | return $options[$el]; |
| 22 | 22 | }, $set); |
| 23 | 23 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | |
| 33 | 33 | public function findAllBy($class) |
| 34 | 34 | { |
| 35 | - $result = array_filter($this->annotations, function ($a) use ($class) { |
|
| 35 | + $result = array_filter($this->annotations, function($a) use ($class) { |
|
| 36 | 36 | return $a instanceof $class; |
| 37 | 37 | }); |
| 38 | 38 | |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | return null; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - protected function filterByGroup($asserts, ?string $group = null){ |
|
| 39 | - if(is_null($group)){ |
|
| 38 | + protected function filterByGroup($asserts, ?string $group = null) { |
|
| 39 | + if (is_null($group)) { |
|
| 40 | 40 | return $asserts; |
| 41 | 41 | } |
| 42 | 42 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | public function __construct($args = []) |
| 38 | 38 | { |
| 39 | - foreach($args as $k=>$v){ |
|
| 39 | + foreach ($args as $k=>$v) { |
|
| 40 | 40 | $this->{$k} = $v; |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -76,8 +76,8 @@ |
||
| 76 | 76 | if (is_array($dataOrFaker)) { |
| 77 | 77 | foreach ($dataOrFaker as $k => $v) { |
| 78 | 78 | |
| 79 | - if($k == 'groups'){ |
|
| 80 | - $v = (array)$v; |
|
| 79 | + if ($k == 'groups') { |
|
| 80 | + $v = (array) $v; |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $this->$k = $v; |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | return array_shift($annotations); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - $result = array_filter($annotations, function ($item) use ($group) { |
|
| 83 | + $result = array_filter($annotations, function($item) use ($group) { |
|
| 84 | 84 | return !empty($item->configuration->groups) && in_array($group, $item->configuration->groups); |
| 85 | 85 | }); |
| 86 | 86 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | $locale = $locale ?? Factory::DEFAULT_LOCALE; |
| 29 | 29 | |
| 30 | - if(empty($this->generators[$locale])){ |
|
| 30 | + if (empty($this->generators[$locale])) { |
|
| 31 | 31 | $this->generators[$locale] = $this->instantiate($locale); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - protected function instantiate($locale = null){ |
|
| 46 | + protected function instantiate($locale = null) { |
|
| 47 | 47 | return Factory::create($locale ?? Factory::DEFAULT_LOCALE); |
| 48 | 48 | } |
| 49 | 49 | |