core/modules/main/MainController.php
beforeInvoke accesses the super-global variable $_GET. Open
Open
public function beforeInvoke()
{
if (isset($_GET['_route']) && substr($_GET['_route'], 0, 5) == 'admin') {
Ajde::app()->getDocument()->setLayout(new Ajde_Layout(config('layout.admin')));
}
- 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
beforeInvoke accesses the super-global variable $_GET. Open
Open
public function beforeInvoke()
{
if (isset($_GET['_route']) && substr($_GET['_route'], 0, 5) == 'admin') {
Ajde::app()->getDocument()->setLayout(new Ajde_Layout(config('layout.admin')));
}
- 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
Missing class import via use statement (line '8', column '55'). Open
Open
Ajde::app()->getDocument()->setLayout(new Ajde_Layout(config('layout.admin')));
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}