コード例 #1
0
ファイル: Transaction.php プロジェクト: Nickstr/Teller
 public static function createNew($date, $name, $from, $to, $code, $amount, $description)
 {
     return new static(Id::generate(), Date::fromString($date), Account::withName($name, $to), Account::fromNumber($from), Code::fromString($code), Amount::fromString($amount), Description::fromString($description));
 }
コード例 #2
0
ファイル: Account.php プロジェクト: Nickstr/Teller
 public static function fromNumber($from)
 {
     return new static(Id::generate(), null, $from);
 }
コード例 #3
0
ファイル: Category.php プロジェクト: Nickstr/Teller
 public static function createNew($title, $type)
 {
     return new static(Id::generate(), $title, $type);
 }