src/SetterTrait.php
public function setRole($name, $description = null)
    {
        $role = $this->getRole($name) ?: $this->createRole($name);
        if ($description) {
            $role->description = $description;
        }
        $this->add($role);

        return $role;
    }
public function setRole($name, $description = null)
    {
        $role = $this->getRole($name) ?: $this->createRole($name);
        if ($description) {
            $role->description = $description;
        }
        $this->add($role);

        return $role;
    }
public function setRole ( $ name , $ description = null ) { $ role = $ this -> getRole ( $ name ) ? : $ this -> createRole ( $ name ) ; if ( $ description ) { $ role -> description = $ description ; } $ this -> add ( $ role ) ; return $ role ; }
Set role.
@param string $name
@param string $description
@return Item
Set role .