Commit 01f8bd64 authored by catch's avatar catch

Issue #2854529 by alexpott, xjm, klausi, Chi, Mixologic: Fix...

Issue #2854529 by alexpott, xjm, klausi, Chi, Mixologic: Fix Drupal.Scope.MethodScope - all methods should have scopes
parent 594fdb7a
......@@ -69,7 +69,7 @@ class AnnotatedClassDiscovery implements DiscoveryInterface {
* @param string[] $annotation_namespaces
* (optional) Additional namespaces to be scanned for annotation classes.
*/
function __construct($plugin_namespaces = [], $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin', array $annotation_namespaces = []) {
public function __construct($plugin_namespaces = [], $plugin_definition_annotation_name = 'Drupal\Component\Annotation\Plugin', array $annotation_namespaces = []) {
$this->pluginNamespaces = $plugin_namespaces;
$this->pluginDefinitionAnnotationName = $plugin_definition_annotation_name;
$this->annotationNamespaces = $annotation_namespaces;
......
......@@ -85,7 +85,7 @@ public function __construct($langcode = NULL) {
* Plural form component from the header, for example:
* 'nplurals=2; plural=(n > 1);'.
*/
function getPluralForms() {
public function getPluralForms() {
return $this->_pluralForms;
}
......@@ -95,7 +95,7 @@ function getPluralForms() {
* @param string $languageName
* Human readable language name.
*/
function setLanguageName($languageName) {
public function setLanguageName($languageName) {
$this->_languageName = $languageName;
}
......@@ -105,7 +105,7 @@ function setLanguageName($languageName) {
* @return string
* The human readable language name.
*/
function getLanguageName() {
public function getLanguageName() {
return $this->_languageName;
}
......@@ -115,7 +115,7 @@ function getLanguageName() {
* @param string $projectName
* Human readable project name.
*/
function setProjectName($projectName) {
public function setProjectName($projectName) {
$this->_projectName = $projectName;
}
......@@ -125,7 +125,7 @@ function setProjectName($projectName) {
* @return string
* The human readable project name.
*/
function getProjectName() {
public function getProjectName() {
return $this->_projectName;
}
......@@ -190,7 +190,7 @@ public function __toString() {
*
* @throws Exception
*/
function parsePluralForms($pluralforms) {
public function parsePluralForms($pluralforms) {
$plurals = [];
// First, delete all whitespace.
$pluralforms = strtr($pluralforms, [" " => "", "\t" => ""]);
......
......@@ -59,7 +59,7 @@ class PoItem {
*
* @return string with langcode
*/
function getLangcode() {
public function getLangcode() {
return $this->_langcode;
}
......@@ -68,7 +68,7 @@ function getLangcode() {
*
* @param string $langcode
*/
function setLangcode($langcode) {
public function setLangcode($langcode) {
$this->_langcode = $langcode;
}
......@@ -77,7 +77,7 @@ function setLangcode($langcode) {
*
* @return string $context
*/
function getContext() {
public function getContext() {
return $this->_context;
}
......@@ -86,7 +86,7 @@ function getContext() {
*
* @param string $context
*/
function setContext($context) {
public function setContext($context) {
$this->_context = $context;
}
......@@ -96,7 +96,7 @@ function setContext($context) {
*
* @return string or array $translation
*/
function getSource() {
public function getSource() {
return $this->_source;
}
......@@ -106,7 +106,7 @@ function getSource() {
*
* @param string or array $source
*/
function setSource($source) {
public function setSource($source) {
$this->_source = $source;
}
......@@ -116,7 +116,7 @@ function setSource($source) {
*
* @return string or array $translation
*/
function getTranslation() {
public function getTranslation() {
return $this->_translation;
}
......@@ -126,7 +126,7 @@ function getTranslation() {
*
* @param string or array $translation
*/
function setTranslation($translation) {
public function setTranslation($translation) {
$this->_translation = $translation;
}
......@@ -135,7 +135,7 @@ function setTranslation($translation) {
*
* @param bool $plural
*/
function setPlural($plural) {
public function setPlural($plural) {
$this->_plural = $plural;
}
......@@ -144,7 +144,7 @@ function setPlural($plural) {
*
* @return bool
*/
function isPlural() {
public function isPlural() {
return $this->_plural;
}
......@@ -153,7 +153,7 @@ function isPlural() {
*
* @return String $comment
*/
function getComment() {
public function getComment() {
return $this->_comment;
}
......@@ -162,7 +162,7 @@ function getComment() {
*
* @param string $comment
*/
function setComment($comment) {
public function setComment($comment) {
$this->_comment = $comment;
}
......
......@@ -17,7 +17,7 @@ class PoMemoryWriter implements PoWriterInterface {
/**
* Constructor, initialize empty items.
*/
function __construct() {
public function __construct() {
$this->_items = [];
}
......@@ -57,7 +57,7 @@ public function getData() {
*
* Not implemented. Not relevant for the MemoryWriter.
*/
function setLangcode($langcode) {
public function setLangcode($langcode) {
}
/**
......@@ -65,7 +65,7 @@ function setLangcode($langcode) {
*
* Not implemented. Not relevant for the MemoryWriter.
*/
function getLangcode() {
public function getLangcode() {
}
/**
......@@ -73,7 +73,7 @@ function getLangcode() {
*
* Not implemented. Not relevant for the MemoryWriter.
*/
function getHeader() {
public function getHeader() {
}
/**
......@@ -81,7 +81,7 @@ function getHeader() {
*
* Not implemented. Not relevant for the MemoryWriter.
*/
function setHeader(PoHeader $header) {
public function setHeader(PoHeader $header) {
}
}
......@@ -547,7 +547,7 @@ public function setItemFromArray($value) {
* @return
* The string parsed from inside the quotes.
*/
function parseQuoted($string) {
public function parseQuoted($string) {
if (substr($string, 0, 1) != substr($string, -1, 1)) {
// Start and end quotes must be the same.
return FALSE;
......
......@@ -68,7 +68,7 @@ public function getFullPath($name) {
/**
* {@inheritdoc}
*/
function writeable() {
public function writeable() {
return FALSE;
}
......
......@@ -25,7 +25,7 @@ class RouteProcessorCsrf implements OutboundRouteProcessorInterface {
* @param \Drupal\Core\Access\CsrfTokenGenerator $csrf_token
* The CSRF token generator.
*/
function __construct(CsrfTokenGenerator $csrf_token) {
public function __construct(CsrfTokenGenerator $csrf_token) {
$this->csrfToken = $csrf_token;
}
......
......@@ -28,7 +28,7 @@ class DatabaseBackendFactory implements CacheFactoryInterface {
* @param \Drupal\Core\Cache\CacheTagsChecksumInterface $checksum_provider
* The cache tags checksum provider.
*/
function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider) {
public function __construct(Connection $connection, CacheTagsChecksumInterface $checksum_provider) {
$this->connection = $connection;
$this->checksumProvider = $checksum_provider;
}
......@@ -42,7 +42,7 @@ function __construct(Connection $connection, CacheTagsChecksumInterface $checksu
* @return \Drupal\Core\Cache\DatabaseBackend
* The cache backend object for the specified cache bin.
*/
function get($bin) {
public function get($bin) {
return new DatabaseBackend($this->connection, $this->checksumProvider, $bin);
}
......
......@@ -14,7 +14,7 @@ class MemoryBackendFactory implements CacheFactoryInterface {
/**
* {@inheritdoc}
*/
function get($bin) {
public function get($bin) {
if (!isset($this->bins[$bin])) {
$this->bins[$bin] = new MemoryBackend();
}
......
......@@ -7,7 +7,7 @@ class NullBackendFactory implements CacheFactoryInterface {
/**
* {@inheritdoc}
*/
function get($bin) {
public function get($bin) {
return new NullBackend($bin);
}
......
......@@ -30,7 +30,7 @@ public function __construct(CacheTagsChecksumInterface $checksum_provider) {
* @return \Drupal\Core\Cache\PhpBackend
* The cache backend object for the specified cache bin.
*/
function get($bin) {
public function get($bin) {
return new PhpBackend($bin, $this->checksumProvider);
}
......
......@@ -365,7 +365,7 @@ public function onConfigDelete(ConfigCrudEvent $event) {
/**
* {@inheritdoc}
*/
static function getSubscribedEvents() {
public static function getSubscribedEvents() {
$events[ConfigEvents::SAVE][] = ['onConfigSave', 255];
$events[ConfigEvents::DELETE][] = ['onConfigDelete', 255];
return $events;
......
......@@ -44,7 +44,7 @@ abstract class ConfigFactoryOverrideBase implements EventSubscriberInterface {
/**
* {@inheritdoc}
*/
static function getSubscribedEvents() {
public static function getSubscribedEvents() {
$events[ConfigEvents::COLLECTION_INFO][] = ['addCollections'];
$events[ConfigEvents::SAVE][] = ['onConfigSave', 20];
$events[ConfigEvents::DELETE][] = ['onConfigDelete', 20];
......
......@@ -22,7 +22,7 @@ abstract class ConfigImportValidateEventSubscriberBase implements EventSubscribe
/**
* {@inheritdoc}
*/
static function getSubscribedEvents() {
public static function getSubscribedEvents() {
$events[ConfigEvents::IMPORT_VALIDATE][] = ['onConfigImporterValidate', 20];
return $events;
}
......
......@@ -49,7 +49,7 @@ class Query extends QueryBase implements QueryInterface {
* @param array $namespaces
* List of potential namespaces of the classes belonging to this query.
*/
function __construct(EntityTypeInterface $entity_type, $conjunction, ConfigFactoryInterface $config_factory, KeyValueFactoryInterface $key_value_factory, array $namespaces) {
public function __construct(EntityTypeInterface $entity_type, $conjunction, ConfigFactoryInterface $config_factory, KeyValueFactoryInterface $key_value_factory, array $namespaces) {
parent::__construct($entity_type, $conjunction, $namespaces);
$this->configFactory = $config_factory;
$this->keyValueFactory = $key_value_factory;
......
......@@ -249,7 +249,7 @@ public function onConfigDelete(ConfigCrudEvent $event) {
/**
* {@inheritdoc}
*/
static function getSubscribedEvents() {
public static function getSubscribedEvents() {
$events[ConfigEvents::SAVE][] = ['onConfigSave', 128];