Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9188f05

Browse filesBrowse files
committed
Merge branch '2.7' into 2.8
* 2.7: fixed CS fixed test fixed CS Remove default match from AbstractConfigCommand::findExtension
2 parents 0c28d75 + 15c37c2 commit 9188f05
Copy full SHA for 9188f05

File tree

Expand file treeCollapse file tree

17 files changed

+72
-63
lines changed
Filter options
Expand file treeCollapse file tree

17 files changed

+72
-63
lines changed

‎src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ public function getTransTests()
8787

8888
// transchoice
8989
array('{% transchoice count from "messages" %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
90-
'There is no apples', array('count' => 0),),
90+
'There is no apples', array('count' => 0)),
9191
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
92-
'There is 5 apples', array('count' => 5),),
92+
'There is 5 apples', array('count' => 5)),
9393
array('{% transchoice count %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
94-
'There is 5 apples (Symfony)', array('count' => 5, 'name' => 'Symfony'),),
94+
'There is 5 apples (Symfony)', array('count' => 5, 'name' => 'Symfony')),
9595
array('{% transchoice count with { \'%name%\': \'Symfony\' } %}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples (%name%){% endtranschoice %}',
96-
'There is 5 apples (Symfony)', array('count' => 5),),
96+
'There is 5 apples (Symfony)', array('count' => 5)),
9797
array('{% transchoice count into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
98-
'There is no apples', array('count' => 0),),
98+
'There is no apples', array('count' => 0)),
9999
array('{% transchoice 5 into "fr"%}{0} There is no apples|{1} There is one apple|]1,Inf] There is %count% apples{% endtranschoice %}',
100-
'There is 5 apples',),
100+
'There is 5 apples'),
101101

102102
// trans filter
103103
array('{{ "Hello"|trans }}', 'Hello'),

‎src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AbstractConfigCommand.php
+10-11Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,25 @@ protected function listBundles($output)
4545

