src/Alg/UnusedVariableFinder.php
public function getUnusedVars( $method = NULL )
	{
		$list	= array();
		if( !strlen( $method = trim( $method ) ) )
		{
			foreach( $this->methods as $method => $data )
				if( ( $vars = $this->getUnusedVars( $method ) ) )
					$list[$method]	= $vars;
			return $list;
		}
		if( !array_key_exists( $method, $this->methods ) )
			throw new InvalidArgumentException( 'Method "'.$method.'" not found' );
		foreach( $this->getVariables( $method ) as $var => $data )
			$data ? NULL : $list[]	= $var;
		return $list;
	}
public function getUnusedVars( $method = NULL )
	{
		$list	= array();
		if( !strlen( $method = trim( $method ) ) )
		{
			foreach( $this->methods as $method => $data )
				if( ( $vars = $this->getUnusedVars( $method ) ) )
					$list[$method]	= $vars;
			return $list;
		}
		if( !array_key_exists( $method, $this->methods ) )
			throw new InvalidArgumentException( 'Method "'.$method.'" not found' );
		foreach( $this->getVariables( $method ) as $var => $data )
			$data ? NULL : $list[]	= $var;
		return $list;
	}
public function getUnusedVars ( $ method = NULL ) { $ list = array ( ) ; if ( ! strlen ( $ method = trim ( $ method ) ) ) { foreach ( $ this -> methods as $ method => $ data ) if ( ( $ vars = $ this -> getUnusedVars ( $ method ) ) ) $ list [ $ method ] = $ vars ; return $ list ; } if ( ! array_key_exists ( $ method , $ this -> methods ) ) throw new InvalidArgumentException ( 'Method "' . $ method . '" not found' ) ; foreach ( $ this -> getVariables ( $ method ) as $ var => $ data ) $ data ? NULL : $ list [ ] = $ var ; return $ list ; }
Returns an Array of Methods and their unused Variables.
@access		public
@param		string		$method			Optional: Method to get unused Variables for.
@return		array
Returns an Array of Methods and their unused Variables .