Code Duplication    Length = 5-5 lines in 2 locations

src/Commands/ListChecks.php 2 locations

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