Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

/* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony..

Decoded Output download

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Translation\Bridge\Phrase\Tests;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpClient\HttpClientTrait;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Translation\Bridge\Phrase\PhraseProvider;
use Symfony\Component\Translation\Dumper\XliffFileDumper;
use Symfony\Component\Translation\Exception\ProviderExceptionInterface;
use Symfony\Component\Translation\Loader\LoaderInterface;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\Provider\ProviderInterface;
use Symfony\Component\Translation\TranslatorBag;
use Symfony\Contracts\HttpClient\ResponseInterface;

/**
 * @author wicliff <[email protected]>
 */
class PhraseProviderTest extends TestCase
{
    use HttpClientTrait {
        mergeQueryString as public;
    }

    private MockHttpClient $httpClient;
    private MockObject&LoggerInterface $logger;
    private MockObject&LoaderInterface $loader;
    private MockObject&XliffFileDumper $xliffFileDumper;
    private MockObject&CacheItemPoolInterface $cache;
    private string $defaultLocale;
    private string $endpoint;
    private array $readConfig;
    private array $writeConfig;

    /**
     * @dataProvider toStringProvider
     */
    public function testToString(ProviderInterface $provider, string $expected)
    {
        self::assertSame($expected, (string) $provider);
    }

    /**
     * @dataProvider readProvider
     */
    public function testRead(string $locale, string $localeId, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
    {
        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(false);

        $item
            ->expects(self::once())
            ->method('set')
            ->with(self::callback(function ($item) use ($responseContent) {
                $this->assertSame('W/"625d11cf081b1697cbc216edf6ebb13c"', $item['etag']);
                $this->assertSame('Wed, 28 Dec 2022 13:16:45 GMT', $item['modified']);
                $this->assertSame($responseContent, $item['content']);

                return true;
            }));

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->with(self::callback(function ($v) use ($locale, $domain) {
                $this->assertStringStartsWith($locale.'.'.$domain.'.', $v);

                return true;
            }))
            ->willReturn($item);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => $this->getDownloadLocaleResponseMock($domain, $localeId, $responseContent),
        ];

        $this->getLoader()
            ->expects($this->once())
            ->method('load')
            ->willReturn($expectedTranslatorBag->getCatalogue($locale));

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $translatorBag = $provider->read([$domain], [$locale]);

        $this->assertSame($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
    }

    /**
     * @dataProvider readProvider
     */
    public function testReadCached(string $locale, string $localeId, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
    {
        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(true);

        $cachedResponse = ['etag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"', 'modified' => 'Wed, 28 Dec 2022 13:16:45 GMT', 'content' => $responseContent];
        $item->expects(self::once())->method('get')->willReturn($cachedResponse);

        $item
            ->expects(self::once())
            ->method('set')
            ->with(self::callback(function ($item) use ($responseContent) {
                $this->assertSame('W/"625d11cf081b1697cbc216edf6ebb13c"', $item['etag']);
                $this->assertSame('Wed, 28 Dec 2022 13:16:45 GMT', $item['modified']);
                $this->assertSame($responseContent, $item['content']);

                return true;
            }));

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->with(self::callback(function ($v) use ($locale, $domain) {
                $this->assertStringStartsWith($locale.'.'.$domain.'.', $v);

                return true;
            }))
            ->willReturn($item);

        $this->getCache()
            ->expects(self::once())
            ->method('save')
            ->with($item);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function (string $method, string $url, array $options = []): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertContains('If-None-Match: W/"625d11cf081b1697cbc216edf6ebb13c"', $options['headers']);

                return new MockResponse('', ['http_code' => 304, 'response_headers' => [
                    'ETag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"',
                    'Last-Modified' => 'Wed, 28 Dec 2022 13:16:45 GMT',
                ]]);
            },
        ];

        $this->getLoader()
            ->expects($this->once())
            ->method('load')
            ->willReturn($expectedTranslatorBag->getCatalogue($locale));

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $translatorBag = $provider->read([$domain], [$locale]);

        $this->assertSame($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
    }

    public function testReadFallbackLocale()
    {
        $locale = 'en_GB';
        $domain = 'messages';

        $bag = new TranslatorBag();
        $catalogue = new MessageCatalogue('en_GB', [
            'general.back' => 'back  {{ placeholder }} </rant >',
            'general.cancel' => 'Cancel',
        ]);

        $catalogue->setMetadata('general.back', [
            'notes' => [
                'this should have a cdata section',
            ],
            'target-attributes' => [
                'state' => 'signed-off',
            ],
        ]);

        $catalogue->setMetadata('general.cancel', [
            'target-attributes' => [
                'state' => 'translated',
            ],
        ]);

        $bag->addCatalogue($catalogue);

        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(false);
        $item->expects(self::never())->method('set');

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->with(self::callback(function ($v) use ($locale, $domain) {
                $this->assertStringStartsWith($locale.'.'.$domain.'.', $v);

                return true;
            }))
            ->willReturn($item);

        $this->getCache()->expects(self::never())->method('save');
        $this->getLoader()->expects($this->once())->method('load')->willReturn($bag->getCatalogue($locale));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function (string $method, string $url, array $options): ResponseInterface {
                $localeId = '13604ec993beefcdaba732812cdb828c';
                $query = [
                    'file_format' => 'symfony_xliff',
                    'include_empty_translations' => '1',
                    'tags' => 'messages',
                    'format_options' => [
                        'enclose_in_cdata' => '1',
                    ],
                    'fallback_locale_id' => 'de',
                ];

                $queryString = $this->mergeQueryString(null, $query, true);

                $this->assertSame('GET', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales/'.$localeId.'/download?'.$queryString, $url);
                $this->assertNotContains('If-None-Match: W/"625d11cf081b1697cbc216edf6ebb13c"', $options['headers']);
                $this->assertArrayHasKey('query', $options);
                $this->assertSame($query, $options['query']);

                return new MockResponse();
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2', isFallbackLocaleEnabled: true);

        $provider->read([$domain], [$locale]);
    }

    /**
     * @dataProvider cacheKeyProvider
     */
    public function testCacheKeyOptionsSort(array $options, string $expectedKey)
    {
        $this->getCache()->expects(self::once())->method('getItem')->with($expectedKey);
        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function (string $method): ResponseInterface {
                $this->assertSame('GET', $method);

                return new MockResponse('', ['http_code' => 200, 'response_headers' => [
                    'ETag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"',
                    'Last-Modified' => 'Wed, 28 Dec 2022 13:16:45 GMT',
                ]]);
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['en_GB']);
    }

    /**
     * @dataProvider cacheItemProvider
     */
    public function testGetCacheItem(mixed $cachedValue, bool $hasMatchHeader)
    {
        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(true);
        $item->method('get')->willReturn($cachedValue);

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->willReturn($item);

        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function ($method, $url, $options) use ($hasMatchHeader) {
                if ($hasMatchHeader) {
                    $this->assertArrayHasKey('if-none-match', $options['normalized_headers']);
                } else {
                    $this->assertArrayNotHasKey('if-none-match', $options['normalized_headers']);
                }

                return new MockResponse('', ['http_code' => 200, 'response_headers' => [
                    'ETag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"',
                    'Last-Modified' => 'Wed, 28 Dec 2022 13:16:45 GMT',
                ]]);
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['en_GB']);
    }

    public function cacheItemProvider(): \Generator
    {
        yield 'null value' => [
            'cached_value' => null,
            'has_header' => false,
        ];

        $item = ['etag' => 'W\Foo', 'modified' => 'foo', 'content' => 'bar'];

        yield 'correct value' => [
            'cached_value' => $item,
            'has_header' => true,
        ];
    }

    public function cacheKeyProvider(): \Generator
    {
        yield 'sortorder one' => [
            'options' => [
                'file_format' => 'symfony_xliff',
                'include_empty_translations' => '1',
                'tags' => [],
                'format_options' => [
                    'enclose_in_cdata' => '1',
                ],
            ],
            'expected_key' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
        ];

        yield 'sortorder two' => [
            'options' => [
                'include_empty_translations' => '1',
                'file_format' => 'symfony_xliff',
                'format_options' => [
                    'enclose_in_cdata' => '1',
                ],
                'tags' => [],
            ],
            'expected_key' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
        ];
    }

    /**
     * @dataProvider readProviderExceptionsProvider
     */
    public function testReadProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'provider error' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->read(['messages'], ['en_GB']);
    }

    /**
     * @dataProvider initLocalesExceptionsProvider
     */
    public function testInitLocalesExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'init locales' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->read(['messages'], ['en_GB']);
    }

    public function testInitLocalesPaginated()
    {
        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales page 1' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales?per_page=100&page=1', $url);

                return new JsonMockResponse([
                    [
                        'id' => '5fea6ed5c21767730918a9400e420832',
                        'name' => 'de',
                        'code' => 'de',
                        'fallback_locale' => null,
                    ],
                ], [
                    'http_code' => 200,
                    'response_headers' => [
                        'pagination' => '{"total_count":31,"current_page":1,"current_per_page":25,"previous_page":null,"next_page":2}',
                    ],
                ]);
            },
            'init locales page 2' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales?per_page=100&page=2', $url);

