diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php index b3b0d60778..442903c3df 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php @@ -153,7 +153,7 @@ abstract class AbstractDoctrineExtension extends Extension */ protected function getMappingDriverBundleConfigDefaults(array $bundleConfig, \ReflectionClass $bundle, ContainerBuilder $container) { - $bundleDir = dirname($bundle->getFilename()); + $bundleDir = dirname($bundle->getFileName()); if (!$bundleConfig['type']) { $bundleConfig['type'] = $this->detectMetadataDriver($bundleDir, $container); diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php index de35c55219..96f05eb5b6 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php @@ -60,7 +60,7 @@ class DoctrineValidationPass implements CompilerPassInterface foreach ($container->getParameter('kernel.bundles') as $bundle) { $reflection = new \ReflectionClass($bundle); - if (is_file($file = dirname($reflection->getFilename()).'/'.$validationPath)) { + if (is_file($file = dirname($reflection->getFileName()).'/'.$validationPath)) { $files[] = realpath($file); $container->addResource(new FileResource($file)); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php index 5bdc2f86e6..54f65588d2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -95,7 +95,7 @@ EOF $extractor = $this->getContainer()->get('translation.extractor'); $extractor->setPrefix($input->getOption('prefix')); foreach ($bundleTransPaths as $path) { - $path = $path.'views'; + $path .= 'views'; if (is_dir($path)) { $extractor->extract($path, $extractedCatalogue); } @@ -106,7 +106,7 @@ EOF $output->writeln('Loading translation files'); $loader = $this->getContainer()->get('translation.loader'); foreach ($bundleTransPaths as $path) { - $path = $path.'translations'; + $path .= 'translations'; if (is_dir($path)) { $loader->loadMessages($path, $currentCatalogue); } @@ -151,7 +151,7 @@ EOF $output->writeln('Writing files'); $bundleTransPath = false; foreach ($bundleTransPaths as $path) { - $path = $path.'translations'; + $path .= 'translations'; if (is_dir($path)) { $bundleTransPath = $path; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css b/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css index 6b81755056..c50c1a54c7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/public/css/body.css @@ -117,7 +117,7 @@ build: 56 background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat; } .sf-button .btn-bg { - padding: 0px 14px; + padding: 0 14px; color: #636363; line-height: 28px; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left; diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php index 9b6f806f04..f29d8a8742 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/TwigExtension.php @@ -75,7 +75,7 @@ class TwigExtension extends Extension } $reflection = new \ReflectionClass($class); - if (is_dir($dir = dirname($reflection->getFilename()).'/Resources/views')) { + if (is_dir($dir = dirname($reflection->getFileName()).'/Resources/views')) { $this->addTwigPath($twigFilesystemLoaderDefinition, $dir, $bundle); } } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/body.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/body.css.twig index fa4d076917..8373e44d0a 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/body.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/body.css.twig @@ -116,7 +116,7 @@ build: 56 background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAcCAYAAACtQ6WLAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAR1JREFUeNpiPHnyZCMDA8MNID5gZmb2nAEJMH7//v3N169fX969e/cYkL8WqGAHXPLv37//QYzfv39/fvPmzbUnT56sAXInmJub/2H5/x8sx8DCwsIrISFhDmQyPX78+CmQXs70798/BmQsKipqBNTgdvz4cWkmkE5kDATMioqKZkCFdiwg1eiAi4tLGqhQF24nMmBmZuYEigth1QkEbEBxTlySYPvJkwSJ00AnjYylgU6gxB8g/oFVEphkvgLF32KNMmCCewYUv4qhEyj47+HDhyeBzIMYOoEp8CxQw56wsLAncJ1//vz5/P79+2svX74EJc2V4BT58+fPd8CE/QKYHMGJOiIiAp6oWW7evDkNSF8DZYfIyEiU7AAQYACJ2vxVdJW4eQAAAABJRU5ErkJggg==) right top no-repeat; } .sf-button .btn-bg { - padding: 0px 14px; + padding: 0 14px; color: #636363; line-height: 28px; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAcCAYAAACgXdXMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAClJREFUeNpiPnny5EKGf//+/Wf6//8/A4QAcrGzKCZwGc9sa2urBBBgAIbDUoYVp9lmAAAAAElFTkSuQmCC) repeat-x top left; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig index e8c0900952..6335bcd5e6 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig @@ -66,7 +66,7 @@ var leftIconPath = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAhCAYAAADOHBvaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4tJREFUeNrkl19IU1Ecx7fZJN2arhq2JUWJlEZL1MAm1B582GBErMJqtabzRRAqFAYa9OfFFx+KQEG3MkYRZkkEJUUwctVSKCJWJojL1ZiydJvLtNXW98AW1znv7t0CHzrw5Xe3nXM/O/f8zvf8LjcajXJWo/E4q9T+P/CaNMZw29rahBMTE3LyoaKi4m1zc/M865swSS6bzZbT09NzfG5urjYUCikikYiQ+ntWVlZQKBQ+F4lE/Var9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FRvQUVDtzMzMMYPBsB/EcjgcVEx7E66oqFivrKx0gFBKvkYuA6FY+b6d9hbVVTboAKgkKtTmcqHgM6G/TuNwOBvRFPmMmg3QJ5Alvlik0tCng1Bu50TznRV9Iuj4iaoeKkDRAPIlA6b67UTBlFvSi+zaR9svAQYA6+V18DvfH/8AAAAASUVORK5CYII=", menu = document.getElementById('navigation'), savedState = Sfjs.getPreference('menu/displayState'), - displayState, elem, className; + displayState; if (null === savedState) { savedState = 'block'; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig index 7f10150c72..7a83c0e103 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig @@ -128,7 +128,7 @@ abbr { } #menu-profiler li a span.label { display: block; - padding: 20px 0px 16px 65px; + padding: 20px 0 16px 65px; min-height: 16px; overflow: hidden; } @@ -199,7 +199,7 @@ li { #resume { background-color: #f6f6f6; border-bottom: 1px solid #dfdfdf; - padding: 18px 10px 0px; + padding: 18px 10px 0; margin-left: 250px; height: 34px; color: #313131; @@ -266,7 +266,6 @@ ul.alt li.warning { margin-bottom: 1px; } ul.sf-call-stack li { - text-size: small; padding: 0 0 0 20px; } td.main, td.menu { @@ -366,13 +365,12 @@ td.main, td.menu { line-height: 1.5em; } .sf-profiler-timeline .legends span { - border-left-width: 10px; - border-left-style: solid; + border-left: 10px solid; padding: 0 10px 0 5px; } .sf-profiler-timeline canvas { - border: 1px solid #999; - border-width: 1px 0; + border: 1px #999; + border-style: solid none; } .collapsed-menu-parents #resume, .collapsed-menu-parents #collector-content { diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig index 129fd82d27..5cc31d56b2 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/toolbar.css.twig @@ -93,9 +93,9 @@ } .sf-toolbar-block .sf-toolbar-info-piece .sf-toolbar-status { - padding: 0px 5px; + padding: 0 5px; border-radius: 5px; - margin-bottom: 0px; + margin-bottom: 0; vertical-align: top; } @@ -129,13 +129,11 @@ display: none; position: absolute; background-color: #fff; - border: 1px solid #bbb; padding: 9px 0; margin-left: -1px; bottom: 38px; - border-bottom-width: 0; - border-bottom: 1px solid #bbb; + border: 1px solid #bbb; border-radius: 4px 4px 0 0; } @@ -198,7 +196,7 @@ } .sf-toolbar-block .sf-toolbar-icon > a, -.sf-toolbar-block .sf-toolbar-icon > a:link +.sf-toolbar-block .sf-toolbar-icon > a:link, .sf-toolbar-block .sf-toolbar-icon > a:hover { color: black !important; } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php index 1a29c75b43..73625d13e1 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ProfilerControllerTest.php @@ -62,8 +62,6 @@ class ProfilerControllerTest extends \PHPUnit_Framework_TestCase if ('found' == $token) { return new Profile($token); } - - return; })) ; diff --git a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php index 143328f412..407458f48f 100644 --- a/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php +++ b/src/Symfony/Component/CssSelector/Tests/XPath/TranslatorTest.php @@ -74,7 +74,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase $document = simplexml_import_dom($document); $bodies = $document->xpath('//body'); $elements = $bodies[0]->xpath($translator->cssToXPath($css)); - $this->assertEquals($count, count($elements)); + $this->assertCount($count, $elements); } public function getXpathLiteralTestData() diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/interfaces1.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/interfaces1.php index 27503a351c..4c93e32017 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/interfaces1.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/containers/interfaces1.php @@ -11,15 +11,3 @@ $definition = new Definition('%cla%o%ss%'); $container->setDefinition('foo', $definition); return $container; - -if (!class_exists('FooClass')) { - class FooClass - { - public $bar; - - public function setBar($bar) - { - $this->bar = $bar; - } - } -} diff --git a/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php index fb3b4caa26..1f6b9502d5 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/ContainerAwareEventDispatcherTest.php @@ -52,6 +52,18 @@ class ContainerAwareEventDispatcherTest extends \PHPUnit_Framework_TestCase ->with($event) ; + $service + ->expects($this->once()) + ->method('onEventWithPriority') + ->with($event) + ; + + $service + ->expects($this->once()) + ->method('onEventNested') + ->with($event) + ; + $container = new Container(); $container->set('service.subscriber', $service); @@ -59,6 +71,8 @@ class ContainerAwareEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher->addSubscriberService('service.subscriber', 'Symfony\Component\EventDispatcher\Tests\SubscriberService'); $dispatcher->dispatch('onEvent', $event); + $dispatcher->dispatch('onEventWithPriority', $event); + $dispatcher->dispatch('onEventNested', $event); } public function testPreventDuplicateListenerService() @@ -233,12 +247,20 @@ class SubscriberService implements EventSubscriberInterface { return array( 'onEvent' => 'onEvent', - 'onEvent' => array('onEvent', 10), - 'onEvent' => array('onEvent'), + 'onEventWithPriority' => array('onEventWithPriority', 10), + 'onEventNested' => array(array('onEventNested')), ); } public function onEvent(Event $e) { } + + public function onEventWithPriority(Event $e) + { + } + + public function onEventNested(Event $e) + { + } } diff --git a/src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php b/src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php index 244301a739..da4004d6b5 100644 --- a/src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php +++ b/src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php @@ -94,7 +94,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter $command->setErrorHandler( $this->ignoreUnreadableDirs // If directory is unreadable and finder is set to ignore it, `stderr` is ignored. - ? function ($stderr) { return; } + ? function ($stderr) { } : function ($stderr) { throw new AccessDeniedException($stderr); } ); diff --git a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php index bde4ba723f..2fe81e1b8e 100644 --- a/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php +++ b/src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php @@ -71,10 +71,10 @@ class ChoiceType extends AbstractType if ($options['multiple']) { $builder->addViewTransformer(new ChoicesToBooleanArrayTransformer($options['choice_list'])); - $builder->addEventSubscriber(new FixCheckboxInputListener($options['choice_list']), 10); + $builder->addEventSubscriber(new FixCheckboxInputListener($options['choice_list'])); } else { $builder->addViewTransformer(new ChoiceToBooleanArrayTransformer($options['choice_list'], $builder->has('placeholder'))); - $builder->addEventSubscriber(new FixRadioInputListener($options['choice_list'], $builder->has('placeholder')), 10); + $builder->addEventSubscriber(new FixRadioInputListener($options['choice_list'], $builder->has('placeholder'))); } } else { if ($options['multiple']) { diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php index c440a0470a..cb999fc59c 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php @@ -558,11 +558,6 @@ class FormValidatorTest extends AbstractConstraintValidatorTest return array('group1', 'group2'); } - private function getMockExecutionContext() - { - return $this->getMock('Symfony\Component\Validator\ExecutionContextInterface'); - } - /** * @param string $name * @param string $dataClass diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php index e26bf7f1b6..6a15bbfa9e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php @@ -64,7 +64,7 @@ abstract class BaseValidatorExtensionTest extends TypeTestCase public function testValidationGroupsCanBeSetToClosure() { $form = $this->createForm(array( - 'validation_groups' => function (FormInterface $form) { return; }, + 'validation_groups' => function (FormInterface $form) { }, )); $this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups'))); diff --git a/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php b/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php index 7adff69a3f..dd51fa5d23 100644 --- a/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php +++ b/src/Symfony/Component/Form/Tests/Util/OrderedHashMapTest.php @@ -482,6 +482,6 @@ class OrderedHashMapTest extends \PHPUnit_Framework_TestCase unset($map[0]); $map[] = 3; - $this->assertSame(2, count($map)); + $this->assertCount(2, $map); } } diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index d2af44626c..eea1ab91c6 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -1707,8 +1707,6 @@ class Request return '/'; } - $pathInfo = '/'; - // Remove the query string from REQUEST_URI if ($pos = strpos($requestUri, '?')) { $requestUri = substr($requestUri, 0, $pos); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php index 1936b1c294..1c6b7b9635 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -57,7 +57,7 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase { $storage = new PdoSessionHandler($this->pdo, array('db_table' => 'bad_name')); $this->setExpectedException('RuntimeException'); - $storage->read('foo', 'bar'); + $storage->read('foo'); } public function testWriteRead() diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 07179faec4..a330c8075e 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -255,7 +255,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface // invalidate only when the response is successful if ($response->isSuccessful() || $response->isRedirect()) { try { - $this->store->invalidate($request, $catch); + $this->store->invalidate($request); // As per the RFC, invalidate Location and Content-Location URLs if present foreach (array('Location', 'Content-Location') as $header) { @@ -481,7 +481,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface $this->processResponseBody($request, $response); if ($this->isPrivateRequest($request) && !$response->headers->hasCacheControlDirective('public')) { - $response->setPrivate(true); + $response->setPrivate(); } elseif ($this->options['default_ttl'] > 0 && null === $response->getTtl() && !$response->headers->getCacheControlDirective('must-revalidate')) { $response->setTtl($this->options['default_ttl']); } diff --git a/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php index 0c25bc950c..33c11b68cd 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php @@ -77,7 +77,7 @@ class SqliteProfilerStorage extends PdoProfilerStorage $return = array(); if ($db instanceof \SQLite3) { - $stmt = $this->prepareStatement($db, $query, true); + $stmt = $this->prepareStatement($db, $query); foreach ($args as $arg => $val) { $stmt->bindValue($arg, $val, is_int($val) ? \SQLITE3_INTEGER : \SQLITE3_TEXT); } diff --git a/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php index 9c978f8ea8..19cf6eab00 100644 --- a/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/CurrencyDataGenerator.php @@ -121,8 +121,6 @@ class CurrencyDataGenerator extends AbstractDataGenerator return $data; } - - return; } /** diff --git a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php index 7c4dac8415..65894340cb 100644 --- a/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php +++ b/src/Symfony/Component/Intl/Data/Generator/LanguageDataGenerator.php @@ -133,8 +133,6 @@ class LanguageDataGenerator extends AbstractDataGenerator return $data; } - - return; } /** @@ -142,7 +140,6 @@ class LanguageDataGenerator extends AbstractDataGenerator */ protected function generateDataForRoot(BundleReaderInterface $reader, $tempDir) { - return; } /** diff --git a/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php b/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php index c2d097e527..0604593f6e 100644 --- a/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php +++ b/src/Symfony/Component/Intl/Data/Util/LocaleScanner.php @@ -67,7 +67,7 @@ class LocaleScanner */ public function scanAliases($sourceDir) { - $locales = $this->scanLocales($sourceDir, '.txt'); + $locales = $this->scanLocales($sourceDir); $aliases = array(); // Delete locales that are no aliases diff --git a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php index 11f8c0f947..c309fc722d 100644 --- a/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php +++ b/src/Symfony/Component/Intl/DateFormatter/IntlDateFormatter.php @@ -647,8 +647,7 @@ class IntlDateFormatter if (self::NONE !== $this->timetype) { $patternParts[] = $this->defaultTimeFormats[$this->timetype]; } - $pattern = implode(', ', $patternParts); - return $pattern; + return implode(', ', $patternParts); } } diff --git a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php index 0ee222ee50..7bc7a2ba88 100644 --- a/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php +++ b/src/Symfony/Component/Intl/NumberFormatter/NumberFormatter.php @@ -709,11 +709,9 @@ class NumberFormatter private function round($value, $precision) { $precision = $this->getUnitializedPrecision($value, $precision); - $roundingMode = self::$phpRoundingMap[$this->getAttribute(self::ROUNDING_MODE)]; - $value = round($value, $precision, $roundingMode); - return $value; + return round($value, $precision, $roundingMode); } /** diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php index d6f4257647..b2d7c63a93 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Reader/IntlBundleReaderTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Intl\Tests\Data\Bundle\Reader; use Symfony\Component\Intl\Data\Bundle\Reader\IntlBundleReader; -use Symfony\Component\Intl\Intl; /** * @author Bernhard Schussek diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php index b9d50976d9..5e4c4b225e 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/JsonBundleWriterTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Intl\Tests\Data\Bundle\Writer; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Data\Bundle\Writer\JsonBundleWriter; -use Symfony\Component\Intl\Intl; /** * @author Bernhard Schussek diff --git a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php index d11d3d204b..ee7b12f1ed 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Bundle/Writer/PhpBundleWriterTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Intl\Tests\Data\Bundle\Writer; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Intl\Data\Bundle\Writer\PhpBundleWriter; -use Symfony\Component\Intl\Intl; /** * @author Bernhard Schussek diff --git a/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php b/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php index 7c37c80720..fa487ba3b5 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Util/LocaleScannerTest.php @@ -64,13 +64,13 @@ class LocaleScannerTest extends \PHPUnit_Framework_TestCase { $sortedLocales = array('de', 'de_alias', 'en', 'en_alias', 'fr', 'fr_alias'); - $this->assertSame($sortedLocales, $this->scanner->scanLocales($this->directory, '.txt')); + $this->assertSame($sortedLocales, $this->scanner->scanLocales($this->directory)); } public function testScanAliases() { $sortedAliases = array('de_alias' => 'de', 'en_alias' => 'en', 'fr_alias' => 'fr'); - $this->assertSame($sortedAliases, $this->scanner->scanAliases($this->directory, '.txt')); + $this->assertSame($sortedAliases, $this->scanner->scanAliases($this->directory)); } } diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php index a38a3ef967..51bc6eabc2 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php @@ -337,7 +337,7 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase { $value = new MagicianCall(); - $this->propertyAccessor->getValue($value, 'foobar', 'bam'); + $this->propertyAccessor->getValue($value, 'foobar'); } public function testGetValueReadsMagicCall() diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php index 2807e1011c..d7b74f01e1 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php @@ -623,9 +623,8 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase $method = 'set'.$key; $context->$method($value); } - $generator = new UrlGenerator($routes, $context, $logger); - return $generator; + return new UrlGenerator($routes, $context, $logger); } protected function getRoutes($name, Route $route) diff --git a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php index 074c4a039d..3baaa9914e 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php @@ -856,7 +856,7 @@ QUERY; */ private function updateNewAceProperty($name, array $changes) { - list($old, $new) = $changes; + list(, $new) = $changes; $sids = new \SplObjectStorage(); $classIds = new \SplObjectStorage(); diff --git a/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php b/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php index ad96243d47..8316a8c69d 100644 --- a/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php +++ b/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php @@ -140,7 +140,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase public function testSessionStrategy() { - list($listener, $tokenStorage, $service, $manager) = $this->getListener(false, true, true); + list($listener, $tokenStorage, $service, $manager) = $this->getListener(); $tokenStorage ->expects($this->once()) diff --git a/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php b/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php index b988c7dc0f..d1ec9b248d 100644 --- a/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php +++ b/src/Symfony/Component/Security/Tests/Http/RememberMe/TokenBasedRememberMeServicesTest.php @@ -172,9 +172,8 @@ class TokenBasedRememberMeServicesTest extends \PHPUnit_Framework_TestCase { $service = $this->getService(null, array('name' => 'foo', 'path' => '/foo', 'domain' => 'foodomain.foo')); $request = new Request(); - $response = new Response(); - $service->loginFail($request, $response); + $service->loginFail($request); $cookie = $request->attributes->get(RememberMeServicesInterface::COOKIE_ATTR_NAME); $this->assertTrue($cookie->isCleared()); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index 1c5d699b5d..d870c82e0f 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -208,7 +208,6 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase array( array( 'bar' => function ($bar) { - return; }, ), 'baz', diff --git a/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php b/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php index b354c1245c..60cc2ef65e 100644 --- a/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php +++ b/src/Symfony/Component/Translation/Dumper/PhpFileDumper.php @@ -25,9 +25,7 @@ class PhpFileDumper extends FileDumper */ protected function format(MessageCatalogue $messages, $domain) { - $output = "all($domain), true).";\n"; - - return $output; + return "all($domain), true).";\n"; } /** diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php index dbb12f2834..b259000e53 100644 --- a/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -255,7 +255,6 @@ class InlineTest extends \PHPUnit_Framework_TestCase '12.30e+02' => 12.30e+02, '1234' => 0x4D2, '1243' => 02333, - '.Inf' => -log(0), '-.Inf' => log(0), "'686e444'" => '686e444', '.Inf' => 646e444,