Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return the current element in an array
Alias pos
<?php current(array|object $array): mixed
<?php         $field = 'answer';



        if (is_array($rules) && ! array_is_list($rules)) {

            [$field, $rules] = [key($rules), current($rules)];

        }



        return $this->getPromptValidatorInstance(
<?php         $this->assertEquals('Post B', $postB->title, 'Expect `Post B` is the result of the second query');



        $this->assertCount(1, $result->items(), 'Expect cursor paginated query should have 1 result');

        $this->assertEquals('Post B', current($result->items())->title, 'Expect the paginated query would return `Post B`');

    }



    public function testPaginationWithMultipleAliases()
<?php         $this->assertSame(['alias'], $result->getOptions()['parameters']);



        $this->assertCount(1, $result->items(), 'Expect cursor paginated query should have 1 result');

        $this->assertEquals('B (post)', current($result->items())->alias, 'Expect the paginated query would return `B (post)`');

    }



    public function testPaginationWithAliasedOrderBy()