protected function _subjects($path) {
		if (is_file($path)) {
			$current = new SplFileInfo($path);
			return $current->getExtension() === 'php' ? array($current) : array();
		}
		$files = new RecursiveCallbackFilterIterator(
			new RecursiveDirectoryIterator($path),
			function($current, $key, $iterator) {
				$noDescend = array(
					'.git',
					'libraries',
					'vendor'
				);
				if ($iterator->hasChildren()) {
					if ($current->isDir() && in_array($current->getBasename(), $noDescend)) {
						return false;
					}
					return true;
				}
				if ($current->isFile()) {
					return $current->getExtension() === 'php';
				}
				return false;
			}
		);
		return iterator_to_array(new RecursiveIteratorIterator($files));
	}
protected function _subjects($path) {
		if (is_file($path)) {
			$current = new SplFileInfo($path);
			return $current->getExtension() === 'php' ? array($current) : array();
		}
		$files = new RecursiveCallbackFilterIterator(
			new RecursiveDirectoryIterator($path),
			function($current, $key, $iterator) {
				$noDescend = array(
					'.git',
					'libraries',
					'vendor'
				);
				if ($iterator->hasChildren()) {
					if ($current->isDir() && in_array($current->getBasename(), $noDescend)) {
						return false;
					}
					return true;
				}
				if ($current->isFile()) {
					return $current->getExtension() === 'php';
				}
				return false;
			}
		);
		return iterator_to_array(new RecursiveIteratorIterator($files));
	}
protected function _subjects ( $ path ) { if ( is_file ( $ path ) ) { $ current = new SplFileInfo ( $ path ) ; return $ current -> getExtension ( ) === 'php' ? array ( $ current ) : array ( ) ; } $ files = new RecursiveCallbackFilterIterator ( new RecursiveDirectoryIterator ( $ path ) , function ( $ current , $ key , $ iterator ) { $ noDescend = array ( '.git' , 'libraries' , 'vendor' ) ; if ( $ iterator -> hasChildren ( ) ) { if ( $ current -> isDir ( ) && in_array ( $ current -> getBasename ( ) , $ noDescend ) ) { return false ; } return true ; } if ( $ current -> isFile ( ) ) { return $ current -> getExtension ( ) === 'php' ; } return false ; } ) ; return iterator_to_array ( new RecursiveIteratorIterator ( $ files ) ) ; }
Retrieves subjects. Will return only PHP files.

@param string $path
@return array Returns an array of SplFieldInfo objects.
Retrieves subjects . Will return only PHP files .