trigger = $trigger; $this->journal = $journal; } /** * @{inheritdoc} * * @see TriggerInterface::matchesAnything * * @return bool */ public function matchesAnything() { return bccomp('0', $this->trigger->trigger_value) === 0; } /** * @return bool */ public function triggered() { $amount = $this->journal->amount_positive; $compare = $this->trigger->trigger_value; $result = bccomp($amount, $compare, 4); if ($result === 1) { // found something Log::debug($amount . ' is more than ' . $compare . '. Return true.'); return true; } // found nothing. Log::debug($amount . ' is not more than ' . $compare . '. Return false.'); return false; } }