Avoid using undefined variables such as '$pluginData' which will lead to PHP notices. Open
return $pluginData[$pluginName];
- 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 '$pluginData' which will lead to PHP notices. Open
$pluginData[$pluginName] = $plugin_info;
- 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 '$plugin_info' which will lead to PHP notices. Open
if (isset($plugin_info) && isset($plugin_info['plugin_class']) && $obj->isCoursePlugin) {
- 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 '$plugin_info' which will lead to PHP notices. Open
if (isset($plugin_info) && isset($plugin_info['plugin_class']) && $obj->isCoursePlugin) {
- 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
Remove error control operator '@' on line 66. Open
public function read_plugins_from_path()
{
/* We scan the plugin directory. Each folder is a potential plugin. */
$pluginPath = api_get_path(SYS_PLUGIN_PATH);
$plugins = [];
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
Remove error control operator '@' on line 72. Open
public function read_plugins_from_path()
{
/* We scan the plugin directory. Each folder is a potential plugin. */
$pluginPath = api_get_path(SYS_PLUGIN_PATH);
$plugins = [];
- Read upRead up
- Exclude checks
ErrorControlOperator
Error suppression should be avoided if possible as it doesn't just suppress the error, that you are trying to stop, but will also suppress errors that you didn't predict would ever occur. Consider changing error_reporting() level and/or setting up your own error handler.
Example
function foo($filePath) {
$file = @fopen($filPath); // hides exceptions
$key = @$array[$notExistingKey]; // assigns null to $key
}
Source http://phpmd.org/rules/cleancode.html#errorcontroloperator
The method getAllPluginContentsByRegion uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$_template = [];
$_template['plugin_info'] = $plugin_info;
}
- 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 getPluginInfo uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$plugin_file = api_get_path(SYS_PLUGIN_PATH)."$pluginName/plugin.php";
$plugin_info = [];
if (file_exists($plugin_file)) {
- 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 load_plugin_lang_variables uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
/*$interfaceLanguageId = api_get_language_id($language_interface);
$interfaceLanguageInfo = api_get_language_info($interfaceLanguageId);
$languageParentId = intval($interfaceLanguageInfo['parent_id']);
- 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 add_course_settings_form uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$element = &$form->createElement(
$setting['type'],
$setting['name'],
'',
- 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 unused local variables such as '$templatePluginFile'. Open
$templatePluginFile = "$plugin_name/$pluginTemplate"; // for twig
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused parameters such as '$forced'. Open
public function getPluginInfo($pluginName, $forced = false)
- 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 unused parameters such as '$template'. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
- 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 unused local variables such as '$regionContent'. Open
$regionContent = $this->loadRegion(
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
Avoid unused local variables such as '$v'. Open
foreach ($groups as $k => $v) {
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable
The parameter $plugin_name is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_name is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $plugin_regions is not named in camelCase. Open
class AppPlugin
{
public $plugin_regions = [
'main_top',
'main_bottom',
- 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
Variable "plugin_name" is not in valid camel caps format Open
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$pluginData[$pluginName] = $plugin_info;
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
return $plugin_info;
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
return $plugin_info['templates'];
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
$access_url_id,
- Exclude checks
Variable "plugin_name" is not in valid camel caps format Open
public function load_plugin_lang_variables($plugin_name)
- Exclude checks
Variable "plugin_name" is not in valid camel caps format Open
$english_path = $root.$plugin_name.'/lang/english.php';
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
if (isset($plugin_info) && isset($plugin_info['templates'])) {
- Exclude checks
Variable "plugin_file" is not in valid camel caps format Open
if (file_exists($plugin_file)) {
- Exclude checks
Variable "access_url_id" is not in valid camel caps format Open
$access_url_id = api_get_current_access_url_id();
- Exclude checks
Variable "plugin_path" is not in valid camel caps format Open
$plugin_path = api_get_path(SYS_PLUGIN_PATH).$pluginName.'/plugin.php';
- Exclude checks
Variable "course_settings" is not in valid camel caps format Open
if (!empty($obj->course_settings)) {
- Exclude checks
Doc comment for parameter $forced does not match actual variable name $template Open
* @param bool $forced
- Exclude checks
Variable "plugin_name" is not in valid camel caps format Open
$path = $root.$plugin_name."/lang/$language_interface.php";
- Exclude checks
Variable "plugin_path" is not in valid camel caps format Open
if (file_exists($plugin_path)) {
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
if (isset($plugin_info) && isset($plugin_info['plugin_class']) && $obj->isCoursePlugin) {
- Exclude checks
Multi-line function call not indented correctly; expected 16 spaces but found 8 Open
);
- Exclude checks
Variable "english_path" is not in valid camel caps format Open
if (is_readable($english_path)) {
- Exclude checks
Variable "language_interface" is not in valid camel caps format Open
if ('english' != $language_interface) {
- Exclude checks
Variable "plugin_file" is not in valid camel caps format Open
$plugin_file = api_get_path(SYS_PLUGIN_PATH)."$plugin_name/index.php";
- Exclude checks
Doc comment for parameter $region does not match actual variable name $pluginName Open
* @param string $region
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
if (isset($plugin_info) && isset($plugin_info['templates'])) {
- Exclude checks
Variable "language_interface" is not in valid camel caps format Open
$path = $root.$plugin_name."/lang/$language_interface.php";
- Exclude checks
Variable "plugin_name" is not in valid camel caps format Open
self::load_plugin_lang_variables($plugin_name);
- Exclude checks
Variable "plugin_file" is not in valid camel caps format Open
require $plugin_file;
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$_template['plugin_info'] = $plugin_info;
- Exclude checks
Variable "plugin_file" is not in valid camel caps format Open
$plugin_file = api_get_path(SYS_PLUGIN_PATH)."$pluginName/plugin.php";
- Exclude checks
Method name "AppPlugin::add_to_region" is not in camel caps format Open
public function add_to_region($plugin, $region)
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
if (isset($plugin_info) && isset($plugin_info['plugin_class']) && $obj->isCoursePlugin) {
- Exclude checks
Variable "plugin_regions" is not in valid camel caps format Open
return $this->plugin_regions;
- Exclude checks
Method name "AppPlugin::load_plugin_lang_variables" is not in camel caps format Open
public function load_plugin_lang_variables($plugin_name)
- Exclude checks
Variable "english_path" is not in valid camel caps format Open
include $english_path;
- Exclude checks
Variable "plugin_file" is not in valid camel caps format Open
require $plugin_file;
- Exclude checks
Variable "settings_filtered" is not in valid camel caps format Open
$plugin_info['settings'] = $settings_filtered;
- Exclude checks
Variable "plugin_path" is not in valid camel caps format Open
require $plugin_path;
- Exclude checks
Variable "plugin_name" is not in valid camel caps format Open
$plugin_file = api_get_path(SYS_PLUGIN_PATH)."$plugin_name/index.php";
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$_template['plugin_info'] = $plugin_info;
- Exclude checks
Variable "settings_filtered" is not in valid camel caps format Open
$settings_filtered = [];
- Exclude checks
Variable "settings_filtered" is not in valid camel caps format Open
$settings_filtered[$item['variable']] = $item['selected_value'];
- Exclude checks
Missing function doc comment Open
public function setInstalledPluginListObject()
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$plugin_info = [];
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
if (isset($plugin_info) && isset($plugin_info['templates'])) {
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$templateList = $plugin_info['templates'];
- Exclude checks
Doc comment for parameter $region does not match actual variable name $plugin_name Open
* @param string $region
- Exclude checks
Variable "language_interface" is not in valid camel caps format Open
$language_interface = api_get_language_isocode();
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
if (isset($plugin_info) && isset($plugin_info['templates'])) {
- Exclude checks
Method name "AppPlugin::get_installed_plugins" is not in camel caps format Open
public function get_installed_plugins($fromDatabase = true)
- Exclude checks
Doc comment for parameter $forced does not match actual variable name $template Open
* @param bool $forced
- Exclude checks
Variable "plugin_settings" is not in valid camel caps format Open
$plugin_settings = api_get_settings_params(
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$plugin_info['settings'] = $settings_filtered;
- Exclude checks
Method name "AppPlugin::install_course_plugins" is not in camel caps format Open
public function install_course_plugins($courseId)
- Exclude checks
Variable "course_settings" is not in valid camel caps format Open
foreach ($obj->course_settings as $setting) {
- Exclude checks
Missing function doc comment Open
public function getInstalledPluginsInCurrentUrl()
- Exclude checks
Doc comment for parameter $template does not match actual variable name $region Open
* @param Twig_Environment $template
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$plugin_info['current_region'] = $region;
- Exclude checks
Variable "plugin_file" is not in valid camel caps format Open
if (file_exists($plugin_file)) {
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 12 Open
'
- Exclude checks
Method name "AppPlugin::read_plugins_from_path" is not in camel caps format Open
public function read_plugins_from_path()
- Exclude checks
Method name "AppPlugin::is_valid_plugin" is not in camel caps format Open
public function is_valid_plugin($pluginName)
- Exclude checks
Variable "plugin_regions" is not in valid camel caps format Open
sort($this->plugin_regions);
- Exclude checks
Variable "english_path" is not in valid camel caps format Open
$english_path = $root.$plugin_name.'/lang/english.php';
- Exclude checks
Doc comment for parameter $template does not match actual variable name $region Open
* @param Twig_Environment $template
- Exclude checks
Variable "plugin_name" is not in valid camel caps format Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
- Exclude checks
Variable "plugin_settings" is not in valid camel caps format Open
foreach ($plugin_settings as $item) {
- Exclude checks
Method name "AppPlugin::add_course_settings_form" is not in camel caps format Open
public function add_course_settings_form($form)
- Exclude checks
Member variable "plugin_regions" is not in valid camel caps format Open
public $plugin_regions = [
- Exclude checks
Method name "AppPlugin::get_areas_by_plugin" is not in camel caps format Open
public function get_areas_by_plugin($pluginName)
- Exclude checks
Variable "plugin_name" is not in valid camel caps format Open
$templatePluginFile = "$plugin_name/$pluginTemplate"; // for twig
- Exclude checks
Method name "AppPlugin::get_templates_list" is not in camel caps format Open
public function get_templates_list($pluginName)
- Exclude checks
Variable "plugin_info" is not in valid camel caps format Open
$plugin_info = $this->getPluginInfo($pluginName);
- Exclude checks
The 'getAllPluginContentsByRegion()' method which returns a boolean should be named 'is...()' or 'has...()' Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- Read upRead up
- Exclude checks
BooleanGetMethodName
Since: 0.2
Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.
Example
class Foo {
/**
* @return boolean
*/
public function getFoo() {} // bad
/**
* @return bool
*/
public function isFoo(); // ok
/**
* @return boolean
*/
public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}
Source https://phpmd.org/rules/naming.html#booleangetmethodname
The 'get_templates_list()' method which returns a boolean should be named 'is...()' or 'has...()' Open
public function get_templates_list($pluginName)
{
$plugin_info = $this->getPluginInfo($pluginName);
if (isset($plugin_info) && isset($plugin_info['templates'])) {
return $plugin_info['templates'];
- Read upRead up
- Exclude checks
BooleanGetMethodName
Since: 0.2
Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.
Example
class Foo {
/**
* @return boolean
*/
public function getFoo() {} // bad
/**
* @return bool
*/
public function isFoo(); // ok
/**
* @return boolean
*/
public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}
Source https://phpmd.org/rules/naming.html#booleangetmethodname
Multi-line function call not indented correctly; expected 16 spaces but found 8 Open
);
- Exclude checks
Expected 0 spaces before closing bracket; newline found Open
$form->addHtml('
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 8 Open
);
- Exclude checks
Multi-line function call not indented correctly; expected 20 spaces but found 12 Open
'
- Exclude checks
Line indented incorrectly; expected at least 16 spaces, found 12 Open
'
- Exclude checks
The variable $plugin_info is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $settings_filtered is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_name is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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_interface is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $plugin_file is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_file is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $settings_filtered is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_info is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_name is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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_interface is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $plugin_info is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $settings_filtered is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_name is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_name is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_file is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_info is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $english_path is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $plugin_name is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_info is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_file is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_name is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $english_path is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $plugin_info is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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_interface is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $_template is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_info is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_info is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_info is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $english_path is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 $plugin_file is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $_template is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_file is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_info is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_settings is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_info is not named in camelCase. Open
public function get_templates_list($pluginName)
{
$plugin_info = $this->getPluginInfo($pluginName);
if (isset($plugin_info) && isset($plugin_info['templates'])) {
return $plugin_info['templates'];
- 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 $_template is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $_template is not named in camelCase. Open
public function getAllPluginContentsByRegion($plugin_name, $region, $template, $forced = false)
{
// The plugin_info variable is available inside the plugin index
$plugin_info = $this->getPluginInfo($plugin_name, $forced);
- 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 $plugin_settings is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_info is not named in camelCase. Open
public function getPluginInfo($pluginName, $forced = false)
{
//$pluginData = Session::read('plugin_data');
if (0) {
//if (isset($pluginData[$pluginName]) && $forced == 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 $plugin_path is not named in camelCase. Open
public function install_course_plugins($courseId)
{
$pluginList = $this->getInstalledPluginListObject();
if (!empty($pluginList)) {
- 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 $plugin_info is not named in camelCase. Open
public function get_templates_list($pluginName)
{
$plugin_info = $this->getPluginInfo($pluginName);
if (isset($plugin_info) && isset($plugin_info['templates'])) {
return $plugin_info['templates'];
- 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 $plugin_path is not named in camelCase. Open
public function install_course_plugins($courseId)
{
$pluginList = $this->getInstalledPluginListObject();
if (!empty($pluginList)) {
- 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 $plugin_info is not named in camelCase. Open
public function get_templates_list($pluginName)
{
$plugin_info = $this->getPluginInfo($pluginName);
if (isset($plugin_info) && isset($plugin_info['templates'])) {
return $plugin_info['templates'];
- 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 $access_url_id is not named in camelCase. Open
public function removeAllRegions($plugin)
{
$access_url_id = api_get_current_access_url_id();
if (!empty($plugin)) {
api_delete_settings_params(
- 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 $plugin_path is not named in camelCase. Open
public function install_course_plugins($courseId)
{
$pluginList = $this->getInstalledPluginListObject();
if (!empty($pluginList)) {
- 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 $plugin_info is not named in camelCase. Open
public function get_templates_list($pluginName)
{
$plugin_info = $this->getPluginInfo($pluginName);
if (isset($plugin_info) && isset($plugin_info['templates'])) {
return $plugin_info['templates'];
- 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 $access_url_id is not named in camelCase. Open
public function removeAllRegions($plugin)
{
$access_url_id = api_get_current_access_url_id();
if (!empty($plugin)) {
api_delete_settings_params(
- 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 $plugin_info is not named in camelCase. Open
public function install_course_plugins($courseId)
{
$pluginList = $this->getInstalledPluginListObject();
if (!empty($pluginList)) {
- 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 $plugin_info is not named in camelCase. Open
public function install_course_plugins($courseId)
{
$pluginList = $this->getInstalledPluginListObject();
if (!empty($pluginList)) {
- 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 load_plugin_lang_variables is not named in camelCase. Open
public function load_plugin_lang_variables($plugin_name)
{
$language_interface = api_get_language_isocode();
$root = api_get_path(SYS_PLUGIN_PATH);
$strings = null;
- 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 is_valid_plugin is not named in camelCase. Open
public function is_valid_plugin($pluginName)
{
if (is_dir(api_get_path(SYS_PLUGIN_PATH).$pluginName)) {
if (is_file(api_get_path(SYS_PLUGIN_PATH).$pluginName.'/index.php')) {
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 read_plugins_from_path is not named in camelCase. Open
public function read_plugins_from_path()
{
/* We scan the plugin directory. Each folder is a potential plugin. */
$pluginPath = api_get_path(SYS_PLUGIN_PATH);
$plugins = [];
- 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 get_areas_by_plugin is not named in camelCase. Open
public function get_areas_by_plugin($pluginName)
{
$result = api_get_settings('Plugins');
$areas = [];
foreach ($result as $row) {
- 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 add_to_region is not named in camelCase. Open
public function add_to_region($plugin, $region)
{
api_add_setting(
$plugin,
$region,
- 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 get_installed_plugins is not named in camelCase. Open
public function get_installed_plugins($fromDatabase = true)
{
return $this->getInstalledPlugins($fromDatabase);
}
- 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 add_course_settings_form is not named in camelCase. Open
public function add_course_settings_form($form)
{
$pluginList = $this->getInstalledPluginListObject();
/** @var Plugin $obj */
foreach ($pluginList as $obj) {
- 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 install_course_plugins is not named in camelCase. Open
public function install_course_plugins($courseId)
{
$pluginList = $this->getInstalledPluginListObject();
if (!empty($pluginList)) {
- 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 get_templates_list is not named in camelCase. Open
public function get_templates_list($pluginName)
{
$plugin_info = $this->getPluginInfo($pluginName);
if (isset($plugin_info) && isset($plugin_info['templates'])) {
return $plugin_info['templates'];
- 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() {
}
}