phpstan, rector, cs-fixer

This commit is contained in:
Mathieu Jaumotte 2023-09-25 11:50:54 +02:00
parent fc919e9547
commit 6665a443b9
10 changed files with 62 additions and 4 deletions

View File

@ -279,7 +279,7 @@ class User implements UserInterface, \Stringable
)
);
$scopes = $this->scopeHistories->matching($criteria);
$scopes = $this->scopeHistories->matching($criteria)->getIterator();
if ($scopes->count() > 0) {
return $scopes->first()->getScope();
@ -328,7 +328,7 @@ class User implements UserInterface, \Stringable
)
);
$jobs = $this->jobHistories->matching($criteria);
$jobs = $this->jobHistories->matching($criteria)->getIterator();
if ($jobs->count() > 0) {
return $jobs->first()->getJob();

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Repository\User;
use App\Entity\UserJobHistory;
use Chill\MainBundle\Entity\User\UserJobHistory;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMException;

View File

@ -11,7 +11,7 @@ declare(strict_types=1);
namespace Chill\MainBundle\Repository\User;
use App\Entity\UserScopeHistory;
use Chill\MainBundle\Entity\User\UserScopeHistory;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMException;

View File

@ -17,6 +17,10 @@ use Chill\MainBundle\Entity\UserJob;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
/**
* @internal
* @coversNothing
*/
class UserTest extends TestCase
{
use ProphecyTrait;

View File

@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace App;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;

View File

@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/../../vendor/autoload.php';

View File

@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
return [
ChampsLibres\AsyncUploaderBundle\ChampsLibresAsyncUploaderBundle::class => ['all' => true],
Chill\ActivityBundle\ChillActivityBundle::class => ['all' => true],

View File

@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
if (file_exists(dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/srcApp_KernelProdContainer.preload.php';
}

View File

@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';

View File

@ -1,5 +1,14 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
use App\Kernel;
require __DIR__ . '/bootstrap.php';