| Conditions | 1 |
| Paths | 1 |
| Total Lines | 32 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 1 | public function register( &$wgHooks ) { |
|
| 25 | |||
| 26 | 1 | $signupFactory = new SignupFactory(); |
|
| 27 | 1 | $formPrinterHandler = $signupFactory->newFormPrinterHandler(); |
|
| 28 | |||
| 29 | /** |
||
| 30 | * @see https://www.mediawiki.org/wiki/Manual:Hooks/UserCreateForm |
||
| 31 | */ |
||
| 32 | $wgHooks['UserCreateForm'][] = function ( &$template ) use ( $formPrinterHandler ) { |
||
|
|
|||
| 33 | |||
| 34 | //FIXME |
||
| 35 | 1 | global $wgOut; |
|
| 36 | |||
| 37 | 1 | $redirectFormFinder = new RedirectFormFinder( $formPrinterHandler ); |
|
| 38 | |||
| 39 | 1 | return $redirectFormFinder->redirectToUrl( $wgOut ); |
|
| 40 | }; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit |
||
| 44 | */ |
||
| 45 | 1 | $wgHooks['ParserFirstCallInit'][] = function ( $parser ) { |
|
| 46 | |||
| 47 | 1 | $parserFunctionFactory = new ParserFunctionFactory(); |
|
| 48 | |||
| 49 | 1 | list( $name, $definition, $flag ) = $parserFunctionFactory->newSignupFieldsParserFunctionDefinition(); |
|
| 50 | |||
| 51 | 1 | $parser->setFunctionHook( $name, $definition, $flag ); |
|
| 52 | |||
| 53 | 1 | return true; |
|
| 54 | }; |
||
| 55 | 1 | } |
|
| 56 | |||
| 58 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.