Mostly used find-and-replace: Find: /\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?)[\s\*]+/\s*(private|protected|public) (\$[a-z]\w+;\n)((?=\s*/\*[\*\s]+@var (I?[A-Z](\w+)(?:Interface)?))\n|) Replace with: \3 \1 \4 More could be done, but to keep this patch reasonably sized, I only changed the most obvious and unambiguously correct cases. In some cases, I also removed redundant doc comments on the constructor, and re-ordered the properties to match the constructor. Change-Id: Ifa710fdf4d8d44a2d7244798b787a1b2a58c35a7
26 lines
634 B
PHP
26 lines
634 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Rest\BasicAccess;
|
|
|
|
use MediaWiki\Permissions\Authority;
|
|
use MediaWiki\Rest\Handler;
|
|
use MediaWiki\Rest\RequestInterface;
|
|
|
|
/**
|
|
* A factory for MWBasicRequestAuthorizer which passes through a UserIdentity.
|
|
*
|
|
* @internal
|
|
*/
|
|
class MWBasicAuthorizer extends BasicAuthorizerBase {
|
|
private Authority $authority;
|
|
|
|
public function __construct( Authority $authority ) {
|
|
$this->authority = $authority;
|
|
}
|
|
|
|
protected function createRequestAuthorizer( RequestInterface $request,
|
|
Handler $handler
|
|
): BasicRequestAuthorizer {
|
|
return new MWBasicRequestAuthorizer( $request, $handler, $this->authority );
|
|
}
|
|
}
|