class PaymentType
{
private const CASH = 1;
private const NON_CASH = 2;
private int $type;
private function __construct(int $type)
{
$this->type = $type;
}
public static function cash(): self
{
return new self(self::CASH);
}
public static function nonCash(): self
{
return new self(self::NON_CASH);
}
public function isCash(): bool
{
return $this->type === self::CASH;
}
public function isNonCash(): bool
{
return $this->type === self::NON_CASH;
}
}
$json = '{"result":404,"message":"NOT FOUND","data":{}}';
echo explode('"', $json)[5];
EntityRepository, в котором строить запросы используя createQueryBuilder, но на сколько понимаю, он должен быть привязан к какой-нибудь сущности. В моем же случае сущность вообще не важна.
for($i = 0; $i <= 5; $i++){
for($j = 0; $j < 3; $j++){
получилась какая-то чушь
readBy(User $user)
changeItemQuantity(Item $item, integer $quantity)