Skip to content

Commit 4d5b0a9

Browse files
authored
Merge pull request #76 from programmatordev/2.x
v2.4.0
2 parents 3b1efd3 + 595c0f7 commit 4d5b0a9

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

docs/05-entities.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
- `getExtraMinute()`: `?int`
217217
- `isInjured()`: `?bool`
218218
- `isOnBench()`: `?bool`
219+
- `isRescinded()`: `?bool`
219220
- `getFixture()`: [`?Fixture`](#fixture) (`fixture` include is required)
220221
- `getType()`: [`?Type`](#type) (`type` include is required)
221222
- `getSubType()`: [`?Type`](#type) (`subType` include is required)

src/Entity/Event.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ class Event
4242

4343
private ?bool $isOnBench;
4444

45+
private ?bool $isRescinded;
46+
4547
private ?int $coachId;
4648

4749
private ?Fixture $fixture;
@@ -83,6 +85,7 @@ public function __construct(array $data, string $timezone)
8385
$this->extraMinute = $data['extra_minute'] ?? null;
8486
$this->isInjured = $data['injured'] ?? null;
8587
$this->isOnBench = $data['on_bench'] ?? null;
88+
$this->isRescinded = $data['rescinded'] ?? null;
8689
$this->coachId = $data['coach_id'] ?? null;
8790

8891
// include
@@ -191,6 +194,11 @@ public function isOnBench(): ?bool
191194
return $this->isOnBench;
192195
}
193196

197+
public function isRescinded(): ?bool
198+
{
199+
return $this->isRescinded;
200+
}
201+
194202
public function getCoachId(): ?int
195203
{
196204
return $this->coachId;

tests/Unit/EventTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public function testMethods(): void
2929
'extra_minute' => 2,
3030
'injured' => false,
3131
'on_bench' => false,
32+
'rescinded' => false,
3233
'coach_id' => 1
3334
], 'UTC');
3435

@@ -51,6 +52,7 @@ public function testMethods(): void
5152
$this->assertSame(2, $entity->getExtraMinute());
5253
$this->assertSame(false, $entity->isInjured());
5354
$this->assertSame(false, $entity->isOnBench());
55+
$this->assertSame(false, $entity->isRescinded());
5456
$this->assertSame(1, $entity->getCoachId());
5557
}
5658
}

0 commit comments

Comments
 (0)