4646
protected function findExtension($name)
4747
{
48-
$extension = null;
4948
$bundles = $this->initializeBundles();
5049
foreach ($bundles as $bundle) {
51-
$extension = $bundle->getContainerExtension();
50+
if ($name === $bundle->getName()) {
51+
return $bundle->getContainerExtension();
52+
}
5253

53-
if ($extension && ($name === $extension->getAlias() || $name === $bundle->getName())) {
54-
break;
54+
$extension = $bundle->getContainerExtension();
55+
if ($extension && $name === $extension->getAlias()) {
56+
return $extension;
5557
}
5658
}
5759

58-
if (!$extension) {
60+
if ('Bundle' !== substr($name, -6)) {
61+
$message = sprintf('No extensions with configuration available for "%s"', $name);
62+
} else {
5963
$message = sprintf('No extension with alias "%s" is enabled', $name);
60-
if (preg_match('/Bundle$/', $name)) {
61-
$message = sprintf('No extensions with configuration available for "%s"', $name);
62-
}
63-
64-
throw new \LogicException($message);
6564
}
6665

67-
return $extension;
66+
throw new \LogicException($message);
6867
}
6968

7069
public function validateConfiguration(ExtensionInterface $extension, $configuration)

‎src/Symfony/Component/Debug/DebugClassLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/DebugClassLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public function loadClass($class)
241241
$i = count($tail) - 1;
242242
$j = count($real) - 1;
243243

244-
while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) {
244+
while (isset($tail[$i], $real[$j]) && $tail[$i] === $real[$j]) {
245245
--$i;
246246
--$j;
247247
}

‎src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function testClassAlias()
175175
*/
176176
public function testDeprecatedSuper($class, $super, $type)
177177
{
178-
set_error_handler(function() { return false; });
178+
set_error_handler(function () { return false; });
179179
$e = error_reporting(0);
180180
trigger_error('', E_USER_DEPRECATED);
181181

@@ -227,7 +227,7 @@ class_exists('Test\\'.__NAMESPACE__.'\\NonDeprecatedInterfaceClass', true);
227227

228228
public function testDeprecatedSuperInSameNamespace()
229229
{
230-
set_error_handler(function() { return false; });
230+
set_error_handler(function () { return false; });
231231
$e = error_reporting(0);
232232
trigger_error('', E_USER_NOTICE);
233233

@@ -253,7 +253,7 @@ public function testReservedForPhp7()
253253
$this->markTestSkipped('PHP7 already prevents using reserved names.');
254254
}
255255

256-
set_error_handler(function() { return false; });
256+
set_error_handler(function () { return false; });
257257
$e = error_reporting(0);
258258
trigger_error('', E_USER_NOTICE);
259259

‎src/Symfony/Component/DependencyInjection/DefinitionDecorator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/DefinitionDecorator.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public function setFactory($callable)
7878

7979
/**
8080
* {@inheritdoc}
81-
*
8281
*/
8382
public function setFactoryClass($class)
8483
{

‎src/Symfony/Component/Filesystem/LockHandler.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/LockHandler.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function lock($blocking = false)
6969
}
7070

7171
// Silence error reporting
72-
set_error_handler(function() {});
72+
set_error_handler(function () {});
7373

7474
if (!$this->handle = fopen($this->file, 'r')) {
7575
if ($this->handle = fopen($this->file, 'x')) {

‎src/Symfony/Component/Finder/Tests/FinderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Finder/Tests/FinderTest.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,7 @@ public function testRegexSpecialCharsLocationWithPathRestrictionContainingStartF
527527
$finder->in(__DIR__.DIRECTORY_SEPARATOR.'Fixtures'.DIRECTORY_SEPARATOR.'r+e.gex[c]a(r)s')
528528
->path('/^dir/');
529529

530-
$expected = array('r+e.gex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir',
531-
'r+e.gex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'bar.dat',);
530+
$expected = array('r+e.gex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir', 'r+e.gex[c]a(r)s'.DIRECTORY_SEPARATOR.'dir'.DIRECTORY_SEPARATOR.'bar.dat');
532531
$this->assertIterator($this->toAbsoluteFixtures($expected), $finder);
533532
}
534533

‎src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/AttributeBagTest.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ protected function setUp()
4343
'category' => array(
4444
'fishing' => array(
4545
'first' => 'cod',
46-
'second' => 'sole',),
46+
'second' => 'sole',
4747
),
48+
),
4849
);
4950
$this->bag = new AttributeBag('_sf2');
5051
$this->bag->initialize($this->array);

‎src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ protected function setUp()
4343
'category' => array(
4444
'fishing' => array(
4545
'first' => 'cod',
46-
'second' => 'sole',),
46+
'second' => 'sole',
4747
),
48+
),
4849
);
4950
$this->bag = new NamespacedAttributeBag('_sf2', '/');
5051
$this->bag->initialize($this->array);

‎src/Symfony/Component/OptionsResolver/Tests/OptionsResolver2Dot6Test.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/OptionsResolver/Tests/OptionsResolver2Dot6Test.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ public function testCatchedExceptionFromNormalizerDoesNotCrashOptionResolver()
11021102
$this->resolver->setNormalizer('catcher', function (Options $options) {
11031103
try {
11041104
return $options['thrower'];
1105-
} catch(\Exception $e) {
1105+
} catch (\Exception $e) {
11061106
return false;
11071107
}
11081108
});
@@ -1126,7 +1126,7 @@ public function testCatchedExceptionFromLazyDoesNotCrashOptionResolver()
11261126
$this->resolver->setDefault('catcher', function (Options $options) {
11271127
try {
11281128
return $options['thrower'];
1129-
} catch(\Exception $e) {
1129+
} catch (\Exception $e) {
11301130
return false;
11311131
}
11321132
});

‎src/Symfony/Component/Routing/Tests/RouteCompilerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Routing/Tests/RouteCompilerTest.php
+41-27Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,26 @@ public function provideCompileData()
3838
array('/foo'),
3939
'/foo', '#^/foo$#s', array(), array(
4040
array('text', '/foo'),
41-
),),
41+
),
42+
),
4243

