Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 3 additions & 195 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2920,23 +2920,17 @@
$ignoreErrors[] = [
'message' => '#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#',
'identifier' => 'foreach.nonIterable',
'count' => 4,
'count' => 3,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
'message' => '#^Binary operation "\\." between \'Participation à l…\' and mixed results in an error\\.$#',
'identifier' => 'binaryOp.invalid',
'count' => 2,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
'message' => '#^Binary operation "\\." between \'Speaker de l\\\\\'année \' and mixed results in an error\\.$#',
'identifier' => 'binaryOp.invalid',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
'message' => '#^Binary operation "\\." between \'ag\\-\' and mixed results in an error\\.$#',
'message' => '#^Binary operation "\\." between \'Speaker de l\\\\\'année \' and mixed results in an error\\.$#',
'identifier' => 'binaryOp.invalid',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
Expand Down Expand Up @@ -2980,7 +2974,7 @@
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on mixed\\.$#',
'identifier' => 'method.nonObject',
'count' => 7,
'count' => 3,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
Expand All @@ -2989,12 +2983,6 @@
'count' => 2,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method getDate\\(\\) on mixed\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method getDateStart\\(\\) on mixed\\.$#',
'identifier' => 'method.nonObject',
Expand Down Expand Up @@ -3031,12 +3019,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method isPresent\\(\\) on mixed\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Association/UserMembership/BadgesComputer.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot cast mixed to string\\.$#',
'identifier' => 'cast.string',
Expand Down Expand Up @@ -4951,24 +4933,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/CompanyListAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot access offset \'description\' on mixed\\.$#',
'identifier' => 'offsetAccess.nonOffsetAccessible',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeeting/EditAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$date of method AppBundle\\\\GeneralMeeting\\\\GeneralMeetingRepository\\:\\:save\\(\\) expects DateTimeInterface, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeeting/EditAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#2 \\$description of method AppBundle\\\\GeneralMeeting\\\\GeneralMeetingRepository\\:\\:save\\(\\) expects string, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeeting/EditAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#2 \\$datetime of static method DateTimeImmutable\\:\\:createFromFormat\\(\\) expects string, mixed given\\.$#',
'identifier' => 'argument.type',
Expand All @@ -4987,18 +4951,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeeting/ListingAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot access offset \'date\' on mixed\\.$#',
'identifier' => 'offsetAccess.nonOffsetAccessible',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeeting/PrepareAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot access offset \'description\' on mixed\\.$#',
'identifier' => 'offsetAccess.nonOffsetAccessible',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeeting/PrepareAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$date of method AppBundle\\\\GeneralMeeting\\\\GeneralMeetingRepository\\:\\:prepare\\(\\) expects DateTimeInterface, mixed given\\.$#',
'identifier' => 'argument.type',
Expand Down Expand Up @@ -5071,108 +5023,12 @@
'count' => 2,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeeting/ReportsAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on DateTimeImmutable\\|false\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/AddAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on DateTimeInterface\\|null\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/AddAction.php',
];
$ignoreErrors[] = [
'message' => '#^Method AppBundle\\\\Controller\\\\Admin\\\\Members\\\\GeneralMeetingQuestion\\\\AddAction\\:\\:__invoke\\(\\) has parameter \\$date with no type specified\\.$#',
'identifier' => 'missingType.parameter',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/AddAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$date of method AppBundle\\\\Association\\\\Model\\\\GeneralMeetingQuestion\\:\\:setDate\\(\\) expects DateTimeInterface, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/AddAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$date of method AppBundle\\\\GeneralMeeting\\\\GeneralMeetingRepository\\:\\:findOneByDate\\(\\) expects DateTimeInterface, DateTimeImmutable\\|false given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/AddAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#2 \\$datetime of static method DateTimeImmutable\\:\\:createFromFormat\\(\\) expects string, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/AddAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on DateTimeInterface\\|null\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/DeleteAction.php',
];
$ignoreErrors[] = [
'message' => '#^Method AppBundle\\\\Controller\\\\Admin\\\\Members\\\\GeneralMeetingQuestion\\\\DeleteAction\\:\\:__invoke\\(\\) has parameter \\$id with no type specified\\.$#',
'identifier' => 'missingType.parameter',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/DeleteAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/DeleteAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on DateTimeInterface\\|null\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/EditAction.php',
];
$ignoreErrors[] = [
'message' => '#^Method AppBundle\\\\Controller\\\\Admin\\\\Members\\\\GeneralMeetingQuestion\\\\EditAction\\:\\:__invoke\\(\\) has no return type specified\\.$#',
'identifier' => 'missingType.return',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/EditAction.php',
];
$ignoreErrors[] = [
'message' => '#^Method AppBundle\\\\Controller\\\\Admin\\\\Members\\\\GeneralMeetingQuestion\\\\EditAction\\:\\:__invoke\\(\\) has parameter \\$id with no type specified\\.$#',
'identifier' => 'missingType.parameter',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/EditAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingQuestion/EditAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on DateTimeInterface\\|null\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingVote/CloseAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$generalMeetingDate of method AppBundle\\\\Association\\\\Model\\\\Repository\\\\GeneralMeetingQuestionRepository\\:\\:loadByDate\\(\\) expects DateTimeInterface, DateTimeImmutable\\|null given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingVote/ListAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#2 \\$datetime of static method DateTimeImmutable\\:\\:createFromFormat\\(\\) expects string, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingVote/ListAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method format\\(\\) on DateTimeInterface\\|null\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Admin/Members/GeneralMeetingVote/OpenAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$entity of method CCMBenchmark\\\\Ting\\\\Repository\\\\Repository\\<AppBundle\\\\Event\\\\Model\\\\UserBadge\\>\\:\\:delete\\(\\) expects AppBundle\\\\Event\\\\Model\\\\UserBadge, AppBundle\\\\Event\\\\Model\\\\UserBadge\\|null given\\.$#',
'identifier' => 'argument.type',
Expand Down Expand Up @@ -6493,12 +6349,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Website/Member/CompanyPublicProfileAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$value of function count expects array\\|Countable, iterable\\<AppBundle\\\\Association\\\\Model\\\\GeneralMeetingQuestion\\> given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Website/Member/IndexAction.php',
];
$ignoreErrors[] = [
'message' => '#^Binary operation "\\+" between int\\<0, max\\> and mixed results in an error\\.$#',
'identifier' => 'binaryOp.invalid',
Expand Down Expand Up @@ -6655,12 +6505,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Website/Membership/GeneralMeeting/IndexAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method getId\\(\\) on mixed\\.$#',
'identifier' => 'method.nonObject',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Website/Membership/GeneralMeeting/IndexAction.php',
];
$ignoreErrors[] = [
'message' => '#^Cannot call method getTimestamp\\(\\) on DateTime\\|null\\.$#',
'identifier' => 'method.nonObject',
Expand All @@ -6685,18 +6529,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Website/Membership/GeneralMeeting/IndexAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$date of method AppBundle\\\\GeneralMeeting\\\\GeneralMeetingRepository\\:\\:getAttendees\\(\\) expects DateTimeInterface, DateTimeInterface\\|null given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Website/Membership/GeneralMeeting/VoteAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$userId of method AppBundle\\\\Association\\\\Model\\\\GeneralMeetingVote\\:\\:setUserId\\(\\) expects int, int\\|null given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/Controller/Website/Membership/GeneralMeeting/VoteAction.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#1 \\$content of class Symfony\\\\Component\\\\HttpFoundation\\\\Response constructor expects string\\|null, string\\|false given\\.$#',
'identifier' => 'argument.type',
Expand Down Expand Up @@ -9697,12 +9529,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/GeneralMeeting.php',
];
$ignoreErrors[] = [
'message' => '#^Class AppBundle\\\\GeneralMeeting\\\\GeneralMeetingQuestionFormType extends generic class Symfony\\\\Component\\\\Form\\\\AbstractType but does not specify its types\\: TData$#',
'identifier' => 'missingType.generics',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/GeneralMeetingQuestionFormType.php',
];
$ignoreErrors[] = [
'message' => '#^Binary operation "\\." between \'@\' and mixed results in an error\\.$#',
'identifier' => 'binaryOp.invalid',
Expand Down Expand Up @@ -9733,12 +9559,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php',
];
$ignoreErrors[] = [
'message' => '#^Method AppBundle\\\\GeneralMeeting\\\\GeneralMeetingRepository\\:\\:getAttendees\\(\\) has parameter \\$direction with no type specified\\.$#',
'identifier' => 'missingType.parameter',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php',
];
$ignoreErrors[] = [
'message' => '#^Method AppBundle\\\\GeneralMeeting\\\\GeneralMeetingRepository\\:\\:getPowerSelectionList\\(\\) should return array\\<int, string\\> but returns array\\<string\\>\\.$#',
'identifier' => 'return.type',
Expand Down Expand Up @@ -9775,12 +9595,6 @@
'count' => 2,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#2 \\$order of method Doctrine\\\\DBAL\\\\Query\\\\QueryBuilder\\:\\:orderBy\\(\\) expects string\\|null, mixed given\\.$#',
'identifier' => 'argument.type',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php',
];
$ignoreErrors[] = [
'message' => '#^Parameter \\#3 \\$login of class AppBundle\\\\GeneralMeeting\\\\Attendee constructor expects string, mixed given\\.$#',
'identifier' => 'argument.type',
Expand Down Expand Up @@ -9811,12 +9625,6 @@
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/GeneralMeetingRepository.php',
];
$ignoreErrors[] = [
'message' => '#^Class AppBundle\\\\GeneralMeeting\\\\PrepareFormType extends generic class Symfony\\\\Component\\\\Form\\\\AbstractType but does not specify its types\\: TData$#',
'identifier' => 'missingType.generics',
'count' => 1,
'path' => __DIR__ . '/sources/AppBundle/GeneralMeeting/PrepareFormType.php',
];
$ignoreErrors[] = [
'message' => '#^Method AppBundle\\\\Github\\\\Exception\\\\UnableToFindGithubUserException\\:\\:__construct\\(\\) has parameter \\$username with no type specified\\.$#',
'identifier' => 'missingType.parameter',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@

namespace AppBundle\AssembleeGenerale\Entity;

use AppBundle\Doctrine\Type\UnixTimestampType;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity]
#[ORM\Table(name: 'afup_assemblee_generale')]
class AssembleeGenerale
{
/**
* Identifiant = timestamp Unix (colonne `date`, int unsigned, clé de fait de la table).
*
* On le mappe en `int` et non en `\DateTime` (via UnixTimestampType) car Doctrine
* ne sait pas hasher un objet `DateTime` dans son identity map :
* UnitOfWork::getIdHashByIdentifier() fait un implode() qui exige une valeur scalaire.
* Un identifiant `\DateTime` provoque donc « Object of class DateTime could not be
* converted to string » à chaque flush où l'entité est managée.
*/
#[ORM\Id]
#[ORM\Column(type: UnixTimestampType::NAME)]
public \DateTime $date;
#[ORM\Column]
public int $date;

#[ORM\Column(type: 'text', nullable: true)]
public ?string $description = null;
Expand Down
Loading
Loading