src/SetterTrait.php
public function setPermission($name, $description = null)
    {
        $permission = $this->getPermission($name) ?: $this->createPermission($name);
        if ($description) {
            $permission->description = $description;
        }
        $this->add($permission);

        return $permission;
    }
public function setPermission($name, $description = null)
    {
        $permission = $this->getPermission($name) ?: $this->createPermission($name);
        if ($description) {
            $permission->description = $description;
        }
        $this->add($permission);

        return $permission;
    }
public function setPermission ( $ name , $ description = null ) { $ permission = $ this -> getPermission ( $ name ) ? : $ this -> createPermission ( $ name ) ; if ( $ description ) { $ permission -> description = $ description ; } $ this -> add ( $ permission ) ; return $ permission ; }
Set permission.
@param string $name
@param string $description
@return Item
Set permission .