mageni/mageni

View on GitHub

Showing 76 of 145 total issues

Function modifySchedule has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public function modifySchedule($data, $id = null)
    {
        /**
         * Set Permissions
         */
Severity: Minor
Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 55 mins to fix

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 passes has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function passes($attribute, $value)
    {
        Log::info('Processing SSH Key Validation');

        if(empty($value)) {
Severity: Minor
Found in src/frontend/app/Rules/ValidateSSHKey.php - About 45 mins to fix

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 thirdStepSubmit has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function thirdStepSubmit(): int
    {
        if($this->toggleSSHCredentials === 'Yes' ||
            $this->toggleSSHCredentials === 'Create' || 
            $this->toggleSSHCredentials === 'Modify' || 
Severity: Minor
Found in src/frontend/app/Http/Livewire/Traits/MultiStepForm.php - About 45 mins to fix

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 modifyuk has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function modifyuk($id, $description, $login, $phrase, $key)
Severity: Minor
Found in src/frontend/app/Http/Livewire/Classes/SSH.php - About 35 mins to fix

    Method createuk has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function createuk($description, $type, $login, $phrase, $key)
    Severity: Minor
    Found in src/frontend/app/Http/Livewire/Classes/SSH.php - About 35 mins to fix

      Method modify has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function modify($id, $description, $timezone, $startdate, $frequency)
      Severity: Minor
      Found in src/frontend/app/Http/Livewire/Classes/Schedule.php - About 35 mins to fix

        Method create has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function create($description, $timezone, $startdate, $frequency, $recurrence = null)
        Severity: Minor
        Found in src/frontend/app/Http/Livewire/Classes/Schedule.php - About 35 mins to fix

          Function modifySMB has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function modifySMB($data, $id = null)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 unlockScan has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function unlockScan($data, $id)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 createSchedule has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createSchedule($data)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 createAlert has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createAlert($data)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 stopScan has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function stopScan($data, $id)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 modifyAlert has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function modifyAlert($data)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 cloneScan has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function cloneScan($data, $id)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 createSMB has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createSMB($data)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 createPorts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createPorts($data)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 lockScan has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function lockScan($data, $id)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 deleteSchedule has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function deleteSchedule($data, $id)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 createScan has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function createScan($data)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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 deleteScan has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function deleteScan($data, $id)
              {
                  /**
                   * Set Permissions
                   */
          Severity: Minor
          Found in src/frontend/app/Http/Livewire/Classes/Socket.php - About 35 mins to fix

          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

          Severity
          Category
          Status
          Source
          Language