8000 Static code analysis · symfony/symfony@8db691a · GitHub
[go: up one dir, main page]

Skip to content

Commit 8db691a

Browse files
committed
Static code analysis
1 parent b81cac8 commit 8db691a

File tree

39 files changed

+63
-83
lines changed

39 files changed

+63
-83
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function setMappingDriverConfig(array $mappingConfig, $mappingName)
153153
*/
154154
protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container)
155155
{
156-
$bundleDir = dirname($bundle->getFilename());
156+
$bundleDir = dirname($bundle->getFileName());
157157

158158
if (!$bundleConfig['type']) {
159159
$bundleConfig['type'] = $this->detectMetadataDriver($bundleDir, $container);

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private function updateValidatorMappingFiles(ContainerBuilder $container, $mappi
6060

6161
foreach ($container->getParameter('kernel.bundles') as $bundle) {
6262
$reflection = new \ReflectionClass($bundle);
63-
if (is_file($file = dirname($reflection->getFilename()).'/'.$validationPath)) {
63+
if (is_file($file = dirname($reflection->getFileName()).'/'.$validationPath)) {
6464
$files[] = realpath($file);
6565
$container->addResource(new FileResource($file));
6666
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9595
$extractor = $this->getContainer()->get('translation.extractor');
9696
$extractor->setPrefix($input->getOption('prefix'));
9797
foreach ($bundleTransPaths as $path) {
98-
$path = $path.'views';
98+
$path .= 'views';
9999
if (is_dir($path)) {
100100
$extractor->extract($path, $extractedCatalogue);
101101
}
@@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
106106
$output->writeln('Loading translation files');
107107
$loader = $this->getContainer()->get('translation.loader');
108108
foreach ($bundleTransPaths as $path) {
109-
$path = $path.'translations';
109+
$path .= 'translations';
110110
if (is_dir($path)) {
111111
$loader->loadMessages($path, $currentCatalogue);
112112
}
@@ -151,7 +151,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
151151
$output->writeln('Writing files');
152152
$bundleTransPath = false;
153153
foreach ($bundleTransPaths as $path) {
154-
$path = $path.'translations';
154+
$path .= 'translations';
155155
if (is_dir($path)) {
156156
$bundleTransPath = $path;
157157
}
1241

src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ build: 56
117117
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat;
118118
}
119119
.sf-button .btn-bg {
120-
padding: 0px 14px;
120+
padding: 0 14px;
121121
color: #636363;
122122
line-height: 28px;
123123
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left;

src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function load(array $configs, ContainerBuilder $container)
7575
}
7676

7777
$reflection = new \ReflectionClass($class);
78-
if (is_dir($dir = dirname($reflection->getFilename()).'/Resources/views')) {
78+
if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/views')) {
7979
$this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle);
8080
}
8181
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/body.css.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ build: 56
116116
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat;
117117
}
118118
.sf-button .btn-bg {
119-
padding: 0px 14px;
119+
padding: 0 14px;
120120
color: #636363;
121121
line-height: 28px;
122122
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left;

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
var leftIconPath = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAhCAYAAADOHBvaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4tJREFUeNrkl19IU1Ecx7fZJN2arhq2JUWJlEZL1MAm1B582GBErMJqtabzRRAqFAYa9OfFFx+KQEG3MkYRZkkEJUUwctVSKCJWJojL1ZiydJvLtNXW98AW1znv7t0CHzrw5Xe3nXM/O/f8zvf8LjcajXJWo/E4q9T+P/CaNMZw29rahBMTE3LyoaKi4m1zc/M865swSS6bzZbT09NzfG5urjYUCikikYiQ+ntWVlZQKBQ+F4lE/Var9Ta+CmcK5hsMhpNer/fiwsLCFiYzycnJGZfJZOctFss9uj+wInhwcDDfbDb3+Hy+I+msoVQqNZtMpnNlZWUhxuChoaENHR0djwOBwN5MEkgsFtsGBgY0uPzOJKtzu7q6rmcKJW12dlaJpbqGy7WpwPyWlpZGj8dzkMX9B+l+dLlcda2trbrEHbQEPDY2Jh0dHTWxgF5AxqsRz9J1cjqdlxDWrwTO7u3tNWK7SFhAL8e221WE7pU6Ytk2t7e311JnTQWLJycntWyhpCmVShXCKboBMJyjCKJlzgVzKJiamtrBAKoH1JoAvU+2MN2g6enp3QgboRnqjHl2u70kHA7zU0APpQMlze/357vd7gKyhang7GAwKEsx1gLoAwp0E8JdJtB4w1LK4sw4OAtWl51inBGwAxT/9iLUQb+ZgsHgJ4I5hYWFAQZjbYBrKPB+hGNM4DweL1pUVBRMzOpweXm5WyAQ/GIAfwj4GbZwiUTyIy8vby7eLw4mQH9paamX4VO7kgTeTTeguLjYg0AOjAgVTD58UygUb1i41l84ogGhka4z+rwi9p3MQHwajeYRjrNFlvBbiDfoOmFtQzU1NU/J5JKBA3w+/71er3/J8hA6kSKpOPX19c9w+YH4VDIwqRbG1Wr1HZVK5eX8o6bVaj9XV1cTk3HFcinpsUjs7AWKNwvWO5gpFI93pqmpyYxLB0neVBUIcaI90OHOzs7TfX19ErZA8niNRuNXnU53M2apTmiBSc0lgEoh9cjIiBYV5i6c1YxKYblc/rOhoeEdIin2nkCfoHk2VSYpV7ZCVdB+h8OxDyocHh4WoEJZskRwvUhVVVUIcldWVtrx1XPoNfQFWkynvCWzzIe2QSXQTmg7Od5QT+WinuagliaFnI8kJvQxJpJIATo34zJ8WyR/YF2sfBFDpKCPHyqLMUeajSVniJq9mYKXjUtwPdY34a7W+/EfAQYAZM5kh2zoNWsAAAAASUVORK5CYII=",
6767
rightIconPath = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAhCAYAAADOHBvaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4tJREFUeNrsl11IU2EYx91ytrnpmmy4TYNkqGhEJGiiabuQ2EAiZ1kZW9NtF4pgoBB40weJeCHVjReygVmuIhP6gLoJJNQGadhiJcLa2sb8KN2nrprbel7YYh7WzjnOsIsO/Hnes533/Z33PB/nOZRIJJK2GwflP/ifBg8MDGTOzs4eQeOCggJjb2+vH4aRvwGmyeXyZq/Xe9rv99eGQqHs+D+pVKqfxWJNZ2VlPdRoNPfFYnEgVTBNpVI1Op3OG4FAQETkDul0uo3P518dHh6+B6dB0uC5uTlWf3//zcXFRfV2fMjlcsfUarVGIpG4yYCZDQ0Nz10ulziVAGKz2W+7u7ulNTU1q0TAdKVSOWi1Wlt2InqFQuFTvV5/HoYbW+ICc116T0/PBQLQl0TBEB8nYddtKF6SgXNMJtM1nLUuTUxMSMFeIQqfn5+/vLCwIPgTOL2vr++sx+PJS7LGEEBvowHY60ThkII8iHIVDDMSgbMtFssZnDXkkKOS2AkZuM1mk4HhJAJzV1ZWDuHMZ4DGE8AVeODl5eVin8+XiwVT7HZ7rtvt3kfg5hPB74I5lWxSMBikTU5OlsSYMTAVHoWQRJYg+COA8+PgT8Dokk2CkiuM+fk3mMFg0EiAQ6AWgC3FfoCbOA5GlfRuGQwE3bPFxyKRyAvFPkIQeg6gY3HQerRpvIn5+fkerI9DUN58PB4vsA1oJ5hneFAmk7lZVlZmj704YuAwSrfCwkInzvyhBNBbRHxTWlqK3IJeGJvYdHLBQm9w5rfBNUqyUHRUVVW9A7Ma3eSWlwRK7np4/w6azWYWzjp6UDNRqEAg+DEyMtJJo9Eew+k37I59oI+tra2vIMjw1momkQFpCoViGqAfYOhJVLnQs7dWV1ePy2SyLzvV1EEjsCSVSh/A0BzfkWC3hpxv6Ojo0NbV1a2lCgW/eru6ulBRmQKt4TYCoIMg2ejo6EWdTpcXDodJQ5uamr62t7ffgSHy63tQgEjrkwkqBp0wGo2NWq32MNgMIsCioqJN6DRN5eXl43D6AsUNaJ1Ml7kXFRvQUVDtzMzMMYPBsB/EcjgcVEx7E66oqFivrKx0gFBKvkYuA6FY+b6d9hbVVTboAKgkKtTmcqHgM6G/TuNwOBvRFPmMmg3QJ5Alvlik0tCng1Bu50TznRV9Iuj4iaoeKkDRAPIlA6b67UTBlFvSi+zaR9svAQYA6+V18DvfH/8AAAAASUVORK5CYII=",
6868
menu = document.getElementById('navigation'), savedState = Sfjs.getPreference('menu/displayState'),
69-
displayState, elem, className;
69+
displayState;
7070
7171
if (null === savedState) {
7272
savedState = 'block';

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ abbr {
128128
}
129129
#menu-profiler li a span.label {
130130
display: block;
131-
padding: 20px 0px 16px 65px;
131+
padding: 20px 0 16px 65px;
132132
min-height: 16px;
133133
overflow: hidden;
134134
}
@@ -199,7 +199,7 @@ li {
199199
#resume {
200200
background-color: #f6f6f6;
201201
border-bottom: 1px solid #dfdfdf;
202-
padding: 18px 10px 0px;
202+
padding: 18px 10px 0;
203203
margin-left: 250px;
204204
height: 34px;
205205
color: #313131;
@@ -266,7 +266,6 @@ ul.alt li.warning {
266266
margin-bottom: 1px;
267267
}
268268
ul.sf-call-stack li {
269-
text-size: small;
270269
padding: 0 0 0 20px;
271270
}
272271
td.main, td.menu {
@@ -366,13 +365,12 @@ td.main, td.menu {
366365
line-height: 1.5em;
367366
}
368367
.sf-profiler-timeline .legends span {
369-
border-left-width: 10px;
370-
border-left-style: solid;
368+
border-left: 10px solid;
371369
padding: 0 10px 0 5px;
372370
}
373371
.sf-profiler-timeline canvas {
374-
border: 1px solid #999;
375-
border-width: 1px 0;
372+
border: 1px #999;
373+
border-style: solid none;
376374
}
377375
.collapsed-menu-parents #resume,
378376
.collapsed-menu-parents #collector-content {

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@
9393
}
9494

9595
.sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status {
96-
padding: 0px 5px;
96+
padding: 0 5px;
9797
border-radius: 5px;
98-
margin-bottom: 0px;
98+
margin-bottom: 0;
9999
vertical-align: top;
100100
}
101101

@@ -129,13 +129,11 @@
129129
display: none;
130130
position: absolute;
131131
background-color: #fff;
132-
border: 1px solid #bbb;
133132
padding: 9px 0;
134133
margin-left: -1px;
135134

136135
bottom: 38px;
137-
border-bottom-width: 0;
138-
border-bottom: 1px solid #bbb;
136+
border: 1px solid #bbb;
139137
border-radius: 4px 4px 0 0;
140138
}
141139

@@ -198,7 +196,7 @@
198196
}
199197

200198
.sf-toolbar-block .sf-toolbar-icon > a,
201-
.sf-toolbar-block .sf-toolbar-icon > a:link
199+
.sf-toolbar-block .sf-toolbar-icon > a:link,
202200
.sf-toolbar-block .sf-toolbar-icon > a:hover {
203201
color: black !important;
204202
}

src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ public function testReturns404onTokenNotFound()
6262
if ('found' == $token) {
6363
return new Profile($token);
6464
}
65-
66-
return;
6765
}))
6866
;
6967

src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testHtmlShakespear($css, $count)
7474
$document = simplexml_import_dom($document);
7575
$bodies = $document->xpath('//body');
7676
$elements = $bodies[0]->xpath($translator->cssToXPath($css));
77-
$this->assertEquals($count, count($elements));
77+
$this->assertCount($count, $elements);
7878
}
7979

8080
public function getXpathLiteralTestData()

src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/interfaces1.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,3 @@
1111
$container->setDefinition('foo', $definition);
1212

1313
return $container;
14-
15-
if (!class_exists('FooClass')) {
16-
class FooClass
17-
{
18-
public $bar;
19-
20-
public function setBar($bar)
21-
{
22-
$this->bar = $bar;
23-
}
24-
}
25-
}

src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,27 @@ public function testAddASubscriberService()
5252
->with($event)
5353
;
5454

55+
$service
56+
->expects($this->once())
57+
->method('onEventWithPriority')
58+
->with($event)
59+
;
60+
61+
$service
62+
->expects($this->once())
63+
->method('onEventNested')
64+
->with($event)
65+
;
66+
5567
$container = new Container();
5668
$container->set('service.subscriber', $service);
5769

5870
$dispatcher = new ContainerAwareEventDispatcher($container);
5971
$dispatcher->addSubscriberService('service.subscriber', 'Symfony\Component\EventDispatcher\Tests\SubscriberService');
6072

6173
$dispatcher->dispatch('onEvent', $event);
74+
$dispatcher->dispatch('onEventWithPriority', $event);
75+
$dispatcher->dispatch('onEventNested', $event);
6276
}
6377

6478
public function testPreventDuplicateListenerService()
@@ -233,12 +247,20 @@ public static function getSubscribedEvents()
233247
{
234248
return array(
235249
'onEvent' => 'onEvent',
236-
'onEvent' => array('onEvent', 10),
237-
'onEvent' => array('onEvent'),
250+
'onEventWithPriority' => array('onEventWithPriority', 10),
251+
'onEventNested' => array(array('onEventNested')),
238252
);
239253
}
240254

241255
public function onEvent(Event $e)
242256
{
243257
}
258+
259+
public function onEventWithPriority(Event $e)
260+
{
261+
}
262+
263+
public function onEventNested(Event $e)
264+
{
265+
}
244266
}

