src/Models/PlanSubscription.php
The class PlanSubscription has an overall complexity of 52 which is very high. The configured complexity threshold is 50. Open
Open
class PlanSubscription extends Model
{
use HasSlug;
use HasFactory;
use SoftDeletes;
- Create a ticketCreate a ticket
- Exclude checks
PlanSubscription
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class PlanSubscription extends Model
{
use HasSlug;
use HasFactory;
use SoftDeletes;
- Create a ticketCreate a ticket
File PlanSubscription.php
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
declare(strict_types=1);
namespace Rinvex\Subscriptions\Models;
- Create a ticketCreate a ticket
Avoid excessively long variable names like $throwValidationExceptions. Keep variable name length under 20. Open
Open
protected $throwValidationExceptions = true;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
LongVariable
Since: 0.2
Detects when a field, formal or local variable is declared with a long name.
Example
class Something {
protected $reallyLongIntName = -3; // VIOLATION - Field
public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
$otherReallyLongName = -5; // VIOLATION - Local
for ($interestingIntIndex = 0; // VIOLATION - For
$interestingIntIndex < 10;
$interestingIntIndex++ ) {
}
}
}
Source https://phpmd.org/rules/naming.html#longvariable
The parameter $invoice_period is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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 $invoice_interval is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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 variable $invoice_interval is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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 $invoice_period is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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 $invoice_interval is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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 $invoice_period is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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 $invoice_interval is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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 $invoice_period is not named in camelCase. Open
Open
protected function setNewPeriod($invoice_interval = '', $invoice_period = '', $start = '')
{
if (empty($invoice_interval)) {
$invoice_interval = $this->plan->invoice_interval;
}
- Read upRead up
- Create a ticketCreate a ticket
- 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();
}
}