Skip to content

Commit

Permalink
Typed constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyunk3l committed Mar 10, 2024
1 parent ef3542d commit c50dc17
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Behavioral/Command/SwitchButtonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class SwitchButtonCommand implements CommandInterface
{
private const COMMAND_MESSAGE = "Tv has been switched on.";
private const string COMMAND_MESSAGE = "Tv has been switched on.";

public function __construct(private ReceiverInterface|false $control)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Structural/Facade/CoffeeMakerFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class CoffeeMakerFacade
{
private const MINIMUM_CUPS = 1;
private const int MINIMUM_CUPS = 1;

private Dispenser $coffeeDispenser;

Expand Down
2 changes: 1 addition & 1 deletion test/Behavioral/Command/SwitchButtonCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class SwitchButtonCommandTest extends TestCase
{
private const COMMAND_MESSAGE = "Tv has been switched on.";
private const string COMMAND_MESSAGE = "Tv has been switched on.";

public function testShouldExecuteSwitchButtonCommand()
{
Expand Down
6 changes: 3 additions & 3 deletions test/Creational/AbstractFactory/BmwCarFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

class BmwCarFactoryTest extends TestCase
{
private const GENERIC_CAR_NAME = "i7";
private const string GENERIC_CAR_NAME = "i7";

private const GENERIC_CAR_COLOR = "red";
private const string GENERIC_CAR_COLOR = "red";

private const GENERIC_CAR_ENGINE_SPECS = "3.0 TDI";
private const string GENERIC_CAR_ENGINE_SPECS = "3.0 TDI";

private BmwCarFactory $bmwCarFactory;

Expand Down
6 changes: 3 additions & 3 deletions test/Creational/AbstractFactory/MercedesCarFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

class MercedesCarFactoryTest extends TestCase
{
private const GENERIC_CAR_NAME = "A1 AMG";
private const string GENERIC_CAR_NAME = "A1 AMG";

private const GENERIC_CAR_COLOR = "grey space";
private const string GENERIC_CAR_COLOR = "grey space";

private const GENERIC_CAR_ENGINE_SPECS = "3.0 300cv";
private const string GENERIC_CAR_ENGINE_SPECS = "3.0 300cv";

private MercedesCarFactory $mercedesCarFactory;

Expand Down

0 comments on commit c50dc17

Please sign in to comment.