for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Install GitHub App
<?php
namespace Backpack\CRUD\app\Library\Database;
use Illuminate\Database\Query\Builder;
class QueryBuilder extends Builder
{
/**
* Run the query as a "select" statement against the connection.
*
* @return array
*/
protected function runSelect()
$query = base64_encode(json_encode([$this->toSql() => $this->getBindings()]));
if (app('crud')->hasQuery($query)) {
return app('crud')->getQuery($query);
app('crud')->getQuery($query)
Backpack\CRUD\app\Librar...l\CrudPanel::getQuery()
This check looks for function or method calls that always return null and whose return value is used.
class A { function getObject() { return null; } } $a = new A(); if ($a->getObject()) {
The method getObject() can return nothing but null, so it makes no sense to use the return value.
getObject()
The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.
return app('crud')->getQuery($query)
void
array
}
$result = parent::runSelect();
app('crud')->saveQuery($query, $result);
return $result;
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.