mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Replace empty() usages with count()
This commit is contained in:
@ -61,6 +61,7 @@ use function array_merge;
|
||||
use function array_rand;
|
||||
use function array_values;
|
||||
use function ceil;
|
||||
use function count;
|
||||
use function in_array;
|
||||
use function max;
|
||||
use function min;
|
||||
@ -554,7 +555,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($equipment)){
|
||||
if(count($equipment) > 0){
|
||||
$repairItem = $equipment[$k = array_rand($equipment)];
|
||||
if($repairItem->getDamage() > 0){
|
||||
$repairAmount = min($repairItem->getDamage(), $xpValue * 2);
|
||||
|
Reference in New Issue
Block a user