dbudwin/RoboHome-Web

View on GitHub

Showing 6 of 76 total issues

DevicesControllerTest has 32 functions (exceeds 20 allowed). Consider refactoring.
Open

class DevicesControllerTest extends DevicesControllerTestCase
{
    public function testDevices_GivenUserNotLoggedIn_RedirectToLogin(): void
    {
        $response = $this->get('/devices');
Severity: Minor
Found in tests/Unit/Controller/Web/DevicesControllerTest.php - About 4 hrs to fix

    File DevicesControllerTest.php has 291 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Tests\Unit\Controller\Web;
    
    use App\Device;
    Severity: Minor
    Found in tests/Unit/Controller/Web/DevicesControllerTest.php - About 3 hrs to fix

      DevicesControllerTest has 22 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class DevicesControllerTest extends DevicesControllerTestCase
      {
          private $mockDeviceRepository;
          private $mockUser;
          private $messageId;
      Severity: Minor
      Found in tests/Unit/Controller/API/DevicesControllerTest.php - About 2 hrs to fix

        Method testDevices_GivenUserLoggedIn_EditsDevice_DevicesUpdatedOnPage has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function testDevices_GivenUserLoggedIn_EditsDevice_DevicesUpdatedOnPage(): void
            {
                $this->browse(function (Browser $browser) {
                    $deviceName = self::$faker->word();
                    $deviceDescription = self::$faker->sentence();
        Severity: Minor
        Found in tests/Browser/DevicesTest.php - About 1 hr to fix

          Method testDevices_GivenUserLoggedIn_ClicksEditDeviceButton_OpensEditDeviceModal has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testDevices_GivenUserLoggedIn_ClicksEditDeviceButton_OpensEditDeviceModal(): void
              {
                  $this->browse(function (Browser $browser) {
                      $deviceName = self::$faker->word();
                      $deviceDescription = self::$faker->sentence();
          Severity: Minor
          Found in tests/Browser/DevicesTest.php - About 1 hr to fix

            Method loginAndAddDevice has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                private function loginAndAddDevice(Browser $browser, string $deviceName, string $deviceDescription, int $onCode, int $offCode, int $pulseLength) : Browser
            Severity: Minor
            Found in tests/Browser/DevicesTest.php - About 45 mins to fix
              Severity
              Category
              Status
              Source
              Language