Get flags as array

@return array
544748
public function getFlagsAttribute() : array
    {
        if ($this->flagsArray !== null) {
            return $this->flagsArray;
        }

        return $this->flagsArray = json_decode($this->getAttributeFromArray('flags'), true);
    }
1360281
protected function sanitizeFlags(array $flags)
    {
        $flags = (array) $flags;

        // Flip array if necessary
        $firstKey = Arr::get(array_keys($flags), 0);
        if ($firstKey !== null && is_int($firstKey)) {
            $flags = array_combine(
                array_values($flags),
                array_fill(0, count($flags), null)
            );
        }

        return $flags;
    }
23882
public function asArray()
    {
        return [
            'id'        => $this->getId(),
            'className' => $this->getClassName(),
            'instance'  => $this->getInstance(),
            'arguments' => $this->getArguments(),
            'type'      => $this->getType(),
            'target'    => $this->getTarget(),
            'position'  => $this->getPosition(),
        ];
    }
1364624
private static function decodeFlags($flags): array
    {
        return [
            'qr' => $flags >> 15 & 0x1,
            'opcode' => $flags >> 11 & 0xf,
            'aa' => $flags >> 10 & 0x1,
            'tc' => $flags >> 9 & 0x1,
            'rd' => $flags >> 8 & 0x1,
            'ra' => $flags >> 7 & 0x1,
            'z' => $flags >> 4 & 0x7,
            'rcode' => $flags & 0xf,
        ];
    }
230659
public function toArray()
    {
        $results = [];
        foreach ($this->claims as $claim) {
            $results[$claim->getName()] = $claim->getValue();
        }

        return $results;
    }
791079
public function toArray()
    {
        return [
            'severity' => $this->severity,
            'msg' => $this->msg,
            'hint' => $this->hint,
            'link' => !empty($this->link) ? $this->link : null,
            'iconCls' => $this->iconClass,
        ];
    }
1347424
protected function getFlags($flagOptions)
    {
        $flags = [];

        foreach ($flagOptions as $key => $value) {
            $prefix = strlen($key) === 1 ? '-' : '--';
            if (is_bool($value)) {
                if ($value) {
                    // of example "--quiet"
                    $flags[] = $prefix.$key;
                }
            } elseif (is_array($value)) {
                foreach ($value as $subKey => $subValue) {
                    if (is_int($subKey)) {
                        // of example "--exclude 'dir'"
                        $flags[] = $prefix.$key.' '.escapeshellarg($subValue);
                    } else {
                        // of example "-o BatchMode='yes'"
                        $flags[] = $prefix.$key.' '.$subKey.'='.$subValue;
                    }
                }
            } elseif (is_string($value)) {
                // of example "--rsh 'ssh -p 22'"
                $flags[] = $prefix.$key.' '.escapeshellarg($value);
            }
        }

        return $flags;
    }
1192003
public function toArray()
    {
        return [
            'required'      => $this->isRequired(),
            'hidden'        => $this->isHidden(),
            'persistent'    => $this->isPersistent(),
            'whenReplicate' => $this->getWhenReplicate()->toArray(),
            'whenPatch'     => $this->getWhenPatch()->toArray(),
        ];
    }
1139896
public function toArray()
    {
        $result = [];
        foreach ($this as $key => $value) {
            $result[$key] = $value;
        }
        return $result;
    }
1362045
public function toArray()
    {
        return [
            'folderId' => $this->folder->getId(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
580619
public function toArray()
    {
        return [
            'sType'      => $this->sType,
            'aTo'        => array_filter(array_unique($this->aTo)),
            'aCc'        => array_filter(array_unique($this->aCc)),
            'aBcc'       => array_filter(array_unique($this->aBcc)),
            'sFromName'  => $this->sFromName,
            'sFromEmail' => $this->sFromEmail,
            'sSubject'   => $this->sSubject,
            'aData'      => $this->aData,
        ];
    }
502625
public function getUserFlags() : array
    {
        if ($this->flags !== null) {
            return $this->flags;
        }

        $this->flags = [];
        $usergroups = $this->usergroups;

        foreach ($usergroups as $usergroup) {
            $group = $usergroup->group;
            $flags = $group->flags;

            if (!empty($flags)) {
                $this->flags = array_merge($this->flags, $flags);
            }
        }

        return $this->flags;
    }
1149424
public function toArray()
    {
        return array(
            'e' => $this->entity,
            'r' => $this->reference,
            'v' => $this->value,
            'k' => $this->authorizationKey,
            's' => $this->status,
            't_key' => $this->key,
        );
    }
778341
public function toArray()
    {
        return array(

            'callableName'             => $this->callableName,
            'methodName'               => $this->methodName,
            'realCallableName'         => $this->realCallableName,
            'jobPrefix'                => $this->jobPrefix,
            'realCallableNameNoPrefix' => $this->realCallableNameNoPrefix,
            'description'              => $this->description,
            'iterations'               => $this->iterations,
            'minimumExecutionTime'     => $this->minimumExecutionTime,
            'timeout'                  => $this->timeout,
            'servers'                  => $this->servers,
            'defaultMethod'            => $this->defaultMethod,
        );
    }
19753
public function toArray(): array
    {
        return [
            'id'                => $this->id,
            'text'              => $this->text,
            'lang'              => $this->lang,
            'created_at'        => $this->createdAt,
            'geo'               => $this->geo,
            'coordinates'       => $this->coordinates,
            'places'            => $this->places,
            'retweet_count'     => $this->retweetCount,
            'favorite_count'    => $this->favoriteCount,
            'entities'          => $this->entities,
            'extended_entities' => $this->extendedEntities,
            'user'              => $this->user
        ];
    }
584026
public function toArray()
    {
        return [
            $this->id,
            $this->filterName,
            $this->operator,
            serialize($this->value),
        ];
    }
1091612
public function toArray()
    {
        return [
            'name'     => $this->getName(),
            'label'    => $this->getLabel(),
            'width'    => $this->getWidth(),
            'fixed'    => $this->isFixed(),
            'minWidth' => $this->getMinWidth(),
            'sortable' => $this->getSortable(),
            'type'     => $this->getType(),
        ];
    }