Showing 105 of 127 total issues
Avoid too many return
statements within this method. Open
Open
return $default;
Avoid too many return
statements within this method. Open
Open
return 'voyager.'.$bread->slug.'.restore';
Avoid too many return
statements within this method. Open
Open
return $file;
Avoid too many return
statements within this method. Open
Open
return response()->json($files->values());
Avoid too many return
statements within this method. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return $settings;
Avoid too many return
statements within this method. Open
Open
return $item->{$column};
Avoid too many return
statements within this method. Open
Open
return $this->settings;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return;
Avoid too many return
statements within this method. Open
Open
return !Str::contains(Str::lower($file['file']['url']), $exclude);
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this method. Open
Open
return $value;
Avoid too many return
statements within this method. Open
Open
return [
'pages' => ceil($count / $perPage),
'data' => $data->values(),
'selected' => $selected->values()
];
Avoid too many return
statements within this method. Open
Open
return 'voyager.'.$bread->slug.'.delete';
Avoid too many return
statements within this function. Open
Open
return true;
Avoid too many return
statements within this method. Open
Open
return $file['file']['type'] == 'directory' ? 0 : 99999999;
Avoid too many return
statements within this method. Open
Open
return new Voyager($this->breadmanager, $this->menumanager, $this->pluginmanager, $this->settingmanager);
Avoid too many return
statements within this method. Open
Open
return [
'key' => $key,
'value' => $translatable ? VoyagerFacade::translate($value) : $value
];
Function handle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
public function handle(SettingManager $settingmanager)
{
if ($settingmanager->getSettingsByKey('admin.dev-server')->count() != 1) {
$this->error('Setting "admin.dev-server" does not exist. Please seed the default settings!');
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"