activate bleeding edge phpstan rules (#2898)

This commit is contained in:
Kevin Papst
2021-11-02 13:33:21 +01:00
committed by GitHub
parent 36c08b0dea
commit 1b35356f81
32 changed files with 73 additions and 142 deletions

View File

@@ -123,9 +123,7 @@ class ActivityController extends BaseApiController
if (!\is_array($projects)) {
$projects = explode(',', $projects);
}
if (!empty($projects)) {
$query->setProjects($projects);
}
$query->setProjects($projects);
}
if (!empty($project = $paramFetcher->get('project'))) {

View File

@@ -26,6 +26,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $formDateTime = '';
/**
@@ -36,6 +37,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $formDate = '';
/**
@@ -46,6 +48,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $dateTime = '';
/**
@@ -56,6 +59,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $date = '';
/**
@@ -66,6 +70,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $time = '';
/**
@@ -76,6 +81,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $duration = '';
/**
@@ -86,6 +92,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="boolean")
* @phpstan-ignore-next-line
*/
private $is24hours = true;
/**
@@ -96,6 +103,7 @@ final class I18nConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="DateTime")
* @phpstan-ignore-next-line
*/
private $now;

View File

@@ -26,6 +26,7 @@ final class TimesheetConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $trackingMode = 'default';
/**
@@ -36,6 +37,7 @@ final class TimesheetConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="string")
* @phpstan-ignore-next-line
*/
private $defaultBeginTime = 'now';
/**
@@ -46,6 +48,7 @@ final class TimesheetConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="integer")
* @phpstan-ignore-next-line
*/
private $activeEntriesHardLimit = 1;
/**
@@ -56,6 +59,7 @@ final class TimesheetConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="integer")
* @phpstan-ignore-next-line
*/
private $activeEntriesSoftLimit = 1;
/**
@@ -66,6 +70,7 @@ final class TimesheetConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="boolean")
* @phpstan-ignore-next-line
*/
private $isAllowFutureTimes = true;
/**
@@ -76,6 +81,7 @@ final class TimesheetConfig
* @Serializer\Expose()
* @Serializer\Groups({"Default"})
* @Serializer\Type(name="boolean")
* @phpstan-ignore-next-line
*/
private $isAllowOverlapping = true;

View File

@@ -123,9 +123,7 @@ class ProjectController extends BaseApiController
if (!\is_array($customers)) {
$customers = explode(',', $customers);
}
if (!empty($customers)) {
$query->setCustomers($customers);
}
$query->setCustomers($customers);
}
if (!empty($customer = $paramFetcher->get('customer'))) {

View File

@@ -23,7 +23,6 @@ use App\Repository\TagRepository;
use App\Repository\TimesheetRepository;
use App\Timesheet\TimesheetService;
use App\Timesheet\TrackingMode\TrackingModeInterface;
use App\Timesheet\TrackingModeService;
use App\Utils\SearchTerm;
use Doctrine\Common\Collections\ArrayCollection;
use FOS\RestBundle\Controller\Annotations as Rest;
@@ -67,10 +66,6 @@ class TimesheetController extends BaseApiController
* @var TagRepository
*/
private $tagRepository;
/**
* @var TrackingModeService
*/
private $trackingModeService;
/**
* @var EventDispatcherInterface
*/
@@ -152,9 +147,7 @@ class TimesheetController extends BaseApiController
if (!\is_array($customers)) {
$customers = explode(',', $customers);
}
if (!empty($customers)) {
$query->setCustomers($customers);
}
$query->setCustomers($customers);
}
if (!empty($customer = $paramFetcher->get('customer'))) {
@@ -165,9 +158,7 @@ class TimesheetController extends BaseApiController
if (!\is_array($projects)) {
$projects = explode(',', $projects);
}
if (!empty($projects)) {
$query->setProjects($projects);
}
$query->setProjects($projects);
}
if (!empty($project = $paramFetcher->get('project'))) {
@@ -178,9 +169,7 @@ class TimesheetController extends BaseApiController
if (!\is_array($activities)) {
$activities = explode(',', $activities);
}
if (!empty($activities)) {
$query->setActivities($activities);
}
$query->setActivities($activities);
}
if (!empty($activity = $paramFetcher->get('activity'))) {