WIP: Symfony 6 project remake #2

Draft
skobkin wants to merge 103 commits from symfony6_remake into master
4 changed files with 31 additions and 70 deletions
Showing only changes of commit b7e2cbc630 - Show all commits

View file

@ -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;
}
}

View file

@ -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;
}
}

View 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
View 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,
) {
}
}