GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 14-14 lines in 2 locations

app/Services/MmexService.php 2 locations

@@ 127-140 (lines=14) @@
124
        }
125
    }
126
127
    private function createOrGetCategory($name)
128
    {
129
        $existingCategory = Category::whereName($name)->first();
130
131
        if ($existingCategory) {
132
            return $existingCategory;
133
        }
134
135
        $newCategory = Category::create([
136
            'name' => $name,
137
        ]);
138
139
        return $newCategory;
140
    }
141
142
    private function createOrGetSubCategory(Category $parentCategory, $name)
143
    {
@@ 142-155 (lines=14) @@
139
        return $newCategory;
140
    }
141
142
    private function createOrGetSubCategory(Category $parentCategory, $name)
143
    {
144
        $existingCategory = Category::whereName($name)->first();
145
146
        if ($existingCategory) {
147
            return $existingCategory;
148
        }
149
150
        $newCategory = $parentCategory->subCategories()->create([
151
            'name' => $name,
152
        ]);
153
154
        return $newCategory;
155
    }
156
157
    public function deleteTransactions($transactionId)
158
    {