[CS] Use combined assignment operators when possible
This commit is contained in:
parent
a1312fa4b2
commit
c561e99394
@ -90,7 +90,7 @@ EOF
|
|||||||
$address = $input->getArgument('address');
|
$address = $input->getArgument('address');
|
||||||
|
|
||||||
if (false === strpos($address, ':')) {
|
if (false === strpos($address, ':')) {
|
||||||
$address = $address.':'.$input->getOption('port');
|
$address .= ':'.$input->getOption('port');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isOtherServerProcessRunning($address)) {
|
if ($this->isOtherServerProcessRunning($address)) {
|
||||||
|
@ -112,7 +112,7 @@ EOF
|
|||||||
$address = $input->getArgument('address');
|
$address = $input->getArgument('address');
|
||||||
|
|
||||||
if (false === strpos($address, ':')) {
|
if (false === strpos($address, ':')) {
|
||||||
$address = $address.':'.$input->getOption('port');
|
$address .= ':'.$input->getOption('port');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$input->getOption('force') && $this->isOtherServerProcessRunning($address)) {
|
if (!$input->getOption('force') && $this->isOtherServerProcessRunning($address)) {
|
||||||
|
@ -49,7 +49,7 @@ class ServerStatusCommand extends ServerCommand
|
|||||||
$address = $input->getArgument('address');
|
$address = $input->getArgument('address');
|
||||||
|
|
||||||
if (false === strpos($address, ':')) {
|
if (false === strpos($address, ':')) {
|
||||||
$address = $address.':'.$input->getOption('port');
|
$address .= ':'.$input->getOption('port');
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove an orphaned lock file
|
// remove an orphaned lock file
|
||||||
|
@ -59,7 +59,7 @@ EOF
|
|||||||
|
|
||||||
$address = $input->getArgument('address');
|
$address = $input->getArgument('address');
|
||||||
if (false === strpos($address, ':')) {
|
if (false === strpos($address, ':')) {
|
||||||
$address = $address.':'.$input->getOption('port');
|
$address .= ':'.$input->getOption('port');
|
||||||
}
|
}
|
||||||
|
|
||||||
$lockFile = $this->getLockFile($address);
|
$lockFile = $this->getLockFile($address);
|
||||||
|
@ -263,7 +263,7 @@ EOF
|
|||||||
{
|
{
|
||||||
$extractedCatalogue = new MessageCatalogue($locale);
|
$extractedCatalogue = new MessageCatalogue($locale);
|
||||||
foreach ($transPaths as $path) {
|
foreach ($transPaths as $path) {
|
||||||
$path = $path.'views';
|
$path .= 'views';
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
$this->getContainer()->get('translation.extractor')->extract($path, $extractedCatalogue);
|
$this->getContainer()->get('translation.extractor')->extract($path, $extractedCatalogue);
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ EOF
|
|||||||
{
|
{
|
||||||
$currentCatalogue = new MessageCatalogue($locale);
|
$currentCatalogue = new MessageCatalogue($locale);
|
||||||
foreach ($transPaths as $path) {
|
foreach ($transPaths as $path) {
|
||||||
$path = $path.'translations';
|
$path .= 'translations';
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
$loader->loadMessages($path, $currentCatalogue);
|
$loader->loadMessages($path, $currentCatalogue);
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ EOF
|
|||||||
|
|
||||||
$fallbackCatalogue = new MessageCatalogue($fallbackLocale);
|
$fallbackCatalogue = new MessageCatalogue($fallbackLocale);
|
||||||
foreach ($transPaths as $path) {
|
foreach ($transPaths as $path) {
|
||||||
$path = $path.'translations';
|
$path .= 'translations';
|
||||||
if (is_dir($path)) {
|
if (is_dir($path)) {
|
||||||
$loader->loadMessages($path, $fallbackCatalogue);
|
$loader->loadMessages($path, $fallbackCatalogue);
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ abstract class CompleteConfigurationTest extends TestCase
|
|||||||
|
|
||||||
protected function getContainer($file)
|
protected function getContainer($file)
|
||||||
{
|
{
|
||||||
$file = $file.'.'.$this->getFileExtension();
|
$file .= '.'.$this->getFileExtension();
|
||||||
|
|
||||||
if (isset(self::$containerCache[$file])) {
|
if (isset(self::$containerCache[$file])) {
|
||||||
return self::$containerCache[$file];
|
return self::$containerCache[$file];
|
||||||
|
@ -53,7 +53,7 @@ class ClassCollectionLoader
|
|||||||
$classes = array_diff($classes, $declared);
|
$classes = array_diff($classes, $declared);
|
||||||
|
|
||||||
// the cache is different depending on which classes are already 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);
|
$classes = array_unique($classes);
|
||||||
|
@ -390,7 +390,7 @@ class InputDefinition
|
|||||||
if (!$argument->isRequired()) {
|
if (!$argument->isRequired()) {
|
||||||
$element = '['.$element.']';
|
$element = '['.$element.']';
|
||||||
} elseif ($argument->isArray()) {
|
} elseif ($argument->isArray()) {
|
||||||
$element = $element.' ('.$element.')';
|
$element .= ' ('.$element.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($argument->isArray()) {
|
if ($argument->isArray()) {
|
||||||
|
@ -35,7 +35,7 @@ class StringUtilTest extends TestCase
|
|||||||
|
|
||||||
// Convert UCS-2BE to UTF-8
|
// Convert UCS-2BE to UTF-8
|
||||||
$symbol = mb_convert_encoding($binary, 'UTF-8', 'UCS-2BE');
|
$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));
|
$this->assertSame("ab\ncd", StringUtil::trim($symbol));
|
||||||
}
|
}
|
||||||
|
@ -351,7 +351,7 @@ class Request
|
|||||||
|
|
||||||
if (isset($components['port'])) {
|
if (isset($components['port'])) {
|
||||||
$server['SERVER_PORT'] = $components['port'];
|
$server['SERVER_PORT'] = $components['port'];
|
||||||
$server['HTTP_HOST'] = $server['HTTP_HOST'].':'.$components['port'];
|
$server['HTTP_HOST'] .= ':'.$components['port'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($components['user'])) {
|
if (isset($components['user'])) {
|
||||||
|
Reference in New Issue
Block a user