apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -16,9 +16,7 @@ use Chill\DocStoreBundle\Entity\StoredObject;
use Chill\DocStoreBundle\Exception\StoredObjectManagerException;
use Chill\DocStoreBundle\Service\StoredObjectManager;
use Chill\DocStoreBundle\Service\StoredObjectManagerInterface;
use Generator;
use PHPUnit\Framework\TestCase;
use stdClass;
use Symfony\Component\HttpClient\Exception\TransportException;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
@@ -32,7 +30,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
*/
final class StoredObjectManagerTest extends TestCase
{
public function getDataProvider(): Generator
public function getDataProvider(): \Generator
{
/* HAPPY SCENARIO */
@@ -92,7 +90,7 @@ final class StoredObjectManagerTest extends TestCase
/**
* @dataProvider getDataProvider
*/
public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, string $exceptionClass = null)
{
if (null !== $exceptionClass) {
$this->expectException($exceptionClass);
@@ -106,7 +104,7 @@ final class StoredObjectManagerTest extends TestCase
/**
* @dataProvider getDataProvider
*/
public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null)
public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, string $exceptionClass = null)
{
if (null !== $exceptionClass) {
$this->expectException($exceptionClass);
@@ -144,7 +142,6 @@ final class StoredObjectManagerTest extends TestCase
case 'https://example.com/error_during_http_request.txt':
throw new TransportException('error_during_http_request.txt');
case 'https://example.com/invalid_statuscode.txt':
return new MockResponse($encodedContent, ['http_code' => 404]);
}
@@ -166,7 +163,7 @@ final class StoredObjectManagerTest extends TestCase
private function getTempUrlGenerator(StoredObject $storedObject): TempUrlGeneratorInterface
{
$response = new stdClass();
$response = new \stdClass();
$response->url = $storedObject->getFilename();
$tempUrlGenerator = $this->createMock(TempUrlGeneratorInterface::class);