                return new JsonMockResponse([
                    [
                        'id' => '5fea6ed5c21767730918a9400e420832',
                        'name' => 'de',
                        'code' => 'de',
                        'fallback_locale' => null,
                    ],
                ], [
                    'http_code' => 200,
                    'response_headers' => [
                        'pagination' => '{"total_count":31,"current_page":2,"current_per_page":25,"previous_page":null,"next_page":null}',
                    ],
                ]);
            },
            'download locale' => $this->getDownloadLocaleResponseMock('messages', '5fea6ed5c21767730918a9400e420832', ''),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['de']);
    }

    public function testCreateUnknownLocale()
    {
        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'create locale' => function (string $method, string $url, array $options = []): ResponseInterface {
                $this->assertSame('POST', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales', $url);
                $this->assertSame('Content-Type: application/x-www-form-urlencoded', $options['normalized_headers']['content-type'][0]);
                $this->assertArrayHasKey('body', $options);
                $this->assertSame('name=nl-NL&code=nl-NL&default=0', $options['body']);

                return new JsonMockResponse([
                    'id' => 'zWlsCvkeSK0EBgBVmGpZ4cySWbQ0s1Dk4',
                    'name' => 'nl-NL',
                    'code' => 'nl-NL',
                    'fallback_locale' => null,
                ], ['http_code' => 201]);
            },
            'download locale' => $this->getDownloadLocaleResponseMock('messages', 'zWlsCvkeSK0EBgBVmGpZ4cySWbQ0s1Dk4', ''),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['nl_NL']);
    }

    /**
     * @dataProvider createLocalesExceptionsProvider
     */
    public function testCreateLocaleExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'provider error' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->read(['messages'], ['nl_NL']);
    }

    public function testDelete()
    {
        $bag = new TranslatorBag();
        $bag->addCatalogue(new MessageCatalogue('en_GB', [
            'validators' => [],
            'messages' => [
                'delete this,erroneous:key' => 'translated value',
            ],
        ]));

        $bag->addCatalogue(new MessageCatalogue('de', [
            'validators' => [],
            'messages' => [
                'another:erroneous:key' => 'value to delete',
                'delete this,erroneous:key' => 'translated value',
            ],
        ]));

        $responses = [
            'delete key one' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('DELETE', $method);
                $queryString = $this->mergeQueryString(null, ['q' => 'name:delete\\ this\\,erroneous\\:key'], true);

                $this->assertSame('https://api.phrase.com/api/v2/projects/1/keys?'.$queryString, $url);

                return new MockResponse('', [
                    'http_code' => 200,
                ]);
            },
            'delete key two' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('DELETE', $method);
                $queryString = $this->mergeQueryString(null, ['q' => 'name:another\\:erroneous\\:key'], true);

                $this->assertSame('https://api.phrase.com/api/v2/projects/1/keys?'.$queryString, $url);

                return new MockResponse('', [
                    'http_code' => 200,
                ]);
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->delete($bag);
    }

    /**
     * @dataProvider deleteExceptionsProvider
     */
    public function testDeleteProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'provider error' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $bag = new TranslatorBag();
        $bag->addCatalogue(new MessageCatalogue('en_GB', [
            'messages' => [
                'key.to.delete' => 'translated value',
            ],
        ]));

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->delete($bag);
    }

    /**
     * @dataProvider writeProvider
     */
    public function testWrite(string $locale, string $localeId, string $domain, string $content, TranslatorBag $bag)
    {
        $this->getWriteConfig($domain, $localeId);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'upload file' => function (string $method, string $url, array $options = []) use ($domain, $locale, $localeId, $content): ResponseInterface {
                $this->assertSame('POST', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/uploads', $url);

                $testedFileFormat = $testedFileName = $testedContent = $testedLocaleId = $testedTags = $testedUpdateTranslations = false;

                do {
                    $part = $options['body']();

                    if (strpos($part, 'file_format')) {
                        $options['body']();
                        $this->assertSame('symfony_xliff', $options['body']());
                        $testedFileFormat = true;
                    }
                    if (preg_match('/filename="([^"]+)/', $part, $matches)) {
                        $this->assertStringEndsWith($domain.'-'.$locale.'.xlf', $matches[1]);
                        $testedFileName = true;
                    }

                    if (str_starts_with($part, '<? xmlbase64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U3RyaW5nTWF0Y2hlc0Zvcm1hdCgkY29udGVudCwgJHBhcnQpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGVzdGVkQ29udGVudCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZiAoc3RycG9zKCRwYXJ0LCA=')locale_idbase64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkb3B0aW9uc1s=')bodybase64_decode('XSgpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U2FtZSgkbG9jYWxlSWQsICRvcHRpb25zWw==')bodybase64_decode('XSgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRlc3RlZExvY2FsZUlkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmIChzdHJwb3MoJHBhcnQsIA==')name=base64_decode('dGFncw==')base64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkb3B0aW9uc1s=')bodybase64_decode('XSgpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U2FtZSgkZG9tYWluLCAkb3B0aW9uc1s=')bodybase64_decode('XSgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRlc3RlZFRhZ3MgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgaWYgKHN0cnBvcygkcGFydCwg')name=base64_decode('dXBkYXRlX3RyYW5zbGF0aW9ucw==')base64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkb3B0aW9uc1s=')bodybase64_decode('XSgpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U2FtZSg=')1base64_decode('LCAkb3B0aW9uc1s=')bodybase64_decode('XSgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRlc3RlZFVwZGF0ZVRyYW5zbGF0aW9ucyA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSB3aGlsZSAo')base64_decode('ICE9PSAkcGFydCk7CgogICAgICAgICAgICAgICAgJHRoaXMtPmFzc2VydFRydWUoJHRlc3RlZEZpbGVGb3JtYXQpOwogICAgICAgICAgICAgICAgJHRoaXMtPmFzc2VydFRydWUoJHRlc3RlZEZpbGVOYW1lKTsKICAgICAgICAgICAgICAgICR0aGlzLT5hc3NlcnRUcnVlKCR0ZXN0ZWRDb250ZW50KTsKICAgICAgICAgICAgICAgICR0aGlzLT5hc3NlcnRUcnVlKCR0ZXN0ZWRMb2NhbGVJZCk7CiAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0VHJ1ZSgkdGVzdGVkVGFncyk7CiAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0VHJ1ZSgkdGVzdGVkVXBkYXRlVHJhbnNsYXRpb25zKTsKCiAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U3RyaW5nU3RhcnRzV2l0aCg=')Content-Type:multipart/form-database64_decode('LCAkb3B0aW9uc1s=')normalized_headersbase64_decode('XVs=')content-typebase64_decode('XVswXSk7CgogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBNb2NrUmVzcG9uc2Uo')successbase64_decode('LCBb')http_codebase64_decode('ID0+IDIwMV0pOwogICAgICAgICAgICB9LAogICAgICAgIF07CgogICAgICAgICRwcm92aWRlciA9ICR0aGlzLT5jcmVhdGVQcm92aWRlcihodHRwQ2xpZW50OiAobmV3IE1vY2tIdHRwQ2xpZW50KCRyZXNwb25zZXMpKS0+d2l0aE9wdGlvbnMoWwogICAgICAgICAgICA=')base_uribase64_decode('ID0+IA==')https:base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnBocmFzZS5jb20vYXBpL3Yy'),dumper:new uoxo17());$muqm18->ycoj19($ddoq1a);}/**
     * @dataProvider writeExceptionsProvider
     */ public function ajcq0(int $jeiz1b,string $ytap1c,string $cykj1d){$this->zbknf()->uqxl1e(self::xxna1f())->ywna20(base64_decode('ZXJyb3I='))->fqgy21($cykj1d);$this->dkwq11()->ywna20(base64_decode('Zm9ybWF0Q2F0YWxvZ3Vl'))->qqwq22('');$wwmg23=[base64_decode('aW5pdCBsb2NhbGVz')=>$this->nmfsc(),base64_decode('cHJvdmlkZXIgZXJyb3I=')=>new xcdo24(base64_decode('cHJvdmlkZXIgZXJyb3I='),[base64_decode('aHR0cF9jb2Rl')=>$jeiz1b,base64_decode('cmVzcG9uc2VfaGVhZGVycw==')=>[base64_decode('eC1yYXRlLWxpbWl0LWxpbWl0')=>[base64_decode('MTAwMA==')],base64_decode('eC1yYXRlLWxpbWl0LXJlc2V0')=>[base64_decode('NjA=')],],]),];$muqm18=$this->mrmod(httpClient:(new wqlk25($wwmg23))->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvMS8='),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnBocmFzZS5jb20vYXBpL3Yy'));$ddoq1a=new oshv27();$ddoq1a->nzzi28(new odrt29(base64_decode('ZW5fR0I='),[base64_decode('bWVzc2FnZXM=')=>[base64_decode('a2V5LnRvLmRlbGV0ZQ==')=>base64_decode('dHJhbnNsYXRlZCB2YWx1ZQ=='),],]));$this->ujuh2a(ProviderExceptionInterface::class);$this->ofay2b(0);$this->zqxa2c($ytap1c);$muqm18->ycoj19($ddoq1a);}public function evte1():\Generator{$xhiy2d=<<<'XLIFF'
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="en-GB" target-language="en-GB" datatype="plaintext" original="file.ext">
    <header>
      <tool tool-id="symfony" tool-name="Symfony"/>
    </header>
    <body>
      <trans-unit id="%s" resname="general.back">
        <source>general.back</source>
        <target><![CDATA[back &!]]></target>
      </trans-unit>
      <trans-unit id="%s" resname="general.cancel">
        <source>general.cancel</source>
        <target>Cancel</target>
      </trans-unit>
    </body>
  </file>
</xliff>

XLIFF;$ddoq1a=new oshv27();$ddoq1a->nzzi28(new odrt29(base64_decode('ZW5fR0I='),[base64_decode('dmFsaWRhdG9ycw==')=>[],base64_decode('ZXhjZXB0aW9ucw==')=>[],base64_decode('bWVzc2FnZXM=')=>[base64_decode('Z2VuZXJhbC5iYWNr')=>base64_decode('YmFjayAmIQ=='),base64_decode('Z2VuZXJhbC5jYW5jZWw=')=>base64_decode('Q2FuY2Vs'),],]));yield base64_decode('ZW5nbGlzaCBtZXNzYWdlcw==')=>[base64_decode('bG9jYWxl')=>base64_decode('ZW5fR0I='),base64_decode('bG9jYWxlSWQ=')=>base64_decode('MTM2MDRlYzk5M2JlZWZjZGFiYTczMjgxMmNkYjgyOGM='),base64_decode('ZG9tYWlu')=>base64_decode('bWVzc2FnZXM='),base64_decode('cmVzcG9uc2VDb250ZW50')=>$xhiy2d,base64_decode('YmFn')=>$ddoq1a,];$eiza2e=<<<'XLIFF'
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="en-GB" target-language="de" datatype="plaintext" original="file.ext">
    <header>
      <tool tool-id="symfony" tool-name="Symfony"/>
    </header>
    <body>
      <trans-unit id="%s" resname="general.back">
        <source>general.back</source>
        <target>zurck</target>
      </trans-unit>
      <trans-unit id="%s" resname="general.cancel">
        <source>general.cancel</source>
        <target>Abbrechen</target>
      </trans-unit>
    </body>
  </file>
</xliff>

XLIFF;$ddoq1a=new oshv27();$ddoq1a->nzzi28(new odrt29(base64_decode('ZGU='),[base64_decode('dmFsaWRhdG9ycw==')=>[base64_decode('Z2VuZXJhbC5iYWNr')=>base64_decode('enVyw7xjaw=='),base64_decode('Z2VuZXJhbC5jYW5jZWw=')=>base64_decode('QWJicmVjaGVu'),],base64_decode('bWVzc2FnZXM=')=>[],]));yield base64_decode('Z2VybWFuIHZhbGlkYXRvcnM=')=>[base64_decode('bG9jYWxl')=>base64_decode('ZGU='),base64_decode('bG9jYWxlSWQ=')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('ZG9tYWlu')=>base64_decode('dmFsaWRhdG9ycw=='),base64_decode('cmVzcG9uc2VDb250ZW50')=>$eiza2e,base64_decode('YmFn')=>$ddoq1a,];}public function suun2():\Generator{yield base64_decode('ZGVmYXVsdCBlbmRwb2ludA==')=>[base64_decode('cHJvdmlkZXI=')=>$this->mrmod(httpClient:$this->sysfe()->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvUFJPSkVDVF9JRC8='),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],])),base64_decode('ZXhwZWN0ZWQ=')=>base64_decode('cGhyYXNlOi8vYXBpLnBocmFzZS5jb20='),];yield base64_decode('Y3VzdG9tIGVuZHBvaW50')=>[base64_decode('cHJvdmlkZXI=')=>$this->mrmod(httpClient:$this->sysfe()->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkudXMuYXBwLnBocmFzZS5jb20vYXBpL3YyL3Byb2plY3RzL1BST0pFQ1RfSUQv'),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnVzLmFwcC5waHJhc2UuY29t')),base64_decode('ZXhwZWN0ZWQ=')=>base64_decode('cGhyYXNlOi8vYXBpLnVzLmFwcC5waHJhc2UuY29t'),];yield base64_decode('Y3VzdG9tIGVuZHBvaW50IHdpdGggcG9ydA==')=>[base64_decode('cHJvdmlkZXI=')=>$this->mrmod(httpClient:$this->sysfe()->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkudXMuYXBwLnBocmFzZS5jb206ODA4MC9hcGkvdjIvcHJvamVjdHMvUFJPSkVDVF9JRC8='),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnVzLmFwcC5waHJhc2UuY29tOjgwODA=')),base64_decode('ZXhwZWN0ZWQ=')=>base64_decode('cGhyYXNlOi8vYXBpLnVzLmFwcC5waHJhc2UuY29tOjgwODA='),];}public function yhvl3():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGRlbGV0ZSBrZXkgaW4gcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIGRlbGV0ZSBrZXkgImtleS50by5kZWxldGUiIGluIHBocmFzZTogInByb3ZpZGVyIGVycm9yIi4='),statusCode:500);}public function wnwa4():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIHVwbG9hZCB0cmFuc2xhdGlvbnMgdG8gcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIHVwbG9hZCB0cmFuc2xhdGlvbnMgZm9yIGRvbWFpbiAibWVzc2FnZXMiIHRvIHBocmFzZTogInByb3ZpZGVyIGVycm9yIi4='));}public function stpt5():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGNyZWF0ZSBsb2NhbGUgcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIGNyZWF0ZSBsb2NhbGUgIm5sLU5MIiBpbiBwaHJhc2U6ICJwcm92aWRlciBlcnJvciIu'));}public function sazo6():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGdldCBsb2NhbGVzIGZyb20gcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIGdldCBsb2NhbGVzIGZyb20gcGhyYXNlOiAicHJvdmlkZXIgZXJyb3IiLg=='));}public function gtjp7():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGdldCB0cmFuc2xhdGlvbnMgZnJvbSBwaHJhc2Uu'),loggerMessage:base64_decode('VW5hYmxlIHRvIGdldCB0cmFuc2xhdGlvbnMgZm9yIGxvY2FsZSAiZW5fR0IiIGZyb20gcGhyYXNlOiAicHJvdmlkZXIgZXJyb3IiLg=='));}public function ljza8():\Generator{$ddoq1a=new oshv27();$cyey2f=new odrt29(base64_decode('ZW5fR0I='),[base64_decode('Z2VuZXJhbC5iYWNr')=>base64_decode('YmFjayAge3sgcGxhY2Vob2xkZXIgfX0gPC9yYW50ID4='),base64_decode('Z2VuZXJhbC5jYW5jZWw=')=>base64_decode('Q2FuY2Vs'),]);$cyey2f->rcec30(base64_decode('Z2VuZXJhbC5iYWNr'),[base64_decode('bm90ZXM=')=>[base64_decode('dGhpcyBzaG91bGQgaGF2ZSBhIGNkYXRhIHNlY3Rpb24='),],base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('c2lnbmVkLW9mZg=='),],]);$cyey2f->rcec30(base64_decode('Z2VuZXJhbC5jYW5jZWw='),[base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('dHJhbnNsYXRlZA=='),],]);$ddoq1a->nzzi28($cyey2f);yield[base64_decode('bG9jYWxl')=>base64_decode('ZW5fR0I='),base64_decode('bG9jYWxlX2lk')=>base64_decode('MTM2MDRlYzk5M2JlZWZjZGFiYTczMjgxMmNkYjgyOGM='),base64_decode('ZG9tYWlu')=>base64_decode('bWVzc2FnZXM='),base64_decode('Y29udGVudA==')=><<<'XLIFF'
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="global" datatype="plaintext" source-language="de" target-language="en-GB">
    <body>
      <trans-unit id="general.back" resname="general.back">
        <source xml:lang="de"><![CDATA[zurck </rant >]]></source>
        <target xml:lang="en" state="signed-off"><![CDATA[back  {{ placeholder }} </rant >]]></target>
        <note>this should have a cdata section</note>
      </trans-unit>
      <trans-unit id="general.cancel" resname="general.cancel">
        <source xml:lang="de">Abbrechen</source>
        <target xml:lang="en" state="translated">Cancel</target>
      </trans-unit>
    </body>
  </file>
</xliff>
XLIFF,base64_decode('ZXhwZWN0ZWQgYmFn')=>$ddoq1a,];$ddoq1a=new oshv27();$cyey2f=new odrt29(base64_decode('ZGU='),[base64_decode('QSBQSFAgZXh0ZW5zaW9uIGNhdXNlZCB0aGUgdXBsb2FkIHRvIGZhaWwu')=>base64_decode('RWluZSBQSFAtRXJ3ZWl0ZXJ1bmcgdmVyaGluZGVydGUgZGVuIFVwbG9hZC4='),base64_decode('QW4gZW1wdHkgZmlsZSBpcyBub3QgYWxsb3dlZC4=')=>base64_decode('RWluZSBsZWVyZSBEYXRlaSBpc3QgbmljaHQgZXJsYXVidC4='),]);$cyey2f->rcec30(base64_decode('QW4gZW1wdHkgZmlsZSBpcyBub3QgYWxsb3dlZC4='),[base64_decode('bm90ZXM=')=>[base64_decode('YmUgc3VyZSBub3QgdG8gYWxsb3cgYW4gZW1wdHkgZmlsZQ=='),],base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('c2lnbmVkLW9mZg=='),],]);$cyey2f->rcec30(base64_decode('QSBQSFAgZXh0ZW5zaW9uIGNhdXNlZCB0aGUgdXBsb2FkIHRvIGZhaWwu'),[base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('c2lnbmVkLW9mZg=='),],],base64_decode('dmFsaWRhdG9ycw=='));$ddoq1a->nzzi28($cyey2f);yield[base64_decode('bG9jYWxl')=>base64_decode('ZGU='),base64_decode('bG9jYWxlX2lk')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('ZG9tYWlu')=>base64_decode('dmFsaWRhdG9ycw=='),base64_decode('Y29udGVudA==')=><<<'XLIFF'
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="file.ext" datatype="plaintext" source-language="de" target-language="de">
    <body>
      <trans-unit id="A PHP extension caused the upload to fail." resname="A PHP extension caused the upload to fail.">
        <source xml:lang="de">Eine PHP-Erweiterung verhinderte den Upload.</source>
        <target xml:lang="de" state="signed-off">Eine PHP-Erweiterung verhinderte den Upload.</target>
      </trans-unit>
      <trans-unit id="An empty file is not allowed." resname="An empty file is not allowed.">
        <source xml:lang="de">Eine leere Datei ist nicht erlaubt.</source>
        <target xml:lang="de" state="signed-off">Eine leere Datei ist nicht erlaubt.</target>
        <note>be sure not to allow an empty file</note>
      </trans-unit>
    </body>
  </file>
</xliff>
XLIFF,base64_decode('ZXhwZWN0ZWQgYmFn')=>$ddoq1a,];}private function vwgz9(string $vzio31,string $mpur32,int $jeiz1b=400):array{return[base64_decode('YmFkIHJlcXVlc3Q=')=>[base64_decode('c3RhdHVzQ29kZQ==')=>$jeiz1b,base64_decode('ZXhjZXB0aW9uTWVzc2FnZQ==')=>$vzio31,base64_decode('bG9nZ2VyTWVzc2FnZQ==')=>$mpur32,],base64_decode('cmF0ZSBsaW1pdCBleGNlZWRlZA==')=>[base64_decode('c3RhdHVzQ29kZQ==')=>429,base64_decode('ZXhjZXB0aW9uTWVzc2FnZQ==')=>base64_decode('UmF0ZSBsaW1pdCBleGNlZWRlZCAoMTAwMCkuIHBsZWFzZSB3YWl0IDYwIHNlY29uZHMu'),base64_decode('bG9nZ2VyTWVzc2FnZQ==')=>$mpur32,],base64_decode('c2VydmVyIHVuYXZhaWxhYmxl')=>[base64_decode('c3RhdHVzQ29kZQ==')=>503,base64_decode('ZXhjZXB0aW9uTWVzc2FnZQ==')=>base64_decode('UHJvdmlkZXIgc2VydmVyIGVycm9yLg=='),base64_decode('bG9nZ2VyTWVzc2FnZQ==')=>$mpur32,],];}private function cnqha(string $eers33,string $wyzh34,string $ngew35):\Closure{return function(string $zbtb36,string $gvbr37,array$cqxh38)use($eers33,$wyzh34,$ngew35):ResponseInterface{$gqyk39=[base64_decode('ZmlsZV9mb3JtYXQ=')=>base64_decode('c3ltZm9ueV94bGlmZg=='),base64_decode('aW5jbHVkZV9lbXB0eV90cmFuc2xhdGlvbnM=')=>base64_decode('MQ=='),base64_decode('dGFncw==')=>$eers33,base64_decode('Zm9ybWF0X29wdGlvbnM=')=>[base64_decode('ZW5jbG9zZV9pbl9jZGF0YQ==')=>base64_decode('MQ=='),],];$llfu3a=$this->byho3b(null,$gqyk39,true);$this->sbuc3c(base64_decode('R0VU'),$zbtb36);$this->sbuc3c(base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvMS9sb2NhbGVzLw==').$wyzh34.base64_decode('L2Rvd25sb2FkPw==').$llfu3a,$gvbr37);$this->augu3d(base64_decode('cXVlcnk='),$cqxh38);$this->sbuc3c($gqyk39,$cqxh38[base64_decode('cXVlcnk=')]);return new xcdo24($ngew35,[base64_decode('cmVzcG9uc2VfaGVhZGVycw==')=>[base64_decode('RVRhZw==')=>base64_decode('Vy8iNjI1ZDExY2YwODFiMTY5N2NiYzIxNmVkZjZlYmIxM2Mi'),base64_decode('TGFzdC1Nb2RpZmllZA==')=>base64_decode('V2VkLCAyOCBEZWMgMjAyMiAxMzoxNjo0NSBHTVQ='),]]);};}private function nmfsc():\Closure{return function(string $zbtb36,string $gvbr37):ResponseInterface{$this->sbuc3c(base64_decode('R0VU'),$zbtb36);$this->sbuc3c(base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvMS9sb2NhbGVzP3Blcl9wYWdlPTEwMCZwYWdlPTE='),$gvbr37);return new avsj3e([[base64_decode('aWQ=')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('bmFtZQ==')=>base64_decode('ZGU='),base64_decode('Y29kZQ==')=>base64_decode('ZGU='),base64_decode('ZmFsbGJhY2tfbG9jYWxl')=>null,],[base64_decode('aWQ=')=>base64_decode('MTM2MDRlYzk5M2JlZWZjZGFiYTczMjgxMmNkYjgyOGM='),base64_decode('bmFtZQ==')=>base64_decode('ZW4tR0I='),base64_decode('Y29kZQ==')=>base64_decode('ZW4tR0I='),base64_decode('ZmFsbGJhY2tfbG9jYWxl')=>[base64_decode('aWQ=')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('bmFtZQ==')=>base64_decode('ZGU='),base64_decode('Y29kZQ==')=>base64_decode('ZGU='),],],]);};}private function mrmod(?MockHttpClient $hgng3f=null,?string $mxdb40=null,?XliffFileDumper $ikud41=null,bool $idgr42=false):ProviderInterface{return new mlue43($hgng3f ?? $this->sysfe(),$this->zbknf(),$this->ltvz10(),$ikud41 ?? $this->dkwq11(),$this->uqtq12(),$this->ldpg13(),$mxdb40 ?? $this->bici14(),$this->xbky15(),$this->brai16(),$idgr42,);}private function sysfe():MockHttpClient{return $this->$wyqd44 ??= new wqlk25();}private function zbknf():MockObject&LoggerInterface{return $this->$gsyl45 ??= $this->wyej46(LoggerInterface::class);}private function ltvz10():MockObject&LoaderInterface{return $this->$lftj47 ??= $this->wyej46(LoaderInterface::class);}private function dkwq11():XliffFileDumper&MockObject{return $this->$bgzm48 ??= $this->wyej46(XliffFileDumper::class);}private function uqtq12():MockObject&CacheItemPoolInterface{return $this->$feyi49 ??= $this->wyej46(CacheItemPoolInterface::class);}private function ldpg13():string{return $this->$vgwh4a ??= base64_decode('ZW5fR0I=');}private function bici14():string{return $this->$mnth4b ??= base64_decode('YXBpLnBocmFzZS5jb20=');}private function xbky15():array{return $this->$ciom4c ??=[base64_decode('ZmlsZV9mb3JtYXQ=')=>base64_decode('c3ltZm9ueV94bGlmZg=='),base64_decode('aW5jbHVkZV9lbXB0eV90cmFuc2xhdGlvbnM=')=>base64_decode('MQ=='),base64_decode('dGFncw==')=>[],base64_decode('Zm9ybWF0X29wdGlvbnM=')=>[base64_decode('ZW5jbG9zZV9pbl9jZGF0YQ==')=>base64_decode('MQ=='),],];}private function brai16(string $eers33=base64_decode('bWVzc2FnZXM='),string $fbgk4d=base64_decode('ZW5fR0I=')):array{return $this->$hleo4e ??=[base64_decode('ZmlsZV9mb3JtYXQ=')=>base64_decode('c3ltZm9ueV94bGlmZg=='),base64_decode('dXBkYXRlX3RyYW5zbGF0aW9ucw==')=>base64_decode('MQ=='),base64_decode('dGFncw==')=>$eers33,base64_decode('bG9jYWxlX2lk')=>$fbgk4d,];}}

