Permalink
Browse files

fixed CS

  • Loading branch information...
1 parent af101a5 commit 4c0bfd3313615195cde3d66fcf256cca5beddee7 @fabpot fabpot committed Jul 1, 2013
Showing with 62 additions and 131 deletions.
  1. +0 −1 src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php
  2. +0 −2 src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/ContainerBuilderTest.php
  3. +0 −3 src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Dumper/PhpDumperTest.php
  4. +0 −1 src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Fixtures/php/lazy_service.php
  5. +0 −1 src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/Instantiator/RuntimeInstantiatorTest.php
  6. +0 −2 src/Symfony/Bridge/ProxyManager/Tests/LazyProxy/PhpDumper/ProxyDumperTest.php
  7. +0 −1 src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
  8. +3 −3 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/SerializerPass.php
  9. +0 −1 src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
  10. +17 −17 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/SerializerPassTest.php
  11. +1 −1 src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
  12. +0 −1 ...ony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php
  13. +0 −2 src/Symfony/Bundle/FrameworkBundle/Tests/Templating/TimedPhpEngineTest.php
  14. +4 −2 src/Symfony/Bundle/SecurityBundle/Tests/Functional/SecurityRoutingIntegrationTest.php
  15. +2 −2 src/Symfony/Component/BrowserKit/Client.php
  16. +1 −1 src/Symfony/Component/BrowserKit/Tests/ClientTest.php
  17. +0 −2 src/Symfony/Component/Console/Event/ConsoleCommandEvent.php
  18. +0 −5 src/Symfony/Component/Console/Helper/DescriptorHelper.php
  19. +4 −4 src/Symfony/Component/Console/Helper/DialogHelper.php
  20. +0 −1 src/Symfony/Component/Console/Tests/Command/HelpCommandTest.php
  21. +0 −1 src/Symfony/Component/Console/Tests/Descriptor/AbstractDescriptorTest.php
  22. +0 −1 src/Symfony/Component/Console/Tests/Descriptor/ObjectsProvider.php
  23. +2 −2 src/Symfony/Component/CssSelector/XPath/Extension/FunctionExtension.php
  24. +1 −0 src/Symfony/Component/Debug/ErrorHandler.php
  25. +3 −3 src/Symfony/Component/Debug/Exception/ContextErrorException.php
  26. +0 −1 src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php
  27. +0 −1 src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/NullDumper.php
  28. +1 −0 src/Symfony/Component/DomCrawler/Form.php
  29. +1 −1 src/Symfony/Component/Form/ButtonBuilder.php
  30. +0 −1 src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php
  31. +0 −1 src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php
  32. +0 −1 src/Symfony/Component/Form/Extension/Core/Type/CountryType.php
  33. +0 −1 src/Symfony/Component/Form/Extension/Core/Type/CurrencyType.php
  34. +0 −1 src/Symfony/Component/Form/Extension/Core/Type/FormType.php
  35. +0 −1 src/Symfony/Component/Form/Extension/Core/Type/LanguageType.php
  36. +0 −1 src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php
  37. +0 −1 src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php
  38. +0 −1 src/Symfony/Component/Form/FormConfigBuilder.php
  39. +1 −1 src/Symfony/Component/Form/Tests/Extension/Core/Type/BaseTypeTest.php
  40. +0 −1 src/Symfony/Component/HttpFoundation/RequestMatcher.php
  41. +0 −3 src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php
  42. +0 −1 src/Symfony/Component/HttpFoundation/Tests/Session/Storage/PhpBridgeSessionStorageTest.php
  43. +1 −1 src/Symfony/Component/HttpKernel/Fragment/HIncludeFragmentRenderer.php
  44. +1 −1 src/Symfony/Component/HttpKernel/HttpKernel.php
  45. +0 −4 src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
  46. +0 −7 src/Symfony/Component/Intl/Intl.php
  47. +0 −1 src/Symfony/Component/Intl/Locale/Locale.php
  48. +0 −1 src/Symfony/Component/Intl/ResourceBundle/Reader/BufferedBundleReader.php
  49. +1 −1 src/Symfony/Component/Intl/ResourceBundle/Writer/PhpBundleWriter.php
  50. +0 −7 src/Symfony/Component/Intl/Resources/bin/copy-stubs-to-component.php
  51. +0 −2 src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
  52. +0 −1 src/Symfony/Component/Intl/Tests/DateFormatter/IntlDateFormatterTest.php
  53. +0 −1 src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php
  54. +0 −2 src/Symfony/Component/Intl/Tests/Locale/AbstractLocaleTest.php
  55. +0 −1 src/Symfony/Component/Intl/Tests/NumberFormatter/AbstractNumberFormatterTest.php
  56. +0 −2 src/Symfony/Component/Intl/Tests/ResourceBundle/LocaleBundleTest.php
  57. +0 −1 src/Symfony/Component/Intl/Tests/ResourceBundle/RegionBundleTest.php
  58. +0 −1 src/Symfony/Component/Locale/Tests/LocaleTest.php
  59. +0 −1 src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
  60. +3 −3 src/Symfony/Component/Process/Process.php
  61. +1 −1 src/Symfony/Component/Process/ProcessUtils.php
  62. +2 −2 src/Symfony/Component/Process/Tests/SignalListener.php
  63. +0 −1 src/Symfony/Component/PropertyAccess/Tests/Fixtures/MagicianCall.php
  64. +7 −7 src/Symfony/Component/Security/Acl/Permission/BasicPermissionMap.php
  65. +1 −1 src/Symfony/Component/Serializer/Encoder/JsonDecode.php
  66. +2 −2 src/Symfony/Component/Serializer/Normalizer/GetSetMethodNormalizer.php
  67. +1 −0 src/Symfony/Component/Validator/Constraints/IbanValidator.php
  68. +1 −1 src/Symfony/Component/Validator/Tests/Constraints/IsbnValidatorTest.php
