diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index e0dcaae6c2..c3b7588e95 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -27,13 +27,14 @@ use Symfony\Component\Security\Core\Exception\TokenNotFoundException; * and to do the conversion of the datetime column. * * In order to use this class, you need the following table in your database: - * CREATE TABLE `rememberme_token` ( - * `series` char(88) UNIQUE PRIMARY KEY NOT NULL, - * `value` char(88) NOT NULL, - * `lastUsed` datetime NOT NULL, - * `class` varchar(100) NOT NULL, - * `username` varchar(200) NOT NULL - * ); + * + * CREATE TABLE `rememberme_token` ( + * `series` char(88) UNIQUE PRIMARY KEY NOT NULL, + * `value` char(88) NOT NULL, + * `lastUsed` datetime NOT NULL, + * `class` varchar(100) NOT NULL, + * `username` varchar(200) NOT NULL + * ); */ class DoctrineTokenProvider implements TokenProviderInterface { diff --git a/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php b/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php index 7cdbb77b43..a4d7d6f690 100644 --- a/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php +++ b/src/Symfony/Bridge/Twig/TokenParser/DumpTokenParser.php @@ -19,11 +19,10 @@ use Twig\TokenParser\AbstractTokenParser; * Token Parser for the 'dump' tag. * * Dump variables with: - *
- *  {% dump %}
- *  {% dump foo %}
- *  {% dump foo, bar %}
- * 
+ * + * {% dump %} + * {% dump foo %} + * {% dump foo, bar %} * * @author Julien Galenski */ diff --git a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php index fec5b72a5b..869e5b4679 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php +++ b/src/Symfony/Bundle/FrameworkBundle/Kernel/MicroKernelTrait.php @@ -38,17 +38,17 @@ trait MicroKernelTrait * * You can register extensions: * - * $c->loadFromExtension('framework', array( - * 'secret' => '%secret%' - * )); + * $c->loadFromExtension('framework', array( + * 'secret' => '%secret%' + * )); * * Or services: * - * $c->register('halloween', 'FooBundle\HalloweenProvider'); + * $c->register('halloween', 'FooBundle\HalloweenProvider'); * * Or parameters: * - * $c->setParameter('halloween', 'lot of fun'); + * $c->setParameter('halloween', 'lot of fun'); * * @param ContainerBuilder $c * @param LoaderInterface $loader diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php index fd9da17ef2..091b5d10f8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @@ -232,18 +232,14 @@ class FormHelper extends Helper * Use this helper for CSRF protection without the overhead of creating a * form. * - * - * echo $view['form']->csrfToken('rm_user_'.$user->getId()); - * + * echo $view['form']->csrfToken('rm_user_'.$user->getId()); * * Check the token in your action using the same intention. * - * - * $csrfProvider = $this->get('security.csrf.token_generator'); - * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { - * throw new \RuntimeException('CSRF attack detected.'); - * } - * + * $csrfProvider = $this->get('security.csrf.token_generator'); + * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { + * throw new \RuntimeException('CSRF attack detected.'); + * } * * @param string $intention The intention of the protected action * diff --git a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php index 6af4a61e47..91e98eaeb3 100644 --- a/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php +++ b/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php @@ -342,27 +342,31 @@ class PrototypedArrayNode extends ArrayNode * one is same as this->keyAttribute and the other is 'value', then the prototype will be different. * * For example, assume $this->keyAttribute is 'name' and the value array is as follows: - * array( + * * array( - * 'name' => 'name001', - * 'value' => 'value001' + * array( + * 'name' => 'name001', + * 'value' => 'value001' + * ) * ) - * ) * * Now, the key is 0 and the child node is: - * array( - * 'name' => 'name001', - * 'value' => 'value001' - * ) + * + * array( + * 'name' => 'name001', + * 'value' => 'value001' + * ) * * When normalizing the value array, the 'name' element will removed from the child node * and its value becomes the new key of the child node: - * array( - * 'name001' => array('value' => 'value001') - * ) + * + * array( + * 'name001' => array('value' => 'value001') + * ) * * Now only 'value' element is left in the child node which can be further simplified into a string: - * array('name001' => 'value001') + * + * array('name001' => 'value001') * * Now, the key becomes 'name001' and the child node becomes 'value001' and * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance. diff --git a/src/Symfony/Component/Console/Helper/Table.php b/src/Symfony/Component/Console/Helper/Table.php index ce5a819e14..f3fc3b0b0a 100644 --- a/src/Symfony/Component/Console/Helper/Table.php +++ b/src/Symfony/Component/Console/Helper/Table.php @@ -224,15 +224,14 @@ class Table * Renders table to output. * * Example: - * - * +---------------+-----------------------+------------------+ - * | ISBN | Title | Author | - * +---------------+-----------------------+------------------+ - * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | - * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | - * +---------------+-----------------------+------------------+ - * + * + * +---------------+-----------------------+------------------+ + * | ISBN | Title | Author | + * +---------------+-----------------------+------------------+ + * | 99921-58-10-7 | Divine Comedy | Dante Alighieri | + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | + * +---------------+-----------------------+------------------+ */ public function render() { @@ -266,7 +265,9 @@ class Table /** * Renders horizontal header separator. * - * Example: +-----+-----------+-------+ + * Example: + * + * +-----+-----------+-------+ */ private function renderRowSeparator() { @@ -297,7 +298,9 @@ class Table /** * Renders table row. * - * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | + * Example: + * + * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * * @param array $row * @param string $cellFormat diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index dc6e2701f1..72f784cebb 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -23,8 +23,8 @@ use Symfony\Component\Console\Output\BufferedOutput; * Usage: * * $definition = new InputDefinition(array( - * new InputArgument('name', InputArgument::REQUIRED), - * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), + * new InputArgument('name', InputArgument::REQUIRED), + * new InputOption('foo', 'f', InputOption::VALUE_REQUIRED), * )); * * @author Fabien Potencier diff --git a/src/Symfony/Component/Console/Output/StreamOutput.php b/src/Symfony/Component/Console/Output/StreamOutput.php index 20f4508283..47da3270f1 100644 --- a/src/Symfony/Component/Console/Output/StreamOutput.php +++ b/src/Symfony/Component/Console/Output/StreamOutput.php @@ -20,11 +20,11 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; * * Usage: * - * $output = new StreamOutput(fopen('php://stdout', 'w')); + * $output = new StreamOutput(fopen('php://stdout', 'w')); * * As `StreamOutput` can use any stream, you can also use a file: * - * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); + * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); * * @author Fabien Potencier */ diff --git a/src/Symfony/Component/CssSelector/CssSelector.php b/src/Symfony/Component/CssSelector/CssSelector.php index b4ac866b05..c1f8c88829 100644 --- a/src/Symfony/Component/CssSelector/CssSelector.php +++ b/src/Symfony/Component/CssSelector/CssSelector.php @@ -17,7 +17,7 @@ namespace Symfony\Component\CssSelector; * CssSelector is the main entry point of the component and can convert CSS * selectors to XPath expressions. * - * $xpath = CssSelector::toXpath('h1.foo'); + * $xpath = CssSelector::toXpath('h1.foo'); * * This component is a port of the Python cssselect library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 00b34b5968..25532ead23 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -33,11 +33,9 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; * A service can also be defined by creating a method named * getXXXService(), where XXX is the camelized version of the id: * - *
    - *
  • request -> getRequestService()
  • - *
  • mysql_session_storage -> getMysqlSessionStorageService()
  • - *
  • symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService()
  • - *
+ * * request -> getRequestService() + * * mysql_session_storage -> getMysqlSessionStorageService() + * * symfony.mysql_session_storage -> getSymfony_MysqlSessionStorageService() * * The container can have three possible behaviors when a service does not exist: * diff --git a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php index dc09a65820..c31eeea417 100644 --- a/src/Symfony/Component/DependencyInjection/ContainerBuilder.php +++ b/src/Symfony/Component/DependencyInjection/ContainerBuilder.php @@ -493,10 +493,10 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * the parameters passed to the container constructor to have precedence * over the loaded ones. * - * $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); - * $loader = new LoaderXXX($container); - * $loader->load('resource_name'); - * $container->register('foo', 'stdClass'); + * $container = new ContainerBuilder(new ParameterBag(array('foo' => 'bar'))); + * $loader = new LoaderXXX($container); + * $loader->load('resource_name'); + * $container->register('foo', 'stdClass'); * * In the above example, even if the loaded resource defines a foo * parameter, the value will still be 'bar' as defined in the ContainerBuilder @@ -999,14 +999,14 @@ class ContainerBuilder extends Container implements TaggedContainerInterface * * Example: * - * $container->register('foo')->addTag('my.tag', array('hello' => 'world')); + * $container->register('foo')->addTag('my.tag', array('hello' => 'world')); * - * $serviceIds = $container->findTaggedServiceIds('my.tag'); - * foreach ($serviceIds as $serviceId => $tags) { - * foreach ($tags as $tag) { - * echo $tag['hello']; + * $serviceIds = $container->findTaggedServiceIds('my.tag'); + * foreach ($serviceIds as $serviceId => $tags) { + * foreach ($tags as $tag) { + * echo $tag['hello']; + * } * } - * } * * @param string $name The tag name * diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 565a224312..afcfbe8cb8 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -579,7 +579,7 @@ class Crawler extends \SplObjectStorage * * Example: * - * $crawler->filter('h1 a')->extract(array('_text', 'href')); + * $crawler->filter('h1 a')->extract(array('_text', 'href')); * * @param array $attributes An array of attributes * @@ -787,7 +787,7 @@ class Crawler extends \SplObjectStorage * Escaped characters are: quotes (") and apostrophe ('). * * Examples: - * + * * echo Crawler::xpathLiteral('foo " bar'); * //prints 'foo " bar' * @@ -796,7 +796,7 @@ class Crawler extends \SplObjectStorage * * echo Crawler::xpathLiteral('a\'b"c'); * //prints concat('a', "'", 'b"c') - * + * * * @param string $s String to be escaped * diff --git a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php index d2acb15ada..6398cc6069 100644 --- a/src/Symfony/Component/DomCrawler/FormFieldRegistry.php +++ b/src/Symfony/Component/DomCrawler/FormFieldRegistry.php @@ -186,9 +186,7 @@ class FormFieldRegistry /** * Splits a field name into segments as a web browser would do. * - * * getSegments('base[foo][3][]') = array('base', 'foo, '3', ''); - * * * @param string $name The name of the field * diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php index 757760cf3e..1ee9017356 100644 --- a/src/Symfony/Component/Finder/Finder.php +++ b/src/Symfony/Component/Finder/Finder.php @@ -36,7 +36,7 @@ use Symfony\Component\Finder\Iterator\SortableIterator; * * All methods return the current Finder object to allow easy chaining: * - * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); + * $finder = Finder::create()->files()->name('*.php')->in(__DIR__); * * @author Fabien Potencier */ @@ -215,8 +215,8 @@ class Finder implements \IteratorAggregate, \Countable * * Usage: * - * $finder->depth('> 1') // the Finder will start matching at level 1. - * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. + * $finder->depth('> 1') // the Finder will start matching at level 1. + * $finder->depth('< 3') // the Finder will descend at most 3 levels of directories below the starting point. * * @param string|int $level The depth level expression * @@ -237,10 +237,10 @@ class Finder implements \IteratorAggregate, \Countable * * The date must be something that strtotime() is able to parse: * - * $finder->date('since yesterday'); - * $finder->date('until 2 days ago'); - * $finder->date('> now - 2 hours'); - * $finder->date('>= 2005-10-15'); + * $finder->date('since yesterday'); + * $finder->date('until 2 days ago'); + * $finder->date('> now - 2 hours'); + * $finder->date('>= 2005-10-15'); * * @param string $date A date range string * @@ -262,9 +262,9 @@ class Finder implements \IteratorAggregate, \Countable * * You can use patterns (delimited with / sign), globs or simple strings. * - * $finder->name('*.php') - * $finder->name('/\.php$/') // same as above - * $finder->name('test.php') + * $finder->name('*.php') + * $finder->name('/\.php$/') // same as above + * $finder->name('test.php') * * @param string $pattern A pattern (a regexp, a glob, or a string) * @@ -300,8 +300,8 @@ class Finder implements \IteratorAggregate, \Countable * * Strings or PCRE patterns can be used: * - * $finder->contains('Lorem ipsum') - * $finder->contains('/Lorem ipsum/i') + * $finder->contains('Lorem ipsum') + * $finder->contains('/Lorem ipsum/i') * * @param string $pattern A pattern (string or regexp) * @@ -321,8 +321,8 @@ class Finder implements \IteratorAggregate, \Countable * * Strings or PCRE patterns can be used: * - * $finder->notContains('Lorem ipsum') - * $finder->notContains('/Lorem ipsum/i') + * $finder->notContains('Lorem ipsum') + * $finder->notContains('/Lorem ipsum/i') * * @param string $pattern A pattern (string or regexp) * @@ -342,8 +342,8 @@ class Finder implements \IteratorAggregate, \Countable * * You can use patterns (delimited with / sign) or simple strings. * - * $finder->path('some/special/dir') - * $finder->path('/some\/special\/dir/') // same as above + * $finder->path('some/special/dir') + * $finder->path('/some\/special\/dir/') // same as above * * Use only / as dirname separator. * @@ -365,8 +365,8 @@ class Finder implements \IteratorAggregate, \Countable * * You can use patterns (delimited with / sign) or simple strings. * - * $finder->notPath('some/special/dir') - * $finder->notPath('/some\/special\/dir/') // same as above + * $finder->notPath('some/special/dir') + * $finder->notPath('/some\/special\/dir/') // same as above * * Use only / as dirname separator. * @@ -386,9 +386,9 @@ class Finder implements \IteratorAggregate, \Countable /** * Adds tests for file sizes. * - * $finder->size('> 10K'); - * $finder->size('<= 1Ki'); - * $finder->size(4); + * $finder->size('> 10K'); + * $finder->size('<= 1Ki'); + * $finder->size(4); * * @param string|int $size A size range string or an integer * diff --git a/src/Symfony/Component/Finder/Glob.php b/src/Symfony/Component/Finder/Glob.php index 2e56cf2800..e2988f2576 100644 --- a/src/Symfony/Component/Finder/Glob.php +++ b/src/Symfony/Component/Finder/Glob.php @@ -14,14 +14,14 @@ namespace Symfony\Component\Finder; /** * Glob matches globbing patterns against text. * - * if match_glob("foo.*", "foo.bar") echo "matched\n"; + * if match_glob("foo.*", "foo.bar") echo "matched\n"; * - * // prints foo.bar and foo.baz - * $regex = glob_to_regex("foo.*"); - * for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t) - * { - * if (/$regex/) echo "matched: $car\n"; - * } + * // prints foo.bar and foo.baz + * $regex = glob_to_regex("foo.*"); + * for (array('foo.bar', 'foo.baz', 'foo', 'bar') as $t) + * { + * if (/$regex/) echo "matched: $car\n"; + * } * * Glob implements glob(3) style matching that can be used to match * against text, rather than fetching names from a filesystem. diff --git a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php index b51a5a575f..3a0168d170 100644 --- a/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php +++ b/src/Symfony/Component/Form/ChoiceList/ArrayKeyChoiceList.php @@ -29,16 +29,14 @@ use Symfony\Component\Form\Exception\InvalidArgumentException; * * Example: * - * ```php - * $choices = array('' => 'Don\'t know', 0 => 'No', 1 => 'Yes'); - * $choiceList = new ArrayKeyChoiceList(array_keys($choices)); + * $choices = array('' => 'Don\'t know', 0 => 'No', 1 => 'Yes'); + * $choiceList = new ArrayKeyChoiceList(array_keys($choices)); * - * $values = $choiceList->getValues() - * // => array('', '0', '1') + * $values = $choiceList->getValues() + * // => array('', '0', '1') * - * $selectedValues = $choiceList->getValuesForChoices(array(true)); - * // => array('1') - * ``` + * $selectedValues = $choiceList->getValuesForChoices(array(true)); + * // => array('1') * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php index 146669b27f..ee749ca029 100644 --- a/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php +++ b/src/Symfony/Component/Form/ChoiceList/Factory/PropertyAccessDecorator.php @@ -24,18 +24,14 @@ use Symfony\Component\PropertyAccess\PropertyPath; * * Pass the decorated factory to the constructor: * - * ```php - * $decorator = new PropertyAccessDecorator($factory); - * ``` + * $decorator = new PropertyAccessDecorator($factory); * * You can now pass property paths for generating choice values, labels, view * indices, HTML attributes and for determining the preferred choices and the * choice groups: * - * ```php - * // extract values from the $value property - * $list = $createListFromChoices($objects, 'value'); - * ``` + * // extract values from the $value property + * $list = $createListFromChoices($objects, 'value'); * * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php index 8e4695011f..ec3857aa87 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php @@ -28,11 +28,9 @@ use Symfony\Component\Form\FormConfigBuilder; * can be stored in the array key pointing to the nested array. The topmost * level of the hierarchy may also be a \Traversable. * - * - * $choices = array(true, false); - * $labels = array('Agree', 'Disagree'); - * $choiceList = new ArrayChoiceList($choices, $labels); - * + * $choices = array(true, false); + * $labels = array('Agree', 'Disagree'); + * $choiceList = new ArrayChoiceList($choices, $labels); * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php index 67a783284f..265d85691a 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php @@ -26,12 +26,10 @@ use Symfony\Component\PropertyAccess\PropertyPath; * Supports generation of choice labels, choice groups and choice values * by calling getters of the object (or associated objects). * - * - * $choices = array($user1, $user2); + * $choices = array($user1, $user2); * - * // call getName() to determine the choice labels - * $choiceList = new ObjectChoiceList($choices, 'name'); - * + * // call getName() to determine the choice labels + * $choiceList = new ObjectChoiceList($choices, 'name'); * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php index 7255b1254e..47500045ed 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/SimpleChoiceList.php @@ -22,12 +22,10 @@ namespace Symfony\Component\Form\Extension\Core\ChoiceList; * creating nested arrays. The title of the sub-hierarchy can be stored in the * array key pointing to the nested array. * - * - * $choiceList = new SimpleChoiceList(array( - * 'creditcard' => 'Credit card payment', - * 'cash' => 'Cash payment', - * )); - * + * $choiceList = new SimpleChoiceList(array( + * 'creditcard' => 'Credit card payment', + * 'cash' => 'Cash payment', + * )); * * @author Bernhard Schussek * diff --git a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php index 805150f2d1..19020c7a69 100644 --- a/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php +++ b/src/Symfony/Component/Form/Extension/Validator/ViolationMapper/ViolationPath.php @@ -198,9 +198,7 @@ class ViolationPath implements \IteratorAggregate, PropertyPathInterface * * Consider the following violation path: * - * - * children[address].children[office].data.street - * + * children[address].children[office].data.street * * In this example, "address" and "office" map to forms, while * "street does not. diff --git a/src/Symfony/Component/Form/FormRendererEngineInterface.php b/src/Symfony/Component/Form/FormRendererEngineInterface.php index e2300ef5a2..d283837432 100644 --- a/src/Symfony/Component/Form/FormRendererEngineInterface.php +++ b/src/Symfony/Component/Form/FormRendererEngineInterface.php @@ -53,11 +53,9 @@ interface FormRendererEngineInterface * and continues with the child of that root, the child of that child etc. * The following is an example for a block hierarchy: * - * - * form_widget - * text_widget - * url_widget - * + * form_widget + * text_widget + * url_widget * * In this example, "url_widget" is the most specific block, while the other * blocks are its ancestors in the hierarchy. @@ -91,11 +89,9 @@ interface FormRendererEngineInterface * and continues with the child of that root, the child of that child etc. * The following is an example for a block hierarchy: * - * - * form_widget - * text_widget - * url_widget - * + * form_widget + * text_widget + * url_widget * * The second parameter $hierarchyLevel determines the level of the hierarchy * that should be rendered. diff --git a/src/Symfony/Component/Form/FormRendererInterface.php b/src/Symfony/Component/Form/FormRendererInterface.php index f0f51e4f59..edddeff5b7 100644 --- a/src/Symfony/Component/Form/FormRendererInterface.php +++ b/src/Symfony/Component/Form/FormRendererInterface.php @@ -69,18 +69,14 @@ interface FormRendererInterface * Use this helper for CSRF protection without the overhead of creating a * form. * - * - * - * + * * * Check the token in your action using the same token ID. * - * - * $csrfProvider = $this->get('security.csrf.token_generator'); - * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { - * throw new \RuntimeException('CSRF attack detected.'); - * } - * + * $csrfProvider = $this->get('security.csrf.token_generator'); + * if (!$csrfProvider->isCsrfTokenValid('rm_user_'.$user->getId(), $token)) { + * throw new \RuntimeException('CSRF attack detected.'); + * } * * @param string $tokenId The ID of the CSRF token * diff --git a/src/Symfony/Component/Form/Forms.php b/src/Symfony/Component/Form/Forms.php index 2a47513f61..079ceda750 100644 --- a/src/Symfony/Component/Form/Forms.php +++ b/src/Symfony/Component/Form/Forms.php @@ -18,29 +18,25 @@ use Symfony\Component\Form\Extension\Core\CoreExtension; * * Use this class to conveniently create new form factories: * - * - * use Symfony\Component\Form\Forms; + * use Symfony\Component\Form\Forms; * - * $formFactory = Forms::createFormFactory(); + * $formFactory = Forms::createFormFactory(); * - * $form = $formFactory->createBuilder() - * ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') - * ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') - * ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( - * 'choices' => array('Male' => 'm', 'Female' => 'f'), - * 'choices_as_values' => true, - * )) - * ->getForm(); - * + * $form = $formFactory->createBuilder() + * ->add('firstName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + * ->add('lastName', 'Symfony\Component\Form\Extension\Core\Type\TextType') + * ->add('age', 'Symfony\Component\Form\Extension\Core\Type\IntegerType') + * ->add('gender', 'Symfony\Component\Form\Extension\Core\Type\ChoiceType', array( + * 'choices' => array('Male' => 'm', 'Female' => 'f'), + * 'choices_as_values' => true, + * )) + * ->getForm(); * * You can also add custom extensions to the form factory: * - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new AcmeExtension()) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new AcmeExtension()) + * ->getFormFactory(); * * If you create custom form types or type extensions, it is * generally recommended to create your own extensions that lazily @@ -48,54 +44,46 @@ use Symfony\Component\Form\Extension\Core\CoreExtension; * does not matter that much, you can also pass them directly to the * form factory: * - * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addType(new PersonType()) - * ->addType(new PhoneNumberType()) - * ->addTypeExtension(new FormTypeHelpTextExtension()) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addType(new PersonType()) + * ->addType(new PhoneNumberType()) + * ->addTypeExtension(new FormTypeHelpTextExtension()) + * ->getFormFactory(); * * Support for the Validator component is provided by ValidatorExtension. * This extension needs a validator object to function properly: * - * - * use Symfony\Component\Validator\Validation; - * use Symfony\Component\Form\Extension\Validator\ValidatorExtension; + * use Symfony\Component\Validator\Validation; + * use Symfony\Component\Form\Extension\Validator\ValidatorExtension; * - * $validator = Validation::createValidator(); - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new ValidatorExtension($validator)) - * ->getFormFactory(); - * + * $validator = Validation::createValidator(); + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new ValidatorExtension($validator)) + * ->getFormFactory(); * * Support for the Templating component is provided by TemplatingExtension. * This extension needs a PhpEngine object for rendering forms. As second * argument you should pass the names of the default themes. Here is an * example for using the default layout with "
" tags: * - * - * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; + * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new TemplatingExtension($engine, null, array( - * 'FrameworkBundle:Form', - * ))) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new TemplatingExtension($engine, null, array( + * 'FrameworkBundle:Form', + * ))) + * ->getFormFactory(); * * The next example shows how to include the "" layout: * - * - * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; + * use Symfony\Component\Form\Extension\Templating\TemplatingExtension; * - * $formFactory = Forms::createFormFactoryBuilder() - * ->addExtension(new TemplatingExtension($engine, null, array( - * 'FrameworkBundle:Form', - * 'FrameworkBundle:FormTable', - * ))) - * ->getFormFactory(); - * + * $formFactory = Forms::createFormFactoryBuilder() + * ->addExtension(new TemplatingExtension($engine, null, array( + * 'FrameworkBundle:Form', + * 'FrameworkBundle:FormTable', + * ))) + * ->getFormFactory(); * * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index be9d44ed05..9c1d458d89 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -360,11 +360,9 @@ class OptionsResolver implements Options, OptionsResolverInterface * * The normalizer should be a closure with the following signature: * - * ```php - * function (Options $options, $value) { - * // ... - * } - * ``` + * function (Options $options, $value) { + * // ... + * } * * The closure is invoked when {@link resolve()} is called. The closure * has access to the resolved values of other options through the passed diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php index 24f343e026..156cc751e7 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php @@ -29,10 +29,8 @@ interface OptionsResolverInterface * evaluate the option value lazily. These closures must have one * of the following signatures: * - * - * function (Options $options) - * function (Options $options, $value) - * + * function (Options $options) + * function (Options $options, $value) * * The second parameter passed to the closure is the previously * set default value, in case you are overwriting an existing @@ -154,9 +152,7 @@ interface OptionsResolverInterface * * The normalizers should be closures with the following signature: * - * - * function (Options $options, $value) - * + * function (Options $options, $value) * * The second parameter passed to the closure is the value of * the option. diff --git a/src/Symfony/Component/Process/PhpProcess.php b/src/Symfony/Component/Process/PhpProcess.php index 6bf6bb6749..31a855d943 100644 --- a/src/Symfony/Component/Process/PhpProcess.php +++ b/src/Symfony/Component/Process/PhpProcess.php @@ -16,9 +16,9 @@ use Symfony\Component\Process\Exception\RuntimeException; /** * PhpProcess runs a PHP script in an independent process. * - * $p = new PhpProcess(''); - * $p->run(); - * print $p->getOutput()."\n"; + * $p = new PhpProcess(''); + * $p->run(); + * print $p->getOutput()."\n"; * * @author Fabien Potencier */ diff --git a/src/Symfony/Component/Routing/RouteCollectionBuilder.php b/src/Symfony/Component/Routing/RouteCollectionBuilder.php index 4503eca5a8..34b2abc5bf 100644 --- a/src/Symfony/Component/Routing/RouteCollectionBuilder.php +++ b/src/Symfony/Component/Routing/RouteCollectionBuilder.php @@ -46,7 +46,7 @@ class RouteCollectionBuilder /** * Import an external routing resource and returns the RouteCollectionBuilder. * - * $routes->import('blog.yml', '/blog'); + * $routes->import('blog.yml', '/blog'); * * @param mixed $resource * @param string|null $prefix diff --git a/src/Symfony/Component/Security/Core/User/UserInterface.php b/src/Symfony/Component/Security/Core/User/UserInterface.php index 747884282d..613db8ecc0 100644 --- a/src/Symfony/Component/Security/Core/User/UserInterface.php +++ b/src/Symfony/Component/Security/Core/User/UserInterface.php @@ -36,12 +36,10 @@ interface UserInterface /** * Returns the roles granted to the user. * - * - * public function getRoles() - * { - * return array('ROLE_USER'); - * } - * + * public function getRoles() + * { + * return array('ROLE_USER'); + * } * * Alternatively, the roles might be stored on a ``roles`` property, * and populated in any number of different ways when the user object diff --git a/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php b/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php index 307d70f9e9..3cafddcdaa 100644 --- a/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php +++ b/src/Symfony/Component/Security/Guard/GuardAuthenticatorInterface.php @@ -40,18 +40,18 @@ interface GuardAuthenticatorInterface extends AuthenticationEntryPointInterface * * For example, for a form login, you might: * - * if ($request->request->has('_username')) { - * return array( - * 'username' => $request->request->get('_username'), - * 'password' => $request->request->get('_password'), - * ); - * } else { - * return; - * } + * if ($request->request->has('_username')) { + * return array( + * 'username' => $request->request->get('_username'), + * 'password' => $request->request->get('_password'), + * ); + * } else { + * return; + * } * * Or for an API token that's on a header, you might use: * - * return array('api_key' => $request->headers->get('X-API-TOKEN')); + * return array('api_key' => $request->headers->get('X-API-TOKEN')); * * @param Request $request * diff --git a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php index f9484e0a6c..c37a0e4875 100644 --- a/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php +++ b/src/Symfony/Component/Security/Http/EntryPoint/AuthenticationEntryPointInterface.php @@ -31,10 +31,14 @@ interface AuthenticationEntryPointInterface * response that "helps" the user start into the authentication process. * * Examples: - * A) For a form login, you might redirect to the login page - * return new RedirectResponse('/login'); - * B) For an API token authentication system, you return a 401 response - * return new Response('Auth header required', 401); + * + * - For a form login, you might redirect to the login page + * + * return new RedirectResponse('/login'); + * + * - For an API token authentication system, you return a 401 response + * + * return new Response('Auth header required', 401); * * @param Request $request The request that resulted in an AuthenticationException * @param AuthenticationException $authException The exception that started the authentication process diff --git a/src/Symfony/Component/Serializer/Serializer.php b/src/Symfony/Component/Serializer/Serializer.php index 1214771eb1..f935d1db35 100644 --- a/src/Symfony/Component/Serializer/Serializer.php +++ b/src/Symfony/Component/Serializer/Serializer.php @@ -26,9 +26,9 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; * objects are turned into arrays by normalizers. * arrays are turned into various output formats by encoders. * - * $serializer->serialize($obj, 'xml') - * $serializer->decode($data, 'xml') - * $serializer->denormalize($data, 'Class', 'xml') + * $serializer->serialize($obj, 'xml') + * $serializer->decode($data, 'xml') + * $serializer->denormalize($data, 'Class', 'xml') * * @author Jordi Boggiano * @author Johannes M. Schmitt diff --git a/src/Symfony/Component/Templating/Helper/AssetsHelper.php b/src/Symfony/Component/Templating/Helper/AssetsHelper.php index 363b4aa6d1..43f62c19c5 100644 --- a/src/Symfony/Component/Templating/Helper/AssetsHelper.php +++ b/src/Symfony/Component/Templating/Helper/AssetsHelper.php @@ -21,9 +21,7 @@ use Symfony\Component\Templating\Asset\UrlPackage; * * Usage: * - * - * - * + * * * @author Fabien Potencier * @author Kris Wallsmith diff --git a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php index a246a1b522..b8b0a9a70d 100644 --- a/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php +++ b/src/Symfony/Component/Templating/Helper/CoreAssetsHelper.php @@ -20,9 +20,7 @@ use Symfony\Component\Templating\Asset\PackageInterface; * * Usage: * - * - * - * + * * * @author Fabien Potencier * @author Kris Wallsmith diff --git a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php index 4f0e26fa97..0a94476ab7 100644 --- a/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php +++ b/src/Symfony/Component/Translation/Catalogue/AbstractOperation.php @@ -37,21 +37,20 @@ abstract class AbstractOperation implements OperationInterface * This array stores 'all', 'new' and 'obsolete' messages for all valid domains. * * The data structure of this array is as follows: - * ```php - * array( - * 'domain 1' => array( - * 'all' => array(...), - * 'new' => array(...), - * 'obsolete' => array(...) - * ), - * 'domain 2' => array( - * 'all' => array(...), - * 'new' => array(...), - * 'obsolete' => array(...) - * ), - * ... - * ) - * ``` + * + * array( + * 'domain 1' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * 'domain 2' => array( + * 'all' => array(...), + * 'new' => array(...), + * 'obsolete' => array(...) + * ), + * ... + * ) * * @var array The array that stores 'all', 'new' and 'obsolete' messages */ diff --git a/src/Symfony/Component/Validator/ConstraintViolationInterface.php b/src/Symfony/Component/Validator/ConstraintViolationInterface.php index 9889b92fe3..0ab53b0fef 100644 --- a/src/Symfony/Component/Validator/ConstraintViolationInterface.php +++ b/src/Symfony/Component/Validator/ConstraintViolationInterface.php @@ -19,11 +19,9 @@ namespace Symfony\Component\Validator; * element in the validation graph and the root element that was originally * passed to the validator. For example, take the following graph: * - *
- * (Person)---(firstName: string)
- *      \
- *   (address: Address)---(street: string)
- * 
+ * (Person)---(firstName: string) + * \ + * (address: Address)---(street: string) * * If the Person object is validated and validation fails for the * "firstName" property, the generated violation has the Person diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 2f352fa680..08979cb964 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -16,21 +16,17 @@ namespace Symfony\Component\Validator; * * For example, let's validate the following object graph: * - *
- * (Person)---($firstName: string)
- *      \
- *   ($address: Address)---($street: string)
- * 
+ * (Person)---($firstName: string) + * \ + * ($address: Address)---($street: string) * * We validate the Person instance, which becomes the "root" of the * validation run (see {@link getRoot}). The state of the context after the * first step will be like this: * - *
- * (Person)---($firstName: string)
- *    ^ \
- *   ($address: Address)---($street: string)
- * 
+ * (Person)---($firstName: string) + * ^ \ + * ($address: Address)---($street: string) * * The validator is stopped at the Person node, both the root and the * value (see {@link getValue}) of the context point to the Person @@ -41,11 +37,9 @@ namespace Symfony\Component\Validator; * After advancing to the property $firstName of the Person * instance, the state of the context looks like this: * - *
- * (Person)---($firstName: string)
- *      \              ^
- *   ($address: Address)---($street: string)
- * 
+ * (Person)---($firstName: string) + * \ ^ + * ($address: Address)---($street: string) * * The validator is stopped at the property $firstName. The root still * points to the Person instance, because this is where the validation @@ -56,12 +50,10 @@ namespace Symfony\Component\Validator; * $street property of the Address instance, the context state * looks like this: * - *
- * (Person)---($firstName: string)
- *      \
- *   ($address: Address)---($street: string)
- *                               ^
- * 
+ * (Person)---($firstName: string) + * \ + * ($address: Address)---($street: string) + * ^ * * The validator is stopped at the property $street. The root still * points to the Person instance, but the property path is now @@ -128,19 +120,14 @@ interface ExecutionContextInterface * argument which is appended to the current property path when a violation * is created. For example, take the following object graph: * - *
-     * (Person)---($address: Address)---($phoneNumber: PhoneNumber)
-     *                     ^
-     * 
+ * (Person)---($address: Address)---($phoneNumber: PhoneNumber) * * When the execution context stops at the Person instance, the * property path is "address". When you validate the PhoneNumber * instance now, pass "phoneNumber" as sub path to correct the property path * to "address.phoneNumber": * - *
-     * $context->validate($address->phoneNumber, 'phoneNumber');
-     * 
+ * $context->validate($address->phoneNumber, 'phoneNumber'); * * Any violations generated during the validation will be added to the * violation list that you can access with {@link getViolations}. @@ -167,19 +154,14 @@ interface ExecutionContextInterface * Use the parameter $subPath to adapt the property path for the * validated value. For example, take the following object graph: * - *
-     * (Person)---($address: Address)---($street: string)
-     *                     ^
-     * 
+ * (Person)---($address: Address)---($street: string) * * When the validator validates the Address instance, the * property path stored in the execution context is "address". When you * manually validate the property $street now, pass the sub path * "street" to adapt the full property path to "address.street": * - *
-     * $context->validate($address->street, new NotNull(), 'street');
-     * 
+ * $context->validate($address->street, new NotNull(), 'street'); * * @param mixed $value The value to validate * @param Constraint|Constraint[] $constraints The constraint(s) to validate against @@ -290,9 +272,7 @@ interface ExecutionContextInterface * * For example, take the following object graph: * - *
-     * (Person)---($address: Address)---($street: string)
-     * 
+ * (Person)---($address: Address)---($street: string) * * When the Person instance is passed to the validator, the * property path is initially empty. When the $address property diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 595fbef07f..3f93cba9ef 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -23,11 +23,10 @@ class Yaml /** * Parses YAML into a PHP value. * - * Usage: - * - * $array = Yaml::parse(file_get_contents('config.yml')); - * print_r($array); - * + * Usage: + * + * $array = Yaml::parse(file_get_contents('config.yml')); + * print_r($array); * * As this method accepts both plain strings and file names as an input, * you must validate the input before calling this method. Passing a file