Skip to content
Code-Schnipsel Gruppen Projekte
Bestätigt Commit 7596a8f1 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

feat!: return types to the code generator interface

Übergeordneter 989fa438
No related branches found
No related tags found
3 Merge Requests!8fix(CouponCodeInput): mobile buttons adjusted,!7fix(CouponCodeInput): mobile buttons adjusted,!3feat!: quiqqer v2
...@@ -15,5 +15,5 @@ interface CodeGeneratorInterface ...@@ -15,5 +15,5 @@ interface CodeGeneratorInterface
* @param string $prefix (optional) * @param string $prefix (optional)
* @return string * @return string
*/ */
public static function generate($prefix = ''); public static function generate(string $prefix = ''): string;
} }
...@@ -30,7 +30,7 @@ class SimpleString implements CodeGeneratorInterface ...@@ -30,7 +30,7 @@ class SimpleString implements CodeGeneratorInterface
* @return string * @return string
* @throws Exception * @throws Exception
*/ */
public static function generate($prefix = ''): string public static function generate(string $prefix = ''): string
{ {
$characters = array_merge( $characters = array_merge(
range('A', 'Z'), range('A', 'Z'),
......
...@@ -13,7 +13,7 @@ class Uuid implements CodeGeneratorInterface ...@@ -13,7 +13,7 @@ class Uuid implements CodeGeneratorInterface
* @param string $prefix (optional) * @param string $prefix (optional)
* @return string * @return string
*/ */
public static function generate($prefix = ''): string public static function generate(string $prefix = ''): string
{ {
return $prefix . UuidCreator::uuid1()->toString(); return $prefix . UuidCreator::uuid1()->toString();
} }
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren