1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
psalm/tests/fixtures/stubs/class_alias.php
orklah 73f6fcde48
Short list syntax (#4102)
* Short list syntax

* revert unrelated CS
2020-09-02 00:17:41 -04:00

37 lines
569 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace ClassAliasStubTest;
class A
{
/**
* @var string
*/
public $foo = 'hello';
public function bar(string $s) : string
{
return $s . ' Im here';
}
public static function bat() : void
{
}
}
interface I
{
}
class_alias('ClassAliasStubTest\\A', 'ClassAliasStubTest\\B');
class_alias(A::class, C::class);
$arr = [
[A::class, D::class],
[I::class, IAlias::class],
];
foreach ($arr as [$orig, $alias]) {
// Psalm cannot reason about this in the loading step
class_alias($orig, $alias);
}