/** * Parses the given source file or directory with the default tokenizer * and node builder implementations. * * @param string $testCase * @param boolean $ignoreAnnotations * @return \PDepend\Source\AST\ASTNamespace[] */ public static function parseTestCaseSource($testCase, $ignoreAnnotations = false) { list($class, $method) = explode('::', $testCase); $parts = explode('\\', $class); try { return parent::parseSource(sprintf('Metrics/%s/%s/%s.php', $parts[count($parts) - 2], substr($parts[count($parts) - 1], 0, -4), $method), $ignoreAnnotations); } catch (\Exception $e) { } return parent::parseSource(sprintf('Metrics/%s/%s/%s', $parts[count($parts) - 2], substr($parts[count($parts) - 1], 0, -4), $method), $ignoreAnnotations); }
/** * Parses the given source file or directory with the default tokenizer * and node builder implementations. * * @param string $testCase * @param boolean $ignoreAnnotations * * @return \PDepend\Source\AST\ASTNamespace[] */ public static function parseTestCaseSource($testCase, $ignoreAnnotations = false) { list($class, $method) = explode('::', $testCase); return parent::parseSource(sprintf('code/%s/%s.php', substr($class, strrpos($class, '_') + 1, -4), $method), $ignoreAnnotations); }