r107701 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107700‎ | r107701 | r107702 >
Date:03:56, 31 December 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
docs++
Modified paths:
  • /trunk/extensions/Maps/includes/Maps_GeoFunctions.php (modified) (history)
  • /trunk/extensions/Maps/includes/Maps_LayerPage.php (modified) (history)
  • /trunk/extensions/Maps/includes/Maps_Location.php (modified) (history)
  • /trunk/extensions/Maps/includes/Maps_Mapper.php (modified) (history)
  • /trunk/extensions/Maps/includes/Maps_MappingServices.php (modified) (history)
  • /trunk/extensions/Maps/includes/criteria/CriterionIsDistance.php (modified) (history)
  • /trunk/extensions/Maps/includes/criteria/CriterionIsImage.php (modified) (history)
  • /trunk/extensions/Maps/includes/criteria/CriterionMapDimension.php (modified) (history)
  • /trunk/extensions/Maps/includes/criteria/CriterionMapLayer.php (modified) (history)
  • /trunk/extensions/Maps/includes/features/Maps_BaseMap.php (modified) (history)
  • /trunk/extensions/Maps/includes/features/Maps_BasePointMap.php (modified) (history)
  • /trunk/extensions/Maps/includes/geocoders/Maps_GeonamesGeocoder.php (modified) (history)
  • /trunk/extensions/Maps/includes/geocoders/Maps_GoogleGeocoder.php (modified) (history)
  • /trunk/extensions/Maps/includes/geocoders/Maps_YahooGeocoder.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/includes/Maps_LayerPage.php
@@ -197,7 +197,9 @@
198198 * Returns if the layer definition in the page is valid.
199199 *
200200 * @since 0.7.1
201 - *
 201+ *
 202+ * @param string|null $service
 203+ *
