| Subject |
Details |
| Rector version |
0.6.10 |
| PHP version |
PHP 7.2 |
Current Behaviour
1) src/Uri/Bridge/Doctrine/UriType.php
---------- begin diff ----------
--- Original
+++ New
@@ -59,7 +59,7 @@
* @throws StringsException
* @throws \Laminas\Uri\Exception\InvalidArgumentException
*
- * @return string|Uri|null
+ * @return Uri|string|null
*/
public function convertToPHPValue($value, AbstractPlatform $platform)
{
----------- end diff -----------
Applied rules:
* Rector\CodingStyle\Rector\Namespace_\ImportFullyQualifiedNamesRector
* Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector
Expected Behaviour
The problem is that the order of params is managed by PHP CS Fixer.
I have two shell scripts:
fix
validate
I first run fix command that runs first Rector and then PHP CS Fixer.
Then I run validate that runs Rector and then PHP CS Fixer.
This means that when I run validate, the last command run is PHP CS Fixer that changes on its own the order of params. When then is run Rector, this last one stops the entire script as for it there is an error in the order of params.
I'm going to submit a failing test case.
Current Behaviour
1) src/Uri/Bridge/Doctrine/UriType.php ---------- begin diff ---------- --- Original +++ New @@ -59,7 +59,7 @@ * @throws StringsException * @throws \Laminas\Uri\Exception\InvalidArgumentException * - * @return string|Uri|null + * @return Uri|string|null */ public function convertToPHPValue($value, AbstractPlatform $platform) { ----------- end diff ----------- Applied rules: * Rector\CodingStyle\Rector\Namespace_\ImportFullyQualifiedNamesRector * Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRectorExpected Behaviour
The problem is that the order of params is managed by PHP CS Fixer.
I have two shell scripts:
fixvalidateI first run
fixcommand that runs first Rector and then PHP CS Fixer.Then I run
validatethat runs Rector and then PHP CS Fixer.This means that when I run
validate, the last command run is PHP CS Fixer that changes on its own the order of params. When then is run Rector, this last one stops the entire script as for it there is an error in the order of params.I'm going to submit a failing test case.