replace PHPUnit annotations with attributes (#5608)
This commit is contained in:
@@ -19,7 +19,7 @@ use App\Timesheet\DateTimeFactory;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeInterface;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\Query\Expr\Join;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Psr\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
@@ -112,7 +112,7 @@ class CustomerStatisticService
|
||||
$qb = $this->timesheetRepository->createQueryBuilder('t');
|
||||
$qb
|
||||
->select('IDENTITY(p.customer) AS id')
|
||||
->join(Project::class, 'p', Query\Expr\Join::WITH, 't.project = p.id')
|
||||
->join(Project::class, 'p', Join::WITH, 't.project = p.id')
|
||||
->addSelect('COALESCE(SUM(t.duration), 0) as duration')
|
||||
->addSelect('COALESCE(SUM(t.rate), 0) as rate')
|
||||
->addSelect('COALESCE(SUM(t.internalRate), 0) as internalRate')
|
||||
|
||||
@@ -33,7 +33,7 @@ use Doctrine\ORM\Query\Expr\Andx;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Activity>
|
||||
* @extends EntityRepository<Activity>
|
||||
*/
|
||||
class ActivityRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use App\Entity\CustomerRate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<CustomerRate>
|
||||
* @extends EntityRepository<CustomerRate>
|
||||
*/
|
||||
class CustomerRateRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ use App\Entity\ExportTemplate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<ExportTemplate>
|
||||
* @extends EntityRepository<ExportTemplate>
|
||||
*/
|
||||
class ExportTemplateRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Invoice>
|
||||
* @extends EntityRepository<Invoice>
|
||||
*/
|
||||
class InvoiceRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ use Doctrine\ORM\Query;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<InvoiceTemplate>
|
||||
* @extends EntityRepository<InvoiceTemplate>
|
||||
*/
|
||||
class InvoiceTemplateRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use App\Entity\ProjectRate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<ProjectRate>
|
||||
* @extends EntityRepository<ProjectRate>
|
||||
*/
|
||||
class ProjectRateRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ use Doctrine\ORM\Query\Expr\Andx;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Project>
|
||||
* @extends EntityRepository<Project>
|
||||
*/
|
||||
class ProjectRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use App\Entity\RolePermission;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<RolePermission>
|
||||
* @extends EntityRepository<RolePermission>
|
||||
*/
|
||||
class RolePermissionRepository extends EntityRepository
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\Exception\ORMException;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<Role>
|
||||
* @extends EntityRepository<Role>
|
||||
* @method Role[] findAll()
|
||||
*/
|
||||
class RoleRepository extends EntityRepository
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace App\Validator\Constraints;
|
||||
|
||||
use App\Configuration\SystemConfiguration;
|
||||
use App\Entity\Timesheet as TimesheetEntity;
|
||||
use App\Utils\Duration;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
@@ -64,7 +65,7 @@ final class TimesheetLongRunningValidator extends ConstraintValidator
|
||||
return;
|
||||
}
|
||||
|
||||
$format = new \App\Utils\Duration();
|
||||
$format = new Duration();
|
||||
$hours = $format->format($maxMinutes * 60);
|
||||
|
||||
$this->context->buildViolation($constraint->message)
|
||||
|
||||
Reference in New Issue
Block a user