4344
array(
4445
'Route with a variable',
4546
array('/foo/{bar}'),
4647
'/foo', '#^/foo/(?P<bar>[^/]++)$#s', array('bar'), array(
4748
array('variable', '/', '[^/]++', 'bar'),
4849
array('text', '/foo'),
49-
),),
50+
),
51+
),
5052

5153
array(
5254
'Route with a variable that has a default value',
5355
array('/foo/{bar}', array('bar' => 'bar')),
5456
'/foo', '#^/foo(?:/(?P<bar>[^/]++))?$#s', array('bar'), array(
5557
array('variable', '/', '[^/]++', 'bar'),
5658
array('text', '/foo'),
57-
),),
59+
),
60+
),
5861

5962
array(
6063
'Route with several variables',
@@ -63,7 +66,8 @@ public function provideCompileData()
6366
array('variable', '/', '[^/]++', 'foobar'),
6467
array('variable', '/', '[^/]++', 'bar'),
6568
array('text', '/foo'),
66-
),),
69+
),
70+
),
6771

6872
array(
6973
'Route with several variables that have default values',
@@ -72,7 +76,8 @@ public function provideCompileData()
7276
array('variable', '/', '[^/]++', 'foobar'),
7377
array('variable', '/', '[^/]++', 'bar'),
7478
array('text', '/foo'),
75-
),),
79+
),
80+
),
7681

7782
array(
7883
'Route with several variables but some of them have no default values',
@@ -81,73 +86,82 @@ public function provideCompileData()
8186
array('variable', '/', '[^/]++', 'foobar'),
8287
array('variable', '/', '[^/]++', 'bar'),
8388
array('text', '/foo'),
84-
),),
89+
),
90+
),
8591

8692
array(
8793
'Route with an optional variable as the first segment',
8894
array('/{bar}', array('bar' => 'bar')),
8995
'', '#^/(?P<bar>[^/]++)?$#s', array('bar'), array(
9096
array('variable', '/', '[^/]++', 'bar'),
91-
),),
97+
),
98+
),
9299

93100
array(
94101
'Route with a requirement of 0',
95102
array('/{bar}', array('bar' => null), array('bar' => '0')),
96103
'', '#^/(?P<bar>0)?$#s', array('bar'), array(
97104
array('variable', '/', '0', 'bar'),
98-
),),
105+
),
106+
),
99107

100108
array(
101109
'Route with an optional variable as the first segment with requirements',
102110
array('/{bar}', array('bar' => 'bar'), array('bar' => '(foo|bar)')),
103111
'', '#^/(?P<bar>(foo|bar))?$#s', array('bar'), array(
104112
array('variable', '/', '(foo|bar)', 'bar'),
105-
),),
113+
),
114+
),
106115

107116
array(
108117
'Route with only optional variables',
109118
array('/{foo}/{bar}', array('foo' => 'foo', 'bar' => 'bar')),
110119
'', '#^/(?P<foo>[^/]++)?(?:/(?P<bar>[^/]++))?$#s', array('foo', 'bar'), array(
111120
array('variable', '/', '[^/]++', 'bar'),
112121
array('variable', '/', '[^/]++', 'foo'),
113-
),),
122+
),
123+
),
114124

115125
array(
116126
'Route with a variable in last position',
117127
array('/foo-{bar}'),
118128
'/foo', '#^/foo\-(?P<bar>[^/]++)$#s', array('bar'), array(
119-
array('variable', '-', '[^/]++', 'bar'),
120-
array('text', '/foo'),
121-
),),
129+
array('variable', '-', '[^/]++', 'bar'),
130+
array('text', '/foo'),
131+
),
132+
),
122133

123134
array(
124135
'Route with nested placeholders',
125136
array('/{static{var}static}'),
126137
'/{static', '#^/\{static(?P<var>[^/]+)static\}$#s', array('var'), array(
127-
array('text', 'static}'),
128-
array('variable', '', '[^/]+', 'var'),
129-
array('text', '/{static'),
130-
),),
138+
array('text', 'static}'),
139+
array('variable', '', '[^/]+', 'var'),
140+
array('text', '/{static'),
141+
),
142+
),
131143

