Skip to content

Commit

Permalink
remove nette/utils dependency, to ease downgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Sep 8, 2023
1 parent 380afa5 commit 5839899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Expand Up @@ -5,8 +5,7 @@
"license": "MIT",
"require": {
"php": "^8.1",
"phpstan/phpstan": "^1.10",
"nette/utils": "^3.2"
"phpstan/phpstan": "^1.10"
},
"require-dev": {
"phpstan/extension-installer": "^1.3",
Expand Down
Expand Up @@ -5,7 +5,6 @@
namespace TomasVotruba\CognitiveComplexity\Tests\AstCognitiveComplexityAnalyzer;

use Iterator;
use Nette\Utils\FileSystem;
use PhpParser\Node;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Function_;
Expand Down Expand Up @@ -34,7 +33,8 @@ protected function setUp(): void
#[DataProvider('provideTokensAndExpectedCognitiveComplexity')]
public function test(string $filePath, int $expectedCognitiveComlexity): void
{
$fileContents = FileSystem::read($filePath);
/** @var string $fileContents */
$fileContents = file_get_contents($filePath);

$functionLike = $this->parseFileToFirstFunctionLike($fileContents);
$cognitiveComplexity = $this->astCognitiveComplexityAnalyzer->analyzeFunctionLike($functionLike);
Expand Down

0 comments on commit 5839899

Please sign in to comment.