Remove error control operator '@' on line 133. Open
public static function add_file_in_language_directory($system_path_file)
{
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
return $return_value;
- 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 185. Open
public static function addPoFileForSubLanguage($subLanguageIsoCode)
{
if (empty($subLanguageIsoCode)) {
return false;
}
- 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 151. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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
Avoid assigning values to variables in if clauses and the like (line '54', column '17'). Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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
The method check_if_exist_language_by_id uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return false;
}
- 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 get_lang_folder_files_list uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$content_dir[] = $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 check_if_language_is_father uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return false;
}
- 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 check_if_language_is_sub_language uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return false;
}
- 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 check_if_language_is_used uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return false;
}
- 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 write_data_in_file uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$return_value = true;
}
- 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 check_if_exist_language_by_id uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return false;
}
- 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 get_name_of_language_by_id uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
return '';
}
- 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 updateOrAddMsgid uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$appendString = PHP_EOL . PHP_EOL . 'msgid "' . $msgid . '"' . PHP_EOL . 'msgstr "' . $content . '"';
$fileContents .= $appendString;
}
- 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 getLanguageFromBrowserPreference uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$code = $pref;
}
- 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 parameter $new_term is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $parent_id is not named in camelCase. Open
public static function get_all_information_of_language($parent_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table.' WHERE id = "'.intval($parent_id).'"';
$rs = Database::query($sql);
- 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 $system_path_file is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $system_path_file is not named in camelCase. Open
public static function add_file_in_language_directory($system_path_file)
{
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
return $return_value;
- 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_id is not named in camelCase. Open
public static function check_if_language_is_father($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) AS count FROM '.$table.'
WHERE parent_id= '.intval($language_id).' AND NOT ISNULL(parent_id);';
- 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 $new_variable is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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_id is not named in camelCase. Open
public static function check_if_exist_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) as count
FROM '.$table.'
- 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 $only_main_name is not named in camelCase. Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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_id is not named in camelCase. Open
public static function get_name_of_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$language_id = intval($language_id);
$sql = "SELECT original_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
The parameter $language_id is not named in camelCase. Open
public static function check_if_language_is_sub_language($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) AS count FROM '.$table.'
WHERE id = '.intval($language_id).' AND NOT ISNULL(parent_id)';
- 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 $get_as_string_index is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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_id is not named in camelCase. Open
public static function check_if_language_is_used(int $language_id): bool
{
$language_info = self::get_all_information_of_language($language_id);
$table = Database::get_main_table(TABLE_MAIN_USER);
$sql = 'SELECT count(*) AS count FROM '.$table.'
- 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 $path_file is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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_id is not named in camelCase. Open
public static function make_unavailable_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='0'
WHERE id = ".intval($language_id)."";
- 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_id is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
return false;
}
- 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_id is not named in camelCase. Open
public static function make_available_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='1'
WHERE id = ".intval($language_id)."";
- 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_path is not named in camelCase. Open
public static function get_parent_language_path($language_path)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT dokeos_folder
FROM ".$tbl_admin_languages."
- 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
Method name "SubLanguageManager::write_data_in_file" is not in camel caps format Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
- Exclude checks
Variable "new_term" is not in valid camel caps format Open
$new_data = $new_variable.'='.$new_term;
- Exclude checks
Variable "path_file" is not in valid camel caps format Open
if (file_exists($path_file) && $resource) {
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$sql = 'SELECT * FROM '.$table.' WHERE id = "'.intval($parent_id).'"';
- Exclude checks
Variable "get_as_string_index" is not in valid camel caps format Open
if ($get_as_string_index) { //remove the prefix $
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
WHERE id = '.intval($language_id).' AND NOT ISNULL(parent_id)';
- Exclude checks
Variable "system_path_file" is not in valid camel caps format Open
public static function add_file_in_language_directory($system_path_file)
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function check_if_exist_language_by_id($language_id)
- Exclude checks
Variable "all_information" is not in valid camel caps format Open
$all_information = [];
- Exclude checks
Variable "info_file" is not in valid camel caps format Open
$info_file = file($system_path_file);
- Exclude checks
Variable "system_path_file" is not in valid camel caps format Open
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
- Exclude checks
Variable "return_value" is not in valid camel caps format Open
$return_value = false;
- Exclude checks
Variable "return_value" is not in valid camel caps format Open
$return_value = true;
- Exclude checks
Method name "SubLanguageManager::check_if_exist_language_by_id" is not in camel caps format Open
public static function check_if_exist_language_by_id($language_id)
- Exclude checks
Method name "SubLanguageManager::get_name_of_language_by_id" is not in camel caps format Open
public static function get_name_of_language_by_id($language_id)
- Exclude checks
Method name "SubLanguageManager::check_if_language_is_sub_language" is not in camel caps format Open
public static function check_if_language_is_sub_language($language_id)
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
public static function get_all_information_of_language($parent_id)
- Exclude checks
Variable "system_path_file" is not in valid camel caps format Open
$info_file = file($system_path_file);
- Exclude checks
Variable "path_file" is not in valid camel caps format Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
- Exclude checks
Variable "path_file" is not in valid camel caps format Open
$resource = @fopen($path_file, "a");
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function check_if_language_is_used(int $language_id): bool
- Exclude checks
Variable "all_information" is not in valid camel caps format Open
$all_information = $row;
- Exclude checks
Variable "res_list" is not in valid camel caps format Open
$res_list = [];
- Exclude checks
Variable "res_list" is not in valid camel caps format Open
return $res_list;
- Exclude checks
Variable "res_list" is not in valid camel caps format Open
$res_list[$var] = $val;
- Exclude checks
Variable "return_value" is not in valid camel caps format Open
return $return_value;
- Exclude checks
Variable "return_value" is not in valid camel caps format Open
$return_value = false;
- Exclude checks
Variable "new_term" is not in valid camel caps format Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
WHERE id = $language_id";
- Exclude checks
Variable "content_dir" is not in valid camel caps format Open
$content_dir = [];
- Exclude checks
Variable "all_information" is not in valid camel caps format Open
return $all_information;
- Exclude checks
Variable "info_file" is not in valid camel caps format Open
foreach ($info_file as $line) {
- Exclude checks
Variable "new_variable" is not in valid camel caps format Open
$new_data = $new_variable.'='.$new_term;
- Exclude checks
Missing function doc comment Open
public function __construct()
- Exclude checks
Variable "only_main_name" is not in valid camel caps format Open
if ($only_main_name) {
- Exclude checks
Variable "content_dir" is not in valid camel caps format Open
$content_dir[] = substr($file, 0, strpos($file, '.inc.php'));
- Exclude checks
Variable "content_dir" is not in valid camel caps format Open
return $content_dir;
- Exclude checks
Variable "res_list" is not in valid camel caps format Open
return $res_list;
- Exclude checks
Missing blank line before return statement Open
return false;
- Exclude checks
Variable "all_languages" is not in valid camel caps format Open
return $all_languages;
- Exclude checks
Variable "language_info" is not in valid camel caps format Open
$language_info = self::get_all_information_of_language($language_id);
- Exclude checks
Variable "new_data" is not in valid camel caps format Open
if (false === fwrite($resource, $new_data.PHP_EOL)) {
- Exclude checks
Missing blank line before return statement Open
return false;
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
$language_id = intval($language_id);
- Exclude checks
Variable "content_dir" is not in valid camel caps format Open
$content_dir[] = $file;
- Exclude checks
Method name "SubLanguageManager::get_all_language_variable_in_file" is not in camel caps format Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
- Exclude checks
Variable "return_value" is not in valid camel caps format Open
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
- Exclude checks
Variable "get_as_string_index" is not in valid camel caps format Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
- Exclude checks
Variable "new_data" is not in valid camel caps format Open
$new_data = $new_variable.'='.$new_term;
- Exclude checks
Variable "system_path_file" is not in valid camel caps format Open
if (!is_readable($system_path_file)) {
- Exclude checks
Variable "return_value" is not in valid camel caps format Open
return $return_value;
- Exclude checks
Method name "SubLanguageManager::check_if_language_is_used" is not in camel caps format Open
public static function check_if_language_is_used(int $language_id): bool
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
$language_id = intval($language_id);
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function check_if_language_is_sub_language($language_id)
- Exclude checks
Method name "SubLanguageManager::get_lang_folder_files_list" is not in camel caps format Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
- Exclude checks
Variable "only_main_name" is not in valid camel caps format Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
- Exclude checks
Method name "SubLanguageManager::add_file_in_language_directory" is not in camel caps format Open
public static function add_file_in_language_directory($system_path_file)
- Exclude checks
Variable "all_languages" is not in valid camel caps format Open
$all_languages = [];
- Exclude checks
Variable "all_languages" is not in valid camel caps format Open
$all_languages[$row['english_name']] = $row;
- Exclude checks
Method name "SubLanguageManager::get_all_information_of_language" is not in camel caps format Open
public static function get_all_information_of_language($parent_id)
- Exclude checks
Variable "new_variable" is not in valid camel caps format Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
WHERE id="'.intval($language_id).'"';
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function get_name_of_language_by_id($language_id)
- Exclude checks
Variable "system_path_file" is not in valid camel caps format Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
- Exclude checks
Method name "SubLanguageManager::make_unavailable_language" is not in camel caps format Open
public static function make_unavailable_language($language_id)
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function set_platform_language($language_id)
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
if (empty($language_id) || (intval($language_id) != $language_id)) {
- Exclude checks
Variable "sql_update_2" is not in valid camel caps format Open
$result_2 = Database::query($sql_update_2);
- Exclude checks
Missing blank line before return statement Open
return $parts[0].'.'.$languageCodeParts[0];
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function check_if_language_is_father($language_id)
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function make_unavailable_language($language_id)
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
if (empty($language_id) || (intval($language_id) != $language_id)) {
- Exclude checks
Missing blank line before return statement Open
return substr($varName, 0, 25); // Limit to 15 characters
- Exclude checks
Method name "SubLanguageManager::get_platform_language_id" is not in camel caps format Open
public static function get_platform_language_id()
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
FROM ".$tbl_admin_languages."
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
WHERE id = ".intval($language_id)."";
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$sql = "UPDATE $tbl_admin_languages SET available='1'
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
if (empty($language_id) || (intval($language_id) != $language_id)) {
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$sql = "SELECT id FROM $tbl_admin_languages WHERE english_name ='$name'";
- Exclude checks
Variable "language_info" is not in valid camel caps format Open
WHERE locale ="'.Database::escape_string($language_info['english_name']).'" AND active <> '.USER_SOFT_DELETED;
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
WHERE id = $language_id";
- Exclude checks
Variable "language_path" is not in valid camel caps format Open
WHERE dokeos_folder = '".Database::escape_string($language_path)."'
- Exclude checks
Missing blank line before return statement Open
return api_get_path(SYS_PATH) . $path . $filename;
- Exclude checks
Declare public methods first,then protected ones and finally private ones Open
public static function updateOrAddMsgid($filename, $msgid, $content): array
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
public static function make_available_language($language_id)
- Exclude checks
Expected 4 spaces after parameter name; 5 found Open
* @param string $msgid Message identifier to search or add
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$sql = "UPDATE $tbl_admin_languages SET available='0'
- Exclude checks
Expected 1 spaces after parameter name; 2 found Open
* @param string $filename Name of the .po file
- Exclude checks
Method name "SubLanguageManager::set_platform_language" is not in camel caps format Open
public static function set_platform_language($language_id)
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
- Exclude checks
Expected 2 spaces after parameter name; 3 found Open
* @param string $content Associated message content
- Exclude checks
Add a comma after each item in a multi-line array Open
$messageInformation = [
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$sql = "SELECT * FROM $tbl_admin_languages
- Exclude checks
Variable "result_2" is not in valid camel caps format Open
$result_2 = Database::query($sql_update_2);
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
SELECT parent_id FROM ".$tbl_admin_languages."
- Exclude checks
Add a comma after each item in a multi-line array Open
$subLanguage = $languageRepository->findOneBy([
- Exclude checks
Method name "SubLanguageManager::check_if_language_is_father" is not in camel caps format Open
public static function check_if_language_is_father($language_id)
- Exclude checks
Variable "tbl_settings_current" is not in valid camel caps format Open
$tbl_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS);
- Exclude checks
Add a comma after each item in a multi-line array Open
$entry = [
- Exclude checks
Blank line found at start of control structure Open
} catch (Exception $e) {
- Exclude checks
Declare public methods first,then protected ones and finally private ones Open
public static function checkIfLanguageExists(string $originalName, string $englishName, string $isoCode): array
- Exclude checks
Method name "SubLanguageManager::make_available_language" is not in camel caps format Open
public static function make_available_language($language_id)
- Exclude checks
Variable "result_2" is not in valid camel caps format Open
return false !== $result_2;
- Exclude checks
Method name "SubLanguageManager::get_parent_language_path" is not in camel caps format Open
public static function get_parent_language_path($language_path)
- Exclude checks
Expected 1 spaces after parameter name; 2 found Open
* @param int $languageId The ID of the language to search in.
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
WHERE parent_id= '.intval($language_id).' AND NOT ISNULL(parent_id);';
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
WHERE id = ".intval($language_id)."";
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
$language_id = intval($language_id);
- Exclude checks
Variable "tbl_settings_current" is not in valid camel caps format Open
$sql_update_2 = "UPDATE $tbl_settings_current SET selected_value = '".$lang['isocode']."'
- Exclude checks
Expected 7 spaces after parameter name; 8 found Open
* @param string $term The term to search for.
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
$language_id = intval($language_id);
- Exclude checks
Variable "sql_update_2" is not in valid camel caps format Open
$sql_update_2 = "UPDATE $tbl_settings_current SET selected_value = '".$lang['isocode']."'
- Exclude checks
Variable "language_id" is not in valid camel caps format Open
$language_info = self::get_all_information_of_language($language_id);
- Exclude checks
Variable "tbl_admin_languages" is not in valid camel caps format Open
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
- Exclude checks
Variable "language_path" is not in valid camel caps format Open
public static function get_parent_language_path($language_path)
- Exclude checks
Missing function doc comment Open
public static function generateSublanguageCode(string $parentCode, string $variant, int $maxLength = 10): string
- Exclude checks
The variable $all_languages is not named in camelCase. Open
public static function getAllLanguages($onlyActive = false)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table;
if ($onlyActive) {
- 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 $all_languages is not named in camelCase. Open
public static function getAllLanguages($onlyActive = false)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table;
if ($onlyActive) {
- 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 $res_list is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $system_path_file is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $only_main_name is not named in camelCase. Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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 $new_data is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $system_path_file is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $new_variable is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $new_term is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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_id is not named in camelCase. Open
public static function check_if_language_is_used(int $language_id): bool
{
$language_info = self::get_all_information_of_language($language_id);
$table = Database::get_main_table(TABLE_MAIN_USER);
$sql = 'SELECT count(*) AS count FROM '.$table.'
- 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 $all_information is not named in camelCase. Open
public static function get_all_information_of_language($parent_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table.' WHERE id = "'.intval($parent_id).'"';
$rs = Database::query($sql);
- 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_id is not named in camelCase. Open
public static function check_if_language_is_sub_language($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) AS count FROM '.$table.'
WHERE id = '.intval($language_id).' AND NOT ISNULL(parent_id)';
- 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_id is not named in camelCase. Open
public static function check_if_language_is_father($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) AS count FROM '.$table.'
WHERE parent_id= '.intval($language_id).' AND NOT ISNULL(parent_id);';
- 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 $content_dir is not named in camelCase. Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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 $res_list is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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_info is not named in camelCase. Open
public static function check_if_language_is_used(int $language_id): bool
{
$language_info = self::get_all_information_of_language($language_id);
$table = Database::get_main_table(TABLE_MAIN_USER);
$sql = 'SELECT count(*) AS count FROM '.$table.'
- 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 $content_dir is not named in camelCase. Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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 $res_list is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $res_list is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $return_value is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $path_file is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $return_value is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $return_value is not named in camelCase. Open
public static function add_file_in_language_directory($system_path_file)
{
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
return $return_value;
- 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_id is not named in camelCase. Open
public static function get_name_of_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$language_id = intval($language_id);
$sql = "SELECT original_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 $path_file is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $info_file is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $system_path_file is not named in camelCase. Open
public static function add_file_in_language_directory($system_path_file)
{
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
return $return_value;
- 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 $content_dir is not named in camelCase. Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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 $all_information is not named in camelCase. Open
public static function get_all_information_of_language($parent_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table.' WHERE id = "'.intval($parent_id).'"';
$rs = Database::query($sql);
- 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 $new_data is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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_info is not named in camelCase. Open
public static function check_if_language_is_used(int $language_id): bool
{
$language_info = self::get_all_information_of_language($language_id);
$table = Database::get_main_table(TABLE_MAIN_USER);
$sql = 'SELECT count(*) AS count FROM '.$table.'
- 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 $all_languages is not named in camelCase. Open
public static function getAllLanguages($onlyActive = false)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table;
if ($onlyActive) {
- 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 $parent_id is not named in camelCase. Open
public static function get_all_information_of_language($parent_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table.' WHERE id = "'.intval($parent_id).'"';
$rs = Database::query($sql);
- 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 $all_information is not named in camelCase. Open
public static function get_all_information_of_language($parent_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table.' WHERE id = "'.intval($parent_id).'"';
$rs = Database::query($sql);
- 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 $get_as_string_index is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 $return_value is not named in camelCase. Open
public static function add_file_in_language_directory($system_path_file)
{
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
return $return_value;
- 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 $return_value is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 $return_value is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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_id is not named in camelCase. Open
public static function check_if_exist_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) as count
FROM '.$table.'
- 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_id is not named in camelCase. Open
public static function get_name_of_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$language_id = intval($language_id);
$sql = "SELECT original_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 $content_dir is not named in camelCase. Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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 $info_file is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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_id is not named in camelCase. Open
public static function get_name_of_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$language_id = intval($language_id);
$sql = "SELECT original_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 $language_id is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_admin_languages is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_settings_current is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $language_id is not named in camelCase. Open
public static function make_unavailable_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='0'
WHERE id = ".intval($language_id)."";
- 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_id is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_admin_languages is not named in camelCase. Open
public static function get_parent_language_path($language_path)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT dokeos_folder
FROM ".$tbl_admin_languages."
- 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_id is not named in camelCase. Open
public static function make_available_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='1'
WHERE id = ".intval($language_id)."";
- 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_id is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $language_id is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_admin_languages is not named in camelCase. Open
public static function make_unavailable_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='0'
WHERE id = ".intval($language_id)."";
- 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 $tbl_admin_languages is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_admin_languages is not named in camelCase. Open
public static function get_parent_language_path($language_path)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT dokeos_folder
FROM ".$tbl_admin_languages."
- 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_2 is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_admin_languages is not named in camelCase. Open
public static function get_platform_language_id()
{
$name = api_get_setting('platformLanguage');
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT id FROM $tbl_admin_languages WHERE english_name ='$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 $language_path is not named in camelCase. Open
public static function get_parent_language_path($language_path)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT dokeos_folder
FROM ".$tbl_admin_languages."
- 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_id is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_settings_current is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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_2 is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $language_id is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $sql_update_2 is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_admin_languages is not named in camelCase. Open
public static function make_unavailable_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='0'
WHERE id = ".intval($language_id)."";
- 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 $tbl_admin_languages is not named in camelCase. Open
public static function make_available_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='1'
WHERE id = ".intval($language_id)."";
- 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 $tbl_admin_languages is not named in camelCase. Open
public static function make_available_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='1'
WHERE id = ".intval($language_id)."";
- 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 $sql_update_2 is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
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 $tbl_admin_languages is not named in camelCase. Open
public static function get_platform_language_id()
{
$name = api_get_setting('platformLanguage');
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT id FROM $tbl_admin_languages WHERE english_name ='$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 $tbl_admin_languages is not named in camelCase. Open
public static function get_parent_language_path($language_path)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT dokeos_folder
FROM ".$tbl_admin_languages."
- 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 add_file_in_language_directory is not named in camelCase. Open
public static function add_file_in_language_directory($system_path_file)
{
$return_value = @file_put_contents($system_path_file, '<?php'.PHP_EOL);
return $return_value;
- 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 write_data_in_file is not named in camelCase. Open
public static function write_data_in_file($path_file, $new_term, $new_variable)
{
$return_value = false;
$new_data = $new_variable.'='.$new_term;
$resource = @fopen($path_file, "a");
- 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 check_if_language_is_father is not named in camelCase. Open
public static function check_if_language_is_father($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) AS count FROM '.$table.'
WHERE parent_id= '.intval($language_id).' AND NOT ISNULL(parent_id);';
- 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_all_information_of_language is not named in camelCase. Open
public static function get_all_information_of_language($parent_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT * FROM '.$table.' WHERE id = "'.intval($parent_id).'"';
$rs = Database::query($sql);
- 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 check_if_exist_language_by_id is not named in camelCase. Open
public static function check_if_exist_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) as count
FROM '.$table.'
- 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 check_if_language_is_sub_language is not named in camelCase. Open
public static function check_if_language_is_sub_language($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = 'SELECT count(*) AS count FROM '.$table.'
WHERE id = '.intval($language_id).' AND NOT ISNULL(parent_id)';
- 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_name_of_language_by_id is not named in camelCase. Open
public static function get_name_of_language_by_id($language_id)
{
$table = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$language_id = intval($language_id);
$sql = "SELECT original_name
- 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_lang_folder_files_list is not named in camelCase. Open
public static function get_lang_folder_files_list($path, $only_main_name = false)
{
$content_dir = [];
if (is_dir($path)) {
if ($dh = opendir($path)) {
- 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 check_if_language_is_used is not named in camelCase. Open
public static function check_if_language_is_used(int $language_id): bool
{
$language_info = self::get_all_information_of_language($language_id);
$table = Database::get_main_table(TABLE_MAIN_USER);
$sql = 'SELECT count(*) AS count FROM '.$table.'
- 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_all_language_variable_in_file is not named in camelCase. Open
public static function get_all_language_variable_in_file($system_path_file, $get_as_string_index = false)
{
$res_list = [];
if (!is_readable($system_path_file)) {
return $res_list;
- 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 make_unavailable_language is not named in camelCase. Open
public static function make_unavailable_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='0'
WHERE id = ".intval($language_id)."";
- 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 set_platform_language is not named in camelCase. Open
public static function set_platform_language($language_id)
{
if (empty($language_id) || (intval($language_id) != $language_id)) {
return false;
}
- 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_platform_language_id is not named in camelCase. Open
public static function get_platform_language_id()
{
$name = api_get_setting('platformLanguage');
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT id FROM $tbl_admin_languages WHERE english_name ='$name'";
- 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_parent_language_path is not named in camelCase. Open
public static function get_parent_language_path($language_path)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "SELECT dokeos_folder
FROM ".$tbl_admin_languages."
- 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 make_available_language is not named in camelCase. Open
public static function make_available_language($language_id)
{
$tbl_admin_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql = "UPDATE $tbl_admin_languages SET available='1'
WHERE id = ".intval($language_id)."";
- 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() {
}
}