composer update

This commit is contained in:
Oliver Davies 2019-01-24 08:00:03 +00:00
parent f6abc3dce2
commit 71dfaca858
1753 changed files with 45274 additions and 14619 deletions

View file

@ -37,10 +37,10 @@ class TargetOperation extends AbstractOperation
// For 'all' messages, the code can't be simplified as ``$this->messages[$domain]['all'] = $target->all($domain);``,
// because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback}
//
// For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));``
// For 'new' messages, the code can't be simplified as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));``
// because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback}
//
// For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))``
// For 'obsolete' messages, the code can't be simplified as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))``
// because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback}
foreach ($this->source->all($domain) as $id => $message) {

View file

@ -90,7 +90,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
/**
* Gets the fallback locales.
*
* @return array $locales The fallback locales
* @return array The fallback locales
*/
public function getFallbackLocales()
{

View file

@ -53,7 +53,7 @@ abstract class FileDumper implements DumperInterface
/**
* Sets backup flag.
*
* @param bool
* @param bool $backup
*/
public function setBackup($backup)
{

View file

@ -1,4 +1,4 @@
Copyright (c) 2004-2018 Fabien Potencier
Copyright (c) 2004-2019 Fabien Potencier
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -91,7 +91,7 @@ class XliffFileLoader implements LoaderInterface
$source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source;
// If the xlf file has another encoding specified, try to convert it because
// simple_xml will always return utf-8 encoded values
$target = $this->utf8ToCharset((string) (isset($translation->target) ? $translation->target : $source), $encoding);
$target = $this->utf8ToCharset((string) (isset($translation->target) ? $translation->target : $translation->source), $encoding);
$catalogue->set((string) $source, $target, $domain);

View file

@ -89,7 +89,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface
/**
* Gets the fallback locales.
*
* @return array $locales The fallback locales
* @return array The fallback locales
*/
public function getFallbackLocales()
{

View file

@ -66,7 +66,7 @@ class XliffFileLoaderTest extends TestCase
$loader = new XliffFileLoader();
$catalogue = $loader->load(__DIR__.'/../fixtures/resname.xlf', 'en', 'domain1');
$this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo'), $catalogue->all('domain1'));
$this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo', 'qux' => 'qux source'), $catalogue->all('domain1'));
}
public function testIncompleteResource()

View file

@ -123,7 +123,7 @@ class TranslatorCacheTest extends TestCase
{
/*
* Similar to the previous test. After we used the second translator, make
* sure there's still a useable cache for the first one.
* sure there's still a usable cache for the first one.
*/
$locale = 'any_locale';
@ -142,7 +142,7 @@ class TranslatorCacheTest extends TestCase
$translator->addResource($format, array($msgid => 'FAIL'), $locale);
$translator->trans($msgid);
// Now the first translator must still have a useable cache.
// Now the first translator must still have a usable cache.
$translator = new Translator($locale, null, $this->tmpDir, $debug);
$translator->addLoader($format, $this->createFailingLoader());
$translator->addResource($format, array($msgid => 'OK'), $locale);

View file

@ -14,6 +14,9 @@
<source>baz</source>
<target>foo</target>
</trans-unit>
<trans-unit id="4" resname="qux">
<source>qux source</source>
</trans-unit>
</body>
</file>
</xliff>

View file

@ -179,7 +179,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface
/**
* Gets the fallback locales.
*
* @return array $locales The fallback locales
* @return array The fallback locales
*/
public function getFallbackLocales()
{

View file

@ -38,7 +38,7 @@ interface TranslatorInterface
* Translates the given choice message by choosing a translation according to a number.
*
* @param string $id The message id (may also be an object that can be cast to string)
* @param int $number The number to use to find the indice of the message
* @param int $number The number to use to find the index of the message
* @param array $parameters An array of parameters for the message
* @param string|null $domain The domain for the message or null to use the default
* @param string|null $locale The locale or null to use the default

View file

@ -69,7 +69,7 @@ class ArrayConverter
$elem = &$elem[$part];
}
if (\is_array($elem) && \count($elem) > 0 && $parentOfElem) {
if ($elem && \is_array($elem) && $parentOfElem) {
/* Process next case:
* 'foo.bar': 'test1'
* 'foo': 'test2'

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"