Commit 3b0227de authored by Matthias Larisch's avatar Matthias Larisch

fix codestyle

parent 4ebb9067
......@@ -60,8 +60,13 @@ class SeedCommand extends Command implements CustomCommandInterface
{
$rand = array_rand($this->foodsavers, $number);
if ($number === 1) return $this->foodsavers[$rand];
if (count($rand) > 0) return array_intersect_key($this->foodsavers, $rand);
if ($number === 1) {
return $this->foodsavers[$rand];
}
if (count($rand) > 0) {
return array_intersect_key($this->foodsavers, $rand);
}
return [];
}
......@@ -109,7 +114,6 @@ class SeedCommand extends Command implements CustomCommandInterface
$I->addFairteilerFollower($user2['id'], $fairteiler['id']);
$I->addFairteilerPost($userbot['id'], $fairteiler['id']);
// create users and collect their ids in a list
$this->foodsavers = [$user2['id'], $userbot['id'], $userorga['id']];
foreach (range(0, 100) as $_) {
......
......@@ -244,14 +244,13 @@ class Foodsharing extends \Codeception\Module\Db
return $params;
}
public function addRecurringPickup($store, $extra_params = [])
{
$params = array_merge([
'betrieb_id' => $store,
'dow' => $this->faker->numberBetween(0,6),
'dow' => $this->faker->numberBetween(0, 6),
'time' => $this->faker->date($format = 'H:i:s', $max = 'now'),
'fetcher' => $this->faker->numberBetween(1,8),
'fetcher' => $this->faker->numberBetween(1, 8),
], $extra_params);
$id = $this->haveInDatabase('fs_abholzeiten', $params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment