for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Del\Passport;
class Resource implements ResourceInterface
{
public function __construct(
private readonly mixed $object,
private readonly string $idMethod = 'getId'
) {}
public function getResourceType(): string
return \get_class($this->object);
}
public function getResourceId(): int
return $this->object->{$this->idMethod}();