code refactoring

- improved comparing & checking
- improved string composition
This commit is contained in:
Steffen Schröder
2014-06-14 14:32:29 +02:00
parent bd6e0b5151
commit 9985b814d2
41 changed files with 337 additions and 318 deletions

View File

@ -80,21 +80,20 @@ class Map {
}
/**
* Get's the gameType of the Current Map
* Get the Game Type of the Map
*
* @return string
*/
public function getGame() {
switch ($this->environment) {
case 'Storm':
return "sm";
return 'sm';
case 'Canyon':
case 'Stadium':
case 'Valley':
return "tm";
default:
return "";
return 'tm';
}
return null;
}
/**
@ -104,7 +103,7 @@ class Map {
*/
public function updateAvailable() {
if ($this->mx && ($this->lastUpdate < strtotime($this->mx->updated) || $this->uid != $this->mx->uid)) {
if ($this->mx && ($this->lastUpdate < strtotime($this->mx->updated) || $this->uid !== $this->mx->uid)) {
return true;
} else {
return false;