1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 10:07:52 +01:00
psalm/tests/fixtures/stubs/conditional_interface.php

38 lines
623 B
PHP
Raw Normal View History

<?php
if (interface_exists(Foo::class)) {
interface I1 extends Foo {}
} else {
interface I1 {}
}
if (!interface_exists(Foo::class)) {
interface I2 {}
} else {
interface I2 extends Foo {}
}
if (interface_exists('Bar')) {
interface I3 extends Bar {}
} else {
interface I3 {}
}
if (!interface_exists('Bar')) {
interface I4 {}
} else {
interface I4 extends Bar {}
}
if (interface_exists(Throwable::class)) {
interface I5 extends Throwable {}
} else {
interface I5 {}
}
if (!interface_exists(Throwable::class)) {
interface I6 {}
} else {
interface I6 extends Throwable {}
}