132144
array(
133145
'Route without separator between variables',
134146
array('/{w}{x}{y}{z}.{_format}', array('z' => 'default-z', '_format' => 'html'), array('y' => '(y|Y)')),
135147
'', '#^/(?P<w>[^/\.]+)(?P<x>[^/\.]+)(?P<y>(y|Y))(?:(?P<z>[^/\.]++)(?:\.(?P<_format>[^/]++))?)?$#s', array('w', 'x', 'y', 'z', '_format'), array(
136-
array('variable', '.', '[^/]++', '_format'),
137-
array('variable', '', '[^/\.]++', 'z'),
138-
array('variable', '', '(y|Y)', 'y'),
139-
array('variable', '', '[^/\.]+', 'x'),
140-
array('variable', '/', '[^/\.]+', 'w'),
141-
),),
148+
array('variable', '.', '[^/]++', '_format'),
149+
array('variable', '', '[^/\.]++', 'z'),
150+
array('variable', '', '(y|Y)', 'y'),
151+
array('variable', '', '[^/\.]+', 'x'),
152+
array('variable', '/', '[^/\.]+', 'w'),
153+
),
154+
),
142155

143156
array(
144157
'Route with a format',
145158
array('/foo/{bar}.{_format}'),
146159
'/foo', '#^/foo/(?P<bar>[^/\.]++)\.(?P<_format>[^/]++)$#s', array('bar', '_format'), array(
147-
array('variable', '.', '[^/]++', '_format'),
148-
array('variable', '/', '[^/\.]++', 'bar'),
149-
array('text', '/foo'),
150-
),),
160+
array('variable', '.', '[^/]++', '_format'),
161+
array('variable', '/', '[^/\.]++', 'bar'),
162+
array('text', '/foo'),
163+
),
164+
),
151165
);
152166
}
153167

‎src/Symfony/Component/Serializer/Serializer.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Serializer.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ private function denormalizeObject($data, $class, $format, array $context = arra
249249
foreach ($this->normalizers as $normalizer) {
250250
if ($normalizer instanceof DenormalizerInterface
251251
&& $normalizer->supportsDenormalization($data, $class, $format)) {
252-
253252
return $normalizer->denormalize($data, $class, $format, $context);
254253
}
255254
}

‎src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,4 +510,3 @@ class StaticPropertyDummy
510510
{
511511
private static $property = 'value';
512512
}
513-

‎src/Symfony/Component/Validator/ConstraintViolationInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ConstraintViolationInterface.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public function getMessageTemplate();
6060
* that appear in the message template.
6161
*
6262
* @see getMessageTemplate()
63-
*
6463
* @deprecated since version 2.7, to be replaced by getParameters() in 3.0.
6564
*/
6665
public function getMessageParameters();

‎src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitRequire54.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitRequire54.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\VarDumper\Test\VarDumperTestCase;
1515
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
1616

17-
class VarDumperTestTraitTest extends VarDumperTestCase
17+
class VarDumperTestTraitRequire54 extends VarDumperTestCase
1818
{
1919
use VarDumperTestTrait;
2020

‎src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@
1313
if (PHP_VERSION_ID >= 50400) {
1414
require __DIR__.'/VarDumperTestTraitRequire54.php';
1515
}
16-

‎src/Symfony/Component/Yaml/Escaper.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Yaml/Escaper.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ class Escaper
3333
"\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f",
3434
"\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17",
3535
"\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f",
36-
"\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",);
36+
"\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9");
3737
private static $escaped = array('\\\\', '\\"', '\\\\', '\\"',
3838
'\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a',
3939
'\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f',
4040
'\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17',
4141
'\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f',
42-
'\\N', '\\_', '\\L', '\\P',);
42+
'\\N', '\\_', '\\L', '\\P');
4343

4444
/**
4545
* Determines if a PHP value would require double quoting in YAML.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.