protected function checkPath($path) { if (!in_array($path, $this->getPathTemplates())) { throw new InvalidArgumentException("{$path} don't exist in {$this->specFile}"); } }