File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,8 +164,7 @@ private function getLatestLtsNodeVersion(): string
164164
165165 /** @var array<int, array<string, mixed>> $nodes */
166166 foreach ($ nodes as $ node ) {
167- if (
168- isset ($ node ['lts ' ])
167+ if (isset ($ node ['lts ' ])
169168 && $ node ['lts ' ] !== false
170169 && isset ($ node ['version ' ])
171170 && is_string ($ node ['version ' ])
Original file line number Diff line number Diff line change @@ -121,8 +121,7 @@ private function isHyvaCompatibilityPackage(array $composerData): bool
121121 {
122122 // Check if this IS a Hyvä compatibility package
123123 $ packageName = $ composerData ['name ' ] ?? '' ;
124- if (
125- is_string ($ packageName )
124+ if (is_string ($ packageName )
126125 && str_starts_with ($ packageName , 'hyva-themes/ ' )
127126 && str_contains ($ packageName , '-compat ' )
128127 ) {
Original file line number Diff line number Diff line change @@ -68,8 +68,7 @@ public function detect(string $themePath): bool
6868 if ($ this ->fileDriver ->isExists ($ themePath . '/composer.json ' )) {
6969 $ composerContent = $ this ->fileDriver ->fileGetContents ($ themePath . '/composer.json ' );
7070 $ composerJson = json_decode ($ composerContent , true );
71- if (
72- is_array ($ composerJson )
71+ if (is_array ($ composerJson )
7372 && isset ($ composerJson ['name ' ])
7473 && is_string ($ composerJson ['name ' ])
7574 && str_contains ($ composerJson ['name ' ], 'hyva ' )
Original file line number Diff line number Diff line change @@ -68,8 +68,7 @@ public function detect(string $themePath): bool
6868 if ($ this ->fileDriver ->isExists ($ themePath . '/composer.json ' )) {
6969 $ composerContent = $ this ->fileDriver ->fileGetContents ($ themePath . '/composer.json ' );
7070 $ composerJson = json_decode ($ composerContent , true );
71- if (
72- \is_array ($ composerJson )
71+ if (\is_array ($ composerJson )
7372 && isset ($ composerJson ['name ' ])
7473 && \is_string ($ composerJson ['name ' ])
7574 && !str_contains ($ composerJson ['name ' ], 'hyva ' )
You can’t perform that action at this time.
0 commit comments