PHP 8.3.31
Preview: TranslatorImmutable.php Size: 2.35 KB
/home/getspomw/royalsquad.us/vendor/nesbot/carbon/src/Carbon/TranslatorImmutable.php

<?php

declare(strict_types=1);

/**
 * This file is part of the Carbon package.
 *
 * (c) Brian Nesbitt <brian@nesbot.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Carbon;

use Carbon\Exceptions\ImmutableException;
use Symfony\Component\Config\ConfigCacheFactoryInterface;
use Symfony\Component\Translation\Formatter\MessageFormatterInterface;

class TranslatorImmutable extends Translator
{
    private bool $constructed = false;

    public function __construct($locale, ?MessageFormatterInterface $formatter = null, $cacheDir = null, $debug = false)
    {
        parent::__construct($locale, $formatter, $cacheDir, $debug);
        $this->constructed = true;
    }

    /**
     * @codeCoverageIgnore
     */
    public function setDirectories(array $directories): static
    {
        $this->disallowMutation(__METHOD__);

        return parent::setDirectories($directories);
    }

    public function setLocale($locale): void
    {
        $this->disallowMutation(__METHOD__);

        parent::setLocale($locale);
    }

    /**
     * @codeCoverageIgnore
     */
    public function setMessages(string $locale, array $messages): static
    {
        $this->disallowMutation(__METHOD__);

        return parent::setMessages($locale, $messages);
    }

    /**
     * @codeCoverageIgnore
     */
    public function setTranslations(array $messages): static
    {
        $this->disallowMutation(__METHOD__);

        return parent::setTranslations($messages);
    }

    /**
     * @codeCoverageIgnore
     */
    public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory): void
    {
        $this->disallowMutation(__METHOD__);

        parent::setConfigCacheFactory($configCacheFactory);
    }

    public function resetMessages(?string $locale = null): bool
    {
        $this->disallowMutation(__METHOD__);

        return parent::resetMessages($locale);
    }

    /**
     * @codeCoverageIgnore
     */
    public function setFallbackLocales(array $locales): void
    {
        $this->disallowMutation(__METHOD__);

        parent::setFallbackLocales($locales);
    }

    private function disallowMutation($method)
    {
        if ($this->constructed) {
            throw new ImmutableException($method.' not allowed on '.static::class);
        }
    }
}

Directory Contents

Dirs: 8 × Files: 21

Name Size Perms Modified Actions
Cli DIR
- drwxrwxrwx 2025-09-17 06:53:16
Edit Download
- drwxrwxrwx 2026-04-21 08:55:54
Edit Download
Lang DIR
- drwxrwxrwx 2025-09-17 06:53:16
Edit Download
Laravel DIR
- drwxrwxrwx 2026-04-22 18:10:15
Edit Download
List DIR
- drwxrwxrwx 2025-09-17 06:53:16
Edit Download
- drwxrwxrwx 2025-09-17 06:53:16
Edit Download
PHPStan DIR
- drwxrwxrwx 2026-04-21 16:07:18
Edit Download
Traits DIR
- drwxrwxrwx 2025-09-17 06:53:17
Edit Download
11.10 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
3.05 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
156.66 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
443 B lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
157.70 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
306.58 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
116.53 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
84.15 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
856 B lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
8.91 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
10.81 KB lrw-r--r-- 2026-04-26 10:16:59
Edit Download
44.47 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
24.28 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
6.42 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
2.49 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
833 B lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
2.35 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
577 B lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
3.32 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
2.10 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download
5.09 KB lrw-rw-rw- 2025-09-17 06:53:13
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).