application/inc/Models/Page.php
Page
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Page extends AbstractRenderable implements InterfaceRichText
{
use HasIcon;
/** Table name in database. */
File Page.php
has 326 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace App\Models;
use App\Exceptions\Exception;
The class Page has an overall complexity of 60 which is very high. The configured complexity threshold is 50. Open
Open
class Page extends AbstractRenderable implements InterfaceRichText
{
use HasIcon;
/** Table name in database. */
- Exclude checks
Avoid variables with short names like $db. Configured minimum length is 3. Open
Open
$db = app(DbService::class);
- 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
Avoid variables with short names like $db. Configured minimum length is 3. Open
Open
$db = app(DbService::class);
- 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
Avoid variables with short names like $db. Configured minimum length is 3. Open
Open
$db = app(DbService::class);
- 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
Line exceeds 120 characters; contains 131 characters Open
Open
app(DbService::class)->query('DELETE FROM `bind` WHERE `side` = ' . $this->getId() . ' AND `kat` = ' . $category->getId());
- Exclude checks