mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 23:59:53 +00:00
BanEntry: remove useless do/while
This commit is contained in:
parent
2dee1dbc28
commit
8865bb73ba
@ -163,19 +163,18 @@ class BanEntry{
|
||||
}else{
|
||||
$str = explode("|", trim($str));
|
||||
$entry = new BanEntry(trim(array_shift($str)));
|
||||
do{
|
||||
if(count($str) === 0){
|
||||
break;
|
||||
return $entry;
|
||||
}
|
||||
|
||||
$entry->setCreated(self::parseDate(array_shift($str)));
|
||||
if(count($str) === 0){
|
||||
break;
|
||||
return $entry;
|
||||
}
|
||||
|
||||
$entry->setSource(trim(array_shift($str)));
|
||||
if(count($str) === 0){
|
||||
break;
|
||||
return $entry;
|
||||
}
|
||||
|
||||
$expire = trim(array_shift($str));
|
||||
@ -183,12 +182,9 @@ class BanEntry{
|
||||
$entry->setExpires(self::parseDate($expire));
|
||||
}
|
||||
if(count($str) === 0){
|
||||
break;
|
||||
return $entry;
|
||||
}
|
||||
|
||||
$entry->setReason(trim(array_shift($str)));
|
||||
}while(false);
|
||||
|
||||
return $entry;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user