Skip to content

Commit afdfb4e

Browse files
Merge branch '3.3' into 3.4
* 3.3: [CS][2.7] yoda_style, no_unneeded_curly_braces, no_unneeded_final_method, semicolon_after_instruction [Filesystem] mirror - fix copying content with same name as source/target. Removed unnecessary getDefinition() call. .php_cs.dist - simplify config [WebProfilerBundle] fixed TemplateManager when using Twig 2 without compat interfaces
2 parents 009eb45 + 5c9913f commit afdfb4e

15 files changed

+28
-28
lines changed

Command/ConfigDumpReferenceCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9797
$format = $input->getOption('format');
9898
$path = $input->getArgument('path');
9999

100-
if ($path !== null && 'yaml' !== $format) {
100+
if (null !== $path && 'yaml' !== $format) {
101101
$errorIo->error('The "path" option is only available for the "yaml" format.');
102102

103103
return 1;
@@ -109,7 +109,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
109109
$message = sprintf('Default configuration for "%s"', $name);
110110
}
111111

112-
if ($path !== null) {
112+
if (null !== $path) {
113113
$message .= sprintf(' at path "%s"', $path);
114114
}
115115

Command/TranslationUpdateCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
136136
$errorIo = $io->getErrorStyle();
137137

138138
// check presence of force or dump-message
139-
if ($input->getOption('force') !== true && $input->getOption('dump-messages') !== true) {
139+
if (true !== $input->getOption('force') && true !== $input->getOption('dump-messages')) {
140140
$errorIo->error('You must choose one of --force or --dump-messages');
141141

142142
return 1;
@@ -250,19 +250,19 @@ protected function execute(InputInterface $input, OutputInterface $output)
250250
$extractedMessagesCount += $domainMessagesCount;
251251
}
252252

253-
if ($input->getOption('output-format') == 'xlf') {
253+
if ('xlf' == $input->getOption('output-format')) {
254254
$errorIo->comment('Xliff output version is <info>1.2</info>');
255255
}
256256

257257
$resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was');
258258
}
259259

260-
if ($input->getOption('no-backup') === true) {
260+
if (true === $input->getOption('no-backup')) {
261261
$this->writer->disableBackup();
262262
}
263263

264264
// save the files
265-
if ($input->getOption('force') === true) {
265+
if (true === $input->getOption('force')) {
266266
$errorIo->comment('Writing files...');
267267

268268
$bundleTransPath = false;

Controller/ControllerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ protected function json($data, $status = 200, $headers = array(), $context = arr
136136
protected function file($file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT)
137137
{
138138
$response = new BinaryFileResponse($file);
139-
$response->setContentDisposition($disposition, $fileName === null ? $response->getFile()->getFilename() : $fileName);
139+
$response->setContentDisposition($disposition, null === $fileName ? $response->getFile()->getFilename() : $fileName);
140140

141141
return $response;
142142
}

Controller/RedirectController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function urlRedirectAction(Request $request, $path, $permanent = false, $
103103

104104
$qs = $request->getQueryString();
105105
if ($qs) {
106-
if (strpos($path, '?') === false) {
106+
if (false === strpos($path, '?')) {
107107
$qs = '?'.$qs;
108108
} else {
109109
$qs = '&'.$qs;

Controller/TemplateController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function templateAction($template, $maxAge = null, $sharedAge = null, $pr
5454

5555
if ($private) {
5656
$response->setPrivate();
57-
} elseif ($private === false || (null === $private && ($maxAge || $sharedAge))) {
57+
} elseif (false === $private || (null === $private && ($maxAge || $sharedAge))) {
5858
$response->setPublic();
5959
}
6060

DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,9 @@ private function registerWorkflowConfiguration(array $config, ContainerBuilder $
631631

632632
$transitions = array();
633633
foreach ($workflow['transitions'] as $transition) {
634-
if ($type === 'workflow') {
634+
if ('workflow' === $type) {
635635
$transitions[] = new Definition(Workflow\Transition::class, array($transition['name'], $transition['from'], $transition['to']));
636-
} elseif ($type === 'state_machine') {
636+
} elseif ('state_machine' === $type) {
637637
foreach ($transition['from'] as $from) {
638638
foreach ($transition['to'] as $to) {
639639
$transitions[] = new Definition(Workflow\Transition::class, array($transition['name'], $from, $to));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<tr>
22
<td></td>
33
<td>
4-
<?php echo $view['form']->widget($form) ?>
4+
<?php echo $view['form']->widget($form); ?>
55
</td>
66
</tr>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<tr>
22
<td>
3-
<?php echo $view['form']->label($form) ?>
3+
<?php echo $view['form']->label($form); ?>
44
</td>
55
<td>
6-
<?php echo $view['form']->errors($form) ?>
7-
<?php echo $view['form']->widget($form) ?>
6+
<?php echo $view['form']->errors($form); ?>
7+
<?php echo $view['form']->widget($form); ?>
88
</td>
99
</tr>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<table <?php echo $view['form']->block($form, 'widget_container_attributes') ?>>
1+
<table <?php echo $view['form']->block($form, 'widget_container_attributes'); ?>>
22
<?php if (!$form->parent && $errors): ?>
33
<tr>
44
<td colspan="2">
5-
<?php echo $view['form']->errors($form) ?>
5+
<?php echo $view['form']->errors($form); ?>
66
</td>
77
</tr>
8-
<?php endif ?>
9-
<?php echo $view['form']->block($form, 'form_rows') ?>
10-
<?php echo $view['form']->rest($form) ?>
8+
<?php endif; ?>
9+
<?php echo $view['form']->block($form, 'form_rows'); ?>
10+
<?php echo $view['form']->rest($form); ?>
1111
</table>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<tr style="display: none">
22
<td colspan="2">
3-
<?php echo $view['form']->widget($form) ?>
3+
<?php echo $view['form']->widget($form); ?>
44
</td>
55
</tr>

0 commit comments

Comments
 (0)