mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-31 00:10:51 +00:00
update docs
This commit is contained in:
parent
407c3dc7b3
commit
8ec27c0304
|
@ -1,4 +1,4 @@
|
|||
# All 343 Rectors Overview
|
||||
# All 345 Rectors Overview
|
||||
|
||||
- [Projects](#projects)
|
||||
- [General](#general)
|
||||
|
@ -2044,6 +2044,14 @@ Adds $uuid property to entities, that already have $id with integer type.Require
|
|||
|
||||
<br>
|
||||
|
||||
### `AlwaysInitializeUuidInEntityRector`
|
||||
|
||||
- class: `Rector\Doctrine\Rector\Class_\AlwaysInitializeUuidInEntityRector`
|
||||
|
||||
Add uuid initializion to all entities that misses it
|
||||
|
||||
<br>
|
||||
|
||||
### `EntityAliasToClassConstantReferenceRector`
|
||||
|
||||
- class: `Rector\Doctrine\Rector\MethodCall\EntityAliasToClassConstantReferenceRector`
|
||||
|
@ -2200,6 +2208,29 @@ Move help facade-like function calls to constructor injection
|
|||
|
||||
<br>
|
||||
|
||||
### `InlineValidationRulesToArrayDefinitionRector`
|
||||
|
||||
- class: `Rector\Laravel\Rector\Class_\InlineValidationRulesToArrayDefinitionRector`
|
||||
|
||||
Transforms inline validation rules to array definition
|
||||
|
||||
```diff
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SomeClass extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
- 'someAttribute' => 'required|string|exists:' . SomeModel::class . 'id',
|
||||
+ 'someAttribute' => ['required', 'string', \Illuminate\Validation\Rule::exists(SomeModel::class, 'id')],
|
||||
];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### `MinutesToSecondsInCacheRector`
|
||||
|
||||
- class: `Rector\Laravel\Rector\StaticCall\MinutesToSecondsInCacheRector`
|
||||
|
@ -2686,10 +2717,12 @@ Change new Route() from RouteFactory to @Route annotation above controller metho
|
|||
}
|
||||
}
|
||||
|
||||
+use Symfony\Component\Routing\Annotation\Route;
|
||||
+
|
||||
final class SomePresenter
|
||||
{
|
||||
+ /**
|
||||
+ * @Symfony\Component\Routing\Annotation\Route(path="some-path")
|
||||
+ * @Route(path="some-path")
|
||||
+ */
|
||||
public function run()
|
||||
{
|
||||
|
|
|
@ -802,7 +802,7 @@ strict_types=1
|
|||
#### `PhpParser\Node\Stmt\Declare_`
|
||||
|
||||
```php
|
||||
declare (strict_types=1);
|
||||
declare(strict_types=1);
|
||||
```
|
||||
<br>
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ use Rector\Exception\Configuration\InvalidConfigurationException;
|
|||
use Rector\Utils\DocumentationGenerator\Command\DumpNodesCommand;
|
||||
use Rector\Utils\DocumentationGenerator\Command\DumpRectorsCommand;
|
||||
use Rector\Utils\RectorGenerator\Contract\ContributorCommandInterface;
|
||||
use RuntimeException;
|
||||
use Symfony\Component\Console\Application as SymfonyApplication;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Input\InputDefinition;
|
||||
|
@ -179,11 +178,6 @@ final class Application extends SymfonyApplication
|
|||
return getcwd() . '/rector.yaml';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param InputInterface $input
|
||||
* @throws RuntimeException
|
||||
* @return string
|
||||
*/
|
||||
private function getNewWorkingDir(InputInterface $input): string
|
||||
{
|
||||
$workingDir = $input->getParameterOption(['--working-dir', '-d']);
|
||||
|
|
Loading…
Reference in New Issue
Block a user