src/AssetContainer.php
protected function dependecyIsValid($asset, $dependency, $original, $assets)
    {
        if ( ! isset($original[$dependency]))
        {
            return false;
        }
        elseif ($dependency === $asset)
        {
            throw new \Exception("Asset [$asset] is dependent on itself.");
        }
        elseif (isset($assets[$dependency]) and in_array($asset, $assets[$dependency]['dependencies']))
        {
            throw new \Exception("Assets [$asset] and [$dependency] have a circular dependency.");
        }

        return true;
    }
protected function dependecyIsValid($asset, $dependency, $original, $assets)
    {
        if ( ! isset($original[$dependency]))
        {
            return false;
        }
        elseif ($dependency === $asset)
        {
            throw new \Exception("Asset [$asset] is dependent on itself.");
        }
        elseif (isset($assets[$dependency]) and in_array($asset, $assets[$dependency]['dependencies']))
        {
            throw new \Exception("Assets [$asset] and [$dependency] have a circular dependency.");
        }

        return true;
    }
protected function dependecyIsValid ( $ asset , $ dependency , $ original , $ assets ) { if ( ! isset ( $ original [ $ dependency ] ) ) { return false ; } elseif ( $ dependency === $ asset ) { throw new \ Exception ( "Asset [$asset] is dependent on itself." ) ; } elseif ( isset ( $ assets [ $ dependency ] ) and in_array ( $ asset , $ assets [ $ dependency ] [ 'dependencies' ] ) ) { throw new \ Exception ( "Assets [$asset] and [$dependency] have a circular dependency." ) ; } return true ; }
Verify that an asset's dependency is valid.
A dependency is considered valid if it exists, is not a circular reference, and is
not a reference to the owning asset itself. If the dependency doesn't exist, no
error or warning will be given. For the other cases, an exception is thrown.

@param  string $asset
@param  string $dependency
@param  array $original
@param  array $assets

@throws \Exception
@return bool
Verify that an asset s dependency is valid . A dependency is considered valid if it exists is not a circular reference and is not a reference to the owning asset itself . If the dependency doesn t exist no error or warning will be given . For the other cases an exception is thrown .