DataSource/WpciQuery.php
protected function wpQuery(): WpQuery
    {
        $hashDecoratedObject = spl_object_hash($this->decoratedWpQuery);
        $globalObject = spl_object_hash(Core::get(WpQuery::class));

        if ($hashDecoratedObject === $globalObject) {
            $this->wpProvider->wpResetQuery();
        }

        return $this->decoratedWpQuery;
    }
protected function wpQuery(): WpQuery
    {
        $hashDecoratedObject = spl_object_hash($this->decoratedWpQuery);
        $globalObject = spl_object_hash(Core::get(WpQuery::class));

        if ($hashDecoratedObject === $globalObject) {
            $this->wpProvider->wpResetQuery();
        }

        return $this->decoratedWpQuery;
    }
protected function wpQuery ( ) : WpQuery { $ hashDecoratedObject = spl_object_hash ( $ this -> decoratedWpQuery ) ; $ globalObject = spl_object_hash ( Core :: get ( WpQuery :: class ) ) ; if ( $ hashDecoratedObject === $ globalObject ) { $ this -> wpProvider -> wpResetQuery ( ) ; } return $ this -> decoratedWpQuery ; }
Right way to get current and correct query object
@return WpQuery
@throws \Exception
@throws \Error
Right way to get current and correct query object