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