-
Notifications
You must be signed in to change notification settings - Fork 460
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
3640fcd
commit 2cd7001
Showing
3 changed files
with
153 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
|
||
namespace OverridingVariadics; | ||
|
||
interface ITranslator | ||
{ | ||
|
||
/** | ||
* Translates the given string. | ||
* @param mixed $message | ||
* @param string ...$parameters | ||
*/ | ||
function translate($message, string ...$parameters): string; | ||
|
||
} | ||
|
||
class Translator implements ITranslator | ||
{ | ||
|
||
/** | ||
* @param string $message | ||
* @param string ...$parameters | ||
*/ | ||
public function translate($message, $lang = 'cs', string ...$parameters): string | ||
{ | ||
|
||
} | ||
|
||
} | ||
|
||
class OtherTranslator implements ITranslator | ||
{ | ||
|
||
public function translate($message, $lang, string ...$parameters): string | ||
{ | ||
|
||
} | ||
|
||
} | ||
|
||
class AnotherTranslator implements ITranslator | ||
{ | ||
|
||
public function translate($message, $lang = 'cs', string $parameters): string | ||
{ | ||
|
||
} | ||
|
||
} | ||
|
||
class YetAnotherTranslator implements ITranslator | ||
{ | ||
|
||
public function translate($message, $lang = 'cs'): string | ||
{ | ||
|
||
} | ||
|
||
} | ||
|
||
class ReflectionClass extends \ReflectionClass | ||
{ | ||
|
||
public function newInstance($arg = null, ...$args) | ||
{ | ||
|
||
} | ||
|
||
} |