Showing 76 of 145 total issues
Method stopScan
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function stopScan($data, $id)
{
/**
* Set Permissions
*/
Method lockScan
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function lockScan($data, $id)
{
/**
* Set Permissions
*/
Method createSMB
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function createSMB($data)
{
/**
* Set Permissions
*/
Method modify
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
public function modify($id, $name, $description, $template, $target, $ordering, $maxtests, $maxhosts, $scanner, $schedule = null, $alert = null): bool
Method getRowsQueryProperty
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getRowsQueryProperty()
{
$this->getReport = Reports::where('task', '=', $this->task)
->select('id')
->orderBy('id', 'DESC')
Method saveEditUser
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function saveEditUser($id)
{
$this->authorize('edit_users');
if($this->togglePasswordReset === 'Yes')
Method thirdStepSubmit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function thirdStepSubmit(): int
{
if($this->toggleSSHCredentials === 'Yes' ||
$this->toggleSSHCredentials === 'Create' ||
$this->toggleSSHCredentials === 'Modify' ||
Method passes
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function passes($attribute, $value)
{
Log::info('Processing SSH Key Validation');
if(empty($value)) {
Method create
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function create($name, $description, $template, $target, $ordering, $maxtests, $maxhosts, $scanner, $schedule = null, $alert = null): bool
Method modify
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function modify($id, $description, $targets, $ports, $alive, $exclude = null, $port_list = null, $ssh_cred = null, $ssh_port = null, $smb_cred = null)
Function up
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function up()
{
$tableNames = config('permission.table_names');
$columnNames = config('permission.column_names');
$teams = config('permission.teams');
- 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 create
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
public function create($description, $targets, $ports, $alive, $exclude = null, $port_list = null, $ssh_cred = null, $ssh_port = null, $smb_cred = null)
Method render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function render(Request $request)
{
// dd($request);
return view('livewire.dashboard.page', [
Function modifyAsset
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function modifyAsset($data, $id = null)
{
/**
* Set Permissions
*/
- 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 modifyScan
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function modifyScan($data, $id = null)
{
/**
* Set Permissions
*/
- 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 startScan
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function startScan($data, $id)
{
/**
* Set Permissions
*/
- 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 resumeScan
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function resumeScan($data, $id)
{
/**
* Set Permissions
*/
- 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 modifySSH
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function modifySSH($data, $id = null)
{
/**
* Set Permissions
*/
- 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 createSSH
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function createSSH($data)
{
/**
* Set Permissions
*/
- 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 createAsset
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public function createAsset($data)
{
/**
* Set Permissions
*/
- 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"