@@ -12,7 +12,6 @@
namespace Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass;
use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
-use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
@@ -13,10 +13,8 @@
require_once __DIR__ . '/Fixtures/includes/foo.php';
-use ProxyManager\Configuration;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Integration tests for {@see \Symfony\Component\DependencyInjection\ContainerBuilder} combined
@@ -11,10 +11,8 @@
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Dumper;
-use ProxyManager\Configuration;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Dumper\PhpDumper;
/**
@@ -46,7 +44,6 @@ public function testDumpContainerWithProxyService()
);
}
-
/**
* Verifies that the generated container retrieves the same proxy instance on multiple subsequent requests
*/
@@ -194,5 +194,4 @@ public function getWrappedValueHolderValue()
return $this->valueHolder5157dd96e88c0;
}
-
}
@@ -11,7 +11,6 @@
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator;
-use ProxyManager\Configuration;
use ProxyManager\Proxy\LazyLoadingInterface;
use Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -11,9 +11,7 @@
namespace Symfony\Bridge\ProxyManager\LazyProxy\Tests\Instantiator;
-use ProxyManager\Configuration;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
-use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
/**
@@ -19,7 +19,6 @@
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Translation\MessageCatalogue;
-use Symfony\Component\Yaml\Yaml;
/**
* A command that parse templates to extract translation messages and add them into the translation files.
@@ -41,11 +41,11 @@ public function process(ContainerBuilder $container)
private function findAndSortTaggedServices($tagName, ContainerBuilder $container)
{
$services = $container->findTaggedServiceIds($tagName);
-
+
if (empty($services)) {
- throw new \RuntimeException(sprintf('You must tag at least one service as "%s" to use the Serializer service', $tagName));
+ throw new \RuntimeException(sprintf('You must tag at least one service as "%s" to use the Serializer service', $tagName));
}
-
+
$sortedServices = array();
foreach ($services as $serviceId => $tags) {
foreach ($tags as $tag) {
@@ -138,7 +138,6 @@ public function enctype(FormView $view)
{
// Uncomment this as soon as the deprecation note should be shown
// trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED);
-
return $this->renderer->searchAndRenderBlock($view, 'enctype');
}
@@ -17,7 +17,7 @@
/**
* Tests for the SerializerPass class
- *
+ *
* @author Javier Lopez <f12loalf@gmail.com>
*/
class SerializerPassTest extends \PHPUnit_Framework_TestCase
@@ -26,58 +26,58 @@ class SerializerPassTest extends \PHPUnit_Framework_TestCase
public function testThrowExceptionWhenNoNormalizers()
{
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
-
+
$container->expects($this->once())
->method('hasDefinition')
->with('serializer')
->will($this->returnValue(true));
-
+
$container->expects($this->once())
->method('findTaggedServiceIds')
->with('serializer.normalizer')
->will($this->returnValue(array()));
-
+
$this->setExpectedException('RuntimeException');
-
+
$serializerPass = new SerializerPass();
$serializerPass->process($container);
}
-
+
public function testThrowExceptionWhenNoEncoders()
{
$definition = $this->getMock('Symfony\Component\DependencyInjection\Definition');
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerBuilder');
-
+
$container->expects($this->once())
->method('hasDefinition')
->with('serializer')
->will($this->returnValue(true));
-
+
$container->expects($this->any())
->method('findTaggedServiceIds')
->will($this->onConsecutiveCalls(
array('n' => array('serializer.normalizer')),
array()
));
-
+
$container->expects($this->once())
->method('getDefinition')
->will($this->returnValue($definition));
-
+
$this->setExpectedException('RuntimeException');
-
+
$serializerPass = new SerializerPass();
$serializerPass->process($container);
}
-
+
public function testServicesAreOrderedAccordingToPriority()
{
$services = array(
'n3' => array('tag' => array()),
'n1' => array('tag' => array('priority' => 200)),
'n2' => array('tag' => array('priority' => 100))
);
-
+
$expected = array(
new Reference('n1'),
new Reference('n2'),
@@ -91,15 +91,15 @@ public function testServicesAreOrderedAccordingToPriority()
->will($this->returnValue($services));
$serializerPass = new SerializerPass();
-
+
$method = new \ReflectionMethod(
- 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass',
+ 'Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\SerializerPass',
'findAndSortTaggedServices'
);
$method->setAccessible(TRUE);
-
+
$actual = $method->invoke($serializerPass, 'tag', $container);
-
+
$this->assertEquals($expected, $actual);
}
}
@@ -128,7 +128,7 @@ protected static function getBundleDefaultConfig()
'debug' => '%kernel.debug%',
),
'serializer' => array(
- 'enabled' => false
+ 'enabled' => false
)
);
}
@@ -45,7 +45,6 @@ public function indexAction()
// The RouterListener is also tested as if it does not keep the right
// Request in the context, a 301 would be generated
-
return new Response($content);
}
@@ -13,9 +13,7 @@
use Symfony\Bundle\FrameworkBundle\Templating\TimedPhpEngine;
use Symfony\Component\DependencyInjection\Container;
-use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
-use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Symfony\Component\Templating\TemplateNameParser;
use Symfony\Bundle\FrameworkBundle\Templating\GlobalVariables;
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
@@ -91,12 +91,14 @@ public function testSecurityConfigurationForMultipleIPAddresses($config)
$this->assertRestricted($barredClient, '/secured-by-two-ips');
}
- private function assertAllowed($client, $path) {
+ private function assertAllowed($client, $path)
+ {
$client->request('GET', $path);
$this->assertEquals(404, $client->getResponse()->getStatusCode());
}
- private function assertRestricted($client, $path) {
+ private function assertRestricted($client, $path)
+ {
$client->request('GET', $path);
$this->assertEquals(302, $client->getResponse()->getStatusCode());
}
@@ -78,7 +78,7 @@ public function followRedirects($followRedirect = true)
{
$this->followRedirects = (Boolean) $followRedirect;
}
-
+
/**
* Sets the maximum number of requests that crawler can follow.
*
@@ -329,7 +329,7 @@ public function request($method, $uri, array $parameters = array(), array $files
$this->cookieJar->updateFromResponse($this->internalResponse, $uri);
$status = $this->internalResponse->getStatus();
-
+
if ($status >= 300 && $status < 400) {
$this->redirect = $this->internalResponse->getHeader('Location');
} else {
@@ -367,7 +367,7 @@ public function testFollowRedirect()
$this->assertInstanceof('LogicException', $e, '->followRedirect() throws a \LogicException if the request did not respond with 30x HTTP Code');
}
}
-
+
public function testFollowRedirectWithMaxRedirects()
{
$client = new TestClient();
@@ -12,8 +12,6 @@
namespace Symfony\Component\Console\Event;
use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Input\InputInterface;
-use Symfony\Component\Console\Output\OutputInterface;
/**
* Allows to do things before the command is executed.
@@ -11,16 +11,11 @@
namespace Symfony\Component\Console\Helper;
-use Symfony\Component\Console\Application;
-use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Descriptor\DescriptorInterface;
use Symfony\Component\Console\Descriptor\JsonDescriptor;
use Symfony\Component\Console\Descriptor\MarkdownDescriptor;
use Symfony\Component\Console\Descriptor\TextDescriptor;
use Symfony\Component\Console\Descriptor\XmlDescriptor;
-use Symfony\Component\Console\Input\InputArgument;
-use Symfony\Component\Console\Input\InputDefinition;
-use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
/**
@@ -57,7 +57,7 @@ public function select(OutputInterface $output, $question, $choices, $default =
if ($multiselect) {
// Check for a separated comma values
- if(!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) {
+ if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) {
throw new \InvalidArgumentException(sprintf($errorMessage, $picked));
}
$selectedChoices = explode(",", $selectedChoices);
@@ -74,10 +74,10 @@ public function select(OutputInterface $output, $question, $choices, $default =
array_push($multiselectChoices, $value);
}
- if ($multiselect){
+ if ($multiselect) {
return $multiselectChoices;
- }
-
+ }
+
return $picked;
}, $attempts, $default);
@@ -53,7 +53,6 @@ public function testExecuteForApplicationCommand()
$this->assertRegExp('/list \[--xml\] \[--raw\] \[--format="\.\.\."\] \[namespace\]/', $commandTester->getDisplay(), '->execute() returns a text help for the given command');
}
-
public function testExecuteForApplicationCommandWithXmlOption()
{
$application = new Application();
@@ -13,7 +13,6 @@
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
-use Symfony\Component\Console\Descriptor\DescriptorInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
@@ -18,7 +18,6 @@
use Symfony\Component\Console\Tests\Fixtures\DescriptorApplication2;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand1;
use Symfony\Component\Console\Tests\Fixtures\DescriptorCommand2;
-use Symfony\Component\Finder\Shell\Command;
/**
* @author Jean-François Simon <contact@jfsimon.fr>
@@ -90,15 +90,15 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, $las
if (0 !== $b) {
$expr .= ' - '.$b;
}
-
+
$conditions = array(sprintf('%s %s 0', $expr, $sign));
if (1 !== $a && -1 !== $a) {
$conditions[] = sprintf('(%s) mod %d = 0', $expr, $a);
}
return $xpath->addCondition(implode(' and ', $conditions));
-
+
// todo: handle an+b, odd, even
// an+b means every-a, plus b, e.g., 2n+1 means odd
// 0n+b means b
@@ -104,6 +104,7 @@ public function handle($level, $message, $file = 'unknown', $line = 0, $context
$stack = array_map(
function ($row) {
unset($row['args']);
+
return $row;
},
array_slice(debug_backtrace(false), 0, 10)
@@ -19,18 +19,18 @@
class ContextErrorException extends \ErrorException
{
private $context = array();
-
+
public function __construct($message, $code, $severity, $filename, $lineno, $context = array())
{
parent::__construct($message, $code, $severity, $filename, $lineno);
$this->context = $context;
}
-
+
/**
* @return array Array of variables that existed when the exception occured
*/
public function getContext()
{
return $this->context;
- }
+ }
}
@@ -11,7 +11,6 @@
namespace Symfony\Component\DependencyInjection\LazyProxy\PhpDumper;
-use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\Definition;
/**
Oops, something went wrong.

0 comments on commit 4c0bfd3

Please sign in to comment.