/** * @{inheritDoc} */ public function collect() { $this->codex = $codex = codex(); $project = $codex->projects->getActive(); return ['version' => $codex->getVersion(), 'project' => $project ? $project->getName() : '', 'ref' => $project ? $project->getRef() : '', 'document' => $this->document ? $this->document->getPath() : '', 'data' => $this->data->transform(function ($item) { if (!is_string($item)) { $item = $this->getDataFormatter()->formatVar($item); } return $item; })->toArray()]; }
protected function addInformationalAttributes(Document $document) { $document->getFiles()->lastModified($document->getPath()); }