src/FS/File/PHP/Check/MethodOrder.php
public function compare()
	{
		$this->compared	= TRUE;
		$content	= file_get_contents( $this->fileName );
		$content	= preg_replace( "@/\*.+\*/@sU", "", $content );
		$lines		= explode( "\n", $content );
		foreach( $lines as $line )
		{
			if( preg_match( "@^(#|//)@", trim( $line ) ) )
				continue;
			$matches	= array();
			preg_match_all( "@function\s*([a-z]\S+)\s*\(@i", $line, $matches, PREG_SET_ORDER );
			foreach( $matches as $match )
				$this->originalList[] = $match[1];
		}
		$this->sortedList	= $this->originalList;
		natCaseSort( $this->sortedList );
		return $this->sortedList === $this->originalList;
	}
public function compare()
	{
		$this->compared	= TRUE;
		$content	= file_get_contents( $this->fileName );
		$content	= preg_replace( "@/\*.+\*/@sU", "", $content );
		$lines		= explode( "\n", $content );
		foreach( $lines as $line )
		{
			if( preg_match( "@^(#|//)@", trim( $line ) ) )
				continue;
			$matches	= array();
			preg_match_all( "@function\s*([a-z]\S+)\s*\(@i", $line, $matches, PREG_SET_ORDER );
			foreach( $matches as $match )
				$this->originalList[] = $match[1];
		}
		$this->sortedList	= $this->originalList;
		natCaseSort( $this->sortedList );
		return $this->sortedList === $this->originalList;
	}
public function compare ( ) { $ this -> compared = TRUE ; $ content = file_get_contents ( $ this -> fileName ) ; $ content = preg_replace ( "@/\*.+\*/@sU" , "" , $ content ) ; $ lines = explode ( "\n" , $ content ) ; foreach ( $ lines as $ line ) { if ( preg_match ( "@^(#|//)@" , trim ( $ line ) ) ) continue ; $ matches = array ( ) ; preg_match_all ( "@function\s*([a-z]\S+)\s*\(@i" , $ line , $ matches , PREG_SET_ORDER ) ; foreach ( $ matches as $ match ) $ this -> originalList [ ] = $ match [ 1 ] ; } $ this -> sortedList = $ this -> originalList ; natCaseSort ( $ this -> sortedList ) ; return $ this -> sortedList === $ this -> originalList ; }
Indicates whether all methods are in correct order.
@access		public
@return		bool
Indicates whether all methods are in correct order .