Removes the first occurrence of value in the list and returns true on success;
otherwise returns false.

@param $value mixed
@return bool
174450
public function removeOne($value): bool
    {
        if ($this->isValidType($value) === false) {
            throw new MWrongTypeException("\$value", $this->getType(), $value);
        }

        $result = array_search($value, $this->list);

        if ($result === false) {
            throw new \OutOfBoundsException();
        }

        unset($this->list[$result]);

        return true;
    }
1083359
public function set($value): bool {
        //TODO throw exception instead?
        if (\is_int($value)) {
            $info = $this->getIndexAndMask($value);
            $i = $info["i"];
            $k = $info["k"];

            $flag = 1;
            $flag = $flag << $k;

            if (isset($this->array[$i])) {
                $this->array[$i] |= $flag;
            } else {
                $this->array[$i] = $flag;
            }
            return true;
        }
        return false;
    }
199087
public function first( $key, $value ) {
		$user_ids = $this->find( $key, $value );
		if ( empty( $user_ids ) ) {
			return false;
		}

		return reset( $user_ids );
	}
917290
public function containsValue($value): bool {
        TypeHelper::validateValue($value, $this);
        foreach ($this as $v) {
            if ($value == $v) {
                return true;
            }
        }

        return false;
    }
1182052
protected function startsWithZeros($value) {
		$value = strval($value);
		if (strlen($value)>1 && strpos($value,'0')===0 && strpos($value,'0.')!==0) {
			return true;
		}
		else {
			return false;
		}
	}
737272
function removeValueFromList(list, value) {
    for (var i = list.length - 1; i >= 0; i--) {
        if (list[i] == value) {
            return list.splice(i, 1); // remove from array
        }
    }
    return false;
}
266454
public function isRequired($value)
    {
        if (is_null($value)) {
            return false;
        } elseif (is_string($value) && $value === '') {
            return false;
        } elseif ((is_array($value) || $value instanceof Countable) && count($value) < 1) {
            return false;
        }

        return true;
    }
739517
public function clean($value)
    {
        if ($value === true || $value === false) {
            return $value;
        } elseif (is_array($value)) {
            foreach ($value as $k => $v) {
                $value[$k] = $this->clean($v);
            }
        } else {
            $value = preg_replace('/^\"|\"$/', '', $value);
            $value = stripcslashes($value);
        }

        return $value;
    }
1083679
protected function isSelected($value)
    {
        $selectedValue = $this->getSelectedValue();
        if ($value === $selectedValue || (string)$value === $selectedValue) {
            return true;
        }
        if ($this->hasArgument('multiple')) {
            if ($selectedValue === null && $this->arguments['selectAllByDefault'] === true) {
                return true;
            } elseif (is_array($selectedValue) && in_array($value, $selectedValue)) {
                return true;
            }
        }
        return false;
    }
1224479
public function removeOptionsByValue($value)
    {
        $removed_options = array();

        foreach ($this->options as $key => $control_option) {
            if ($control_option->value === $value) {
                $removed_options[] = $control_option;

                // remove from options list
                unset($this->options[$key]);

                // remove metadata
                $metadata_key = $this->getOptionMetadataKey($control_option);
                unset($this->option_metadata[$metadata_key]);
            }
        }

        return $removed_options;
    }
1060467
public function isValueValid($value) {
		return $value instanceof Type\ListItemType || $value instanceof DataType\TextType || $value instanceof Type\ThingType;
	}
327211
public function setFirst(string ...$value) : bool
        {
                return $this->_redis->lpush($this->_key, $value) > 0 ? true : false;
        }
1016607
public static function clean_vars($value){
        if(is_array($value)){
            foreach($value as $key => $val) {
                $value[$key] = self::clean_vars($val);
            }
        }
        else{
            $value= self::filter_simple_xss($value);
        }
        return $value;
    }
458133
public static function nip($value)
    {
        if (!empty($value)) {
            $weights = [6, 5, 7, 2, 3, 4, 5, 6, 7];
            $nip = preg_replace('#[\\s-]#', '', $value);

            return self::processNip($nip, $weights);
        }

        return false;
    }
407938
public function checkRequired($value)
    {
        if (is_null($value)) {
            return false;
        }

        if (is_string($value) && trim($value) === '') {
            return false;
        }

        if ((is_array($value) || $value instanceof Countable) && count($value) < 1) {
            return false;
        }

        return true;
    }
244579
public function removePrefixedKeyValues($value)
    {
        if (($pos = strrpos($value, '_')) !== false) {
            return substr($value, ($pos + 1));
        }

        return $value;
    }
947296
public function filter($value)
    {
        return true === array_key_exists((string)$value, $this->translations) ? $this->translations[$value] : null;
    }