Showing 443 of 443 total issues
set_flash accesses the super-global variable $_SESSION. Open
Open
function set_flash(array $input)
{
$has_flash = !isset($_SESSION['_flash']) || !is_array($_SESSION['_flash']);
$flash = $has_flash ? $_SESSION['_flash'] : [];
- 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
gc_session accesses the super-global variable $_SESSION. Open
Open
function gc_session()
{
$now = time();
$_SESSION['login'] = isset($_SESSION['login']) ? $_SESSION['login'] : [];
- 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
gc_session accesses the super-global variable $_SESSION. Open
Open
function gc_session()
{
$now = time();
$_SESSION['login'] = isset($_SESSION['login']) ? $_SESSION['login'] : [];
- 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
Call to method required
from undeclared class \Dotenv\Dotenv
Open
Open
$dotenv->required('MY_PHP_ENV');
- Exclude checks
Parameter $router
has undeclared type ?\Teto\Routing\Router
Open
Open
function router(Router $router = null)
- Exclude checks
Parameter $action
has undeclared type \Teto\Routing\Action
Open
Open
$routes['acct'] = ['GET', '/acct/:acct', function (Action $action) {
- Exclude checks
Reference to instance property param
from undeclared class \Teto\Routing\Action
Open
Open
$acct_input = $action->param['acct'];
- Exclude checks
Possibly zero references to use statement for classlike/namespace v
(\Respect\Validation\Validator)
Open
Open
use Respect\Validation\Validator as v;
- Exclude checks
Call to method __construct
from undeclared class \Whoops\Run
Open
Open
$whoops = new \Whoops\Run;
- Exclude checks
Call to method __construct
from undeclared class \Dotenv\Dotenv
Open
Open
$dotenv = new Dotenv\Dotenv(dirname(__DIR__));
- Exclude checks
Doc-block of $router
in router
is phpdoc param type \Teto\Routing\Router
which is not a permitted replacement of the nullable param type ?\Teto\Routing\Router
declared in the signature ('?T' should be documented as 'T|null' or '?T') Open
Open
* @param Router $router
- Exclude checks
Return type of app_log()
is undeclared type \Monolog\Logger
Open
Open
function app_log()
- Exclude checks
Call to method info
from undeclared class \Monolog\Logger
Open
Open
chrome_log()->info('session', $_SESSION);
- Exclude checks
Call to method makePath
from undeclared class \Teto\Routing\Router
Open
Open
$callback_url = app\get_service_base_url(router()->makePath('auth_callback'));
- Exclude checks
Call to method __construct
from undeclared class \Monolog\Logger
Open
Open
$logger = new \Monolog\Logger('');
- Exclude checks
Call to method __construct
from undeclared class \Monolog\Handler\NoopHandler
Open
Open
$handler = is_production() ? new NoopHandler : new ChromePHPHandler(Logger::INFO);
- Exclude checks
Parameter $action
has undeclared type \Teto\Routing\Action
Open
Open
$routes['license'] = ['GET', '/license', function (Action $action) {
- Exclude checks
Parameter $action
has undeclared type \Teto\Routing\Action
Open
Open
$routes['post_login'] = ['POST', '/login', function (Action $action) {
- Exclude checks
Call to method __construct
from undeclared class \Monolog\Handler\StreamHandler
Open
Open
$logger->pushHandler(new StreamHandler($fp, Logger::INFO, true, null, true));
- Exclude checks
Doc-block of $flash
in last_flash
is phpdoc param type array
which is not a permitted replacement of the nullable param type ?array
declared in the signature ('?T' should be documented as 'T|null' or '?T') Open
Open
* @param array $flash
- Exclude checks