Puli\Manager\Api\Repository\PathMapping::isConflicting PHP Method

isConflicting() public method

The method {@link load()} needs to be called before calling this method, otherwise an exception is thrown.
See also: PathMappingState::CONFLICT
public isConflicting ( ) : boolean
return boolean Returns `true` if the state is {@link PathMappingState::CONFLICT}.
    public function isConflicting()
    {
        if (null === $this->state) {
            throw new NotLoadedException('The mapping is not loaded.');
        }
        return PathMappingState::CONFLICT === $this->state;
    }

Usage Example

Beispiel #1
0
 public function testRemoveConflictIgnoresUnknownConflicts()
 {
     $mapping = new PathMapping('/path', 'resources');
     $mapping->load($this->package1, $this->packages);
     $conflict = new PathConflict('/path/conflict');
     $mapping->removeConflict($conflict);
     $this->assertCount(0, $mapping->getConflicts());
     $this->assertCount(0, $conflict->getMappings());
     $this->assertFalse($mapping->isConflicting());
 }
All Usage Examples Of Puli\Manager\Api\Repository\PathMapping::isConflicting