Fulfill phpstan requirements

Ensure proper annotation and usage of assertNull.
This commit is contained in:
Daniel Siepmann 2021-04-13 15:24:33 +02:00
parent 5e5c019704
commit c73bf1c53a
7 changed files with 8 additions and 9 deletions

View file

@ -51,7 +51,7 @@ class Offer
}
/**
* @return $this
* @return Offer
*/
public static function createFromArray(array $rawData)
{

View file

@ -65,7 +65,7 @@ class OpeningHour
}
/**
* @return $this
* @return OpeningHour
*/
public static function createFromArray(array $rawData)
{

View file

@ -65,7 +65,7 @@ class Price
}
/**
* @return $this
* @return Price
*/
public static function createFromArray(array $rawData)
{

View file

@ -103,6 +103,6 @@ class RegistryTest extends TestCase
$result = $subject->getConverterBasedOnType(['thuecat:Entity']);
self::assertSame(null, $result);
self::assertNull($result);
}
}

View file

@ -304,7 +304,7 @@ class OpeningHoursTest extends TestCase
self::assertSame('', $result[0]['opens']);
self::assertSame('', $result[0]['closes']);
self::assertSame([], $result[0]['daysOfWeek']);
self::assertSame(null, $result[0]['from']);
self::assertSame(null, $result[0]['through']);
self::assertNull($result[0]['from']);
self::assertNull($result[0]['through']);
}
}

View file

@ -87,8 +87,7 @@ class EntityCollectionTest extends TestCase
$subject = new EntityCollection();
$subject->add($entityWithTranslation->reveal());
self::assertSame(
null,
self::assertNull(
$subject->getDefaultLanguageEntity()
);
}

View file

@ -68,7 +68,7 @@ class RegistryTest extends TestCase
$subject = new Registry();
$result = $subject->getProviderForConfiguration($configuration->reveal());
self::assertSame(null, $result);
self::assertNull($result);
}
/**