Test if key isset in either Object or Array

@param  Object|array $actValue
@param  string $key
@return boolean|string
328763
protected function issetInObjectOrArray($actValue, $key)
    {
        if (is_object($actValue) && property_exists($actValue, $key)) {
            return $actValue->$key;
        }
        if (isset($actValue[$key])) {
            return $actValue[$key];
        }

        return false;
    }
1247335
private function hasValueAtKey($key, $data)
    {
        $keys = explode('.', $key);

        while (count($keys) > 0) {
            $key = array_shift($keys);

            // Wildcard Key
            if (preg_match($this->wildcards, $key) && is_array($data) && ! empty($data)) {
                // Shift the first item of the array
                if (preg_match('/^:(index|item)\[\d+\]$/', $key)) {
                    for ($x = substr($key, 7, -1); $x >= 0; $x--) {
                        if (empty($data)) {
                            return false;
                        }
                        $item = array_shift($data);
                    }
                } elseif ($key == ':last') {
                    $item = array_pop($data);
                } else {
                    $item = array_shift($data);
                }
                $data =& $item;
            } else {
                if ( ! isset($data[$key])) {
                    return false;
                }

                if (is_bool($data[$key])) {
                    return true;
                }

                if ($data[$key] === '') {
                    return false;
                }

                $data =& $data[$key];
            }
        }
        return true;
    }
1163195
protected static function array_key_exists( $key, $array, $useIsset = false )
    {
        if ( !is_array( $key ) )
        {
            $key = array($key);
        }

        foreach ( $key as $_key )
        {
            if ( ( $useIsset && isset( $array[$_key] ) ) || array_key_exists( $_key, $array ) )
            {
                return $_key;
            }
        }

        return false;
    }
445624
public static function has($array, $key)
    {
        if (empty($array) || null === $key) {
            return false;
        }

        if (array_key_exists($key, $array)) {
            return true;
        }

        foreach (explode('.', $key) as $segment) {
            if ((\is_array($array) && array_key_exists($segment, $array)) || ($array instanceof \ArrayAccess && $array->offsetExists($segment))) {
                $array = $array[$segment];
            } else {
                return false;
            }
        }

        return true;
    }
604513
public function hasAction(int $actionValue): bool
    {
        $count = $this
            ->filter(function (Action $action) use ($actionValue) {
                return $action->action() === $actionValue;
            })
            ->count();

        return $count > 0 ? true : false;
    }
274487
function __isset($key) {
        if (!is_string($key)) {
            throw new \Calf\Exception\InvalidArgument('Key must be string.');
        }

        return isset($this->_keys[$key]);
    }
511140
function isKey(value, object) {
  if (isArray_1(value)) {
    return false;
  }
  var type = typeof value;
  if (type == 'number' || type == 'symbol' || type == 'boolean' ||
      value == null || isSymbol_1(value)) {
    return true;
  }
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
    (object != null && value in Object(object));
}
457704
public function item($code, Array $data) : Bool
    {
        if( empty(Properties::$items) )
        {
            return false;
        }

        $i = 0;

        foreach( Properties::$items as $row )
        {
            if( is_array($code) )
            {
                if(isset($row[key($code)]) && $row[key($code)] == current($code))
                {
                    $code = $row[key($code)];
                }
            }

            $key = array_search($code,$row);

            if( ! empty($key) )
            {
                array_splice(Properties::$items, $i, 1);

                if( count($data) !== count($row) )
                {
                    foreach( $data as $k => $v )
                    {
                        $row[$k] = $v;
                    }

                    array_push(Properties::$items, $row);
                }
                else
                {
                    array_push(Properties::$items, $data);
                }
            }

            $i++;
        }

        return $this->driver->insert($this->key, Properties::$items);
    }
943691
public static function assertArrayHasKeyValuePair(
        $expectedKey, $expectedValue, $actual, $message='') {
          Assert::assertThat(
            $actual,
            new ArrayHasKeyValuePair($expectedKey, $expectedValue),
            $message);
    }
1005396
protected function has($key)
    {
        if (!is_array($key)) {
            return (array_key_exists($key, $this->item));
        }

        foreach ($key as $value) {
            if (!array_key_exists($value, $this->item)) {
                return false;
            }
        }

        return true;
    }
555210
public function optionalItem($key, $defaultValue = null)
    {
        if (!$this->hasItem($key)) {
            return $defaultValue;
        }

        return $this->getItem($key);
    }
432936
private function assertKeysArrayValid($keys = null)
    {
        if ((!$keys) ||
            (!is_array($keys)) ||
            (!isset($keys['auth'])) || 
            (!is_array($keys['auth'])) ||
            (!isset($keys['auth']['req'])) || 
            (!is_array($keys['auth']['req'])) ||
            (!isset($keys['auth']['opt'])) || 
            (!is_array($keys['auth']['opt'])) ||
            (!isset($keys['args'])) || 
            (!is_array($keys['args'])) ||
            (!isset($keys['args']['req'])) || 
            (!is_array($keys['auth']['req'])) ||
            (!isset($keys['args']['opt'])) || 
            (!is_array($keys['auth']['opt']))
        ) {
            $msg = 'Invalid API keys provided. (HINT: Each '
                 . 'API class must define a $keys array with '
                 . 'specific key requirements. (HINT: View an /Api/[file] '
                 . 'for an example.)';
            throw new ApiException($msg);
        }
    }
180804
public function has($key, $getExpr = false)
    {
        foreach ($this->options as $option) {
            if (is_array($option)) {
                if (! strcasecmp($key, $option['name'])) {
                    return $getExpr ? $option['expr'] : $option['value'];
                }
            } elseif (! strcasecmp($key, $option)) {
                return true;
            }
        }

        return false;
    }
1085712
function __isset($key)
    {
        $isset = false;
        try {
            $isset = (parent::__get($key) !== null);
        } catch(\Exception $e) { }

        return $isset;
    }
314583
public static function popValue($key, array &$array, $defaultValue = null)
    {
        $value = self::getValue($key, $array, $defaultValue);
        unset($array[$key]);
        return $value;
    }
467646
protected function traverse($key, $returnValue = true)
    {
        $value = $this->values;
        foreach (explode('.', $key) as $part) {
            if (!array_key_exists($part, $value)) {
                return false;
            }
            $value = $value[$part];
        }
        return $returnValue ? $value : true;
    }
823573
function has( $key ) {
            $cache_entry = $this->_options->get_option( $key, false );

            return ( is_object( $cache_entry ) &&
                     isset( $cache_entry->timestamp ) &&
                     is_numeric( $cache_entry->timestamp )
            );
        }