Code Duplication    Length = 4-5 lines in 2 locations

src/Traits/Post/PostCategoryScopes.php 2 locations

@@ 57-60 (lines=4) @@
54
        ]);
55
56
        // Search by field and value
57
        if (count($options) == 2) {
58
            $collection = $collection->replace(['field' => $options[0]])
59
          ->replace(['value' => $options[1]]);
60
        }
61
62
        // Search by field, operator and value
63
        if (count($options) == 3) {
@@ 63-67 (lines=5) @@
60
        }
61
62
        // Search by field, operator and value
63
        if (count($options) == 3) {
64
            $collection = $collection->replace(['field' => $options[0]])
65
          ->replace(['operator' => $options[1]])
66
          ->replace(['value' => $options[2]]);
67
        }
68
69
        $query->with('category');
70