Showing 56 of 56 total issues
isLoggedIn accesses the super-global variable $_SESSION. Open
Open
public static function isLoggedIn()
{
if (isset($_SESSION['attogram_id'])
&& $_SESSION['attogram_id']
&& isset($_SESSION['AttogramUsername'])
- 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
login accesses the super-global variable $_SESSION. Open
Open
public static function login(\Psr\Log\LoggerInterface $log, \Attogram\AttogramDatabaseInterface $database)
{
if (!isset($_POST['u']) || !isset($_POST['p']) || !$_POST['u'] || !$_POST['p']) {
$log->error('LOGIN: missing username or password');
return false;
- 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
Variable $this
is undeclared Open
Open
header('Location: ' . $this->path . '/');
- Exclude checks
Call to method debug
from undeclared class \Psr\Log\LoggerInterface
Open
Open
$log->debug('LOGIN: User Logged in');
- Exclude checks
Variable $this
is undeclared Open
Open
$this->event->info(
- Exclude checks
Variable $this
is undeclared Open
Open
$this->pageHeader('👥 User Admin');
- Exclude checks
Parameter $database
has undeclared type \Attogram\AttogramDatabaseInterface
Open
Open
public static function login(\Psr\Log\LoggerInterface $log, \Attogram\AttogramDatabaseInterface $database);
- Exclude checks
Parameter $database
has undeclared type \Attogram\AttogramDatabaseInterface
Open
Open
public static function login(\Psr\Log\LoggerInterface $log, \Attogram\AttogramDatabaseInterface $database)
- Exclude checks
Call to method error
from undeclared class \Psr\Log\LoggerInterface
Open
Open
$log->error('LOGIN: Login system offline');
- Exclude checks
Possibly zero references to use statement for classlike/namespace TestCase
(\PHPUnit\Framework\TestCase)
Open
Open
use PHPUnit\Framework\TestCase;
- Exclude checks
Variable $this
is undeclared Open
Open
$this->error404('User Page Disbled. Attogram User module missing in action!');
- Exclude checks
Call to method error
from undeclared class \Psr\Log\LoggerInterface
Open
Open
$log->error('LOGIN: missing username or password');
- Exclude checks
Reference to instance property database
from undeclared class \Attogram\AttogramDatabaseInterface
Open
Open
if (!$database->database || $database->database->errorCode() != '00000') {
- Exclude checks
Variable $this
is undeclared Open
Open
$this->shutdown();
- Exclude checks
Call to method error
from undeclared class \Psr\Log\LoggerInterface
Open
Open
$log->error('LOGIN: Login system error');
- Exclude checks
Call to undeclared method \BaseTest::assertTrue
Open
Open
$this->assertTrue(true, 'true not true!');
- Exclude checks
Variable $this
is undeclared Open
Open
$this->pageFooter();
- Exclude checks
Variable $this
is undeclared Open
Open
$this->shutdown();
- Exclude checks
Variable $this
is undeclared Open
Open
$this->pageHeader('👤 User page');
- Exclude checks
Parameter $log
has undeclared type \Psr\Log\LoggerInterface
Open
Open
public static function login(\Psr\Log\LoggerInterface $log, \Attogram\AttogramDatabaseInterface $database);
- Exclude checks