diff --git a/src/QueryBuilder.php b/src/QueryBuilder.php index 5e698c0..f10bf26 100644 --- a/src/QueryBuilder.php +++ b/src/QueryBuilder.php @@ -211,7 +211,7 @@ public function getResults() { $results = $this->applySortingFilter($this->applyLimitFilter($this->applyCriteriaFilter($this->applyJoinFilter()))); - return array_map([$this, 'castElementToArray'], $results); + return array_map([ArrayConverter::class, 'convertToPlainArray'], $results); } /** @@ -317,15 +317,6 @@ private function applyCriteriaFilter(array $array) return $results; } - /** - * @param $element - * @return array - */ - private function castElementToArray($element) - { - return ArrayConverter::convertToPlainArray($element); - } - /** * @return int */ diff --git a/tests/QueryBuilderTest.php b/tests/QueryBuilderTest.php index 152aeab..2c4a888 100644 --- a/tests/QueryBuilderTest.php +++ b/tests/QueryBuilderTest.php @@ -668,7 +668,7 @@ public function it_should_get_results_from_a_query_with_aliases() /** * @test */ - public function it_should_get_a_single_result_from_a_query() + public function it_should_get_the_first_result_from_a_query() { foreach ($this->usersArrays as $array) { $qb = QueryBuilder::create($array);