sys_get_temp_dir accesses the super-global variable $_ENV. Open
public function sys_get_temp_dir()
{
// Try to get from environment variable
if (!empty($_ENV['TMP'])) {
return realpath($_ENV['TMP']);
- 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
sys_get_temp_dir accesses the super-global variable $_ENV. Open
public function sys_get_temp_dir()
{
// Try to get from environment variable
if (!empty($_ENV['TMP'])) {
return realpath($_ENV['TMP']);
- 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
sys_get_temp_dir accesses the super-global variable $_ENV. Open
public function sys_get_temp_dir()
{
// Try to get from environment variable
if (!empty($_ENV['TMP'])) {
return realpath($_ENV['TMP']);
- 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
sys_get_temp_dir accesses the super-global variable $_ENV. Open
public function sys_get_temp_dir()
{
// Try to get from environment variable
if (!empty($_ENV['TMP'])) {
return realpath($_ENV['TMP']);
- 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
sys_get_temp_dir accesses the super-global variable $_ENV. Open
public function sys_get_temp_dir()
{
// Try to get from environment variable
if (!empty($_ENV['TMP'])) {
return realpath($_ENV['TMP']);
- 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
sys_get_temp_dir accesses the super-global variable $_ENV. Open
public function sys_get_temp_dir()
{
// Try to get from environment variable
if (!empty($_ENV['TMP'])) {
return realpath($_ENV['TMP']);
- 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
The class PhpSecInfo_Test has an overall complexity of 61 which is very high. The configured complexity threshold is 50. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Exclude checks
PhpSecInfo_Test
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
Method getUnixId
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
Function getUnixId
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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
Avoid too many return
statements within this method. Open
return $val;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return $ini_val;
The method getUnixId() has a Cyclomatic Complexity of 11. The configured cyclomatic complexity threshold is 10. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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
The method _setMessage uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$langue_definie = PHPSECINFO_LANG_DEFAULT;
$message = isset($messages[$language_code]) ? $messages[$langue_definie] : '';
}
- 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 assigning values to variables in if clauses and the like (line '309', column '13'). Open
public function getMoreInfoURL()
{
if ($tn = $this->getTestName()) {
// Fixed URL for 'More Information URL'.
// https://github.com/bigdeej/PhpSecInfo/commit/f8262613ef6da51e65aa8cf31d9b4f80acb15afd#diff-0d32928ec88998768a1fb2d4fc810e19
- Read upRead up
- Exclude checks
IfStatementAssignment
Since: 2.7.0
Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.
Example
class Foo
{
public function bar($flag)
{
if ($foo = 'bar') { // possible typo
// ...
}
if ($baz = 0) { // always false
// ...
}
}
}
Source http://phpmd.org/rules/cleancode.html#ifstatementassignment
Each class must be in a namespace of at least one level (a top-level vendor name) Open
class PhpSecInfo_Test
- Exclude checks
The property $current_value is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $recommended_value is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $langue_definie is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $test_group is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $_messages is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $result_code is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $test_group is not named in camelCase. Open
public function setTestGroup($test_group)
{
$this->test_group = $test_group;
}
- 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 $result_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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 $test_name is not named in camelCase. Open
public function setTestName($test_name)
{
$this->test_name = $test_name;
}
- 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
Avoid variables with short names like $tn. Configured minimum length is 3. Open
if ($tn = $this->getTestName()) {
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The property $test_name is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $langue_defaut is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $language_code is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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
Avoid variables with short names like $gs. Configured minimum length is 3. Open
$gs = $matches[5];
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The class PhpSecInfo_Test is not named in CamelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCaseClassName
Since: 0.2
It is considered best practice to use the CamelCase notation to name classes.
Example
class class_name {
}
Source
The property $_result is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $ini_key is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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 $result_code is not named in camelCase. Open
public function _setResult($result_code)
{
$this->_result = $result_code;
}
- 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 $language_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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 property $_message is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The property $_language is not named in camelCase. Open
class PhpSecInfo_Test
{
/**
* This value is used to group test results together.
* For example, all tests related to the mysql lib should be grouped under "mysql."
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 17 and the first side effect is on line 15. Open
<?php
- Exclude checks
Property name "$_result" should not be prefixed with an underscore to indicate visibility Open
public $_result = PHPSECINFO_TEST_RESULT_NOTRUN;
- Exclude checks
Method name "PhpSecInfo_Test::sys_get_temp_dir" is not in camel caps format Open
public function sys_get_temp_dir()
- Exclude checks
Method name "_setMessage" should not be prefixed with an underscore to indicate visibility Open
public function _setMessage($result_code, $language_code)
- Exclude checks
Property name "$_message" should not be prefixed with an underscore to indicate visibility Open
public $_message;
- Exclude checks
Property name "$_messages" should not be prefixed with an underscore to indicate visibility Open
public $_messages = [];
- Exclude checks
Property name "$_language" should not be prefixed with an underscore to indicate visibility Open
public $_language = PHPSECINFO_LANG_DEFAULT;
- Exclude checks
Method name "_retrieveCurrentValue" should not be prefixed with an underscore to indicate visibility Open
public function _retrieveCurrentValue()
- Exclude checks
Method name "_setMessages" should not be prefixed with an underscore to indicate visibility Open
public function _setMessages()
- Exclude checks
Method name "_execTest" should not be prefixed with an underscore to indicate visibility Open
public function _execTest()
- Exclude checks
Method name "_setResult" should not be prefixed with an underscore to indicate visibility Open
public function _setResult($result_code)
- Exclude checks
Line exceeds 120 characters; contains 137 characters Open
// $this->setMessageForResult(PHPSECINFO_TEST_RESULT_ERROR, 'fr', 'Une erreur s\'est produite lors de l\'exécution de ce test');
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
if (function_exists('posix_getpwuid') && function_exists('posix_geteuid') && function_exists('posix_getgrgid') && function_exists('posix_getgroups')) {
- Exclude checks
Line exceeds 120 characters; contains 139 characters Open
// $this->setMessageForResult(PHPSECINFO_TEST_RESULT_WARN, 'fr', 'Ce paramètre peut constituer un grave problème de sécurité');
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
// $this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'fr', 'Ce paramètre devrait pouvoir être considéré comme sûr');
- Exclude checks
Line exceeds 120 characters; contains 147 characters Open
// Afichier les messages standards en français c'est très bien, mais, ça me prive des messages anglais exisant qui ne sont pas traduits.
- Exclude checks
Line exceeds 120 characters; contains 141 characters Open
// $this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'fr', 'Ceci pourrait potentiellement être un problème de sécurité');
- Exclude checks
Class name "PhpSecInfo_Test" is not in camel caps format Open
class PhpSecInfo_Test
- Exclude checks
The variable $result_code is not named in camelCase. Open
public function _setResult($result_code)
{
$this->_result = $result_code;
}
- 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 $language_code is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $id_data is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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 $id_data is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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 $id_data is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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 $langue_defaut is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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 $id_raw is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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_code is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $id_data is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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 $ini_key is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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 $langue_defaut is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $langue_definie is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $ini_val is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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 $language_code is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $langue_definie is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $test_name is not named in camelCase. Open
public function setTestName($test_name)
{
$this->test_name = $test_name;
}
- 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 $ini_val is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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 $language_code is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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 $ini_val is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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 $ini_val is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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 $id_data is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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 $id_data is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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 $language_code is not named in camelCase. Open
public function setMessageForResult($result_code, $language_code, $message)
{
if (!isset($this->_messages[$result_code])) {
$this->_messages[$result_code] = [];
}
- 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 $test_group is not named in camelCase. Open
public function setTestGroup($test_group)
{
$this->test_group = $test_group;
}
- 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 $ini_val is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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 $id_raw is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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 $ini_val is not named in camelCase. Open
public function getBooleanIniValue($ini_key)
{
$ini_val = ini_get($ini_key);
if (is_string($ini_val)) {
- 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 $id_data is not named in camelCase. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return false;
}
- 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 _retrieveCurrentValue is not named in camelCase. Open
public function _retrieveCurrentValue()
{
$this->current_value = 'foo';
}
- 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 _setMessages is not named in camelCase. Open
public function _setMessages()
{
$this->setMessageForResult(PHPSECINFO_TEST_RESULT_OK, 'en', 'This setting should be considered safe');
$this->setMessageForResult(PHPSECINFO_TEST_RESULT_NOTICE, 'en', 'This could potentially be a security issue');
- 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 sys_get_temp_dir is not named in camelCase. Open
public function sys_get_temp_dir()
{
// Try to get from environment variable
if (!empty($_ENV['TMP'])) {
return realpath($_ENV['TMP']);
- 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 _execTest is not named in camelCase. Open
public function _execTest()
{
return PHPSECINFO_TEST_RESULT_NOTRUN;
}
- 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 _setResult is not named in camelCase. Open
public function _setResult($result_code)
{
$this->_result = $result_code;
}
- 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 _setMessage is not named in camelCase. Open
public function _setMessage($result_code, $language_code)
{
$messages = $this->_messages[$result_code];
// Afficher le français par défaut, et, sinon, la langue anglaise quand la traduction n'existe pas.
- 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() {
}
}