Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Feb 10, 2024
1 parent bad42f1 commit fa66222
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 34 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ composer require tomasvotruba/finalize --dev
## Usage

```bash
<<<<<<< HEAD
vendor/bin/finalize detect src/ tests/
=======
vendor/bin/finalize finalize src tests
>>>>>>> 0155139 (misc)
```

It will:
Expand Down
5 changes: 3 additions & 2 deletions src/EntityClassResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use PhpParser\NodeTraverser;
use Symfony\Component\Finder\SplFileInfo;
use TomasVotruba\Finalize\NodeTraverser\NodeTraverserFactory;
use TomasVotruba\Finalize\NodeVisitor\EntityClassNameCollectingNodeVisitor;
use TomasVotruba\Finalize\PhpParser\CachedPhpParser;

Expand All @@ -24,7 +23,9 @@ public function __construct(
public function resolve(array $phpFileInfos, \Closure $progressClosure): array
{
$entityClassNameCollectingNodeVisitor = new EntityClassNameCollectingNodeVisitor();
$nodeTraverser = NodeTraverserFactory::createWithNodeVisitor($entityClassNameCollectingNodeVisitor);

$nodeTraverser = new NodeTraverser();
$nodeTraverser->addVisitor($entityClassNameCollectingNodeVisitor);

$this->traverseFileInfos($phpFileInfos, $nodeTraverser, $progressClosure);

Expand Down
26 changes: 0 additions & 26 deletions src/NodeTraverser/NodeTraverserFactory.php

This file was deleted.

5 changes: 3 additions & 2 deletions src/ParentClassResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use PhpParser\NodeTraverser;
use Symfony\Component\Finder\SplFileInfo;
use TomasVotruba\Finalize\NodeTraverser\NodeTraverserFactory;
use TomasVotruba\Finalize\NodeVisitor\ParentClassNameCollectingNodeVisitor;
use TomasVotruba\Finalize\PhpParser\CachedPhpParser;

Expand All @@ -24,7 +23,9 @@ public function __construct(
public function resolve(array $phpFileInfos, \Closure $progressClosure): array
{
$parentClassNameCollectingNodeVisitor = new ParentClassNameCollectingNodeVisitor();
$nodeTraverser = NodeTraverserFactory::createWithNodeVisitor($parentClassNameCollectingNodeVisitor);

$nodeTraverser = new NodeTraverser();
$nodeTraverser->addVisitor($parentClassNameCollectingNodeVisitor);

$this->traverseFileInfos($phpFileInfos, $nodeTraverser, $progressClosure);

Expand Down

0 comments on commit fa66222

Please sign in to comment.