src/Role/Role.php
public function addPermission(
        UUID $uuid,
        Permission $permission
    ) {
        if (!in_array($permission, $this->permissions)) {
            $this->apply(new PermissionAdded($uuid, $permission));
        }
    }
public function addPermission(
        UUID $uuid,
        Permission $permission
    ) {
        if (!in_array($permission, $this->permissions)) {
            $this->apply(new PermissionAdded($uuid, $permission));
        }
    }
public function addPermission ( UUID $ uuid , Permission $ permission ) { if ( ! in_array ( $ permission , $ this -> permissions ) ) { $ this -> apply ( new PermissionAdded ( $ uuid , $ permission ) ) ; } }
Add a permission to the role.

@param UUID $uuid
@param Permission $permission
Add a permission to the role .