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

@@ 111-124 (lines=14) @@
108
        }
109
    }
110
111
    private function createOrGetCategory($name)
112
    {
113
        $existingCategory = Category::whereName($name)->first();
114
115
        if ($existingCategory) {
116
            return $existingCategory;
117
        }
118
119
        $newCategory = Category::create([
120
            'name' => $name,
121
        ]);
122
123
        return $newCategory;
124
    }
125
126
    private function createOrGetSubCategory(Category $parentCategory, $name)
127
    {
@@ 126-139 (lines=14) @@
123
        return $newCategory;
124
    }
125
126
    private function createOrGetSubCategory(Category $parentCategory, $name)
127
    {
128
        $existingCategory = Category::whereName($name)->first();
129
130
        if ($existingCategory) {
131
            return $existingCategory;
132
        }
133
134
        $newCategory = $parentCategory->subCategories()->create([
135
            'name' => $name,
136
        ]);
137
138
        return $newCategory;
139
    }
140
141
    public function deleteTransactions($transactionId)
142
    {