Permalink
Browse files

fixed CS

  • Loading branch information...
1 parent 3c010db commit fdb11be2429d6e6ae4922c5a655542700431f719 @fabpot fabpot committed Dec 11, 2012
Showing with 53 additions and 70 deletions.
  1. +8 −7 src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
  2. +3 −18 src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig
  3. +1 −1 src/Symfony/Component/ClassLoader/UniversalClassLoader.php
  4. +3 −3 src/Symfony/Component/Console/Tests/ApplicationTest.php
  5. +3 −3 src/Symfony/Component/DependencyInjection/ContainerBuilder.php
  6. +1 −0 src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php
  7. +0 −1 src/Symfony/Component/Finder/Adapter/BsdFindAdapter.php
  8. +0 −1 src/Symfony/Component/Finder/Adapter/GnuFindAdapter.php
  9. +1 −1 src/Symfony/Component/Finder/Exception/ExceptionInterface.php
  10. +1 −1 src/Symfony/Component/Finder/Expression/Expression.php
  11. +4 −4 src/Symfony/Component/Finder/Expression/ValueInterface.php
  12. +1 −1 src/Symfony/Component/Finder/Finder.php
  13. +0 −1 src/Symfony/Component/Finder/Tests/FinderTest.php
  14. +0 −1 src/Symfony/Component/Finder/Tests/Iterator/PathFilterIteratorTest.php
  15. +2 −0 src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
  16. +0 −2 src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
  17. +0 −1 src/Symfony/Component/HttpFoundation/Tests/File/UploadedFileTest.php
  18. +1 −1 src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
  19. +1 −0 src/Symfony/Component/HttpKernel/HttpCache/Store.php
  20. +1 −1 src/Symfony/Component/HttpKernel/Kernel.php
  21. +5 −5 src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php
  22. +4 −4 src/Symfony/Component/HttpKernel/Profiler/Profile.php
  23. +1 −1 src/Symfony/Component/HttpKernel/Tests/Debug/TraceableEventDispatcherTest.php
  24. +1 −0 src/Symfony/Component/OptionsResolver/Tests/OptionsTest.php
  25. +4 −4 src/Symfony/Component/Process/Tests/AbstractProcessTest.php
  26. +1 −1 src/Symfony/Component/Routing/Generator/UrlGenerator.php
  27. +1 −0 src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php
  28. +1 −1 src/Symfony/Component/Routing/RouteCollection.php
  29. +1 −1 src/Symfony/Component/Routing/RouteCompiler.php
  30. +0 −1 src/Symfony/Component/Security/Core/Util/SecureRandomInterface.php
  31. +0 −1 src/Symfony/Component/Stopwatch/Stopwatch.php
  32. +1 −1 src/Symfony/Component/Templating/Loader/FilesystemLoader.php
  33. +1 −1 src/Symfony/Component/Templating/PhpEngine.php
  34. +1 −1 src/Symfony/Component/Validator/Mapping/ClassMetadata.php
