Skip to content

Commit

Permalink
fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
LordSimal committed Jan 10, 2025
1 parent 4826630 commit 325e2b6
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Domain/Entity/Attendee.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ final class Attendee
private array $sentBy = [];

public function __construct(
EmailAddress $emailAddress
EmailAddress $emailAddress,
) {
$this->emailAddress = $emailAddress;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Domain/Entity/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Event
*/
private array $categories = [];

public function __construct(UniqueIdentifier $uniqueIdentifier = null)
public function __construct(?UniqueIdentifier $uniqueIdentifier = null)
{
$this->uniqueIdentifier = $uniqueIdentifier ?? UniqueIdentifier::createRandom();
$this->touchedAt = new Timestamp();
Expand All @@ -71,7 +71,7 @@ public function getTouchedAt(): Timestamp
return $this->touchedAt;
}

public function touch(Timestamp $dateTime = null): self
public function touch(?Timestamp $dateTime = null): self
{
$this->touchedAt = $dateTime ?? new Timestamp();

Expand Down
4 changes: 2 additions & 2 deletions src/Domain/Entity/TimeZone.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function __construct(string $timeZoneId)

public static function createFromPhpDateTimeZone(
PhpDateTimeZone $phpDateTimeZone,
DateTimeInterface $beginDateTime = null,
DateTimeInterface $endDateTime = null
?DateTimeInterface $beginDateTime = null,
?DateTimeInterface $endDateTime = null,
): self {
if ($beginDateTime === null || $endDateTime === null) {
trigger_deprecation('eluceo/ical', '2.1.0', 'Relying on the default values for begin and end date when calling TimeZone::createFromPhpDateTimeZone() is deprecated. Please provide a begin and an end date.');
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/ValueObject/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Attachment
/**
* @param BinaryContent|Uri $content
*/
public function __construct(object $content, string $mimeType = null)
public function __construct(object $content, ?string $mimeType = null)
{
$this->mimeType = $mimeType;

Expand Down
2 changes: 1 addition & 1 deletion src/Domain/ValueObject/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class Location
private ?string $title;
private ?GeographicPosition $geographicPosition = null;

public function __construct(string $location, string $title = null)
public function __construct(string $location, ?string $title = null)
{
$this->location = $location;
$this->title = $title;
Expand Down
6 changes: 3 additions & 3 deletions src/Domain/ValueObject/Organizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ final class Organizer

public function __construct(
EmailAddress $emailAddress,
string $displayName = null,
Uri $directoryEntry = null,
EmailAddress $sentBy = null
?string $displayName = null,
?Uri $directoryEntry = null,
?EmailAddress $sentBy = null,
) {
$this->emailAddress = $emailAddress;
$this->displayName = $displayName;
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/ValueObject/PointInTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class PointInTime
{
private PhpDateTimeImmutable $dateTime;

public function __construct(PhpDateTimeInterface $dateTime = null)
public function __construct(?PhpDateTimeInterface $dateTime = null)
{
if ($dateTime === null) {
$dateTime = new PhpDateTimeImmutable();
Expand Down
2 changes: 1 addition & 1 deletion src/Presentation/Factory/AttendeeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function createProperty(Attendee $attendee): Property
* @SuppressWarnings(PHPMD.NPathComplexity)
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
* @return array<Property\Parameter>
* @return array<Parameter>
*/
private function getParameters(Attendee $attendee): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Presentation/Factory/CalendarFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CalendarFactory
private EventFactory $eventFactory;
private TimeZoneFactory $timeZoneFactory;

public function __construct(EventFactory $eventFactory = null, TimeZoneFactory $timeZoneFactory = null)
public function __construct(?EventFactory $eventFactory = null, ?TimeZoneFactory $timeZoneFactory = null)
{
$this->eventFactory = $eventFactory ?? new EventFactory();
$this->timeZoneFactory = $timeZoneFactory ?? new TimeZoneFactory();
Expand Down
2 changes: 1 addition & 1 deletion src/Presentation/Factory/EventFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class EventFactory
private DateTimeFactory $dateTimeFactory;
private AttendeeFactory $attendeeFactory;

public function __construct(AlarmFactory $alarmFactory = null, DateTimeFactory $dateTimeFactory = null, AttendeeFactory $attendeeFactory = null)
public function __construct(?AlarmFactory $alarmFactory = null, ?DateTimeFactory $dateTimeFactory = null, ?AttendeeFactory $attendeeFactory = null)
{
$this->alarmFactory = $alarmFactory ?? new AlarmFactory();
$this->dateTimeFactory = $dateTimeFactory ?? new DateTimeFactory();
Expand Down

0 comments on commit 325e2b6

Please sign in to comment.