检查多个空条款

时间:2016-03-31 12:39:48

标签: php

我目前有一些重构问题,我正在重构一个函数,它检查一些类属性是null还是未定义。该功能目前以下列方式执行此操作:

 return (
            empty($postcodeRow->getAddress())
            && empty($postcodeRow->getCity())
            && empty($postcodeRow->getSurcharge())
        );

我想知道我知道你可以链接isset但是有没有办法在PHP中链接多个空子句?

0 个答案:

没有答案