Transform current code using ternary if/else operator: https://github.com/evangelion1204/qa-tools/blob/interface_decorator/library/aik099/QATools/PageObject/PropertyDecorator/DefaultPropertyDecorator.php#L82-L86