r67489 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67488‎ | r67489 | r67490 >
Date:00:21, 7 June 2010
Author:yaron
Status:deferred
Tags:
Comment:
Mass spelling fix: "spesific" => "specific", "seperat.." => "separat.."
Modified paths:
  • /trunk/extensions/Maps/Features/DisplayMap/Maps_BaseMap.php (modified) (history)
  • /trunk/extensions/Maps/Features/DisplayPoint/Maps_BasePointMap.php (modified) (history)
  • /trunk/extensions/Maps/Features/DisplayPoint/Maps_DisplayPoint.php (modified) (history)
  • /trunk/extensions/Maps/Features/Maps_ParserFunctions.php (modified) (history)
  • /trunk/extensions/Maps/Geocoders/Maps_Geocoder.php (modified) (history)
  • /trunk/extensions/Maps/Includes/Maps_CoordinateParser.php (modified) (history)
  • /trunk/extensions/Maps/Includes/Maps_Mapper.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispMap.php (modified) (history)
  • /trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispPoint.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispMap.php
@@ -31,7 +31,7 @@
3232
3333 public function getSpecificParameterInfo() {
3434 global $egMapsGMapOverlays;
35 - $this->spesificParameters = array(
 35+ $this->specificParameters = array(
3636 'overlays' => array(
3737 'type' => array( 'string', 'list' ),
3838 'criteria' => array(
@@ -40,7 +40,7 @@
4141 'default' => $egMapsGMapOverlays,
4242 ),
4343 );
44 - return $this->spesificParameters;
 44+ return $this->specificParameters;
4545 }
4646
4747 /**
Index: trunk/extensions/Maps/Services/GoogleMaps/Maps_GoogleMapsDispPoint.php
@@ -34,7 +34,7 @@
3535 public function getSpecificParameterInfo() {
3636 global $egMapsGMapOverlays;
3737 // TODO: it'd be cool to have this static so it can be cheched in order to only init it once.
38 - $this->spesificParameters = array(
 38+ $this->specificParameters = array(
3939 'overlays' => array(
4040 'type' => array( 'string', 'list' ),
4141 'criteria' => array(
@@ -43,7 +43,7 @@
4444 'default' => $egMapsGMapOverlays,
4545 ),
4646 );
47 - return $this->spesificParameters;
 47+ return $this->specificParameters;
4848 }
4949
5050 /**
Index: trunk/extensions/Maps/Includes/Maps_CoordinateParser.php
@@ -24,8 +24,8 @@
2525 */
2626 class MapsCoordinateParser {
2727
28 - protected static $mSeperators = array( ',', ';' );
29 - protected static $mSeperatorsRegex = false;
 28+ protected static $mSeparators = array( ',', ';' );
 29+ protected static $mSeparatorsRegex = false;
3030
3131 protected static $mI18nDirections = false; // Cache for localised direction labels
3232 protected static $mDirections; // Cache for English direction labels
@@ -55,8 +55,8 @@
5656 }
5757
5858 // Split the coodrinates string into a lat and lon part.
59 - foreach ( self::$mSeperators as $seperator ) {
60 - $split = explode( $seperator, $coordinates );
 59+ foreach ( self::$mSeparators as $separator ) {
 60+ $split = explode( $separator, $coordinates );
6161 if ( count( $split ) == 2 ) break;
6262 }
6363
@@ -136,7 +136,7 @@
137137 * array with lat and lon keys, or a numbered aray with lat on index 0, and lon on index 1.
138138 * @param coordinate type $targetFormat The notation to which they should be formatted. Defaults to floats.
139139 * @param boolean $directional Indicates if the target notation should be directional. Defaults to false.
140 - * @param string $separator Delimiter to seperate the latitude and longitude with.
 140+ * @param string $separator Delimiter to separate the latitude and longitude with.
141141 *
142142 * @return string
143143 */
@@ -284,7 +284,7 @@
285285 * @return boolean
286286 */
287287 public static function areFloatCoordinates( $coordinates ) {
288 - $sep = self::getSeperatorsRegex();
 288+ $sep = self::getSeparatorsRegex();
289289 return preg_match( '/^(-)?\d{1,3}(\.\d{1,20})?' . $sep . '(\s)?(-)?\d{1,3}(\.\d{1,20})?$/', $coordinates ) // Non-directional
290290 || preg_match( '/^\d{1,3}(\.\d{1,20})?(\s)?(N|S)' . $sep . '(\s)?\d{1,3}(\.\d{1,20})?(\s)?(E|W)$/', $coordinates ); // Directional
291291 }
@@ -297,7 +297,7 @@
298298 * @return boolean
299299 */
300300 public static function areDMSCoordinates( $coordinates ) {
301 - $sep = self::getSeperatorsRegex();
 301+ $sep = self::getSeparatorsRegex();
302302 return preg_match( '/^(-)?(\d{1,3}°)((\s)?\d{1,2}(\′|\'))?(((\s)?\d{1,2}(″|"))?|((\s)?\d{1,2}\.\d{1,2}(″|"))?)'
303303 . $sep . '(\s)?(-)?(\d{1,3}°)((\s)?\d{1,2}(\′|\'))?(((\s)?\d{1,2}(″|"))?|((\s)?\d{1,2}\.\d{1,2}(″|"))?)$/', $coordinates ) // Non-directional
304304 || preg_match( '/^(\d{1,3}°)((\s)?\d{1,2}(\′|\'))?(((\s)?\d{1,2}(″|"))?|((\s)?\d{1,2}\.\d{1,2}(″|"))?)(\s)?(N|S)'
@@ -312,7 +312,7 @@
313313 * @return boolean
314314 */
315315 public static function areDDCoordinates( $coordinates ) {
316 - $sep = self::getSeperatorsRegex();
 316+ $sep = self::getSeparatorsRegex();
317317 return preg_match( '/^(-)?\d{1,3}(|\.\d{1,20})°' . $sep . '(\s)?(-)?(\s)?\d{1,3}(|\.\d{1,20})°$/', $coordinates ) // Non-directional
318318 || preg_match( '/^\d{1,3}(|\.\d{1,20})°(\s)?(N|S)' . $sep . '(\s)?(\s)?\d{1,3}(|\.\d{1,20})°(\s)?(E|W)?$/', $coordinates ); // Directional
319319 }
@@ -325,7 +325,7 @@
326326 * @return boolean
327327 */
328328 public static function areDMCoordinates( $coordinates ) {
329 - $sep = self::getSeperatorsRegex();
 329+ $sep = self::getSeparatorsRegex();
330330 return preg_match( '/(-)?\d{1,3}°(\s)?\d{1,2}(\.\d{1,20}\')?' . $sep . '(\s)?(-)?\d{1,3}°(\s)?\d{1,2}(\.\d{1,20}\')?$/', $coordinates ) // Non-directional
331331 || preg_match( '/\d{1,3}°(\s)?\d{1,2}(\.\d{1,20}\')?(\s)?(N|S)' . $sep . '(\s)?\d{1,3}°(\s)?\d{1,2}(\.\d{1,20}\')?(\s)?(E|W)?$/', $coordinates ); // Directional
332332 }
@@ -495,9 +495,9 @@
496496 return $coordinate;
497497 }
498498
499 - protected static function getSeperatorsRegex() {
500 - if ( !self::$mSeperatorsRegex ) self::$mSeperatorsRegex = '(' . implode( '|', self::$mSeperators ) . ')';
501 - return self::$mSeperatorsRegex;
 499+ protected static function getSeparatorsRegex() {
 500+ if ( !self::$mSeparatorsRegex ) self::$mSeparatorsRegex = '(' . implode( '|', self::$mSeparators ) . ')';
 501+ return self::$mSeparatorsRegex;
502502 }
503503
504504 /**
@@ -518,4 +518,4 @@
519519 }
520520 }
521521
522 -}
\ No newline at end of file
 522+}
Index: trunk/extensions/Maps/Includes/Maps_Mapper.php
@@ -1,6 +1,6 @@
22 <?php
33 /**
4 - * A class that holds static helper functions for common functionality that is not map-spesific.
 4+ * A class that holds static helper functions for common functionality that is not map-specific.
55 *
66 * @file Maps_Mapper.php
77 * @ingroup Maps
@@ -36,9 +36,9 @@
3737 *
3838 * @return boolean
3939 */
40 - public static function isLocation( $location, $name, array $parameters, $metaDataSeperator = false ) {
41 - if ( $metaDataSeperator !== false ) {
42 - $parts = explode( $metaDataSeperator, $location );
 40+ public static function isLocation( $location, $name, array $parameters, $metaDataSeparator = false ) {
 41+ if ( $metaDataSeparator !== false ) {
 42+ $parts = explode( $metaDataSeparator, $location );
4343 $location = $parts[0];
4444 }
4545
@@ -58,10 +58,10 @@
5959 *
6060 * @return boolean
6161 */
62 - public static function areLocations( $locations, $name, array $parameters, $metaDataSeperator = false ) {
 62+ public static function areLocations( $locations, $name, array $parameters, $metaDataSeparator = false ) {
6363 $locations = (array)$locations;
6464 foreach ( $locations as $location ) {
65 - if ( !self::isLocation( $location, $name, $parameters, $metaDataSeperator ) ) {
 65+ if ( !self::isLocation( $location, $name, $parameters, $metaDataSeparator ) ) {
6666 return false;
6767 }
6868 }
@@ -304,4 +304,4 @@
305305 ),
306306 );
307307 }
308 -}
\ No newline at end of file
 308+}
Index: trunk/extensions/Maps/Geocoders/Maps_Geocoder.php
@@ -97,7 +97,7 @@
9898
9999 $service = self::getValidGeoService( $service, $mappingService );
100100
101 - // Call the geocode function in the spesific geocoder class.
 101+ // Call the geocode function in the specific geocoder class.
102102 $coordinates = call_user_func( array( $egMapsGeoServices[$service], 'geocode' ), $address );
103103
104104 // If there address could not be geocoded, and contains comma's, try again without the comma's.
@@ -165,4 +165,4 @@
166166
167167 return $service;
168168 }
169 -}
\ No newline at end of file
 169+}
Index: trunk/extensions/Maps/Features/DisplayPoint/Maps_DisplayPoint.php
@@ -76,16 +76,16 @@
7777 * @param string $name The name of the parameter.
7878 * @param array $parameters Array containing data about the so far handled parameters.
7979 */
80 - public static function formatGeoPoints( &$locations, $name, array $parameters, $metaDataSeperator = false ) {
 80+ public static function formatGeoPoints( &$locations, $name, array $parameters, $metaDataSeparator = false ) {
8181 $locations = (array)$locations;
8282 foreach ( $locations as &$location ) {
83 - self::formatGeoPoint( $location, $name, $parameters, $metaDataSeperator );
 83+ self::formatGeoPoint( $location, $name, $parameters, $metaDataSeparator );
8484 }
8585 }
8686
87 - public static function formatGeoPoint( &$location, $name, array $parameters, $metaDataSeperator = false ) {
88 - if ( $metaDataSeperator !== false ) {
89 - $segments = explode( $metaDataSeperator, $location );
 87+ public static function formatGeoPoint( &$location, $name, array $parameters, $metaDataSeparator = false ) {
 88+ if ( $metaDataSeparator !== false ) {
 89+ $segments = explode( $metaDataSeparator, $location );
9090 }
9191 else {
9292 $segments = array( $location );
@@ -96,4 +96,4 @@
9797 $location = $segments;
9898 }
9999
100 -}
\ No newline at end of file
 100+}
Index: trunk/extensions/Maps/Features/DisplayPoint/Maps_BasePointMap.php
@@ -15,7 +15,7 @@
1616
1717 /**
1818 * Abstract class MapsBasePointMap provides the scafolding for classes handling display_point(s)
19 - * calls for a spesific mapping service. It inherits from MapsMapFeature and therefore forces
 19+ * calls for a specific mapping service. It inherits from MapsMapFeature and therefore forces
2020 * inheriting classes to implement sereveral methods.
2121 *
2222 * @ingroup Maps
@@ -30,7 +30,7 @@
3131
3232 protected $output = '';
3333
34 - protected $spesificParameters = false;
 34+ protected $specificParameters = false;
3535 protected $featureParameters = false;
3636
3737 private $markerData = array();
@@ -248,4 +248,4 @@
249249 $this->centreLat = $egMapsMapLat;
250250 $this->centreLon = $egMapsMapLon;
251251 }
252 -}
\ No newline at end of file
 252+}
Index: trunk/extensions/Maps/Features/DisplayMap/Maps_BaseMap.php
@@ -15,7 +15,7 @@
1616
1717 /**
1818 * Abstract class MapsBaseMap provides the scafolding for classes handling display_map
19 - * calls for a spesific mapping service. It inherits from MapsMapFeature and therefore
 19+ * calls for a specific mapping service. It inherits from MapsMapFeature and therefore
2020 * forces inheriting classes to implement sereveral methods.
2121 *
2222 * @ingroup Maps
@@ -32,7 +32,7 @@
3333
3434 protected $parser;
3535
36 - protected $spesificParameters = false;
 36+ protected $specificParameters = false;
3737 protected $featureParameters = false;
3838
3939 /**
@@ -141,4 +141,4 @@
142142 }
143143 }
144144
145 -}
\ No newline at end of file
 145+}
Index: trunk/extensions/Maps/Features/Maps_ParserFunctions.php
@@ -84,9 +84,9 @@
8585 /*
8686 * Assembliy of the allowed parameters and their information.
8787 * The main parameters (the ones that are shared by everything) are overidden
88 - * by the feature parameters (the ones spesific to a feature). The result is then
89 - * again overidden by the service parameters (the ones spesific to the service),
90 - * and finally by the spesific parameters (the ones spesific to a service-feature combination).
 88+ * by the feature parameters (the ones specific to a feature). The result is then
 89+ * again overidden by the service parameters (the ones specific to the service),
 90+ * and finally by the specific parameters (the ones specific to a service-feature combination).
9191 */
9292 $parameterInfo = array_merge_recursive( MapsMapper::getCommonParameters(), $mapClass->getFeatureParameters() );
9393 $parameterInfo = array_merge_recursive( $parameterInfo, $egMapsServices[$service]['parameters'] );
@@ -134,4 +134,4 @@
135135
136136 return $equals;
137137 }
138 -}
\ No newline at end of file
 138+}

Status & tagging log