Files
pterodactyl-panel/tools/phpstan/rules/tests/Rules/data/no-unsafe-dictionary-property.php
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

29 lines
576 B
PHP

<?php
declare(strict_types=1);
namespace Rules\Tests\Data\NoUnsafeDictionaryProperty;
final class Store
{
/** @var array<string, mixed> */
public array $meta = []; // error: line 10
/** @var array<string, object> */
private array $bag = []; // error: line 13
public \stdClass $blob; // error: line 15
/** @var array<string, string> */
public array $safe = [];
/** @var array{id: int} */
public array $shape = ['id' => 1];
public function touch(): void
{
$this->bag = [];
$this->blob = new \stdClass;
}
}