Renamed hasSource function

This commit is contained in:
Kevin Frantz 2018-12-29 23:04:06 +01:00
parent 4465f2016d
commit e221e835d1

View File

@ -33,9 +33,9 @@ final class RightChecker implements RightCheckerInterface
return $allSourcesToWhichRightApplies; return $allSourcesToWhichRightApplies;
} }
private function hasSource(SourceInterface $source): bool private function hasClientSource(SourceInterface $clientSource): bool
{ {
return $this->getAllSourcesToWhichRightApplies()->contains($source); return $this->getAllSourcesToWhichRightApplies()->contains($clientSource);
} }
private function isLayerEqual(string $layer): bool private function isLayerEqual(string $layer): bool
@ -60,6 +60,6 @@ final class RightChecker implements RightCheckerInterface
public function isGranted(string $layer, string $type, SourceInterface $source): bool public function isGranted(string $layer, string $type, SourceInterface $source): bool
{ {
return $this->isLayerEqual($layer) && $this->isTypeEqual($type) && $this->hasSource($source) && $this->checkPermission(); return $this->isLayerEqual($layer) && $this->isTypeEqual($type) && $this->hasClientSource($source) && $this->checkPermission();
} }
} }