-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Final Exception methods can never throw an exception
- Loading branch information
1 parent
1d4835e
commit f5e88ae
Showing
4 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ parameters: | |
- ../stubs/dom.stub | ||
- ../stubs/spl.stub | ||
- ../stubs/SplObjectStorage.stub | ||
- ../stubs/Exception.stub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
<?php | ||
|
||
interface Throwable | ||
{ | ||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
public function getMessage(); | ||
|
||
/** | ||
* @return mixed | ||
* @throws void | ||
*/ | ||
public function getCode(); | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
public function getFile(); | ||
|
||
/** | ||
* @return int | ||
* @throws void | ||
*/ | ||
public function getLine(); | ||
|
||
/** | ||
* @return mixed[] | ||
* @throws void | ||
*/ | ||
public function getTrace(); | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
public function getTraceAsString(); | ||
|
||
/** | ||
* @return null|Throwable | ||
* @throws void | ||
*/ | ||
public function getPrevious(); | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
public function __toString(); | ||
} | ||
|
||
class Exception implements Throwable | ||
{ | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
final public function getMessage() {} | ||
|
||
/** | ||
* @return mixed | ||
* @throws void | ||
*/ | ||
final public function getCode() {} | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
final public function getFile() {} | ||
|
||
/** | ||
* @return int | ||
* @throws void | ||
*/ | ||
final public function getLine() {} | ||
|
||
/** | ||
* @return mixed[] | ||
* @throws void | ||
*/ | ||
final public function getTrace() {} | ||
|
||
/** | ||
* @return null|Throwable | ||
* @throws void | ||
*/ | ||
final public function getPrevious() {} | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
final public function getTraceAsString() {} | ||
|
||
} | ||
|
||
class Error implements Throwable | ||
{ | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
final public function getMessage() {} | ||
|
||
/** | ||
* @return mixed | ||
* @throws void | ||
*/ | ||
final public function getCode() {} | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
final public function getFile() {} | ||
|
||
/** | ||
* @return int | ||
* @throws void | ||
*/ | ||
final public function getLine() {} | ||
|
||
/** | ||
* @return mixed[] | ||
* @throws void | ||
*/ | ||
final public function getTrace() {} | ||
|
||
/** | ||
* @return null|Throwable | ||
* @throws void | ||
*/ | ||
final public function getPrevious() {} | ||
|
||
/** | ||
* @return string | ||
* @throws void | ||
*/ | ||
final public function getTraceAsString() {} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters