apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -15,8 +15,6 @@ use Chill\MainBundle\CRUD\Controller\ApiController;
use Chill\MainBundle\Serializer\Model\Collection;
use Chill\MainBundle\Serializer\Model\Counter;
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepository;
use DateInterval;
use DateTimeImmutable;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
@@ -30,10 +28,10 @@ class AccompanyingCourseWorkApiController extends ApiController
*/
public function myWorksNearEndDate(Request $request): JsonResponse
{
$since = (new DateTimeImmutable('now'))
->sub(new DateInterval('P' . $request->query->getInt('since', 15) . 'D'));
$until = (new DateTimeImmutable('now'))
->add(new DateInterval('P' . $request->query->getInt('since', 15) . 'D'));
$since = (new \DateTimeImmutable('now'))
->sub(new \DateInterval('P'.$request->query->getInt('since', 15).'D'));
$until = (new \DateTimeImmutable('now'))
->add(new \DateInterval('P'.$request->query->getInt('since', 15).'D'));
$total = $this->accompanyingPeriodWorkRepository
->countNearEndDateByUser($this->getUser(), $since, $until);