Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenDeDauw committed Jun 14, 2014
1 parent 808b307 commit bc7e67a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions includes/parsers/CircleParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
class CircleParser extends StringValueParser {

protected $supportGeocoding = true;
private $supportGeocoding = true;

// TODO: use options
protected $metaDataSeparator = '~';
private $metaDataSeparator = '~';

/**
* @see StringValueParser::stringParse
Expand Down Expand Up @@ -68,7 +68,7 @@ public function stringParse( $value ) {
return $circle;
}

protected function stringToLatLongValue( $location ) {
private function stringToLatLongValue( $location ) {
if ( $this->supportGeocoding && Geocoders::canGeocode() ) {
$location = Geocoders::attemptToGeocode( $location );

Expand Down
14 changes: 6 additions & 8 deletions includes/parsers/LocationParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class LocationParser extends StringValueParser {

// TODO
protected $supportGeocoding = true;
private $supportGeocoding = true;

/**
* @see StringValueParser::stringParse
Expand Down Expand Up @@ -65,7 +65,7 @@ public function stringParse( $value ) {
return $location;
}

protected function setTitleOrLink( Location $location, $titleOrLink ) {
private function setTitleOrLink( Location $location, $titleOrLink ) {
if ( $this->isLink( $titleOrLink ) ) {
$this->setLink( $location, $titleOrLink );
}
Expand All @@ -74,16 +74,16 @@ protected function setTitleOrLink( Location $location, $titleOrLink ) {
}
}

protected function isLink( $value ) {
private function isLink( $value ) {
return strpos( $value , 'link:' ) === 0;
}

protected function setLink( Location $location, $link ) {
private function setLink( Location $location, $link ) {
$link = substr( $link, 5 );
$location->setLink( $this->getExpandedLink( $link ) );
}

protected function getExpandedLink( $link ) {
private function getExpandedLink( $link ) {
if ( filter_var( $link , FILTER_VALIDATE_URL , FILTER_FLAG_SCHEME_REQUIRED ) ) {
return $link;
}
Expand All @@ -98,14 +98,12 @@ protected function getExpandedLink( $link ) {
}

/**
* @since 3.0
*
* @param string $location
*
* @return LatLongValue
* @throws ParseException
*/
protected function stringToLatLongValue( $location ) {
private function stringToLatLongValue( $location ) {
if ( $this->supportGeocoding && Geocoders::canGeocode() ) {
$location = Geocoders::attemptToGeocode( $location );

Expand Down
6 changes: 3 additions & 3 deletions includes/parsers/RectangleParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
class RectangleParser extends StringValueParser {

protected $supportGeocoding = true;
private $supportGeocoding = true;

// TODO: use options
protected $metaDataSeparator = '~';
private $metaDataSeparator = '~';

/**
* @see StringValueParser::stringParse
Expand Down Expand Up @@ -63,7 +63,7 @@ public function stringParse( $value ) {
return $rectangle;
}

protected function stringToLatLongValue( $location ) {
private function stringToLatLongValue( $location ) {
if ( $this->supportGeocoding && Geocoders::canGeocode() ) {
$location = Geocoders::attemptToGeocode( $location );

Expand Down
1 change: 1 addition & 0 deletions includes/parsers/WmsOverlayParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class WmsOverlayParser extends StringValueParser {
* @param string $value
*
* @return WmsOverlay
* @throws ParseException
*/
protected function stringParse( $value ) {
$separator = " ";
Expand Down

0 comments on commit bc7e67a

Please sign in to comment.