public function resolveDependency(string $originalDependency, ?string $newDependency) : void
    {
        if ($newDependency === null) {
            return;
        }

        // we only need to resolve a dependency one time
        if (in_array($originalDependency, $this->resolvedDependencies, true)) {
            return;
        }

        $key = array_search($originalDependency, $this->depends, true);

        if ($key === false) {
            throw new LogicException(sprintf('Could not find dependency "%s" in MetaEntry for "%s"', $originalDependency, $this->file));
        }

        $this->depends[$key]          = $newDependency;
        $this->resolvedDependencies[] = $originalDependency;
    }
public function resolveDependency(string $originalDependency, ?string $newDependency) : void
    {
        if ($newDependency === null) {
            return;
        }

        // we only need to resolve a dependency one time
        if (in_array($originalDependency, $this->resolvedDependencies, true)) {
            return;
        }

        $key = array_search($originalDependency, $this->depends, true);

        if ($key === false) {
            throw new LogicException(sprintf('Could not find dependency "%s" in MetaEntry for "%s"', $originalDependency, $this->file));
        }

        $this->depends[$key]          = $newDependency;
        $this->resolvedDependencies[] = $originalDependency;
    }
public function resolveDependency ( string $ originalDependency , ? string $ newDependency ) : void { if ( $ newDependency === null ) { return ; } // we only need to resolve a dependency one time if ( in_array ( $ originalDependency , $ this -> resolvedDependencies , true ) ) { return ; } $ key = array_search ( $ originalDependency , $ this -> depends , true ) ; if ( $ key === false ) { throw new LogicException ( sprintf ( 'Could not find dependency "%s" in MetaEntry for "%s"' , $ originalDependency , $ this -> file ) ) ; } $ this -> depends [ $ key ] = $ newDependency ; $ this -> resolvedDependencies [ ] = $ originalDependency ; }
Call to replace a dependency with the resolved, real filename.
Call to replace a dependency with the resolved real filename .