Did this file decode correctly?

Original Code

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Translation\Bridge\Phrase\Tests;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpClient\HttpClientTrait;
use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\JsonMockResponse;
use Symfony\Component\HttpClient\Response\MockResponse;
use Symfony\Component\Translation\Bridge\Phrase\PhraseProvider;
use Symfony\Component\Translation\Dumper\XliffFileDumper;
use Symfony\Component\Translation\Exception\ProviderExceptionInterface;
use Symfony\Component\Translation\Loader\LoaderInterface;
use Symfony\Component\Translation\MessageCatalogue;
use Symfony\Component\Translation\Provider\ProviderInterface;
use Symfony\Component\Translation\TranslatorBag;
use Symfony\Contracts\HttpClient\ResponseInterface;

/**
 * @author wicliff <[email protected]>
 */
class PhraseProviderTest extends TestCase
{
    use HttpClientTrait {
        mergeQueryString as public;
    }

    private MockHttpClient $httpClient;
    private MockObject&LoggerInterface $logger;
    private MockObject&LoaderInterface $loader;
    private MockObject&XliffFileDumper $xliffFileDumper;
    private MockObject&CacheItemPoolInterface $cache;
    private string $defaultLocale;
    private string $endpoint;
    private array $readConfig;
    private array $writeConfig;

