target, -1) === '/' ) { $type = 'Folder'; } else { $type = 'File'; } $this->apply = $type::$method($this->target, ...$parameters); return $this; } /** * Target File * * @param string $target * * @return Document */ public function target(string $target) : Document { $this->target = $target; return $this; } /** * Apply changes * * @return mixed */ public function apply() { return $this->apply ?? false; } }