* use php-cs-fixer instead of phpcodesniffer * updated scrutinizer config * adjusted code yules to all files * updated CONTRIBUTING guidelines
This commit is contained in:
@@ -37,7 +37,7 @@ class RateCalculator implements CalculatorInterface
|
||||
*/
|
||||
public function calculate(Timesheet $record)
|
||||
{
|
||||
if ($record->getEnd() === null) {
|
||||
if (null === $record->getEnd()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ class RateCalculator implements CalculatorInterface
|
||||
protected function calculateRate(Timesheet $record)
|
||||
{
|
||||
$hourlyRate = (float) $record->getUser()->getPreferenceValue(UserPreference::HOURLY_RATE, 0);
|
||||
|
||||
return (float) $hourlyRate * ($record->getDuration() / 3600);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user