8000 minor #28673 [CS] Use combined assignment operators when possible (ca… · symfony/symfony@73d74c4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 73d74c4

Browse files
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 ------- c561e99 [CS] Use combined assignment operators when possible
2 parents a164bb9 + c561e99 commit 73d74c4

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ServerRunCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9090
$address = $input->getArgument('address');
9191

9292
if (false === strpos($address, ':')) {
93-
$address = $address.':'.$input->getOption('port');
93+
$address .= ':'.$input->getOption('port');
9494
}
9595

9696
if ($this->isOtherServerProcessRunning($address)) {

src/Symfony/Bundle/FrameworkBundle/Command/ServerStartCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
112112
$address = $input->getArgument('address');
113113

114114
if (false === strpos($address, ':')) {
115-
$address = $address.':'.$input->getOption('port');
115+
$address .= ':'.$input->getOption('port');
116116
}
117117

118118
if (!$input->getOption('force') && $this->isOtherServerProcessRunning($address)) {

src/Symfony/Bundle/FrameworkBundle/Command/ServerStatusCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
4949
$address = $input->getArgument('address');
5050

5151
if (false === strpos($address, ':')) {
52-
$address = $address.':'.$input->getOption('port');
52+
$address .= ':'.$input->getOption('port');
5353
}
5454

5555
// remove an orphaned lock file

src/Symfony/Bundle/FrameworkBundle/Command/ServerStopCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
5959

6060
$address = $input->getArgument('address');
6161
if (false === strpos($address, ':')) {
62-
$address = $address.':'.$input->getOption('port');
62+
$address .= ':'.$input->getOption('port');
6363
}
6464

6565
$lockFile = $this->getLockFile($address);

src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ private function extractMessages($locale, $transPaths)
263263
{
264264
$extractedCatalogue = new MessageCatalogue($locale);
265265
foreach ($transPaths as $path) {
266-
$path = $path.'views';
266+
$path .= 'views';
267267
if (is_dir($path)) {
268268
$this->getContainer()->get('translation.extractor')->extract($path, $extractedCatalogue);
269269
}
@@ -283,7 +283,7 @@ private function loadCurrentMessages($locale, $transPaths, TranslationLoader $lo
283283
{
284284
$currentCatalogue = new MessageCatalogue($locale);
285285
foreach ($transPaths as $path) {
286-
$path = $path.'translations';
286+
$path .= 'translations';
287287
if (is_dir($path)) {
288288
$loader->loadMessages($path, $currentCatalogue);
289289
}
@@ -311,7 +311,7 @@ private function loadFallbackCatalogues($locale, $transPaths, TranslationLoader
311311

312312
$fallbackCatalogue = new MessageCatalogue($fallbackLocale);
313313
foreach ($transPaths as $path) {
314-
$path = $path.'translations';
314+
$path .= 'translations';
315315
if (is_dir($path)) {
316316
$loader->loadMessages($path, $fallbackCatalogue);
317317
}

src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/CompleteConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ public function testUserCheckerConfigWithNoCheckers()
264264

265265
protected function getContainer($file)
266266
{
267-
$file = $file.'.'.$this->getFileExtension();
267+
$file .= '.'.$this->getFileExtension();
268268

269269
if (isset(self::$containerCache[$file])) {
270270
return self::$containerCache[$file];

src/Symfony/Component/ClassLoader/ClassCollectionLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive =
5353
$classes = array_diff($classes, $declared);
5454

5555
// the cache is different depending on which classes are already declared
56-
$name = $name.'-'.substr(hash('sha256', implode('|', $classes)), 0, 5);
56+
$name .= '-'.substr(hash('sha256', implode('|', $classes)), 0, 5);
5757
}
5858

5959
$classes = array_unique($classes);

src/Symfony/Component/Console/Input/InputDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public function getSynopsis($short = false)
390390
if (!$argument->isRequired()) {
391391
$element = '['.$element.']';
392392
} elseif ($argument->isArray()) {
393-
$element = $element.' ('.$element.')';
393+
$element .= ' ('.$element.')';
394394
}
395395

396396
if ($argument->isArray()) {

src/Symfony/Component/Form/Tests/Util/StringUtilTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testTrimUtf8Separators($hex)
3535

3636
// Convert UCS-2BE to UTF-8
3737
$symbol = mb_convert_encoding($binary, 'UTF-8', 'UCS-2BE');
38-
$symbol = $symbol."ab\ncd".$symbol;
38+
$symbol .= "ab\ncd".$symbol;
3939

4040
$this->assertSame("ab\ncd", StringUtil::trim($symbol));
4141
}

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ public static function create($uri, $method = 'GET', $parameters = array(), $coo
351351

352352
if (isset($components['port'])) {
353353
$server['SERVER_PORT'] = $components['port'];
354-
$server['HTTP_HOST'] = $server['HTTP_HOST'].':'.$components['port'];
354+
$server['HTTP_HOST'] .= ':'.$components['port'];
355355
}
356356

357357
if (isset($components['user'])) {

0 commit comments

Comments
 (0)
0