src/Permissions/AbstractPermission.php
public function matchesPermission(Permission $permission)
    {
        return (
            $this instanceof $permission &&
            $this->action === $permission->getAction() && // Not using matchesAction to avoid the wildcard
            $this->matchesResource($permission->getResource())
        );
    }
public function matchesPermission(Permission $permission)
    {
        return (
            $this instanceof $permission &&
            $this->action === $permission->getAction() && // Not using matchesAction to avoid the wildcard
            $this->matchesResource($permission->getResource())
        );
    }
public function matchesPermission ( Permission $ permission ) { return ( $ this instanceof $ permission && $ this -> action === $ permission -> getAction ( ) && // Not using matchesAction to avoid the wildcard $ this -> matchesResource ( $ permission -> getResource ( ) ) ) ; }
Determine if a permission exactly matches the current instance

@param \BeatSwitch\Lock\Permissions\Permission $permission
@return bool
Determine if a permission exactly matches the current instance