Skip to content

Commit fa38296

Browse files
minor #51129 Ensure all properties have a type (nicolas-grekas)
This PR was merged into the 6.4 branch. Discussion ---------- Ensure all properties have a type | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Before #51069 Commits ------- 25a8615 Ensure all properties have a type
2 parents 1935af6 + 25a8615 commit fa38296

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+102
-81
lines changed

src/Symfony/Component/Cache/Tests/Adapter/AbstractRedisAdapterTestCase.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use PHPUnit\Framework\SkippedTestSuiteError;
1515
use Psr\Cache\CacheItemPoolInterface;
16+
use Relay\Relay;
1617
use Symfony\Component\Cache\Adapter\RedisAdapter;
1718

1819
abstract class AbstractRedisAdapterTestCase extends AdapterTestCase
@@ -23,7 +24,7 @@ abstract class AbstractRedisAdapterTestCase extends AdapterTestCase
2324
'testDefaultLifeTime' => 'Testing expiration slows down the test suite',
2425
];
2526

26-
protected static $redis;
27+
protected static \Redis|Relay|\RedisArray|\RedisCluster|\Predis\ClientInterface $redis;
2728

2829
public function createCachePool(int $defaultLifetime = 0, string $testMethod = null): CacheItemPoolInterface
2930
{
@@ -42,11 +43,6 @@ public static function setUpBeforeClass(): void
4243
}
4344
}
4445

45-
public static function tearDownAfterClass(): void
46-
{
47-
self::$redis = null;
48-
}
49-
5046
/**
5147
* @runInSeparateProcess
5248
*/

src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function testStoredFile()
148148

149149
class PhpArrayAdapterWrapper extends PhpArrayAdapter
150150
{
151-
protected $data = [];
151+
protected array $data = [];
152152

153153
public function save(CacheItemInterface $item): bool
154154
{

src/Symfony/Component/Console/Cursor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
final class Cursor
2020
{
2121
private OutputInterface $output;
22+
/** @var resource */
2223
private $input;
2324

2425
/**

src/Symfony/Component/Console/Input/Input.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
abstract class Input implements InputInterface, StreamableInputInterface
2929
{
3030
protected $definition;
31+
/** @var resource */
3132
protected $stream;
3233
protected $options = [];
3334
protected $arguments = [];

src/Symfony/Component/Console/Output/StreamOutput.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*/
3030
class StreamOutput extends Output
3131
{
32+
/** @var resource */
3233
private $stream;
3334

3435
/**

src/Symfony/Component/Console/Tests/CursorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
class CursorTest extends TestCase
1919
{
20+
/** @var resource */
2021
protected $stream;
2122

2223
protected function setUp(): void
@@ -26,8 +27,7 @@ protected function setUp(): void
2627

2728
protected function tearDown(): void
2829
{
29-
fclose($this->stream);
30-
$this->stream = null;
30+
unset($this->stream);
3131
}
3232

3333
public function testMoveUpOneLine()

src/Symfony/Component/Console/Tests/Helper/TableTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
class TableTest extends TestCase
2727
{
28+
/** @var resource */
2829
protected $stream;
2930

3031
protected function setUp(): void
@@ -34,8 +35,7 @@ protected function setUp(): void
3435

3536
protected function tearDown(): void
3637
{
37-
fclose($this->stream);
38-
$this->stream = null;
38+
unset($this->stream);
3939
}
4040

4141
/**

src/Symfony/Component/Console/Tests/Output/ConsoleSectionOutputTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
class ConsoleSectionOutputTest extends TestCase
2424
{
25+
/** @var resource */
2526
private $stream;
2627

2728
protected function setUp(): void
@@ -31,7 +32,7 @@ protected function setUp(): void
3132

3233
protected function tearDown(): void
3334
{
34-
$this->stream = null;
35+
unset($this->stream);
3536
}
3637

3738
public function testClearAll()

src/Symfony/Component/Console/Tests/Output/StreamOutputTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
class StreamOutputTest extends TestCase
1919
{
20+
/** @var resource */
2021
protected $stream;
2122

2223
protected function setUp(): void
@@ -26,7 +27,7 @@ protected function setUp(): void
2627

2728
protected function tearDown(): void
2829
{
29-
$this->stream = null;
30+
unset($this->stream);
3031
}
3132

3233
public function testConstructor()

src/Symfony/Component/Form/Console/Descriptor/Descriptor.php

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,14 @@
2929
*/
3030
abstract class Descriptor implements DescriptorInterface
3131
{
32-
/** @var OutputStyle */
33-
protected $output;
34-
protected $type;
35-
protected $ownOptions = [];
36-
protected $overriddenOptions = [];
37-
protected $parentOptions = [];
38-
protected $extensionOptions = [];
39-
protected $requiredOptions = [];
40-
protected $parents = [];
41-
protected $extensions = [];
32+
protected OutputStyle $output;
33+
protected array $ownOptions = [];
34+
protected array $overriddenOptions = [];
35+
protected array $parentOptions = [];
36+
protected array $extensionOptions = [];
37+
protected array $requiredOptions = [];
38+
protected array $parents = [];
39+
protected array $extensions = [];
4240

4341
public function describe(OutputInterface $output, ?object $object, array $options = []): void
4442
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy