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
1 change: 1 addition & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpstan" version="2.1.31" installed="2.1.31" location="./tools/phpstan" copy="false"/>
<phar name="psalm" version="7.0.0-beta16" installed="7.0.0-beta16" location="./tools/psalm" copy="false"/>
</phive>
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@
"cs-check": "phpcs",
"cs-fix": "phpcbf",
"phpstan": "tools/phpstan analyse",
"stan": "@phpstan",
"stan": [
"tools/phpstan analyse",
"tools/psalm"
],
"stan-baseline": "tools/phpstan --generate-baseline",
"psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
"stan-setup": "phive install",
"test": "phpunit"
},
Expand Down
73 changes: 10 additions & 63 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,74 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
<file src="src/Database/Log/DebugLog.php">
<InternalMethod>
<code><![CDATA[getContext]]></code>
<code><![CDATA[jsonSerialize]]></code>
</InternalMethod>
</file>
<file src="src/DebugInclude.php">
<PossiblyNullArrayOffset>
<code><![CDATA[$this->_composerPaths]]></code>
<code><![CDATA[$this->_pluginPaths]]></code>
</PossiblyNullArrayOffset>
</file>
<file src="src/DebugSql.php">
<InternalMethod>
<code><![CDATA[bindings]]></code>
</InternalMethod>
</file>
<file src="src/DebugTimer.php">
<PossiblyNullArrayOffset>
<code><![CDATA[self::$_timers]]></code>
</PossiblyNullArrayOffset>
</file>
<file src="src/Mailer/MailPreview.php">
<PossiblyFalseOperand>
<code><![CDATA[$pos]]></code>
</PossiblyFalseOperand>
<files psalm-version="7.0.0-beta16@491dd740b8862db7d4fe8c1f6c161055c32ad651">
<file src="src/Mailer/PreviewResult.php">
<ImpureMethodCall>
<code><![CDATA[$mailer->render()]]></code>
<code><![CDATA[$mailer->reset()]]></code>
<code><![CDATA[$mailer->viewBuilder()]]></code>
<code><![CDATA[$mailer->viewBuilder()]]></code>
<code><![CDATA[$mailer->viewBuilder()->setTemplate($method)]]></code>
<code><![CDATA[$message->getHeaders($extra)]]></code>
</ImpureMethodCall>
</file>
<file src="src/Mailer/Transport/DebugKitTransport.php">
<InvalidReturnStatement>
<code><![CDATA[$result]]></code>
</InvalidReturnStatement>
<MoreSpecificReturnType>
<code><![CDATA[array]]></code>
</MoreSpecificReturnType>
<NullArgument>
<code><![CDATA[$this->emailLog]]></code>
</NullArgument>
</file>
<file src="src/Panel/PanelRegistry.php">
<LessSpecificImplementedReturnType>
<code><![CDATA[string|null]]></code>
</LessSpecificImplementedReturnType>
<UnsafeInstantiation>
<code><![CDATA[new $class($this, $config)]]></code>
</UnsafeInstantiation>
</file>
<file src="src/Panel/PluginsPanel.php">
<InternalClass>
<code><![CDATA[PluginConfig::getAppConfig()]]></code>
</InternalClass>
<InternalMethod>
<code><![CDATA[PluginConfig::getAppConfig()]]></code>
</InternalMethod>
</file>
<file src="src/Panel/SqlLogPanel.php">
<UndefinedInterfaceMethod>
<code><![CDATA[genericInstances]]></code>
</UndefinedInterfaceMethod>
</file>
<file src="src/View/Helper/ToolbarHelper.php">
<InternalClass>
<code><![CDATA[new HtmlFormatter()]]></code>
<code><![CDATA[new HtmlFormatter()]]></code>
</InternalClass>
<InternalMethod>
<code><![CDATA[dump]]></code>
<code><![CDATA[dump]]></code>
<code><![CDATA[new HtmlFormatter()]]></code>
<code><![CDATA[new HtmlFormatter()]]></code>
</InternalMethod>
</file>
</files>
21 changes: 6 additions & 15 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?xml version="1.0"?>
<psalm
reportMixedIssues="false"
errorLevel="6"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
autoloader="tests/bootstrap.php"
usePhpDocMethodsWithoutMagicCall="true"
errorBaseline="psalm-baseline.xml"
findUnusedPsalmSuppress="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
errorBaseline="psalm-baseline.xml"
>
<projectFiles>
<directory name="src" />
Expand All @@ -19,17 +18,9 @@
</projectFiles>

<issueHandlers>
<LessSpecificReturnType errorLevel="info" />

<MissingClosureReturnType errorLevel="info" />

<PropertyNotSetInConstructor errorLevel="info" />
<MissingConstructor errorLevel="info" />
<MissingClosureParamType errorLevel="info" />
<MissingParamType errorLevel="info" />

<DocblockTypeContradiction errorLevel="info" />
<RedundantConditionGivenDocblockType errorLevel="info" />
<RiskyTruthyFalsyComparison errorLevel="info" />
<MissingPureAnnotation errorLevel="suppress" />
<MissingTemplateParam errorLevel="suppress" />
<MissingOverrideAttribute errorLevel="suppress"/>
<MissingPureAnnotation errorLevel="suppress"/>
</issueHandlers>
</psalm>
2 changes: 2 additions & 0 deletions src/Mailer/AbstractResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* A simple structure for representing the results of a sent email
*
* @psalm-external-mutation-free
*/
abstract class AbstractResult
{
Expand Down
2 changes: 2 additions & 0 deletions src/Mailer/PreviewResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

/**
* Represents the result of a preview for a given mailer
*
* @psalm-external-mutation-free
*/
class PreviewResult extends AbstractResult
{
Expand Down
2 changes: 2 additions & 0 deletions src/Mailer/SentMailResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

/**
* Represents the result of an already sent email
*
* @psalm-external-mutation-free
*/
class SentMailResult extends AbstractResult
{
Expand Down
Loading