Skip to content

Commit 9353638

Browse files
committed
Fix CS.
1 parent 399e42d commit 9353638

18 files changed

+33
-33
lines changed

phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 6
5+
level: 8
66
treatPhpDocTypesAsCertain: false
77
bootstrapFiles:
88
- tests/bootstrap.php

src/Command/BenchmarkCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser): ConsoleOption
169169
{
170170
$parser->setDescription(
171171
'Allows you to obtain some rough benchmarking statistics' .
172-
'about a fully qualified URL.'
172+
'about a fully qualified URL.',
173173
)
174174
->addArgument('url', [
175175
'help' => 'The URL to request.',
@@ -187,7 +187,7 @@ protected function buildOptionParser(ConsoleOptionParser $parser): ConsoleOption
187187
])
188188
->setEpilog(
189189
'Example Use: `cake benchmark --n 10 --t 100 http://localhost/testsite`. ' .
190-
'<info>Note:</info> this benchmark does not include browser render times.'
190+
'<info>Note:</info> this benchmark does not include browser render times.',
191191
);
192192

193193
return $parser;

src/Controller/DebugKitController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function beforeFilter(EventInterface $event): void
4949
Log::info(
5050
'Cake Authorization plugin is enabled. If you would like ' .
5151
'to force DebugKit to ignore it, set `DebugKit.ignoreAuthorization` ' .
52-
' Configure option to true.'
52+
' Configure option to true.',
5353
);
5454
}
5555
}

src/Controller/MailPreviewController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ protected function findPreferredPart(AbstractResult $email, ?string $partType):
254254
}
255255
}
256256

257-
/** @psalm-suppress PossiblyNullArgument */
258-
return $this->findPart($email, $partType) ?: null;
257+
return $this->findPart($email, (string)$partType) ?: null;
259258
}
260259

261260
/**
@@ -285,7 +284,7 @@ protected function findPreview(string $previewName, string $emailName, string $p
285284
throw new NotFoundException(sprintf(
286285
'Mailer preview `%s::%s` not found',
287286
$previewName,
288-
$emailName
287+
$emailName,
289288
));
290289
}
291290

src/DebugSql.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function sql(
7272
Query $query,
7373
bool $showValues = true,
7474
?bool $showHtml = null,
75-
int $stackDepth = 0
75+
int $stackDepth = 0,
7676
): Query {
7777
if (!Configure::read('debug')) {
7878
return $query;
@@ -126,7 +126,7 @@ public static function sql(
126126
HtmlHighlighter::HIGHLIGHT_WORD => 'style="color: #9c27b0;"',
127127
HtmlHighlighter::HIGHLIGHT_PRE => 'style="color: #222; background-color: transparent;"',
128128
],
129-
false
129+
false,
130130
);
131131
} else {
132132
$highlighter = new NullHighlighter();
@@ -164,7 +164,7 @@ public static function sqld(
164164
Query $query,
165165
bool $showValues = true,
166166
?bool $showHtml = null,
167-
int $stackDepth = 1
167+
int $stackDepth = 1,
168168
): void {
169169
static::sql($query, $showValues, $showHtml, $stackDepth);
170170
die(1);
@@ -221,6 +221,6 @@ private static function interpolate(string $sql, array $bindings): string
221221
$keys[] = is_string($key) ? "/$key\b/" : '/[?]/';
222222
}
223223

224-
return preg_replace($keys, $params, $sql, $limit);
224+
return (string)preg_replace($keys, $params, $sql, $limit);
225225
}
226226
}

src/Mailer/Transport/DebugKitTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(array $config = [], ?AbstractTransport $originalTran
5151
$className = App::className(
5252
$config['originalClassName'],
5353
'Mailer/Transport',
54-
'Transport'
54+
'Transport',
5555
);
5656
}
5757

src/Model/Table/LazyTableTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function ensureTables(array $fixtures): void
7979
if (strpos($e->getMessage(), 'unable to open')) {
8080
throw new RuntimeException(
8181
'Could not create a SQLite database. ' .
82-
'Ensure that your webserver has write access to the database file and folder it is in.'
82+
'Ensure that your webserver has write access to the database file and folder it is in.',
8383
);
8484
}
8585
throw $e;

src/Model/Table/RequestsTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function gc(): void
160160
} catch (PDOException $e) {
161161
Log::warning(
162162
'Unable to run VACUUM on debug kit SQLite database. ' .
163-
'Please manually remove the database file'
163+
'Please manually remove the database file',
164164
);
165165
Log::warning((string)$e);
166166
}

src/Model/Table/SqlTraceTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function deleteQuery(): DeleteQuery
6666
protected function fileStamp(
6767
SelectQuery|UpdateQuery|DeleteQuery $query,
6868
int $start = 1,
69-
bool $debugOnly = true
69+
bool $debugOnly = true,
7070
): SelectQuery|UpdateQuery|DeleteQuery {
7171
if (!Configure::read('debug') && $debugOnly === true) {
7272
return $query;

src/Panel/EnvironmentPanel.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function _prepare(): array
5151
$phpVer = phpversion();
5252
$return['php'] = array_merge(
5353
['PHP_VERSION' => $phpVer],
54-
$_SERVER
54+
$_SERVER,
5555
);
5656
unset($return['php']['argv']);
5757

@@ -86,7 +86,7 @@ protected function _prepare(): array
8686
[
8787
'TIME_START', 'SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR',
8888
],
89-
''
89+
'',
9090
);
9191
$var = get_defined_constants(true);
9292
$return['app'] = array_diff_key($var['user'], $return['cake'], $hiddenCakeConstants);
@@ -131,7 +131,7 @@ protected function prepareIncludedFiles(): array
131131
$return['plugins'][$pluginName][$this->_debug->getFileType($file)][] = $this->_debug->niceFileName(
132132
$file,
133133
'plugin',
134-
$pluginName
134+
$pluginName,
135135
);
136136
} elseif ($this->_debug->isAppFile($file)) {
137137
$return['app'][$this->_debug->getFileType($file)][] = $this->_debug->niceFileName($file, 'app');

0 commit comments

Comments
 (0)