SECURITY: rate-limit and prevent blocked users from changing email
[lhc/web/wiklou.git] / includes / api / ApiModuleManager.php
index e02c862..d2df013 100644 (file)
@@ -96,7 +96,7 @@ class ApiModuleManager extends ContextSource {
                foreach ( $modules as $name => $moduleSpec ) {
                        if ( is_array( $moduleSpec ) ) {
                                $class = $moduleSpec['class'];
-                               $factory = ( isset( $moduleSpec['factory'] ) ? $moduleSpec['factory'] : null );
+                               $factory = ( $moduleSpec['factory'] ?? null );
                        } else {
                                $class = $moduleSpec;
                                $factory = null;
@@ -143,7 +143,7 @@ class ApiModuleManager extends ContextSource {
         * Get module instance by name, or instantiate it if it does not exist
         *
         * @param string $moduleName Module name
-        * @param string $group Optionally validate that the module is in a specific group
+        * @param string|null $group Optionally validate that the module is in a specific group
         * @param bool $ignoreCache If true, force-creates a new instance and does not cache it
         *
         * @return ApiBase|null The new module instance, or null if failed
@@ -205,7 +205,7 @@ class ApiModuleManager extends ContextSource {
 
        /**
         * Get an array of modules in a specific group or all if no group is set.
-        * @param string $group Optional group filter
+        * @param string|null $group Optional group filter
         * @return array List of module names
         */
        public function getNames( $group = null ) {
@@ -224,7 +224,7 @@ class ApiModuleManager extends ContextSource {
 
        /**
         * Create an array of (moduleName => moduleClass) for a specific group or for all.
-        * @param string $group Name of the group to get or null for all
+        * @param string|null $group Name of the group to get or null for all
         * @return array Name=>class map
         */
        public function getNamesWithClasses( $group = null ) {
@@ -256,7 +256,7 @@ class ApiModuleManager extends ContextSource {
        /**
         * Returns true if the specific module is defined at all or in a specific group.
         * @param string $moduleName Module name
-        * @param string $group Group name to check against, or null to check all groups,
+        * @param string|null $group Group name to check against, or null to check all groups,
         * @return bool True if defined
         */
        public function isDefined( $moduleName, $group = null ) {