| 1 | <?php |
||
| 15 | class PageRestorer extends Service { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @since 0.3 |
||
| 19 | * |
||
| 20 | * @param Page $page |
||
| 21 | * @param array $extraParams |
||
| 22 | * |
||
| 23 | * @return bool |
||
| 24 | */ |
||
| 25 | public function restore( Page $page, array $extraParams = [] ) { |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param Title $title |
||
| 38 | * @param array $extraParams |
||
| 39 | * |
||
| 40 | * @return array |
||
| 41 | */ |
||
| 42 | private function getUndeleteParams( Title $title, $extraParams ) { |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @param Title $title |
||
| 53 | * |
||
| 54 | * @throws OutOfBoundsException |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | private function getUndeleteToken( Title $title ) { |
||
| 75 | |||
| 76 | } |
||
| 77 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: