HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/limestate-admin/app/Repositories/DictionaryRepository.php
<?php

declare(strict_types=1);

namespace App\Repositories;

class DictionaryRepository
{

    const CATEGORY_ELITE = 1;
    const CATEGORY_SECONDARY = 2;

    public static array $categories = [
        self::CATEGORY_ELITE => 'Элитная недвижимость',
        self::CATEGORY_SECONDARY => 'Вторичная недвижимость',
    ];

    const STREET_TYPE_STREET = 1; // Улица
    const STREET_TYPE_AVENUE = 2; // Проспект
    const STREET_TYPE_LANE = 3; // Переулок
    const STREET_TYPE_SQUARE = 4; // Площадь
    const STREET_TYPE_EMBANKMENT = 5; // Набережная
    const STREET_TYPE_LINE = 6; // Линия
    const STREET_TYPE_HIGHWAY = 7; // Шоссе
    const STREET_TYPE_ROAD = 8; // Дорога
    const STREET_TYPE_DIRECTIONS = 9; // Проезд
    const STREET_TYPE_BOULEVARD = 10; // Бульвар
    const STREET_TYPE_ALLEY = 11; // Аллея
    const STREET_TYPE_CHANNEL = 12; // Канал

    public static array $streetTypes = [
        self::STREET_TYPE_STREET => 'ул.',
        self::STREET_TYPE_AVENUE => 'пр-кт',
        self::STREET_TYPE_LANE => 'пер.',
        self::STREET_TYPE_SQUARE => 'пл.',
        self::STREET_TYPE_EMBANKMENT => 'наб.',
        self::STREET_TYPE_LINE => 'линия',
        self::STREET_TYPE_HIGHWAY => 'шоссе',
        self::STREET_TYPE_ROAD => 'дор.',
        self::STREET_TYPE_DIRECTIONS => 'проезд',
        self::STREET_TYPE_BOULEVARD => 'бульвар',
        self::STREET_TYPE_ALLEY => 'аллея',
        self::STREET_TYPE_CHANNEL => 'канал',
    ];

    public static array $finishingTypes = [
        1 => 'Под ключ',
        2 => 'Подготовка под отделку',
        3 => 'Под заказ',
        4 => 'Без отделки',
    ];

    public static array $houseTypes = [
        1 => 'Панельно-монолитный',
        2 => 'Монолитный',
        3 => 'Кирпично-монолитный',
    ];

    public static array $bathroomTypes = [
        1 => ['name' => 'Раздельный', 'variations' => ['Р', 'Раздельный']],
        2 => ['name' => '2 санузла', 'variations' => ['2']],
        3 => ['name' => '3 санузла', 'variations' => ['3']],
        4 => ['name' => '4 санузла', 'variations' => ['4']],
        5 => ['name' => '5 санузлов', 'variations' => ['5']],
        6 => ['name' => '6 санузлов', 'variations' => ['6']],
        7 => ['name' => 'Совмещённый', 'variations' => ['С', 'Совмещённый']],
    ];

    public static function getBathroomTypes(): array
    {
        $res = [];
        foreach (self::$bathroomTypes as $key => $bathroomType) {
            $res[$key] = $bathroomType['name'];
        }

        return $res;
    }

    public static array $balconyTypes = [
        1 => ['name' => 'Балкон', 'variations' => ['Б', 'Балкон']],
        2 => ['name' => 'Лоджия', 'variations' => ['Л', 'Лоджия']],
        3 => ['name' => '2 Лоджии', 'variations' => ['2Л']],
        4 => ['name' => 'Лоджия и балкон', 'variations' => ['ЛБ', 'БЛ']],
        5 => ['name' => 'ТБ', 'variations' => ['ТБ']],
        6 => ['name' => '3БТ', 'variations' => ['3БТ']],
    ];

    public static function getBalconyTypes(): array
    {
        $res = [];
        foreach (self::$balconyTypes as $key => $balconyType) {
            $res[$key] = $balconyType['name'];
        }

        return $res;
    }

    public static function getFirstBalconyTypeVariation(int $balconyTypeId): ?string
    {
        return self::$balconyTypes[$balconyTypeId]['variations'][0] ?? null;
    }

}