Decrease a value of the property
Property will be created if not exists

@param  string $property
@param  int    $value
@return int
197660
public function dec($property, $value = 1) {
		if (isset($this->_data[$property])) {
			$this->_data[$property] -= $value;
		} else {
			$this->_data[$property] =- $value;
		}
		
		$this->_changed[$property] = true;
		
		return $this->_data[$property];
	}
957112
public function remove($property)
    {
        if (!array_key_exists($property, $this->data)) {
            throw new InvalidArgumentException(sprintf('Property %s does not exist', $property));
        }

        $value = $this->data[$property];
        unset($this->data[$property]);

        return $value;
    }
1021788
public function offsetSet($property, $value)
	{
		if(!isset($property))
			return $this->list[] = $value;
		
		return $this->list[$property] = $value;
	}
657833
protected  function unlockSpecialProperty($property, $value)
    {
        if (array_key_exists($property, $this->specialProperties)) {
            return $this->specialProperties[$property]($value);
        }

        return $value;
    }
1015569
public function set(string $property, $value, $calculateMissing = true, $sanitizeSign = false)
    {
        $property = $this->translateProperty($property);

        $this->validateProperty($property);

        switch ($property) {
            case 'defaultType':
                $value = strtolower($value);

                if (!in_array($value, [static::GROSS, static::NET])) {
                    throw new InvalidArgumentException("defaultType invalid");
                }
                break;

            case 'taxPercent':
                if ($value < 0 || $value >= 100) {
                    throw new InvalidArgumentException("taxPercent invalid");
                }

                $this->{'taxRate'} = $value / 100 + 1;
                break;

            case 'taxRate':
                if ($value < 1 || $value >= 2) {
                    throw new InvalidArgumentException("taxRate invalid");
                }

                $this->{'taxPercent'} = $value * 100 - 100;
                break;

            case 'gross';
            case 'net';
            case 'tax';
                if ($sanitizeSign && $this->has('defaultType')) {
                    $defaultType = $this->getDefaultType();
                    if ($property != $defaultType && $this->has($defaultType)) {
                        if ($value < 0 != $this->get($defaultType) < 0) {
                            $value *= -1;
                        }
                    }
                }
                break;
        }

        $this->{$property} = $value;
        if (is_numeric($value)) {
            $this->calculate($calculateMissing);
        }

        return $this;
    }
256949
public function trimProperty(string $propertyValue)
    {
        switch ($propertyValue) {
            case 'true':
                $propertyValue = true;

                break;
            case 'false':
                $propertyValue = false;

                break;
            default:
                $propertyValue = trim($propertyValue);

                break;
        }

        return $propertyValue;
    }
1332195
public function set($property, $value)
    {
        if ($this->_convert) {
            $property = str_replace( "_", "-", $property );
        } else {
            $property = str_replace( "-", "_", $property );
        }

        $this->_values[$property] = $value;
    }
151906
public function set($property, $value = null)
    {
        if (is_string($property) && $value != '') {
            $property = [$property => $value];
        }

        foreach ($property as $name => $value) {
            $this->properties[$name] = $value;
        }

        return $this;
    }
802448
public function def($property, $default = null)
	{
		$value = $this->get($property, $default);
		return $this->set($property, $value);
	}
267355
public function decrement($key, $value = 1)
    {
        return $this->connection()->decrby($this->prefix.$key, $value);
    }
39878
public function set(string $property, $value)
    {
        $this->validateProperty($property);

        // Note: do not round here!
        $old = 0;
        foreach (array_keys($this->perTaxRate) as $percent) {
            $old += $this->perTaxRate[$percent][$property];
        }

        if ($old) {
            $this->changeToFactor($value / $old);
        }

        return $this;
    }
1022532
protected function validateValue($property, $value)
    {
        $type = $this->getType($property);
        if (!$type) {
            $this->stdErr->writeln("Property not writable: <error>$property</error>");

            return false;
        }
        $valid = true;
        $message = '';
        // @todo find out exactly how these should best be validated
        $selectedEnvironment = $this->getSelectedEnvironment();
        switch ($property) {
            case 'parent':
                if ($selectedEnvironment->id === 'master') {
                    $message = "The master environment cannot have a parent";
                    $valid = false;
                } elseif ($value === $selectedEnvironment->id) {
                    $message = "An environment cannot be the parent of itself";
                    $valid = false;
                } elseif (!$parentEnvironment = $this->api()->getEnvironment($value, $this->getSelectedProject())) {
                    $message = "Environment not found: <error>$value</error>";
                    $valid = false;
                } elseif ($parentEnvironment->parent === $selectedEnvironment->id) {
                    $valid = false;
                }
                break;
        }
        switch ($type) {
            case 'boolean':
                $valid = in_array($value, ['1', '0', 'false', 'true']);
                break;
        }
        if (!$valid) {
            if ($message) {
                $this->stdErr->writeln($message);
            } else {
                $this->stdErr->writeln("Invalid value for <error>$property</error>: $value");
            }

            return false;
        }

        return true;
    }
702440
public function set($property, $value = null)
	{
		if (is_array($property))
		{
			foreach ($property as $p => $v)
			{
				$this->set($p, $v);
			}
			return $this;
		}

		$this->values[$property] = $value;

		return $this;
	}
620158
public function decrement($key, $value = 1)
    {
        return $this->incrementOrDecrement($key, $value, function ($current, $value) {
            return $current - $value;
        });
    }
572048
public function set($property, $value)
    {
        switch ($property) {
            case "day_entry":
                $this->_dayEntry = $value;
            break;
            case "hours_for_previously_running_timer":
                $this->_hoursForPrevious = $value;
            break;
            default:
                return null;
            break;
        }
    }
983811
public static function assignStaticProperty($class, $property, $value)
    {
        $refl = new \ReflectionClass($class);
        $prop = $refl->getProperty($property);
        $prop->setAccessible(true);
        $prop->setValue($value);

        return $value;
    }
453156
public function formatPropertyValue($value, string $property) : string
    {
        $valueOutput = (string) $value;

        switch ($this->propertyHolder->getPropertyType($property)) {
            case PropertyHolder::TYPE_STRING:
                $valueOutput = trim((string) $value);

                break;
            case PropertyHolder::TYPE_BOOLEAN:
                if (true === $value || 'true' === $value) {
                    $valueOutput = 'true';
                } elseif (false === $value || 'false' === $value) {
                    $valueOutput = 'false';
                } else {
                    $valueOutput = '';
                }

                break;
            case PropertyHolder::TYPE_IN_ARRAY:
                try {
                    $valueOutput = $this->propertyHolder->checkValueInArray($property, (string) $value);
                } catch (\InvalidArgumentException $ex) {
                    $valueOutput = '';
                }

                break;
            default:
                // nothing t do here
                break;
        }

        if ('unknown' === $valueOutput) {
            $valueOutput = '';
        }

        return '"' . str_replace('"', '""', $valueOutput) . '"';
    }