Missing class import via use statement (line '78', column '15'). Open
throw new \App\Exceptions\AppException('Sorry! Attempt to access restricted file.');
- 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 '115', column '15'). Open
throw new \App\Exceptions\AppException('Sorry! Attempt to access restricted file.');
- 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
The method implodestr has a boolean flag argument $suffix, which is a certain sign of a Single Responsibility Principle violation. Open
public static function implodestr($prefix, $count, $suffix = false)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method checkFileAccessForInclusion has a boolean flag argument $dieOnFail, which is a certain sign of a Single Responsibility Principle violation. Open
public static function checkFileAccessForInclusion($filepath, $dieOnFail = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method checkFileAccess has a boolean flag argument $dieOnFail, which is a certain sign of a Single Responsibility Principle violation. Open
public static function checkFileAccess($filepath, $dieOnFail = true)
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid using static access to class '\App\Log' in method 'checkFileAccess'. Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- 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 static access to class '\App\Log' in method 'checkFileAccessForInclusion'. Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- 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 static access to class '\App\Config' in method 'checkFileAccess'. Open
$use_root_directory = \App\Config::main('root_directory');
- 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 static access to class '\App\Db' in method 'addColumn'. Open
$db = \App\Db::getInstance();
- 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
Saw possibly unextractable annotation for a fragment of comment '* @param string File path to check':
after string,
did not see an element name (will guess based on comment order) Open
* @param string File path to check
- Exclude checks
Call to method error
from undeclared class \App\Log
Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string SQL String':
after string,
did not see an element name (will guess based on comment order) Open
* @param string SQL String
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param mixed String or Integer':
after mixed,
did not see an element name (will guess based on comment order) Open
* @param mixed String or Integer
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string suffix to use (optional)':
after string,
did not see an element name (will guess based on comment order) Open
* @param string suffix to use (optional)
- Exclude checks
Call to method error
from undeclared class \App\Log
Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string tablename to check':
after string,
did not see an element name (will guess based on comment order) Open
* @param string tablename to check
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string SQL String':
after string,
did not see an element name (will guess based on comment order) Open
* @param string SQL String
- Exclude checks
Call to undeclared method \App\Db::getSchema
Open
$criteria = $db->getSchema()->createColumnSchemaBuilder($criteria[0], $criteria[1]);
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string prefix to use':
after string,
did not see an element name (will guess based on comment order) Open
* @param string prefix to use
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param int Number of times':
after int,
did not see an element name (will guess based on comment order) Open
* @param int Number of times
- Exclude checks
Call to undeclared method \App\Db::createCommand
Open
$db->createCommand()->addColumn($tableName, $columnName, $criteria)->execute();
- Exclude checks
Call to undeclared method \App\Db::getSchema
Open
$tableSchema = $db->getSchema()->getTableSchema($tableName, true);
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param string File path to check':
after string,
did not see an element name (will guess based on comment order) Open
* @param string File path to check
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool False to avoid die() if check fails':
after bool,
did not see an element name (will guess based on comment order) Open
* @param bool False to avoid die() if check fails
- Exclude checks
Saw possibly unextractable annotation for a fragment of comment '* @param bool False to avoid die() if check fails':
after bool,
did not see an element name (will guess based on comment order) Open
* @param bool False to avoid die() if check fails
- Exclude checks
Avoid variables with short names like $db. Configured minimum length is 3. Open
$db = \App\Db::getInstance();
- 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
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return is_numeric($value) ? (int) $value == $value : false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Check if given value is a number or not.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Implode the prefix and suffix as string for given number of times.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function isNumber($value)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Line exceeds 120 characters; contains 158 characters Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (empty($use_root_directory)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $sql
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$strvalue .= $prefix;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$unsafeDirectories = ['storage', 'cache', 'test'];
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to check the file access is made within web root directory.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$use_root_directory = \App\Config::main('root_directory');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Add column to existing table.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($suffix && $index != ($count - 1)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$strvalue .= $suffix;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string File path to check
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$realfilepath = str_replace('\\\\', '\\', $realfilepath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string SQL String
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $prefix
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function implodestr($prefix, $count, $suffix = false)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$relativeFilePath = str_replace($rootdirpath, '', $realfilepath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$use_root_directory = realpath(__DIR__ . '/../../.');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $tableName to alter
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$tableSchema = $db->getSchema()->getTableSchema($tableName, true);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$rootdirpath = str_replace('\\', '/', $rootdirpath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db = \App\Db::getInstance();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (preg_match('/(CREATE TABLE)/', strtoupper($sql))) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $value
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string prefix to use
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $filepath
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $dieOnFail
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** Replace all \\ with \ first */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Check if the given SQL is a CREATE statement.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed String or Integer
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$strvalue = '';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$rootdirpath = str_replace('\\\\', '\\', ROOT_DIRECTORY . \DIRECTORY_SEPARATOR);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** Replace all \ with / now */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $suffix
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$realfilepath = str_replace('\\\\', '\\', $realfilepath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\AppException('Sorry! Attempt to access restricted file.');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$rootdirpath = str_replace('\\\\', '\\', $use_root_directory);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param int Number of times
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return $strvalue;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$rootdirpath = str_replace('\\', '/', $rootdirpath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$realfilepath = str_replace('\\', '/', $realfilepath);
- Exclude checks
Line exceeds 120 characters; contains 158 characters Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
throw new \App\Exceptions\AppException('Sorry! Attempt to access restricted file.');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (null === $tableSchema->getColumn((string) $columnName)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (is_array($criteria)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $sql
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string suffix to use (optional)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Check if table is present in database.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return \App\Db::getInstance()->isTableExists($tableName);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
for ($index = 0; $index < $count; ++$index) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Function to check the file access is made within web root directory as well as is safe for php inclusion.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** Replace all \\ with \ first */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($dieOnFail) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $count
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$realfilepath = realpath($filepath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$realfilepath = str_replace('\\', '/', $realfilepath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return false;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/** Replace all \ with / now */
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string tablename to check
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function checkTable($tableName)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function isCreateSql($sql)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string SQL String
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function isDestructiveSql($sql)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string File path to check
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
\App\Log::error(__METHOD__ . '(' . $filepath . ') - Sorry! Attempt to access restricted file. realfilepath: ' . print_r($realfilepath, true));
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $tableName
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool False to avoid die() if check fails
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $dieOnFail
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
// Set the base directory to compare with
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 !== stripos($realfilepath, $rootdirpath)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param string $columnName to add
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (preg_match('/(DROP TABLE)|(DROP COLUMN)|(DELETE FROM)/', strtoupper($sql))) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$filePathParts = explode('/', $relativeFilePath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if ($dieOnFail) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param bool False to avoid die() if check fails
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param mixed $filepath
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function checkFileAccess($filepath, $dieOnFail = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$realfilepath = realpath($filepath);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* @param array|string $criteria ([\yii\db\Schema::TYPE_STRING, 1024] | string(1024))
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$criteria = $db->getSchema()->createColumnSchemaBuilder($criteria[0], $criteria[1]);
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
$db->createCommand()->addColumn($tableName, $columnName, $criteria)->execute();
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function checkFileAccessForInclusion($filepath, $dieOnFail = true)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
if (0 !== stripos($realfilepath, $rootdirpath) || in_array($filePathParts[0], $unsafeDirectories)) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
public static function addColumn($tableName, $columnName, $criteria)
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
/**
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
* Check if the given SQL is destructive (DELETE's DATA).
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
return true;
- Exclude checks
The variable $use_root_directory is not named in camelCase. Open
public static function checkFileAccess($filepath, $dieOnFail = true)
{
// Set the base directory to compare with
$use_root_directory = \App\Config::main('root_directory');
if (empty($use_root_directory)) {
- 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 $use_root_directory is not named in camelCase. Open
public static function checkFileAccess($filepath, $dieOnFail = true)
{
// Set the base directory to compare with
$use_root_directory = \App\Config::main('root_directory');
if (empty($use_root_directory)) {
- 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 $use_root_directory is not named in camelCase. Open
public static function checkFileAccess($filepath, $dieOnFail = true)
{
// Set the base directory to compare with
$use_root_directory = \App\Config::main('root_directory');
if (empty($use_root_directory)) {
- 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 $use_root_directory is not named in camelCase. Open
public static function checkFileAccess($filepath, $dieOnFail = true)
{
// Set the base directory to compare with
$use_root_directory = \App\Config::main('root_directory');
if (empty($use_root_directory)) {
- 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();
}
}