mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Tweaks in API code per code review
Follow-up to If5c8d95560cbb078ae4980f4a912cbaeafe53d3e. Change-Id: Iff72b5b21c0f5ce6a45cc48d6a8fc060159d7d23
This commit is contained in:
parent
97b2547daf
commit
63638e380d
|
@ -9,6 +9,8 @@
|
|||
*/
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
trait ApiParsoidTrait {
|
||||
|
||||
|
@ -18,19 +20,19 @@ trait ApiParsoidTrait {
|
|||
protected $serviceClient = null;
|
||||
|
||||
/**
|
||||
* @var \Psr\Log\LoggerInterface
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
protected $logger = null;
|
||||
|
||||
/**
|
||||
* @return \Psr\Log\LoggerInterface
|
||||
* @return LoggerInterface
|
||||
*/
|
||||
protected function getLogger() {
|
||||
return $this->logger ?: new \Psr\Log\NullLogger();
|
||||
return $this->logger ?: new NullLogger();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Psr\Log\LoggerInterface $logger
|
||||
* @param LoggerInterface $logger
|
||||
*/
|
||||
protected function setLogger( $logger ) {
|
||||
$this->logger = $logger;
|
||||
|
|
|
@ -15,8 +15,8 @@ use MediaWiki\Revision\RevisionStoreRecord;
|
|||
|
||||
class ApiVisualEditor extends ApiBase {
|
||||
|
||||
use ApiParsoidTrait;
|
||||
use ApiBlockInfoTrait;
|
||||
use ApiParsoidTrait;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
|
|
Loading…
Reference in a new issue