try to fix dedimania php notice

This commit is contained in:
kremsy 2015-01-12 13:33:40 +01:00
parent 2d942c58fe
commit f2948c1a0c

View File

@ -405,8 +405,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
return null;
}
switch ($gameMode) {
case 0:
{
case 0: {
$scriptNameResponse = $this->maniaControl->getClient()->getScriptName();
$scriptName = str_replace('.Script.txt', '', $scriptNameResponse['CurrentValue']);
switch ($scriptName) {
@ -424,13 +423,11 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
}
case 1:
case 3:
case 5:
{
case 5: {
return 'Rounds';
}
case 2:
case 4:
{
case 4: {
return 'TA';
}
}
@ -848,7 +845,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
* @param RecordCallback $callback
*/
public function handleFinishCallback(RecordCallback $callback) {
if (!$this->dedimaniaData || !$this->dedimaniaData->records) {
if ($this->dedimaniaData != null || !$this->dedimaniaData->records) {
return;
}
if ($callback->isLegacyCallback) {
@ -907,7 +904,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
* @return RecordData $record
*/
private function getDedimaniaRecord($login) {
if (!$this->dedimaniaData || !$this->dedimaniaData->records) {
if ($this->dedimaniaData != null || !$this->dedimaniaData->records) {
return new RecordData(null);
}
$records = $this->dedimaniaData->records;
@ -948,7 +945,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
* @return bool
*/
private function insertDedimaniaRecord(RecordData &$newRecord, RecordData $oldRecord) {
if (!$this->dedimaniaData || !$this->dedimaniaData->records || $newRecord->nullRecord) {
if ($this->dedimaniaData != null || !$this->dedimaniaData->records || $newRecord->nullRecord) {
return false;
}