Skip to content

Commit 6830d9f

Browse files
committed
fixed typo
1 parent 5176f97 commit 6830d9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+134
-149
lines changed

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/default.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ class FooTestCase
3131
public function testLegacyFoo()
3232
{
3333
@trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
34-
trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
35-
trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
34+
@trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
35+
@trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
3636
}
3737

3838
public function testNonLegacyBar()
3939
{
4040
@trigger_error('silenced bar deprecation', E_USER_DEPRECATED);
41-
trigger_error('unsilenced bar deprecation', E_USER_DEPRECATED);
41+
@trigger_error('unsilenced bar deprecation', E_USER_DEPRECATED);
4242
}
4343
}
4444

src/Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/weak.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class FooTestCase
2323
public function testLegacyFoo()
2424
{
2525
@trigger_error('silenced foo deprecation', E_USER_DEPRECATED);
26-
trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
26+
@trigger_error('unsilenced foo deprecation', E_USER_DEPRECATED);
2727
}
2828
}
2929

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

Lines 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'),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'widget_attributes') ?>
1+
<?php echo $view['form']->block($form, 'widget_attributes');
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php if (!$label) { $label = isset($label_format)
1+
<?php if (!$label) {
2+
$label = isset($label_format)
23
? strtr($label_format, array('%name%' => $name, '%id%' => $id))
3-
: $view['form']->humanize($name); } ?>
4+
: $view['form']->humanize($name);
5+
} ?>
46
<button type="<?php echo isset($type) ? $view->escape($type) : 'button' ?>" <?php echo $view['form']->block($form, 'button_attributes') ?>><?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></button>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'choice_widget_options') ?>
1+
<?php echo $view['form']->block($form, 'choice_widget_options');

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php use Symfony\Component\Form\ChoiceList\View\ChoiceGroupView;
22

3-
$translatorHelper = $view['translator']; // outside of the loop for performance reasons! ?>
3+
$translatorHelper = $view['translator']; // outside of the loop for performance reasons!?>
44
<?php $formHelper = $view['form']; ?>
55
<?php foreach ($choices as $group_label => $choice): ?>
66
<?php if (is_array($choice) || $choice instanceof ChoiceGroupView): ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'widget_container_attributes') ?>
1+
<?php echo $view['form']->block($form, 'widget_container_attributes');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'email')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'email'));
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
<?php if (false !== $label): ?>
2-
<?php if ($required) { $label_attr['class'] = trim((isset($label_attr['class']) ? $label_attr['class'] : '').' required'); } ?>
3-
<?php if (!$compound) { $label_attr['for'] = $id; } ?>
4-
<?php if (!$label) { $label = isset($label_format)
2+
<?php if ($required) {
3+
$label_attr['class'] = trim((isset($label_attr['class']) ? $label_attr['class'] : '').' required');
4+
} ?>
5+
<?php if (!$compound) {
6+
$label_attr['for'] = $id;
7+
} ?>
8+
<?php if (!$label) {
9+
$label = isset($label_format)
510
? strtr($label_format, array('%name%' => $name, '%id%' => $id))
6-
: $view['form']->humanize($name); } ?>
7-
<label <?php foreach ($label_attr as $k => $v) { printf('%s="%s" ', $view->escape($k), $view->escape($v)); } ?>><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($label, array(), $translation_domain) : $label) ?></label>
11+
: $view['form']->humanize($name);
12+
} ?>
13+
<label <?php foreach ($label_attr as $k => $v) {
14+
printf('%s="%s" ', $view->escape($k), $view->escape($v));
15+
} ?>><?php echo $view->escape(false !== $translation_domain ? $view['translator']->trans($label, array(), $translation_domain) : $label) ?></label>
816
<?php endif ?>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?php $method = strtoupper($method) ?>
22
<?php $form_method = $method === 'GET' || $method === 'POST' ? $method : 'POST' ?>
3-
<form name="<?php echo $name ?>" method="<?php echo strtolower($form_method) ?>" action="<?php echo $action ?>"<?php foreach ($attr as $k => $v) { printf(' %s="%s"', $view->escape($k), $view->escape($v)); } ?><?php if ($multipart): ?> enctype="multipart/form-data"<?php endif ?>>
3+
<form name="<?php echo $name ?>" method="<?php echo strtolower($form_method) ?>" action="<?php echo $action ?>"<?php foreach ($attr as $k => $v) {
4+
printf(' %s="%s"', $view->escape($k), $view->escape($v));
5+
} ?><?php if ($multipart): ?> enctype="multipart/form-data"<?php endif ?>>
46
<?php if ($form_method !== $method): ?>
57
<input type="hidden" name="_method" value="<?php echo $method ?>" />
68
<?php endif ?>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->widget($form) ?>
1+
<?php echo $view['form']->widget($form);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'hidden')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'hidden'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'number')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'number'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo str_replace('{{ widget }}', $view['form']->block($form, 'form_widget_simple'), $money_pattern) ?>
1+
<?php echo str_replace('{{ widget }}', $view['form']->block($form, 'form_widget_simple'), $money_pattern);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'text'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'password')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'password'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_rows') ?>
1+
<?php echo $view['form']->block($form, 'form_rows');
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'reset')) ?>
1+
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'reset'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'search')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'search'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'submit')) ?>
1+
<?php echo $view['form']->block($form, 'button_widget', array('type' => isset($type) ? $type : 'submit'));
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'url')) ?>
1+
<?php echo $view['form']->block($form, 'form_widget_simple', array('type' => isset($type) ? $type : 'url'));
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
<?php if (!$label) { $label = $view['form']->humanize($name); } ?>
1+
<?php if (!$label) {
2+
$label = $view['form']->humanize($name);
3+
} ?>
24
<label>Custom name label: <?php echo $view->escape($view['translator']->trans($label, array(), $translation_domain)) ?></label>

