Code Duplication    Length = 5-5 lines in 2 locations

src/Commands/ListChecks.php 2 locations

@@ 60-64 (lines=5) @@
57
58
    protected function getTableRows(Collection $checks): array
59
    {
60
        if ($hostName = $this->option('host')) {
61
            $checks = $checks->filter(function (Check $check) use ($hostName) {
62
                return $check->host->name === $hostName;
63
            });
64
        }
65
66
        if ($checkType = $this->option('check')) {
67
            $checks = $checks->filter(function (Check $check) use ($checkType) {
@@ 66-70 (lines=5) @@
63
            });
64
        }
65
66
        if ($checkType = $this->option('check')) {
67
            $checks = $checks->filter(function (Check $check) use ($checkType) {
68
                return $check->type === $checkType;
69
            });
70
        }
71
72
        return $checks
73
            ->map(function (Check $check) {