src/Providers/WordpressServiceProvider.php
addSidebarSupport accesses the super-global variable $GLOBALS. Open
Open
public function addSidebarSupport()
{
collect(config('sidebars'))->each(function ($value) {
register_sidebar(array_merge([
'name' => '',
- Read upRead up
- Exclude checks
Superglobals
Since: 0.2
Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.
Example
class Foo {
public function bar() {
$name = $_POST['foo'];
}
}
Source
Multi-line function call not indented correctly; expected 8 spaces but found 16 Open
Open
true)['extra']['wordpress-install-dir'] . '/');
- Exclude checks
Closing parenthesis of a multi-line function call must be on a line by itself Open
Open
true)['extra']['wordpress-install-dir'] . '/');
- Exclude checks
Opening parenthesis of a multi-line function call must be the last content on the line Open
Open
define('WP_PATH', json_decode(file_get_contents($this->app->basePath() . DIRECTORY_SEPARATOR . 'composer.json'),
- Exclude checks