Code cleanup

This commit is contained in:
James Cole
2018-04-28 06:23:13 +02:00
parent 6f0e1c79ac
commit 13b78bdc20
218 changed files with 621 additions and 681 deletions

View File

@@ -555,37 +555,4 @@ class BillRepository implements BillRepositoryInterface
return $service->update($bill, $data);
}
/**
* @param float $amount
* @param float $min
* @param float $max
*
* @return bool
*/
protected function doAmountMatch($amount, $min, $max): bool
{
return $amount >= $min && $amount <= $max;
}
/**
* @param array $matches
* @param $description
*
* @return bool
*/
protected function doWordMatch(array $matches, $description): bool
{
$wordMatch = false;
$count = 0;
foreach ($matches as $word) {
if (!(false === strpos($description, strtolower($word)))) {
++$count;
}
}
if ($count >= count($matches)) {
$wordMatch = true;
}
return $wordMatch;
}
}