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