Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="2.1.0" installed="2.1.0" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="5.26.1" installed="5.26.1" location="./tools/psalm" copy="false"/>
<phar name="phpstan" version="2.1.17" installed="2.1.17" location="./tools/phpstan" copy="false"/>
</phive>
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,7 @@
"cs-check": "phpcs --colors --parallel=16 -p src/ tests/",
"cs-fix": "phpcbf --colors --parallel=16 -p src/ tests/",
"phpstan": "tools/phpstan analyse",
"psalm": "tools/psalm --show-info=false",
"psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
"stan": [
"@phpstan",
"@psalm"
],
"stan": "@phpstan",
"stan-baseline": "tools/phpstan --generate-baseline",
"stan-setup": "phive install",
"test": "phpunit"
Expand Down
2 changes: 0 additions & 2 deletions src/Cache/Engine/DebugEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public function __construct(CacheEngine|array $config, string $name, LoggerInter
*/
public function init(array $config = []): bool
{
/** @psalm-suppress RedundantPropertyInitializationCheck */
if (!isset($this->_engine)) {
$registry = new CacheRegistry();
$this->_engine = $registry->load('spies', $this->_config);
Expand Down Expand Up @@ -335,7 +334,6 @@ public function clearGroup(string $group): bool
*/
public function __toString(): string
{
/** @psalm-suppress RedundantPropertyInitializationCheck */
if (isset($this->_engine)) {
// phpcs:ignore SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable
[$ns, $class] = namespaceSplit(get_class($this->_engine));
Expand Down
1 change: 0 additions & 1 deletion src/Database/Log/DebugLog.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ public function log($level, string|Stringable $message, array $context = []): vo
*/
protected function isSchemaQuery(LoggedQuery $query): bool
{
/** @psalm-suppress InternalMethod */
$querystring = $query->jsonSerialize()['query'];

return // Multiple engines
Expand Down
1 change: 0 additions & 1 deletion src/DebugInclude.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public function __construct()
*/
public function includePaths(): array
{
/** @psalm-suppress RedundantCast */
$paths = explode(PATH_SEPARATOR, (string)get_include_path());
$paths = array_filter($paths, function ($path) {
if ($path === '.' || strlen($path) === 0) {
Expand Down
1 change: 0 additions & 1 deletion src/Mailer/Transport/DebugKitTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function __construct(array $config = [], ?AbstractTransport $originalTran

if ($className) {
unset($config['originalClassName'], $config['debugKitLog']);
/** @psalm-suppress UnsafeInstantiation */
$this->originalTransport = new $className($config);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Middleware/DebugKitMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface
return $response;
}

/** @psalm-suppress ArgumentTypeCoercion */
$row = $this->service->saveData($request, $response);
if (!$row) {
return $response;
Expand Down
4 changes: 2 additions & 2 deletions src/Model/Table/SqlTraceTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function deleteQuery(): DeleteQuery
*
* @template T of \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery
* @param \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery $query The Query to insert a comment into.
* @psalm-param T $query
* @phpstan-param T $query
* @param int $start How many entries in the stack trace to skip.
* @param bool $debugOnly False to always stamp queries with a comment.
* @return \Cake\ORM\Query\SelectQuery|\Cake\ORM\Query\UpdateQuery|\Cake\ORM\Query\DeleteQuery
* @psalm-return T
* @phpstan-return T
*/
protected function fileStamp(
SelectQuery|UpdateQuery|DeleteQuery $query,
Expand Down
2 changes: 1 addition & 1 deletion src/Panel/PanelRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ protected function _throwMissingClassError(string $class, ?string $plugin): void
protected function _create(object|string $class, string $alias, array $config): DebugPanel
{
if (is_string($class)) {
$instance = new $class($this, $config);
$instance = new $class();
} else {
$instance = $class;
}
Expand Down