src/Path.php
protected function hasContentForKey($key, $content): bool
    {
        if ($content instanceof Treadable) {
            return $content->hasChildForKey($key);
        }

        if (is_array($content) || $content instanceof \ArrayAccess) {
            return isset($content[$key]);
        }

        if (is_object($content)) {
            return property_exists($content, $key);
        }

        return false;
    }
protected function hasContentForKey($key, $content): bool
    {
        if ($content instanceof Treadable) {
            return $content->hasChildForKey($key);
        }

        if (is_array($content) || $content instanceof \ArrayAccess) {
            return isset($content[$key]);
        }

        if (is_object($content)) {
            return property_exists($content, $key);
        }

        return false;
    }
protected function hasContentForKey ( $ key , $ content ) : bool { if ( $ content instanceof Treadable ) { return $ content -> hasChildForKey ( $ key ) ; } if ( is_array ( $ content ) || $ content instanceof \ ArrayAccess ) { return isset ( $ content [ $ key ] ) ; } if ( is_object ( $ content ) ) { return property_exists ( $ content , $ key ) ; } return false ; }
Returns true if and only if the content provided has content at the key provided.

@param mixed $key The key we are going to tread down.
@param mixed $content The content we are going to look through for the return content.
@return bool True if and only if the content provided has content at the key provided.
Returns true if and only if the content provided has content at the key provided .