WIP: Symfony 6 project remake #2
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace src\PointToolsBundle\DTO;
|
||||
|
||||
/**
|
||||
* Events count by day
|
||||
*/
|
||||
class DailyEvents
|
||||
{
|
||||
/**
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $date;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $eventsCount;
|
||||
|
||||
public function __construct(string $date, int $eventsCount)
|
||||
{
|
||||
$this->date = new \DateTime($date);
|
||||
$this->eventsCount = $eventsCount;
|
||||
}
|
||||
|
||||
public function getDate(): \DateTime
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function getEventsCount(): int
|
||||
{
|
||||
return $this->eventsCount;
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace src\PointToolsBundle\DTO;
|
||||
|
||||
/**
|
||||
* Data Transfer Object for top users list
|
||||
*/
|
||||
class TopUserDTO
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $login;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $subscribersCount;
|
||||
|
||||
public function __construct(string $login, int $subscribersCount)
|
||||
{
|
||||
$this->login = $login;
|
||||
$this->subscribersCount = $subscribersCount;
|
||||
}
|
||||
|
||||
public function getLogin(): string
|
||||
{
|
||||
return $this->login;
|
||||
}
|
||||
|
||||
public function getSubscribersCount(): int
|
||||
{
|
||||
return $this->subscribersCount;
|
||||
}
|
||||
}
|
17
src/DTO/DailyEventsDTO.php
Normal file
17
src/DTO/DailyEventsDTO.php
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\DTO;
|
||||
|
||||
/** Events count by day */
|
||||
class DailyEventsDTO
|
||||
{
|
||||
public readonly \DateTime $date;
|
||||
|
||||
public function __construct(
|
||||
string $date,
|
||||
public readonly int $eventsCount,
|
||||
) {
|
||||
$this->date = new \DateTime($date);
|
||||
}
|
||||
}
|
14
src/DTO/TopUserDTO.php
Normal file
14
src/DTO/TopUserDTO.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\DTO;
|
||||
|
||||
/** Data Transfer Object for top users list */
|
||||
class TopUserDTO
|
||||
{
|
||||
public function __construct(
|
||||
public readonly string $login,
|
||||
public readonly int $subscribersCount,
|
||||
) {
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue