Code Duplication    Length = 6-6 lines in 2 locations

controllers/FrontendController.php 2 locations

@@ 43-48 (lines=6) @@
40
                $this->setClientAuth($device);
41
            }
42
43
            if (!$device->enabled) {
44
                // Render enable view
45
                return $this->render('err/authorize', [
46
                    'url' => Url::to(['device/view', 'id' => $device->id], true),
47
                ]);
48
            }
49
50
            $screen = $device->getNextScreen();
51
            if (!$screen) {
@@ 51-56 (lines=6) @@
48
            }
49
50
            $screen = $device->getNextScreen();
51
            if (!$screen) {
52
                // Render add screen view
53
                return $this->render('err/missing-screen', [
54
                    'url' => Url::to(['device/view', 'id' => $device->id], true),
55
                ]);
56
            }
57
58
            return $this->redirect(['screen', 'id' => $screen->id]);
59
        }