fixes CS
This commit is contained in:
parent
e25aca7072
commit
c0e4495b66
@ -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;
|
||||
|
@ -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'],
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation;
|
||||
|
||||
/**
|
||||
* @since 2.5.4
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @group legacy
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
@ -239,7 +239,7 @@ EOF
|
||||
$result = array();
|
||||
while ($position < $max) {
|
||||
$result[$position + 1] = $lines[$position];
|
||||
$position++;
|
||||
++$position;
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@ -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()];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -114,6 +114,7 @@ class ObjectsProvider
|
||||
|
||||
/**
|
||||
* @deprecated since version 2.7, to be removed in 3.0
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
public static function getLegacyContainerDefinitions()
|
||||
|
@ -98,6 +98,7 @@ class ControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @param $token
|
||||
*
|
||||
* @return ContainerInterface
|
||||
*/
|
||||
private function getContainerWithTokenStorage($token = null)
|
||||
|
@ -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')
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
$container->loadFromExtension('security', array(
|
||||
'providers' => array(
|
||||
'default' => array('id' => 'foo'),
|
||||
|
@ -12,7 +12,7 @@
|
||||
namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity;
|
||||
|
||||
/**
|
||||
* Car
|
||||
* Car.
|
||||
*
|
||||
* @author Kévin Dunglas <kevin@les-tilleuls.coop>
|
||||
*/
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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';
|
||||
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\Asset\Context;
|
||||
|
||||
use Symfony\Component\HttpFoundation\RequestStack;
|
||||
|
||||
/**
|
||||
* A context that does nothing.
|
||||
*
|
||||
|
@ -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()
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -247,7 +247,7 @@ class XmlReferenceDumper
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs a single config reference line
|
||||
* Outputs a single config reference line.
|
||||
*
|
||||
* @param string $text
|
||||
* @param int $indent
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -77,7 +77,7 @@ class QuestionHelper extends Helper
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the helper's input stream
|
||||
* Returns the helper's input stream.
|
||||
*
|
||||
* @return resource
|
||||
*/
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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) {
|
||||
|
@ -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()),
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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)
|
||||
|
@ -216,7 +216,7 @@ class YamlDumper extends Dumper
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps callable to YAML format
|
||||
* Dumps callable to YAML format.
|
||||
*
|
||||
* @param callable $callable
|
||||
*
|
||||
|
@ -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.');
|
||||
}
|
||||
}
|
||||
|
@ -355,7 +355,7 @@ class Form extends Link implements \ArrayAccess
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables validation
|
||||
* Disables validation.
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
|
@ -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);
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ class TokenStream
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if end of stream was reached
|
||||
* Checks if end of stream was reached.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -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>
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -34,6 +34,7 @@ class LockHandler
|
||||
/**
|
||||
* @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
|
||||
*
|
||||
* @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()
|
||||
{
|
||||
|
@ -336,8 +336,6 @@ class Button implements \IteratorAggregate, FormInterface
|
||||
|
||||
/**
|
||||
* Unsupported method.
|
||||
*
|
||||
* @return null Always returns null
|
||||
*/
|
||||
public function getTransformationFailure()
|
||||
{
|
||||
|
@ -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[]
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@ namespace Symfony\Component\Form\Deprecated;
|
||||
|
||||
/**
|
||||
* @deprecated since version 2.7, to be removed in 3.0.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class FormEvents
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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>
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -21,6 +21,7 @@ use Symfony\Component\Form\ResolvedFormTypeInterface;
|
||||
* instances.
|
||||
*
|
||||
* @since 2.4
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
*/
|
||||
class ResolvedTypeFactoryDataCollectorProxy implements ResolvedFormTypeFactoryInterface
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
|
@ -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;
|
||||
|
@ -15,6 +15,7 @@ use Symfony\Component\Validator\Validation;
|
||||
|
||||
/**
|
||||
* @since 2.5.3
|
||||
*
|
||||
* @author Bernhard Schussek <bschussek@gmail.com>
|
||||
* @group legacy
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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.');
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ class LegacyPdoSessionHandler implements \SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a PDO instance
|
||||
* Return a PDO instance.
|
||||
*
|
||||
* @return \PDO
|
||||
*/
|
||||
|
@ -108,7 +108,7 @@ class MemcacheSessionHandler implements \SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a Memcache instance
|
||||
* Return a Memcache instance.
|
||||
*
|
||||
* @return \Memcache
|
||||
*/
|
||||
|
@ -114,7 +114,7 @@ class MemcachedSessionHandler implements \SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a Memcached instance
|
||||
* Return a Memcached instance.
|
||||
*
|
||||
* @return \Memcached
|
||||
*/
|
||||
|
@ -177,7 +177,7 @@ class MongoDbSessionHandler implements \SessionHandlerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a Mongo instance
|
||||
* Return a Mongo instance.
|
||||
*
|
||||
* @return \Mongo
|
||||
*/
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ class ControllerResolver implements ControllerResolverInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an instantiated controller
|
||||
* Returns an instantiated controller.
|
||||
*
|
||||
* @param string $class A class name
|
||||
*
|
||||
|
@ -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)) {
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -156,6 +156,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
||||
* Gets the Surrogate instance.
|
||||
*
|
||||
* @throws \LogicException
|
||||
*
|
||||
* @return SurrogateInterface A Surrogate instance
|
||||
*/
|
||||
public function getSurrogate()
|
||||
|
@ -45,7 +45,7 @@ class ResponseCacheStrategy implements ResponseCacheStrategyInterface
|
||||
$this->maxAges[] = $response->getMaxAge();
|
||||
}
|
||||
|
||||
$this->embeddedResponses++;
|
||||
++$this->embeddedResponses;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
interface SurrogateInterface
|
||||
{
|
||||
/**
|
||||
* Returns surrogate name
|
||||
* Returns surrogate name.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -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>
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@ use Symfony\Component\HttpKernel\EventListener\DebugHandlersListener;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
|
||||
/**
|
||||
* DebugHandlersListenerTest
|
||||
* DebugHandlersListenerTest.
|
||||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
|
||||
use Symfony\Component\VarDumper\VarDumper;
|
||||
|
||||
/**
|
||||
* DumpListenerTest
|
||||
* DumpListenerTest.
|
||||
*
|
||||
* @author Nicolas Grekas <p@tchwork.com>
|
||||
*/
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -765,7 +765,7 @@ EOF;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a mock for the BundleInterface
|
||||
* Returns a mock for the BundleInterface.
|
||||
*
|
||||
* @return BundleInterface
|
||||
*/
|
||||
|
@ -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')));
|
||||
|
@ -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)
|
||||
|
@ -54,7 +54,7 @@ abstract class AbstractPipes implements PipesInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Unblocks streams
|
||||
* Unblocks streams.
|
||||
*/
|
||||
protected function unblock()
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
@ -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()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user