@@ -89,6 +89,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}
$this->outputTags($output, $input->getOption('show-private'));
+
return;
}
@@ -146,8 +147,8 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
if (null !== $showTagAttributes) {
$tags = $definition->getTag($showTagAttributes);
- foreach($tags as $tag) {
- foreach($tag as $key => $value) {
+ foreach ($tags as $tag) {
+ foreach ($tag as $key => $value) {
if (!isset($maxTags[$key])) {
$maxTags[$key] = strlen($key);
}
@@ -173,7 +174,7 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
$format1 .= '%-'.($maxScope + 19).'s %s';
$tags = array();
- foreach($maxTags as $tagName => $length) {
+ foreach ($maxTags as $tagName => $length) {
$tags[] = '<comment>'.$tagName.'</comment>';
}
$output->writeln(vsprintf($format1, $this->buildArgumentsArray('<comment>Service Id</comment>', '<comment>Scope</comment>', '<comment>Class Name</comment>', $tags)));
@@ -184,9 +185,9 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
if ($definition instanceof Definition) {
$lines = array();
if (null !== $showTagAttributes) {
- foreach($definition->getTag($showTagAttributes) as $key => $tag) {
+ foreach ($definition->getTag($showTagAttributes) as $key => $tag) {
$tagValues = array();
- foreach(array_keys($maxTags) as $tagName) {
+ foreach (array_keys($maxTags) as $tagName) {
$tagValues[] = isset($tag[$tagName]) ? $tag[$tagName] : "";
}
if (0 === $key) {
@@ -199,7 +200,7 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
$lines[] = $this->buildArgumentsArray($serviceId, $definition->getScope(), $definition->getClass());
}
- foreach($lines as $arguments) {
+ foreach ($lines as $arguments) {
$output->writeln(vsprintf($format, $arguments));
}
} elseif ($definition instanceof Alias) {
@@ -216,7 +217,7 @@ protected function outputServices(OutputInterface $output, $serviceIds, $showPri
protected function buildArgumentsArray($serviceId, $scope, $className, array $tagAttributes = array())
{
$arguments = array($serviceId);
- foreach($tagAttributes as $tagAttribute) {
+ foreach ($tagAttributes as $tagAttribute) {
$arguments[] = $tagAttribute;
}
$arguments[] = $scope;
@@ -59,19 +59,8 @@
<label for="priority">Priority</label>
<select id="priority" name="priority" onchange="document.getElementById('priority-form').submit(); ">
{# values < 0 are custom levels #}
- {% for value, text in {
- 100: 'DEBUG',
- 200: 'INFO',
- 250: 'NOTICE',
- 300: 'WARNING',
- 400: 'ERROR',
- 500: 'CRITICAL',
- 550: 'ALERT',
- 600: 'EMERGENCY',
- '-100': 'DEPRECATION only'
- }
- %}
- <option value="{{ value }}"{{ value == priority ? ' selected' : '' }}>{{ text }}</option>
+ {% for value, text in { 100: 'DEBUG', 200: 'INFO', 250: 'NOTICE', 300: 'WARNING', 400: 'ERROR', 500: 'CRITICAL', 550: 'ALERT', 600: 'EMERGENCY', '-100': 'DEPRECATION only' } %}
+ <option value="{{ value }}"{{ value == priority ? ' selected' : '' }}>{{ text }}</option>
{% endfor %}
</select>
<noscript>
@@ -122,11 +111,7 @@
{% set from = '-' %}
{% endif %}
- <li>Called from {{ call.file is defined and call.line is defined
- ? call.file|format_file(call.line, from)
- : from|raw
- }}
- </li>
+ <li>Called from {{ call.file is defined and call.line is defined ? call.file|format_file(call.line, from) : from|raw }}</li>
{{ index == log.context.stack|length - 1 ? '</ul>' : '' }}
{% endfor %}
@@ -242,7 +242,7 @@ public function register($prepend = false)
* Loads the given class or interface.
*
* @param string $class The name of the class
- *
+ *
* @return Boolean|null True, if loaded
*/
public function loadClass($class)
@@ -610,15 +610,15 @@ public function testOverwritingDefaultInputDefinitionOverwritesDefaultValues()
$this->assertTrue($inputDefinition->hasOption('custom'));
}
-
+
public function testSettingCustomInputDefinitionOverwritesDefaultValues()
{
$application = new Application();
$application->setAutoExit(false);
$application->setCatchExceptions(false);
-
+
$application->setDefinition(new InputDefinition(array(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Set the custom input definition.'))));
-
+
$inputDefinition = $application->getDefinition();
// check whether the default arguments and options are not returned any more
@@ -159,11 +159,11 @@ public function addResource(ResourceInterface $resource)
/**
* Sets the resources for this configuration.
- *
+ *
* @param ResourceInterface[] $resources An array of resources
- *
+ *
* @return ContainerBuilder The current instance
- *
+ *
* @api
*/
public function setResources(array $resources)
@@ -316,6 +316,7 @@ private function buildSorting(Command $command, $sort)
switch ($sort) {
case SortableIterator::SORT_BY_NAME:
$command->ins('sort')->add('| sort');
+
return;
case SortableIterator::SORT_BY_TYPE:
$format = '%y';
@@ -11,7 +11,6 @@
namespace Symfony\Component\Finder\Adapter;
-use Symfony\Component\Finder\Iterator;
use Symfony\Component\Finder\Shell\Shell;
use Symfony\Component\Finder\Shell\Command;
@@ -11,7 +11,6 @@
namespace Symfony\Component\Finder\Adapter;
-use Symfony\Component\Finder\Iterator;
use Symfony\Component\Finder\Shell\Shell;
use Symfony\Component\Finder\Shell\Command;
@@ -10,5 +10,5 @@
/**
* @return \Symfony\Component\Finder\Adapter\AdapterInterface
*/
- function getAdapter();
+ public function getAdapter();
}
@@ -41,7 +41,7 @@ public function __construct($expr)
{
try {
$this->value = Regex::create($expr);
- } catch(\InvalidArgumentException $e) {
+ } catch (\InvalidArgumentException $e) {
$this->value = new Glob($expr);
}
}
@@ -21,28 +21,28 @@
*
* @return string
*/
- function render();
+ public function render();
/**
* Renders string representation of pattern.
*
* @return string
*/
- function renderPattern();
+ public function renderPattern();
/**
* Returns value case sensitivity.
*
* @return bool
*/
- function isCaseSensitive();
+ public function isCaseSensitive();
/**
* Returns expression type.
*
* @return int
*/
- function getType();
+ public function getType();
/**
* @param string $expr
@@ -723,7 +723,7 @@ private function searchInDirectory($dir)
return $this
->buildAdapter($adapter['adapter'])
->searchInDirectory($dir);
- } catch(ExceptionInterface $e) {}
+ } catch (ExceptionInterface $e) {}
}
}
@@ -406,7 +406,6 @@ public function testAppendWithAFinder($adapter)
$finder = $finder->append($finder1);
-
$this->assertIterator($this->toAbsolute(array('foo', 'foo/bar.tmp', 'toto')), $finder->getIterator());
}
@@ -83,4 +83,3 @@ public function getTestFilterData()
}
}
-
@@ -482,6 +482,7 @@ public function testSubformCallsSettersIfReferenceIsScalar()
$builder->get('referenceCopy')->addViewTransformer(new CallbackTransformer(
function () {},
function ($value) { // reverseTransform
+
return 'foobar';
}
));
@@ -507,6 +508,7 @@ public function testSubformAlwaysInsertsIntoArrays()
$builder->get('referenceCopy')->addViewTransformer(new CallbackTransformer(
function () {},
function ($value) use ($ref2) { // reverseTransform
+
return $ref2;
}
));
@@ -12,13 +12,11 @@
namespace Symfony\Component\Form\Tests\Extension\Validator\Constraints;
use Symfony\Component\Form\FormBuilder;
-use Symfony\Component\Validator\ConstraintViolation;
use Symfony\Component\Form\Exception\TransformationFailedException;
use Symfony\Component\Form\CallbackTransformer;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\Extension\Validator\Constraints\Form;
use Symfony\Component\Form\Extension\Validator\Constraints\FormValidator;
-use Symfony\Component\Form\Util\PropertyPath;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\NotBlank;
@@ -102,7 +102,6 @@ public function testGetClientOriginalExtension()
$this->assertEquals('gif', $file->getClientOriginalExtension());
}
-
/**
* @expectedException Symfony\Component\HttpFoundation\File\Exception\FileException
*/
@@ -179,7 +179,7 @@ public function testGc()
$collection->expects($this->once())
->method('remove')
- ->will($this->returnCallback(function($criteria) use($that) {
+ ->will($this->returnCallback(function($criteria) use ($that) {
$that->assertInstanceOf('MongoDate', $criteria[$that->options['time_field']]['$lt']);
$that->assertGreaterThanOrEqual(time() - -1, $criteria[$that->options['time_field']]['$lt']->sec);
}));
@@ -84,6 +84,7 @@ public function lock(Request $request)
return true;
}
+
return !file_exists($path) ?: $path;
}
@@ -208,7 +208,7 @@ protected function getHttpKernel()
/**
* {@inheritdoc}
- *
+ *
* @api
*/
public function getBundles()
@@ -111,7 +111,7 @@ protected function getMongo()
/**
* @param array $data
- *
+ *
* @return Profile
*/
protected function createProfileFromData(array $data)
@@ -132,7 +132,7 @@ protected function createProfileFromData(array $data)
/**
* @param string $token
- *
+ *
* @return Profile[] An array of Profile instances
*/
protected function readChildren($token)
@@ -156,7 +156,7 @@ protected function cleanup()
* @param string $ip
* @param string $url
* @param string $method
- *
+ *
* @return array
*/
private function buildQuery($ip, $url, $method)
@@ -180,7 +180,7 @@ private function buildQuery($ip, $url, $method)
/**
* @param array $data
- *
+ *
* @return array
*/
private function getData(array $data)
@@ -198,7 +198,7 @@ private function getData(array $data)
/**
* @param array $data
- *
+ *
* @return Profile
*/
private function getProfile(array $data)
@@ -114,7 +114,7 @@ public function getIp()
/**
* Sets the IP.
- *
+ *
* @param string $ip
*/
public function setIp($ip)
@@ -179,7 +179,7 @@ public function getChildren()
/**
* Sets children profiler.
- *
+ *
* @param Profile[] $children An array of Profile
*/
public function setChildren(array $children)
@@ -221,7 +221,7 @@ public function getCollector($name)
/**
* Gets the Collectors associated with this profile.
- *
+ *
* @return DataCollectorInterface[]
*/
public function getCollectors()
@@ -231,7 +231,7 @@ public function getCollectors()
/**
* Sets the Collectors associated with this profile.
- *
+ *
* @param DataCollectorInterface[] $collectors
*/
public function setCollectors(array $collectors)
@@ -194,7 +194,7 @@ protected function getHttpKernel($dispatcher, $controller)
class EventSubscriber implements EventSubscriberInterface
{
- static public function getSubscribedEvents()
+ public static function getSubscribedEvents()
{
return array('foo' => 'call');
}
@@ -521,6 +521,7 @@ public function testNormalizerWithoutCorrespondingOption()
$this->options->setNormalizer('foo', function (Options $options, $previousValue) use ($test) {
$test->assertNull($previousValue);
+
return '';
});
$this->assertEquals(array('foo' => ''), $this->options->all());
Oops, something went wrong.

0 comments on commit fdb11be

Please sign in to comment.