$value) { $this->$key = $value; } $this->call = $this->formatCall(); $this->shortPath = $this->file ? str_replace($basePath, '', $this->file) : null; $this->vendor = ($this->file && strpos($this->file, $vendorPath) === 0) ? explode(DIRECTORY_SEPARATOR, str_replace($vendorPath, '', $this->file))[0] : null; } protected function formatCall() { if ($this->class) { return "{$this->class}{$this->type}{$this->function}()"; } else { return "{$this->function}()"; } } }