for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Magister\Services\Database\Query\Processors;
use Magister\Services\Database\Query\Builder;
/**
* Class Processor.
*/
class Processor
{
* Process the selected results.
*
* @param \Magister\Services\Database\Query\Builder $builder
* @param array $results
* @return array
public function process(Builder $builder, $results)
$builder
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
if (!isset($results) || is_string($results) || isset($results['Fouttype'])) {
return [];
}
if (array_has($results, 'Items') || array_has($results, 'items')) {
return reset($results);
foreach ($results as $result) {
if (!is_array($result)) {
return [$results];
return $results;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.