    /**
     * @dataProvider toStringProvider
     */
    public function testToString(ProviderInterface $provider, string $expected)
    {
        self::assertSame($expected, (string) $provider);
    }

    /**
     * @dataProvider readProvider
     */
    public function testRead(string $locale, string $localeId, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
    {
        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(false);

        $item
            ->expects(self::once())
            ->method('set')
            ->with(self::callback(function ($item) use ($responseContent) {
                $this->assertSame('W/"625d11cf081b1697cbc216edf6ebb13c"', $item['etag']);
                $this->assertSame('Wed, 28 Dec 2022 13:16:45 GMT', $item['modified']);
                $this->assertSame($responseContent, $item['content']);

                return true;
            }));

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->with(self::callback(function ($v) use ($locale, $domain) {
                $this->assertStringStartsWith($locale.'.'.$domain.'.', $v);

                return true;
            }))
            ->willReturn($item);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => $this->getDownloadLocaleResponseMock($domain, $localeId, $responseContent),
        ];

        $this->getLoader()
            ->expects($this->once())
            ->method('load')
            ->willReturn($expectedTranslatorBag->getCatalogue($locale));

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $translatorBag = $provider->read([$domain], [$locale]);

        $this->assertSame($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
    }

    /**
     * @dataProvider readProvider
     */
    public function testReadCached(string $locale, string $localeId, string $domain, string $responseContent, TranslatorBag $expectedTranslatorBag)
    {
        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(true);

        $cachedResponse = ['etag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"', 'modified' => 'Wed, 28 Dec 2022 13:16:45 GMT', 'content' => $responseContent];
        $item->expects(self::once())->method('get')->willReturn($cachedResponse);

        $item
            ->expects(self::once())
            ->method('set')
            ->with(self::callback(function ($item) use ($responseContent) {
                $this->assertSame('W/"625d11cf081b1697cbc216edf6ebb13c"', $item['etag']);
                $this->assertSame('Wed, 28 Dec 2022 13:16:45 GMT', $item['modified']);
                $this->assertSame($responseContent, $item['content']);

                return true;
            }));

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->with(self::callback(function ($v) use ($locale, $domain) {
                $this->assertStringStartsWith($locale.'.'.$domain.'.', $v);

                return true;
            }))
            ->willReturn($item);

        $this->getCache()
            ->expects(self::once())
            ->method('save')
            ->with($item);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function (string $method, string $url, array $options = []): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertContains('If-None-Match: W/"625d11cf081b1697cbc216edf6ebb13c"', $options['headers']);

                return new MockResponse('', ['http_code' => 304, 'response_headers' => [
                    'ETag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"',
                    'Last-Modified' => 'Wed, 28 Dec 2022 13:16:45 GMT',
                ]]);
            },
        ];

