for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PanicLabCore\Structs;
use function get_object_vars;
class Target implements \JsonSerializable
{
/** @var string */
protected $germColor;
protected $germSize;
protected $germStyle;
public function __construct(string $germColor, string $germSize, string $germStyle)
$this->germColor = $germColor;
$this->germSize = $germSize;
$this->germStyle = $germStyle;
}
public function setGermColor(string $germColor): void
public function setGermSize(string $germSize): void
public function setGermStyle(string $germStyle): void
public function getGermColor(): string
return $this->germColor;
public function getGermSize(): string
return $this->germSize;
public function getGermStyle(): string
return $this->germStyle;
public function checkIfSame(GermTile $tile): bool
if ($tile->getColor() !== $this->getGermColor()) {
return false;
if ($tile->getSize() !== $this->getGermSize()) {
return $tile->getStyle() === $this->getGermStyle();
/**
* @return string[]
*/
public function jsonSerialize(): array
return get_object_vars($this);