Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 19, 2023
1 parent 900807d commit 19a5c01
Show file tree
Hide file tree
Showing 207 changed files with 449 additions and 49 deletions.
2 changes: 2 additions & 0 deletions tests/AlgebraTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use PhpParser;
Expand Down
2 changes: 2 additions & 0 deletions tests/AnnotationTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Config;
Expand Down
2 changes: 2 additions & 0 deletions tests/ArgTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/ArrayAccessTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Config;
Expand Down
2 changes: 2 additions & 0 deletions tests/ArrayAssignmentTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Context;
Expand Down
2 changes: 2 additions & 0 deletions tests/ArrayFunctionCallTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/AssertAnnotationTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Config;
Expand Down
2 changes: 2 additions & 0 deletions tests/AssignmentTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/AsyncTestCase.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Amp\PHPUnit\AsyncTestCase as BaseAsyncTestCase;
Expand Down
2 changes: 2 additions & 0 deletions tests/AttributeTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Context;
Expand Down
2 changes: 2 additions & 0 deletions tests/BadFormatTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Context;
Expand Down
2 changes: 2 additions & 0 deletions tests/BinaryOperationTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Config;
Expand Down
2 changes: 2 additions & 0 deletions tests/ByIssueLevelAndTypeReportTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use PHPUnit\Framework\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion tests/Cache/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private static function normalizeIssueData(array $issue_data): array
* @dataProvider provideCacheInteractions
*/
public function testCacheInteractions(
array $interactions
array $interactions,
): void {
$config = Config::loadFromXML(
__DIR__ . DIRECTORY_SEPARATOR . 'test_base_dir',
Expand Down
2 changes: 2 additions & 0 deletions tests/CallableTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/CastTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\ValidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/CheckTypeTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/ClassLikeDocblockParserTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use PhpParser\Comment\Doc;
Expand Down
2 changes: 2 additions & 0 deletions tests/ClassLikeStringTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Config;
Expand Down
2 changes: 2 additions & 0 deletions tests/ClassLoadOrderTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/ClassScopeTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/ClassTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/ClosureTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
Expand Down
2 changes: 2 additions & 0 deletions tests/CodebaseTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use PhpParser\Node\Name;
Expand Down
2 changes: 2 additions & 0 deletions tests/CommentAnalyzerTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use PHPUnit\Framework\TestCase as BaseTestCase;
Expand Down
5 changes: 3 additions & 2 deletions tests/ComposerLockTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests;

use Psalm\Internal\PluginManager\ComposerLock;
Expand Down Expand Up @@ -212,10 +214,9 @@ private function pluginEntry(string $package_name, string $package_class): array
}

/**
* @param mixed $data
* @psalm-pure
*/
private function jsonFile($data): string
private function jsonFile(mixed $data): string
{
return 'data:application/json,' . json_encode($data, JSON_THROW_ON_ERROR);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/ConfigFileTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests\Config;

use Psalm\Config;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/ConfigTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests\Config;

use Composer\Autoload\ClassLoader;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/CreatorTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests\Config;

use Psalm\Config\Creator;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/AfterAnalysisPlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin;

use Psalm\Plugin\PluginEntryPointInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/FilePlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin;

use Psalm\Plugin\PluginEntryPointInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/FileTypeSelfRegisteringPlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests\Config\Plugin;

use Psalm\Plugin\FileExtensionsInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/FunctionPlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin;

use Psalm\Plugin\PluginEntryPointInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/Hook/AfterAnalysis.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin\Hook;

use Psalm\Plugin\EventHandler\AfterAnalysisInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests\Config\Plugin\Hook;

use Psalm\Codebase;
Expand Down Expand Up @@ -108,7 +110,7 @@ private static function toValueType(Codebase $codebase, Union $array_like_type):
private static function createExpectedCallable(
Union $input_type,
DynamicTemplateProvider $template_provider,
int $return_template_offset = 0
int $return_template_offset = 0,
): TCallable {
return new TCallable(
'callable',
Expand All @@ -124,7 +126,7 @@ private static function createExpectedCallable(
*/
private static function createRestCallables(
DynamicTemplateProvider $template_provider,
int $expected_callable_args_count
int $expected_callable_args_count,
): array {
$rest_callable_params = [];

Expand Down Expand Up @@ -160,7 +162,7 @@ private static function createReturnType(array $all_expected_callables): Union
*/
private static function createTemplates(
DynamicTemplateProvider $template_provider,
int $expected_callable_count
int $expected_callable_count,
): array {
$template_params = [];

Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/Hook/FileProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin\Hook;

use Psalm\Plugin\EventHandler\AfterFileAnalysisInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/Hook/FooMethodProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin\Hook;

use Psalm\Plugin\EventHandler\Event\MethodExistenceProviderEvent;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/Hook/FooPropertyProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin\Hook;

use Psalm\Plugin\EventHandler\Event\PropertyExistenceProviderEvent;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/Hook/MagicFunctionProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin\Hook;

use Psalm\Plugin\EventHandler\Event\FunctionExistenceProviderEvent;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/MethodPlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin;

use Psalm\Plugin\PluginEntryPointInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/PropertyPlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Test\Config\Plugin;

use Psalm\Plugin\PluginEntryPointInterface;
Expand Down
2 changes: 2 additions & 0 deletions tests/Config/Plugin/StoragePlugin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Psalm\Tests\Config\Plugin;

use Psalm\Plugin\PluginEntryPointInterface;
Expand Down
Loading

0 comments on commit 19a5c01

Please sign in to comment.