Skip to content

Commit

Permalink
[DX] Remove MoveValueObjectsToValueObjectDirectoryRector, should be h…
Browse files Browse the repository at this point in the history
…andled by PHPStorm refactoring and PHPStan rule checks (#1832)
  • Loading branch information
TomasVotruba committed Feb 18, 2022
1 parent cab8299 commit 1ed8242
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 571 deletions.
51 changes: 2 additions & 49 deletions build/target-repository/docs/rector_rules_overview.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 518 Rules Overview
# 517 Rules Overview

<br>

## Categories

- [Arguments](#arguments) (4)

- [Autodiscovery](#autodiscovery) (4)
- [Autodiscovery](#autodiscovery) (3)

- [CodeQuality](#codequality) (71)

Expand Down Expand Up @@ -326,53 +326,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {

<br>

### MoveValueObjectsToValueObjectDirectoryRector

Move value object to ValueObject namespace/directory

:wrench: **configure it!**

- class: [`Rector\Autodiscovery\Rector\Class_\MoveValueObjectsToValueObjectDirectoryRector`](../rules/Autodiscovery/Rector/Class_/MoveValueObjectsToValueObjectDirectoryRector.php)

```php
use Rector\Autodiscovery\Rector\Class_\MoveValueObjectsToValueObjectDirectoryRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();

$services->set(MoveValueObjectsToValueObjectDirectoryRector::class)
->configure([
MoveValueObjectsToValueObjectDirectoryRector::TYPES => ['ValueObjectInterfaceClassName'],
MoveValueObjectsToValueObjectDirectoryRector::SUFFIXES => ['Search'],
MoveValueObjectsToValueObjectDirectoryRector::ENABLE_VALUE_OBJECT_GUESSING => true,
]);
};
```


```diff
-// app/Exception/Name.php
+// app/ValueObject/Name.php
class Name
{
private $name;

public function __construct(string $name)
{
$this->name = $name;
}

public function getName()
{
return $this->name;
}
}
```

<br>

## CodeQuality

### AbsolutizeRequireAndIncludePathRector
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

104 changes: 0 additions & 104 deletions rules/Autodiscovery/Analyzer/ValueObjectClassAnalyzer.php

This file was deleted.

0 comments on commit 1ed8242

Please sign in to comment.