/** * {@inheritdoc} */ public function patch(Log $log, array $patch) { $operation = new Callback(function () use($log, $patch) { return $this->client->patch($log, $patch); }); $this->operationRunner->run($operation); return $operation->getResult(); }
/** * {@inheritdoc} */ public function create() { $log = $this->client->create(TreeLog::fromNode(new Container())); return $this->from($log); }
/** * {@inheritdoc} */ public function updateStatus($status) { $patch = ['status' => $status, $status . 'At' => (new \DateTime())->format(\DateTime::ISO8601)]; $this->log = $this->client->patch($this->log, $patch); return $this; }
/** * @When I archive the log */ public function iArchiveTheLog() { $this->log = $this->client->archive($this->log); }