src/Symfony/Component/Debug/Resources/ext/tests/001.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test symfony_zval_info API
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
print 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

src/Symfony/Component/Debug/Resources/ext/tests/002.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test symfony_debug_backtrace in case of fatal error
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
print 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

src/Symfony/Component/Debug/Resources/ext/tests/002_1.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test symfony_debug_backtrace in case of non fatal error
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
print 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

src/Symfony/Component/Debug/Resources/ext/tests/003.phpt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
--TEST--
22
Test ErrorHandler in case of fatal error
33
--SKIPIF--
4-
<?php if (!extension_loaded('symfony_debug')) print 'skip'; ?>
4+
<?php if (!extension_loaded('symfony_debug')) {
5+
print 'skip';
6+
} ?>
57
--FILE--
68
<?php
79

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function testDeprecatedSuper($class, $super, $type)
176176
{
177177
set_error_handler(function () { return false; });
178178
$e = error_reporting(0);
179-
trigger_error('', E_USER_DEPRECATED);
179+
@trigger_error('', E_USER_DEPRECATED);
180180

181181
class_exists('Test\\'.__NAMESPACE__.'\\'.$class, true);
182182

src/Symfony/Component/DependencyInjection/Compiler/CheckCircularReferencesPass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ private function checkOutEdges(array $edges)
6060
$id = $node->getId();
6161

6262
if (empty($this->checkedNodes[$id])) {
63-
6463
// don't check circular dependencies for lazy services
6564
if (!$node->getValue() || !$node->getValue()->isLazy()) {
6665
$searchKey = array_search($id, $this->currentPath);

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public function set($id, $service, $scope = self::SCOPE_CONTAINER)
219219
*/
220220
public function has($id)
221221
{
222-
for ($i = 2;;) {
222+
for ($i = 2; ;) {
223223
if ('service_container' === $id
224224
|| isset($this->aliases[$id])
225225
|| isset($this->services[$id])
@@ -258,7 +258,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
258258
// available services. Service IDs are case insensitive, however since
259259
// this method can be called thousands of times during a request, avoid
260260
// calling strtolower() unless necessary.
261-
for ($i = 2;;) {
261+
for ($i = 2; ;) {
262262
if ('service_container' === $id) {
263263
return $this;
264264
}

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public function setDecoratedService($id, $renamedId = null)
158158
}
159159

160160
/**
161-
* Gets the service that decorates this service.
161+
* Gets the service that this service is decorating.
162162
*
163163
* @return null|array An array composed of the decorated service id and the new id for it, null if no service is decorated
164164
*/

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Symfony\Component\DependencyInjection\ContainerBuilder;
66

7-
/**
7+
/*
88
* This file is included in Tests\Dumper\GraphvizDumperTest::testDumpWithFrozenCustomClassContainer
99
* and Tests\Dumper\XmlDumperTest::testCompiledContainerCanBeDumped.
1010
*/

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Symfony\Component\DependencyInjection\Dump;
34

45
use Symfony\Component\DependencyInjection\ContainerInterface;

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function getDefaultParameters()
4242
'values' => array(
4343
0 => true,
4444
1 => false,
45-
2 => NULL,
45+
2 => null,
4646
3 => 0,
4747
4 => 1000.3,
4848
5 => 'true',

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ protected function getMethodCall1Service()
248248
if ($this->has('foobaz')) {
249249
$instance->setBar($this->get('foobaz', ContainerInterface::NULL_ON_INVALID_REFERENCE));
250250
}
251-
$instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
251+
$instance->setBar(($this->get('foo')->foo().(($this->hasParameter('foo')) ? ($this->getParameter('foo')) : ('default'))));
252252

253253
return $instance;
254254
}

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ protected function getMethodCall1Service()
253253
$this->services['method_call1'] = $instance = new \Bar\FooClass();
254254

255255
$instance->setBar($this->get('foo'));
256-
$instance->setBar(NULL);
257-
$instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
256+
$instance->setBar(null);
257+
$instance->setBar(($this->get('foo')->foo().(($this->hasParameter('foo')) ? ($this->getParameter('foo')) : ('default'))));
258258

259259
return $instance;
260260
}

src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private function htmlEncode($s)
298298
{
299299
$html = '';
300300

301-
$dumper = new HtmlDumper(function ($line) use (&$html) {$html .= $line;}, $this->charset);
301+
$dumper = new HtmlDumper(function ($line) use (&$html) {$html .= $line; }, $this->charset);
302302
$dumper->setDumpHeader('');
303303
$dumper->setDumpBoundaries('', '');
304304

src/Symfony/Component/Process/Pipes/AbstractPipes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected function write()
109109
}
110110

111111
if ($input) {
112-
for (;;) {
112+
for (; ;) {
113113
$data = fread($input, self::CHUNK_SIZE);
114114
if (!isset($data[0])) {
115115
break;

src/Symfony/Component/Process/Pipes/WindowsPipes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct($disableOutput, $input)
5555
$tmpDir = sys_get_temp_dir();
5656
$lastError = 'unknown reason';
5757
set_error_handler(function ($type, $msg) use (&$lastError) { $lastError = $msg; });
58-
for ($i = 0;; ++$i) {
58+
for ($i = 0; ; ++$i) {
5959
foreach ($pipes as $pipe => $name) {
6060
$file = sprintf('%s\\sf_proc_%02X.%s', $tmpDir, $i, $name);
6161
if (file_exists($file) && !unlink($file)) {

0 commit comments

Comments
 (0)