public function create(array $paths, array $ignore, array $extensions): SpecificationInterface
    {
        $pathSpec = null;
        foreach ($paths as $path) {
            $pathSpec = $this->orSpec($this->inPath($path), $pathSpec);
        }

        $ignoreSpec = null;
        if (isset($ignore['paths'])) {
            foreach ($ignore['paths'] as $path) {
                $ignoreSpec = $this->orSpec($this->inPath($path), $ignoreSpec);
            }
        }

        if (isset($ignore['hidden']) && $ignore['hidden'] === true) {
            $ignoreSpec = $this->orSpec(new IsHidden(), $ignoreSpec);
        }

        return $this->andSpec(
            $pathSpec,
            $this->andSpec(new HasExtension($extensions), $this->notSpec($ignoreSpec))
        );
    }
public function create(array $paths, array $ignore, array $extensions): SpecificationInterface
    {
        $pathSpec = null;
        foreach ($paths as $path) {
            $pathSpec = $this->orSpec($this->inPath($path), $pathSpec);
        }

        $ignoreSpec = null;
        if (isset($ignore['paths'])) {
            foreach ($ignore['paths'] as $path) {
                $ignoreSpec = $this->orSpec($this->inPath($path), $ignoreSpec);
            }
        }

        if (isset($ignore['hidden']) && $ignore['hidden'] === true) {
            $ignoreSpec = $this->orSpec(new IsHidden(), $ignoreSpec);
        }

        return $this->andSpec(
            $pathSpec,
            $this->andSpec(new HasExtension($extensions), $this->notSpec($ignoreSpec))
        );
    }
public function create ( array $ paths , array $ ignore , array $ extensions ) : SpecificationInterface { $ pathSpec = null ; foreach ( $ paths as $ path ) { $ pathSpec = $ this -> orSpec ( $ this -> inPath ( $ path ) , $ pathSpec ) ; } $ ignoreSpec = null ; if ( isset ( $ ignore [ 'paths' ] ) ) { foreach ( $ ignore [ 'paths' ] as $ path ) { $ ignoreSpec = $ this -> orSpec ( $ this -> inPath ( $ path ) , $ ignoreSpec ) ; } } if ( isset ( $ ignore [ 'hidden' ] ) && $ ignore [ 'hidden' ] === true ) { $ ignoreSpec = $ this -> orSpec ( new IsHidden ( ) , $ ignoreSpec ) ; } return $ this -> andSpec ( $ pathSpec , $ this -> andSpec ( new HasExtension ( $ extensions ) , $ this -> notSpec ( $ ignoreSpec ) ) ) ; }
Creates a SpecificationInterface object based on the ignore and extension parameters.
Creates a SpecificationInterface object based on the ignore and extension parameters .