Skip to content

Commit

Permalink
Explicit declaration of properties in class that were created dynamic…
Browse files Browse the repository at this point in the history
…ally. (#1607)

From PHP 8.2 it is deprecated to dynamically declare properties for objects, so declare them in class definition.
  • Loading branch information
nelarsen authored Jul 2, 2024
1 parent b516275 commit dc1514d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/php/Repository/TimeframeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class TimeframeTest extends CustomPostTypeTest {
protected int $timeframeDailyRepetition;
protected int $timeframeWeeklyRepetition;
protected int $timeframeManualRepetition;
protected int $otherItemId;
protected int $otherLocationId;
protected int $otherTimeframeId;

/**
* The tests are designed in a way, that all timeframes should lie in the CURRENT_DATE plus 10 days.
Expand Down Expand Up @@ -482,7 +485,7 @@ public function testGetPostIdsByType_oneLocationMultiItem() {
*/
public function testGetPostIdsByType_multiLocationMultiItem() {
// Timeframe with enddate and one item
$this->timeframeId = $this->createTimeframe(
$timeframeId = $this->createTimeframe(
$this->locationId,
$this->itemId,
$this->repetition_start,
Expand Down
2 changes: 2 additions & 0 deletions tests/php/Service/BookingRuleAppliedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class BookingRuleAppliedTest extends CustomPostTypeTest {
private Booking $testBookingTomorrow;
private int $testBookingId;
protected BookingRuleApplied $appliedAlwaysAllow,$appliedAlwaysDeny;
protected BookingRule $alwaysallow;
protected BookingRule $alwaysdeny;

protected function setUpTestBooking(): void {
$this->testBookingId = $this->createBooking(
Expand Down

0 comments on commit dc1514d

Please sign in to comment.