public function addValue(string $value, ?string $usergroup = null): void
    {
        if (array_key_exists($usergroup, $this->getAllValues())) {
            throw new DuplicateValueForUsergroupException($this->getKey(), $usergroup);
        }

        $this->values[$usergroup] = DataHelper::checkForEmptyValue('propertyValue', $value);
    }
public function addValue(string $value, ?string $usergroup = null): void
    {
        if (array_key_exists($usergroup, $this->getAllValues())) {
            throw new DuplicateValueForUsergroupException($this->getKey(), $usergroup);
        }

        $this->values[$usergroup] = DataHelper::checkForEmptyValue('propertyValue', $value);
    }
public function addValue ( string $ value , ? string $ usergroup = null ) : void { if ( array_key_exists ( $ usergroup , $ this -> getAllValues ( ) ) ) { throw new DuplicateValueForUsergroupException ( $ this -> getKey ( ) , $ usergroup ) ; } $ this -> values [ $ usergroup ] = DataHelper :: checkForEmptyValue ( 'propertyValue' , $ value ) ; }
Add a value to the property element.

@SuppressWarnings(PHPMD.StaticAccess)
@param string $value The value to add to the property element.
@param string|null $usergroup The usergroup of the property value.
Add a value to the property element .