Skip to content

Commit bb5b13b

Browse files
authored
Merge pull request #278 from MyIgel/php-8.1
PHP 8.1 compatibility
2 parents 1f80386 + ddde58d commit bb5b13b

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

src/Comments.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Countable;
88
use IteratorAggregate;
99
use JsonSerializable;
10+
use ReturnTypeWillChange;
1011

1112
/**
1213
* Class to manage the comments of a translation.
@@ -56,11 +57,13 @@ public function delete(string ...$comments): self
5657
return $this;
5758
}
5859

60+
#[ReturnTypeWillChange]
5961
public function jsonSerialize()
6062
{
6163
return $this->toArray();
6264
}
6365

66+
#[ReturnTypeWillChange]
6467
public function getIterator()
6568
{
6669
return new ArrayIterator($this->comments);

src/Flags.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Countable;
88
use IteratorAggregate;
99
use JsonSerializable;
10+
use ReturnTypeWillChange;
1011

1112
/**
1213
* Class to manage the flags of a translation.
@@ -63,11 +64,13 @@ public function has(string $flag): bool
6364
return in_array($flag, $this->flags, true);
6465
}
6566

67+
#[ReturnTypeWillChange]
6668
public function jsonSerialize()
6769
{
6870
return $this->toArray();
6971
}
7072

73+
#[ReturnTypeWillChange]
7174
public function getIterator()
7275
{
7376
return new ArrayIterator($this->flags);

src/Headers.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use InvalidArgumentException;
99
use IteratorAggregate;
1010
use JsonSerializable;
11+
use ReturnTypeWillChange;
1112

1213
/**
1314
* Class to manage the headers of translations.
@@ -63,11 +64,13 @@ public function clear(): self
6364
return $this;
6465
}
6566

67+
#[ReturnTypeWillChange]
6668
public function jsonSerialize()
6769
{
6870
return $this->toArray();
6971
}
7072

73+
#[ReturnTypeWillChange]
7174
public function getIterator()
7275
{
7376
return new ArrayIterator($this->toArray());

src/References.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Countable;
88
use IteratorAggregate;
99
use JsonSerializable;
10+
use ReturnTypeWillChange;
1011

1112
/**
1213
* Class to manage the references of a translation.
@@ -41,11 +42,13 @@ public function add(string $filename, int $line = null): self
4142
return $this;
4243
}
4344

45+
#[ReturnTypeWillChange]
4446
public function jsonSerialize()
4547
{
4648
return $this->toArray();
4749
}
4850

51+
#[ReturnTypeWillChange]
4952
public function getIterator()
5053
{
5154
return new ArrayIterator($this->references);

src/Translations.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Gettext\Languages\Language;
99
use InvalidArgumentException;
1010
use IteratorAggregate;
11+
use ReturnTypeWillChange;
1112

1213
/**
1314
* Class to manage a collection of translations under the same domain.
@@ -81,6 +82,7 @@ function ($translation) {
8182
];
8283
}
8384

85+
#[ReturnTypeWillChange]
8486
public function getIterator()
8587
{
8688
return new ArrayIterator($this->translations);

0 commit comments

Comments
 (0)