Skip to content

Commit

Permalink
fix: test variables before returning
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
  • Loading branch information
SebastianKrupinski committed Aug 13, 2024
1 parent c525ea0 commit f807d68
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/dav/lib/CalDAV/EventReaderRRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,31 @@ public function concludesOn(): DateTime | null {
}

public function daysOfWeek(): array {
return $this->byDay;
return is_array($this->byDay) ? $this->byDay : [];

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType Note

Docblock-defined type array<array-key, mixed> for $this->byDay is always array<array-key, mixed>

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

Docblock-defined type array<array-key, mixed> for $this->byDay is always array<array-key, mixed>
}

public function daysOfMonth(): array {
return $this->byMonthDay;
return is_array($this->byMonthDay) ? $this->byMonthDay : [];

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType Note

Docblock-defined type array<array-key, mixed> for $this->byMonthDay is always array<array-key, mixed>

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

Docblock-defined type array<array-key, mixed> for $this->byMonthDay is always array<array-key, mixed>
}

public function daysOfYear(): array {
return $this->byYearDay;
return is_array($this->byYearDay) ? $this->byYearDay : [];

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType Note

Docblock-defined type array<array-key, mixed> for $this->byYearDay is always array<array-key, mixed>

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

Docblock-defined type array<array-key, mixed> for $this->byYearDay is always array<array-key, mixed>
}

public function weeksOfYear(): array {
return $this->byWeekNo;
return is_array($this->byWeekNo) ? $this->byWeekNo : [];

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType Note

Docblock-defined type array<array-key, mixed> for $this->byWeekNo is always array<array-key, mixed>

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

Docblock-defined type array<array-key, mixed> for $this->byWeekNo is always array<array-key, mixed>
}

public function monthsOfYear(): array {
return $this->byMonth;
return is_array($this->byMonth) ? $this->byMonth : [];

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType Note

Docblock-defined type array<array-key, mixed> for $this->byMonth is always array<array-key, mixed>

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

Docblock-defined type array<array-key, mixed> for $this->byMonth is always array<array-key, mixed>
}

public function isRelative(): bool {
return isset($this->bySetPos);
}

public function relativePosition(): array {
return $this->bySetPos;
return is_array($this->bySetPos) ? $this->bySetPos : [];

Check notice

Code scanning / Psalm

RedundantConditionGivenDocblockType Note

Docblock-defined type array<array-key, mixed> for $this->bySetPos is always array<array-key, mixed>

Check notice

Code scanning / Psalm

DocblockTypeContradiction Note

Docblock-defined type array<array-key, mixed> for $this->bySetPos is always array<array-key, mixed>
}

}

0 comments on commit f807d68

Please sign in to comment.