        $this->getLoader()
            ->expects($this->once())
            ->method('load')
            ->willReturn($expectedTranslatorBag->getCatalogue($locale));

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $translatorBag = $provider->read([$domain], [$locale]);

        $this->assertSame($expectedTranslatorBag->getCatalogues(), $translatorBag->getCatalogues());
    }

    public function testReadFallbackLocale()
    {
        $locale = 'en_GB';
        $domain = 'messages';

        $bag = new TranslatorBag();
        $catalogue = new MessageCatalogue('en_GB', [
            'general.back' => 'back  {{ placeholder }} </rant >',
            'general.cancel' => 'Cancel',
        ]);

        $catalogue->setMetadata('general.back', [
            'notes' => [
                'this should have a cdata section',
            ],
            'target-attributes' => [
                'state' => 'signed-off',
            ],
        ]);

        $catalogue->setMetadata('general.cancel', [
            'target-attributes' => [
                'state' => 'translated',
            ],
        ]);

        $bag->addCatalogue($catalogue);

        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(false);
        $item->expects(self::never())->method('set');

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->with(self::callback(function ($v) use ($locale, $domain) {
                $this->assertStringStartsWith($locale.'.'.$domain.'.', $v);

                return true;
            }))
            ->willReturn($item);

        $this->getCache()->expects(self::never())->method('save');
        $this->getLoader()->expects($this->once())->method('load')->willReturn($bag->getCatalogue($locale));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function (string $method, string $url, array $options): ResponseInterface {
                $localeId = '13604ec993beefcdaba732812cdb828c';
                $query = [
                    'file_format' => 'symfony_xliff',
                    'include_empty_translations' => '1',
                    'tags' => 'messages',
                    'format_options' => [
                        'enclose_in_cdata' => '1',
                    ],
                    'fallback_locale_id' => 'de',
                ];

                $queryString = $this->mergeQueryString(null, $query, true);

                $this->assertSame('GET', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales/'.$localeId.'/download?'.$queryString, $url);
                $this->assertNotContains('If-None-Match: W/"625d11cf081b1697cbc216edf6ebb13c"', $options['headers']);
                $this->assertArrayHasKey('query', $options);
                $this->assertSame($query, $options['query']);

                return new MockResponse();
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2', isFallbackLocaleEnabled: true);

        $provider->read([$domain], [$locale]);
    }

    /**
     * @dataProvider cacheKeyProvider
     */
    public function testCacheKeyOptionsSort(array $options, string $expectedKey)
    {
        $this->getCache()->expects(self::once())->method('getItem')->with($expectedKey);
        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function (string $method): ResponseInterface {
                $this->assertSame('GET', $method);

                return new MockResponse('', ['http_code' => 200, 'response_headers' => [
                    'ETag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"',
                    'Last-Modified' => 'Wed, 28 Dec 2022 13:16:45 GMT',
                ]]);
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['en_GB']);
    }

    /**
     * @dataProvider cacheItemProvider
     */
    public function testGetCacheItem(mixed $cachedValue, bool $hasMatchHeader)
    {
        $item = $this->createMock(CacheItemInterface::class);
        $item->expects(self::once())->method('isHit')->willReturn(true);
        $item->method('get')->willReturn($cachedValue);

        $this->getCache()
            ->expects(self::once())
            ->method('getItem')
            ->willReturn($item);

        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'download locale' => function ($method, $url, $options) use ($hasMatchHeader) {
                if ($hasMatchHeader) {
                    $this->assertArrayHasKey('if-none-match', $options['normalized_headers']);
                } else {
                    $this->assertArrayNotHasKey('if-none-match', $options['normalized_headers']);
                }

                return new MockResponse('', ['http_code' => 200, 'response_headers' => [
                    'ETag' => 'W/"625d11cf081b1697cbc216edf6ebb13c"',
                    'Last-Modified' => 'Wed, 28 Dec 2022 13:16:45 GMT',
                ]]);
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['en_GB']);
    }

    public function cacheItemProvider(): \Generator
    {
        yield 'null value' => [
            'cached_value' => null,
            'has_header' => false,
        ];

        $item = ['etag' => 'W\Foo', 'modified' => 'foo', 'content' => 'bar'];

        yield 'correct value' => [
            'cached_value' => $item,
            'has_header' => true,
        ];
    }

    public function cacheKeyProvider(): \Generator
    {
        yield 'sortorder one' => [
            'options' => [
                'file_format' => 'symfony_xliff',
                'include_empty_translations' => '1',
                'tags' => [],
                'format_options' => [
                    'enclose_in_cdata' => '1',
                ],
            ],
            'expected_key' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
        ];

        yield 'sortorder two' => [
            'options' => [
                'include_empty_translations' => '1',
                'file_format' => 'symfony_xliff',
                'format_options' => [
                    'enclose_in_cdata' => '1',
                ],
                'tags' => [],
            ],
            'expected_key' => 'en_GB.messages.099584009f94b788bd46580c17f49c0b22c55e16',
        ];
    }

    /**
     * @dataProvider readProviderExceptionsProvider
     */
    public function testReadProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'provider error' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->read(['messages'], ['en_GB']);
    }

    /**
     * @dataProvider initLocalesExceptionsProvider
     */
    public function testInitLocalesExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'init locales' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->read(['messages'], ['en_GB']);
    }

    public function testInitLocalesPaginated()
    {
        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales page 1' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales?per_page=100&page=1', $url);

                return new JsonMockResponse([
                    [
                        'id' => '5fea6ed5c21767730918a9400e420832',
                        'name' => 'de',
                        'code' => 'de',
                        'fallback_locale' => null,
                    ],
                ], [
                    'http_code' => 200,
                    'response_headers' => [
                        'pagination' => '{"total_count":31,"current_page":1,"current_per_page":25,"previous_page":null,"next_page":2}',
                    ],
                ]);
            },
            'init locales page 2' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('GET', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales?per_page=100&page=2', $url);

                return new JsonMockResponse([
                    [
                        'id' => '5fea6ed5c21767730918a9400e420832',
                        'name' => 'de',
                        'code' => 'de',
                        'fallback_locale' => null,
                    ],
                ], [
                    'http_code' => 200,
                    'response_headers' => [
                        'pagination' => '{"total_count":31,"current_page":2,"current_per_page":25,"previous_page":null,"next_page":null}',
                    ],
                ]);
            },
            'download locale' => $this->getDownloadLocaleResponseMock('messages', '5fea6ed5c21767730918a9400e420832', ''),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['de']);
    }

    public function testCreateUnknownLocale()
    {
        $this->getLoader()->method('load')->willReturn(new MessageCatalogue('en'));

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'create locale' => function (string $method, string $url, array $options = []): ResponseInterface {
                $this->assertSame('POST', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/locales', $url);
                $this->assertSame('Content-Type: application/x-www-form-urlencoded', $options['normalized_headers']['content-type'][0]);
                $this->assertArrayHasKey('body', $options);
                $this->assertSame('name=nl-NL&code=nl-NL&default=0', $options['body']);

                return new JsonMockResponse([
                    'id' => 'zWlsCvkeSK0EBgBVmGpZ4cySWbQ0s1Dk4',
                    'name' => 'nl-NL',
                    'code' => 'nl-NL',
                    'fallback_locale' => null,
                ], ['http_code' => 201]);
            },
            'download locale' => $this->getDownloadLocaleResponseMock('messages', 'zWlsCvkeSK0EBgBVmGpZ4cySWbQ0s1Dk4', ''),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->read(['messages'], ['nl_NL']);
    }

    /**
     * @dataProvider createLocalesExceptionsProvider
     */
    public function testCreateLocaleExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'provider error' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->read(['messages'], ['nl_NL']);
    }

    public function testDelete()
    {
        $bag = new TranslatorBag();
        $bag->addCatalogue(new MessageCatalogue('en_GB', [
            'validators' => [],
            'messages' => [
                'delete this,erroneous:key' => 'translated value',
            ],
        ]));

        $bag->addCatalogue(new MessageCatalogue('de', [
            'validators' => [],
            'messages' => [
                'another:erroneous:key' => 'value to delete',
                'delete this,erroneous:key' => 'translated value',
            ],
        ]));

        $responses = [
            'delete key one' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('DELETE', $method);
                $queryString = $this->mergeQueryString(null, ['q' => 'name:delete\\\\ this\\\\,erroneous\\\\:key'], true);

                $this->assertSame('https://api.phrase.com/api/v2/projects/1/keys?'.$queryString, $url);

                return new MockResponse('', [
                    'http_code' => 200,
                ]);
            },
            'delete key two' => function (string $method, string $url): ResponseInterface {
                $this->assertSame('DELETE', $method);
                $queryString = $this->mergeQueryString(null, ['q' => 'name:another\\\\:erroneous\\\\:key'], true);

                $this->assertSame('https://api.phrase.com/api/v2/projects/1/keys?'.$queryString, $url);

                return new MockResponse('', [
                    'http_code' => 200,
                ]);
            },
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $provider->delete($bag);
    }

    /**
     * @dataProvider deleteExceptionsProvider
     */
    public function testDeleteProviderExceptions(int $statusCode, string $expectedExceptionMessage, string $expectedLoggerMessage)
    {
        $this->getLogger()
            ->expects(self::once())
            ->method('error')
            ->with($expectedLoggerMessage);

        $responses = [
            'provider error' => new MockResponse('provider error', [
                'http_code' => $statusCode,
                'response_headers' => [
                    'x-rate-limit-limit' => ['1000'],
                    'x-rate-limit-reset' => ['60'],
                ],
            ]),
        ];

        $provider = $this->createProvider(httpClient: (new MockHttpClient($responses))->withOptions([
            'base_uri' => 'https://api.phrase.com/api/v2/projects/1/',
            'headers' => [
                'Authorization' => 'token API_TOKEN',
                'User-Agent' => 'myProject',
            ],
        ]), endpoint: 'api.phrase.com/api/v2');

        $bag = new TranslatorBag();
        $bag->addCatalogue(new MessageCatalogue('en_GB', [
            'messages' => [
                'key.to.delete' => 'translated value',
            ],
        ]));

        $this->expectException(ProviderExceptionInterface::class);
        $this->expectExceptionCode(0);
        $this->expectExceptionMessage($expectedExceptionMessage);

        $provider->delete($bag);
    }

    /**
     * @dataProvider writeProvider
     */
    public function testWrite(string $locale, string $localeId, string $domain, string $content, TranslatorBag $bag)
    {
        $this->getWriteConfig($domain, $localeId);

        $responses = [
            'init locales' => $this->getInitLocaleResponseMock(),
            'upload file' => function (string $method, string $url, array $options = []) use ($domain, $locale, $localeId, $content): ResponseInterface {
                $this->assertSame('POST', $method);
                $this->assertSame('https://api.phrase.com/api/v2/projects/1/uploads', $url);

                $testedFileFormat = $testedFileName = $testedContent = $testedLocaleId = $testedTags = $testedUpdateTranslations = false;

                do {
                    $part = $options['body']();

                    if (strpos($part, 'file_format')) {
                        $options['body']();
                        $this->assertSame('symfony_xliff', $options['body']());
                        $testedFileFormat = true;
                    }
                    if (preg_match('/filename="([^"]+)/', $part, $matches)) {
                        $this->assertStringEndsWith($domain.'-'.$locale.'.xlf', $matches[1]);
                        $testedFileName = true;
                    }

                    if (str_starts_with($part, '<? xmlbase64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U3RyaW5nTWF0Y2hlc0Zvcm1hdCgkY29udGVudCwgJHBhcnQpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGVzdGVkQ29udGVudCA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZiAoc3RycG9zKCRwYXJ0LCA=')locale_idbase64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkb3B0aW9uc1s=')bodybase64_decode('XSgpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U2FtZSgkbG9jYWxlSWQsICRvcHRpb25zWw==')bodybase64_decode('XSgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRlc3RlZExvY2FsZUlkID0gdHJ1ZTsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmIChzdHJwb3MoJHBhcnQsIA==')name=base64_decode('dGFncw==')base64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkb3B0aW9uc1s=')bodybase64_decode('XSgpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U2FtZSgkZG9tYWluLCAkb3B0aW9uc1s=')bodybase64_decode('XSgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRlc3RlZFRhZ3MgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgaWYgKHN0cnBvcygkcGFydCwg')name=base64_decode('dXBkYXRlX3RyYW5zbGF0aW9ucw==')base64_decode('KSkgewogICAgICAgICAgICAgICAgICAgICAgICAkb3B0aW9uc1s=')bodybase64_decode('XSgpOwogICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U2FtZSg=')1base64_decode('LCAkb3B0aW9uc1s=')bodybase64_decode('XSgpKTsKICAgICAgICAgICAgICAgICAgICAgICAgJHRlc3RlZFVwZGF0ZVRyYW5zbGF0aW9ucyA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSB3aGlsZSAo')base64_decode('ICE9PSAkcGFydCk7CgogICAgICAgICAgICAgICAgJHRoaXMtPmFzc2VydFRydWUoJHRlc3RlZEZpbGVGb3JtYXQpOwogICAgICAgICAgICAgICAgJHRoaXMtPmFzc2VydFRydWUoJHRlc3RlZEZpbGVOYW1lKTsKICAgICAgICAgICAgICAgICR0aGlzLT5hc3NlcnRUcnVlKCR0ZXN0ZWRDb250ZW50KTsKICAgICAgICAgICAgICAgICR0aGlzLT5hc3NlcnRUcnVlKCR0ZXN0ZWRMb2NhbGVJZCk7CiAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0VHJ1ZSgkdGVzdGVkVGFncyk7CiAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0VHJ1ZSgkdGVzdGVkVXBkYXRlVHJhbnNsYXRpb25zKTsKCiAgICAgICAgICAgICAgICAkdGhpcy0+YXNzZXJ0U3RyaW5nU3RhcnRzV2l0aCg=')Content-Type:multipart/form-database64_decode('LCAkb3B0aW9uc1s=')normalized_headersbase64_decode('XVs=')content-typebase64_decode('XVswXSk7CgogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBNb2NrUmVzcG9uc2Uo')successbase64_decode('LCBb')http_codebase64_decode('ID0+IDIwMV0pOwogICAgICAgICAgICB9LAogICAgICAgIF07CgogICAgICAgICRwcm92aWRlciA9ICR0aGlzLT5jcmVhdGVQcm92aWRlcihodHRwQ2xpZW50OiAobmV3IE1vY2tIdHRwQ2xpZW50KCRyZXNwb25zZXMpKS0+d2l0aE9wdGlvbnMoWwogICAgICAgICAgICA=')base_uribase64_decode('ID0+IA==')https:base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnBocmFzZS5jb20vYXBpL3Yy'),dumper:new uoxo17());$muqm18->ycoj19($ddoq1a);}/**
     * @dataProvider writeExceptionsProvider
     */ public function ajcq0(int $jeiz1b,string $ytap1c,string $cykj1d){$this->zbknf()->uqxl1e(self::xxna1f())->ywna20(base64_decode('ZXJyb3I='))->fqgy21($cykj1d);$this->dkwq11()->ywna20(base64_decode('Zm9ybWF0Q2F0YWxvZ3Vl'))->qqwq22('');$wwmg23=[base64_decode('aW5pdCBsb2NhbGVz')=>$this->nmfsc(),base64_decode('cHJvdmlkZXIgZXJyb3I=')=>new xcdo24(base64_decode('cHJvdmlkZXIgZXJyb3I='),[base64_decode('aHR0cF9jb2Rl')=>$jeiz1b,base64_decode('cmVzcG9uc2VfaGVhZGVycw==')=>[base64_decode('eC1yYXRlLWxpbWl0LWxpbWl0')=>[base64_decode('MTAwMA==')],base64_decode('eC1yYXRlLWxpbWl0LXJlc2V0')=>[base64_decode('NjA=')],],]),];$muqm18=$this->mrmod(httpClient:(new wqlk25($wwmg23))->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvMS8='),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnBocmFzZS5jb20vYXBpL3Yy'));$ddoq1a=new oshv27();$ddoq1a->nzzi28(new odrt29(base64_decode('ZW5fR0I='),[base64_decode('bWVzc2FnZXM=')=>[base64_decode('a2V5LnRvLmRlbGV0ZQ==')=>base64_decode('dHJhbnNsYXRlZCB2YWx1ZQ=='),],]));$this->ujuh2a(ProviderExceptionInterface::class);$this->ofay2b(0);$this->zqxa2c($ytap1c);$muqm18->ycoj19($ddoq1a);}public function evte1():\Generator{$xhiy2d=<<<'XLIFF'
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="en-GB" target-language="en-GB" datatype="plaintext" original="file.ext">
    <header>
      <tool tool-id="symfony" tool-name="Symfony"/>
    </header>
    <body>
      <trans-unit id="%s" resname="general.back">
        <source>general.back</source>
        <target><![CDATA[back &!]]></target>
      </trans-unit>
      <trans-unit id="%s" resname="general.cancel">
        <source>general.cancel</source>
        <target>Cancel</target>
      </trans-unit>
    </body>
  </file>
</xliff>

XLIFF;$ddoq1a=new oshv27();$ddoq1a->nzzi28(new odrt29(base64_decode('ZW5fR0I='),[base64_decode('dmFsaWRhdG9ycw==')=>[],base64_decode('ZXhjZXB0aW9ucw==')=>[],base64_decode('bWVzc2FnZXM=')=>[base64_decode('Z2VuZXJhbC5iYWNr')=>base64_decode('YmFjayAmIQ=='),base64_decode('Z2VuZXJhbC5jYW5jZWw=')=>base64_decode('Q2FuY2Vs'),],]));yield base64_decode('ZW5nbGlzaCBtZXNzYWdlcw==')=>[base64_decode('bG9jYWxl')=>base64_decode('ZW5fR0I='),base64_decode('bG9jYWxlSWQ=')=>base64_decode('MTM2MDRlYzk5M2JlZWZjZGFiYTczMjgxMmNkYjgyOGM='),base64_decode('ZG9tYWlu')=>base64_decode('bWVzc2FnZXM='),base64_decode('cmVzcG9uc2VDb250ZW50')=>$xhiy2d,base64_decode('YmFn')=>$ddoq1a,];$eiza2e=<<<'XLIFF'
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file source-language="en-GB" target-language="de" datatype="plaintext" original="file.ext">
    <header>
      <tool tool-id="symfony" tool-name="Symfony"/>
    </header>
    <body>
      <trans-unit id="%s" resname="general.back">
        <source>general.back</source>
        <target>zurck</target>
      </trans-unit>
      <trans-unit id="%s" resname="general.cancel">
        <source>general.cancel</source>
        <target>Abbrechen</target>
      </trans-unit>
    </body>
  </file>
</xliff>

XLIFF;$ddoq1a=new oshv27();$ddoq1a->nzzi28(new odrt29(base64_decode('ZGU='),[base64_decode('dmFsaWRhdG9ycw==')=>[base64_decode('Z2VuZXJhbC5iYWNr')=>base64_decode('enVyw7xjaw=='),base64_decode('Z2VuZXJhbC5jYW5jZWw=')=>base64_decode('QWJicmVjaGVu'),],base64_decode('bWVzc2FnZXM=')=>[],]));yield base64_decode('Z2VybWFuIHZhbGlkYXRvcnM=')=>[base64_decode('bG9jYWxl')=>base64_decode('ZGU='),base64_decode('bG9jYWxlSWQ=')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('ZG9tYWlu')=>base64_decode('dmFsaWRhdG9ycw=='),base64_decode('cmVzcG9uc2VDb250ZW50')=>$eiza2e,base64_decode('YmFn')=>$ddoq1a,];}public function suun2():\Generator{yield base64_decode('ZGVmYXVsdCBlbmRwb2ludA==')=>[base64_decode('cHJvdmlkZXI=')=>$this->mrmod(httpClient:$this->sysfe()->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvUFJPSkVDVF9JRC8='),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],])),base64_decode('ZXhwZWN0ZWQ=')=>base64_decode('cGhyYXNlOi8vYXBpLnBocmFzZS5jb20='),];yield base64_decode('Y3VzdG9tIGVuZHBvaW50')=>[base64_decode('cHJvdmlkZXI=')=>$this->mrmod(httpClient:$this->sysfe()->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkudXMuYXBwLnBocmFzZS5jb20vYXBpL3YyL3Byb2plY3RzL1BST0pFQ1RfSUQv'),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnVzLmFwcC5waHJhc2UuY29t')),base64_decode('ZXhwZWN0ZWQ=')=>base64_decode('cGhyYXNlOi8vYXBpLnVzLmFwcC5waHJhc2UuY29t'),];yield base64_decode('Y3VzdG9tIGVuZHBvaW50IHdpdGggcG9ydA==')=>[base64_decode('cHJvdmlkZXI=')=>$this->mrmod(httpClient:$this->sysfe()->hcjj26([base64_decode('YmFzZV91cmk=')=>base64_decode('aHR0cHM6Ly9hcGkudXMuYXBwLnBocmFzZS5jb206ODA4MC9hcGkvdjIvcHJvamVjdHMvUFJPSkVDVF9JRC8='),base64_decode('aGVhZGVycw==')=>[base64_decode('QXV0aG9yaXphdGlvbg==')=>base64_decode('dG9rZW4gQVBJX1RPS0VO'),base64_decode('VXNlci1BZ2VudA==')=>base64_decode('bXlQcm9qZWN0'),],]),endpoint:base64_decode('YXBpLnVzLmFwcC5waHJhc2UuY29tOjgwODA=')),base64_decode('ZXhwZWN0ZWQ=')=>base64_decode('cGhyYXNlOi8vYXBpLnVzLmFwcC5waHJhc2UuY29tOjgwODA='),];}public function yhvl3():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGRlbGV0ZSBrZXkgaW4gcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIGRlbGV0ZSBrZXkgImtleS50by5kZWxldGUiIGluIHBocmFzZTogInByb3ZpZGVyIGVycm9yIi4='),statusCode:500);}public function wnwa4():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIHVwbG9hZCB0cmFuc2xhdGlvbnMgdG8gcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIHVwbG9hZCB0cmFuc2xhdGlvbnMgZm9yIGRvbWFpbiAibWVzc2FnZXMiIHRvIHBocmFzZTogInByb3ZpZGVyIGVycm9yIi4='));}public function stpt5():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGNyZWF0ZSBsb2NhbGUgcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIGNyZWF0ZSBsb2NhbGUgIm5sLU5MIiBpbiBwaHJhc2U6ICJwcm92aWRlciBlcnJvciIu'));}public function sazo6():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGdldCBsb2NhbGVzIGZyb20gcGhyYXNlLg=='),loggerMessage:base64_decode('VW5hYmxlIHRvIGdldCBsb2NhbGVzIGZyb20gcGhyYXNlOiAicHJvdmlkZXIgZXJyb3IiLg=='));}public function gtjp7():array{return $this->vwgz9(exceptionMessage:base64_decode('VW5hYmxlIHRvIGdldCB0cmFuc2xhdGlvbnMgZnJvbSBwaHJhc2Uu'),loggerMessage:base64_decode('VW5hYmxlIHRvIGdldCB0cmFuc2xhdGlvbnMgZm9yIGxvY2FsZSAiZW5fR0IiIGZyb20gcGhyYXNlOiAicHJvdmlkZXIgZXJyb3IiLg=='));}public function ljza8():\Generator{$ddoq1a=new oshv27();$cyey2f=new odrt29(base64_decode('ZW5fR0I='),[base64_decode('Z2VuZXJhbC5iYWNr')=>base64_decode('YmFjayAge3sgcGxhY2Vob2xkZXIgfX0gPC9yYW50ID4='),base64_decode('Z2VuZXJhbC5jYW5jZWw=')=>base64_decode('Q2FuY2Vs'),]);$cyey2f->rcec30(base64_decode('Z2VuZXJhbC5iYWNr'),[base64_decode('bm90ZXM=')=>[base64_decode('dGhpcyBzaG91bGQgaGF2ZSBhIGNkYXRhIHNlY3Rpb24='),],base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('c2lnbmVkLW9mZg=='),],]);$cyey2f->rcec30(base64_decode('Z2VuZXJhbC5jYW5jZWw='),[base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('dHJhbnNsYXRlZA=='),],]);$ddoq1a->nzzi28($cyey2f);yield[base64_decode('bG9jYWxl')=>base64_decode('ZW5fR0I='),base64_decode('bG9jYWxlX2lk')=>base64_decode('MTM2MDRlYzk5M2JlZWZjZGFiYTczMjgxMmNkYjgyOGM='),base64_decode('ZG9tYWlu')=>base64_decode('bWVzc2FnZXM='),base64_decode('Y29udGVudA==')=><<<'XLIFF'
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="global" datatype="plaintext" source-language="de" target-language="en-GB">
    <body>
      <trans-unit id="general.back" resname="general.back">
        <source xml:lang="de"><![CDATA[zurck </rant >]]></source>
        <target xml:lang="en" state="signed-off"><![CDATA[back  {{ placeholder }} </rant >]]></target>
        <note>this should have a cdata section</note>
      </trans-unit>
      <trans-unit id="general.cancel" resname="general.cancel">
        <source xml:lang="de">Abbrechen</source>
        <target xml:lang="en" state="translated">Cancel</target>
      </trans-unit>
    </body>
  </file>
</xliff>
XLIFF,base64_decode('ZXhwZWN0ZWQgYmFn')=>$ddoq1a,];$ddoq1a=new oshv27();$cyey2f=new odrt29(base64_decode('ZGU='),[base64_decode('QSBQSFAgZXh0ZW5zaW9uIGNhdXNlZCB0aGUgdXBsb2FkIHRvIGZhaWwu')=>base64_decode('RWluZSBQSFAtRXJ3ZWl0ZXJ1bmcgdmVyaGluZGVydGUgZGVuIFVwbG9hZC4='),base64_decode('QW4gZW1wdHkgZmlsZSBpcyBub3QgYWxsb3dlZC4=')=>base64_decode('RWluZSBsZWVyZSBEYXRlaSBpc3QgbmljaHQgZXJsYXVidC4='),]);$cyey2f->rcec30(base64_decode('QW4gZW1wdHkgZmlsZSBpcyBub3QgYWxsb3dlZC4='),[base64_decode('bm90ZXM=')=>[base64_decode('YmUgc3VyZSBub3QgdG8gYWxsb3cgYW4gZW1wdHkgZmlsZQ=='),],base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('c2lnbmVkLW9mZg=='),],]);$cyey2f->rcec30(base64_decode('QSBQSFAgZXh0ZW5zaW9uIGNhdXNlZCB0aGUgdXBsb2FkIHRvIGZhaWwu'),[base64_decode('dGFyZ2V0LWF0dHJpYnV0ZXM=')=>[base64_decode('c3RhdGU=')=>base64_decode('c2lnbmVkLW9mZg=='),],],base64_decode('dmFsaWRhdG9ycw=='));$ddoq1a->nzzi28($cyey2f);yield[base64_decode('bG9jYWxl')=>base64_decode('ZGU='),base64_decode('bG9jYWxlX2lk')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('ZG9tYWlu')=>base64_decode('dmFsaWRhdG9ycw=='),base64_decode('Y29udGVudA==')=><<<'XLIFF'
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="file.ext" datatype="plaintext" source-language="de" target-language="de">
    <body>
      <trans-unit id="A PHP extension caused the upload to fail." resname="A PHP extension caused the upload to fail.">
        <source xml:lang="de">Eine PHP-Erweiterung verhinderte den Upload.</source>
        <target xml:lang="de" state="signed-off">Eine PHP-Erweiterung verhinderte den Upload.</target>
      </trans-unit>
      <trans-unit id="An empty file is not allowed." resname="An empty file is not allowed.">
        <source xml:lang="de">Eine leere Datei ist nicht erlaubt.</source>
        <target xml:lang="de" state="signed-off">Eine leere Datei ist nicht erlaubt.</target>
        <note>be sure not to allow an empty file</note>
      </trans-unit>
    </body>
  </file>
</xliff>
XLIFF,base64_decode('ZXhwZWN0ZWQgYmFn')=>$ddoq1a,];}private function vwgz9(string $vzio31,string $mpur32,int $jeiz1b=400):array{return[base64_decode('YmFkIHJlcXVlc3Q=')=>[base64_decode('c3RhdHVzQ29kZQ==')=>$jeiz1b,base64_decode('ZXhjZXB0aW9uTWVzc2FnZQ==')=>$vzio31,base64_decode('bG9nZ2VyTWVzc2FnZQ==')=>$mpur32,],base64_decode('cmF0ZSBsaW1pdCBleGNlZWRlZA==')=>[base64_decode('c3RhdHVzQ29kZQ==')=>429,base64_decode('ZXhjZXB0aW9uTWVzc2FnZQ==')=>base64_decode('UmF0ZSBsaW1pdCBleGNlZWRlZCAoMTAwMCkuIHBsZWFzZSB3YWl0IDYwIHNlY29uZHMu'),base64_decode('bG9nZ2VyTWVzc2FnZQ==')=>$mpur32,],base64_decode('c2VydmVyIHVuYXZhaWxhYmxl')=>[base64_decode('c3RhdHVzQ29kZQ==')=>503,base64_decode('ZXhjZXB0aW9uTWVzc2FnZQ==')=>base64_decode('UHJvdmlkZXIgc2VydmVyIGVycm9yLg=='),base64_decode('bG9nZ2VyTWVzc2FnZQ==')=>$mpur32,],];}private function cnqha(string $eers33,string $wyzh34,string $ngew35):\Closure{return function(string $zbtb36,string $gvbr37,array$cqxh38)use($eers33,$wyzh34,$ngew35):ResponseInterface{$gqyk39=[base64_decode('ZmlsZV9mb3JtYXQ=')=>base64_decode('c3ltZm9ueV94bGlmZg=='),base64_decode('aW5jbHVkZV9lbXB0eV90cmFuc2xhdGlvbnM=')=>base64_decode('MQ=='),base64_decode('dGFncw==')=>$eers33,base64_decode('Zm9ybWF0X29wdGlvbnM=')=>[base64_decode('ZW5jbG9zZV9pbl9jZGF0YQ==')=>base64_decode('MQ=='),],];$llfu3a=$this->byho3b(null,$gqyk39,true);$this->sbuc3c(base64_decode('R0VU'),$zbtb36);$this->sbuc3c(base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvMS9sb2NhbGVzLw==').$wyzh34.base64_decode('L2Rvd25sb2FkPw==').$llfu3a,$gvbr37);$this->augu3d(base64_decode('cXVlcnk='),$cqxh38);$this->sbuc3c($gqyk39,$cqxh38[base64_decode('cXVlcnk=')]);return new xcdo24($ngew35,[base64_decode('cmVzcG9uc2VfaGVhZGVycw==')=>[base64_decode('RVRhZw==')=>base64_decode('Vy8iNjI1ZDExY2YwODFiMTY5N2NiYzIxNmVkZjZlYmIxM2Mi'),base64_decode('TGFzdC1Nb2RpZmllZA==')=>base64_decode('V2VkLCAyOCBEZWMgMjAyMiAxMzoxNjo0NSBHTVQ='),]]);};}private function nmfsc():\Closure{return function(string $zbtb36,string $gvbr37):ResponseInterface{$this->sbuc3c(base64_decode('R0VU'),$zbtb36);$this->sbuc3c(base64_decode('aHR0cHM6Ly9hcGkucGhyYXNlLmNvbS9hcGkvdjIvcHJvamVjdHMvMS9sb2NhbGVzP3Blcl9wYWdlPTEwMCZwYWdlPTE='),$gvbr37);return new avsj3e([[base64_decode('aWQ=')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('bmFtZQ==')=>base64_decode('ZGU='),base64_decode('Y29kZQ==')=>base64_decode('ZGU='),base64_decode('ZmFsbGJhY2tfbG9jYWxl')=>null,],[base64_decode('aWQ=')=>base64_decode('MTM2MDRlYzk5M2JlZWZjZGFiYTczMjgxMmNkYjgyOGM='),base64_decode('bmFtZQ==')=>base64_decode('ZW4tR0I='),base64_decode('Y29kZQ==')=>base64_decode('ZW4tR0I='),base64_decode('ZmFsbGJhY2tfbG9jYWxl')=>[base64_decode('aWQ=')=>base64_decode('NWZlYTZlZDVjMjE3Njc3MzA5MThhOTQwMGU0MjA4MzI='),base64_decode('bmFtZQ==')=>base64_decode('ZGU='),base64_decode('Y29kZQ==')=>base64_decode('ZGU='),],],]);};}private function mrmod(?MockHttpClient $hgng3f=null,?string $mxdb40=null,?XliffFileDumper $ikud41=null,bool $idgr42=false):ProviderInterface{return new mlue43($hgng3f ?? $this->sysfe(),$this->zbknf(),$this->ltvz10(),$ikud41 ?? $this->dkwq11(),$this->uqtq12(),$this->ldpg13(),$mxdb40 ?? $this->bici14(),$this->xbky15(),$this->brai16(),$idgr42,);}private function sysfe():MockHttpClient{return $this->$wyqd44 ??= new wqlk25();}private function zbknf():MockObject&LoggerInterface{return $this->$gsyl45 ??= $this->wyej46(LoggerInterface::class);}private function ltvz10():MockObject&LoaderInterface{return $this->$lftj47 ??= $this->wyej46(LoaderInterface::class);}private function dkwq11():XliffFileDumper&MockObject{return $this->$bgzm48 ??= $this->wyej46(XliffFileDumper::class);}private function uqtq12():MockObject&CacheItemPoolInterface{return $this->$feyi49 ??= $this->wyej46(CacheItemPoolInterface::class);}private function ldpg13():string{return $this->$vgwh4a ??= base64_decode('ZW5fR0I=');}private function bici14():string{return $this->$mnth4b ??= base64_decode('YXBpLnBocmFzZS5jb20=');}private function xbky15():array{return $this->$ciom4c ??=[base64_decode('ZmlsZV9mb3JtYXQ=')=>base64_decode('c3ltZm9ueV94bGlmZg=='),base64_decode('aW5jbHVkZV9lbXB0eV90cmFuc2xhdGlvbnM=')=>base64_decode('MQ=='),base64_decode('dGFncw==')=>[],base64_decode('Zm9ybWF0X29wdGlvbnM=')=>[base64_decode('ZW5jbG9zZV9pbl9jZGF0YQ==')=>base64_decode('MQ=='),],];}private function brai16(string $eers33=base64_decode('bWVzc2FnZXM='),string $fbgk4d=base64_decode('ZW5fR0I=')):array{return $this->$hleo4e ??=[base64_decode('ZmlsZV9mb3JtYXQ=')=>base64_decode('c3ltZm9ueV94bGlmZg=='),base64_decode('dXBkYXRlX3RyYW5zbGF0aW9ucw==')=>base64_decode('MQ=='),base64_decode('dGFncw==')=>$eers33,base64_decode('bG9jYWxlX2lk')=>$fbgk4d,];}}

Function Calls

None

Variables

None

Stats

MD5 22440305ede06ba0a7c0b1cf57f4dcf3
Eval Count 0
Decode Time 134 ms