Skip to content
Closed
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
22 changes: 22 additions & 0 deletions stubs/Exception.stub
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ interface Throwable

class Exception implements Throwable
{
/** @var string */
protected $message;

/** @var mixed */
protected $code;

/** @var string */
protected $file;

/** @var int */
protected $line;

/**
* @return string
Expand Down Expand Up @@ -99,6 +110,17 @@ class Exception implements Throwable

class Error implements Throwable
{
/** @var string */
protected $message;

/** @var mixed */
protected $code;

/** @var string */
protected $file;

/** @var int */
protected $line;

/**
* @return string
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 @@ -171,4 +171,10 @@ public function testBug7692(): void
$this->analyse([__DIR__ . '/data/bug-7692.php'], []);
}

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

}
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