| 1 | <?php |
||
| 14 | class PageMover extends Service { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @since 0.2 |
||
| 18 | * |
||
| 19 | * @param Page $page |
||
| 20 | * @param Title $target |
||
| 21 | * @param array $extraParams |
||
| 22 | */ |
||
| 23 | public function move( Page $page, Title $target, array $extraParams = [] ): bool { |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @since 0.2 |
||
| 35 | * |
||
| 36 | * |
||
| 37 | */ |
||
| 38 | public function moveFromPageId( int $pageid, Title $target, array $extraParams = [] ): bool { |
||
| 45 | |||
| 46 | /** |
||
| 47 | * |
||
| 48 | * @return mixed[] |
||
| 49 | */ |
||
| 50 | View Code Duplication | private function getMoveParams( int $pageid, \Addwiki\Mediawiki\DataModel\Title $target, array $extraParams ): array { |
|
| 58 | |||
| 59 | } |
||
| 60 |
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.