Refactoring

This commit is contained in:
Meritoo
2019-05-05 23:06:18 +02:00
parent a6b2704c66
commit 98d0fed61d
4 changed files with 38 additions and 132 deletions

View File

@@ -71,7 +71,7 @@ class UnknownTestTypeException extends UnknownTypeException
* @param string $unknownType The unknown type of something (for testing purposes)
* @return UnknownTestTypeException
*/
public static function createException($unknownType)
public static function createException(string $unknownType): UnknownTestTypeException
{
return parent::create($unknownType, new TestType(), 'type of something used for testing');
}
@@ -92,7 +92,7 @@ class TestService
* @throws UnknownTestTypeException
* @return string
*/
public function getTranslatedType($type)
public function getTranslatedType(string $type): string
{
if (TestType::isCorrectType($type)) {
return ucfirst(str_replace('_', ' ', $type));