Function SessionRead
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method SessionRead
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
Method SessionWrite
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function SessionWrite($strSessionId, $strSessionData) {
if (empty($strSessionData)) {
static::SessionDestroy($strSessionId);
return true;
}
Function SessionWrite
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static function SessionWrite($strSessionId, $strSessionData) {
if (empty($strSessionData)) {
static::SessionDestroy($strSessionId);
return true;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The method SessionRead() has an NPath complexity of 288. The configured NPath complexity threshold is 200. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
- Exclude checks
NPathComplexity
Since: 0.1
The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.
Example
class Foo {
function bar() {
// lots of complicated code
}
}
Source https://phpmd.org/rules/codesize.html#npathcomplexity
The method SessionRead() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
- Exclude checks
CyclomaticComplexity
Since: 0.1
Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.
Example
// Cyclomatic Complexity = 11
class Foo {
1 public function example() {
2 if ($a == $b) {
3 if ($a1 == $b1) {
fiddle();
4 } elseif ($a2 == $b2) {
fiddle();
} else {
fiddle();
}
5 } elseif ($c == $d) {
6 while ($c == $d) {
fiddle();
}
7 } elseif ($e == $f) {
8 for ($n = 0; $n < $h; $n++) {
fiddle();
}
} else {
switch ($z) {
9 case 1:
fiddle();
break;
10 case 2:
fiddle();
break;
11 case 3:
fiddle();
break;
default:
fiddle();
break;
}
}
}
}
Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity
Avoid using undefined variables such as '$Database' which will lead to PHP notices. Open
$objDatabase = QApplication::$Database[self::$intDbIndex];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$Database' which will lead to PHP notices. Open
if (!isset(QApplication::$Database[self::$intDbIndex]) ) {
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$Database' which will lead to PHP notices. Open
$objDatabase = QApplication::$Database[self::$intDbIndex];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$Database' which will lead to PHP notices. Open
$objDatabase = QApplication::$Database[self::$intDbIndex];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$Database' which will lead to PHP notices. Open
$objDatabase = QApplication::$Database[self::$intDbIndex];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$Database' which will lead to PHP notices. Open
$objDatabase = QApplication::$Database[self::$intDbIndex];
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Missing class import via use statement (line '162', column '16'). Open
throw new QCallerException('pg_unescape_bytea method needed for DbBackedSessionHandler to operate on a PostgreSQL database. Please install the "pgsql" PHP extension.');
- 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();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '101', column '15'). Open
throw new QCallerException("session_set_save_handler function failed");
- 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();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '181', column '19'). Open
$crypt = new QCryptography(DB_BACKED_SESSION_HANDLER_ENCRYPTION_KEY, false, null, DB_BACKED_SESSION_HANDLER_HASH_KEY);
- 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();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '82', column '15'). Open
throw new QCallerException('No database defined at DB_CONNECTION index ' . self::$intDbIndex . '. Correct your settings in configuration.inc.php.');
- 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();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '251', column '16'). Open
throw new Exception ("Base64 Encoding Failed on " . $strSessionData);
- 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();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '174', column '16'). Open
throw new Exception("Failed decoding formstate " . $strData);
- 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();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '241', column '20'). Open
$crypt = new QCryptography(DB_BACKED_SESSION_HANDLER_ENCRYPTION_KEY, false, null, DB_BACKED_SESSION_HANDLER_HASH_KEY);
- 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();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid using static access to class 'QType' in method 'Initialize'. Open
self::$strTableName = QType::Cast($strTableName, QType::String);
- 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
The method SessionWrite uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
else {
$strEncoded = $encoded;
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method SessionRead uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
throw new QCallerException('pg_unescape_bytea method needed for DbBackedSessionHandler to operate on a PostgreSQL database. Please install the "pgsql" PHP extension.');
}
- Read upRead up
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Avoid using static access to class 'QType' in method 'Initialize'. Open
self::$intDbIndex = QType::Cast($intDbIndex, QType::Integer);
- 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
Avoid using empty try-catch blocks in SessionWrite. Open
catch(Exception $e) {
}
- Read upRead up
- Exclude checks
EmptyCatchBlock
Since: 2.7.0
Usually empty try-catch is a bad idea because you are silently swallowing an error condition and then continuing execution. Occasionally this may be the right thing to do, but often it's a sign that a developer saw an exception, didn't know what to do about it, and so used an empty catch to silence the problem.
Example
class Foo {
public function bar()
{
try {
// ...
} catch (Exception $e) {} // empty catch block
}
}
Source https://phpmd.org/rules/design.html#emptycatchblock
Avoid unused parameters such as '$save_path'. Open
public static function SessionOpen($save_path, $session_name) {
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid using empty try-catch blocks in SessionRead. Open
catch(Exception $e) {
}
- Read upRead up
- Exclude checks
EmptyCatchBlock
Since: 2.7.0
Usually empty try-catch is a bad idea because you are silently swallowing an error condition and then continuing execution. Occasionally this may be the right thing to do, but often it's a sign that a developer saw an exception, didn't know what to do about it, and so used an empty catch to silence the problem.
Example
class Foo {
public function bar()
{
try {
// ...
} catch (Exception $e) {} // empty catch block
}
}
Source https://phpmd.org/rules/design.html#emptycatchblock
Avoid excessively long variable names like $intMaxSessionLifetime. Keep variable name length under 20. Open
public static function SessionGarbageCollect($intMaxSessionLifetime) {
- Read upRead up
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
The parameter $save_path is not named in camelCase. Open
public static function SessionOpen($save_path, $session_name) {
self::$strSessionName = $session_name;
// Nothing to do
return true;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The parameter $session_name is not named in camelCase. Open
public static function SessionOpen($save_path, $session_name) {
self::$strSessionName = $session_name;
// Nothing to do
return true;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
The variable $session_ok is not named in camelCase. Open
public static function Initialize($intDbIndex = 1, $strTableName = "qc_session") {
self::$intDbIndex = QType::Cast($intDbIndex, QType::Integer);
self::$strTableName = QType::Cast($strTableName, QType::String);
// If the database index exists
if (!isset(QApplication::$Database[self::$intDbIndex]) ) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $session_name is not named in camelCase. Open
public static function SessionOpen($save_path, $session_name) {
self::$strSessionName = $session_name;
// Nothing to do
return true;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $result_row is not named in camelCase. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $Database is not named in camelCase. Open
public static function SessionExists($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT 1
FROM
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $Database is not named in camelCase. Open
public static function SessionGarbageCollect($intMaxSessionLifetime) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$old = time() - $intMaxSessionLifetime;
$query = '
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $session_ok is not named in camelCase. Open
public static function Initialize($intDbIndex = 1, $strTableName = "qc_session") {
self::$intDbIndex = QType::Cast($intDbIndex, QType::Integer);
self::$strTableName = QType::Cast($strTableName, QType::String);
// If the database index exists
if (!isset(QApplication::$Database[self::$intDbIndex]) ) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $result_row is not named in camelCase. Open
public static function SessionExists($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT 1
FROM
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $result_row is not named in camelCase. Open
public static function SessionExists($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT 1
FROM
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $result_row is not named in camelCase. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $Database is not named in camelCase. Open
public static function SessionDestroy($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
DELETE FROM
' . $objDatabase->EscapeIdentifier(self::$strTableName) . '
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $Database is not named in camelCase. Open
public static function SessionWrite($strSessionId, $strSessionData) {
if (empty($strSessionData)) {
static::SessionDestroy($strSessionId);
return true;
}
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $session_ok is not named in camelCase. Open
public static function Initialize($intDbIndex = 1, $strTableName = "qc_session") {
self::$intDbIndex = QType::Cast($intDbIndex, QType::Integer);
self::$strTableName = QType::Cast($strTableName, QType::String);
// If the database index exists
if (!isset(QApplication::$Database[self::$intDbIndex]) ) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $result_row is not named in camelCase. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $Database is not named in camelCase. Open
public static function Initialize($intDbIndex = 1, $strTableName = "qc_session") {
self::$intDbIndex = QType::Cast($intDbIndex, QType::Integer);
self::$strTableName = QType::Cast($strTableName, QType::String);
// If the database index exists
if (!isset(QApplication::$Database[self::$intDbIndex]) ) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $Database is not named in camelCase. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method SessionExists is not named in camelCase. Open
public static function SessionExists($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT 1
FROM
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method SessionDestroy is not named in camelCase. Open
public static function SessionDestroy($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
DELETE FROM
' . $objDatabase->EscapeIdentifier(self::$strTableName) . '
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method SessionGarbageCollect is not named in camelCase. Open
public static function SessionGarbageCollect($intMaxSessionLifetime) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$old = time() - $intMaxSessionLifetime;
$query = '
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method SessionClose is not named in camelCase. Open
public static function SessionClose() {
// Nothing to do.
return true;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method SessionWrite is not named in camelCase. Open
public static function SessionWrite($strSessionId, $strSessionData) {
if (empty($strSessionData)) {
static::SessionDestroy($strSessionId);
return true;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method SessionOpen is not named in camelCase. Open
public static function SessionOpen($save_path, $session_name) {
self::$strSessionName = $session_name;
// Nothing to do
return true;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method SessionRead is not named in camelCase. Open
public static function SessionRead($strSessionId) {
$objDatabase = QApplication::$Database[self::$intDbIndex];
$query = '
SELECT
' . $objDatabase->EscapeIdentifier('data') . '
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method Initialize is not named in camelCase. Open
public static function Initialize($intDbIndex = 1, $strTableName = "qc_session") {
self::$intDbIndex = QType::Cast($intDbIndex, QType::Integer);
self::$strTableName = QType::Cast($strTableName, QType::String);
// If the database index exists
if (!isset(QApplication::$Database[self::$intDbIndex]) ) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method GetFullSessionId is not named in camelCase. Open
private static function GetFullSessionId($strSessionId) {
return self::$strSessionName.'.'.$strSessionId;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}