Showing 17 of 17 total issues
The class PlanSubscription has an overall complexity of 52 which is very high. The configured complexity threshold is 50. 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
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
<?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
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
Avoid excessively long variable names like $throwValidationExceptions. Keep variable name length under 20. 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
Avoid excessively long variable names like $throwValidationExceptions. Keep variable name length under 20. 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
Avoid excessively long variable names like $throwValidationExceptions. Keep variable name length under 20. 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
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
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
Method morphMany
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);
- Create a ticketCreate a ticket
The variable $invoice_interval is not named in camelCase. 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
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
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
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 $plan_feature is not named in camelCase. Open
protected static function boot()
{
parent::boot();
static::deleted(function ($plan_feature) {
- 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
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
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();
}
}