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 f9dff06

Browse filesBrowse files
committed
Merge branch '2.4'
* 2.4: fixed CS fixed a typo fixed CS for lambdas [Yaml] fixed some license headers Fixes message value for objects Check for hour, minute & second validity avoid tables to have apparently long blank line breaks and be too far appart for long nested array params fixed various typos [Filesystem] Fixed mirror for symlinks [Validator] Removed duplicated test for IBAN in data provider
2 parents f132197 + b04b0eb commit f9dff06
Copy full SHA for f9dff06

File tree

Expand file treeCollapse file tree

71 files changed

+251
-170
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

71 files changed

+251
-170
lines changed
Open diff view settings
Collapse file

‎src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function process(ContainerBuilder $container)
6262

6363
$this->container = $container;
6464
$this->connections = $container->getParameter($this->connections);
65-
$sortFunc = function($a, $b) {
65+
$sortFunc = function ($a, $b) {
6666
$a = isset($a['priority']) ? $a['priority'] : 0;
6767
$b = isset($b['priority']) ? $b['priority'] : 0;
6868

Collapse file

‎src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public function testValidateUniquenessWithUnrewoundArray()
282282
$repository->expects($this->once())
283283
->method('findByCustom')
284284
->will(
285-
$this->returnCallback(function() use ($entity) {
285+
$this->returnCallback(function () use ($entity) {
286286
$returnValue = array(
287287
$entity,
288288
);
Collapse file

‎src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/ProxyManager/LazyProxy/PhpDumper/ProxyDumper.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
2121

2222
/**
23-
* Generates dumped php code of proxies via reflection.
23+
* Generates dumped PHP code of proxies via reflection.
2424
*
2525
* @author Marco Pivetta <ocramius@gmail.com>
2626
*/
Collapse file

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8484

8585
$filesystem->rename($realCacheDir, $oldCacheDir);
8686
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
87-
sleep(1); // workaround for windows php rename bug
87+
sleep(1); // workaround for Windows PHP rename bug
8888
}
8989
$filesystem->rename($warmupDir, $realCacheDir);
9090
}
Collapse file

‎src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,17 @@ protected function formatValue($value)
198198
protected function formatParameter($value)
199199
{
200200
if (is_bool($value) || is_array($value) || (null === $value)) {
201-
return json_encode($value);
201+
$jsonString = json_encode($value);
202+
203+
if (!function_exists('mb_strlen')) {
204+
return substr($jsonString, 0, 60).(strlen($jsonString) > 60 ? ' ...' : '');
205+
}
206+
207+
if (mb_strlen($jsonString) > 60) {
208+
return mb_substr($jsonString, 0, 60).' ...';
209+
}
210+
211+
return $jsonString;
202212
}
203213

204214
return (string) $value;
Collapse file

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+17-17Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public function getConfigTreeBuilder()
4141
->end()
4242
->arrayNode('trusted_proxies')
4343
->beforeNormalization()
44-
->ifTrue(function($v) { return !is_array($v) && !is_null($v); })
45-
->then(function($v) { return is_bool($v) ? array() : preg_split('/\s*,\s*/', $v); })
44+
->ifTrue(function ($v) { return !is_array($v) && !is_null($v); })
45+
->then(function ($v) { return is_bool($v) ? array() : preg_split('/\s*,\s*/', $v); })
4646
->end()
4747
->prototype('scalar')
4848
->validate()
49-
->ifTrue(function($v) {
49+
->ifTrue(function ($v) {
5050
if (empty($v)) {
5151
return false;
5252
}
@@ -70,8 +70,8 @@ public function getConfigTreeBuilder()
7070
->scalarNode('default_locale')->defaultValue('en')->end()
7171
->arrayNode('trusted_hosts')
7272
->beforeNormalization()
73-
->ifTrue(function($v) { return is_string($v); })
74-
->then(function($v) { return array($v); })
73+
->ifTrue(function ($v) { return is_string($v); })
74+
->then(function ($v) { return array($v); })
7575
->end()
7676
->prototype('scalar')->end()
7777
->end()
@@ -188,7 +188,7 @@ private function addProfilerSection(ArrayNodeDefinition $rootNode)
188188
->end()
189189
->scalarNode('service')->end()
190190
->arrayNode('ips')
191-
->beforeNormalization()->ifString()->then(function($v) { return array($v); })->end()
191+
->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end()
192192
->prototype('scalar')->end()
193193
->end()
194194
->end()
@@ -258,7 +258,7 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
258258

259259
private function addTemplatingSection(ArrayNodeDefinition $rootNode)
260260
{
261-
$organizeUrls = function($urls) {
261+
$organizeUrls = function ($urls) {
262262
$urls += array(
263263
'http' => array(),
264264
'ssl' => array(),
@@ -295,8 +295,8 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
295295
->addDefaultChildrenIfNoneSet()
296296
->prototype('scalar')->defaultValue('FrameworkBundle:Form')->end()
297297
->validate()
298-
->ifTrue(function($v) {return !in_array('FrameworkBundle:Form', $v); })
299-
->then(function($v){
298+
->ifTrue(function ($v) {return !in_array('FrameworkBundle:Form', $v); })
299+
->then(function ($v) {
300300
return array_merge(array('FrameworkBundle:Form'), $v);
301301
})
302302
->end()
@@ -310,8 +310,8 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
310310
->performNoDeepMerging()
311311
->addDefaultsIfNotSet()
312312
->beforeNormalization()
313-
->ifTrue(function($v) { return !is_array($v); })
314-
->then(function($v) { return array($v); })
313+
->ifTrue(function ($v) { return !is_array($v); })
314+
->then(function ($v) { return array($v); })
315315
->end()
316316
->beforeNormalization()
317317
->always()
@@ -335,8 +335,8 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
335335
->isRequired()
336336
->requiresAtLeastOneElement()
337337
->beforeNormalization()
338-
->ifTrue(function($v){ return !is_array($v); })
339-
->then(function($v){ return array($v); })
338+
->ifTrue(function ($v) { return !is_array($v); })
339+
->then(function ($v) { return array($v); })
340340
->end()
341341
->prototype('scalar')->end()
342342
->end()
@@ -345,8 +345,8 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
345345
->children()
346346
->arrayNode('loaders')
347347
->beforeNormalization()
348-
->ifTrue(function($v){ return !is_array($v); })
349-
->then(function($v){ return array($v); })
348+
->ifTrue(function ($v) { return !is_array($v); })
349+
->then(function ($v) { return array($v); })
350350
->end()
351351
->prototype('scalar')->end()
352352
->end()
@@ -364,8 +364,8 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
364364
->performNoDeepMerging()
365365
->addDefaultsIfNotSet()
366366
->beforeNormalization()
367-
->ifTrue(function($v) { return !is_array($v); })
368-
->then(function($v) { return array($v); })
367+
->ifTrue(function ($v) { return !is_array($v); })
368+
->then(function ($v) { return array($v); })
369369
->end()
370370
->beforeNormalization()
371371
->always()
Collapse file

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ private function registerTemplatingConfiguration(array $config, $ide, ContainerB
437437
// Apply request scope to assets helper if one or more packages are request-scoped
438438
$requireRequestScope = array_reduce(
439439
$namedPackages,
440-
function($v, Reference $ref) use ($container) {
440+
function ($v, Reference $ref) use ($container) {
441441
return $v || 'request' === $container->getDefinition($ref)->getScope();
442442
},
443443
'request' === $defaultPackage->getScope()
@@ -448,7 +448,7 @@ function($v, Reference $ref) use ($container) {
448448
}
449449

450450
if (!empty($config['loaders'])) {
451-
$loaders = array_map(function($loader) { return new Reference($loader); }, $config['loaders']);
451+
$loaders = array_map(function ($loader) { return new Reference($loader); }, $config['loaders']);
452452

453453
// Use a delegation unless only a single loader was registered
454454
if (1 === count($loaders)) {
@@ -485,7 +485,7 @@ function($v, Reference $ref) use ($container) {
485485
}
486486

487487
$container->setParameter('templating.engines', $config['engines']);
488-
$engines = array_map(function($engine) { return new Reference('templating.engine.'.$engine); }, $config['engines']);
488+
$engines = array_map(function ($engine) { return new Reference('templating.engine.'.$engine); }, $config['engines']);
489489

490490
// Use a delegation unless only a single engine was registered
491491
if (1 === count($engines)) {
Collapse file

‎src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function testTranslator()
203203
}
204204
}
205205

206-
$files = array_map(function($resource) { return realpath($resource[1]); }, $resources);
206+
$files = array_map(function ($resource) { return realpath($resource[1]); }, $resources);
207207
$ref = new \ReflectionClass('Symfony\Component\Validator\Validator');
208208
$this->assertContains(
209209
strtr(dirname($ref->getFileName()).'/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
Collapse file

‎src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\Translation\Extractor\ExtractorInterface;
1717

1818
/**
19-
* PhpExtractor extracts translation messages from a php template.
19+
* PhpExtractor extracts translation messages from a PHP template.
2020
*
2121
* @author Michel Salib <michelsalib@hotmail.com>
2222
*/
@@ -88,7 +88,7 @@ protected function normalizeToken($token)
8888
}
8989

9090
/**
91-
* Extracts trans message from php tokens.
91+
* Extracts trans message from PHP tokens.
9292
*
9393
* @param array $tokens
9494
* @param MessageCatalogue $catalog
Collapse file

‎src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function collect(Request $request, Response $response, \Exception $except
5757
'authenticated' => $token->isAuthenticated(),
5858
'token_class' => get_class($token),
5959
'user' => $token->getUsername(),
60-
'roles' => array_map(function ($role){ return $role->getRole();}, $token->getRoles()),
60+
'roles' => array_map(function ($role) { return $role->getRole();}, $token->getRoles()),
6161
);
6262
}
6363
}

0 commit comments

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