Replace empty() usages with count()

This commit is contained in:
Dylan K. Taylor
2019-12-18 11:06:28 +00:00
parent b08c38f8f9
commit 494660102e
23 changed files with 58 additions and 43 deletions

View File

@ -45,6 +45,7 @@ use pocketmine\utils\Binary;
use pocketmine\utils\BinaryStream;
use function array_values;
use function chr;
use function count;
use function defined;
use function explode;
use function extension_loaded;
@ -519,7 +520,7 @@ class LevelDB extends BaseLevelProvider{
* @param string $index
*/
private function writeTags(array $targets, string $index){
if(!empty($targets)){
if(count($targets) > 0){
$nbt = new LittleEndianNBTStream();
$this->db->put($index, $nbt->write($targets));
}else{