public function __construct($inventory, $slot, Item $targetItem, $achievements = [], $transactionType = Transaction::TYPE_NORMAL) { $this->inventory = $inventory; $this->slot = (int) $slot; $this->targetItem = clone $targetItem; $this->creationTime = microtime(true); $this->transactionType = $transactionType; $this->achievements = $achievements; }