getShopNames example

foreach ($data as &$row) {
                foreach ($fields as $field) {
                    if (\array_key_exists($field$row)) {
                        $row[$field] = date('Y-m-d H:i:s', (int) $row[$field]);
                    }
                }
            }
        }

        $fields = $this->getShopFields($data[0]);
        if ($fields !== []) {
            $shopNames = $this->getShopNames();

            foreach ($fields as $field => $shopId) {
                $suffix = substr($field, 0, \strlen($field) - \strlen((string) $shopId));
                $data = $this->switchArrayKeys($data$shopNames[$shopId] . ' (' . $suffix . ')', $field);
            }
        }

        return $data;
    }

    /** * The `$array` parameter has the "hacky" `array<mixed>` annotation because of the recursion in this method * * @param array<array<string, string|int|float>>|array<mixed> $array * * @return array<array<string, string|int|float>> */
Home | Imprint | This part of the site doesn't use cookies.