Inspekt\Inspekt::getDir PHP Method

getDir() public static method

Returns dirname(value).
public static getDir ( mixed $value ) : mixed
$value mixed
return mixed
    public static function getDir($value)
    {
        if (Inspekt::isArrayOrArrayObject($value)) {
            return Inspekt::walkArray($value, 'getDir');
        } else {
            return dirname($value);
        }
    }

Usage Example

Beispiel #1
0
 /**
  * Generated from @assert ('/usr/lib/php/Pear.php') === '/usr/lib/php'.
  */
 public function testGetDir()
 {
     $this->assertSame('/usr/lib/php', Inspekt::getDir('/usr/lib/php/Pear.php'));
 }