CS fixes
This commit is contained in:
parent
ffb4795104
commit
31e1a978f5
|
@ -11,6 +11,7 @@ return (new PhpCsFixer\Config())
|
||||||
'@Symfony' => true,
|
'@Symfony' => true,
|
||||||
'@Symfony:risky' => true,
|
'@Symfony:risky' => true,
|
||||||
'protected_to_private' => false,
|
'protected_to_private' => false,
|
||||||
|
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => false],
|
||||||
])
|
])
|
||||||
->setRiskyAllowed(true)
|
->setRiskyAllowed(true)
|
||||||
->setFinder(
|
->setFinder(
|
||||||
|
|
|
@ -19,9 +19,6 @@ class ManagerRegistryTest extends TestCase
|
||||||
{
|
{
|
||||||
public static function setUpBeforeClass(): void
|
public static function setUpBeforeClass(): void
|
||||||
{
|
{
|
||||||
if (!class_exists(\PHPUnit_Framework_TestCase::class)) {
|
|
||||||
self::markTestSkipped('proxy-manager-bridge is not yet compatible with namespaced phpunit versions.');
|
|
||||||
}
|
|
||||||
$test = new PhpDumperTest();
|
$test = new PhpDumperTest();
|
||||||
$test->testDumpContainerWithProxyServiceWillShareProxies();
|
$test->testDumpContainerWithProxyServiceWillShareProxies();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
|
||||||
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle;
|
|
||||||
|
|
||||||
return [
|
return [
|
||||||
new FrameworkBundle(),
|
new FrameworkBundle(),
|
||||||
|
|
|
@ -49,7 +49,7 @@ class ArrayAdapterTest extends AdapterTestCase
|
||||||
|
|
||||||
// Fail (should be missing from $values)
|
// Fail (should be missing from $values)
|
||||||
$item = $cache->getItem('buz');
|
$item = $cache->getItem('buz');
|
||||||
$cache->save($item->set(function() {}));
|
$cache->save($item->set(function () {}));
|
||||||
|
|
||||||
$values = $cache->getValues();
|
$values = $cache->getValues();
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ class ExprBuilderTest extends TestCase
|
||||||
*
|
*
|
||||||
* @return array The finalized config values
|
* @return array The finalized config values
|
||||||
*/
|
*/
|
||||||
protected function finalizeTestBuilder(NodeDefinition $nodeDefinition, ?array $config = null): array
|
protected function finalizeTestBuilder(NodeDefinition $nodeDefinition, array $config = null): array
|
||||||
{
|
{
|
||||||
return $nodeDefinition
|
return $nodeDefinition
|
||||||
->end()
|
->end()
|
||||||
|
|
|
@ -64,7 +64,7 @@ class ReflectionClassResourceTest extends TestCase
|
||||||
/**
|
/**
|
||||||
* @dataProvider provideHashedSignature
|
* @dataProvider provideHashedSignature
|
||||||
*/
|
*/
|
||||||
public function testHashedSignature(bool $changeExpected, int $changedLine, ?string $changedCode, ?\Closure $setContext = null)
|
public function testHashedSignature(bool $changeExpected, int $changedLine, ?string $changedCode, \Closure $setContext = null)
|
||||||
{
|
{
|
||||||
if ($setContext) {
|
if ($setContext) {
|
||||||
$setContext();
|
$setContext();
|
||||||
|
|
|
@ -40,7 +40,7 @@ class MemcachedSessionHandlerTest extends TestCase
|
||||||
|
|
||||||
$r = new \ReflectionClass(\Memcached::class);
|
$r = new \ReflectionClass(\Memcached::class);
|
||||||
$methodsToMock = array_map(function ($m) { return $m->name; }, $r->getMethods(\ReflectionMethod::IS_PUBLIC));
|
$methodsToMock = array_map(function ($m) { return $m->name; }, $r->getMethods(\ReflectionMethod::IS_PUBLIC));
|
||||||
$methodsToMock = array_diff($methodsToMock, ['getDelayed','getDelayedByKey']);
|
$methodsToMock = array_diff($methodsToMock, ['getDelayed', 'getDelayedByKey']);
|
||||||
|
|
||||||
$this->memcached = $this->getMockBuilder(\Memcached::class)
|
$this->memcached = $this->getMockBuilder(\Memcached::class)
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
|
|
|
@ -25,7 +25,7 @@ final class Dsn
|
||||||
private $port;
|
private $port;
|
||||||
private $options;
|
private $options;
|
||||||
|
|
||||||
public function __construct(string $scheme, string $host, ?string $user = null, ?string $password = null, ?int $port = null, array $options = [])
|
public function __construct(string $scheme, string $host, string $user = null, string $password = null, int $port = null, array $options = [])
|
||||||
{
|
{
|
||||||
$this->scheme = $scheme;
|
$this->scheme = $scheme;
|
||||||
$this->host = $host;
|
$this->host = $host;
|
||||||
|
|
|
@ -24,10 +24,10 @@ class ParseException extends RuntimeException
|
||||||
private $rawMessage;
|
private $rawMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $message The error message
|
* @param string $message The error message
|
||||||
* @param int $parsedLine The line where the error occurred
|
* @param int $parsedLine The line where the error occurred
|
||||||
* @param string|null $snippet The snippet of code near the problem
|
* @param string|null $snippet The snippet of code near the problem
|
||||||
* @param string|null $parsedFile The file name where the error occurred
|
* @param string|null $parsedFile The file name where the error occurred
|
||||||
*/
|
*/
|
||||||
public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null)
|
public function __construct(string $message, int $parsedLine = -1, string $snippet = null, string $parsedFile = null, \Throwable $previous = null)
|
||||||
{
|
{
|
||||||
|
|
Reference in New Issue