How to refactor this conditions to make simpler and cleaner?
if(in_array($sides, [self::ALL_SIDES, self::HORIZONTAL_SIDES, self::LEFT_SIDE ])) {
}
if(in_array($sides, [self::ALL_SIDES, self::HORIZONTAL_SIDES, self::RIGHT_SIDE ])) {
}
if(in_array($sides, [self::ALL_SIDES, self::VERTICAL_SIDES, self::TOP_SIDE ])) {
}
if(in_array($sides, [self::ALL_SIDES, self::VERTICAL_SIDES, self::BOTTOM_SIDE ])) {
}
Aucun commentaire:
Enregistrer un commentaire