app/Debug/DebugBar/DebugBar.php
Avoid using static access to class '\App\Layout' in method 'loadScripts'. Open
Open
return $this->getJavascriptRenderer(\App\Layout::getPublicUrl('vendor/maximebf/debugbar/src/DebugBar/Resources'))->renderHead();
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Reference to undeclared property \App\Debug\DebugBar\DebugBar->jsRenderer
Open
Open
return $this->jsRenderer;
- Exclude checks
Call with 3 arg(s) to \App\Debug\DebugBar\JavascriptRenderer::__construct()
which only takes 0 arg(s) defined at /code/app/Debug/DebugBar/JavascriptRenderer.php:17
Open
Open
$this->jsRenderer = new JavascriptRenderer($this, $baseUrl, $basePath);
- Exclude checks
Reference to undeclared property \App\Debug\DebugBar\DebugBar->jsRenderer
Open
Open
$this->jsRenderer = new JavascriptRenderer($this, $baseUrl, $basePath);
- Exclude checks
Call to undeclared method \App\Debug\DebugBar\JavascriptRenderer::renderHead
Open
Open
return $this->getJavascriptRenderer(\App\Layout::getPublicUrl('vendor/maximebf/debugbar/src/DebugBar/Resources'))->renderHead();
- Exclude checks
Reference to undeclared property \App\Debug\DebugBar\DebugBar->jsRenderer
Open
Open
if (null === $this->jsRenderer) {
- Exclude checks
Reference to undeclared property \App\Debug\DebugBar\DebugBar->jsRenderer
Open
Open
$this->jsRenderer->disableVendor('jquery');
- Exclude checks
Reference to undeclared property \App\Debug\DebugBar\DebugBar->jsRenderer
Open
Open
$this->jsRenderer->setOptions([
- Exclude checks
Class extends undeclared class \DebugBar\DebugBar
(Did you mean class \App\Debug\DebugBar\DebugBar) Open
Open
class DebugBar extends \DebugBar\DebugBar
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->jsRenderer->setOptions([
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->jsRenderer;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Renders the html to include needed assets.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if (null === $this->jsRenderer) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->jsRenderer->disableVendor('jquery');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return JavascriptRenderer
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
'enable_jquery_noconflict' => false,
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Returns a JavascriptRenderer for this instance.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Line exceeds 120 characters; contains 136 characters Open
Open
return $this->getJavascriptRenderer(\App\Layout::getPublicUrl('vendor/maximebf/debugbar/src/DebugBar/Resources'))->renderHead();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return void
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param string $baseUrl
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @param string $basePath
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$this->jsRenderer = new JavascriptRenderer($this, $baseUrl, $basePath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function loadScripts()
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public function getJavascriptRenderer($baseUrl = null, $basePath = null)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $this->getJavascriptRenderer(\App\Layout::getPublicUrl('vendor/maximebf/debugbar/src/DebugBar/Resources'))->renderHead();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks