| 1 | <?php |
||
| 15 | class PageRestorer extends Service { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @since 0.3 |
||
| 19 | * |
||
| 20 | * @param Page $page |
||
| 21 | * @param array $extraParams |
||
| 22 | */ |
||
| 23 | public function restore( Page $page, array $extraParams = [] ): bool { |
||
| 33 | |||
| 34 | /** |
||
| 35 | * |
||
| 36 | * @return mixed[] |
||
| 37 | */ |
||
| 38 | View Code Duplication | private function getUndeleteParams( Title $title, array $extraParams ): array { |
|
| 46 | |||
| 47 | /** |
||
| 48 | * @param Title $title |
||
| 49 | * |
||
| 50 | * @throws OutOfBoundsException |
||
| 51 | * @return mixed|void |
||
| 52 | */ |
||
| 53 | private function getUndeleteToken( Title $title ) { |
||
| 71 | |||
| 72 | } |
||
| 73 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.