Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 9561746

Browse files
alexlongshawben-challis
authored andcommitted
Add hasSeed to the Lifetime entity (#1)
* Add hasSeed to the Lifetime entity * Update Lifetime hadSeed to PHP7
1 parent 2d80f4b commit 9561746

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/Entity/Lifetime.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,4 +183,15 @@ public function getSeed(string $name, int $numberOfValues, array $weights = null
183183

184184
return $seed->getValue();
185185
}
186+
187+
public function hasSeed(string $name): bool
188+
{
189+
foreach ($this->seeds as $seed) {
190+
if ($seed->getName() === $name) {
191+
return true;
192+
}
193+
}
194+
195+
return false;
196+
}
186197
}

0 commit comments

Comments
 (0)