minor #28673 [CS] Use combined assignment operators when possible (carusogabriel)
This PR was merged into the 2.8 branch.
Discussion
----------
[CS] Use combined assignment operators when possible
| Q | A
| ------------- | ---
| Branch? | 2.8
| Bug fix? | no
| New feature? | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | - <!-- required for new features -->
Less opcodes for us 😄
Commits
-------
c561e99394
[CS] Use combined assignment operators when possible
This commit is contained in:
commit
73d74c48e4
@ -90,7 +90,7 @@ EOF
|
||||
$address = $input->getArgument('address');
|
||||
|
||||
if (false === strpos($address, ':')) {
|
||||
$address = $address.':'.$input->getOption('port');
|
||||
$address .= ':'.$input->getOption('port');
|
||||
}
|
||||
|
||||
if ($this->isOtherServerProcessRunning($address)) {
|
||||
|
@ -112,7 +112,7 @@ EOF
|
||||
$address = $input->getArgument('address');
|
||||
|
||||
if (false === strpos($address, ':')) {
|
||||
$address = $address.':'.$input->getOption('port');
|
||||
$address .= ':'.$input->getOption('port');
|
||||
}
|
||||
|
||||
if (!$input->getOption('force') && $this->isOtherServerProcessRunning($address)) {
|
||||
|
@ -49,7 +49,7 @@ class ServerStatusCommand extends ServerCommand
|
||||
$address = $input->getArgument('address');
|
||||
|
||||
if (false === strpos($address, ':')) {
|
||||
$address = $address.':'.$input->getOption('port');
|
||||
$address .= ':'.$input->getOption('port');
|
||||
}
|
||||
|
||||
// remove an orphaned lock file
|
||||
|
@ -59,7 +59,7 @@ EOF
|
||||
|
||||
$address = $input->getArgument('address');
|
||||
if (false === strpos($address, ':')) {
|
||||
$address = $address.':'.$input->getOption('port');
|
||||
$address .= ':'.$input->getOption('port');
|
||||
}
|
||||
|
||||
$lockFile = $this->getLockFile($address);
|
||||
|
@ -263,7 +263,7 @@ EOF
|
||||
{
|
||||
$extractedCatalogue = new MessageCatalogue($locale);
|
||||
foreach ($transPaths as $path) {
|
||||
$path = $path.'views';
|
||||
$path .= 'views';
|
||||
if (is_dir($path)) {
|
||||
$this->getContainer()->get('translation.extractor')->extract($path, $extractedCatalogue);
|
||||
}
|
||||
@ -283,7 +283,7 @@ EOF
|
||||
{
|
||||
$currentCatalogue = new MessageCatalogue($locale);
|
||||
foreach ($transPaths as $path) {
|
||||
$path = $path.'translations';
|
||||
$path .= 'translations';
|
||||
if (is_dir($path)) {
|
||||
$loader->loadMessages($path, $currentCatalogue);
|
||||
}
|
||||
@ -311,7 +311,7 @@ EOF
|
||||
|
||||
$fallbackCatalogue = new MessageCatalogue($fallbackLocale);
|
||||
foreach ($transPaths as $path) {
|
||||
$path = $path.'translations';
|
||||
$path .= 'translations';
|
||||
if (is_dir($path)) {
|
||||
$loader->loadMessages($path, $fallbackCatalogue);
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ abstract class CompleteConfigurationTest extends TestCase
|
||||
|
||||
protected function getContainer($file)
|
||||
{
|
||||
$file = $file.'.'.$this->getFileExtension();
|
||||
$file .= '.'.$this->getFileExtension();
|
||||
|
||||
if (isset(self::$containerCache[$file])) {
|
||||
return self::$containerCache[$file];
|
||||
|
@ -53,7 +53,7 @@ class ClassCollectionLoader
|
||||
$classes = array_diff($classes, $declared);
|
||||
|
||||
// the cache is different depending on which classes are already declared
|
||||
$name = $name.'-'.substr(hash('sha256', implode('|', $classes)), 0, 5);
|
||||
$name .= '-'.substr(hash('sha256', implode('|', $classes)), 0, 5);
|
||||
}
|
||||
|
||||
$classes = array_unique($classes);
|
||||
|
@ -390,7 +390,7 @@ class InputDefinition
|
||||
if (!$argument->isRequired()) {
|
||||
$element = '['.$element.']';
|
||||
} elseif ($argument->isArray()) {
|
||||
$element = $element.' ('.$element.')';
|
||||
$element .= ' ('.$element.')';
|
||||
}
|
||||
|
||||
if ($argument->isArray()) {
|
||||
|
@ -35,7 +35,7 @@ class StringUtilTest extends TestCase
|
||||
|
||||
// Convert UCS-2BE to UTF-8
|
||||
$symbol = mb_convert_encoding($binary, 'UTF-8', 'UCS-2BE');
|
||||
$symbol = $symbol."ab\ncd".$symbol;
|
||||
$symbol .= "ab\ncd".$symbol;
|
||||
|
||||
$this->assertSame("ab\ncd", StringUtil::trim($symbol));
|
||||
}
|
||||
|
@ -351,7 +351,7 @@ class Request
|
||||
|
||||
if (isset($components['port'])) {
|
||||
$server['SERVER_PORT'] = $components['port'];
|
||||
$server['HTTP_HOST'] = $server['HTTP_HOST'].':'.$components['port'];
|
||||
$server['HTTP_HOST'] .= ':'.$components['port'];
|
||||
}
|
||||
|
||||
if (isset($components['user'])) {
|
||||
|
Reference in New Issue
Block a user