src/FS/Folder/SyntaxChecker.php
public function checkFolder( $pathName, $verbose = FALSE )
	{
		$counter	= 0;
		$invalid	= array();
		$clock		= new Alg_Time_Clock;
		$this->failures	= array();
		$index		= new FS_Folder_RecursiveRegexFilter( $pathName, "@\.".self::$phpExtension."$@" );
		foreach( $index as $file )
		{
			$counter++;
			$fileName	= $file->getPathname();
			$shortName	= substr( $fileName, strlen( $pathName) );
			$valid		= $this->checker->checkFile( $file->getPathname() );
			if( !$valid )
				$invalid[$fileName]	= $error	= $this->checker->getShortError();
			if( $verbose )
				remark( $shortName.": ".( $valid ? "valid." : $error ) );
		}
		if( $verbose )
			$this->printResults( $invalid, $counter, $clock->stop( 0, 1 ) );
		$result	= array(
			'numberFiles'	=> $counter,
			'numberErrors'	=> count( $invalid ),
			'listErrors'	=> $invalid,
		);
		return $result;
	}
public function checkFolder( $pathName, $verbose = FALSE )
	{
		$counter	= 0;
		$invalid	= array();
		$clock		= new Alg_Time_Clock;
		$this->failures	= array();
		$index		= new FS_Folder_RecursiveRegexFilter( $pathName, "@\.".self::$phpExtension."$@" );
		foreach( $index as $file )
		{
			$counter++;
			$fileName	= $file->getPathname();
			$shortName	= substr( $fileName, strlen( $pathName) );
			$valid		= $this->checker->checkFile( $file->getPathname() );
			if( !$valid )
				$invalid[$fileName]	= $error	= $this->checker->getShortError();
			if( $verbose )
				remark( $shortName.": ".( $valid ? "valid." : $error ) );
		}
		if( $verbose )
			$this->printResults( $invalid, $counter, $clock->stop( 0, 1 ) );
		$result	= array(
			'numberFiles'	=> $counter,
			'numberErrors'	=> count( $invalid ),
			'listErrors'	=> $invalid,
		);
		return $result;
	}
public function checkFolder ( $ pathName , $ verbose = FALSE ) { $ counter = 0 ; $ invalid = array ( ) ; $ clock = new Alg_Time_Clock ; $ this -> failures = array ( ) ; $ index = new FS_Folder_RecursiveRegexFilter ( $ pathName , "@\." . self :: $ phpExtension . "$@" ) ; foreach ( $ index as $ file ) { $ counter ++ ; $ fileName = $ file -> getPathname ( ) ; $ shortName = substr ( $ fileName , strlen ( $ pathName ) ) ; $ valid = $ this -> checker -> checkFile ( $ file -> getPathname ( ) ) ; if ( ! $ valid ) $ invalid [ $ fileName ] = $ error = $ this -> checker -> getShortError ( ) ; if ( $ verbose ) remark ( $ shortName . ": " . ( $ valid ? "valid." : $ error ) ) ; } if ( $ verbose ) $ this -> printResults ( $ invalid , $ counter , $ clock -> stop ( 0 , 1 ) ) ; $ result = array ( 'numberFiles' => $ counter , 'numberErrors' => count ( $ invalid ) , 'listErrors' => $ invalid , ) ; return $ result ; }
Checks Syntax of all PHP Files within a given Folder and returns collected Information as Array.
For Console you can set 'verbose' to TRUE and you will see the Progress and the Results printed out.
@access		public
@param		string		$pathName		Path to Folder to check within
@param		bool		$verbose		Flag: active Output of Progress and Results
@return		array
Checks Syntax of all PHP Files within a given Folder and returns collected Information as Array . For Console you can set verbose to TRUE and you will see the Progress and the Results printed out .