Skip to content

Commit

Permalink
removed a static method on QueryBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauro Cassani committed Jan 8, 2018
1 parent 311db3a commit e94cf78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions src/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e94cf78

Please sign in to comment.