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));

View File

@@ -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(),