trigger = $trigger; $self->triggerValue = $trigger->trigger_value; return $self; } /** * @param RuleTrigger $trigger * @param TransactionJournal $journal */ public static function makeFromTriggerAndJournal(RuleTrigger $trigger, TransactionJournal $journal) { $self = new self; $self->trigger = $trigger; $self->triggerValue = $trigger->trigger_value; $self->journal = $journal; } /** * @param string $triggerValue * * @return AbstractTrigger */ public static function makeFromTriggerValue(string $triggerValue) { $self = new static; $self->triggerValue = $triggerValue; return $self; } }