12
12
namespace Symfony \UX \Toolkit \Kit ;
13
13
14
14
use Symfony \Component \Filesystem \Path ;
15
- use Symfony \UX \Toolkit \Assert ;
16
- use Symfony \UX \Toolkit \Asset \Component ;
17
- use Symfony \UX \Toolkit \Asset \StimulusController ;
18
15
use Symfony \UX \Toolkit \Recipe \Recipe ;
19
16
use Symfony \UX \Toolkit \Recipe \RecipeType ;
20
17
@@ -31,13 +28,14 @@ final class Kit
31
28
private array $ recipes = [];
32
29
33
30
/**
34
- * @param non-empty-string $absolutePath
31
+ * @param non-empty-string $absolutePath
32
+ *
35
33
* @throws \InvalidArgumentException
36
34
*/
37
35
public function __construct (
38
- public readonly string $ absolutePath ,
36
+ public readonly string $ absolutePath ,
39
37
public readonly KitManifest $ manifest ,
40
- public ?string $ installAsMarkdown = null ,
38
+ public ?string $ installAsMarkdown = null ,
41
39
) {
42
40
if (!Path::isAbsolute ($ this ->absolutePath )) {
43
41
throw new \InvalidArgumentException (\sprintf ('Kit path "%s" is not absolute. ' , $ this ->absolutePath ));
@@ -58,7 +56,7 @@ public function addRecipe(Recipe $recipe): void
58
56
/**
59
57
* @return array<Recipe>
60
58
*/
61
- public function getRecipes (RecipeType | null $ ofType = null ): array
59
+ public function getRecipes (? RecipeType $ ofType = null ): array
62
60
{
63
61
if (null !== $ ofType ) {
64
62
$ this ->recipes = array_filter ($ this ->recipes , fn (Recipe $ recipe ) => $ recipe ->manifest ->type === $ ofType );
0 commit comments