Skip to content

Commit

Permalink
Reset psalm baseline
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Jul 22, 2022
1 parent 15b6643 commit 12b4ca5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 32 deletions.
37 changes: 11 additions & 26 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@
<code>null !== $vars</code>
<code>null !== $vars</code>
</RedundantConditionGivenDocblockType>
<TooManyArguments occurrences="2"/>
<TooManyArguments occurrences="2">
<code>static fn() =&gt; $ts</code>
<code>static fn() =&gt; ['hops' =&gt; $hops, 'ts' =&gt; $ts]</code>
</TooManyArguments>
</file>
<file src="src/AbstractManager.php">
<MixedMethodCall occurrences="2">
Expand Down Expand Up @@ -611,9 +614,6 @@
<MissingClosureParamType occurrences="1">
<code>$test</code>
</MissingClosureParamType>
<MissingClosureReturnType occurrences="1">
<code>function ($test) {</code>
</MissingClosureReturnType>
<MissingReturnType occurrences="1">
<code>initializeValidatorChain</code>
</MissingReturnType>
Expand Down Expand Up @@ -920,11 +920,9 @@
<code>24</code>
<code>24</code>
</InvalidScalarArgument>
<MissingClosureReturnType occurrences="4">
<code>function () {</code>
<code>function () {</code>
<code>function (?string $module = null) {</code>
<code>function (?string $module = null) {</code>
<MissingClosureReturnType occurrences="2">
<code>static function (?string $module = null) {</code>
<code>static function (?string $module = null) {</code>
</MissingClosureReturnType>
<MissingReturnType occurrences="3">
<code>testCookieSameSiteAltersIniSetting</code>
Expand Down Expand Up @@ -1125,18 +1123,13 @@
</RedundantConditionGivenDocblockType>
</file>
<file src="test/SaveHandler/CacheTest.php">
<MissingClosureParamType occurrences="5">
<code>$args</code>
<MissingClosureParamType occurrences="4">
<code>$args</code>
<code>$args</code>
<code>$args</code>
<code>$args</code>
</MissingClosureParamType>
<MissingClosureReturnType occurrences="1">
<code>function ($args) {</code>
</MissingClosureReturnType>
<MixedArrayAccess occurrences="4">
<code>$args[1]</code>
<MixedArrayAccess occurrences="3">
<code>$args[1]</code>
<code>$args[1]</code>
<code>$args[1]</code>
Expand Down Expand Up @@ -1340,9 +1333,6 @@
<InvalidScalarArgument occurrences="1">
<code>$_SESSION</code>
</InvalidScalarArgument>
<MissingClosureReturnType occurrences="1">
<code>function () use (&amp;$validatorCalled) {</code>
</MissingClosureReturnType>
<MixedArgument occurrences="18">
<code>$_SESSION</code>
<code>$compare</code>
Expand All @@ -1368,7 +1358,7 @@
<code>$_SESSION[$key]</code>
<code>$_SESSION['__Laminas']['_VALID']</code>
</MixedArrayAccess>
<MixedAssignment occurrences="27">
<MixedAssignment occurrences="26">
<code>$compare</code>
<code>$config</code>
<code>$config</code>
Expand All @@ -1384,7 +1374,6 @@
<code>$header</code>
<code>$header</code>
<code>$metaData</code>
<code>$origId</code>
<code>$sName</code>
<code>$sName</code>
<code>$sName</code>
Expand Down Expand Up @@ -1417,14 +1406,10 @@
<code>assertFalse</code>
<code>assertSame</code>
</RedundantCondition>
<TooManyArguments occurrences="1">
<code>expectException</code>
</TooManyArguments>
<TypeDoesNotContainType occurrences="1">
<code>assertIsArray</code>
</TypeDoesNotContainType>
<UnusedVariable occurrences="2">
<code>$origId</code>
<UnusedVariable occurrences="1">
<code>$origId</code>
</UnusedVariable>
</file>
Expand Down
2 changes: 1 addition & 1 deletion src/SessionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public function isValid()
$event->setTarget($this);
$event->setParams($this);

$falseResult = static fn($test) => false === $test;
$falseResult = static fn($test): bool => false === $test;

$responses = $validator->triggerEventUntil($falseResult, $event);

Expand Down
5 changes: 2 additions & 3 deletions test/Config/SessionConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,7 @@ public function testProvidingNonSessionHandlerToSetPhpSaveHandlerResultsInExcept

public function testProvidingValidKnownSessionHandlerToSetPhpSaveHandlerResultsInNoErrors(): void
{
/** @return string */
$this->config::$phpinfo = static function () {
$this->config::$phpinfo = static function (): void {
echo "Registered save handlers => user files unittest";
};

Expand All @@ -1040,7 +1039,7 @@ public function testProvidingValidKnownSessionHandlerToSetPhpSaveHandlerResultsI

public function testCanProvidePathWhenUsingRedisSaveHandler(): void
{
$this->config::$phpinfo = static function () {
$this->config::$phpinfo = static function (): void {
echo "Registered save handlers => user files redis";
};

Expand Down
4 changes: 2 additions & 2 deletions test/SessionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ public function testRegeneratingIdAfterSessionStartedShouldSendExpireCookie(): v
$config = $this->manager->getConfig();
$config->setUseCookies(true);
$this->manager->start();
$origId = $this->manager->getId();
$this->manager->getId();
$this->manager->regenerateId();

$headers = xdebug_get_headers();
Expand Down Expand Up @@ -749,7 +749,7 @@ public function testSessionValidationDoesNotHaltOnNoopListener(): void
{
$this->manager = new SessionManager();
$validatorCalled = false;
$validator = static function () use (&$validatorCalled) {
$validator = static function () use (&$validatorCalled): void {
$validatorCalled = true;
};

Expand Down

0 comments on commit 12b4ca5

Please sign in to comment.