trait_exists
laravel/framework
Supported Versions: PHP 5 >= 5.4.0, PHP 7, PHP 8
Checks if the trait exists
trait_exists
(
string $trait
,
bool $autoload
=
true
):
bool
protected function
createApplication
()
{
$applicationResolver
= static::
$applicationResolver
?: function () {
if (
trait_exists
(
\Tests\CreatesApplication
::class)) {
$applicationCreator
= new class
{
use
\Tests\CreatesApplication
;
src/Illuminate/Testing/ParallelRunner.php