Showing 1,477 of 1,477 total issues
The parameter $table_link is not named in camelCase. Open
public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
{
return parent::cleanOrphan($this->db->prefix('tag_tag'), 'tag_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
Avoid variables with short names like $db. Configured minimum length is 3. Open
public function __construct(?\XoopsDatabase $db, Helper $helper)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $form_sort is not named in camelCase. Open
public static function selectSorting(string $text, string $form_sort): string
{
global $start, $order, $sort;
$selectView = '';
- 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 $_type is not named in camelCase. Open
class FormValidatedInput extends \XoopsFormText
{
/**
* Initial type
*
- 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
Avoid variables with short names like $id. Configured minimum length is 3. Open
public static function cloneRecord(string $tableName, string $idField, int $id): ?int
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The property $table_stats is not named in camelCase. Open
class TagHandler extends \XoopsPersistableObjectHandler
{
public $table_link;
public $table_stats;
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
The parameter $tag_id is not named in camelCase. Open
public function update_stats(int $tag_id, int $modid = 0, int $catid = 0): bool
{
if (0 === $tag_id) {
return true;
}
- Read upRead up
- Exclude checks
CamelCaseParameterName
Since: 0.2
It is considered best practice to use the camelCase notation to name parameters.
Example
class ClassName {
public function doSomething($user_name) {
}
}
Source
Avoid variables with short names like $db. Configured minimum length is 3. Open
public function __construct(?\XoopsMySQLDatabase $db = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
The parameter $field_link is not named in camelCase. Open
public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
{
return parent::cleanOrphan($this->db->prefix('tag_tag'), 'tag_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 $text_tag is not named in camelCase. Open
public static function tag_parse_tag(string $text_tag): array
{
$tags = [];
if (!empty($text_tag)) {
$delimiters = self::tag_get_delimiter();
- 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 $tag_id is not named in camelCase. Open
public function getItemCount(int $tag_id, int $modid = 0, int $catid = 0): int
{
$ret = 0;
if ($tag_id = $tag_id) {
$sql_select = ' SELECT COUNT(DISTINCT o.tl_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
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 30 and the first side effect is on line 23. Open
<?php declare(strict_types=1);
- Exclude checks
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 26 and the first side effect is on line 24. Open
<?php declare(strict_types=1);
- Exclude checks
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 90 and the first side effect is on line 26. Open
<?php declare(strict_types=1);
- Exclude checks
The parameter $font_max is not named in camelCase. Open
public function getTagData(array $tags_array, int $font_max = 0, int $font_min = 0): array
{
// $tags_data_array = [];
// if (\is_array($tags_array) && !empty($tags_array)) {
// // set min and max tag count
- 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 $args_string is not named in camelCase. Open
public static function tag_parse_args(&$args, &$args_string): bool
{
$args_abb = [
'c' => 'catid',
'm' => 'modid',
- 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
A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 21 and the first side effect is on line 32. Open
<?php declare(strict_types=1);
- Exclude checks
The parameter $tags_array is not named in camelCase. Open
public function getTagData(array $tags_array, int $font_max = 0, int $font_min = 0): array
{
// $tags_data_array = [];
// if (\is_array($tags_array) && !empty($tags_array)) {
// // set min and max tag count
- 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 $table_link is not named in camelCase. Open
public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
{
require_once $GLOBALS['xoops']->path('/modules/tag/functions.recon.php');
//mod_loadFunctions("recon");
- 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 $field_object is not named in camelCase. Open
public function cleanOrphan($table_link = '', $field_link = '', $field_object = ''): bool
{
require_once $GLOBALS['xoops']->path('/modules/tag/functions.recon.php');
//mod_loadFunctions("recon");
- 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) {
}
}