Provide command to adjust phpunit.xml for code coverage
[lhc/web/wiklou.git] / includes / Rest / SimpleHandler.php
1 <?php
2
3 namespace MediaWiki\Rest;
4
5 /**
6 * A handler base class which unpacks parameters from the path template and
7 * passes them as formal parameters to run().
8 *
9 * run() must be declared in the subclass. It cannot be declared as abstract
10 * here because it has a variable parameter list.
11 * @todo Declare it as abstract after dropping HHVM
12 *
13 * @package MediaWiki\Rest
14 */
15 class SimpleHandler extends Handler {
16 public function execute() {
17 $params = array_values( $this->getRequest()->getPathParams() );
18 // @phan-suppress-next-line PhanUndeclaredMethod
19 return $this->run( ...$params );
20 }
21 }