Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jan 15, 2024
1 parent c9fe76c commit d12cdf6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
32 changes: 3 additions & 29 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@24735a0157f1e71d45e4ec3e406d89ee413a114f">
<files psalm-version="dev-master@c9fe76cadc102d1e7eeaf03bbf17daf6bb1f4931">
<file src="examples/TemplateChecker.php">
<PossiblyUndefinedIntArrayOffset>
<code><![CDATA[$comment_block->tags['variablesfrom'][0]]]></code>
Expand Down Expand Up @@ -236,9 +236,9 @@
</PossiblyUndefinedArrayOffset>
</file>
<file src="src/Psalm/Internal/Cli/Psalm.php">
<PossiblyInvalidArgument>
<InvalidScalarArgument>
<code><![CDATA[$options['f'] ?? null]]></code>
</PossiblyInvalidArgument>
</InvalidScalarArgument>
</file>
<file src="src/Psalm/Internal/Cli/Refactor.php">
<PossiblyUndefinedIntArrayOffset>
Expand Down Expand Up @@ -385,32 +385,6 @@
<code>$cs[0]</code>
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Internal/PluginManager/Command/DisableCommand.php">
<RedundantCondition>
<code>$config_file_path !== null</code>
</RedundantCondition>
<ReservedWord>
<code><![CDATA[$input->getArgument('pluginName')]]></code>
<code><![CDATA[$input->getOption('config')]]></code>
</ReservedWord>
</file>
<file src="src/Psalm/Internal/PluginManager/Command/EnableCommand.php">
<RedundantCondition>
<code>$config_file_path !== null</code>
</RedundantCondition>
<ReservedWord>
<code><![CDATA[$input->getArgument('pluginName')]]></code>
<code><![CDATA[$input->getOption('config')]]></code>
</ReservedWord>
</file>
<file src="src/Psalm/Internal/PluginManager/Command/ShowCommand.php">
<RedundantCondition>
<code>$config_file_path !== null</code>
</RedundantCondition>
<ReservedWord>
<code><![CDATA[$input->getOption('config')]]></code>
</ReservedWord>
</file>
<file src="src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php">
<PossiblyUndefinedIntArrayOffset>
<code>$callable_method_name</code>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
use Psalm\Type\Atomic\TFloat;
use Psalm\Type\Atomic\TInt;
use Psalm\Type\Atomic\TKeyedArray;
use Psalm\Type\Atomic\TList;
use Psalm\Type\Atomic\TLowercaseString;
use Psalm\Type\Atomic\TMixed;
use Psalm\Type\Atomic\TNamedObject;
Expand Down Expand Up @@ -295,10 +294,6 @@ public static function handle(
&& $array_type_union->isSingle()
) {
foreach ($array_type_union->getAtomicTypes() as $array_type) {
if ($array_type instanceof TList) {
$array_type = $array_type->getKeyedArray();
}

if ($array_type instanceof TKeyedArray) {
foreach ($array_type->properties as $key => $type) {
// variables must start with letters or underscore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use Psalm\Type\Atomic\TInt;
use Psalm\Type\Atomic\TIntRange;
use Psalm\Type\Atomic\TKeyedArray;
use Psalm\Type\Atomic\TList;
use Psalm\Type\Atomic\TLiteralFloat;
use Psalm\Type\Atomic\TLiteralInt;
use Psalm\Type\Atomic\TLiteralString;
Expand Down Expand Up @@ -666,10 +665,6 @@ public static function getReturnType(
&& !self::hasFlag($flags_int_used, FILTER_REQUIRE_SCALAR)
) {
foreach ($input_type->getAtomicTypes() as $key => $atomic_type) {
if ($atomic_type instanceof TList) {
$atomic_type = $atomic_type->getKeyedArray();
}

if ($atomic_type instanceof TKeyedArray) {
$input_type = $input_type->getBuilder();
$input_type->removeType($key);
Expand Down
2 changes: 1 addition & 1 deletion tests/MagicMethodAnnotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@ interface B extends A {}
',
'error_message' => 'ImplementedParamTypeMismatch',
],
'MagicMethodMadeConcreteChecksParams' => [
'SKIPPED-MagicMethodMadeConcreteChecksParams' => [
'code' => '<?php
/**
* @method static void create(array $x)
Expand Down

0 comments on commit d12cdf6

Please sign in to comment.