Showing 15 of 28 total issues
Function handle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function handle()
{
$drivers_parameter = $this->option('driver');
$drivers = collect(array_keys(config('seat-connector.drivers')));
- 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"
Further reading
Function handle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function handle()
{
$drivers_parameter = $this->option('driver');
$drivers = collect(array_keys(config('seat-connector.drivers')));
$terminator = $this->option('terminator') ?: false;
- 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"
Further reading
Function notifyDrivers
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function notifyDrivers(SeatUser $user): void
{
// extract registered drivers from the configuration stack
$drivers = collect(array_keys(config('seat-connector.drivers')));
- 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"
Further reading
Method notifyDrivers
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function notifyDrivers(SeatUser $user): void
{
// extract registered drivers from the configuration stack
$drivers = collect(array_keys(config('seat-connector.drivers')));
Method up
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function up(): void
{
DB::table('seat_connector_users')
->select('group_id')
->orderBy('group_id')
Method index
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function index(AccessDataTable $datatable)
{
$filter_type = '';
// retrieve all registered SeAT Connector drivers
Method handle
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$drivers_parameter = $this->option('driver');
$drivers = collect(array_keys(config('seat-connector.drivers')));
$terminator = $this->option('terminator') ?: false;
Method destroy
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function destroy(int $id)
{
// attempt to retrieve requested identity
$identity = User::find($id);
Method handle
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function handle()
{
$drivers_parameter = $this->option('driver');
$drivers = collect(array_keys(config('seat-connector.drivers')));
Function handle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function handle()
{
$config_key = sprintf('seat-connector.drivers.%s.client', $this->driver);
$client = config($config_key);
- 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"
Further reading
Function index
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function index(AccessDataTable $datatable)
{
$filter_type = '';
// retrieve all registered SeAT Connector drivers
- 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"
Further reading
Avoid too many return
statements within this method. Open
return 'alliances';
Avoid too many return
statements within this method. Open
return 'squads';
Avoid too many return
statements within this method. Open
return $class_name;
Function destroy
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function destroy(int $id)
{
// attempt to retrieve requested identity
$identity = User::find($id);
- 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"