diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php index 64fb8e9da6..fd32b8d4ce 100644 --- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php +++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterMappingsPass.php @@ -75,20 +75,23 @@ abstract class RegisterMappingsPass implements CompilerPassInterface /** * Naming pattern for the configuration service id, for example - * 'doctrine.orm.%s_configuration' + * 'doctrine.orm.%s_configuration'. + * * @var string */ private $configurationPattern; /** * Method name to call on the configuration service. This depends on the - * Doctrine implementation. For example addEntityNamespace + * Doctrine implementation. For example addEntityNamespace. + * * @var string */ private $registerAliasMethodName; /** * Map of alias to namespace. + * * @var string[] */ private $aliasMap; diff --git a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php index f84d4965bf..ed8e7a5c3c 100644 --- a/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php +++ b/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php @@ -136,7 +136,6 @@ abstract class DoctrineType extends AbstractType // Unless the choices are given explicitly, load them on demand if (null === $options['choices']) { - $hash = null; $qbParts = null; @@ -144,7 +143,6 @@ abstract class DoctrineType extends AbstractType // also if concrete Type can return important QueryBuilder parts to generate // hash key we go for it as well if (!$options['query_builder'] || false !== ($qbParts = $type->getQueryBuilderPartsForCachingHash($options['query_builder']))) { - $hash = CachingFactoryDecorator::generateHash(array( $options['em'], $options['class'], diff --git a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php index 48c00808b5..41899c1c60 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php @@ -162,10 +162,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase $newEmConfigs = $method->invoke($this->extension, $emConfigs, $bundles); - $this->assertEquals($newEmConfigs["em1"], array_merge(array( + $this->assertEquals($newEmConfigs['em1'], array_merge(array( 'auto_mapping' => false, ), $expectedEm1)); - $this->assertEquals($newEmConfigs["em2"], array_merge(array( + $this->assertEquals($newEmConfigs['em2'], array_merge(array( 'auto_mapping' => false, ), $expectedEm2)); } diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/LegacyUniqueEntityValidatorLegacyApiTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/LegacyUniqueEntityValidatorLegacyApiTest.php index f639171864..cde865cc1d 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/LegacyUniqueEntityValidatorLegacyApiTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/LegacyUniqueEntityValidatorLegacyApiTest.php @@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation; /** * @since 2.5.4 + * * @author Bernhard Schussek * @group legacy */ diff --git a/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php b/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php index e98306c53c..0412e94f22 100644 --- a/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/SwiftMailerHandler.php @@ -45,7 +45,7 @@ class SwiftMailerHandler extends BaseSwiftMailerHandler } /** - * After the CLI application has been terminated we will always flush messages + * After the CLI application has been terminated we will always flush messages. * * @param ConsoleTerminateEvent $event */ diff --git a/src/Symfony/Bridge/Twig/Command/LintCommand.php b/src/Symfony/Bridge/Twig/Command/LintCommand.php index ef73e4c7b4..8cbf3c062e 100644 --- a/src/Symfony/Bridge/Twig/Command/LintCommand.php +++ b/src/Symfony/Bridge/Twig/Command/LintCommand.php @@ -177,7 +177,7 @@ EOF if ($info['valid'] && $output->isVerbose()) { $output->writeln('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); } elseif (!$info['valid']) { - $errors++; + ++$errors; $this->renderException($output, $info['template'], $info['exception'], $info['file']); } } @@ -197,7 +197,7 @@ EOF if (!$v['valid']) { $v['message'] = $v['exception']->getMessage(); unset($v['exception']); - $errors++; + ++$errors; } }); @@ -208,7 +208,7 @@ EOF private function renderException(OutputInterface $output, $template, \Twig_Error $exception, $file = null) { - $line = $exception->getTemplateLine(); + $line = $exception->getTemplateLine(); if ($file) { $output->writeln(sprintf('KO in %s (line %s)', $file, $line)); @@ -239,7 +239,7 @@ EOF $result = array(); while ($position < $max) { $result[$position + 1] = $lines[$position]; - $position++; + ++$position; } return $result; diff --git a/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php b/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php index 43807c6f88..763a5ec4b3 100644 --- a/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php +++ b/src/Symfony/Bridge/Twig/DataCollector/TwigDataCollector.php @@ -116,7 +116,7 @@ class TwigDataCollector extends DataCollector implements LateDataCollectorInterf if (!isset($templates[$p->getTemplate()])) { $templates[$p->getTemplate()] = 1; } else { - $templates[$p->getTemplate()]++; + ++$templates[$p->getTemplate()]; } } diff --git a/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php b/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php index 01c54efbf2..3efb196cc9 100644 --- a/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php +++ b/src/Symfony/Bundle/DebugBundle/Tests/DependencyInjection/DebugExtensionTest.php @@ -26,8 +26,8 @@ class DebugExtensionTest extends \PHPUnit_Framework_TestCase $expectedTags = array( array( - "id" => "dump", - "template" => "@Debug/Profiler/dump.html.twig", + 'id' => 'dump', + 'template' => '@Debug/Profiler/dump.html.twig', ), ); diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php index f3b6171a4d..3f931f54c1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/YamlLintCommand.php @@ -135,7 +135,7 @@ EOF if ($info['valid'] && $output->isVerbose()) { $output->writeln('OK'.($info['file'] ? sprintf(' in %s', $info['file']) : '')); } elseif (!$info['valid']) { - $errors++; + ++$errors; $output->writeln(sprintf('KO in %s', $info['file'])); $output->writeln(sprintf('>> %s', $info['message'])); } @@ -153,7 +153,7 @@ EOF array_walk($filesInfo, function (&$v) use (&$errors) { $v['file'] = (string) $v['file']; if (!$v['valid']) { - $errors++; + ++$errors; } }); diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php index 84877461c8..8f1227e7e9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/MarkdownDescriptor.php @@ -113,7 +113,7 @@ class MarkdownDescriptor extends Descriptor } elseif ($service instanceof Definition) { $this->describeContainerDefinition($service, $childOptions); } else { - $this->write(sprintf("**`%s`:** `%s`", $options['id'], get_class($service))); + $this->write(sprintf('**`%s`:** `%s`', $options['id'], get_class($service))); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php index 8cccd82635..873c736841 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php @@ -119,7 +119,7 @@ class ControllerNameParser } /** - * Attempts to find a bundle that is *similar* to the given bundle name + * Attempts to find a bundle that is *similar* to the given bundle name. * * @param string $nonExistentBundleName * diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php index 94db08b5bd..df3f338fbb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/ObjectsProvider.php @@ -74,7 +74,7 @@ class ObjectsProvider $builder->setParameter('database_name', 'symfony'); return array( - 'parameter' => $builder, + 'parameter' => $builder, ); } @@ -114,6 +114,7 @@ class ObjectsProvider /** * @deprecated since version 2.7, to be removed in 3.0 + * * @internal */ public static function getLegacyContainerDefinitions() diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php index 650316860c..2bb59d9c6f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTest.php @@ -98,6 +98,7 @@ class ControllerTest extends TestCase /** * @param $token + * * @return ContainerInterface */ private function getContainerWithTokenStorage($token = null) diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php index 62561612bb..ad0d65390d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LoggingTranslatorPassTest.php @@ -12,8 +12,6 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler; use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\LoggingTranslatorPass; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Definition; class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase { @@ -46,7 +44,7 @@ class LoggingTranslatorPassTest extends \PHPUnit_Framework_TestCase $definition->expects($this->once()) ->method('getClass') - ->will($this->returnValue("%translator.class%")); + ->will($this->returnValue('%translator.class%')); $parameterBag->expects($this->once()) ->method('resolveValue') diff --git a/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php index 90b5c89630..ba34782346 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php @@ -24,7 +24,7 @@ use Symfony\Component\Security\Acl\Permission\MaskBuilder; use Symfony\Component\Security\Acl\Model\MutableAclProviderInterface; /** - * Sets ACL for objects + * Sets ACL for objects. * * @author Kévin Dunglas */ @@ -162,7 +162,7 @@ EOF } /** - * Gets the mask builder + * Gets the mask builder. * * @return MaskBuilder */ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php index 61a2bc938f..93a3044413 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/remember_me_options.php @@ -1,4 +1,5 @@ loadFromExtension('security', array( 'providers' => array( 'default' => array('id' => 'foo'), diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php index dd46db2f64..c85a589578 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php @@ -12,7 +12,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity; /** - * Car + * Car. * * @author Kévin Dunglas */ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php index ec3cc116ec..9a4a5e9a10 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/SetAclCommandTest.php @@ -21,7 +21,7 @@ use Symfony\Component\Security\Acl\Exception\NoAceFoundException; use Symfony\Component\Security\Acl\Permission\BasicPermissionMap; /** - * Tests SetAclCommand + * Tests SetAclCommand. * * @author Kévin Dunglas */ diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php index 868ff0b843..8f8e6ba7e0 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/UserPasswordEncoderCommandTest.php @@ -18,7 +18,7 @@ use Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder; use Symfony\Component\Security\Core\Encoder\Pbkdf2PasswordEncoder; /** - * Tests UserPasswordEncoderCommand + * Tests UserPasswordEncoderCommand. * * @author Sarah Khalil */ diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php index 8cb276734e..7bef647a7e 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/Controller/PreviewErrorControllerTest.php @@ -24,7 +24,7 @@ class PreviewErrorControllerTest extends TestCase $self = $this; $request = Request::create('whatever'); - $response = new Response(""); + $response = new Response(''); $code = 123; $logicalControllerName = 'foo:bar:baz'; diff --git a/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php b/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php index a6cb0bb6a3..13df2f443e 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Twig/WebProfilerExtension.php @@ -14,7 +14,7 @@ namespace Symfony\Bundle\WebProfilerBundle\Twig; use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter; /** - * Twig extension for the profiler + * Twig extension for the profiler. * * @author Fabien Potencier */ diff --git a/src/Symfony/Component/Asset/Context/NullContext.php b/src/Symfony/Component/Asset/Context/NullContext.php index 47d29d7d2e..0743d8ccbd 100644 --- a/src/Symfony/Component/Asset/Context/NullContext.php +++ b/src/Symfony/Component/Asset/Context/NullContext.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Asset\Context; -use Symfony\Component\HttpFoundation\RequestStack; - /** * A context that does nothing. * diff --git a/src/Symfony/Component/Asset/Packages.php b/src/Symfony/Component/Asset/Packages.php index e980b7608e..0a8c963549 100644 --- a/src/Symfony/Component/Asset/Packages.php +++ b/src/Symfony/Component/Asset/Packages.php @@ -67,7 +67,7 @@ class Packages * @return PackageInterface An asset package * * @throws InvalidArgumentException If there is no package by that name - * @throws LogicException If no default package is defined + * @throws LogicException If no default package is defined */ public function getPackage($name = null) { diff --git a/src/Symfony/Component/Config/ConfigCache.php b/src/Symfony/Component/Config/ConfigCache.php index 1f6e07c20b..cc99bc9211 100644 --- a/src/Symfony/Component/Config/ConfigCache.php +++ b/src/Symfony/Component/Config/ConfigCache.php @@ -42,6 +42,7 @@ class ConfigCache implements ConfigCacheInterface * Gets the cache file path. * * @return string The cache file path + * * @deprecated since 2.7, to be removed in 3.0. Use getPath() instead. */ public function __toString() diff --git a/src/Symfony/Component/Config/ConfigCacheFactoryInterface.php b/src/Symfony/Component/Config/ConfigCacheFactoryInterface.php index 750d2cc789..bd614c4b6b 100644 --- a/src/Symfony/Component/Config/ConfigCacheFactoryInterface.php +++ b/src/Symfony/Component/Config/ConfigCacheFactoryInterface.php @@ -23,8 +23,8 @@ interface ConfigCacheFactoryInterface /** * Creates a cache instance and (re-)initializes it if necessary. * - * @param string $file The absolute cache file path - * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback + * @param string $file The absolute cache file path + * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback * * @return ConfigCacheInterface $configCache The cache instance */ diff --git a/src/Symfony/Component/Config/ConfigCacheInterface.php b/src/Symfony/Component/Config/ConfigCacheInterface.php index 067e2a1330..e367ad187e 100644 --- a/src/Symfony/Component/Config/ConfigCacheInterface.php +++ b/src/Symfony/Component/Config/ConfigCacheInterface.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Config; use Symfony\Component\Config\Resource\ResourceInterface; /** - * Interface for ConfigCache + * Interface for ConfigCache. * * @author Matthias Pigulla */ diff --git a/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php b/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php index ab56a92838..0c891ca20a 100644 --- a/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/Dumper/XmlReferenceDumper.php @@ -247,7 +247,7 @@ class XmlReferenceDumper } /** - * Outputs a single config reference line + * Outputs a single config reference line. * * @param string $text * @param int $indent diff --git a/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php b/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php index a7cd4486f2..83587fb49c 100644 --- a/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/Dumper/YamlReferenceDumper.php @@ -125,7 +125,7 @@ class YamlReferenceDumper if ($info = $node->getInfo()) { $this->writeLine(''); // indenting multi-line info - $info = str_replace("\n", sprintf("\n%".($depth * 4)."s# ", ' '), $info); + $info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info); $this->writeLine('# '.$info, $depth * 4); } @@ -160,7 +160,7 @@ class YamlReferenceDumper } /** - * Outputs a single config reference line + * Outputs a single config reference line. * * @param string $text * @param int $indent diff --git a/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php b/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php index 56f5526428..92adf1ef96 100644 --- a/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php +++ b/src/Symfony/Component/Console/Event/ConsoleCommandEvent.php @@ -19,19 +19,19 @@ namespace Symfony\Component\Console\Event; class ConsoleCommandEvent extends ConsoleEvent { /** - * The return code for skipped commands, this will also be passed into the terminate event + * The return code for skipped commands, this will also be passed into the terminate event. */ const RETURN_CODE_DISABLED = 113; /** - * Indicates if the command should be run or skipped + * Indicates if the command should be run or skipped. * * @var bool */ private $commandShouldRun = true; /** - * Disables the command, so it won't be run + * Disables the command, so it won't be run. * * @return bool */ @@ -41,7 +41,7 @@ class ConsoleCommandEvent extends ConsoleEvent } /** - * Enables the command + * Enables the command. * * @return bool */ @@ -51,7 +51,7 @@ class ConsoleCommandEvent extends ConsoleEvent } /** - * Returns true if the command is runnable, false otherwise + * Returns true if the command is runnable, false otherwise. * * @return bool */ diff --git a/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php b/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php index 0b4b937902..1119b795c8 100644 --- a/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php +++ b/src/Symfony/Component/Console/Helper/DebugFormatterHelper.php @@ -25,7 +25,7 @@ class DebugFormatterHelper extends Helper private $count = -1; /** - * Starts a debug formatting session + * Starts a debug formatting session. * * @param string $id The id of the formatting session * @param string $message The message to display @@ -41,7 +41,7 @@ class DebugFormatterHelper extends Helper } /** - * Adds progress to a formatting session + * Adds progress to a formatting session. * * @param string $id The id of the formatting session * @param string $buffer The message to display @@ -61,7 +61,7 @@ class DebugFormatterHelper extends Helper unset($this->started[$id]['out']); } if (!isset($this->started[$id]['err'])) { - $message .= sprintf("%s %s ", $this->getBorder($id), $errorPrefix); + $message .= sprintf('%s %s ', $this->getBorder($id), $errorPrefix); $this->started[$id]['err'] = true; } @@ -72,7 +72,7 @@ class DebugFormatterHelper extends Helper unset($this->started[$id]['err']); } if (!isset($this->started[$id]['out'])) { - $message .= sprintf("%s %s ", $this->getBorder($id), $prefix); + $message .= sprintf('%s %s ', $this->getBorder($id), $prefix); $this->started[$id]['out'] = true; } @@ -83,7 +83,7 @@ class DebugFormatterHelper extends Helper } /** - * Stops a formatting session + * Stops a formatting session. * * @param string $id The id of the formatting session * @param string $message The message to display diff --git a/src/Symfony/Component/Console/Helper/QuestionHelper.php b/src/Symfony/Component/Console/Helper/QuestionHelper.php index 9e4fa02f2c..6584377aad 100644 --- a/src/Symfony/Component/Console/Helper/QuestionHelper.php +++ b/src/Symfony/Component/Console/Helper/QuestionHelper.php @@ -77,7 +77,7 @@ class QuestionHelper extends Helper } /** - * Returns the helper's input stream + * Returns the helper's input stream. * * @return resource */ @@ -150,7 +150,7 @@ class QuestionHelper extends Helper * Outputs the question prompt. * * @param OutputInterface $output - * @param Question $question + * @param Question $question */ protected function writePrompt(OutputInterface $output, Question $question) { @@ -222,7 +222,7 @@ class QuestionHelper extends Helper // Backspace Character if ("\177" === $c) { if (0 === $numMatches && 0 !== $i) { - $i--; + --$i; // Move cursor backwards $output->write("\033[1D"); } @@ -275,7 +275,7 @@ class QuestionHelper extends Helper } else { $output->write($c); $ret .= $c; - $i++; + ++$i; $numMatches = 0; $ofs = 0; diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index 9e86c856d0..6da4b7d7a1 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -245,7 +245,7 @@ class Table } $markup = $this->style->getCrossingChar(); - for ($column = 0; $column < $count; $column++) { + for ($column = 0; $column < $count; ++$column) { $markup .= str_repeat($this->style->getHorizontalBorderChar(), $this->getColumnWidth($column)).$this->style->getCrossingChar(); } @@ -338,7 +338,7 @@ class Table private function buildTableRows($rows) { $unmergedRows = array(); - for ($rowKey = 0; $rowKey < count($rows); $rowKey++) { + for ($rowKey = 0; $rowKey < count($rows); ++$rowKey) { $rows = $this->fillNextRows($rows, $rowKey); // Remove any new line breaks and replace it with a new line diff --git a/src/Symfony/Component/Console/Logger/ConsoleLogger.php b/src/Symfony/Component/Console/Logger/ConsoleLogger.php index cf5d49c4c6..1f7417ea5a 100644 --- a/src/Symfony/Component/Console/Logger/ConsoleLogger.php +++ b/src/Symfony/Component/Console/Logger/ConsoleLogger.php @@ -18,9 +18,10 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; /** - * PSR-3 compliant console logger + * PSR-3 compliant console logger. * * @author Kévin Dunglas + * * @link http://www.php-fig.org/psr/psr-3/ */ class ConsoleLogger extends AbstractLogger @@ -93,7 +94,7 @@ class ConsoleLogger extends AbstractLogger } /** - * Interpolates context values into the message placeholders + * Interpolates context values into the message placeholders. * * @author PHP Framework Interoperability Group * diff --git a/src/Symfony/Component/Console/Question/ConfirmationQuestion.php b/src/Symfony/Component/Console/Question/ConfirmationQuestion.php index 9e55859053..29d98879f0 100644 --- a/src/Symfony/Component/Console/Question/ConfirmationQuestion.php +++ b/src/Symfony/Component/Console/Question/ConfirmationQuestion.php @@ -23,8 +23,8 @@ class ConfirmationQuestion extends Question /** * Constructor. * - * @param string $question The question to ask to the user - * @param bool $default The default answer to return, true or false + * @param string $question The question to ask to the user + * @param bool $default The default answer to return, true or false * @param string $trueAnswerRegex A regex to match the "yes" answer */ public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i') diff --git a/src/Symfony/Component/Console/Style/OutputStyle.php b/src/Symfony/Component/Console/Style/OutputStyle.php index 13ed05b13d..8371bb5335 100644 --- a/src/Symfony/Component/Console/Style/OutputStyle.php +++ b/src/Symfony/Component/Console/Style/OutputStyle.php @@ -16,7 +16,7 @@ use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Output\OutputInterface; /** - * Decorates output to add console style guide helpers + * Decorates output to add console style guide helpers. * * @author Kevin Bond */ diff --git a/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php b/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php index aef6d2246c..0070c0a486 100644 --- a/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php +++ b/src/Symfony/Component/Console/Tests/Fixtures/DummyOutput.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Console\Tests\Fixtures; use Symfony\Component\Console\Output\BufferedOutput; /** - * Dummy output + * Dummy output. * * @author Kévin Dunglas */ diff --git a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php index 97b99efe74..8f33e3bf37 100644 --- a/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/ProgressBarTest.php @@ -315,7 +315,7 @@ class ProgressBarTest extends \PHPUnit_Framework_TestCase $bar = new ProgressBar($output = $this->getOutputStream(false), 200); $bar->start(); - for ($i = 0; $i < 200; $i++) { + for ($i = 0; $i < 200; ++$i) { $bar->advance(); } @@ -384,7 +384,7 @@ class ProgressBarTest extends \PHPUnit_Framework_TestCase $output->write("\n"); $bar3->start(); - for ($i = 1; $i <= 3; $i++) { + for ($i = 1; $i <= 3; ++$i) { // up two lines $output->write("\033[2A"); if ($i <= 2) { diff --git a/src/Symfony/Component/Console/Tests/Helper/TableTest.php b/src/Symfony/Component/Console/Tests/Helper/TableTest.php index 2a66caa046..ad05379401 100644 --- a/src/Symfony/Component/Console/Tests/Helper/TableTest.php +++ b/src/Symfony/Component/Console/Tests/Helper/TableTest.php @@ -427,7 +427,7 @@ TABLE array('ISBN', 'Author'), array( array( - new TableCell("9971-5-0210-0", array('rowspan' => 3, 'colspan' => 1)), + new TableCell('9971-5-0210-0', array('rowspan' => 3, 'colspan' => 1)), 'Dante Alighieri', ), array(new TableSeparator()), diff --git a/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php b/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php index 1abc363240..c5eca2cafd 100644 --- a/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php +++ b/src/Symfony/Component/Console/Tests/Logger/ConsoleLoggerTest.php @@ -18,7 +18,7 @@ use Symfony\Component\Console\Tests\Fixtures\DummyOutput; use Symfony\Component\Console\Output\OutputInterface; /** - * Console logger test + * Console logger test. * * @author Kévin Dunglas */ diff --git a/src/Symfony/Component/CssSelector/Node/Specificity.php b/src/Symfony/Component/CssSelector/Node/Specificity.php index 0dfec3b955..0ce0c3f304 100644 --- a/src/Symfony/Component/CssSelector/Node/Specificity.php +++ b/src/Symfony/Component/CssSelector/Node/Specificity.php @@ -78,7 +78,7 @@ class Specificity /** * Returns -1 if the object specificity is lower than the argument, - * 0 if they are equal, and 1 if the argument is lower + * 0 if they are equal, and 1 if the argument is lower. * * @param Specificity $specificity * diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index 71447fab12..60dac83bf8 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -94,6 +94,7 @@ class Definition * @return Definition The current instance * * @api + * * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryClass($factoryClass) @@ -111,6 +112,7 @@ class Definition * @return string|null The factory class name * * @api + * * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryClass($triggerDeprecationError = true) @@ -130,6 +132,7 @@ class Definition * @return Definition The current instance * * @api + * * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryMethod($factoryMethod) @@ -182,6 +185,7 @@ class Definition * @return string|null The factory method name * * @api + * * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryMethod($triggerDeprecationError = true) @@ -201,6 +205,7 @@ class Definition * @return Definition The current instance * * @api + * * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryService($factoryService) @@ -218,6 +223,7 @@ class Definition * @return string|null The factory service id * * @api + * * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryService($triggerDeprecationError = true) diff --git a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php index 3b08fc03f3..1d979f0af0 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php @@ -216,7 +216,7 @@ class YamlDumper extends Dumper } /** - * Dumps callable to YAML format + * Dumps callable to YAML format. * * @param callable $callable * diff --git a/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php index b85d81f481..07891fff6d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php @@ -22,8 +22,8 @@ class LegacyDefinitionTest extends \PHPUnit_Framework_TestCase { $def = new Definition('stdClass'); $this->assertNull($def->getFactoryClass()); - $this->assertSame($def, $def->setFactoryClass('stdClass2'), "->setFactoryClass() implements a fluent interface."); - $this->assertEquals('stdClass2', $def->getFactoryClass(), "->getFactoryClass() returns current class to construct this service."); + $this->assertSame($def, $def->setFactoryClass('stdClass2'), '->setFactoryClass() implements a fluent interface.'); + $this->assertEquals('stdClass2', $def->getFactoryClass(), '->getFactoryClass() returns current class to construct this service.'); } public function testSetGetFactoryMethod() @@ -38,7 +38,7 @@ class LegacyDefinitionTest extends \PHPUnit_Framework_TestCase { $def = new Definition('stdClass'); $this->assertNull($def->getFactoryService()); - $this->assertSame($def, $def->setFactoryService('foo.bar'), "->setFactoryService() implements a fluent interface."); - $this->assertEquals('foo.bar', $def->getFactoryService(), "->getFactoryService() returns current service to construct this service."); + $this->assertSame($def, $def->setFactoryService('foo.bar'), '->setFactoryService() implements a fluent interface.'); + $this->assertEquals('foo.bar', $def->getFactoryService(), '->getFactoryService() returns current service to construct this service.'); } } diff --git a/src/Symfony/Component/DomCrawler/Form.php b/src/Symfony/Component/DomCrawler/Form.php index acf62e638f..bf7ce5d554 100644 --- a/src/Symfony/Component/DomCrawler/Form.php +++ b/src/Symfony/Component/DomCrawler/Form.php @@ -355,7 +355,7 @@ class Form extends Link implements \ArrayAccess } /** - * Disables validation + * Disables validation. * * @return self */ diff --git a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php index f9c7e0e8be..199d2c0071 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php @@ -135,7 +135,7 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase { $invoked = 0; $listener = function () use (&$invoked) { - $invoked++; + ++$invoked; }; $this->dispatcher->addListener('pre.foo', $listener); $this->dispatcher->addListener('post.foo', $listener); diff --git a/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 24e60024ff..4aa6226e49 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -110,8 +110,8 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $tdispatcher->addListener('foo', $listener1 = function () {; }); $tdispatcher->addListener('foo', $listener2 = function () {; }); - $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); - $logger->expects($this->at(1))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); + $logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".'); + $logger->expects($this->at(1))->method('debug')->with('Notified event "foo" to listener "closure".'); $tdispatcher->dispatch('foo'); } @@ -125,9 +125,9 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); $tdispatcher->addListener('foo', $listener2 = function () {; }); - $logger->expects($this->at(0))->method('debug')->with("Notified event \"foo\" to listener \"closure\"."); - $logger->expects($this->at(1))->method('debug')->with("Listener \"closure\" stopped propagation of the event \"foo\"."); - $logger->expects($this->at(2))->method('debug')->with("Listener \"closure\" was not called for event \"foo\"."); + $logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".'); + $logger->expects($this->at(1))->method('debug')->with('Listener "closure" stopped propagation of the event "foo".'); + $logger->expects($this->at(2))->method('debug')->with('Listener "closure" was not called for event "foo".'); $tdispatcher->dispatch('foo'); } diff --git a/src/Symfony/Component/ExpressionLanguage/Parser.php b/src/Symfony/Component/ExpressionLanguage/Parser.php index 8d06c22585..e761898423 100644 --- a/src/Symfony/Component/ExpressionLanguage/Parser.php +++ b/src/Symfony/Component/ExpressionLanguage/Parser.php @@ -43,32 +43,32 @@ class Parser '+' => array('precedence' => 500), ); $this->binaryOperators = array( - 'or' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT), - '||' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT), - 'and' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT), - '&&' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT), - '|' => array('precedence' => 16, 'associativity' => Parser::OPERATOR_LEFT), - '^' => array('precedence' => 17, 'associativity' => Parser::OPERATOR_LEFT), - '&' => array('precedence' => 18, 'associativity' => Parser::OPERATOR_LEFT), - '==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '===' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '!=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '!==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '<' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '>' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '>=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '<=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - 'not in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - 'in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - 'matches' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT), - '..' => array('precedence' => 25, 'associativity' => Parser::OPERATOR_LEFT), - '+' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT), - '-' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT), - '~' => array('precedence' => 40, 'associativity' => Parser::OPERATOR_LEFT), - '*' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT), - '/' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT), - '%' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT), - '**' => array('precedence' => 200, 'associativity' => Parser::OPERATOR_RIGHT), + 'or' => array('precedence' => 10, 'associativity' => self::OPERATOR_LEFT), + '||' => array('precedence' => 10, 'associativity' => self::OPERATOR_LEFT), + 'and' => array('precedence' => 15, 'associativity' => self::OPERATOR_LEFT), + '&&' => array('precedence' => 15, 'associativity' => self::OPERATOR_LEFT), + '|' => array('precedence' => 16, 'associativity' => self::OPERATOR_LEFT), + '^' => array('precedence' => 17, 'associativity' => self::OPERATOR_LEFT), + '&' => array('precedence' => 18, 'associativity' => self::OPERATOR_LEFT), + '==' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '===' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '!=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '!==' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '<' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '>' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '>=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '<=' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + 'not in' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + 'in' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + 'matches' => array('precedence' => 20, 'associativity' => self::OPERATOR_LEFT), + '..' => array('precedence' => 25, 'associativity' => self::OPERATOR_LEFT), + '+' => array('precedence' => 30, 'associativity' => self::OPERATOR_LEFT), + '-' => array('precedence' => 30, 'associativity' => self::OPERATOR_LEFT), + '~' => array('precedence' => 40, 'associativity' => self::OPERATOR_LEFT), + '*' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT), + '/' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT), + '%' => array('precedence' => 60, 'associativity' => self::OPERATOR_LEFT), + '**' => array('precedence' => 200, 'associativity' => self::OPERATOR_RIGHT), ); } diff --git a/src/Symfony/Component/ExpressionLanguage/TokenStream.php b/src/Symfony/Component/ExpressionLanguage/TokenStream.php index 8516273a66..ac9599769f 100644 --- a/src/Symfony/Component/ExpressionLanguage/TokenStream.php +++ b/src/Symfony/Component/ExpressionLanguage/TokenStream.php @@ -71,7 +71,7 @@ class TokenStream } /** - * Checks if end of stream was reached + * Checks if end of stream was reached. * * @return bool */ diff --git a/src/Symfony/Component/Filesystem/Exception/FileNotFoundException.php b/src/Symfony/Component/Filesystem/Exception/FileNotFoundException.php index 15533db408..bcc8fe81fc 100644 --- a/src/Symfony/Component/Filesystem/Exception/FileNotFoundException.php +++ b/src/Symfony/Component/Filesystem/Exception/FileNotFoundException.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Filesystem\Exception; /** - * Exception class thrown when a file couldn't be found + * Exception class thrown when a file couldn't be found. * * @author Fabien Potencier * @author Christian Gärtner diff --git a/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php b/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php index c88c763173..3535058763 100644 --- a/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php +++ b/src/Symfony/Component/Filesystem/Exception/IOExceptionInterface.php @@ -19,7 +19,7 @@ namespace Symfony\Component\Filesystem\Exception; interface IOExceptionInterface extends ExceptionInterface { /** - * Returns the associated path for the exception + * Returns the associated path for the exception. * * @return string The path. */ diff --git a/src/Symfony/Component/Filesystem/LockHandler.php b/src/Symfony/Component/Filesystem/LockHandler.php index 59d35ec928..fa2575f911 100644 --- a/src/Symfony/Component/Filesystem/LockHandler.php +++ b/src/Symfony/Component/Filesystem/LockHandler.php @@ -32,8 +32,9 @@ class LockHandler private $handle; /** - * @param string $name The lock name - * @param string|null $lockPath The directory to store the lock. Default values will use temporary directory + * @param string $name The lock name + * @param string|null $lockPath The directory to store the lock. Default values will use temporary directory + * * @throws IOException If the lock directory could not be created or is not writable */ public function __construct($name, $lockPath = null) @@ -53,10 +54,12 @@ class LockHandler } /** - * Lock the resource + * Lock the resource. + * + * @param bool $blocking wait until the lock is released + * + * @return bool Returns true if the lock was acquired, false otherwise * - * @param bool $blocking wait until the lock is released - * @return bool Returns true if the lock was acquired, false otherwise * @throws IOException If the lock file could not be created or opened */ public function lock($blocking = false) @@ -98,7 +101,7 @@ class LockHandler } /** - * Release the resource + * Release the resource. */ public function release() { diff --git a/src/Symfony/Component/Form/Button.php b/src/Symfony/Component/Form/Button.php index 00f5611d93..1fa5ec25a7 100644 --- a/src/Symfony/Component/Form/Button.php +++ b/src/Symfony/Component/Form/Button.php @@ -336,8 +336,6 @@ class Button implements \IteratorAggregate, FormInterface /** * Unsupported method. - * - * @return null Always returns null */ public function getTransformationFailure() { diff --git a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php index 9171fe3f16..573cc2d6e3 100644 --- a/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php +++ b/src/Symfony/Component/Form/ChoiceList/Loader/ChoiceLoaderInterface.php @@ -48,9 +48,9 @@ interface ChoiceLoaderInterface * The callable receives the choice as first and the array key as the second * argument. * - * @param string[] $values An array of choice values. Non-existing - * values in this array are ignored - * @param null|callable $value The callable generating the choice values + * @param string[] $values An array of choice values. Non-existing + * values in this array are ignored + * @param null|callable $value The callable generating the choice values * * @return array An array of choices */ @@ -66,9 +66,9 @@ interface ChoiceLoaderInterface * The callable receives the choice as first and the array key as the second * argument. * - * @param array $choices An array of choices. Non-existing choices in - * this array are ignored - * @param null|callable $value The callable generating the choice values + * @param array $choices An array of choices. Non-existing choices in + * this array are ignored + * @param null|callable $value The callable generating the choice values * * @return string[] An array of choice values */ diff --git a/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php b/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php index 8e59620369..05d7533306 100644 --- a/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php +++ b/src/Symfony/Component/Form/ChoiceList/View/ChoiceGroupView.php @@ -19,14 +19,14 @@ namespace Symfony\Component\Form\ChoiceList\View; class ChoiceGroupView implements \IteratorAggregate { /** - * The label of the group + * The label of the group. * * @var string */ public $label; /** - * The choice views in the group + * The choice views in the group. * * @var ChoiceGroupView[]|ChoiceView[] */ @@ -35,7 +35,7 @@ class ChoiceGroupView implements \IteratorAggregate /** * Creates a new choice group view. * - * @param string $label The label of the group. + * @param string $label The label of the group. * @param ChoiceGroupView[]|ChoiceView[] $choices The choice views in the * group. */ diff --git a/src/Symfony/Component/Form/Deprecated/FormEvents.php b/src/Symfony/Component/Form/Deprecated/FormEvents.php index 2d891ed32e..e20edfa521 100644 --- a/src/Symfony/Component/Form/Deprecated/FormEvents.php +++ b/src/Symfony/Component/Form/Deprecated/FormEvents.php @@ -15,6 +15,7 @@ namespace Symfony\Component\Form\Deprecated; /** * @deprecated since version 2.7, to be removed in 3.0. + * * @internal */ final class FormEvents diff --git a/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php b/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php index d87196475f..b1169ceafa 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php +++ b/src/Symfony/Component/Form/Extension/Core/DataMapper/CheckboxListMapper.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Form\Extension\Core\DataMapper; use Symfony\Component\Form\ChoiceList\ChoiceListInterface; use Symfony\Component\Form\DataMapperInterface; -use Symfony\Component\Form\Exception; use Symfony\Component\Form\Exception\TransformationFailedException; /** diff --git a/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php b/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php index 5e6ff5823b..576d9eba2c 100644 --- a/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php +++ b/src/Symfony/Component/Form/Extension/Core/View/ChoiceView.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Form\Extension\Core\View; @trigger_error('The '.__NAMESPACE__.'\ChoiceView class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED); -/** +/* * Represents a choice in templates. * * @author Bernhard Schussek diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php index 4f3d985529..2a55069692 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php @@ -22,6 +22,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; * is expected. * * @since 2.4 + * * @author Bernhard Schussek * * @deprecated since version 2.4, to be removed in 3.0. diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php index cf744ac014..b246a616b0 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php @@ -18,6 +18,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; * Adapter for using the new token generator with the old interface. * * @since 2.4 + * * @author Bernhard Schussek * * @deprecated since version 2.4, to be removed in 3.0. diff --git a/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php b/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php index fbdef26ed6..70b347fa9a 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/DataCollectorExtension.php @@ -18,6 +18,7 @@ use Symfony\Component\Form\AbstractExtension; * Extension for collecting data of the forms on a page. * * @since 2.4 + * * @author Robert Schönthal * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php index 6419af4778..8fd70f09b1 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/EventListener/DataCollectorListener.php @@ -21,6 +21,7 @@ use Symfony\Component\Form\FormEvents; * and {@link FormEvents::POST_SUBMIT} events. * * @since 2.4 + * * @author Bernhard Schussek */ class DataCollectorListener implements EventSubscriberInterface diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php index ddfb3400cb..4fb08772d7 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollector.php @@ -21,6 +21,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollector; * Data collector for {@link FormInterface} instances. * * @since 2.4 + * * @author Robert Schönthal * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php index db7c0f0803..a57693a995 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataCollectorInterface.php @@ -19,6 +19,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface; * Collects and structures information about forms. * * @since 2.4 + * * @author Bernhard Schussek */ interface FormDataCollectorInterface extends DataCollectorInterface diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php index 0ae5560afe..1c678ac665 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractor.php @@ -20,6 +20,7 @@ use Symfony\Component\Validator\ConstraintViolationInterface; * Default implementation of {@link FormDataExtractorInterface}. * * @since 2.4 + * * @author Bernhard Schussek */ class FormDataExtractor implements FormDataExtractorInterface diff --git a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php index d47496552d..a5bb7d0ef3 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/FormDataExtractorInterface.php @@ -18,6 +18,7 @@ use Symfony\Component\Form\FormView; * Extracts arrays of information out of forms. * * @since 2.4 + * * @author Bernhard Schussek */ interface FormDataExtractorInterface diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php index 960048a0c2..61caf60a3f 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeDataCollectorProxy.php @@ -22,6 +22,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface; * Proxy that invokes a data collector when creating a form and its view. * * @since 2.4 + * * @author Bernhard Schussek */ class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php index c2cb3a0346..f5f4ed2e20 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/Proxy/ResolvedTypeFactoryDataCollectorProxy.php @@ -21,6 +21,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface; * instances. * * @since 2.4 + * * @author Bernhard Schussek */ class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php b/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php index 2c6ddfe3e5..55918d7c1e 100644 --- a/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php +++ b/src/Symfony/Component/Form/Extension/DataCollector/Type/DataCollectorTypeExtension.php @@ -20,6 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface; * Type extension for collecting data of a form with this type. * * @since 2.4 + * * @author Robert Schönthal * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php b/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php index 8a9a75074f..e7ed95c459 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php +++ b/src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php @@ -50,7 +50,7 @@ class ValidatorExtension extends AbstractExtension // the DIC, where the XML file is loaded automatically. Thus the following // code must be kept synchronized with validation.xml - /** @var $metadata ClassMetadata */ + /* @var $metadata ClassMetadata */ $metadata->addConstraint(new Form()); $metadata->addPropertyConstraint('children', new Valid()); diff --git a/src/Symfony/Component/Form/FormErrorIterator.php b/src/Symfony/Component/Form/FormErrorIterator.php index 76e2938904..7ee2df26b4 100644 --- a/src/Symfony/Component/Form/FormErrorIterator.php +++ b/src/Symfony/Component/Form/FormErrorIterator.php @@ -87,7 +87,7 @@ class FormErrorIterator implements \RecursiveIterator, \SeekableIterator, \Array if ($error instanceof FormError) { $string .= 'ERROR: '.$error->getMessage()."\n"; } else { - /** @var $error FormErrorIterator */ + /* @var $error FormErrorIterator */ $string .= $error->form->getName().":\n"; $string .= self::indent((string) $error); } diff --git a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php index f4774a5cc4..f6fa2493d5 100644 --- a/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/DataCollector/FormDataCollectorTest.php @@ -1,4 +1,5 @@ * @group legacy */ diff --git a/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php b/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php index 2961ab58bb..09fd394fb9 100644 --- a/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php @@ -20,8 +20,8 @@ use Symfony\Component\Form\Test\FormIntegrationTestCase as BaseFormIntegrationTe abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase { /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ protected function setUp() { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormIntegrationTestCase class instead.', E_USER_DEPRECATED); diff --git a/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php b/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php index ce24c03fa7..884bfe3733 100644 --- a/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php @@ -20,8 +20,8 @@ use Symfony\Component\Form\Test\FormPerformanceTestCase as BaseFormPerformanceTe abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase { /** - * {@inheritdoc} - */ + * {@inheritdoc} + */ protected function setUp() { @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormPerformanceTestCase class instead.', E_USER_DEPRECATED); diff --git a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php index ac41c8fe91..ca407b4d93 100644 --- a/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php +++ b/src/Symfony/Component/HttpFoundation/BinaryFileResponse.php @@ -308,6 +308,7 @@ class BinaryFileResponse extends Response /** * If this is set to true, the file will be unlinked after the request is send * Note: If the X-Sendfile header is used, the deleteFileAfterSend setting will not be used. + * * @param bool $shouldDelete * * @return BinaryFileResponse diff --git a/src/Symfony/Component/HttpFoundation/Request.php b/src/Symfony/Component/HttpFoundation/Request.php index c6d1e31ab3..9b1ac47b93 100644 --- a/src/Symfony/Component/HttpFoundation/Request.php +++ b/src/Symfony/Component/HttpFoundation/Request.php @@ -2001,7 +2001,7 @@ class Request if (self::$requestFactory) { $request = call_user_func(self::$requestFactory, $query, $request, $attributes, $cookies, $files, $server, $content); - if (!$request instanceof Request) { + if (!$request instanceof self) { throw new \LogicException('The Request factory must return an instance of Symfony\Component\HttpFoundation\Request.'); } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php index eefaf8d8fa..111541d92d 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php @@ -260,7 +260,7 @@ class LegacyPdoSessionHandler implements \SessionHandlerInterface } /** - * Return a PDO instance + * Return a PDO instance. * * @return \PDO */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php index 183093f87a..f6f99eda48 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php @@ -108,7 +108,7 @@ class MemcacheSessionHandler implements \SessionHandlerInterface } /** - * Return a Memcache instance + * Return a Memcache instance. * * @return \Memcache */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php index 1f9d97e45d..d87bef852f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php @@ -114,7 +114,7 @@ class MemcachedSessionHandler implements \SessionHandlerInterface } /** - * Return a Memcached instance + * Return a Memcached instance. * * @return \Memcached */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php index fa4ecfb0a4..f1df25d0a6 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MongoDbSessionHandler.php @@ -177,7 +177,7 @@ class MongoDbSessionHandler implements \SessionHandlerInterface } /** - * Return a Mongo instance + * Return a Mongo instance. * * @return \Mongo */ diff --git a/src/Symfony/Component/HttpFoundation/StreamedResponse.php b/src/Symfony/Component/HttpFoundation/StreamedResponse.php index 38986e8aa7..0da42b2292 100644 --- a/src/Symfony/Component/HttpFoundation/StreamedResponse.php +++ b/src/Symfony/Component/HttpFoundation/StreamedResponse.php @@ -51,7 +51,7 @@ class StreamedResponse extends Response } /** - * Factory method for chainability + * Factory method for chainability. * * @param callable|null $callback A valid PHP callback or null to set it later * @param int $status The response status code 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 ba06fccff9..a6cde72960 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -205,7 +205,7 @@ class PdoSessionHandlerTest extends \PHPUnit_Framework_TestCase } /** - * Simulates session_regenerate_id(true) which will require an INSERT or UPDATE (replace) + * Simulates session_regenerate_id(true) which will require an INSERT or UPDATE (replace). */ public function testWriteDifferentSessionIdThanRead() { diff --git a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php index 94df05eee4..fec0006662 100644 --- a/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php +++ b/src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php @@ -157,7 +157,7 @@ class ControllerResolver implements ControllerResolverInterface } /** - * Returns an instantiated controller + * Returns an instantiated controller. * * @param string $class A class name * diff --git a/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php b/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php index 20d6074895..d2f0898605 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/Util/ValueExporter.php @@ -54,7 +54,7 @@ class ValueExporter return sprintf("[\n%s%s\n%s]", $indent, implode(sprintf(", \n%s", $indent), $a), str_repeat(' ', $depth - 1)); } - return sprintf("[%s]", implode(', ', $a)); + return sprintf('[%s]', implode(', ', $a)); } if (is_resource($value)) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php b/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php index c37a537009..14a5d43511 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/AddRequestFormatsListener.php @@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\HttpKernel\Event\GetResponseEvent; /** - * Adds configured formats to each request + * Adds configured formats to each request. * * @author Gildas Quemener */ @@ -36,7 +36,7 @@ class AddRequestFormatsListener implements EventSubscriberInterface } /** - * Adds request formats + * Adds request formats. * * @param GetResponseEvent $event */ diff --git a/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php b/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php index 00f4fbf24e..dc815a216f 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/SurrogateListener.php @@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\KernelEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** - * SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates + * SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates. * * @author Fabien Potencier */ diff --git a/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php b/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php index 42a0f20bd4..8fc8e57579 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/TestSessionListener.php @@ -48,7 +48,7 @@ abstract class TestSessionListener implements EventSubscriberInterface /** * Checks if session was initialized and saves if current request is master - * Runs on 'kernel.response' in test environment + * Runs on 'kernel.response' in test environment. * * @param FilterResponseEvent $event */ diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index da90600bba..f2d9972cb7 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -156,6 +156,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * Gets the Surrogate instance. * * @throws \LogicException + * * @return SurrogateInterface A Surrogate instance */ public function getSurrogate() diff --git a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php index d22dff1e5f..67ffd97cf1 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php @@ -45,7 +45,7 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface $this->maxAges[] = $response->getMaxAge(); } - $this->embeddedResponses++; + ++$this->embeddedResponses; } /** diff --git a/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php index 46b788d53e..5d65fd65a4 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.php @@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response; interface SurrogateInterface { /** - * Returns surrogate name + * Returns surrogate name. * * @return string */ diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php index 26bdf70673..3a82ce0fb6 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/AddRequestFormatsListenerTest.php @@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\KernelEvents; /** - * Test AddRequestFormatsListener class + * Test AddRequestFormatsListener class. * * @author Gildas Quemener */ diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php index f3cd05e239..4584a48a76 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/DebugHandlersListenerTest.php @@ -25,7 +25,7 @@ use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener; use Symfony\Component\HttpKernel\KernelEvents; /** - * DebugHandlersListenerTest + * DebugHandlersListenerTest. * * @author Nicolas Grekas */ diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php index a9b715bacc..9bbdadedcf 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/DumpListenerTest.php @@ -19,7 +19,7 @@ use Symfony\Component\VarDumper\Dumper\DataDumperInterface; use Symfony\Component\VarDumper\VarDumper; /** - * DumpListenerTest + * DumpListenerTest. * * @author Nicolas Grekas */ diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php index 84ff0d6f50..261b7fa393 100644 --- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php @@ -23,7 +23,7 @@ use Symfony\Component\HttpKernel\Kernel; class ProfilerListenerTest extends \PHPUnit_Framework_TestCase { /** - * Test to ensure BC without RequestStack + * Test to ensure BC without RequestStack. * * @group legacy */ @@ -79,7 +79,7 @@ class ProfilerListenerTest extends \PHPUnit_Framework_TestCase ->disableOriginalConstructor() ->getMock(); - $subRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request') + $subRequest = $this->getMockBuilder('Symfony\Component\HttpFoundation\Request') ->disableOriginalConstructor() ->getMock(); diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index c9e00dd68e..753125ca85 100644 --- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -765,7 +765,7 @@ EOF; } /** - * Returns a mock for the BundleInterface + * Returns a mock for the BundleInterface. * * @return BundleInterface */ diff --git a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php index f4d07282fb..6b1fd9066b 100644 --- a/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/UriSignerTest.php @@ -43,7 +43,7 @@ class UriSignerTest extends \PHPUnit_Framework_TestCase $signer = new UriSigner('foobar'); $this->assertSame( - "http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D", + 'http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D', $signer->sign('http://example.com/foo?foo=bar&baz=bay') ); $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay'))); diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index c4b8f564a4..e42d7bbfd1 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -434,7 +434,6 @@ class OptionsResolver implements Options, OptionsResolverInterface * @throws AccessException If called from a lazy option or normalizer * * @see setNormalizer() - * * @deprecated since version 2.6, to be removed in 3.0. */ public function setNormalizers(array $normalizers) diff --git a/src/Symfony/Component/Process/Pipes/AbstractPipes.php b/src/Symfony/Component/Process/Pipes/AbstractPipes.php index d8b57d07a7..1ca85739f5 100644 --- a/src/Symfony/Component/Process/Pipes/AbstractPipes.php +++ b/src/Symfony/Component/Process/Pipes/AbstractPipes.php @@ -54,7 +54,7 @@ abstract class AbstractPipes implements PipesInterface } /** - * Unblocks streams + * Unblocks streams. */ protected function unblock() { diff --git a/src/Symfony/Component/Process/Pipes/UnixPipes.php b/src/Symfony/Component/Process/Pipes/UnixPipes.php index b3841031c4..f8a0d1997d 100644 --- a/src/Symfony/Component/Process/Pipes/UnixPipes.php +++ b/src/Symfony/Component/Process/Pipes/UnixPipes.php @@ -200,7 +200,7 @@ class UnixPipes extends AbstractPipes } /** - * Creates a new UnixPipes instance + * Creates a new UnixPipes instance. * * @param Process $process * @param string|resource $input diff --git a/src/Symfony/Component/Process/Pipes/WindowsPipes.php b/src/Symfony/Component/Process/Pipes/WindowsPipes.php index 01dd5d0600..b20f3ec34d 100644 --- a/src/Symfony/Component/Process/Pipes/WindowsPipes.php +++ b/src/Symfony/Component/Process/Pipes/WindowsPipes.php @@ -173,7 +173,7 @@ class WindowsPipes extends AbstractPipes } /** - * Removes temporary files + * Removes temporary files. */ private function removeFiles() { @@ -186,7 +186,7 @@ class WindowsPipes extends AbstractPipes } /** - * Writes input to stdin + * Writes input to stdin. * * @param bool $blocking * @param bool $close diff --git a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php index 2add8cc938..eb3f65dc93 100644 --- a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php +++ b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php @@ -524,7 +524,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $process = $this->getProcess('echo foo'); $this->assertSame($process, $process->mustRun()); - $this->assertEquals("foo".PHP_EOL, $process->getOutput()); + $this->assertEquals('foo'.PHP_EOL, $process->getOutput()); } public function testSuccessfulMustRunHasCorrectExitCode() @@ -559,7 +559,7 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase $start = microtime(true); $process->start(); $end = microtime(true); - $this->assertLessThan(0.2, $end-$start); + $this->assertLessThan(0.2, $end - $start); $process->wait(); } diff --git a/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php b/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php index b028395f9b..de37353f91 100644 --- a/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php +++ b/src/Symfony/Component/Process/Tests/ProcessFailedExceptionTest.php @@ -91,7 +91,7 @@ class ProcessFailedExceptionTest extends \PHPUnit_Framework_TestCase /** * Tests that ProcessFailedException does not extract information from - * process output if it was previously disabled + * process output if it was previously disabled. */ public function testDisabledOutputInFailedExceptionDoesNotPopulateOutput() { diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index b68d0c2ad8..d4e8c78a9b 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -229,7 +229,7 @@ class PropertyAccessor implements PropertyAccessorInterface // the final value of the path must not be validated if ($i + 1 < $propertyPath->getLength() && !is_object($objectOrArray) && !is_array($objectOrArray)) { - throw new UnexpectedTypeException($objectOrArray, $propertyPath, $i+1); + throw new UnexpectedTypeException($objectOrArray, $propertyPath, $i + 1); } $propertyValues[] = &$propertyValue; diff --git a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php index d07c7c0fa8..4e966cdacb 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php +++ b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassIsWritable.php @@ -24,4 +24,4 @@ class TestClassIsWritable { $this->value = $value; } -} \ No newline at end of file +} diff --git a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php index 638afee6af..f0a7f1f47c 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php +++ b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClassSetValue.php @@ -29,4 +29,4 @@ class TestClassSetValue { $this->value = $value; } -} \ No newline at end of file +} diff --git a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php index a9f7834305..51b712cf75 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php +++ b/src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php @@ -458,7 +458,6 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase array(new TestClassSetValue(array('a' => array('b' => 'old-value'))), 'value[a][b]', 'new-value'), array(new \ArrayIterator(array('a' => array('b' => array('c' => 'old-value')))), '[a][b][c]', 'new-value'), ); - } /** @@ -478,7 +477,6 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase array(new TestClassIsWritable(new \ArrayIterator(array('a' => array('b' => 'old-value')))), 'value[a][b]', true), array(new TestClassIsWritable(array('a' => array('b' => array('c' => new TestClassSetValue('old-value'))))), 'value[a][b][c].value', true), ); - } /** @@ -488,5 +486,4 @@ class PropertyAccessorTest extends \PHPUnit_Framework_TestCase { $this->assertEquals($value, $this->propertyAccessor->isWritable($object, $path)); } - -} \ No newline at end of file +} diff --git a/src/Symfony/Component/Routing/Router.php b/src/Symfony/Component/Routing/Router.php index e2651ef8b9..2cbbb2bdad 100644 --- a/src/Symfony/Component/Routing/Router.php +++ b/src/Symfony/Component/Routing/Router.php @@ -355,7 +355,9 @@ class Router implements RouterInterface, RequestMatcherInterface /** * This method is public because it needs to be callable from a closure in PHP 5.3. It should be converted back to protected in 3.0. + * * @internal + * * @return GeneratorDumperInterface */ public function getGeneratorDumperInstance() @@ -365,7 +367,9 @@ class Router implements RouterInterface, RequestMatcherInterface /** * This method is public because it needs to be callable from a closure in PHP 5.3. It should be converted back to protected in 3.0. + * * @internal + * * @return MatcherDumperInterface */ public function getMatcherDumperInstance() diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php index 7161c4638b..83bf7108fb 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -152,14 +152,14 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $classRouteData = array( 'path' => '/prefix', 'schemes' => array('https'), - 'methods' => array('GET') + 'methods' => array('GET'), ); $methodRouteData = array( 'name' => 'route1', 'path' => '/path', 'schemes' => array('http'), - 'methods' => array('POST', 'PUT') + 'methods' => array('POST', 'PUT'), ); $this->reader diff --git a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php index 9129e8b75b..bf08f60587 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php @@ -111,7 +111,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf /** * Deletes the security identity from the database. - * ACL entries have the CASCADE option on their foreign key so they will also get deleted + * ACL entries have the CASCADE option on their foreign key so they will also get deleted. * * @param SecurityIdentityInterface $sid * @@ -366,7 +366,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf } /** - * Updates a user security identity when the user's username changes + * Updates a user security identity when the user's username changes. * * @param UserSecurityIdentity $usid * @param string $oldUsername diff --git a/src/Symfony/Component/Security/Acl/Permission/AbstractMaskBuilder.php b/src/Symfony/Component/Security/Acl/Permission/AbstractMaskBuilder.php index 867d2e216e..93f1755be6 100644 --- a/src/Symfony/Component/Security/Acl/Permission/AbstractMaskBuilder.php +++ b/src/Symfony/Component/Security/Acl/Permission/AbstractMaskBuilder.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Security\Acl\Permission; /** - * This abstract class implements nearly all the MaskBuilderInterface methods + * This abstract class implements nearly all the MaskBuilderInterface methods. */ abstract class AbstractMaskBuilder implements MaskBuilderInterface { diff --git a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php index 4788a1f647..0b5f388b48 100644 --- a/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php +++ b/src/Symfony/Component/Security/Acl/Permission/MaskBuilder.php @@ -124,7 +124,7 @@ class MaskBuilder extends AbstractMaskBuilder } /** - * Returns the mask for the passed code + * Returns the mask for the passed code. * * @param mixed $code * diff --git a/src/Symfony/Component/Security/Acl/Permission/MaskBuilderInterface.php b/src/Symfony/Component/Security/Acl/Permission/MaskBuilderInterface.php index ba4183014c..ef183debdf 100644 --- a/src/Symfony/Component/Security/Acl/Permission/MaskBuilderInterface.php +++ b/src/Symfony/Component/Security/Acl/Permission/MaskBuilderInterface.php @@ -17,11 +17,12 @@ namespace Symfony\Component\Security\Acl\Permission; interface MaskBuilderInterface { /** - * Set the mask of this permission + * Set the mask of this permission. * * @param int $mask * * @return MaskBuilderInterface + * * @throws \InvalidArgumentException if $mask is not an integer */ public function set($mask); @@ -63,7 +64,7 @@ interface MaskBuilderInterface public function reset(); /** - * Returns the mask for the passed code + * Returns the mask for the passed code. * * @param mixed $code * diff --git a/src/Symfony/Component/Security/Acl/Permission/MaskBuilderRetrievalInterface.php b/src/Symfony/Component/Security/Acl/Permission/MaskBuilderRetrievalInterface.php index 7a99bca363..2cde262281 100644 --- a/src/Symfony/Component/Security/Acl/Permission/MaskBuilderRetrievalInterface.php +++ b/src/Symfony/Component/Security/Acl/Permission/MaskBuilderRetrievalInterface.php @@ -12,12 +12,12 @@ namespace Symfony\Component\Security\Acl\Permission; /** - * Retrieves the MaskBuilder + * Retrieves the MaskBuilder. */ interface MaskBuilderRetrievalInterface { /** - * Returns a new instance of the MaskBuilder used in the permissionMap + * Returns a new instance of the MaskBuilder used in the permissionMap. * * @return MaskBuilderInterface */ diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php index 4b6c11fc85..b4930813f5 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/Storage/TokenStorage.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Authentication\Token\Storage; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** - * TokenStorage contains a TokenInterface + * TokenStorage contains a TokenInterface. * * It gives access to the token representing the current user authentication. * diff --git a/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php b/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php index 43ca558f5f..efa156228e 100644 --- a/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php +++ b/src/Symfony/Component/Security/Core/Authorization/Voter/AbstractVoter.php @@ -15,7 +15,7 @@ use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; /** - * Abstract Voter implementation that reduces boilerplate code required to create a custom Voter + * Abstract Voter implementation that reduces boilerplate code required to create a custom Voter. * * @author Roman Marintšenko */ @@ -44,7 +44,7 @@ abstract class AbstractVoter implements VoterInterface } /** - * Iteratively check all given attributes by calling isGranted + * Iteratively check all given attributes by calling isGranted. * * This method terminates as soon as it is able to return ACCESS_GRANTED * If at least one attribute is supported, but access not granted, then ACCESS_DENIED is returned @@ -83,14 +83,14 @@ abstract class AbstractVoter implements VoterInterface } /** - * Return an array of supported classes. This will be called by supportsClass + * Return an array of supported classes. This will be called by supportsClass. * * @return array an array of supported classes, i.e. array('Acme\DemoBundle\Model\Product') */ abstract protected function getSupportedClasses(); /** - * Return an array of supported attributes. This will be called by supportsAttribute + * Return an array of supported attributes. This will be called by supportsAttribute. * * @return array an array of supported attributes, i.e. array('CREATE', 'READ') */ @@ -101,7 +101,7 @@ abstract class AbstractVoter implements VoterInterface * It is safe to assume that $attribute and $object's class pass supportsAttribute/supportsClass * $user can be one of the following: * a UserInterface object (fully authenticated user) - * a string (anonymously authenticated user) + * a string (anonymously authenticated user). * * @param string $attribute * @param object $object diff --git a/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php b/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php index 13ee835d4a..b09604952e 100644 --- a/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php +++ b/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoder.php @@ -14,7 +14,7 @@ namespace Symfony\Component\Security\Core\Encoder; use Symfony\Component\Security\Core\User\UserInterface; /** - * A generic password encoder + * A generic password encoder. * * @author Ariel Ferrandini */ diff --git a/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php b/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php index 39e906ac69..7861caab20 100644 --- a/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php +++ b/src/Symfony/Component/Security/Core/Encoder/UserPasswordEncoderInterface.php @@ -21,7 +21,6 @@ use Symfony\Component\Security\Core\User\UserInterface; interface UserPasswordEncoderInterface { /** - * * Encodes the plain password. * * @param UserInterface $user The user diff --git a/src/Symfony/Component/Security/Core/SecurityContext.php b/src/Symfony/Component/Security/Core/SecurityContext.php index 8bcbfee438..027ff49480 100644 --- a/src/Symfony/Component/Security/Core/SecurityContext.php +++ b/src/Symfony/Component/Security/Core/SecurityContext.php @@ -28,6 +28,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; * * @author Fabien Potencier * @author Johannes M. Schmitt + * * @deprecated since version 2.6, to be removed in 3.0. */ class SecurityContext implements SecurityContextInterface @@ -43,7 +44,7 @@ class SecurityContext implements SecurityContextInterface private $authorizationChecker; /** - * For backwards compatibility, the signature of sf <2.6 still works + * For backwards compatibility, the signature of sf <2.6 still works. * * @param TokenStorageInterface|AuthenticationManagerInterface $tokenStorage * @param AuthorizationCheckerInterface|AccessDecisionManagerInterface $authorizationChecker diff --git a/src/Symfony/Component/Security/Core/SecurityContextInterface.php b/src/Symfony/Component/Security/Core/SecurityContextInterface.php index 61cdf4f579..a759feb810 100644 --- a/src/Symfony/Component/Security/Core/SecurityContextInterface.php +++ b/src/Symfony/Component/Security/Core/SecurityContextInterface.php @@ -20,6 +20,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; * The SecurityContextInterface. * * @author Johannes M. Schmitt + * * @deprecated since version 2.6, to be removed in 3.0. */ interface SecurityContextInterface extends TokenStorageInterface, AuthorizationCheckerInterface diff --git a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php index c5da22d315..92d7c163a7 100644 --- a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php +++ b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php @@ -81,7 +81,7 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase } /** - * Test dedicated to check if the backwards compatibility is still working + * Test dedicated to check if the backwards compatibility is still working. */ public function testOldConstructorSignature() { diff --git a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php index 72e08c0a73..8053732bee 100644 --- a/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php +++ b/src/Symfony/Component/Security/Core/Tests/Validator/Constraints/LegacyUserPasswordValidatorTest.php @@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation; /** * @since 2.5.4 + * * @author Bernhard Schussek * @group legacy */ diff --git a/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php b/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php index 5abe47cfc9..bccabe6c9c 100644 --- a/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php +++ b/src/Symfony/Component/Security/Csrf/CsrfTokenManagerInterface.php @@ -15,6 +15,7 @@ namespace Symfony\Component\Security\Csrf; * Manages CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek */ interface CsrfTokenManagerInterface diff --git a/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php b/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php index 4fb0c99d30..1b325e5d1e 100644 --- a/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php +++ b/src/Symfony/Component/Security/Csrf/Tests/TokenGenerator/UriSafeTokenGeneratorTest.php @@ -21,7 +21,8 @@ class UriSafeTokenGeneratorTest extends \PHPUnit_Framework_TestCase const ENTROPY = 1000; /** - * A non alpha-numeric byte string + * A non alpha-numeric byte string. + * * @var string */ private static $bytes; @@ -57,7 +58,7 @@ class UriSafeTokenGeneratorTest extends \PHPUnit_Framework_TestCase { $this->random->expects($this->once()) ->method('nextBytes') - ->with(self::ENTROPY/8) + ->with(self::ENTROPY / 8) ->will($this->returnValue(self::$bytes)); $token = $this->generator->generateToken(); diff --git a/src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.php b/src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.php index e02ac66ea0..1405b84f03 100644 --- a/src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.php +++ b/src/Symfony/Component/Security/Csrf/TokenGenerator/TokenGeneratorInterface.php @@ -15,6 +15,7 @@ namespace Symfony\Component\Security\Csrf\TokenGenerator; * Generates CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek */ interface TokenGeneratorInterface diff --git a/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php b/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php index 122bc02bfb..edeb435138 100644 --- a/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php +++ b/src/Symfony/Component/Security/Csrf/TokenGenerator/UriSafeTokenGenerator.php @@ -18,6 +18,7 @@ use Symfony\Component\Security\Core\Util\SecureRandom; * Generates CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek */ class UriSafeTokenGenerator implements TokenGeneratorInterface diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php index 60145c65a0..2620156f36 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php @@ -17,12 +17,14 @@ use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; * Token storage that uses PHP's native session handling. * * @since 2.4 + * * @author Bernhard Schussek */ class NativeSessionTokenStorage implements TokenStorageInterface { /** * The namespace used to store values in the session. + * * @var string */ const SESSION_NAMESPACE = '_csrf'; diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php b/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php index f08eb96217..a6a6ea3894 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php @@ -18,18 +18,21 @@ use Symfony\Component\Security\Csrf\Exception\TokenNotFoundException; * Token storage that uses a Symfony2 Session object. * * @since 2.4 + * * @author Bernhard Schussek */ class SessionTokenStorage implements TokenStorageInterface { /** * The namespace used to store values in the session. + * * @var string */ const SESSION_NAMESPACE = '_csrf'; /** - * The user session from which the session ID is returned + * The user session from which the session ID is returned. + * * @var SessionInterface */ private $session; diff --git a/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.php b/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.php index 0fadfa3606..5efe72f694 100644 --- a/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.php +++ b/src/Symfony/Component/Security/Csrf/TokenStorage/TokenStorageInterface.php @@ -15,6 +15,7 @@ namespace Symfony\Component\Security\Csrf\TokenStorage; * Stores CSRF tokens. * * @since 2.4 + * * @author Bernhard Schussek */ interface TokenStorageInterface diff --git a/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php b/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php index 317c8a00ba..4d5c71aa5c 100644 --- a/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php +++ b/src/Symfony/Component/Security/Http/Authentication/AuthenticationUtils.php @@ -17,7 +17,7 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Core\Security; /** - * Extracts Security Errors from Request + * Extracts Security Errors from Request. * * @author Boris Vujicic */ @@ -72,6 +72,7 @@ class AuthenticationUtils /** * @return Request + * * @throws \LogicException */ private function getRequest() diff --git a/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php b/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php index 6a1311f3a5..c5c43f2895 100644 --- a/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php +++ b/src/Symfony/Component/Security/Http/Authentication/SimpleAuthenticationHandler.php @@ -19,7 +19,7 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\SimpleAuthenticatorInterface; /** - * Class to proxy authentication success/failure handlers + * Class to proxy authentication success/failure handlers. * * Events are sent to the SimpleAuthenticatorInterface if it implements * the right interface, otherwise (or if it fails to return a Response) diff --git a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php index 9a6fbfe74b..15b71efd4d 100644 --- a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php @@ -101,7 +101,7 @@ class DigestAuthenticationListener implements ListenerInterface if ($serverDigestMd5 !== $digestAuth->getResponse()) { if (null !== $this->logger) { - $this->logger->debug("Unexpected response from the DigestAuth received; is the header returning a clear text passwords?", array('expected' => $serverDigestMd5, 'received' => $digestAuth->getResponse())); + $this->logger->debug('Unexpected response from the DigestAuth received; is the header returning a clear text passwords?', array('expected' => $serverDigestMd5, 'received' => $digestAuth->getResponse())); } $this->fail($event, $request, new BadCredentialsException('Incorrect response')); diff --git a/src/Symfony/Component/Security/Tests/Core/Authentication/Voter/AbstractVoterTest.php b/src/Symfony/Component/Security/Tests/Core/Authentication/Voter/AbstractVoterTest.php index c5e946666f..af7b82f35d 100644 --- a/src/Symfony/Component/Security/Tests/Core/Authentication/Voter/AbstractVoterTest.php +++ b/src/Symfony/Component/Security/Tests/Core/Authentication/Voter/AbstractVoterTest.php @@ -72,7 +72,7 @@ class VoterFixture extends AbstractVoter protected function getSupportedAttributes() { - return array( 'foo', 'bar', 'baz'); + return array('foo', 'bar', 'baz'); } protected function isGranted($attribute, $object, $user = null) diff --git a/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php index 57517bf7f4..5225eb52d6 100644 --- a/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php +++ b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php @@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Security; class LegacySecurityContextInterfaceTest extends \PHPUnit_Framework_TestCase { /** - * Test if the BC Layer is working as intended + * Test if the BC Layer is working as intended. */ public function testConstantSync() { diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 1067296f9a..5f5f2899f5 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -57,7 +57,6 @@ class JsonDecode implements DecoderInterface * * @deprecated since version 2.5, to be removed in 3.0. * The {@self decode()} method throws an exception if error found. - * * @see http://php.net/manual/en/function.json-last-error.php json_last_error */ public function getLastError() diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index 37f384b257..3a6b2fdbbb 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -35,7 +35,6 @@ class JsonEncode implements EncoderInterface * * @deprecated since version 2.5, to be removed in 3.0. * The {@self encode()} throws an exception if error found. - * * @see http://php.net/manual/en/function.json-last-error.php json_last_error */ public function getLastError() diff --git a/src/Symfony/Component/Serializer/Exception/CircularReferenceException.php b/src/Symfony/Component/Serializer/Exception/CircularReferenceException.php index b2977b9706..dc84183fc7 100644 --- a/src/Symfony/Component/Serializer/Exception/CircularReferenceException.php +++ b/src/Symfony/Component/Serializer/Exception/CircularReferenceException.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Serializer\Exception; /** - * CircularReferenceException + * CircularReferenceException. * * @author Kévin Dunglas */ diff --git a/src/Symfony/Component/Serializer/Exception/MappingException.php b/src/Symfony/Component/Serializer/Exception/MappingException.php index 8b63dd0a6d..4df4eec390 100644 --- a/src/Symfony/Component/Serializer/Exception/MappingException.php +++ b/src/Symfony/Component/Serializer/Exception/MappingException.php @@ -12,7 +12,7 @@ namespace Symfony\Component\Serializer\Exception; /** - * MappingException + * MappingException. * * @author Kévin Dunglas */ diff --git a/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php b/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php index 344d633b26..3a354e354e 100644 --- a/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php +++ b/src/Symfony/Component/Serializer/Mapping/Factory/ClassMetadataFactory.php @@ -38,7 +38,7 @@ class ClassMetadataFactory implements ClassMetadataFactoryInterface /** * @param LoaderInterface $loader - * @param Cache|null $cache + * @param Cache|null $cache */ public function __construct(LoaderInterface $loader, Cache $cache = null) { diff --git a/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php b/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php index 1c5d5e82e6..1c84698594 100644 --- a/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php @@ -26,7 +26,7 @@ class YamlFileLoader extends FileLoader private $yamlParser; /** - * An array of YAML class descriptions + * An array of YAML class descriptions. * * @var array */ diff --git a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php index 27f4eee59a..8ef851c652 100644 --- a/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php +++ b/src/Symfony/Component/Serializer/NameConverter/CamelCaseToSnakeCaseNameConverter.php @@ -46,7 +46,7 @@ class CamelCaseToSnakeCaseNameConverter implements NameConverterInterface $snakeCasedName = ''; $len = strlen($propertyName); - for ($i = 0; $i < $len; $i++) { + for ($i = 0; $i < $len; ++$i) { if (ctype_upper($propertyName[$i])) { $snakeCasedName .= '_'.strtolower($propertyName[$i]); } else { diff --git a/src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php b/src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php index 306e654121..c9f66b029a 100644 --- a/src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php +++ b/src/Symfony/Component/Serializer/NameConverter/NameConverterInterface.php @@ -22,6 +22,7 @@ interface NameConverterInterface * Converts a property name to its normalized value. * * @param string $propertyName + * * @return string */ public function normalize($propertyName); @@ -30,6 +31,7 @@ interface NameConverterInterface * Converts a property name to its denormalized value. * * @param string $propertyName + * * @return string */ public function denormalize($propertyName); diff --git a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php index 660e18a26e..8cc85e5b61 100644 --- a/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php @@ -192,7 +192,7 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N return true; } - $context['circular_reference_limit'][$objectHash]++; + ++$context['circular_reference_limit'][$objectHash]; } else { $context['circular_reference_limit'][$objectHash] = 1; } diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index 422021ae74..a62de61485 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -471,13 +471,13 @@ XML; '@xmlns:media' => 'http://search.yahoo.com/mrss/', '@xmlns:gd' => 'http://schemas.google.com/g/2005', '@xmlns:yt' => 'http://gdata.youtube.com/schemas/2007', - 'qux' => "1", - 'app:foo' => "foo", - 'yt:bar' => array("a", "b"), + 'qux' => '1', + 'app:foo' => 'foo', + 'yt:bar' => array('a', 'b'), 'media:baz' => array( - 'media:key' => "val", - 'media:key2' => "val", - 'A B' => "bar", + 'media:key' => 'val', + 'media:key2' => 'val', + 'A B' => 'bar', 'item' => array( array( 'title' => 'title1', diff --git a/src/Symfony/Component/Stopwatch/Section.php b/src/Symfony/Component/Stopwatch/Section.php index 5423741db8..80e17c8b0a 100644 --- a/src/Symfony/Component/Stopwatch/Section.php +++ b/src/Symfony/Component/Stopwatch/Section.php @@ -120,7 +120,7 @@ class Section } /** - * Checks if the event was started + * Checks if the event was started. * * @param string $name The event name * @@ -164,7 +164,7 @@ class Section } /** - * Returns a specific event by name + * Returns a specific event by name. * * @param string $name The event name * diff --git a/src/Symfony/Component/Stopwatch/Stopwatch.php b/src/Symfony/Component/Stopwatch/Stopwatch.php index 1595385c63..44f18d5e42 100644 --- a/src/Symfony/Component/Stopwatch/Stopwatch.php +++ b/src/Symfony/Component/Stopwatch/Stopwatch.php @@ -134,7 +134,7 @@ class Stopwatch } /** - * Returns a specific event by name + * Returns a specific event by name. * * @param string $name The event name * diff --git a/src/Symfony/Component/Stopwatch/StopwatchEvent.php b/src/Symfony/Component/Stopwatch/StopwatchEvent.php index 7f9b8c65e3..930722d2f5 100644 --- a/src/Symfony/Component/Stopwatch/StopwatchEvent.php +++ b/src/Symfony/Component/Stopwatch/StopwatchEvent.php @@ -177,7 +177,7 @@ class StopwatchEvent $stopped = count($periods); $left = count($this->started) - $stopped; - for ($i = 0; $i < $left; $i++) { + for ($i = 0; $i < $left; ++$i) { $index = $stopped + $i; $periods[] = new StopwatchPeriod($this->started[$index], $this->getNow()); } diff --git a/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php b/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php index eb9d1e7333..c3c140f4a9 100644 --- a/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php +++ b/src/Symfony/Component/Translation/DataCollector/TranslationDataCollector.php @@ -104,7 +104,7 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto $messages[$key]['translation'] = $this->sanitizeString($message['translation']); $result[$messageId] = $message; } else { - $result[$messageId]['count']++; + ++$result[$messageId]['count']; } unset($messages[$key]); diff --git a/src/Symfony/Component/Validator/Constraint.php b/src/Symfony/Component/Validator/Constraint.php index ad86f4418d..1ddc1ae0a3 100644 --- a/src/Symfony/Component/Validator/Constraint.php +++ b/src/Symfony/Component/Validator/Constraint.php @@ -55,13 +55,15 @@ abstract class Constraint const PROPERTY_CONSTRAINT = 'property'; /** - * Maps error codes to the names of their constants + * Maps error codes to the names of their constants. + * * @var array */ protected static $errorNames = array(); /** - * Domain-specific data attached to a constraint + * Domain-specific data attached to a constraint. + * * @var mixed */ public $payload; diff --git a/src/Symfony/Component/Validator/Constraints/Composite.php b/src/Symfony/Component/Validator/Constraints/Composite.php index 22a748cbf4..90c98620f0 100644 --- a/src/Symfony/Component/Validator/Constraints/Composite.php +++ b/src/Symfony/Component/Validator/Constraints/Composite.php @@ -25,6 +25,7 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; * contains the nested constraints. * * @since 2.6 + * * @author Bernhard Schussek */ abstract class Composite extends Constraint @@ -58,7 +59,7 @@ abstract class Composite extends Constraint $this->initializeNestedConstraints(); - /** @var Constraint[] $nestedConstraints */ + /* @var Constraint[] $nestedConstraints */ $compositeOption = $this->getCompositeOption(); $nestedConstraints = $this->$compositeOption; diff --git a/src/Symfony/Component/Validator/Constraints/FileValidator.php b/src/Symfony/Component/Validator/Constraints/FileValidator.php index 5125a3265c..62a6139a6e 100644 --- a/src/Symfony/Component/Validator/Constraints/FileValidator.php +++ b/src/Symfony/Component/Validator/Constraints/FileValidator.php @@ -294,7 +294,7 @@ class FileValidator extends ConstraintValidator /** * Convert the limit to the smallest possible number - * (i.e. try "MB", then "kB", then "bytes") + * (i.e. try "MB", then "kB", then "bytes"). */ private function factorizeSizes($size, $limit, $binaryFormat) { diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index b74f92caa8..a28a442246 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -102,7 +102,6 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable * @return \Traversable The iterator * * @see \IteratorAggregate::getIterator() - * * @deprecated since version 2.5, to be removed in 3.0. */ public function getIterator() diff --git a/src/Symfony/Component/Validator/Constraints/Isbn.php b/src/Symfony/Component/Validator/Constraints/Isbn.php index 35cb82204e..3878c84194 100644 --- a/src/Symfony/Component/Validator/Constraints/Isbn.php +++ b/src/Symfony/Component/Validator/Constraints/Isbn.php @@ -45,12 +45,14 @@ class Isbn extends Constraint /** * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. + * * @var bool */ public $isbn10 = false; /** * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. + * * @var bool */ public $isbn13 = false; diff --git a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php index 301a821771..aaf52dc561 100644 --- a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php @@ -17,7 +17,7 @@ use Symfony\Component\Validator\ConstraintValidator; use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** - * Validates whether the value is a valid ISBN-10 or ISBN-13 + * Validates whether the value is a valid ISBN-10 or ISBN-13. * * @author The Whole Life To Learn * @author Manuel Reinhard diff --git a/src/Symfony/Component/Validator/Constraints/IssnValidator.php b/src/Symfony/Component/Validator/Constraints/IssnValidator.php index 87bf83c652..000af74f28 100644 --- a/src/Symfony/Component/Validator/Constraints/IssnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IssnValidator.php @@ -156,8 +156,9 @@ class IssnValidator extends ConstraintValidator } // Calculate a checksum. "X" equals 10. - $checkSum = 'X' === $canonical{7} || 'x' === $canonical{7} - ? 10 + $checkSum = 'X' === $canonical{7} + || 'x' === $canonical{7} + ? 10 : $canonical{7}; for ($i = 0; $i < 7; ++$i) { diff --git a/src/Symfony/Component/Validator/Constraints/Traverse.php b/src/Symfony/Component/Validator/Constraints/Traverse.php index 4abae6c67a..5811ad770a 100644 --- a/src/Symfony/Component/Validator/Constraints/Traverse.php +++ b/src/Symfony/Component/Validator/Constraints/Traverse.php @@ -18,6 +18,7 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; * @Annotation * * @since 2.5 + * * @author Bernhard Schussek */ class Traverse extends Constraint diff --git a/src/Symfony/Component/Validator/Constraints/Uuid.php b/src/Symfony/Component/Validator/Constraints/Uuid.php index 3c67a3af0c..8589b959c1 100644 --- a/src/Symfony/Component/Validator/Constraints/Uuid.php +++ b/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -45,14 +45,14 @@ class Uuid extends Constraint const V5_SHA1 = 5; /** - * Message to display when validation fails + * Message to display when validation fails. * * @var string */ public $message = 'This is not a valid UUID.'; /** - * Strict mode only allows UUIDs that meet the formal definition and formatting per RFC 4122 + * Strict mode only allows UUIDs that meet the formal definition and formatting per RFC 4122. * * Set this to `false` to allow legacy formats with different dash positioning or wrapping characters * @@ -61,7 +61,7 @@ class Uuid extends Constraint public $strict = true; /** - * Array of allowed versions (see version constants above) + * Array of allowed versions (see version constants above). * * All UUID versions are allowed by default * diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index 39f92fbc6d..722bcc947d 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -28,6 +28,7 @@ use Symfony\Component\Validator\Violation\ConstraintViolationBuilder; * The context used and created by {@link ExecutionContextFactory}. * * @since 2.5 + * * @author Bernhard Schussek * * @see ExecutionContextInterface diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php index d94a806201..f4f01d926e 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContextFactory.php @@ -18,6 +18,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * Creates new {@link ExecutionContext} instances. * * @since 2.5 + * * @author Bernhard Schussek * * @internal You should not instantiate or use this class. Code against diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.php b/src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.php index f0ee00174f..e4af667d2d 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContextFactoryInterface.php @@ -20,6 +20,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * that is passed through the validation run. * * @since 2.5 + * * @author Bernhard Schussek */ interface ExecutionContextFactoryInterface diff --git a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php index 4865204425..2ef80b66f0 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php @@ -57,6 +57,7 @@ use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface; * results later on. * * @since 2.5 + * * @author Bernhard Schussek */ interface ExecutionContextInterface extends LegacyExecutionContextInterface diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php index 4d5be451d9..f52b359fb3 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php @@ -21,6 +21,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * An execution context that is compatible with the legacy API (< 2.5). * * @since 2.5 + * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php index 9e8498a6b9..c110644e99 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -23,6 +23,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * Implemented for backward compatibility with Symfony < 2.5. * * @since 2.5 + * * @author Bernhard Schussek * * @deprecated since version 2.5, to be removed in 3.0. diff --git a/src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php b/src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php index c6ece50b70..97cc5ffe5d 100644 --- a/src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php +++ b/src/Symfony/Component/Validator/Exception/UnsupportedMetadataException.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Validator\Exception; /** * @since 2.5 + * * @author Bernhard Schussek */ class UnsupportedMetadataException extends InvalidArgumentException diff --git a/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php b/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php index ff2853f4e0..2b97bdd4ca 100644 --- a/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php +++ b/src/Symfony/Component/Validator/Mapping/CascadingStrategy.php @@ -28,6 +28,7 @@ namespace Symfony\Component\Validator\Mapping; * implemented as bit mask in order to allow future extensions. * * @since 2.5 + * * @author Bernhard Schussek * * @see TraversalStrategy diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php b/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php index bb76c2c01b..577440d61d 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadataInterface.php @@ -25,6 +25,7 @@ use Symfony\Component\Validator\PropertyMetadataContainerInterface as LegacyProp * should be traversed or not. * * @since 2.5 + * * @author Bernhard Schussek * * @see MetadataInterface diff --git a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php index 208dfceeb6..6c5c277ed8 100644 --- a/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/Factory/LazyLoadingMetadataFactory.php @@ -41,21 +41,21 @@ use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; class LazyLoadingMetadataFactory implements MetadataFactoryInterface { /** - * The loader for loading the class metadata + * The loader for loading the class metadata. * * @var LoaderInterface|null */ protected $loader; /** - * The cache for caching class metadata + * The cache for caching class metadata. * * @var CacheInterface|null */ protected $cache; /** - * The loaded metadata, indexed by class name + * The loaded metadata, indexed by class name. * * @var ClassMetadata[] */ diff --git a/src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.php b/src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.php index 58736e2511..6e55e771dd 100644 --- a/src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.php +++ b/src/Symfony/Component/Validator/Mapping/Factory/MetadataFactoryInterface.php @@ -17,6 +17,7 @@ use Symfony\Component\Validator\MetadataFactoryInterface as LegacyMetadataFactor * Returns {@link \Symfony\Component\Validator\Mapping\MetadataInterface} instances for values. * * @since 2.5 + * * @author Bernhard Schussek */ interface MetadataFactoryInterface extends LegacyMetadataFactoryInterface diff --git a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index cc0e54d361..3459074fca 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -24,6 +24,7 @@ use Symfony\Component\Validator\ValidationVisitorInterface; * This class supports serialization and cloning. * * @since 2.5 + * * @author Bernhard Schussek */ class GenericMetadata implements MetadataInterface diff --git a/src/Symfony/Component/Validator/Mapping/MetadataInterface.php b/src/Symfony/Component/Validator/Mapping/MetadataInterface.php index fda1dbbbb4..991962ceaf 100644 --- a/src/Symfony/Component/Validator/Mapping/MetadataInterface.php +++ b/src/Symfony/Component/Validator/Mapping/MetadataInterface.php @@ -24,6 +24,7 @@ use Symfony\Component\Validator\MetadataInterface as LegacyMetadataInterface; * traversed or not. * * @since 2.5 + * * @author Bernhard Schussek * * @see CascadingStrategy diff --git a/src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php b/src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php index 79e2c799de..8a77aa83fa 100644 --- a/src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php +++ b/src/Symfony/Component/Validator/Mapping/PropertyMetadataInterface.php @@ -25,6 +25,7 @@ use Symfony\Component\Validator\PropertyMetadataInterface as LegacyPropertyMetad * objects should be traversed or not. * * @since 2.5 + * * @author Bernhard Schussek * * @see MetadataInterface diff --git a/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php index 450a3ecc0a..ae76857aa4 100644 --- a/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php +++ b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php @@ -24,6 +24,7 @@ namespace Symfony\Component\Validator\Mapping; * The traversal strategy is ignored for arrays. Arrays are always iterated. * * @since 2.1 + * * @author Bernhard Schussek * * @see CascadingStrategy diff --git a/src/Symfony/Component/Validator/PropertyMetadataInterface.php b/src/Symfony/Component/Validator/PropertyMetadataInterface.php index 20af8a993b..46e7c692c8 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataInterface.php @@ -23,7 +23,6 @@ namespace Symfony\Component\Validator; * @author Bernhard Schussek * * @see MetadataInterface - * * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\PropertyMetadataInterface} instead. */ diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php index 21cb4611aa..eab15ed3bb 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/CompositeTest.php @@ -33,6 +33,7 @@ class ConcreteComposite extends Composite /** * @since 2.6 + * * @author Bernhard Schussek */ class CompositeTest extends \PHPUnit_Framework_TestCase diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php index 3d4ef75978..3b6de4d412 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/ExpressionValidatorTest.php @@ -174,7 +174,7 @@ class ExpressionValidatorTest extends AbstractConstraintValidatorTest /** * When validatePropertyValue() is called with a class name - * https://github.com/symfony/symfony/pull/11498 + * https://github.com/symfony/symfony/pull/11498. */ public function testSucceedingExpressionAtPropertyLevelWithoutRoot() { @@ -191,7 +191,7 @@ class ExpressionValidatorTest extends AbstractConstraintValidatorTest /** * When validatePropertyValue() is called with a class name - * https://github.com/symfony/symfony/pull/11498 + * https://github.com/symfony/symfony/pull/11498. */ public function testFailingExpressionAtPropertyLevelWithoutRoot() { diff --git a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php index 176b49f494..686b62b091 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php @@ -247,17 +247,17 @@ abstract class FileValidatorTest extends AbstractConstraintValidatorTest array(11, 10, false, '11', '10', 'bytes'), // round(size) == 1.01kB, limit == 1kB - array(ceil(1000*1.01), 1000, null, '1.01', '1', 'kB'), - array(ceil(1000*1.01), '1k', null, '1.01', '1', 'kB'), - array(ceil(1024*1.01), '1Ki', null, '1.01', '1', 'KiB'), + array(ceil(1000 * 1.01), 1000, null, '1.01', '1', 'kB'), + array(ceil(1000 * 1.01), '1k', null, '1.01', '1', 'kB'), + array(ceil(1024 * 1.01), '1Ki', null, '1.01', '1', 'KiB'), - array(ceil(1024*1.01), 1024, true, '1.01', '1', 'KiB'), - array(ceil(1024*1.01*1000), '1024k', true, '1010', '1000', 'KiB'), - array(ceil(1024*1.01), '1Ki', true, '1.01', '1', 'KiB'), + array(ceil(1024 * 1.01), 1024, true, '1.01', '1', 'KiB'), + array(ceil(1024 * 1.01 * 1000), '1024k', true, '1010', '1000', 'KiB'), + array(ceil(1024 * 1.01), '1Ki', true, '1.01', '1', 'KiB'), - array(ceil(1000*1.01), 1000, false, '1.01', '1', 'kB'), - array(ceil(1000*1.01), '1k', false, '1.01', '1', 'kB'), - array(ceil(1024*1.01*10), '10Ki', false, '10.34', '10.24', 'kB'), + array(ceil(1000 * 1.01), 1000, false, '1.01', '1', 'kB'), + array(ceil(1000 * 1.01), '1k', false, '1.01', '1', 'kB'), + array(ceil(1024 * 1.01 * 10), '10Ki', false, '10.34', '10.24', 'kB'), ); } @@ -266,7 +266,7 @@ abstract class FileValidatorTest extends AbstractConstraintValidatorTest */ public function testBinaryFormat($bytesWritten, $limit, $binaryFormat, $sizeAsString, $limitAsString, $suffix) { - fseek($this->file, $bytesWritten-1, SEEK_SET); + fseek($this->file, $bytesWritten - 1, SEEK_SET); fwrite($this->file, '0'); fclose($this->file); diff --git a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php index 12c8d87f2c..a2da68f9f1 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php @@ -30,6 +30,7 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * Verifies that a validator satisfies the API of Symfony 2.5+. * * @since 2.5 + * * @author Bernhard Schussek */ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest @@ -108,7 +109,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $sequence = new GroupSequence(array('Group 1', 'Group 2', 'Group 3')); $violations = $this->validator->validate($entity, new Valid(), $sequence); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message 1', $violations[0]->getMessage()); } @@ -138,7 +139,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $sequence = new GroupSequence(array('Group 1', 'Entity')); $violations = $this->validator->validate($entity, new Valid(), $sequence); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Reference violation 1', $violations[0]->getMessage()); } @@ -157,7 +158,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest ->validate($value->reference, new Valid(), 'Group') ; - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $test->assertCount(1, $violations); $test->assertSame('Message value', $violations[0]->getMessage()); $test->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -197,7 +198,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $test->assertSame('Separate violation', $violations[0]->getMessage()); } @@ -254,7 +255,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -318,7 +319,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -357,7 +358,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validate($traversable, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -389,7 +390,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validate($traversable, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); } @@ -414,7 +415,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validate($traversable, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -452,7 +453,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validate($entity, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -480,7 +481,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validate($entity, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -508,7 +509,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validate($entity, new Valid(), 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -529,7 +530,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -611,7 +612,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); } @@ -630,7 +631,7 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity, new Valid(), array('Group 1', 'Group 2')); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); } diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php index 5f4167dcd8..22af86e3de 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php @@ -24,6 +24,7 @@ use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; * Verifies that a validator satisfies the API of Symfony < 2.5. * * @since 2.5 + * * @author Bernhard Schussek */ abstract class AbstractLegacyApiTest extends AbstractValidatorTest @@ -160,7 +161,7 @@ abstract class AbstractLegacyApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -218,7 +219,7 @@ abstract class AbstractLegacyApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -248,7 +249,7 @@ abstract class AbstractLegacyApiTest extends AbstractValidatorTest $violations = $this->validator->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php index 69c025d459..678a3252a5 100644 --- a/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php @@ -24,6 +24,7 @@ use Symfony\Component\Validator\Tests\Fixtures\Reference; /** * @since 2.5 + * * @author Bernhard Schussek */ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase @@ -92,7 +93,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate('Bernhard', $constraint, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -129,7 +130,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -169,7 +170,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -209,7 +210,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -247,7 +248,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($array, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -285,7 +286,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($array, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -323,7 +324,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($traversable, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -363,7 +364,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($traversable, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -402,7 +403,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -444,7 +445,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -486,7 +487,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -507,7 +508,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -551,7 +552,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -591,7 +592,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -619,7 +620,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); } @@ -639,7 +640,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); } @@ -652,7 +653,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -665,7 +666,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -696,7 +697,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -725,7 +726,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(0, $violations); } @@ -775,7 +776,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -824,7 +825,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validateProperty($entity, 'firstName', 'Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -853,7 +854,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase } /** - * https://github.com/symfony/symfony/issues/11604 + * https://github.com/symfony/symfony/issues/11604. */ public function testValidatePropertyWithoutConstraints() { @@ -904,7 +905,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase 'Group' ); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -955,7 +956,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase 'Group' ); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Message value', $violations[0]->getMessage()); $this->assertSame('Message %param%', $violations[0]->getMessageTemplate()); @@ -984,7 +985,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase } /** - * https://github.com/symfony/symfony/issues/11604 + * https://github.com/symfony/symfony/issues/11604. */ public function testValidatePropertyValueWithoutConstraints() { @@ -1010,7 +1011,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); } @@ -1030,7 +1031,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(2, $violations); } @@ -1053,7 +1054,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Group 2'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); } @@ -1076,7 +1077,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, array('Group 1', 'Group 2')); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(2, $violations); } @@ -1109,7 +1110,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Default'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); } @@ -1143,7 +1144,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Default'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); } @@ -1175,7 +1176,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Default'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Violation in Default group', $violations[0]->getMessage()); } @@ -1205,7 +1206,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Other Group'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Violation in other group', $violations[0]->getMessage()); } @@ -1241,7 +1242,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Default'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); } @@ -1277,7 +1278,7 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase $violations = $this->validate($entity, null, 'Default'); - /** @var ConstraintViolationInterface[] $violations */ + /* @var ConstraintViolationInterface[] $violations */ $this->assertCount(1, $violations); $this->assertSame('Violation in Group 2', $violations[0]->getMessage()); } diff --git a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php index 88e8b3b826..fbc863157d 100644 --- a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php +++ b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Validator\Tests; -use Symfony\Component\Validator\Validation; use Symfony\Component\Validator\ValidatorBuilder; use Symfony\Component\Validator\ValidatorBuilderInterface; diff --git a/src/Symfony/Component/Validator/Validation.php b/src/Symfony/Component/Validator/Validation.php index a03d21584b..1693f7311a 100644 --- a/src/Symfony/Component/Validator/Validation.php +++ b/src/Symfony/Component/Validator/Validation.php @@ -20,6 +20,7 @@ final class Validation { /** * The Validator API provided by Symfony 2.4 and older. + * * @deprecated use API_VERSION_2_5_BC instead. */ const API_VERSION_2_4 = 1; diff --git a/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php b/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php index 767f89585f..048d6c7545 100644 --- a/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php +++ b/src/Symfony/Component/Validator/Validator/ContextualValidatorInterface.php @@ -18,6 +18,7 @@ use Symfony\Component\Validator\ConstraintViolationListInterface; * A validator in a specific execution context. * * @since 2.5 + * * @author Bernhard Schussek */ interface ContextualValidatorInterface diff --git a/src/Symfony/Component/Validator/Validator/LegacyValidator.php b/src/Symfony/Component/Validator/Validator/LegacyValidator.php index 0b0934bd3e..e35f4c9140 100644 --- a/src/Symfony/Component/Validator/Validator/LegacyValidator.php +++ b/src/Symfony/Component/Validator/Validator/LegacyValidator.php @@ -17,11 +17,11 @@ namespace Symfony\Component\Validator\Validator; * A validator that supports both the API of Symfony < 2.5 and Symfony 2.5+. * * @since 2.5 + * * @author Bernhard Schussek * * @see \Symfony\Component\Validator\ValidatorInterface * @see \Symfony\Component\Validator\Validator\ValidatorInterface - * * @deprecated since version 2.5, to be removed in 3.0. */ class LegacyValidator extends RecursiveValidator diff --git a/src/Symfony/Component/Validator/Validator/ValidatorInterface.php b/src/Symfony/Component/Validator/Validator/ValidatorInterface.php index 2582bf65c8..3aafa34ea0 100644 --- a/src/Symfony/Component/Validator/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/Validator/ValidatorInterface.php @@ -20,6 +20,7 @@ use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; * Validates PHP values against constraints. * * @since 2.5 + * * @author Bernhard Schussek */ interface ValidatorInterface extends MetadataFactoryInterface diff --git a/src/Symfony/Component/Validator/ValidatorBuilderInterface.php b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php index cc00077705..e15fb7aa14 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilderInterface.php +++ b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php @@ -180,7 +180,6 @@ interface ValidatorBuilderInterface * * @see Validation::API_VERSION_2_5 * @see Validation::API_VERSION_2_5_BC - * * @deprecated since version 2.7, to be removed in 3.0. */ public function setApiVersion($apiVersion); diff --git a/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php b/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php index b752c397b8..d7d3877aed 100644 --- a/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php +++ b/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilder.php @@ -21,6 +21,7 @@ use Symfony\Component\Validator\Util\PropertyPath; * Default implementation of {@link ConstraintViolationBuilderInterface}. * * @since 2.5 + * * @author Bernhard Schussek * * @internal You should not instantiate or use this class. Code against diff --git a/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php b/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php index 3dc270a154..b7cc2ecfcd 100644 --- a/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php +++ b/src/Symfony/Component/Validator/Violation/ConstraintViolationBuilderInterface.php @@ -20,6 +20,7 @@ namespace Symfony\Component\Validator\Violation; * execution context. * * @since 2.5 + * * @author Bernhard Schussek */ interface ConstraintViolationBuilderInterface diff --git a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php index 6ef2ebf7bd..0bf91c8204 100644 --- a/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php @@ -130,7 +130,7 @@ class ReflectionCaster if ($v = $c->getStaticVariables()) { foreach ($v as $k => &$v) { - $a[$prefix.'use']['$'.$k] =& $v; + $a[$prefix.'use']['$'.$k] = &$v; } unset($v); } @@ -219,7 +219,7 @@ class ReflectionCaster private static function addExtra(&$a, \Reflector $c) { - $a =& $a[Caster::PREFIX_VIRTUAL.'extra']; + $a = &$a[Caster::PREFIX_VIRTUAL.'extra']; if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { $a['file'] = $m; diff --git a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php index 4699e19182..51309c662b 100644 --- a/src/Symfony/Component/VarDumper/Cloner/VarCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/VarCloner.php @@ -77,7 +77,7 @@ class VarCloner extends AbstractCloner $zval['type'] = gettype($v); } if ($zval['zval_isref']) { - $queue[$i][$k] =& $stub; // Break hard references to make $queue completely + $queue[$i][$k] = &$stub; // Break hard references to make $queue completely unset($stub); // independent from the original structure if (isset($hardRefs[$zval['zval_hash']])) { $queue[$i][$k] = $useExt ? ($v = $hardRefs[$zval['zval_hash']]) : ($step[$k] = $v); @@ -130,7 +130,7 @@ class VarCloner extends AbstractCloner unset($v[$gid]); $a = array(); foreach ($v as $gk => &$gv) { - $a[$gk] =& $gv; + $a[$gk] = &$gv; } } else { $a = $v; @@ -210,7 +210,7 @@ class VarCloner extends AbstractCloner $step[$k] = new Stub(); $step[$k]->value = $stub; $h = spl_object_hash($step[$k]); - $queue[$i][$k] = $hardRefs[$h] =& $step[$k]; + $queue[$i][$k] = $hardRefs[$h] = &$step[$k]; $values[$h] = $v; } $queue[$i][$k]->handle = ++$refs; @@ -249,7 +249,7 @@ class VarCloner extends AbstractCloner $step[$k] = $queue[$i][$k] = new Stub(); $step[$k]->value = $v; $h = spl_object_hash($step[$k]); - $hardRefs[$h] =& $step[$k]; + $hardRefs[$h] = &$step[$k]; $values[$h] = $v; } $queue[$i][$k]->handle = ++$refs; diff --git a/src/Symfony/Component/Yaml/Tests/InlineTest.php b/src/Symfony/Component/Yaml/Tests/InlineTest.php index 0776e4fa8d..522d77053d 100644 --- a/src/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/src/Symfony/Component/Yaml/Tests/InlineTest.php @@ -293,8 +293,8 @@ class InlineTest extends \PHPUnit_Framework_TestCase array('{ foo : bar, bar : foo, false : false, null : null, integer : 12 }', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), array('{foo: \'bar\', bar: \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), array('{\'foo\': \'bar\', "bar": \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), - array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', (object) array('foo\'' => 'bar', "bar\"" => 'foo: bar')), - array('{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', (object) array('foo: ' => 'bar', "bar: " => 'foo: bar')), + array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', (object) array('foo\'' => 'bar', 'bar"' => 'foo: bar')), + array('{\'foo: \': \'bar\', "bar: ": \'foo: bar\'}', (object) array('foo: ' => 'bar', 'bar: ' => 'foo: bar')), // nested sequences and mappings array('[foo, [bar, foo]]', array('foo', array('bar', 'foo'))), diff --git a/src/Symfony/Component/Yaml/Unescaper.php b/src/Symfony/Component/Yaml/Unescaper.php index 93206f9233..1b5e5ec2dc 100644 --- a/src/Symfony/Component/Yaml/Unescaper.php +++ b/src/Symfony/Component/Yaml/Unescaper.php @@ -24,6 +24,7 @@ class Unescaper * must be converted to that encoding. * * @deprecated since version 2.5, to be removed in 3.0 + * * @internal */ const ENCODING = 'UTF-8';