checks if given value is countable

@param   mixed  $value
@return  bool
976626
private function isCountable($value): bool
    {
        return is_string($value) || is_array($value) || $value instanceof \Countable || $value instanceof \Traversable;
    }
1125063
public static function minCount($value, int $minCount): bool
    {
        if (!static::isCountable($value)) {
            return false;
        }

        return count($value) >= $minCount;
    }
301865
public function count($value)
    {
        if (is_array($value) === true || $value instanceof Countable) {
            return count($value);
        } elseif ($value instanceof IteratorAggregate) {
            // Note: getIterator() returns a Traversable, not an Iterator
            // thus rewind() and valid() methods may not be present
            return iterator_count($value->getIterator());
        } elseif ($value instanceof Iterator) {
            if ($value instanceof Generator) {
                return 1;
            }
            return iterator_count($value);
        } elseif ($value instanceof PDOStatement) {
            return $value->rowCount();
        } elseif ($value instanceof Traversable) {
            return iterator_count($value);
        } elseif ($value instanceof ArrayAccess) {
            if ($value->offsetExists(0)) {
                return 1;
            }
        } elseif (is_object($value)) {
            return count($value);
        }
        return 0;
    }
1060467
public function isValueValid($value) {
		return $value instanceof Type\ListItemType || $value instanceof DataType\TextType || $value instanceof Type\ThingType;
	}
211448
public static function isArrayable($value)
    {
        if ($value instanceof ManagesItemsInterface
            || $value instanceof ManagesItemsTrait
            || $value instanceof Traversable
            || is_array($value)
        ) {
            return true;
        }
        return false;
    }
1070158
public function contains($value): bool
    {
        return \in_array($value, $this->items, (is_scalar($value) ? false : true));
    }
37326
public static function IsNativeType( $value ) : bool
   {

      return (
            \is_bool(   $value ) ||
            \is_int(    $value ) ||
            \is_string( $value ) ||
            \is_double( $value ) ||
            \is_float(  $value ) ||
            \is_array(  $value )
      );

   }
950210
public function isValueValid($value) {
		return $value instanceof DataType\BooleanType || $value instanceof DataType\NumberType || $value instanceof Type\StructuredValueType || $value instanceof DataType\TextType;
	}
593835
public function isValueValid($value) {
		return $value instanceof DataType\TextType || $value instanceof Type\ThingType || $value instanceof DataType\URLType;
	}
87985
public function isAssignableFromValue($value)
    {
        if (!is_object($value))
            return false;

        if (get_class($value) === $this->getName())
            return true;

        return is_subclass_of($value, $this->className);
    }
788224
public function isValueValid($value) {
		return $value instanceof Type\ListItem || $value instanceof DataType\TextType || $value instanceof Type\Thing;
	}
795106
public function checkDigits($value, $count)
    {

        if (is_numeric($value)) {
            $value = "$value";
        }

        if (!Type::isStringLike($value)) {
            return false;
        }

        return ! preg_match('/[^0-9]/', "$value")
            && strlen("$value") == $count;
    }
1164582
private function isPrimitive($value): bool {
		return (is_string($value)
			|| is_int($value)
			|| is_float($value)
			|| is_bool($value)
			|| is_null($value)
			|| ($value instanceof PhpConstant));
	}
957567
public static function isSelected($value, $valueObject)
    {
        if(is_array($value) && count($value) > 0)
        {
            return in_array($valueObject, $value);
        }

        if($value instanceof Collection)
        {
            foreach($value as $v)
            {
                if($v->getKey() === $valueObject)
                {
                    return true;
                }
            }
            return false;
        }
        elseif($value === $valueObject)
        {
            return true;
        }
        return false;
    }
828646
public function isAssignableFromValue($value)
    {
        if (!is_array($value))
            return false;
        foreach ($value as $key => $item)
        {
            if (!$this->itemType->isAssignableFromValue($item))
                return false;
            if (!$this->keyType->isAssignableFromValue($key))
                return false;
        }
        return true;
    }
604478
public function isValueValid($value) {
		return $value instanceof DataType\NumberType || $value instanceof Type\PriceSpecificationType || $value instanceof DataType\TextType;
	}
523508
public function contains($value): bool
    {
        if (null === $value) {
            return false;
        }

        if ($this->belowMinBorder($value)) {
            return false;
        }

        return !$this->aboveMaxBorder($value);
    }