202204 * @return boolean
203205 */
204206 public function hasValidDefinition( $service = null ) {
Index: trunk/extensions/Maps/includes/Maps_Mapper.php
@@ -26,6 +26,8 @@
2727 * @since 0.7.1
2828 *
2929 * @param mixed $value
 30+ *
 31+ * @return tring
3032 */
3133 public static function encodeJsVar( $value ) {
3234 if ( is_bool( $value ) ) {
@@ -69,7 +71,7 @@
7072 * @return array
7173 */
7274 public static function getCommonParameters() {
73 - global $egMapsAvailableServices, $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsMapWidth, $egMapsMapHeight, $egMapsDefaultService;
 75+ global $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsMapWidth, $egMapsMapHeight, $egMapsDefaultService;
7476
7577 $params = array();
7678
@@ -144,6 +146,8 @@
145147 * @since 1.0
146148 *
147149 * @param string $serviceName
 150+ *
 151+ * @return string
148152 */
149153 public static function getBaseMapJSON( $serviceName ) {
150154 static $baseInit = false;
Index: trunk/extensions/Maps/includes/criteria/CriterionMapLayer.php
@@ -17,8 +17,10 @@
1818
1919 /**
2020 * Constructor.
21 - *
 21+ *
2222 * @since 0.7
 23+ *
 24+ * @param string $service
2325 */
2426 public function __construct( $service ) {
2527 parent::__construct();
Index: trunk/extensions/Maps/includes/criteria/CriterionIsImage.php
@@ -48,7 +48,6 @@
4949 * @see ItemParameterCriterion::getFullListErrorMessage
5050 */
5151 protected function getFullListErrorMessage( Parameter $parameter ) {
52 - global $wgLang;
5352 return wfMsgExt( 'validation-error-invalid-images', 'parsemag', $parameter->getOriginalName() );
5453 }
5554
Index: trunk/extensions/Maps/includes/criteria/CriterionMapDimension.php
@@ -14,7 +14,7 @@
1515 class CriterionMapDimension extends ItemParameterCriterion {
1616
1717 /**
18 - * Indicates if the prarameter is for width or height.
 18+ * Indicates if the parameter is for width or height.
1919 *
2020 * @since 0.7
2121 *
@@ -24,8 +24,10 @@
2525
2626 /**
2727 * Constructor.
28 - *
 28+ *
2929 * @since 0.7
 30+ *
 31+ * @param string $dimension
3032 */
3133 public function __construct( $dimension ) {
3234 parent::__construct();
Index: trunk/extensions/Maps/includes/criteria/CriterionIsDistance.php
@@ -40,7 +40,6 @@
4141 * @see ItemParameterCriterion::getFullListErrorMessage
4242 */
4343 protected function getFullListErrorMessage( Parameter $parameter ) {
44 - global $wgLang;
4544 return wfMsgExt( 'validation-error-invalid-distances', 'parsemag', $parameter->getOriginalName() );
4645 }
4746
Index: trunk/extensions/Maps/includes/Maps_MappingServices.php
@@ -14,7 +14,7 @@
1515 final class MapsMappingServices {
1616
1717 /**
18 - * Accociative array containing service identifiers as keys and the names
 18+ * Associative array containing service identifiers as keys and the names
1919 * of service classes as values.
2020 *
2121 * @since 0.6.6
@@ -24,12 +24,12 @@
2525 protected static $registeredServices = array();
2626
2727 /**
28 - * Accociative with service identifiers as keys containing instances of
 28+ * Associative with service identifiers as keys containing instances of
2929 * the mapping service classes.
3030 *
3131 * Note: This list only contains the instances, so is not to be used for
3232 * looping over all available services, as not all of them are guaranteed
33 - * to have an instance already, use $registeredServices for this purpouse.
 33+ * to have an instance already, use $registeredServices for this purpose.
3434 *
3535 * @since 0.6.6
3636 *
@@ -38,7 +38,7 @@
3939 protected static $services = array();
4040
4141 /**
42 - * Registeres a service class linked to an identifier.
 42+ * Registers a service class linked to an identifier.
4343 * Also allows automatic registration of a list of features for this service.
4444 *
4545 * @since 0.6.6
Index: trunk/extensions/Maps/includes/Maps_GeoFunctions.php
@@ -66,7 +66,7 @@
6767 * @param float $bearing The initial bearing in degrees.
6868 * @param float $distance The distance to travel in km.
6969 *
70 - * @return array The desitination coordinates, as non-directional floats in an array with lat and lon keys.
 70+ * @return array The destination coordinates, as non-directional floats in an array with lat and lon keys.
7171 */
7272 public static function findDestination( array $startingCoordinates, $bearing, $distance ) {
7373 $startingCoordinates['lat'] = deg2rad( (float)$startingCoordinates['lat'] );
Index: trunk/extensions/Maps/includes/geocoders/Maps_GoogleGeocoder.php
@@ -17,7 +17,7 @@
1818 final class MapsGoogleGeocoder extends MapsGeocoder {
1919
2020 /**
21 - * Registeres the geocoder.
 21+ * Registers the geocoder.
2222 *
2323 * No LSB in pre-5.3 PHP *sigh*.
2424 * This is to be refactored as soon as php >=5.3 becomes acceptable.
Index: trunk/extensions/Maps/includes/geocoders/Maps_GeonamesGeocoder.php
@@ -14,7 +14,7 @@
1515 final class MapsGeonamesGeocoder extends MapsGeocoder {
1616
1717 /**
18 - * Registeres the geocoder.
 18+ * Registers the geocoder.
1919 *
2020 * No LSB in pre-5.3 PHP *sigh*.
2121 * This is to be refactored as soon as php >=5.3 becomes acceptable.
Index: trunk/extensions/Maps/includes/geocoders/Maps_YahooGeocoder.php
@@ -15,7 +15,7 @@
1616 final class MapsYahooGeocoder extends MapsGeocoder {
1717
1818 /**
19 - * Registeres the geocoder.
 19+ * Registers the geocoder.
2020 *
2121 * No LSB in pre-5.3 PHP *sigh*.
2222 * This is to be refactored as soon as php >=5.3 becomes acceptable.
Index: trunk/extensions/Maps/includes/Maps_Location.php
@@ -98,16 +98,16 @@
9999 * @var string
100100 */
101101 protected $separator;
102 -
 102+
103103 /**
104104 * Creates and returns a new instance of a MapsLocation from a latitude and longitude.
105 - *
 105+ *
106106 * @since 1.0
107 - *
 107+ *
108108 * @param float $lat
109109 * @param float $lon
110 - * @param integer $format
111 - *
 110+ * @param string $format
 111+ *
112112 * @return MapsLocation
113113 */
114114 public static function newFromLatLon( $lat, $lon, $format = Maps_COORDS_FLOAT ) {
@@ -120,7 +120,7 @@
121121 * @since 1.0
122122 *
123123 * @param string $address
124 - * @param integer $format
 124+ * @param string $format
125125 *
126126 * @return MapsLocation
127127 */
@@ -132,7 +132,7 @@
133133 * Constructor.
134134 *
135135 * @param mixed $coordsOrAddress string or array with lat and lon
136 - * @param integer $format
 136+ * @param string $format
137137 * @param boolean $directional
138138 * @param string $separator
139139 *
@@ -431,7 +431,12 @@
432432 * Returns an object that can directly be converted to JS using json_encode or similar.
433433 *
434434 * @since 1.0
435 - *
 435+ *
 436+ * @param string $defText
 437+ * @param string $defTitle
 438+ * @param string $defIconUrl
 439+ * @param string $defGroup
 440+ *
436441 * @return object
437442 */
438443 public function getJSONObject( $defText = '', $defTitle = '', $defIconUrl = '', $defGroup = '' ) {
Index: trunk/extensions/Maps/includes/features/Maps_BasePointMap.php
@@ -1,9 +1,9 @@
22 <?php
33
44 /**
5 - * Abstract class MapsBasePointMap provides the scafolding for classes handling display_point(s)
 5+ * Abstract class MapsBasePointMap provides the scaffolding for classes handling display_point(s)
66 * calls for a specific mapping service. It inherits from MapsMapFeature and therefore forces
7 - * inheriting classes to implement sereveral methods.
 7+ * inheriting classes to implement several methods.
88 *
99 * @file Maps_BasePointMap.php
1010 * @ingroup Maps
Index: trunk/extensions/Maps/includes/features/Maps_BaseMap.php
@@ -1,9 +1,9 @@
22 <?php
33
44 /**
5 - * Abstract class MapsBaseMap provides the scafolding for classes handling display_map
 5+ * Abstract class MapsBaseMap provides the scaffolding for classes handling display_map
66 * calls for a specific mapping service. It inherits from MapsMapFeature and therefore
7 - * forces inheriting classes to implement sereveral methods.
 7+ * forces inheriting classes to implement several methods.
88 *
99 * @file Maps_BaseMap.php
1010 * @ingroup Maps
@@ -29,7 +29,7 @@
3030 /**
3131 * Constructor.
3232 *
33 - * @param MapsMappingService $service
 33+ * @param iMappingService $service
3434 */
3535 public function __construct( iMappingService $service ) {
3636 $this->service = $service;
@@ -37,6 +37,8 @@
3838
3939 /**
4040 * @since 0.7.3
 41+ *
 42+ * @param array $params
4143 */
4244 public function addParameterInfo( array &$params ) {
4345 }

Status & tagging log