%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home2/vacivi36/code/vendor/rector/rector/packages/Skipper/
Upload File :
Create Path :
Current File : //home2/vacivi36/code/vendor/rector/rector/packages/Skipper/Fnmatcher.php

<?php

declare (strict_types=1);
namespace Rector\Skipper;

final class Fnmatcher
{
    public function match(string $matchingPath, string $filePath) : bool
    {
        $normalizedMatchingPath = $this->normalizePath($matchingPath);
        $normalizedFilePath = $this->normalizePath($filePath);
        if (\fnmatch($normalizedMatchingPath, $normalizedFilePath)) {
            return \true;
        }
        // in case of relative compare
        return \fnmatch('*/' . $normalizedMatchingPath, $normalizedFilePath);
    }
    private function normalizePath(string $path) : string
    {
        return \str_replace('\\', '/', $path);
    }
}

Zerion Mini Shell 1.0