Showing 85 of 85 total issues
Appointment
has 55 functions (exceeds 20 allowed). Consider refactoring. Open
class Appointment extends EloquentModel implements HasPresenter
{
/**
* The attributes that are mass assignable.
*
File Appointment.php
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Timegridio\Concierge\Models;
use Carbon\Carbon;
The class Appointment has 28 non-getter- and setter-methods. Consider refactoring Appointment to keep number of methods under 25. Open
class Appointment extends EloquentModel implements HasPresenter
{
/**
* The attributes that are mass assignable.
*
- Read upRead up
- Exclude checks
TooManyMethods
Since: 0.1
A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
The default was changed from 10 to 25 in PHPMD 2.3.
Example
Source https://phpmd.org/rules/codesize.html#toomanymethods
The class Appointment has 28 public methods. Consider refactoring Appointment to keep number of public methods under 10. Open
class Appointment extends EloquentModel implements HasPresenter
{
/**
* The attributes that are mass assignable.
*
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class Timetable has 12 public methods. Consider refactoring Timetable to keep number of public methods under 10. Open
class Timetable
{
/**
* Timetable matrix.
*
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class Appointment has an overall complexity of 84 which is very high. The configured complexity threshold is 50. Open
class Appointment extends EloquentModel implements HasPresenter
{
/**
* The attributes that are mass assignable.
*
- Exclude checks
The class AppointmentPresenter has 15 public methods. Consider refactoring AppointmentPresenter to keep number of public methods under 10. Open
class AppointmentPresenter extends BasePresenter
{
protected $timezone = null;
public function __construct(Appointment $resource)
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class Business has 12 public methods. Consider refactoring Business to keep number of public methods under 10. Open
class Business extends EloquentModel implements HasPresenter
{
use SoftDeletes, Preferenceable, IsIntoDomain;
/**
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
The class VacancyParser has 13 public methods. Consider refactoring VacancyParser to keep number of public methods under 10. Open
class VacancyParser
{
const REGEX_PATTERN_VACANCY = '/(?P<services>.*)\n\ (?P<days>.*)\n\ \ (?<hours>.*)/im';
/////////////////////
- Read upRead up
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
Business
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class Business extends EloquentModel implements HasPresenter
{
use SoftDeletes, Preferenceable, IsIntoDomain;
/**
Method takeReservation
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function takeReservation(array $request)
{
$issuer = $request['issuer'];
$service = $request['service'];
$contact = $request['contact'];
Method format
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function format($format = [])
{
$this->tempInterval = $this->interval;
$hours = $this->getHours(PHP_ROUND_HALF_DOWN);
$this->interval = $this->tempInterval % (1000 * 60 * 60);
Avoid using undefined variables such as '$dimensions' which will lead to PHP notices. Open
foreach ($dimensions['date'] as $date) {
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$dimensions' which will lead to PHP notices. Open
foreach ($dimensions['service'] as $service) {
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$dimensions' which will lead to PHP notices. Open
$dimensions['service'] = $this->inflateServices();
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$dates' which will lead to PHP notices. Open
return $dates;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
The class Appointment has 55 public methods and attributes. Consider reducing the number of public items to less than 45. Open
class Appointment extends EloquentModel implements HasPresenter
{
/**
* The attributes that are mass assignable.
*
- Read upRead up
- Exclude checks
ExcessivePublicCount
Since: 0.1
A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.
Example
public class Foo {
public $value;
public $something;
public $var;
// [... more more public attributes ...]
public function doWork() {}
public function doMoreWork() {}
public function doWorkAgain() {}
// [... more more public methods ...]
}
Source https://phpmd.org/rules/codesize.html#excessivepubliccount
Avoid using undefined variables such as '$dimensions' which will lead to PHP notices. Open
foreach ($dimensions['time'] as $time) {
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$dimensions' which will lead to PHP notices. Open
$dimensions['time'] = $this->inflateTimes();
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}
Source https://phpmd.org/rules/cleancode.html#undefinedvariable
Avoid using undefined variables such as '$dates' which will lead to PHP notices. Open
$dates[$date] = $date;
- Read upRead up
- Exclude checks
UndefinedVariable
Since: 2.8.0
Detects when a variable is used that has not been defined before.
Example
class Foo
{
private function bar()
{
// $message is undefined
echo $message;
}
}