src/Permission/PermissionGroup.php
public function addPermission($key, $callable = null)
    {
        if (null !== $callable) {
            $permission = new Permission($callable);
            $permission->key($key);

            $this->permissionList->put($key, $permission);
        } else {
            $permission = new Permission();

            $permission->key($key);
            $this->permissionList->put($key, $permission);
        }

        return $permission;
    }
public function addPermission($key, $callable = null)
    {
        if (null !== $callable) {
            $permission = new Permission($callable);
            $permission->key($key);

            $this->permissionList->put($key, $permission);
        } else {
            $permission = new Permission();

            $permission->key($key);
            $this->permissionList->put($key, $permission);
        }

        return $permission;
    }
public function addPermission ( $ key , $ callable = null ) { if ( null !== $ callable ) { $ permission = new Permission ( $ callable ) ; $ permission -> key ( $ key ) ; $ this -> permissionList -> put ( $ key , $ permission ) ; } else { $ permission = new Permission ( ) ; $ permission -> key ( $ key ) ; $ this -> permissionList -> put ( $ key , $ permission ) ; } return $ permission ; }
Add Permission to a group

@param string $key
@param callable $callable
@return \AvoRed\Framework\Permission\Permission $permission
Add Permission to a group