Use type declaration for class properties holding type hinted arguments
Provided arguments already have type declaration on the construtor and it is safe to use the same type on the class property Change-Id: Ia8bbdc4dee59dfb487582dd514486ec8542951be
This commit is contained in:
parent
4a611caaa7
commit
512aadac31
11 changed files with 14 additions and 13 deletions
|
|
@ -38,7 +38,7 @@ use MediaWiki\Session\Session;
|
|||
* @since 1.19
|
||||
*/
|
||||
class DerivativeRequest extends FauxRequest {
|
||||
private $base;
|
||||
private WebRequest $base;
|
||||
private $ip;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ use MediaWiki\Rest\RequestInterface;
|
|||
* @internal
|
||||
*/
|
||||
abstract class BasicRequestAuthorizer {
|
||||
protected $request;
|
||||
protected $handler;
|
||||
protected RequestInterface $request;
|
||||
protected Handler $handler;
|
||||
|
||||
/**
|
||||
* @param RequestInterface $request
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ use Stringable;
|
|||
* @since 1.38
|
||||
*/
|
||||
class ArraySource implements Stringable, SettingsSource {
|
||||
private $settings;
|
||||
private array $settings;
|
||||
|
||||
public function __construct( array $settings ) {
|
||||
$this->settings = $settings;
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class ApiResult implements ApiSerializable {
|
|||
private int $size;
|
||||
/** @var int|false */
|
||||
private $maxSize;
|
||||
private $errorFormatter;
|
||||
private ApiErrorFormatter $errorFormatter;
|
||||
|
||||
/**
|
||||
* @param int|false $maxSize Maximum result "size", or false for no limit
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace MediaWiki\Language;
|
|||
* Wrapper around strtr() that holds replacements
|
||||
*/
|
||||
class ReplacementArray {
|
||||
private $data;
|
||||
private array $data;
|
||||
|
||||
/**
|
||||
* Create an object with the specified replacement array
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* @ingroup Maintenance
|
||||
*/
|
||||
abstract class IteratorDecorator implements Iterator {
|
||||
protected $iterator;
|
||||
protected Iterator $iterator;
|
||||
|
||||
/**
|
||||
* @stable to call
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
namespace Wikimedia\Rdbms;
|
||||
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
/**
|
||||
|
|
@ -28,7 +29,7 @@ use Doctrine\DBAL\Schema\Schema;
|
|||
*/
|
||||
trait DoctrineAbstractSchemaTrait {
|
||||
|
||||
private $platform;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
private function addTableToSchema( Schema $schema, array $schemaSpec ) {
|
||||
$prefix = $this->platform->getName() === 'postgresql' ? '' : '/*_*/';
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ use Doctrine\DBAL\Schema\Schema;
|
|||
class DoctrineSchemaBuilder implements SchemaBuilder {
|
||||
use DoctrineAbstractSchemaTrait;
|
||||
|
||||
private $schema;
|
||||
private $platform;
|
||||
private Schema $schema;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/**
|
||||
* A builder object that take abstract schema definition and produces sql to create the tables.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use Doctrine\DBAL\Schema\Schema;
|
|||
class DoctrineSchemaChangeBuilder implements SchemaChangeBuilder {
|
||||
use DoctrineAbstractSchemaTrait;
|
||||
|
||||
private $platform;
|
||||
private AbstractPlatform $platform;
|
||||
|
||||
/**
|
||||
* A builder object that take abstract schema definition and produces sql to create the tables.
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class StripState {
|
|||
protected $data;
|
||||
protected $regex;
|
||||
|
||||
protected $parser;
|
||||
protected ?Parser $parser;
|
||||
|
||||
protected $circularRefGuard;
|
||||
protected $depth = 0;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ use RecentChange;
|
|||
* @ingroup RecentChanges
|
||||
*/
|
||||
abstract class FormattedRCFeed extends RCFeed {
|
||||
private $params;
|
||||
private array $params;
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
|
|
|
|||
Loading…
Reference in a new issue