Sartor
3 years ago
committed by
GitHub
6 changed files with 122 additions and 1 deletions
@ -0,0 +1,17 @@
|
||||
<?php |
||||
/** |
||||
* @link http://www.yiiframework.com/ |
||||
* @copyright Copyright (c) 2008 Yii Software LLC |
||||
* @license http://www.yiiframework.com/license/ |
||||
*/ |
||||
|
||||
namespace yiiunit\framework\di\stubs; |
||||
|
||||
use yii\base\BaseObject; |
||||
|
||||
class QuxAnother extends BaseObject implements QuxInterface |
||||
{ |
||||
public function quxMethod() |
||||
{ |
||||
} |
||||
} |
@ -0,0 +1,15 @@
|
||||
<?php |
||||
|
||||
namespace yiiunit\framework\di\stubs; |
||||
|
||||
// Syntax valid only for PHP 8.1+ |
||||
class StaticMethodsWithIntersectionTypes |
||||
{ |
||||
public static function withQuxInterfaceAndQuxAnotherIntersection(QuxInterface & QuxAnother $Qux) |
||||
{ |
||||
} |
||||
|
||||
public static function withQuxAnotherAndQuxInterfaceIntersection(QuxAnother & QuxInterface $Qux) |
||||
{ |
||||
} |
||||
} |
@ -0,0 +1,23 @@
|
||||
<?php |
||||
|
||||
namespace yiiunit\framework\di\stubs; |
||||
|
||||
// Syntax valid only for PHP 8.0+ |
||||
class StaticMethodsWithUnionTypes |
||||
{ |
||||
public static function withBetaUnion(string | Beta $beta) |
||||
{ |
||||
} |
||||
|
||||
public static function withBetaUnionInverse(Beta | string $beta) |
||||
{ |
||||
} |
||||
|
||||
public static function withBetaAndQuxUnion(Beta | QuxInterface $betaOrQux) |
||||
{ |
||||
} |
||||
|
||||
public static function withQuxAndBetaUnion(QuxInterface | Beta $betaOrQux) |
||||
{ |
||||
} |
||||
} |
Loading…
Reference in new issue