Showing 7 of 7 total issues
Method parse
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function parse($startOrShortcut = null, $end = null) {
if (! $startOrShortcut) {
$startOrShortcut = 'currentYear';
}
Avoid too many return
statements within this method. Open
Open
return new DateFilter(
'default',
new Carbon($startOrShortcut),
null
);
Avoid too many return
statements within this method. Open
Open
return new DateFilter(
$startOrShortcut,
Carbon::now()->startOfYear(),
Carbon::now()->endOfYear()
);
Avoid too many return
statements within this method. Open
Open
return new DateFilter(
'default',
new Carbon($startOrShortcut),
new Carbon($end)
);
Avoid too many return
statements within this method. Open
Open
return [
new Carbon($startOrShortcut),
new Carbon($end),
];
Avoid too many return
statements within this method. Open
Open
return [
Carbon::now()->startOfYear(),
Carbon::now()->endOfYear()
];
Avoid too many return
statements within this method. Open
Open
return [
new Carbon($startOrShortcut),
null
];