src/FS/Folder/MethodSortCheck.php
public function checkOrder()
	{
		$this->count	= 0;
		$this->found	= 0;
		$this->files	= array();
		$extensions		= implode( "|", $this->extensions );
		$pattern		= "@^[A-Z].*\.(".$extensions.")$@";
		$filter			=  new FS_File_RecursiveRegexFilter( $this->path, $pattern );
		foreach( $filter as $entry )
		{
			if( preg_match( "@^(_|\.)@", $entry->getFilename() ) )
				continue;
			$this->count++;
			$check	= new FS_File_PHP_MethodSortCheck( $entry->getPathname() );
			if( $check->compare() )
				continue;
			$this->found++;
			$list1	= $check->getOriginalList();
			$list2	= $check->getSortedList();
			do{
				$line1 = array_shift( $list1 );
				$line2 = array_shift( $list2 );
				if( $line1 != $line2 )
					break;
			}
			while( count( $list1 ) && count( $list2 ) );
			$fileName	= substr( $entry->getPathname(), strlen( $this->path ) + 1 );
			$this->files[$entry->getPathname()]	= array(
				'fileName'	=> $fileName,
				'pathName'	=> $entry->getPathname(),
				'original'	=> $line1,
				'sorted'	=> $line2,
			);
		}
		return !$this->found;
	}
public function checkOrder()
	{
		$this->count	= 0;
		$this->found	= 0;
		$this->files	= array();
		$extensions		= implode( "|", $this->extensions );
		$pattern		= "@^[A-Z].*\.(".$extensions.")$@";
		$filter			=  new FS_File_RecursiveRegexFilter( $this->path, $pattern );
		foreach( $filter as $entry )
		{
			if( preg_match( "@^(_|\.)@", $entry->getFilename() ) )
				continue;
			$this->count++;
			$check	= new FS_File_PHP_MethodSortCheck( $entry->getPathname() );
			if( $check->compare() )
				continue;
			$this->found++;
			$list1	= $check->getOriginalList();
			$list2	= $check->getSortedList();
			do{
				$line1 = array_shift( $list1 );
				$line2 = array_shift( $list2 );
				if( $line1 != $line2 )
					break;
			}
			while( count( $list1 ) && count( $list2 ) );
			$fileName	= substr( $entry->getPathname(), strlen( $this->path ) + 1 );
			$this->files[$entry->getPathname()]	= array(
				'fileName'	=> $fileName,
				'pathName'	=> $entry->getPathname(),
				'original'	=> $line1,
				'sorted'	=> $line2,
			);
		}
		return !$this->found;
	}
public function checkOrder ( ) { $ this -> count = 0 ; $ this -> found = 0 ; $ this -> files = array ( ) ; $ extensions = implode ( "|" , $ this -> extensions ) ; $ pattern = "@^[A-Z].*\.(" . $ extensions . ")$@" ; $ filter = new FS_File_RecursiveRegexFilter ( $ this -> path , $ pattern ) ; foreach ( $ filter as $ entry ) { if ( preg_match ( "@^(_|\.)@" , $ entry -> getFilename ( ) ) ) continue ; $ this -> count ++ ; $ check = new FS_File_PHP_MethodSortCheck ( $ entry -> getPathname ( ) ) ; if ( $ check -> compare ( ) ) continue ; $ this -> found ++ ; $ list1 = $ check -> getOriginalList ( ) ; $ list2 = $ check -> getSortedList ( ) ; do { $ line1 = array_shift ( $ list1 ) ; $ line2 = array_shift ( $ list2 ) ; if ( $ line1 != $ line2 ) break ; } while ( count ( $ list1 ) && count ( $ list2 ) ) ; $ fileName = substr ( $ entry -> getPathname ( ) , strlen ( $ this -> path ) + 1 ) ; $ this -> files [ $ entry -> getPathname ( ) ] = array ( 'fileName' => $ fileName , 'pathName' => $ entry -> getPathname ( ) , 'original' => $ line1 , 'sorted' => $ line2 , ) ; } return ! $ this -> found ; }
Indicates whether all Methods in all Files are ordered correctly.
@access		public
@return		bool
Indicates whether all Methods in all Files are ordered correctly .