fix namespace

This commit is contained in:
TomasVotruba 2020-02-14 23:48:53 +01:00
parent 025bb364f4
commit 1c273c902c
25 changed files with 49 additions and 46 deletions

View File

@ -21,6 +21,9 @@ use Rector\Core\RectorDefinition\RectorDefinition;
use Rector\NodeTypeResolver\Node\AttributeKey; use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\PHPStan\Type\ShortenedObjectType; use Rector\PHPStan\Type\ShortenedObjectType;
/**
* @see \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\AnnotateThrowablesRectorTest
*/
final class AnnotateThrowablesRector extends AbstractRector final class AnnotateThrowablesRector extends AbstractRector
{ {
/** /**

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException * @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
@ -14,7 +14,7 @@ function throwCustomExceptionAlreadyAnnotatedInFunction()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException * @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionAlreadyAnnotatedInMethod class CustomExceptionAlreadyAnnotatedInMethod
{ {
@ -14,7 +14,7 @@ class CustomExceptionAlreadyAnnotatedInMethod
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionAlreadyAnnotatedInMethod class CustomExceptionAlreadyAnnotatedInMethod
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* This is a comment. * This is a comment.
@ -16,7 +16,7 @@ function throwCustomExceptionInFunctionWithDockblock(int $code)
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* This is a comment. * This is a comment.

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
function throwCustomExceptionInFunctionWithoutDockblock() function throwCustomExceptionInFunctionWithoutDockblock()
{ {
@ -11,7 +11,7 @@ function throwCustomExceptionInFunctionWithoutDockblock()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException * @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionInMethodWithDocblock class CustomExceptionInMethodWithDocblock
{ {
@ -19,7 +19,7 @@ class CustomExceptionInMethodWithDocblock
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionInMethodWithDocblock class CustomExceptionInMethodWithDocblock
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionInMethodWithoutDocblock class CustomExceptionInMethodWithoutDocblock
{ {
@ -14,7 +14,7 @@ class CustomExceptionInMethodWithoutDocblock
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionInMethodWithoutDocblock class CustomExceptionInMethodWithoutDocblock
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException * @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException
@ -19,7 +19,7 @@ function throwCustomExceptionThrownInTwoFunctionsSecond()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException * @throws \Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionThrownInTwoMethods class CustomExceptionThrownInTwoMethods
{ {
@ -22,7 +22,7 @@ class CustomExceptionThrownInTwoMethods
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class CustomExceptionThrownInTwoMethods class CustomExceptionThrownInTwoMethods
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \RuntimeException * @throws \RuntimeException
@ -14,7 +14,7 @@ function throwRootExceptionAlreadyAnnotatedInFunction()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \RuntimeException * @throws \RuntimeException

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionAlreadyAnnotatedInMethod class RootExceptionAlreadyAnnotatedInMethod
{ {
@ -17,7 +17,7 @@ class RootExceptionAlreadyAnnotatedInMethod
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionAlreadyAnnotatedInMethod class RootExceptionAlreadyAnnotatedInMethod
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* This is a comment. * This is a comment.
@ -16,7 +16,7 @@ function throwRootExceptionInFunctionWithDocblock(int $code)
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* This is a comment. * This is a comment.

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
function throwRootExceptionInFunctionWithoutDocblock() function throwRootExceptionInFunctionWithoutDocblock()
{ {
@ -11,7 +11,7 @@ function throwRootExceptionInFunctionWithoutDocblock()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \RuntimeException * @throws \RuntimeException

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionInMethodWithDocblock class RootExceptionInMethodWithDocblock
{ {
@ -19,7 +19,7 @@ class RootExceptionInMethodWithDocblock
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionInMethodWithDocblock class RootExceptionInMethodWithDocblock
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionInMethodWithoutDocblock class RootExceptionInMethodWithoutDocblock
{ {
@ -14,7 +14,7 @@ class RootExceptionInMethodWithoutDocblock
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionInMethodWithoutDocblock class RootExceptionInMethodWithoutDocblock
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \RuntimeException * @throws \RuntimeException
@ -19,7 +19,7 @@ function throwRootExceptionThrownInTwoFunctionsSecond()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
/** /**
* @throws \RuntimeException * @throws \RuntimeException

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionThrownInTwoMethods class RootExceptionThrownInTwoMethods
{ {
@ -22,7 +22,7 @@ class RootExceptionThrownInTwoMethods
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
class RootExceptionThrownInTwoMethods class RootExceptionThrownInTwoMethods
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use \RuntimeException; use \RuntimeException;
@ -16,7 +16,7 @@ function throwRootImportedExceptionAlreadyAnnotatedInFunction()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use \RuntimeException; use \RuntimeException;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use \RuntimeException; use \RuntimeException;
@ -19,7 +19,7 @@ class RootImportedExceptionAlreadyAnnotatedInMethod
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use \RuntimeException; use \RuntimeException;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;
@ -23,7 +23,7 @@ function throwWithFactoryMethodNoReturnTypeHinting()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;
@ -33,7 +33,7 @@ function throwWithFactoryMethodNotAnnotated()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;
@ -32,7 +32,7 @@ function throwWithFactoryStaticMethodNotAnnotated()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;
@ -37,7 +37,7 @@ function throwWithFactoryStaticMethodWithReturnDockblock()
----- -----
<?php <?php
namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowables\Fixture; namespace Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Fixture;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheException;
use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond; use Rector\CodingStyle\Tests\Rector\Throw_\AnnotateThrowablesRector\Source\TheExceptionTheSecond;