Convert a raw array taken from `SystemRequirements::getSystemInfo` into a format described in
`getModuleStateMap`.

@return array
198963
private function convertFromSystemRequirementsInfo()
    {
        $moduleStateMap = [];

        $iteration = SystemRequirements::iterateThroughSystemRequirementsInfo($this->systemRequirementsInfo);
        foreach ($iteration as list($groupId, $moduleId, $moduleState)) {
            $moduleStateMap[$groupId][] = [
                self::MODULE_ID_KEY => $moduleId,
                self::MODULE_STATE_KEY => $moduleState,
            ];
        }

        return $moduleStateMap;
    }
179783
protected function obtainAppSystemList(): array
    {
        $appSystemNS = '\BFW\Core\AppSystems\\';
        
        return [
            'options'        => $appSystemNS.'Options',
            'constants'      => $appSystemNS.'Constants',
            'composerLoader' => $appSystemNS.'ComposerLoader',
            'subjectList'    => $appSystemNS.'SubjectList',
            'config'         => $appSystemNS.'Config',
            'monolog'        => $appSystemNS.'Monolog',
            'request'        => $appSystemNS.'Request',
            'session'        => $appSystemNS.'Session',
            'errors'         => $appSystemNS.'Errors',
            'memcached'      => $appSystemNS.'Memcached',
            'moduleList'     => $appSystemNS.'ModuleList',
            'ctrlRouterLink' => $appSystemNS.'CtrlRouterLink'
        ];
    }
1341141
public function toArray() {

        $output = [];

        ArrayHelper::set($output, "href", $this->href, [null]);
        ArrayHelper::set($output, "icon", $this->icon, [null]);
        ArrayHelper::set($output, "span", $this->getId(), [null]);

        if (0 < $this->size()) {
            $output["subitems"] = [];
            foreach ($this->getNodes() as $current) {
                if (false === ($current instanceof NavigationItem)) {
                    continue;
                }
                $output["subitems"][] = $current->toArray();
            }
        }

        return $output;
    }
946339
public function toArray()
    {
        $messages = [];
        $receivers = [];

        /** @var ShortMessage $shortMessage */
        foreach ($this->items as $shortMessage) {
            $messages[] = $shortMessage->body();
            $receivers[] = $shortMessage->receiversString();
        }

        return [
            'Msisdns'        => implode('|', $receivers),
            'Messages'       => implode('|', $messages),
        ];
    }
815498
public function toArray()
    {
        $result = [];

        if (!empty($this->name) && empty($this->version)) {
            return $this->name;
        }

        if (!empty($this->name)) {
            $result['name'] = $this->name;
        }

        if (!empty($this->version)) {
            $result['version'] = $this->version->toArray();
        }

        return $result;
    }
376010
public function toArray()
    {
        $result     = parent::toArray();

        $result['locationX']    = $this->locationX;
        $result['locationY']    = $this->locationY;
        $result['scale']        = $this->scale;
        $result['label']        = $this->label;

        return $result;
    }
886858
public function toState()
    {
        $state = [];
        foreach ($this->getErrors() as $error) {
            $state[$error->getName()] = [];
            foreach ($error->getErrors() as $violation) {
                $state[$error->getName()][] = [
                    'path' => $violation->getPropertyPath(),
                    'message' => $violation->getMessage(),
                    'code' => $violation->getCode(),
                ];
            }
        }

        return $state;
    }
652278
public function toArray()
    {
        $headers = $this->headers;

        if ($headers === null) {
            $headers = [];
        }

        if ($this->contentType !== null) {
            $headers["content-type"] = $this->contentType;
        }

        if ($this->contentEncoding !== null) {
            $headers["content-encoding"] = $this->contentEncoding;
        }

        if ($this->deliveryMode !== null) {
            $headers["delivery-mode"] = $this->deliveryMode;
        }

        if ($this->priority !== null) {
            $headers["priority"] = $this->priority;
        }

        if ($this->correlationId !== null) {
            $headers["correlation-id"] = $this->correlationId;
        }

        if ($this->replyTo !== null) {
            $headers["reply-to"] = $this->replyTo;
        }

        if ($this->expiration !== null) {
            $headers["expiration"] = $this->expiration;
        }

        if ($this->messageId !== null) {
            $headers["message-id"] = $this->messageId;
        }

        if ($this->timestamp !== null) {
            $headers["timestamp"] = $this->timestamp;
        }

        if ($this->typeHeader !== null) {
            $headers["type"] = $this->typeHeader;
        }

        if ($this->userId !== null) {
            $headers["user-id"] = $this->userId;
        }

        if ($this->appId !== null) {
            $headers["app-id"] = $this->appId;
        }

        if ($this->clusterId !== null) {
            $headers["cluster-id"] = $this->clusterId;
        }

        return $headers;
    }
