Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b7aab5

Browse files
committed
merged 2.0
2 parents f433f6b + 26b489f commit 9b7aab5

19 files changed

Lines changed: 42 additions & 84 deletions

File tree

src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public function guessType($class, $property)
4848
return new TypeGuess('entity', array('em' => $name, 'class' => $mapping['targetEntity'], 'multiple' => $multiple), Guess::HIGH_CONFIDENCE);
4949
}
5050

51-
switch ($metadata->getTypeOfField($property))
52-
{
51+
switch ($metadata->getTypeOfField($property)) {
5352
case 'array':
5453
return new TypeGuess('collection', array(), Guess::MEDIUM_CONFIDENCE);
5554
case 'boolean':

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
195195

196196
private function addTemplatingSection(ArrayNodeDefinition $rootNode)
197197
{
198-
$organizeUrls = function($urls)
199-
{
198+
$organizeUrls = function($urls) {
200199
$urls += array(
201200
'http' => array(),
202201
'ssl' => array(),

src/Symfony/Bundle/FrameworkBundle/Tests/HttpKernelTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ public function testHandle($type)
4848
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
4949
$kernel = new HttpKernel($dispatcher, $container, $resolver);
5050

51-
$controller = function() use($expected)
52-
{
51+
$controller = function() use($expected) {
5352
return $expected;
5453
};
5554

@@ -96,8 +95,7 @@ public function testHandleRestoresThePreviousRequestOnException($type)
9695
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
9796
$kernel = new HttpKernel($dispatcher, $container, $resolver);
9897

99-
$controller = function() use ($expected)
100-
{
98+
$controller = function() use ($expected) {
10199
throw $expected;
102100
};
103101

src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public function testExceptionThrownOnUnrecognizedChild()
3131
{
3232
$node = new ArrayNode('root');
3333

34-
try
35-
{
34+
try {
3635
$node->normalize(array('foo' => 'bar'));
3736
$this->fail('An exception should have been throw for a bad child node');
3837
} catch (\Exception $e) {

src/Symfony/Component/Console/Tests/Command/CommandTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ public function testRun()
224224
public function testSetCode()
225225
{
226226
$command = new \TestCommand();
227-
$ret = $command->setCode(function (InputInterface $input, OutputInterface $output)
228-
{
227+
$ret = $command->setCode(function (InputInterface $input, OutputInterface $output) {
229228
$output->writeln('from the code...');
230229
});
231230
$this->assertEquals($command, $ret, '->setCode() implements a fluent interface');

src/Symfony/Component/CssSelector/Tokenizer.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ private function tokenizeEscapedString($s, $pos)
154154
*/
155155
private function unescapeStringLiteral($literal)
156156
{
157-
return preg_replace_callback('#(\\\\(?:[A-Fa-f0-9]{1,6}(?:\r\n|\s)?|[^A-Fa-f0-9]))#', function ($matches) use ($literal)
158-
{
157+
return preg_replace_callback('#(\\\\(?:[A-Fa-f0-9]{1,6}(?:\r\n|\s)?|[^A-Fa-f0-9]))#', function ($matches) use ($literal) {
159158
if ($matches[0][0] == '\\' && strlen($matches[0]) > 1) {
160159
$matches[0] = substr($matches[0], 1);
161160
if (in_array($matches[0][0], array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'a', 'b', 'c', 'd', 'e', 'f'))) {

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,7 @@ private function dumpValue($value, $interpolate = true)
10371037
return $this->dumpParameter(strtolower($match[1]));
10381038
} else {
10391039
$that = $this;
1040-
$replaceParameters = function ($match) use ($that)
1041-
{
1040+
$replaceParameters = function ($match) use ($that) {
10421041
return "'.".$that->dumpParameter(strtolower($match[2])).".'";
10431042
};
10441043

src/Symfony/Component/DependencyInjection/Tests/Loader/ClosureLoaderTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public function testLoad()
4141
{
4242
$loader = new ClosureLoader($container = new ContainerBuilder());
4343

44-
$loader->load(function ($container)
45-
{
44+
$loader->load(function ($container) {
4645
$container->setParameter('foo', 'foo');
4746
});
4847

src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ public function testEach()
263263
public function testReduce()
264264
{
265265
$crawler = $this->createTestCrawler()->filterXPath('//ul[1]/li');
266-
$nodes = $crawler->reduce(function ($node, $i)
267-
{
266+
$nodes = $crawler->reduce(function ($node, $i) {
268267
return $i == 1 ? false : true;
269268
});
270269
$this->assertNotSame($nodes, $crawler, '->reduce() returns a new instance of a crawler');

src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,7 @@ public function testIsInformational()
378378

379379
public function testIsRedirectRedirection()
380380
{
381-
foreach (array(301, 302, 303, 307) as $code)
382-
{
381+
foreach (array(301, 302, 303, 307) as $code) {
383382
$response = new Response('', $code);
384383
$this->assertTrue($response->isRedirection());
385384
$this->assertTrue($response->isRedirect());
@@ -413,8 +412,7 @@ public function testIsNotFound()
413412

414413
public function testIsEmpty()
415414
{
416-
foreach (array(201, 204, 304) as $code)
417-
{
415+
foreach (array(201, 204, 304) as $code) {
418416
$response = new Response('', $code);
419417
$this->assertTrue($response->isEmpty());
420418
}

0 commit comments

Comments
 (0)