Skip to content

Commit b18d287

Browse files
committed
Add readonly where applicable
1 parent b1d1a4c commit b18d287

167 files changed

Lines changed: 167 additions & 167 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Calculation/Duration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Carbon\CarbonImmutable;
66

7-
class Duration
7+
readonly class Duration
88
{
99
public const EMPTY = [
1010
'day' => 0,

src/Calculation/MergingCalculation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Chrono\ParsedComponents;
88
use Chrono\ParsedResult;
99

10-
class MergingCalculation
10+
readonly class MergingCalculation
1111
{
1212
/**
1313
* Merge date and time parsing results using upstream Chrono's merge semantics.

src/Calculation/Weekdays.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Chrono\Reference;
88
use Chrono\Weekday;
99

10-
class Weekdays
10+
readonly class Weekdays
1111
{
1212
/**
1313
* Create parsing components at the requested weekday.

src/Calculation/Years.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Carbon\CarbonImmutable;
66

7-
class Years
7+
readonly class Years
88
{
99
/**
1010
* Find the most likely AD year from a raw number.

src/CasualReferences.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Chrono;
44

5-
class CasualReferences
5+
readonly class CasualReferences
66
{
77
/**
88
* Create components for the current reference moment.

src/Chrono.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Chrono\Locales\Zh\ZhHansChrono;
2222
use Chrono\Locales\Zh\ZhHantChrono;
2323

24-
class Chrono
24+
readonly class Chrono
2525
{
2626
/**
2727
* Create a Chrono facade around the given parsing engine.

src/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Chrono;
44

5-
class Configuration
5+
readonly class Configuration
66
{
77
/**
88
* Create a parser/refiner configuration.

src/ConfiguredChronoEngine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Chrono;
44

5-
class ConfiguredChronoEngine implements ChronoEngine
5+
readonly class ConfiguredChronoEngine implements ChronoEngine
66
{
77
/**
88
* Create a Chrono engine from the given configuration.

src/Dates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Carbon\CarbonImmutable;
66

7-
class Dates
7+
readonly class Dates
88
{
99
/**
1010
* Assign date components from a matching Carbon date.

src/Locales/De/DeChrono.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
use Chrono\Refiners\OverlapRemovalRefiner;
2727
use Chrono\Refiners\UnlikelyFormatFilter;
2828

29-
class DeChrono extends ConfiguredChronoEngine
29+
readonly class DeChrono extends ConfiguredChronoEngine
3030
{
3131
/**
3232
* Create a configured German Chrono engine.

0 commit comments

Comments
 (0)