mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix pipeline rector and cs
This commit is contained in:
parent
36f2275a56
commit
e38d47ec5e
10
rector.php
10
rector.php
@ -39,10 +39,14 @@ return static function (RectorConfig $rectorConfig): void {
|
|||||||
|
|
||||||
//define sets of rules
|
//define sets of rules
|
||||||
$rectorConfig->sets([
|
$rectorConfig->sets([
|
||||||
\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_82,
|
LevelSetList::UP_TO_PHP_82,
|
||||||
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_54,
|
\Rector\Symfony\Set\SymfonySetList::SYMFONY_40,
|
||||||
|
\Rector\Symfony\Set\SymfonySetList::SYMFONY_41,
|
||||||
|
\Rector\Symfony\Set\SymfonySetList::SYMFONY_42,
|
||||||
|
\Rector\Symfony\Set\SymfonySetList::SYMFONY_43,
|
||||||
|
\Rector\Symfony\Set\SymfonySetList::SYMFONY_44,
|
||||||
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
\Rector\Doctrine\Set\DoctrineSetList::DOCTRINE_CODE_QUALITY,
|
||||||
\Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
\Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_90,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$rectorConfig->ruleWithConfiguration(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
|
$rectorConfig->ruleWithConfiguration(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
|
||||||
|
@ -60,7 +60,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase
|
|||||||
$this->assertInstanceOf(
|
$this->assertInstanceOf(
|
||||||
ActivityType::class,
|
ActivityType::class,
|
||||||
$form->getData()['type'],
|
$form->getData()['type'],
|
||||||
'The data is an instance of Chill\\ActivityBundle\\Entity\\ActivityType'
|
'The data is an instance of Chill\ActivityBundle\Entity\ActivityType'
|
||||||
);
|
);
|
||||||
$this->assertEquals($type->getId(), $form->getData()['type']->getId());
|
$this->assertEquals($type->getId(), $form->getData()['type']->getId());
|
||||||
|
|
||||||
|
@ -37,12 +37,12 @@ class RemoteEventConverter
|
|||||||
* valid when the remote string contains also a timezone, like in
|
* valid when the remote string contains also a timezone, like in
|
||||||
* lastModifiedDate.
|
* lastModifiedDate.
|
||||||
*/
|
*/
|
||||||
final public const REMOTE_DATETIMEZONE_FORMAT = 'Y-m-d\\TH:i:s.u?P';
|
final public const REMOTE_DATETIMEZONE_FORMAT = 'Y-m-d\TH:i:s.u?P';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as above, but sometimes the date is expressed with only 6 milliseconds.
|
* Same as above, but sometimes the date is expressed with only 6 milliseconds.
|
||||||
*/
|
*/
|
||||||
final public const REMOTE_DATETIMEZONE_FORMAT_ALT = 'Y-m-d\\TH:i:s.uP';
|
final public const REMOTE_DATETIMEZONE_FORMAT_ALT = 'Y-m-d\TH:i:s.uP';
|
||||||
|
|
||||||
private const REMOTE_DATE_FORMAT = 'Y-m-d\TH:i:s.u0';
|
private const REMOTE_DATE_FORMAT = 'Y-m-d\TH:i:s.u0';
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class ShortMessageCompilerPass implements CompilerPassInterface
|
|||||||
$defaultTransporter = new Reference(NullShortMessageSender::class);
|
$defaultTransporter = new Reference(NullShortMessageSender::class);
|
||||||
} elseif ('ovh' === $dsn['scheme']) {
|
} elseif ('ovh' === $dsn['scheme']) {
|
||||||
if (!class_exists('\\'.\Ovh\Api::class)) {
|
if (!class_exists('\\'.\Ovh\Api::class)) {
|
||||||
throw new RuntimeException('Class \\Ovh\\Api not found');
|
throw new RuntimeException('Class \Ovh\Api not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (['user', 'host', 'pass'] as $component) {
|
foreach (['user', 'host', 'pass'] as $component) {
|
||||||
|
@ -190,7 +190,7 @@ class ExportManager
|
|||||||
// throw an error if the export require other modifier, which is
|
// throw an error if the export require other modifier, which is
|
||||||
// not allowed when the export return a `NativeQuery`
|
// not allowed when the export return a `NativeQuery`
|
||||||
if (\count($export->supportsModifiers()) > 0) {
|
if (\count($export->supportsModifiers()) > 0) {
|
||||||
throw new \LogicException("The export with alias `{$exportAlias}` return ".'a `\\Doctrine\\ORM\\NativeQuery` and supports modifiers, which is not allowed. Either the method `supportsModifiers` should return an empty array, or return a `Doctrine\\ORM\\QueryBuilder`');
|
throw new \LogicException("The export with alias `{$exportAlias}` return ".'a `\Doctrine\ORM\NativeQuery` and supports modifiers, which is not allowed. Either the method `supportsModifiers` should return an empty array, or return a `Doctrine\ORM\QueryBuilder`');
|
||||||
}
|
}
|
||||||
} elseif ($query instanceof QueryBuilder) {
|
} elseif ($query instanceof QueryBuilder) {
|
||||||
// handle filters
|
// handle filters
|
||||||
@ -203,7 +203,7 @@ class ExportManager
|
|||||||
'dql' => $query->getDQL(),
|
'dql' => $query->getDQL(),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
throw new \UnexpectedValueException('The method `intiateQuery` should return a `\\Doctrine\\ORM\\NativeQuery` or a `Doctrine\\ORM\\QueryBuilder` object.');
|
throw new \UnexpectedValueException('The method `intiateQuery` should return a `\Doctrine\ORM\NativeQuery` or a `Doctrine\ORM\QueryBuilder` object.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $export->getResult($query, $data[ExportType::EXPORT_KEY]);
|
$result = $export->getResult($query, $data[ExportType::EXPORT_KEY]);
|
||||||
|
@ -14,9 +14,9 @@ namespace Chill\MainBundle\Search\Utils;
|
|||||||
class ExtractDateFromPattern
|
class ExtractDateFromPattern
|
||||||
{
|
{
|
||||||
private const DATE_PATTERN = [
|
private const DATE_PATTERN = [
|
||||||
['([12]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01]))', 'Y-m-d'], // 1981-05-12
|
['([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))', 'Y-m-d'], // 1981-05-12
|
||||||
['((0[1-9]|[12]\\d|3[01])\\/(0[1-9]|1[0-2])\\/([12]\\d{3}))', 'd/m/Y'], // 15/12/1980
|
['((0[1-9]|[12]\d|3[01])\/(0[1-9]|1[0-2])\/([12]\d{3}))', 'd/m/Y'], // 15/12/1980
|
||||||
['((0[1-9]|[12]\\d|3[01])-(0[1-9]|1[0-2])-([12]\\d{3}))', 'd-m-Y'], // 15/12/1980
|
['((0[1-9]|[12]\d|3[01])-(0[1-9]|1[0-2])-([12]\d{3}))', 'd-m-Y'], // 15/12/1980
|
||||||
];
|
];
|
||||||
|
|
||||||
public function extractDates(string $subject): SearchExtractionResult
|
public function extractDates(string $subject): SearchExtractionResult
|
||||||
|
@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
|||||||
|
|
||||||
class ExtractPhonenumberFromPattern
|
class ExtractPhonenumberFromPattern
|
||||||
{
|
{
|
||||||
private const PATTERN = '([\\+]{0,1}[0-9\\ ]{5,})';
|
private const PATTERN = '([\+]{0,1}[0-9\ ]{5,})';
|
||||||
|
|
||||||
private readonly string $defaultCarrierCode;
|
private readonly string $defaultCarrierCode;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ final class AccompanyingCourseControllerTest extends WebTestCase
|
|||||||
$this->assertResponseRedirects();
|
$this->assertResponseRedirects();
|
||||||
$location = $this->client->getResponse()->headers->get('Location');
|
$location = $this->client->getResponse()->headers->get('Location');
|
||||||
|
|
||||||
$this->assertEquals(1, \preg_match('|^\\/[^\\/]+\\/parcours/([\\d]+)/edit$|', (string) $location));
|
$this->assertEquals(1, \preg_match('|^\/[^\/]+\/parcours/([\d]+)/edit$|', (string) $location));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,7 +93,7 @@ final class AccompanyingCourseControllerTest extends WebTestCase
|
|||||||
$location = $this->client->getResponse()->headers->get('Location');
|
$location = $this->client->getResponse()->headers->get('Location');
|
||||||
$matches = [];
|
$matches = [];
|
||||||
|
|
||||||
$this->assertEquals(1, \preg_match('|^\\/[^\\/]+\\/parcours/([\\d]+)/edit$|', (string) $location, $matches));
|
$this->assertEquals(1, \preg_match('|^\/[^\/]+\/parcours/([\d]+)/edit$|', (string) $location, $matches));
|
||||||
$id = $matches[1];
|
$id = $matches[1];
|
||||||
|
|
||||||
$period = self::getContainer()->get(EntityManagerInterface::class)
|
$period = self::getContainer()->get(EntityManagerInterface::class)
|
||||||
|
@ -41,7 +41,7 @@ final class ChillReportExtensionTest extends KernelTestCase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$reportFounded) {
|
if (!$reportFounded) {
|
||||||
throw new \Exception('Class Chill\\ReportBundle\\Entity\\Report not found in chill_custom_fields.customizables_entities', 1);
|
throw new \Exception('Class Chill\ReportBundle\Entity\Report not found in chill_custom_fields.customizables_entities', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
/**
|
/**
|
||||||
* [fr] Sigle.
|
* [fr] Sigle.
|
||||||
*/
|
*/
|
||||||
// #[Assert\Length(min: 2)]
|
// #[Assert\Length(min: 2)]
|
||||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||||
#[ORM\Column(name: 'acronym', type: \Doctrine\DBAL\Types\Types::STRING, length: 64, nullable: true)]
|
#[ORM\Column(name: 'acronym', type: \Doctrine\DBAL\Types\Types::STRING, length: 64, nullable: true)]
|
||||||
private ?string $acronym = '';
|
private ?string $acronym = '';
|
||||||
@ -184,7 +184,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
/**
|
/**
|
||||||
* [fr] Raison sociale.
|
* [fr] Raison sociale.
|
||||||
*/
|
*/
|
||||||
// #[Assert\Length(min: 3)]
|
// #[Assert\Length(min: 3)]
|
||||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||||
#[ORM\Column(name: 'name_company', type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)]
|
#[ORM\Column(name: 'name_company', type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)]
|
||||||
private ?string $nameCompany = '';
|
private ?string $nameCompany = '';
|
||||||
|
@ -32,10 +32,10 @@ return static function (ContainerConfigurator $container) {
|
|||||||
->autoconfigure();
|
->autoconfigure();
|
||||||
|
|
||||||
$services
|
$services
|
||||||
->load('Chill\\WopiBundle\\Service\\', __DIR__.'/../../Service');
|
->load('Chill\WopiBundle\Service\\', __DIR__.'/../../Service');
|
||||||
|
|
||||||
$services
|
$services
|
||||||
->load('Chill\\WopiBundle\\Controller\\', __DIR__.'/../../Controller')
|
->load('Chill\WopiBundle\Controller\\', __DIR__.'/../../Controller')
|
||||||
->tag('controller.service_arguments');
|
->tag('controller.service_arguments');
|
||||||
|
|
||||||
$services
|
$services
|
||||||
|
Loading…
x
Reference in New Issue
Block a user