Showing 6 of 76 total issues
DevicesControllerTest
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DevicesControllerTest extends DevicesControllerTestCase
{
public function testDevices_GivenUserNotLoggedIn_RedirectToLogin(): void
{
$response = $this->get('/devices');
File DevicesControllerTest.php
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
namespace Tests\Unit\Controller\Web;
use App\Device;
DevicesControllerTest
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class DevicesControllerTest extends DevicesControllerTestCase
{
private $mockDeviceRepository;
private $mockUser;
private $messageId;
Method testDevices_GivenUserLoggedIn_EditsDevice_DevicesUpdatedOnPage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testDevices_GivenUserLoggedIn_EditsDevice_DevicesUpdatedOnPage(): void
{
$this->browse(function (Browser $browser) {
$deviceName = self::$faker->word();
$deviceDescription = self::$faker->sentence();
Method testDevices_GivenUserLoggedIn_ClicksEditDeviceButton_OpensEditDeviceModal
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function testDevices_GivenUserLoggedIn_ClicksEditDeviceButton_OpensEditDeviceModal(): void
{
$this->browse(function (Browser $browser) {
$deviceName = self::$faker->word();
$deviceDescription = self::$faker->sentence();
Method loginAndAddDevice
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private function loginAndAddDevice(Browser $browser, string $deviceName, string $deviceDescription, int $onCode, int $offCode, int $pulseLength) : Browser