1299716
protected function getModuleInfo(): array
    {
        if ($this->moduleInfo === null) {
            $this->moduleInfo = $this->package()->getExtra()['module'] ?? [];
        }

        return $this->moduleInfo;
    }
79477
public function toArray()
    {
        $res = [];
        foreach ([
            'id',
            'displayTitle',
            'street',
            'number',
            'code',
            'town',
            'country',
            'longitude',
            'latitude',
        ] as $propertyName) {
            $res[$propertyName] = $this->{'get' . ucfirst($propertyName)}();
        }

        $res['name'] = TextUtils::truncate($this->getDisplayTitle(), 75);

        return $res;
    }
1203478
public function toArray()
    {
        $commands = array();

        $maybeAppend = function ($command) use (&$commands) {
            if ($command) $commands []= (string) $command;
        };

        if ($this->metadataOnly) {
            $commands []= 'meta';
        }

        $maybeAppend($this->trim);
        $maybeAppend($this->crop);
        $maybeAppend($this->resize);
        $maybeAppend($this->halign);
        $maybeAppend($this->valign);

        if ($this->smartCrop) {
            $commands []= 'smart';
        }

        if (count($this->filters)) {
            $filters = 'filters:' . implode(':', $this->filters);
            $commands []= $filters;
        }

        return $commands;
    }
298988
protected function obtainAppSystemList(): array
    {
        $appSystemList = parent::obtainAppSystemList();
        
        //Remove not used systems
        unset(
            $appSystemList['request'],
            $appSystemList['session'],
            $appSystemList['errors'],
            $appSystemList['ctrlRouterLink']
        );
        
        $appSystemNS = '\BFW\Install\Core\AppSystems\\';
        
        //Change ModuleList class
        $appSystemList['moduleList'] = $appSystemNS.'ModuleList';
        
        //Add new system : module installation system
        $appSystemList['moduleInstall'] = $appSystemNS.'ModuleInstall';
        
        return $appSystemList;
    }
1209882
public function toArray()
	{
		$result = parent::toArray();

		if (isset($result['activated']))
		{
			$result['activated'] = $this->getActivatedAttribute($result['activated']);
		}
		if (isset($result['permissions']))
		{
			$result['permissions'] = $this->getPermissionsAttribute($result['permissions']);
		}
		if (isset($result['suspended_at']))
		{
			$result['suspended_at'] = $result['suspended_at']->format('Y-m-d H:i:s');
		}

		return $result;
	}
178938
public function getMetaData()
    {
        if (count($this->command) == 0) {
            return ['console' => [
                'Command' => 'Command could not be retrieved', ],
            ];
        }
        $commandString = implode(' ', $this->command);
        $primaryCommand = $this->command[0];
        $arguments = [];
        $options = [];
        foreach (array_slice($this->command, 1) as $arg) {
            if (isset($arg[0]) && $arg[0] === '-') {
                $options[] = $arg;
            } else {
                $arguments[] = $arg;
            }
        }
        $data = [
            'Input' => $commandString,
            'Command' => $primaryCommand,
            'Arguments' => $arguments,
            'Options' => $options,
        ];

        return ['console' => $data];
    }
1277841
public function getUnitSystems()
    {
        for ($i = 2; $i <= 3; $i++) {
            $unitSystems[$i] = LocalizationUtility::translate(
                'tx_gomapsext_domain_model_map.unit_system.' . $i,
                'go_maps_ext'
            );
        }

        return $unitSystems;
    }
611767
public function toArray(): array
    {
        return [
            'time_low'                  => $this->timeLow,
            'time_mid'                  => $this->timeMid,
            'time_hi_and_version'       => $this->timeHiAndVersion,
            'clock_seq_hi_and_reserved' => $this->clockSeqHiAndReserved,
            'clock_seq_low'             => $this->clockSeqLow,
            'node'                      => $this->node
        ];
    }
1132034
public function __toArray()
    {
        $result = [];
        if ($this->status !== null) {
            $result['status'] = $this->status;
        }
        if ($this->code !== null) {
            $result['code'] = $this->code;
        }
        if ($this->title !== null) {
            $result['title'] = $this->title;
        }
        return $result;
    }