mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
Refactoring
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -19,7 +19,7 @@ use Meritoo\Common\Type\Base\BaseType;
|
||||
* @copyright Meritoo <http://www.meritoo.pl>
|
||||
*
|
||||
* @internal
|
||||
* @covers \Meritoo\Common\Type\Base\BaseType
|
||||
* @covers \Meritoo\Common\Type\Base\BaseType
|
||||
*/
|
||||
class BaseTypeTest extends BaseTestCase
|
||||
{
|
||||
@@ -67,7 +67,7 @@ class BaseTypeTest extends BaseTestCase
|
||||
*
|
||||
* @return Generator
|
||||
*/
|
||||
public function provideType()
|
||||
public function provideType(): ?Generator
|
||||
{
|
||||
yield[
|
||||
new TestEmptyType(),
|
||||
|
||||
Reference in New Issue
Block a user