Skip to content

Commit

Permalink
Add ScriptDir annotation to Compiler class
Browse files Browse the repository at this point in the history
Introduced the ScriptDir annotation to enhance the type safety of the $scriptDir parameter in the Compiler class. This change ensures consistency and correctness throughout the codebase by leveraging psalm-import-type for better type management.
  • Loading branch information
koriym committed Nov 29, 2024
1 parent ea78008 commit 0ef1aac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Ray\Compiler\Exception\CompileLockFailed;
use Ray\Di\AbstractModule;
use Ray\Di\AcceptInterface;
use Ray\Di\Annotation\ScriptDir;
use Ray\Di\ContainerFactory;
use Ray\Di\DependencyInterface;

Expand All @@ -19,10 +20,14 @@
use const LOCK_EX;
use const LOCK_UN;

/**

Check failure on line 23 in src/Compiler.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Found multi-line doc comment with single line content, use one-line doc comment instead.
* @psalm-import-type ScriptDir from CompileInjector
*/
final class Compiler
{
/**
* Compiles a given module into Scripts
* @param ScriptDir $scriptDir

Check failure on line 30 in src/Compiler.php

View workflow job for this annotation

GitHub Actions / cs / Coding Standards

Expected 1 line between description and annotations, found 0.
*
* @SuppressWarnings(PHPMD.UnusedFormalParameter) // @phpstan-ignore-line
*/
Expand Down

0 comments on commit 0ef1aac

Please sign in to comment.