Checks that array contains subset.

@param array  $subset
@param array  $array
@param bool   $strict
@param string $message
543024
public function assertArraySubset($subset, $array, $strict = false, $message = '')
    {
        parent::assertArraySubset($subset, $array, $strict, $message);
    }
572316
public static function IsSingleDepth( array $array ) : bool
   {

      if ( \count( $array ) < 1 )
      {
         return false;
      }

      foreach ( $array as $v )
      {
         if ( \is_array( $v ) && \count( $v ) > 0 )
         {
            return false;
         }
      }

      return true;

   }
87003
public function isStatusBetween($from = null, $to = null, $strict = false, $strictTo = null)
    {
        return in_array($this->status, static::getStatusBetween($from, $to, $strict, $strictTo));
    }
365317
public function whereIn($key, array $values, bool $strict = true): ArrayCollection
    {
        return $this->filter(function ($item) use ($key, $values, $strict) {
            if (!isset($item[$key])) {
                return false;
            }

            return in_array($item[$key], $values, $strict);
        });
    }
241779
public function assertArrayConstrained(array $constraints, array $array, $isStrict = true, $message = '')
    {
        Assert::assertArrayConstrained($constraints, $array, $isStrict, $message);
    }
281912
public function setMap(array $map, $strict = false)
	{
		if (!is_bool($strict))
		{
			throw new InvalidArgumentException('Argument 2 passed to ' . __METHOD__ . ' must be a boolean');
		}

		// If the map is not strict, we can optimize away the values that are identical to their key
		if (!$strict)
		{
			$map = $this->optimizeLooseMap($map);
		}

		// Sort the map so it looks tidy
		ksort($map);

		// Record this filter's variables
		$this->vars['map']    = new Dictionary($map);
		$this->vars['strict'] = $strict;

		// Evaluate safeness
		$this->resetSafeness();
		if (!empty($this->vars['strict']))
		{
			$this->evaluateSafenessInCSS();
			$this->evaluateSafenessInJS();
		}
	}
630345
public static function contains( $needle, $haystack, $strict = false )
    {
        foreach ( $haystack as $_index => $_value )
        {
            if ( is_string( $_value ) )
            {
                if ( 0 === strcasecmp( $needle, $_value ) )
                {
                    return true;
                }
            }
            else if ( in_array( $needle, $_value, $strict ) )
            {
                return true;
            }
        }

        return false;
    }
1031810
public boolean contains(RoaringBitmap subset) {
    if(subset.getCardinality() > getCardinality()) {
      return false;
    }
    final int length1 = this.highLowContainer.size;
    final int length2 = subset.highLowContainer.size;
    int pos1 = 0, pos2 = 0;
    while (pos1 < length1 && pos2 < length2) {
      final short s1 = this.highLowContainer.getKeyAtIndex(pos1);
      final short s2 = subset.highLowContainer.getKeyAtIndex(pos2);
      if (s1 == s2) {
        Container c1 = this.highLowContainer.getContainerAtIndex(pos1);
        Container c2 = subset.highLowContainer.getContainerAtIndex(pos2);
        if(!c1.contains(c2)) {
          return false;
        }
        ++pos1;
        ++pos2;
      } else if (Util.compareUnsigned(s1, s2) > 0) {
        return false;
      } else {
        pos1 = subset.highLowContainer.advanceUntil(s2, pos1);
      }
    }
    return pos2 == length2;
  }
1099701
def assert_subset(self, subset, superset, failure_message='Expected collection "{}" to be a subset of "{}'):
        
        assertion = lambda: set(subset).issubset(set(superset))
        failure_message = unicode(failure_message).format(superset, subset)
        self.webdriver_assert(assertion, failure_message)
958383
function contains(array, value) {
  for (let i = 0; i < array.length; i++) {
    if (array[i] == value) { // non-strict equality check!
      return true;
    }
  }
  return false;
}
1055474
public static function isList(array $array, $strict = false)
    {
        $isNumbers = ctype_digit(implode('', array_keys($array)));

        if (!$strict) {
            return $isNumbers;
        } elseif (!$isNumbers) {
            return false;
        }

        return array_keys($array) === range(0, count($array) - 1);
    }
314551
public function matchValues(int $values, bool $strict = false)
    {
        while (count($this->values) < $values) {
            array_push($this->values, 0);
        }

        if ($strict) {
            $this->values = array_slice($this->values, 0, $values);
        }
    }
557754
private function assertArrayValue($value, $message = null)
    {
        if (!is_array($value)) {
            return $this->failedAssert(sprintf('value is an array, got "%s".', is_object($value) ? get_class($value) : gettype($value)), $message);
        }

        return true;
    }
1001346
public <T> T[] validIndex(final T[] array, final int index, final String message) {
        notNull(array);
        if (index < 0 || index >= array.length) {
            failIndexOutOfBounds(message);
        }
        return array;
    }
990169
public static function every(array &$arr, $value, $strict = true)
    {
        $filter = function ($v) use ($value, $strict) {
            return $strict ? $v === $value : $v == $value;
        };

        return count(array_filter($arr, $filter)) === count($arr);
    }
547372
public function assertIsArrayAndNotEmpty($value, $message='%s must not be an empty Array', $exception='Asserts')
    {
        if (isset($value) === false || is_array($value) === false || (is_array($value) && count($value) <= 0)) {
            $this->throwException($exception, $message, $value);
        }
    }
1155192
public static function isEmpty($line, $strict = false)
    {
        if (!is_array($line)) {
            throw new \RuntimeException("got a string that should already have been split into an array");
        }
        $test = array_filter($line, function ($element) use ($strict) {
            return !Reader::isEmpty($element, $strict);
        });
        return empty($test);
    }