protected function assertDirectory($directory)
	{
		if ( !is_string($directory) || !is_dir($directory) || !file_exists($directory) ) {
			throw new \InvalidArgumentException('Directory "' . $directory . '" is invalid');
		}

		return $directory;
	}
protected function assertDirectory($directory)
	{
		if ( !is_string($directory) || !is_dir($directory) || !file_exists($directory) ) {
			throw new \InvalidArgumentException('Directory "' . $directory . '" is invalid');
		}

		return $directory;
	}
protected function assertDirectory ( $ directory ) { if ( ! is_string ( $ directory ) || ! is_dir ( $ directory ) || ! file_exists ( $ directory ) ) { throw new \ InvalidArgumentException ( 'Directory "' . $ directory . '" is invalid' ) ; } return $ directory ; }
Checks that a directory is valid.

@param string $directory Directory.

@throws \InvalidArgumentException When directory is invalid.
@return string
Checks that a directory is valid .