Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public function testBug3402(): void
$this->analyse([__DIR__ . '/data/bug-3402.php'], []);
}

public function testBug11761(): void
{
$this->analyse([__DIR__ . '/data/bug-11761-bis.php'], []);
}

public function testPromotedProperties(): void
{
$this->analyse([__DIR__ . '/data/promoted-properties-missing-typehint.php'], []);
Expand Down
6 changes: 6 additions & 0 deletions tests/PHPStan/Rules/Properties/OverridingPropertyRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ public function testBug12466(): void
]);
}

public function testBug11761(): void
{
$this->reportMaybes = true;
$this->analyse([__DIR__ . '/data/bug-11761.php'], []);
}

#[RequiresPhp('>= 8.4')]
public function testBug12586(): void
{
Expand Down
8 changes: 8 additions & 0 deletions tests/PHPStan/Rules/Properties/data/bug-11761-bis.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php declare(strict_types = 1);

namespace Bug11761Bis;

class ApiLimitExceededException extends \Exception
{
protected $message = 'You have exceeded the 300 API calls per minute.';
}
9 changes: 9 additions & 0 deletions tests/PHPStan/Rules/Properties/data/bug-11761.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php declare(strict_types = 1);

namespace Bug11761;

class ApiLimitExceededException extends \Exception
{
/** @var string */
protected $message = 'You have exceeded the 300 API calls per minute.';
}
Loading