public function BEM($block = null, $element = null, $modifiers = []): array
    {
        if (!isset($block) || !is_string($block) || !$block) {
            return [];
        }
        $baseClass = $element ? "{$block}__{$element}" : "{$block}";
        $classes = [$baseClass];

        if (isset($modifiers)) {
            $modifiers = self::modifierArray($modifiers);
            foreach ($modifiers as $value) {
                $classes[] = "{$baseClass}--{$value}";
            }
        }

        return $classes;
    }
public function BEM($block = null, $element = null, $modifiers = []): array
    {
        if (!isset($block) || !is_string($block) || !$block) {
            return [];
        }
        $baseClass = $element ? "{$block}__{$element}" : "{$block}";
        $classes = [$baseClass];

        if (isset($modifiers)) {
            $modifiers = self::modifierArray($modifiers);
            foreach ($modifiers as $value) {
                $classes[] = "{$baseClass}--{$value}";
            }
        }

        return $classes;
    }
public function BEM ( $ block = null , $ element = null , $ modifiers = [ ] ) : array { if ( ! isset ( $ block ) || ! is_string ( $ block ) || ! $ block ) { return [ ] ; } $ baseClass = $ element ? "{$block}__{$element}" : "{$block}" ; $ classes = [ $ baseClass ] ; if ( isset ( $ modifiers ) ) { $ modifiers = self :: modifierArray ( $ modifiers ) ; foreach ( $ modifiers as $ value ) { $ classes [ ] = "{$baseClass}--{$value}" ; } } return $ classes ; }
Generates a BEM array

@param string       $block     defaults to null
@param string       $element   defaults to null
@param string|array $modifiers defaults to []

@return array
Generates a BEM array