diff --git a/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php b/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php index f4710edbd8..a75b046a66 100644 --- a/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php +++ b/src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php @@ -85,6 +85,7 @@ class PropelTypeGuesser implements FormTypeGuesserInterface //check if this is mysql enum $choices = $column->getValueSet(); $labels = array_map('ucfirst', $choices); + return new TypeGuess('choice', array('choices' => array_combine($choices, $labels)), Guess::MEDIUM_CONFIDENCE); } case \PropelColumnTypes::VARCHAR: diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php index 1bc41f49eb..c0dc42d2f3 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/HttpKernelExtensionTest.php @@ -14,7 +14,6 @@ namespace Symfony\Bridge\Twig\Tests\Extension; use Symfony\Bridge\Twig\Extension\HttpKernelExtension; use Symfony\Bridge\Twig\Tests\TestCase; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Fragment\FragmentHandler; class HttpKernelExtensionTest extends TestCase diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 1de202a5be..9335e548b8 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -360,6 +360,7 @@ class ClassCollectionLoader } $resolved[$nodeName] = $node; unset($unresolved[$nodeName]); + return $resolved; } } diff --git a/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php b/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php index e6f87c65d6..2fcba0a8f1 100644 --- a/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php +++ b/src/Symfony/Component/ClassLoader/Tests/Fixtures/Namespaced/WithComments.php @@ -19,7 +19,6 @@ class WithComments $string = 'string shoult not be modified'; - $heredoc = <<ifArray() ->then(function($v) { $v['enabled'] = isset($v['enabled']) ? $v['enabled'] : true; + return $v; }) ->end() diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php index a9f40808db..387a724de2 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php @@ -291,4 +291,4 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface return Guess::getBestGuess($guesses); } -} \ No newline at end of file +} diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php index 47a51c6cc8..528f94633b 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/ValidationListenerTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Tests\Extension\Validator\EventListener; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\FormEvent; -use Symfony\Component\Form\FormError; use Symfony\Component\Form\Extension\Validator\Constraints\Form; use Symfony\Component\Form\Extension\Validator\EventListener\ValidationListener; use Symfony\Component\PropertyAccess\PropertyPath; diff --git a/src/Symfony/Component/HttpFoundation/Response.php b/src/Symfony/Component/HttpFoundation/Response.php index d0b549b4ee..7ac4e80056 100644 --- a/src/Symfony/Component/HttpFoundation/Response.php +++ b/src/Symfony/Component/HttpFoundation/Response.php @@ -258,7 +258,7 @@ class Response * @link http://support.microsoft.com/kb/323308 */ if (false !== stripos($this->headers->get('Content-Disposition'), 'attachment') && preg_match('/MSIE (.*?);/i', $request->server->get('HTTP_USER_AGENT'), $match) == 1 && true === $request->isSecure()) { - if(intval(preg_replace("/(MSIE )(.*?);/", "$2", $match[0])) < 9) { + if (intval(preg_replace("/(MSIE )(.*?);/", "$2", $match[0])) < 9) { $this->headers->remove('Cache-Control'); } } diff --git a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php index 2a54989ea1..dc337789ad 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/FileProfilerStorage.php @@ -225,7 +225,7 @@ class FileProfilerStorage implements ProfilerStorageInterface return null; } - while(true) { + while (true) { $chunkSize = min($position, 1024); $position -= $chunkSize; fseek($file, $position); diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php index 1468e0090f..4e77a913ff 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyPathTest.php @@ -12,8 +12,6 @@ namespace Symfony\Component\PropertyAccess\Tests; use Symfony\Component\PropertyAccess\PropertyPath; -use Symfony\Component\PropertyAccess\Tests\Fixtures\Author; -use Symfony\Component\PropertyAccess\Tests\Fixtures\Magician; class PropertyPathTest extends \PHPUnit_Framework_TestCase { diff --git a/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php b/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php index d9395baf87..c3a8370a79 100644 --- a/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php +++ b/src/Symfony/Component/Security/Tests/Core/Validator/Constraints/UserPasswordValidatorTest.php @@ -26,7 +26,7 @@ class UserPasswordValidatorTest extends \PHPUnit_Framework_TestCase if (false === class_exists('Symfony\Component\Validator\Validator')) { $this->markTestSkipped('The Validator component is required for this test.'); } - + $this->context = $this->getMock('Symfony\Component\Validator\ExecutionContext', array(), array(), '', false); } diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php index c2f60728d9..b5ec1a2352 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/JsonEncoderTest.php @@ -61,7 +61,6 @@ class JsonEncoderTest extends \PHPUnit_Framework_TestCase $this->assertEquals($expected, $this->serializer->serialize($arr, 'json'), 'Context should not be persistent'); } - protected function getJsonSource() { return '{"foo":"foo","bar":["a","b"],"baz":{"key":"val","key2":"val","A B":"bar","item":[{"title":"title1"},{"title":"title2"}],"Barry":{"FooBar":{"Baz":"Ed","@id":1}}},"qux":"1"}'; diff --git a/src/Symfony/Component/Validator/DefaultTranslator.php b/src/Symfony/Component/Validator/DefaultTranslator.php index c4f685e693..20b2e11350 100644 --- a/src/Symfony/Component/Validator/DefaultTranslator.php +++ b/src/Symfony/Component/Validator/DefaultTranslator.php @@ -22,20 +22,20 @@ use Symfony\Component\Translation\TranslatorInterface; * Example usage: * * $translator = new DefaultTranslator(); - * + * * echo $translator->trans( * 'This is a {{ var }}.', * array('{{ var }}' => 'donkey') * ); - * + * * // -> This is a donkey. - * + * * echo $translator->transChoice( * 'This is {{ count }} donkey.|These are {{ count }} donkeys.', * 3, * array('{{ count }}' => 'three') * ); - * + * * // -> These are three donkeys. * * This translator does not support message catalogs, translation domains or @@ -56,12 +56,12 @@ class DefaultTranslator implements TranslatorInterface * Example usage: * * $translator = new DefaultTranslator(); - * + * * echo $translator->trans( * 'This is a {{ var }}.', * array('{{ var }}' => 'donkey') * ); - * + * * // -> This is a donkey. * * @param string $id The message id