for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Stu\Lib\Interaction\Member;
use Stu\Component\Anomaly\Type\AnomalyTypeEnum;
use Stu\Lib\Interaction\InteractionCheckType;
use Stu\Orm\Entity\Map;
use Stu\Orm\Entity\StarSystemMap;
use Stu\Orm\Entity\Trumfield;
use Stu\Orm\Entity\User;
class TrumfieldMember implements InteractionMemberInterface
{
public function __construct(private Trumfield $trumfield) {}
#[\Override]
public function get(): Trumfield
return $this->trumfield;
}
public function canAccess(
InteractionMemberInterface $other,
callable $shouldCheck
): ?InteractionCheckType {
return null;
public function canBeAccessedFrom(
if (
$shouldCheck(InteractionCheckType::EXPECT_TARGET_DOCKED_OR_NO_ION_STORM)
&& $this->trumfield->getLocation()->hasAnomaly(AnomalyTypeEnum::ION_STORM)
) {
return InteractionCheckType::EXPECT_TARGET_DOCKED_OR_NO_ION_STORM;
public function getLocation(): Map|StarSystemMap
return $this->trumfield->getLocation();
public function getUser(): ?User