Skip to content

Commit 67687c8

Browse files
committed
[CS Fix] Consistent coding-style of concatenation operator usage
1 parent cd96a41 commit 67687c8

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Options.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function get($option)
225225
$this->reading = true;
226226

227227
if (!array_key_exists($option, $this->options)) {
228-
throw new \OutOfBoundsException('The option "' . $option . '" does not exist.');
228+
throw new \OutOfBoundsException('The option "'.$option.'" does not exist.');
229229
}
230230

231231
if (isset($this->lazy[$option])) {
@@ -459,7 +459,7 @@ private function resolve($option)
459459
}
460460
}
461461

462-
throw new OptionDefinitionException('The options "' . implode('", "', $conflicts) . '" have a cyclic dependency.');
462+
throw new OptionDefinitionException('The options "'.implode('", "', $conflicts).'" have a cyclic dependency.');
463463
}
464464

465465
$this->lock[$option] = true;
@@ -497,7 +497,7 @@ private function normalize($option)
497497
}
498498
}
499499

500-
throw new OptionDefinitionException('The options "' . implode('", "', $conflicts) . '" have a cyclic dependency.');
500+
throw new OptionDefinitionException('The options "'.implode('", "', $conflicts).'" have a cyclic dependency.');
501501
}
502502

503503
/** @var \Closure $normalizer */

OptionsResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ private function validateOptionsExistence(array $options)
253253
ksort($diff);
254254

255255
throw new InvalidOptionsException(sprintf(
256-
(count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.') . ' Known options are: "%s"',
256+
(count($diff) > 1 ? 'The options "%s" do not exist.' : 'The option "%s" does not exist.').' Known options are: "%s"',
257257
implode('", "', array_keys($diff)),
258258
implode('", "', array_keys($this->knownOptions))
259259
));
@@ -320,7 +320,7 @@ private function validateOptionTypes(array $options)
320320
$allowedTypes = (array) $allowedTypes;
321321

322322
foreach ($allowedTypes as $type) {
323-
$isFunction = 'is_' . $type;
323+
$isFunction = 'is_'.$type;
324324

325325
if (function_exists($isFunction) && $isFunction($value)) {
326326
continue 2;

Tests/OptionsResolverTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function testResolveLazyDependencyOnOptional()
6363
$this->resolver->setDefaults(array(
6464
'one' => '1',
6565
'two' => function (Options $options) {
66-
return $options['one'] . '2';
66+
return $options['one'].'2';
6767
},
6868
));
6969

@@ -115,7 +115,7 @@ public function testResolveLazyDependencyOnOptionalWithoutDefault()
115115
/* @var \PHPUnit_Framework_TestCase $test */
116116
$test->assertTrue(isset($options['one']));
117117

118-
return $options['one'] . '2';
118+
return $options['one'].'2';
119119
},
120120
));
121121

@@ -136,7 +136,7 @@ public function testResolveLazyDependencyOnRequired()
136136
));
137137
$this->resolver->setDefaults(array(
138138
'two' => function (Options $options) {
139-
return $options['one'] . '2';
139+
return $options['one'].'2';
140140
},
141141
));
142142

@@ -591,7 +591,7 @@ public function testNormalizersTransformFinalOptions()
591591
));
592592
$this->resolver->setNormalizers(array(
593593
'foo' => function (Options $options, $value) {
594-
return $options['bam'] . '[' . $value . ']';
594+
return $options['bam'].'['.$value.']';
595595
},
596596
));
597597

Tests/OptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ public function testNormalizerReceivesUnnormalizedValue()
225225
$this->options->set('foo', 'bar');
226226

227227
$this->options->setNormalizer('foo', function (Options $options, $value) {
228-
return 'normalized[' . $value . ']';
228+
return 'normalized['.$value.']';
229229
});
230230

231231
$this->assertEquals('normalized[bar]', $this->options->get('foo'));

0 commit comments

Comments
 (0)