Skip to content

Commit 5176f97

Browse files
committed
fixed CS
1 parent 77289b9 commit 5176f97

File tree

11 files changed

+14
-32
lines changed

11 files changed

+14
-32
lines changed

.php_cs.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ return PhpCsFixer\Config::create()
1212
->setRiskyAllowed(true)
1313
->setFinder(
1414
PhpCsFixer\Finder::create()
15-
->in(__DIR__)
15+
->in(__DIR__.'/src')
1616
->exclude(array(
1717
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
1818
'src/Symfony/Component/DependencyInjection/Tests/Fixtures',

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ public static function register($mode = false)
109109
return "\x1B[{$color}m{$str}\x1B[0m";
110110
};
111111
} else {
112-
$colorize = function ($str) {return $str;};
112+
$colorize = function ($str) { return $str; };
113113
}
114114
register_shutdown_function(function () use ($getMode, &$deprecations, $deprecationHandler, $colorize) {
115115
$mode = $getMode();
116116
$currErrorHandler = set_error_handler('var_dump');
117117
restore_error_handler();
118118

119119
if ('weak' === $mode) {
120-
$colorize = function ($str) {return $str;};
120+
$colorize = function ($str) { return $str; };
121121
}
122122
if ($currErrorHandler !== $deprecationHandler) {
123123
echo "\n", $colorize('THE ERROR HANDLER HAS CHANGED!', true), "\n";

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,29 +125,20 @@ public function __unset($name)
125125
unset($this->valueHolder5157dd96e88c0->$name);
126126
}
127127

128-
/**
129-
*
130-
*/
131128
public function __clone()
132129
{
133130
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__clone', array());
134131

135132
$this->valueHolder5157dd96e88c0 = clone $this->valueHolder5157dd96e88c0;
136133
}
137134

138-
/**
139-
*
140-
*/
141135
public function __sleep()
142136
{
143137
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__sleep', array());
144138

145139
return array('valueHolder5157dd96e88c0');
146140
}
147141

148-
/**
149-
*
150-
*/
151142
public function __wakeup()
152143
{
153144
}

src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service_with_hints.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,29 +120,20 @@ public function __unset($name)
120120
unset($this->valueHolder5157dd96e88c0->$name);
121121
}
122122

123-
/**
124-
*
125-
*/
126123
public function __clone()
127124
{
128125
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__clone', array());
129126

130127
$this->valueHolder5157dd96e88c0 = clone $this->valueHolder5157dd96e88c0;
131128
}
132129

133-
/**
134-
*
135-
*/
136130
public function __sleep()
137131
{
138132
$this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, '__sleep', array());
139133

140134
return array('valueHolder5157dd96e88c0');
141135
}
142136

143-
/**
144-
*
145-
*/
146137
public function __wakeup()
147138
{
148139
}
@@ -166,15 +157,15 @@ public function getProxyInitializer()
166157
/**
167158
* {@inheritdoc}
168159
*/
169-
public function initializeProxy() : bool
160+
public function initializeProxy(): bool
170161
{
171162
return $this->initializer5157dd96e8924 && $this->initializer5157dd96e8924->__invoke($this->valueHolder5157dd96e88c0, $this, 'initializeProxy', array());
172163
}
173164

174165
/**
175166
* {@inheritdoc}
176167
*/
177-
public function isProxyInitialized() : bool
168+
public function isProxyInitialized(): bool
178169
{
179170
return null !== $this->valueHolder5157dd96e88c0;
180171
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testDumpTag($template, $debug, $expectedOutput, $expectedDumped)
3232

3333
$dumped = null;
3434
$exception = null;
35-
$prevDumper = VarDumper::setHandler(function ($var) use (&$dumped) {$dumped = $var;});
35+
$prevDumper = VarDumper::setHandler(function ($var) use (&$dumped) { $dumped = $var; });
3636

3737
try {
3838
$this->assertEquals($expectedOutput, $twig->render('template'));

src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,11 +390,11 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode)
390390

391391
$providerNodeBuilder
392392
->validate()
393-
->ifTrue(function ($v) {return count($v) > 1;})
393+
->ifTrue(function ($v) { return count($v) > 1; })
394394
->thenInvalid('You cannot set multiple provider types for the same provider')
395395
->end()
396396
->validate()
397-
->ifTrue(function ($v) {return count($v) === 0;})
397+
->ifTrue(function ($v) { return count($v) === 0; })
398398
->thenInvalid('You must set a provider definition for the provider.')
399399
->end()
400400
;

src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithStrictTypes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* foo
55
*/
66

7-
declare (strict_types = 1);
7+
declare(strict_types=1);
88

99
namespace Namespaced;
1010

src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private function convertFileToClass($path, $file, $prefix)
179179
);
180180

181181
if ($prefix) {
182-
$candidates = array_filter($candidates, function ($candidate) use ($prefix) {return 0 === strpos($candidate, $prefix);});
182+
$candidates = array_filter($candidates, function ($candidate) use ($prefix) { return 0 === strpos($candidate, $prefix); });
183183
}
184184

185185
// We cannot use the autoloader here as most of them use require; but if the class

src/Symfony/Component/DomCrawler/Crawler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public function addHtmlContent($content, $charset = 'UTF-8')
156156
$dom = new \DOMDocument('1.0', $charset);
157157
$dom->validateOnParse = true;
158158

159-
set_error_handler(function () {throw new \Exception();});
159+
set_error_handler(function () { throw new \Exception(); });
160160

161161
try {
162162
// Convert charset to HTML-entities to work around bugs in DOMDocument::loadHTML()

src/Symfony/Component/Process/Tests/SignalListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
pcntl_signal(SIGUSR1, function () {echo 'SIGUSR1'; exit;});
12+
pcntl_signal(SIGUSR1, function () { echo 'SIGUSR1'; exit; });
1313

1414
echo 'Caught ';
1515

src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function setCharset($charset)
9090
}
9191
$this->charsetConverter = 'fallback';
9292
$supported = true;
93-
set_error_handler(function () use (&$supported) {$supported = false;});
93+
set_error_handler(function () use (&$supported) { $supported = false; });
9494

9595
if (function_exists('mb_encoding_aliases') && mb_encoding_aliases($charset)) {
9696
$this->charset = $charset;
@@ -193,7 +193,7 @@ protected function utf8Encode($s)
193193
}
194194
if ('iconv' === $this->charsetConverter) {
195195
$valid = true;
196-
set_error_handler(function () use (&$valid) {$valid = false;});
196+
set_error_handler(function () use (&$valid) { $valid = false; });
197197
$c = iconv($this->charset, 'UTF-8', $s);
198198
restore_error_handler();
199199
if ($valid) {

0 commit comments

Comments
 (0)