Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 3, 2022
1 parent 05303fe commit ab21c97
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 32 deletions.
23 changes: 1 addition & 22 deletions psalm-baseline.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@afe85fad86536c3abe4f9495238a767ac60d5140">
<files psalm-version="dev-master@2488c523963efcc6d8a1a6a8874d08bd0d7a40cf">
<file src="examples/TemplateChecker.php">
<PossiblyUndefinedIntArrayOffset occurrences="2">
<code>$comment_block-&gt;tags['variablesfrom'][0]</code>
Expand Down Expand Up @@ -310,11 +310,6 @@
<code>$combination-&gt;array_type_params[1]</code>
</PossiblyUndefinedIntArrayOffset>
</file>
<file src="src/Psalm/Internal/Type/TypeExpander.php">
<ConflictingReferenceConstraint occurrences="1">
<code>if ($return_type instanceof TKeyOf</code>
</ConflictingReferenceConstraint>
</file>
<file src="src/Psalm/Internal/Type/TypeParser.php">
<PossiblyUndefinedIntArrayOffset occurrences="8">
<code>$intersection_types[0]</code>
Expand Down Expand Up @@ -342,17 +337,6 @@
<code>replaceTypeParams</code>
</PossiblyUnusedMethod>
</file>
<file src="src/Psalm/Type/Atomic/TClassString.php">
<DocblockTypeContradiction occurrences="2">
<code>!$this-&gt;as_type</code>
<code>!$this-&gt;as_type</code>
</DocblockTypeContradiction>
</file>
<file src="src/Psalm/Type/Atomic/TIterable.php">
<PropertyTypeCoercion occurrences="1">
<code>$type_params</code>
</PropertyTypeCoercion>
</file>
<file src="src/Psalm/Type/Atomic/TTemplateParam.php">
<PossiblyUnusedMethod occurrences="1">
<code>replaceAs</code>
Expand Down Expand Up @@ -385,11 +369,6 @@
<code>allFloatLiterals</code>
</PossiblyUnusedMethod>
</file>
<file src="tests/Internal/Codebase/InternalCallMapHandlerTest.php">
<UnusedPsalmSuppress occurrences="1">
<code>UndefinedMethod</code>
</UnusedPsalmSuppress>
</file>
<file src="vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php">
<PossiblyUndefinedStringArrayOffset occurrences="1">
<code>$subNodes['expr']</code>
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Internal/Type/TypeExpander.php
Expand Up @@ -130,6 +130,7 @@ public static function expandUnion(
*
* @return non-empty-list<Atomic>
*
* @psalm-suppress ConflictingReferenceConstraint Ultimately, the output type is always an Atomic
* @psalm-suppress ComplexMethod
*/
public static function expandAtomic(
Expand Down
5 changes: 0 additions & 5 deletions src/Psalm/Type/Atomic/TClassString.php
Expand Up @@ -197,11 +197,6 @@ public function replaceTemplateTypesWithStandins(
: null;

if ($this->as_type === $as_type) {
if (!$this->as_type && $this->as !== 'object') {
$cloned = clone $this;
$cloned->as = 'object';
return $cloned;
}
return $this;
}
$cloned = clone $this;
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Type/Atomic/TIterable.php
Expand Up @@ -42,7 +42,7 @@ final class TIterable extends Atomic
*/
public function __construct(array $type_params = [], array $extra_types = [])
{
if (count($type_params) === 2) {
if (isset($type_params[0], $type_params[1])) {
$this->has_docblock_params = true;
$this->type_params = $type_params;
} else {
Expand Down
4 changes: 0 additions & 4 deletions tests/Internal/Codebase/InternalCallMapHandlerTest.php
Expand Up @@ -754,10 +754,6 @@ private function assertParameter(array $normalizedEntry, ReflectionParameter $pa
}
}

/**
*
* @psalm-suppress UndefinedMethod
*/
public function assertEntryReturnType(ReflectionFunction $function, string $entryReturnType): void
{
if (version_compare(PHP_VERSION, '8.1.0', '>=')) {
Expand Down

0 comments on commit ab21c97

Please sign in to comment.