src/InjectContainer.php
public static function classUses($class, string $find): bool
    {
        $uses = class_uses($class);

        if (in_array($find, $uses)) {
            // found the item
            return true;
        }

        // add any parent classes to the search
        $uses = array_merge($uses, class_parents($class));

        foreach ($uses as $use) {
            if (static::classUses($use, $find)) {
                return true;
            }
        }

        return false;
    }
public static function classUses($class, string $find): bool
    {
        $uses = class_uses($class);

        if (in_array($find, $uses)) {
            // found the item
            return true;
        }

        // add any parent classes to the search
        $uses = array_merge($uses, class_parents($class));

        foreach ($uses as $use) {
            if (static::classUses($use, $find)) {
                return true;
            }
        }

        return false;
    }
public static function classUses ( $ class , string $ find ) : bool { $ uses = class_uses ( $ class ) ; if ( in_array ( $ find , $ uses ) ) { // found the item return true ; } // add any parent classes to the search $ uses = array_merge ( $ uses , class_parents ( $ class ) ) ; foreach ( $ uses as $ use ) { if ( static :: classUses ( $ use , $ find ) ) { return true ; } } return false ; }
Check to see if the class uses the provided item

@param $class
@param string $find
@return bool
Check to see if the class uses the provided item