Skip to content

Commit

Permalink
Readonly properties
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyTapok-bit committed Nov 12, 2023
1 parent ecd4d26 commit dd779f3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.0, 8.1, 8.2]
php: [8.1, 8.2]

steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"analyze": "phpstan analyze --ansi"
},
"require": {
"php": "^8.0",
"php": "^8.1",
"nesbot/carbon": "^2.67"
},
"config": {
Expand Down
4 changes: 2 additions & 2 deletions src/Bot.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
class Bot
{
public function __construct(
private string $token,
private bool $throw = false
private readonly string $token,
private readonly bool $throw = false
)
{
}
Expand Down
4 changes: 2 additions & 2 deletions src/BotConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
class BotConfig
{
public function __construct(
public string $name,
public string $token
public readonly string $name,
public readonly string $token
)
{
}
Expand Down
4 changes: 2 additions & 2 deletions src/TgWebValid.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ final class TgWebValid
private array $bots = [];

public function __construct(
private string $token,
private bool $throw = false
private readonly string $token,
private readonly bool $throw = false
)
{
}
Expand Down
4 changes: 2 additions & 2 deletions src/Validator/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
abstract class Validator
{
public function __construct(
protected string $token,
protected bool $throw = false
protected readonly string $token,
protected readonly bool $throw = false
)
{
}
Expand Down

0 comments on commit dd779f3

Please sign in to comment.