Skip to content

Commit

Permalink
Updated Rector to commit 1ed8242
Browse files Browse the repository at this point in the history
rectorphp/rector-src@1ed8242 [DX] Remove MoveValueObjectsToValueObjectDirectoryRector, should be handled by PHPStorm refactoring and PHPStan rule checks (#1832)
  • Loading branch information
TomasVotruba committed Feb 18, 2022
1 parent 9b0ea31 commit 7964c1b
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 378 deletions.
51 changes: 2 additions & 49 deletions 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
111 changes: 0 additions & 111 deletions rules/Autodiscovery/Analyzer/ValueObjectClassAnalyzer.php

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = 'cab829909370c582441afaf59225d48eb9a86be1';
public const PACKAGE_VERSION = '1ed8242e4462ace3beabc12632d1f8f4638bd7c3';
/**
* @var string
*/
public const RELEASE_DATE = '2022-02-18 01:49:31';
public const RELEASE_DATE = '2022-02-18 01:00:33';
public static function resolvePackageVersion() : string
{
$process = new \RectorPrefix20220218\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit0df88c7745440821c3aae20346ab83d6::getLoader();
return ComposerAutoloaderInit6803c5aa61198f26a2560abb9252e1ec::getLoader();
Loading

0 comments on commit 7964c1b

Please sign in to comment.