diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 15421cde9..ab7c97139 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,5 +1,5 @@ parameters: - level: 2 + level: 3 paths: - src/ - utils/ diff --git a/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php b/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php index d9f2e7978..286d334ad 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php +++ b/src/Bundle/ChillJobBundle/src/Entity/CSPerson.php @@ -657,7 +657,7 @@ class CSPerson /** * Get dateFinDernierEmploi. * - * @return \DateTime + * @return \DateTimeInterface */ public function getDateFinDernierEmploi() { diff --git a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php index e952882e7..e39c053d1 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/Immersion.php +++ b/src/Bundle/ChillJobBundle/src/Entity/Immersion.php @@ -661,7 +661,7 @@ class Immersion implements \Stringable /** * Get debutDate. * - * @return \DateTime|null + * @return \DateTimeInterface */ public function getDebutDate() { diff --git a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php index e912a5daf..ecf172d95 100644 --- a/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php +++ b/src/Bundle/ChillJobBundle/src/Entity/ProjetProfessionnel.php @@ -146,7 +146,7 @@ class ProjetProfessionnel implements \Stringable /** * Get reportDate. * - * @return \DateTime + * @return \DateTimeInterface */ public function getReportDate() { diff --git a/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php b/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php index e8de7702c..74486efdc 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListCSPerson.php @@ -341,7 +341,6 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal * @param \Doctrine\ORM\NativeQuery|\Doctrine\ORM\QueryBuilder $qb * @param mixed[] $data * - * @return mixed|mixed[] */ public function getResult($qb, $data) { @@ -383,7 +382,6 @@ class ListCSPerson extends ListPerson implements ListInterface, ExportElementVal * @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR') * @param mixed $data The data from the export's form (as defined in `buildForm` * - * @return \Closure where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }` */ public function getLabels($key, array $values, $data) { diff --git a/src/Bundle/ChillJobBundle/src/Export/ListCV.php b/src/Bundle/ChillJobBundle/src/Export/ListCV.php index a0afd0aa8..90a0312e4 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListCV.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListCV.php @@ -239,7 +239,6 @@ class ListCV implements ListInterface, ExportElementValidatedInterface * @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb * @param mixed[] $data the data from the export's form (added by self::buildForm) * - * @return mixed[] an array of results */ public function getResult($qb, $data) { @@ -314,7 +313,6 @@ class ListCV implements ListInterface, ExportElementValidatedInterface * @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR') * @param mixed $data The data from the export's form (as defined in `buildForm` * - * @return \Closure where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }` */ public function getLabels($key, array $values, $data) { diff --git a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php index cb72ce6d7..0d5ecb3da 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php @@ -333,7 +333,6 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface * @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb * @param mixed[] $data the data from the export's form (added by self::buildForm) * - * @return mixed[]|\Closure an array of results */ public function getResult($qb, $data) { @@ -410,7 +409,6 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface * @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR') * @param mixed $data The data from the export's form (as defined in `buildForm` * - * @return \Closure where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }` */ public function getLabels($key, array $values, $data) { diff --git a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php index 2b72aaec3..0704a8686 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php @@ -371,7 +371,6 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn * @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb * @param mixed[] $data the data from the export's form (added by self::buildForm) * - * @return mixed[] an array of results */ public function getResult($qb, $data) { @@ -448,7 +447,6 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn * @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR') * @param mixed $data The data from the export's form (as defined in `buildForm` * - * @return \Closure where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }` */ public function getLabels($key, array $values, $data) { diff --git a/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsVoter.php b/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsVoter.php index 3066eda97..39a1eb348 100644 --- a/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsVoter.php +++ b/src/Bundle/ChillJobBundle/src/Security/Authorization/ExportsVoter.php @@ -87,7 +87,6 @@ class ExportsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInt * [ 'Title' => [ 'CHILL_FOO_SEE', 'CHILL_FOO_UPDATE' ] ] * ``` * - * @return array where keys are the hierarchy, and values an array of roles: `[ 'title' => [ 'CHILL_FOO_SEE', 'CHILL_FOO_UPDATE' ] ]` */ public function getRolesWithHierarchy(): array {