Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Finds whether a variable is an array
<?php is_array(mixed $value): bool
<?php     protected function addFactoryTrait($modelClass)

    {

        $traits = class_uses_recursive($modelClass);

        if (is_array($traits) && in_array('Illuminate\\Database\\Eloquent\\Factories\\HasFactory', $traits)) {

            return;

        }