-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba016f9
commit fda4b0a
Showing
33 changed files
with
1,877 additions
and
2,158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Answear\GlsBundle\Enum; | ||
|
||
enum CountryCodeEnum: string | ||
{ | ||
case Hungary = 'HU'; | ||
case Slovakia = 'SK'; | ||
case Czech = 'CZ'; | ||
case Romania = 'RO'; | ||
case Slovenia = 'SI'; | ||
case Croatia = 'HR'; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Answear\GlsBundle\Enum; | ||
|
||
enum DayTypeEnum: string | ||
{ | ||
case Monday = 'monday'; | ||
case Tuesday = 'tuesday'; | ||
case Wednesday = 'wednesday'; | ||
case Thursday = 'thursday'; | ||
case Friday = 'friday'; | ||
case Saturday = 'saturday'; | ||
case Sunday = 'sunday'; | ||
|
||
public static function getDayByNumber(int $dayNumber): self | ||
{ | ||
return match ($dayNumber) { | ||
1 => self::Monday, | ||
2 => self::Tuesday, | ||
3 => self::Wednesday, | ||
4 => self::Thursday, | ||
5 => self::Friday, | ||
6 => self::Saturday, | ||
7 => self::Sunday, | ||
default => throw new \InvalidArgumentException("Invalid day number: $dayNumber"), | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Answear\GlsBundle\Enum; | ||
|
||
enum FeatureEnum: string implements \JsonSerializable | ||
{ | ||
case AcceptsCash = 'acceptsCash'; | ||
case AcceptsCard = 'acceptsCard'; | ||
case Pickup = 'pickup'; | ||
case Delivery = 'delivery'; | ||
|
||
public static function isAcceptsCard(string $value): bool | ||
{ | ||
return $value === self::AcceptsCard->value; | ||
} | ||
|
||
public function jsonSerialize(): array | ||
{ | ||
return [ | ||
'value' => $this->value, | ||
]; | ||
} | ||
} |
Oops, something went wrong.