diff --git a/Services/Openstreetmap.php b/Services/Openstreetmap.php index 768315a..c95a6c1 100644 --- a/Services/Openstreetmap.php +++ b/Services/Openstreetmap.php @@ -71,9 +71,9 @@ public static function autoload($class) * @param array $config Defaults to empty array if none provided * * @access protected - * @return void + * @return Services_Openstreetmap */ - function __construct($config = array()) + public function __construct($config = array()) { if ($config == array()) { $config = $this->config; @@ -107,7 +107,7 @@ function __construct($config = array()) * @access public * @return array */ - function bboxToMinMax($minLat, $minLon, $maxLat, $maxLon) + public function bboxToMinMax($minLat, $minLon, $maxLat, $maxLon) { return array($minLon, $minLat, $maxLon, $maxLat); } @@ -129,7 +129,7 @@ function bboxToMinMax($minLat, $minLon, $maxLat, $maxLon) * @return void */ - function get($minLon, $minLat, $maxLon, $maxLat) + public function get($minLon, $minLat, $maxLon, $maxLat) { $config = $this->getConfig(); $url = $config->getValue('server') @@ -152,7 +152,7 @@ function get($minLon, $minLat, $maxLon, $maxLat) * @access public * @return array */ - function getCoordsOfPlace($place) + public function getCoordsOfPlace($place) { $url = 'http://nominatim.openstreetmap.org/search?q=' . urlencode($place) . '&limit=1&format=xml'; @@ -197,7 +197,7 @@ public static function getIDs($args) * @access public * @return void */ - function loadXML($file) + public function loadXML($file) { $this->xml = file_get_contents($file); } @@ -208,7 +208,7 @@ function loadXML($file) * @access public * @return string */ - function getXML() + public function getXML() { return $this->xml; } diff --git a/Services/Openstreetmap/API/V06.php b/Services/Openstreetmap/API/V06.php index 020b889..6d23f85 100644 --- a/Services/Openstreetmap/API/V06.php +++ b/Services/Openstreetmap/API/V06.php @@ -104,7 +104,7 @@ public function getTransport() * @access public * @return string */ - function getRelation($relationID, $version = null) + public function getRelation($relationID, $version = null) { return $this->getTransport()->getObject('relation', $relationID, $version); } @@ -139,7 +139,7 @@ public function getRelations() * @access public * @return string */ - function getChangeset($id, $version = null) + public function getChangeset($id, $version = null) { return $this->getTransport()->getObject('changeset', $id, $version); } @@ -336,7 +336,7 @@ public function getWays() * @access public * @return string */ - function getNode($nodeID, $version = null) + public function getNode($nodeID, $version = null) { $node = $this->getTransport()->getObject('node', $nodeID, $version); if ($node !== false) { diff --git a/Services/Openstreetmap/Config.php b/Services/Openstreetmap/Config.php index 16efd5d..c33194c 100644 --- a/Services/Openstreetmap/Config.php +++ b/Services/Openstreetmap/Config.php @@ -160,9 +160,9 @@ public function getValue($name = null) * @throws Services_Openstreetmap_Exception If the parameter is unknown * * @access public - * @return void + * @return Services_Openstreetmap_Config */ - function setValue($config, $value = null) + public function setValue($config, $value = null) { if (is_array($config)) { if (isset($config['adapter'])) { @@ -218,7 +218,7 @@ function setValue($config, $value = null) * @access public * @return Services_Openstreetmap */ - function setServer($server) + public function setServer($server) { try { $c = $this->getTransport()->getResponse($server . '/api/capabilities'); @@ -265,7 +265,7 @@ function setServer($server) * @access public * @return Services_Openstreetmap */ - function setPasswordfile($file) + public function setPasswordfile($file) { if (is_null($file)) { return $this; @@ -347,7 +347,7 @@ public function asArray() * @see minVersion * @see timeout * - * @return void + * @return boolean * * @internal * @throws Services_Openstreetmap_Exception If the API Version is not @@ -513,7 +513,7 @@ public function getMaxElements() * @param string $attribute name of attribute * @param mixed $default default value * - * @return void + * @return string */ public function getXMLValue( SimpleXMLElement $xml, diff --git a/Services/Openstreetmap/Relation.php b/Services/Openstreetmap/Relation.php index dd84c59..d71a5cc 100644 --- a/Services/Openstreetmap/Relation.php +++ b/Services/Openstreetmap/Relation.php @@ -34,7 +34,7 @@ class Services_Openstreetmap_Relation extends Services_Openstreetmap_Object * @access public * @return void */ - function getMembers() + public function getMembers() { return $this->members; } @@ -43,9 +43,9 @@ function getMembers() * type * * @access public - * @return void + * @return string */ - function getType() + public function getType() { return $this->type; } @@ -57,7 +57,7 @@ function getType() * @access public * @return void */ - function addMember() + public function addMember() { } @@ -68,7 +68,7 @@ function addMember() * @access public * @return void */ - function removeMember() + public function removeMember() { } diff --git a/Services/Openstreetmap/Way.php b/Services/Openstreetmap/Way.php index 9974758..a5237ce 100644 --- a/Services/Openstreetmap/Way.php +++ b/Services/Openstreetmap/Way.php @@ -35,7 +35,7 @@ class Services_Openstreetmap_Way extends Services_Openstreetmap_Object * @access public * @return boolean */ - function isClosed() + public function isClosed() { // Not closed if there's just one node. // Otherwise a way is considered closed if the first node has @@ -80,7 +80,7 @@ public function getNodes() * @access public * @return Services_Openstreetmap_Way */ - function addNode(Services_Openstreetmap_Node $node) + public function addNode(Services_Openstreetmap_Node $node) { $id = $node->getId(); $pos = array_search($id, $this->nodes); @@ -102,7 +102,7 @@ function addNode(Services_Openstreetmap_Node $node) * @access public * @return Services_Openstreetmap_Way */ - function removeNode($node) + public function removeNode($node) { if (empty($this->nodes)) { $this->nodes = $this->getNodes();