Start migrating EnumTrait enums to PHP 8.1 native enums

This commit is contained in:
Dylan K. Taylor
2023-09-07 17:20:52 +01:00
parent fe94379a93
commit ae564e445d
131 changed files with 1157 additions and 1349 deletions

View File

@ -101,9 +101,9 @@ class Wall extends Transparent{
foreach(Facing::HORIZONTAL as $facing){
$block = $this->getSide($facing);
if($block instanceof static || $block instanceof FenceGate || $block instanceof Thin || $block->getSupportType(Facing::opposite($facing))->equals(SupportType::FULL())){
if($block instanceof static || $block instanceof FenceGate || $block instanceof Thin || $block->getSupportType(Facing::opposite($facing)) === SupportType::FULL){
if(!isset($this->connections[$facing])){
$this->connections[$facing] = WallConnectionType::SHORT();
$this->connections[$facing] = WallConnectionType::SHORT;
$changed++;
}
}elseif(isset($this->connections[$facing])){
@ -152,6 +152,6 @@ class Wall extends Transparent{
}
public function getSupportType(int $facing) : SupportType{
return Facing::axis($facing) === Axis::Y ? SupportType::CENTER() : SupportType::NONE();
return Facing::axis($facing) === Axis::Y ? SupportType::CENTER : SupportType::NONE;
}
}