r75718 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75717‎ | r75718 | r75719 >
Date:14:28, 31 October 2010
Author:ialex
Status:ok
Tags:
Comment:
* Fixed some doxygen warnings
* Made documentation cosistent with the rest of the software
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoader.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoader.php
@@ -46,8 +46,8 @@
4747 * than it is to have each module requests its own information. This sacrifice of modularity yields a profound
4848 * performance improvement.
4949 *
50 - * @param {array} $modules List of module names to preload information for
51 - * @param {ResourceLoaderContext} $context Context to load the information within
 50+ * @param $modules Array: list of module names to preload information for
 51+ * @param $context ResourceLoaderContext: context to load the information within
5252 */
5353 protected function preloadModuleInfo( array $modules, ResourceLoaderContext $context ) {
5454 if ( !count( $modules ) ) {
@@ -113,9 +113,9 @@
114114 *
115115 * If $data is empty, only contains whitespace or the filter was unknown, $data is returned unmodified.
116116 *
117 - * @param {string} $filter Name of filter to run
118 - * @param {string} $data Text to filter, such as JavaScript or CSS text
119 - * @return {string} Filtered data
 117+ * @param $filter String: name of filter to run
 118+ * @param $data String: text to filter, such as JavaScript or CSS text
 119+ * @return String: filtered data
120120 */
121121 protected function filter( $filter, $data ) {
122122 global $wgMemc;
@@ -181,11 +181,11 @@
182182 /**
183183 * Registers a module with the ResourceLoader system.
184184 *
185 - * @param {mixed} $name string of name of module or array of name/object pairs
186 - * @param {ResourceLoaderModule} $object module object (optional when using multiple-registration calling style)
187 - * @throws {MWException} If a duplicate module registration is attempted
188 - * @throws {MWException} If something other than a ResourceLoaderModule is being registered
189 - * @return {bool} false if there were any errors, in which case one or more modules were not registered
 185+ * @param $name Mixed: string of name of module or array of name/object pairs
 186+ * @param $object ResourceLoaderModule: module object (optional when using multiple-registration calling style)
 187+ * @throws MWException If a duplicate module registration is attempted
 188+ * @throws MWException If something other than a ResourceLoaderModule is being registered
 189+ * @return Boolean: false if there were any errors, in which case one or more modules were not registered
190190 */
191191 public function register( $name, ResourceLoaderModule $object = null ) {
192192
@@ -225,7 +225,7 @@
226226 /**
227227 * Gets a map of all modules and their options
228228 *
229 - * @return {array} array( modulename => ResourceLoaderModule )
 229+ * @return Array: array( modulename => ResourceLoaderModule )
230230 */
231231 public function getModules() {
232232 return $this->modules;
@@ -234,8 +234,8 @@
235235 /**
236236 * Get the ResourceLoaderModule object for a given module name.
237237 *
238 - * @param {string} $name module name
239 - * @return {mixed} ResourceLoaderModule if module has been registered, null otherwise
 238+ * @param $name String: module name
 239+ * @return Mixed: ResourceLoaderModule if module has been registered, null otherwise
240240 */
241241 public function getModule( $name ) {
242242 return isset( $this->modules[$name] ) ? $this->modules[$name] : null;
@@ -244,7 +244,7 @@
245245 /**
246246 * Outputs a response to a resource load-request, including a content-type header.
247247 *
248 - * @param {ResourceLoaderContext} $context Context in which a response should be formed
 248+ * @param $context ResourceLoaderContext: context in which a response should be formed
249249 */
250250 public function respond( ResourceLoaderContext $context ) {
251251 global $wgResourceLoaderMaxage, $wgCacheEpoch;
@@ -323,10 +323,10 @@
324324 /**
325325 * Generates code for a response
326326 *
327 - * @param {ResourceLoaderContext} $context Context in which to generate a response
328 - * @param {array} $modules List of module objects keyed by module name
329 - * @param {array} $missing List of unavailable modules (optional)
330 - * @return {string} Response data
 327+ * @param $context ResourceLoaderContext: context in which to generate a response
 328+ * @param $modules Array: list of module objects keyed by module name
 329+ * @param $missing Array: list of unavailable modules (optional)
 330+ * @return String: response data
331331 */
332332 public function makeModuleResponse( ResourceLoaderContext $context, array $modules, $missing = array() ) {
333333 // Pre-fetch blobs

Status & tagging log