src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function searchInDirectory($dir)
9494
$command->setErrorHandler(
9595
$this->ignoreUnreadableDirs
9696
// If directory is unreadable and finder is set to ignore it, `stderr` is ignored.
97-
? function ($stderr) { return; }
97+
? function ($stderr) { }
9898
: function ($stderr) { throw new AccessDeniedException($stderr); }
9999
);
100100

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ public function buildForm(FormBuilderInterface $builder, array $options)
7171

7272
if ($options['multiple']) {
7373
$builder->addViewTransformer(new ChoicesToBooleanArrayTransformer($options['choice_list']));
74-
$builder->addEventSubscriber(new FixCheckboxInputListener($options['choice_list']), 10);
74+
$builder->addEventSubscriber(new FixCheckboxInputListener($options['choice_list']));
7575
} else {
7676
$builder->addViewTransformer(new ChoiceToBooleanArrayTransformer($options['choice_list'], $builder->has('placeholder')));
77-
$builder->addEventSubscriber(new FixRadioInputListener($options['choice_list'], $builder->has('placeholder')), 10);
77+
$builder->addEventSubscriber(new FixRadioInputListener($options['choice_list'], $builder->has('placeholder')));
7878
}
7979
} else {
8080
if ($options['multiple']) {

src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,6 @@ public function getValidationGroups(FormInterface $form)
558558
return array('group1', 'group2');
559559
}
560560

561-
private function getMockExecutionContext()
562-
{
563-
return $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
564-
}
565-
566561
/**
567562
* @param string $name
568563
* @param string $dataClass

src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testValidationGroupsCanBeSetToCallback()
6464
public function testValidationGroupsCanBeSetToClosure()
6565
{
6666
$form = $this->createForm(array(
67-
'validation_groups' => function (FormInterface $form) { return; },
67+
'validation_groups' => function (FormInterface $form) { },
6868
));
6969

7070
$this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups')));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 10000 line change
@@ -482,6 +482,6 @@ public function testCount()
482482
unset($map[0]);
483483
$map[] = 3;
484484

485-
$this->assertSame(2, count($map));
485+
$this->assertCount(2, $map);
486486
}
487487
}

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,8 +1707,6 @@ protected function preparePathInfo()
17071707
return '/';
17081708
}
17091709

1710-
$pathInfo = '/';
1711-
17121710
// Remove the query string from REQUEST_URI
17131711
if ($pos = strpos($requestUri, '?')) {
17141712
$requestUri = substr($requestUri, 0, $pos);

src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testWrongTableOptionsRead()
5757
{
5858
$storage = new PdoSessionHandler($this->pdo, array('db_table' => 'bad_name'));
5959
$this->setExpectedException('RuntimeException');
60-
$storage->read('foo', 'bar');
60+
$storage->read('foo');
6161
}
6262

6363
public function testWriteRead()

src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ protected function invalidate(Request $request, $catch = false)
255255
// invalidate only when the response is successful
256256
if ($response->isSuccessful() || $response->isRedirect()) {
257257
try {
258-
$this->store->invalidate($request, $catch);
258+
$this->store->invalidate($request);
259259

260260
// As per the RFC, invalidate Location and Content-Location URLs if present
261261
foreach (array('Location', 'Content-Location') as $header) {
@@ -481,7 +481,7 @@ protected function forward(Request $request, $catch = false, Response $entry = n
481481
$this->processResponseBody($request, $response);
482482

483483
if ($this->isPrivateRequest($request) && !$response->headers->hasCacheControlDirective('public')) {
484-
$response->setPrivate(true);
484+
$response->setPrivate();
485485
} elseif ($this->options['default_ttl'] > 0 && null === $response->getTtl() && !$response->headers->getCacheControlDirective('must-revalidate')) {
486486
$response->setTtl($this->options['default_ttl']);
487487
}

src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected function fetch($db, $query, array $args = array())
7777
$return = array();
7878

7979
if ($db instanceof \SQLite3) {
80-
$stmt = $this->prepareStatement($db, $query, true);
80+
$stmt = $this->prepareStatement($db, $query);
8181
foreach ($args as $arg => $val) {
8282
$stmt->bindValue($arg, $val, is_int($val) ? \SQLITE3_INTEGER : \SQLITE3_TEXT);
8383
}

src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir
121121

122122
return $data;
123123
}
124-
125-
return;
126124
}
127125

128126
/**

src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,13 @@ protected function generateDataForLocale(BundleReaderInterface $reader, $tempDir
133133

134134
return $data;
135135
}
136-
137-
return;
138136
}
139137

140138
/**
141139
* {@inheritdoc}
142140
*/
143141
protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir)
144142
{
145-
return;
146143
}
147144

148145
/**

src/Symfony/Component/Intl/Data/Util/LocaleScanner.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function scanLocales($sourceDir)
6767
*/
6868
public function scanAliases($sourceDir)
6969
{
70-
$locales = $this->scanLocales($sourceDir, '.txt');
70+
$locales = $this->scanLocales($sourceDir);
7171
$aliases = array();
7272

7373
// Delete locales that are no aliases

src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,7 @@ protected function getDefaultPattern()
647647
if (self::NONE !== $this->timetype) {
648648
$patternParts[] = $this->defaultTimeFormats[$this->timetype];
649649
}
650-
$pattern = implode(', ', $patternParts);
651650

652-
return $pattern;
651+
return implode(', ', $patternParts);
653652
}
654653
}

src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -709,11 +709,9 @@ private function roundCurrency($value, $currency)
709709
private function round($value, $precision)
710710
{
711711
$precision = $this->getUnitializedPrecision($value, $precision);
712-
713712
$roundingMode = self::$phpRoundingMap[$this->getAttribute(self::ROUNDING_MODE)];
714-
$value = round($value, $precision, $roundingMode);
715713

716-
return $value;
714+
return round($value, $precision, $roundingMode);
717715
}
718716

719717
/**

0 commit comments

Comments
 (0)
0