Skip to content

Commit 1c027b2

Browse files
committed
feat: Update PHPStan baseline and configuration; add error messages for GoogleTranslate class and remove unused framework property in InstallCommand
1 parent 52ecbc3 commit 1c027b2

File tree

4 files changed

+27
-8
lines changed

4 files changed

+27
-8
lines changed

phpstan-baseline.neon

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: "#Called 'env' outside of the config directory which returns null when the config is cached, use 'config'.#"
5+
count: 2
6+
path: config/localizer.php
7+
8+
-
9+
message: "#Instantiated class Stichoza\\\\GoogleTranslate\\\\GoogleTranslate not found.#"
10+
count: 1
11+
path: src/Jobs/TranslateLang.php
12+
13+
-
14+
message: "#Call to method setSource\\(\\) on an unknown class Stichoza\\\\GoogleTranslate\\\\GoogleTranslate.#"
15+
count: 1
16+
path: src/Jobs/TranslateLang.php
17+
18+
-
19+
message: "#Call to method setTarget\\(\\) on an unknown class Stichoza\\\\GoogleTranslate\\\\GoogleTranslate.#"
20+
count: 1
21+
path: src/Jobs/TranslateLang.php
22+
23+
-
24+
message: "#Call to method translate\\(\\) on an unknown class Stichoza\\\\GoogleTranslate\\\\GoogleTranslate.#"
25+
count: 1
26+
path: src/Jobs/TranslateLang.php

phpstan.neon.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ parameters:
66
paths:
77
- src
88
- config
9-
- database
109
tmpDir: build/phpstan
1110
checkOctaneCompatibility: true
1211
checkModelProperties: true

src/Commands/GenerateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private function generateTypeScriptContent(string $locale, array $translations):
224224

225225
return str_replace(
226226
['{{ locale }}', '{{ timestamp }}', '{{ count }}', '{{ translations }}'],
227-
[$locale, $this->getCurrentTimestamp(), $this->countTranslations($translations), $jsonContent],
227+
[$locale, $this->getCurrentTimestamp(), (string) $this->countTranslations($translations), $jsonContent],
228228
$stub
229229
);
230230
}

src/Commands/InstallCommand.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ final class InstallCommand extends Command
3030
*/
3131
private array $config = [];
3232

33-
/**
34-
* Selected frontend framework.
35-
*/
36-
private ?string $framework = null;
37-
3833
/**
3934
* Execute the console command.
4035
*/
@@ -159,7 +154,6 @@ private function publishMiddleware(): void
159154
private function installFrontendPackage(): void
160155
{
161156
$framework = $this->option('framework') ?? $this->selectFramework();
162-
$this->framework = $framework; // Store for later use
163157

164158
if ($framework === 'skip') {
165159
$this->components->info('Skipping frontend package installation...');

0 commit comments

Comments
 (0)