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\Exceptions;
class BackpackProRequiredException extends \Exception
{
/**
* Render the exception into an HTTP response.
*
* @param \Illuminate\Http\Request
* @return \Illuminate\Http\Response
*/
public function render($request)
$request
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function render(/** @scrutinizer ignore-unused */ $request)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
// 0, by default, pass only what is a feature we construct the rest of the message
// 1 use the provided message in full
switch ($this->getCode()) {
case 0:
$this->message = $this->message.' is a Backpack PRO feature. Please purchase and install the Backpack\PRO addon from backpackforlaravel.com';
break;
}
return abort(500, $this->getMessage(), ['developer-error-exception']);
abort(500, $this->getMes...oper-error-exception'))
null
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 abort(500, $this-...oper-error-exception'))
void
Illuminate\Http\Response
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.