public function getError() { $parentError = parent::getError(); if (is_null($parentError)) { foreach ($this->skillArray as $skill) { if (0 == strcasecmp(self::VERIFIED, $skill)) { return NULL; } } // else return "line " . $this->index . " has no #VERIFIED tag"; } return $parentError; }
/** * Parse file into section * * @return array * @throws \PHPUnit_Framework_Exception */ private function parse($fileName) { $sections = array(); $section = ''; foreach ($this->fileWorker->file($fileName) as $line) { if (preg_match('/^--([_A-Z]+)--/', $line, $result)) { $section = $result[1]; $sections[$section] = ''; continue; } elseif (empty($section)) { throw new \PHPUnit_Framework_Exception('Invalid ZEPT file'); } $sections[$section] .= $section === 'INI' ? $line . "\n" : $line; } return $sections; }