mirror of
https://github.com/danog/psalm.git
synced 2024-12-13 01:37:23 +01:00
39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
|
<?php
|
||
|
namespace Psalm\Tests;
|
||
|
|
||
|
class SelfOutTest extends TestCase
|
||
|
{
|
||
|
use Traits\ValidCodeAnalysisTestTrait;
|
||
|
|
||
|
/**
|
||
|
* @return iterable<string,array{string,assertions?:array<string,string>,error_levels?:string[]}>
|
||
|
*/
|
||
|
public function providerValidCodeParse()
|
||
|
{
|
||
|
return [
|
||
|
'changeInterface' => [
|
||
|
'<?php
|
||
|
interface Foo {
|
||
|
/**
|
||
|
* @return void
|
||
|
*/
|
||
|
public function far() {
|
||
|
}
|
||
|
}
|
||
|
class Bar {
|
||
|
/**
|
||
|
* @psalm-self-out Foo
|
||
|
* @return void
|
||
|
*/
|
||
|
public function baz() {
|
||
|
}
|
||
|
}
|
||
|
$bar = new Bar();
|
||
|
$bar->baz();
|
||
|
$bar->far();
|
||
|
'
|
||
|
]
|
||
|
];
|
||
|
}
|
||
|
}
|