Walidacja liczb od-do
@param mixed $value wartość
@return boolean
352941
public function isValid($value)
    {
        //czy liczba
        if (!is_numeric($value)) {
            return $this->_error(self::INVALID);
        }
        //sprawdzamy dolny zakres
        if ($this->getFrom() !== null && $value < $this->getFrom()) {
            return $this->_error(self::INVALID);
        }
        //sprawdzamy górny zakres
        if ($this->getTo() !== null && $value > $this->getTo()) {
            return $this->_error(self::INVALID);
        }
        return true;
    }
726675
public function ruleValue($value = null)
    {
        if (\func_num_args() > 0) {
            if (null !== $value && $this->validateValue($value)) {
                $this->value = $value;
                $this->updateBound();

                return true;
            }
            return false;
        }
        return $this->value;
    }
221154
public static function isBooleanValue($value): bool
    {
        return is_bool($value) || self::isBooleanStringValue($value) || self::isBooleanNumericValue($value);
    }
64606
public function filter($value)
    {
        return isset($this->actionToStatusMap[$value])
            ? $this->actionToStatusMap[$value]
            : false;
    }
627331
protected function parseValue($value) {
		$value = trim($value);
		if ('' == $value) {
			//return as boolean
			return true;
		}
		return $this->valueParser->parse($value); 
	}
485665
protected function databaseValue($value)
    {
        if (is_string($value)) {
            return $value;
        }

        if (!$value instanceof BinaryValue) {
            if (!is_resource($value) && !$value instanceof StreamInterface) {
                throw ODMException::invalidValueForType('Binary', ['string', 'resource', 'StreamInterface', 'BinaryValue', 'null'], $value);
            }

            $value = \GuzzleHttp\Psr7\stream_for($value);
        }

        return (string)$value;
    }
461181
public function check($value) : bool
    {
        try {
            if (false == \DateTime::createFromFormat($this->rule, $value)) {
                return false;
            }
            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
240420
private static function isAssoc($value)
	{
		if(!is_array($value)) return false;
		return array_keys($value) !== range(0, count($value) - 1);
	}
623239
public function isValid($value)
    {
        if (!$value instanceof WorkflowDispatchEventInterface) {
            $this->error(self::VALIDATE_VALUE_INVALID);
            return false;
        }

        if (null === $this->getAllowedHttpMethods()) {
            return true;
        }

        $request = $value->getMvcEvent()->getRequest();
        if (!$request instanceof Request) {
            $this->error(self::REQUEST_INVALID);
            return false;
        }

        /** @var Request  $request*/
        $method = $request->getMethod();
        $method = strtolower($method);

        $allowedHttpMethods = $this->getAllowedHttpMethods();
        if (!array_key_exists($method, $allowedHttpMethods)) {
            $this->error(self::HTTP_METHOD_INVALID);
            return false;
        }



        return true;
    }
609213
protected function isValueDisabled($value)
	{
		$disabled = $this->disabled;
		if (is_array($disabled)) {
			return isset($disabled[ $value ]) && $disabled[ $value ];
		}
		elseif (!is_bool($disabled)) {
			return $disabled == $value;
		}

		return FALSE;
	}
1038428
public function isValid($value)
    {
        //znaki do usuniącia
        $trims = [' ', '-', '_', '.', ',', '/', '|'];
        //wielkie litery
        $tmp = strtoupper(str_replace($trims, '', $value));
        //brak pierwszego znaku
        if (!isset($tmp[0])) {
            $this->_error(self::INVALID);
            return false;
        }
        //brak kodu kraju - doklejanie
        if (is_numeric($tmp[0])) {
            $tmp = $this->getCountry() . $tmp;
        }
        //algorytm sumy kontrolnej
        $tmp = substr($tmp, 4) . substr($tmp, 0, 4);
        $tmp = str_replace([
            'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
            'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'
        ], [
            '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22',
            '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35'
        ], $tmp);
        //błąd sumy kontrolnej
        if (bcmod($tmp, 97) != 1) {
            $this->_error(self::INVALID);
            return false;
        }
        return true;
    }
159800
public static function isBooleanValue(string $value): bool
    {
        return in_array(strtolower(trim($value)), StringUtils::TRUES) || in_array(strtolower(trim($value)), StringUtils::FALSES);
    }
49556
public function containsValue($value): bool {

        /**
         * @var string $arrayIndex
         * @var SinglyLinkedList $list
         */
        foreach ($this->bucket as $arrayIndex => $list) {
            /* $list is the first element in the bucket. The bucket
             * can contain max $maxSize entries and each entry has zero
             * or one nodes which can have zero, one or multiple
             * successors.
             */
            if ($list->containsValue($value)) {
                return true;
            }
        }
        /*
         * If no bucket contains the value then return false because
         * the searched value is not in the list.
         */
        return false;
    }
1265245
public function acceptsValue($value): bool {
		switch ($this->operator) {
			case CriteriaComparator::OPERATOR_NOT_IN:
				if ($value === null) return true;
				return !$this->in($value);
			case CriteriaComparator::OPERATOR_IN:
				if ($value === null) return false;
				return !$this->in($value);
				
			case CriteriaComparator::OPERATOR_CONTAINS_NOT:
				ArgUtils::assertTrue(is_array($value));
				
				foreach ($value as $relationEntry) {
					if ($this->in($relationEntry)) return false;
				}
				
				return true;
			case CriteriaComparator::OPERATOR_CONTAINS:
				ArgUtils::assertTrue(is_array($value));
				
				foreach ($value as $relationEntry) {
					if (!$this->in($relationEntry)) return false;
				}
				
				return true;
		}
	}
1077889
private function find($value, $add = false)
    {
        $hash = self::hash($value);
        if(array_key_exists($hash, $this->objects)) {
            return true;
        }
        else if($add) {
            $this->objects[$hash] = $value;
        }
        return false;
    }
1082382
public function isValueValid($value) {
		return $value instanceof Type\ContactPoint || $value instanceof Type\Organization || $value instanceof Type\Person;
	}
770299
public function isValueValid($value) {
		return $value instanceof Type\CreativeWorkType || $value instanceof Type\ProductType || $value instanceof DataType\URLType;
	}