Puli\Manager\Repository\RepositoryManagerImpl::hasPathMappings PHP Method

hasPathMappings() public method

public hasPathMappings ( Webmozart\Expression\Expression $expr = null )
$expr Webmozart\Expression\Expression
    public function hasPathMappings(Expression $expr = null)
    {
        $this->assertMappingsLoaded();
        if (!$expr) {
            return !$this->mappings->isEmpty();
        }
        foreach ($this->mappings->toArray() as $mappingsByModule) {
            foreach ($mappingsByModule as $mapping) {
                if ($expr->evaluate($mapping)) {
                    return true;
                }
            }
        }
        return false;
    }

Usage Example

 public function testHasNoPathMappings()
 {
     $this->initDefaultManager();
     $this->assertFalse($this->manager->hasPathMappings());
 }