src/FlaggedEnum.php
public function getFlags(): array
    {
        if ($this->flags === null) {
            $this->flags = [];
            foreach (static::values() as $flag) {
                if ($this->hasFlag($flag)) {
                    $this->flags[] = $flag;
                }
            }
        }

        return $this->flags;
    }
public function getFlags(): array
    {
        if ($this->flags === null) {
            $this->flags = [];
            foreach (static::values() as $flag) {
                if ($this->hasFlag($flag)) {
                    $this->flags[] = $flag;
                }
            }
        }

        return $this->flags;
    }
public function getFlags ( ) : array { if ( $ this -> flags === null ) { $ this -> flags = [ ] ; foreach ( static :: values ( ) as $ flag ) { if ( $ this -> hasFlag ( $ flag ) ) { $ this -> flags [ ] = $ flag ; } } } return $ this -> flags ; }
Gets an array of bit flags of the value.

@return array
Gets an array of bit flags of the value .