mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-27 13:13:31 +00:00
Add failing test case for use of $this
in same class with assignment.
This commit is contained in:
parent
47a18fca6b
commit
8be8bc73ed
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
|
||||
|
||||
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\Exceptions\TheException;
|
||||
|
||||
class UseOfThisSameClassWithAssignment
|
||||
{
|
||||
/**
|
||||
* @throws TheException
|
||||
*/
|
||||
public function thisMethodThrowsAnException():string
|
||||
{
|
||||
throw new TheException('');
|
||||
}
|
||||
|
||||
public function thisMethodUsesAThisThatThrowsAnException()
|
||||
{
|
||||
$assign = $this->thisMethodThrowsAnException();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
-----
|
||||
<?php
|
||||
|
||||
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
|
||||
|
||||
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\Exceptions\TheException;
|
||||
|
||||
class UseOfThisSameClassWithAssignment
|
||||
{
|
||||
/**
|
||||
* @throws TheException
|
||||
*/
|
||||
public function thisMethodThrowsAnException():string
|
||||
{
|
||||
throw new TheException('');
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\Exceptions\TheException
|
||||
*/
|
||||
public function thisMethodUsesAThisThatThrowsAnException()
|
||||
{
|
||||
$assign = $this->thisMethodThrowsAnException();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue
Block a user