This commit is contained in:
Fabien Potencier 2015-08-24 08:53:33 +02:00
parent e25aca7072
commit c0e4495b66
192 changed files with 374 additions and 308 deletions

View File

@ -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;

View File

@ -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'],

View File

@ -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));
}

View File

@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation;
/**
* @since 2.5.4
*
* @author Bernhard Schussek <bschussek@gmail.com>
* @group legacy
*/

View File

@ -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
*/

View File

@ -177,7 +177,7 @@ EOF
if ($info['valid'] && $output->isVerbose()) {
$output->writeln('<info>OK</info>'.($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('<error>KO</error> 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;

View File

@ -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()];
}
}

View File

@ -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',
),
);

View File

@ -135,7 +135,7 @@ EOF
if ($info['valid'] && $output->isVerbose()) {
$output->writeln('<info>OK</info>'.($info['file'] ? sprintf(' in %s', $info['file']) : ''));
} elseif (!$info['valid']) {
$errors++;
++$errors;
$output->writeln(sprintf('<error>KO</error> in %s', $info['file']));
$output->writeln(sprintf('<error>>> %s</error>', $info['message']));
}
@ -153,7 +153,7 @@ EOF
array_walk($filesInfo, function (&$v) use (&$errors) {
$v['file'] = (string) $v['file'];
if (!$v['valid']) {
$errors++;
++$errors;
}
});

View File

@ -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)));
}
}

View File

@ -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
*

View File

@ -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()

View File

@ -98,6 +98,7 @@ class ControllerTest extends TestCase
/**
* @param $token
*
* @return ContainerInterface
*/
private function getContainerWithTokenStorage($token = null)

View File

@ -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')

View File

@ -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 <kevin@les-tilleuls.coop>
*/
@ -162,7 +162,7 @@ EOF
}
/**
* Gets the mask builder
* Gets the mask builder.
*
* @return MaskBuilder
*/

View File

@ -1,4 +1,5 @@
<?php
$container->loadFromExtension('security', array(
'providers' => array(
'default' => array('id' => 'foo'),

View File

@ -12,7 +12,7 @@
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity;
/**
* Car
* Car.
*
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
*/

View File

@ -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 <kevin@les-tilleuls.coop>
*/

View File

@ -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 <mkhalil.sarah@gmail.com>
*/

View File

@ -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';

View File

@ -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 <fabien@symfony.com>
*/

View File

@ -11,8 +11,6 @@
namespace Symfony\Component\Asset\Context;
use Symfony\Component\HttpFoundation\RequestStack;
/**
* A context that does nothing.
*

View File

@ -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)
{

View File

@ -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()

View File

@ -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
*/

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Config;
use Symfony\Component\Config\Resource\ResourceInterface;
/**
* Interface for ConfigCache
* Interface for ConfigCache.
*
* @author Matthias Pigulla <mp@webfactory.de>
*/

View File

@ -247,7 +247,7 @@ class XmlReferenceDumper
}
/**
* Outputs a single config reference line
* Outputs a single config reference line.
*
* @param string $text
* @param int $indent

View File

@ -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

View File

@ -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
*/

View File

@ -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<bg=red;fg=white> %s </> ", $this->getBorder($id), $errorPrefix);
$message .= sprintf('%s<bg=red;fg=white> %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<bg=green;fg=white> %s </> ", $this->getBorder($id), $prefix);
$message .= sprintf('%s<bg=green;fg=white> %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

View File

@ -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;

View File

@ -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

View File

@ -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 <dunglas@gmail.com>
*
* @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
*

View File

@ -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')

View File

@ -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 <kevinbond@gmail.com>
*/

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Console\Tests\Fixtures;
use Symfony\Component\Console\Output\BufferedOutput;
/**
* Dummy output
* Dummy output.
*
* @author Kévin Dunglas <dunglas@gmail.com>
*/

View File

@ -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) {

View File

@ -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()),

View File

@ -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 <dunglas@gmail.com>
*/

View File

@ -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
*

View File

@ -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)

View File

@ -216,7 +216,7 @@ class YamlDumper extends Dumper
}
/**
* Dumps callable to YAML format
* Dumps callable to YAML format.
*
* @param callable $callable
*

View File

@ -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.');
}
}

View File

@ -355,7 +355,7 @@ class Form extends Link implements \ArrayAccess
}
/**
* Disables validation
* Disables validation.
*
* @return self
*/

View File

@ -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);

View File

@ -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');
}

View File

@ -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),
);
}

View File

@ -71,7 +71,7 @@ class TokenStream
}
/**
* Checks if end of stream was reached
* Checks if end of stream was reached.
*
* @return bool
*/

View File

@ -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 <fabien@symfony.com>
* @author Christian Gärtner <christiangaertner.film@googlemail.com>

View File

@ -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.
*/

View File

