8000 Ensure all properties have a type · symfony/symfony@fde7b90 · GitHub
[go: up one dir, main page]

Skip to content

Commit fde7b90

Browse files
Ensure all properties have a type
1 parent 1935af6 commit fde7b90

Some content is hidden

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

49 files changed

+102
-76
lines changed

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

Lines changed: 2 additions & 1 deletion
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
{

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