@ -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()
{

View File

@ -336,8 +336,6 @@ class Button implements \IteratorAggregate, FormInterface
/**
* Unsupported method.
*
* @return null Always returns null
*/
public function getTransformationFailure()
{

View File

@ -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
*/

View File

@ -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.
*/

View File

@ -15,6 +15,7 @@ namespace Symfony\Component\Form\Deprecated;
/**
* @deprecated since version 2.7, to be removed in 3.0.
*
* @internal
*/
final class FormEvents

View File

@ -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;
/**

View File

@ -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 <bschussek@gmail.com>

View File

@ -22,6 +22,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
* is expected.
*
* @since 2.4
*
* @author Bernhard Schussek <bschussek@gmail.com>
*
* @deprecated since version 2.4, to be removed in 3.0.

View File

@ -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 <bschussek@gmail.com>
*
* @deprecated since version 2.4, to be removed in 3.0.

View File

@ -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 <robert.schoenthal@gmail.com>
* @author Bernhard Schussek <bschussek@gmail.com>
*/

View File

@ -21,6 +21,7 @@ use Symfony\Component\Form\FormEvents;
* and {@link FormEvents::POST_SUBMIT} events.
*
* @since 2.4
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class DataCollectorListener implements EventSubscriberInterface

View File

@ -21,6 +21,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollector;
* Data collector for {@link FormInterface} instances.
*
* @since 2.4
*
* @author Robert Schönthal <robert.schoenthal@gmail.com>
* @author Bernhard Schussek <bschussek@gmail.com>
*/

View File

@ -19,6 +19,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
* Collects and structures information about forms.
*
* @since 2.4
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface FormDataCollectorInterface extends DataCollectorInterface

View File

@ -20,6 +20,7 @@ use Symfony\Component\Validator\ConstraintViolationInterface;
* Default implementation of {@link FormDataExtractorInterface}.
*
* @since 2.4
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class FormDataExtractor implements FormDataExtractorInterface

View File

@ -18,6 +18,7 @@ use Symfony\Component\Form\FormView;
* Extracts arrays of information out of forms.
*
* @since 2.4
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
interface FormDataExtractorInterface

View File

@ -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 <bschussek@gmail.com>
*/
class ResolvedTypeDataCollectorProxy implements ResolvedFormTypeInterface

View File

@ -21,6 +21,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface;
* instances.
*
* @since 2.4
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/
class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface

View File

@ -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 <robert.schoenthal@gmail.com>
* @author Bernhard Schussek <bschussek@gmail.com>
*/

View File

@ -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());

View File

@ -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);
}

View File

@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Symfony package.
*

View File

@ -1,4 +1,5 @@
<?php
/*
* This file is part of the Symfony package.
*

View File

@ -18,7 +18,6 @@ use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\Extension\Validator\Constraints\Form;
use Symfony\Component\Form\Extension\Validator\Constraints\FormValidator;
use Symfony\Component\Form\SubmitButtonBuilder;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;

View File

@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation;
/**
* @since 2.5.3
*
* @author Bernhard Schussek <bschussek@gmail.com>
* @group legacy
*/

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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.');
}

View File

@ -260,7 +260,7 @@ class LegacyPdoSessionHandler implements \SessionHandlerInterface
}
/**
* Return a PDO instance
* Return a PDO instance.
*
* @return \PDO
*/

View File

@ -108,7 +108,7 @@ class MemcacheSessionHandler implements \SessionHandlerInterface
}
/**
* Return a Memcache instance
* Return a Memcache instance.
*
* @return \Memcache
*/

View File

@ -114,7 +114,7 @@ class MemcachedSessionHandler implements \SessionHandlerInterface
}
/**
* Return a Memcached instance
* Return a Memcached instance.
*
* @return \Memcached
*/

View File

@ -177,7 +177,7 @@ class MongoDbSessionHandler implements \SessionHandlerInterface
}
/**
* Return a Mongo instance
* Return a Mongo instance.
*
* @return \Mongo
*/

View File

@ -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

View File

@ -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()
{

View File

@ -157,7 +157,7 @@ class ControllerResolver implements ControllerResolverInterface
}
/**
* Returns an instantiated controller
* Returns an instantiated controller.
*
* @param string $class A class name
*

View File

@ -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)) {

View File

@ -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 <gildas.quemener@gmail.com>
*/
@ -36,7 +36,7 @@ class AddRequestFormatsListener implements EventSubscriberInterface
}
/**
* Adds request formats
* Adds request formats.
*
* @param GetResponseEvent $event
*/

View File

@ -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 <fabien@symfony.com>
*/

View File

@ -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
*/

View File

@ -156,6 +156,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
* Gets the Surrogate instance.
*
* @throws \LogicException
*
* @return SurrogateInterface A Surrogate instance
*/
public function getSurrogate()

View File

@ -45,7 +45,7 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface
$this->maxAges[] = $response->getMaxAge();
}
$this->embeddedResponses++;
++$this->embeddedResponses;
}
/**

View File

@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
interface SurrogateInterface
{
/**
* Returns surrogate name
* Returns surrogate name.
*
* @return string
*/

View File

@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\KernelEvents;
/**
* Test AddRequestFormatsListener class
* Test AddRequestFormatsListener class.
*
* @author Gildas Quemener <gildas.quemener@gmail.com>
*/

View File

@ -25,7 +25,7 @@ use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener;
use Symfony\Component\HttpKernel\KernelEvents;
/**
* DebugHandlersListenerTest
* DebugHandlersListenerTest.
*
* @author Nicolas Grekas <p@tchwork.com>
*/

View File

@ -19,7 +19,7 @@ use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
use Symfony\Component\VarDumper\VarDumper;
/**
* DumpListenerTest
* DumpListenerTest.
*
* @author Nicolas Grekas <p@tchwork.com>
*/

View File

@ -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();

View File

@ -765,7 +765,7 @@ EOF;
}
/**
* Returns a mock for the BundleInterface
* Returns a mock for the BundleInterface.
*
* @return BundleInterface
*/

View File

@ -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')));

View File

@ -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)

View File

@ -54,7 +54,7 @@ abstract class AbstractPipes implements PipesInterface
}
/**
* Unblocks streams
* Unblocks streams.
*/
protected function unblock()
{

Some files were not shown because too many files have changed in this diff Show More