8000 merged branch stephpy/cs_fixes (PR #4198) · symfony/symfony@cb905c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb905c5

Browse files
committed
merged branch stephpy/cs_fixes (PR #4198)
Commits ------- bc63fb2 Fix some cs Discussion ---------- Fix some cs --------------------------------------------------------------------------- by fabpot at 2012-05-03T21:13:33Z Can you squash your commits? Thanks. --------------------------------------------------------------------------- by stephpy at 2012-05-03T22:18:07Z It's ok
2 parents b49d611 + bc63fb2 commit cb905c5

File tree

10 files changed

+18
-14
lines changed

10 files changed

+18
-14
lines changed

src/Symfony/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract class AbstractDoctrineExtension extends Extension
3838
*/
3939
protected $drivers = array();
4040

41-
/*
41+
/**
4242
* @param array $objectManager A configured object manager.
4343
* @param ContainerBuilder $container A ContainerBuilder instance
4444
*/

src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/DoctrineValidationPass.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function process(ContainerBuilder $container)
4646
* files matching a doctrine search pattern (Resources/config/validation.orm.xml)
4747
*
4848
* @param ContainerBuilder $container
49+
* @param string $mapping
4950
* @param type $extension
5051
*/
5152
private function updateValidatorMappingFiles(ContainerBuilder $container, $mapping, $extension)

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ public function getDefaultOptions()
8787
* Return the default loader object.
8888
*
8989
* @param ObjectManager $manager
90-
* @param array $options
90+
* @param mixed $queryBuilder
91+
* @param string $class
9192
* @return EntityLoaderInterface
9293
*/
9394
abstract public function getLoader(ObjectManager $manager, $queryBuilder, $class);

src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ class EntityType extends DoctrineType
2020
* Return the default loader object.
2121
*
2222
* @param ObjectManager $manager
23-
* @param array $options
23+
* @param mixed $queryBuilder
24+
* @param string $class
2425
* @return ORMQueryBuilderLoader
2526
*/
2627
public function getLoader(ObjectManager $manager, $queryBuilder, $class)

src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private function outputLine($text, $indent = 0)
127127

128128
private function outputArray(array $array, $depth)
129129
{
130-
$is_indexed = array_values($array) === $array;
130+
$isIndexed = array_values($array) === $array;
131131

132132
foreach ($array as $key => $value) {
133133
if (is_array($value)) {
@@ -136,7 +136,7 @@ private function outputArray(array $array, $depth)
136136
$val = $value;
137137
}
138138

139-
if ($is_indexed) {
139+
if ($isIndexed) {
140140
$this->outputLine('- '.$val, $depth * 4);
141141
} else {
142142
$this->outputLine(sprintf('%-20s %s', $key.':', $val), $depth * 4);

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,18 @@ protected function execute(InputInterface $input, OutputInterface $output)
116116
$loader->loadMessages($bundleTransPath, $catalogue);
117117

118118
// show compiled list of messages
119-
if($input->getOption('dump-messages') === true){
119+
if ($input->getOption('dump-messages') === true) {
120120
foreach ($catalogue->getDomains() as $domain) {
121121
$output->writeln(sprintf("\nDisplaying messages for domain <info>%s</info>:\n", $domain));
122-
$output->writeln(Yaml::dump($catalogue->all($domain),10));
122+
$output->writeln(Yaml::dump($catalogue->all($domain), 10));
123123
}
124-
if($input->getOption('output-format') == 'xliff')
124+
if ($input->getOption('output-format') == 'xliff') {
125125
$output->writeln('Xliff output version is <info>1.2/info>');
126+
}
126127
}
127128

128129
// save the files
129-
if($input->getOption('force') === true) {
130+
if ($input->getOption('force') === true) {
130131
$output->writeln('Writing files');
131132
$writer->writeTranslations($catalogue, $input->getOption('output-format'), array('path' => $bundleTransPath));
132133
}

src/Symfony/Bundle/FrameworkBundle/Routing/DelegatingLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function load($resource, $type = null)
5656
{
5757
$collection = parent::load($resource, $type);
5858

59-
foreach ($collection->all() as $name => $route) {
59+
foreach ($collection->all() as $route) {
6060
if ($controller = $route->getDefault('_controller')) {
6161
try {
6262
$controller = $this->parser->parse($controller);

src/Symfony/Bundle/FrameworkBundle/Translation/PhpExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
100100
$message = '';
101101

102102
foreach ($sequence as $id => $item) {
103-
if($this->normalizeToken($tokens[$key + $id]) == $item) {
103+
if ($this->normalizeToken($tokens[$key + $id]) == $item) {
104104
continue;
105105
} elseif (self::MESSAGE_TOKEN == $item) {
106106
$message = $this->normalizeToken($tokens[$key + $id]);

src/Symfony/Bundle/FrameworkBundle/Translation/TranslationLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function addLoader($format, LoaderInterface $loader)
4747
*/
4848
public function loadMessages($directory, MessageCatalogue $catalogue)
4949
{
50-
foreach($this->loaders as $format => $loader) {
50+
foreach ($this->loaders as $format => $loader) {
5151
// load any existing translation files
5252
$finder = new Finder();
5353
$extension = $catalogue->getLocale().'.'.$format;

src/Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function __construct(\Iterator $iterator, array $matchPatterns, array $no
5151
*
5252
* @return Boolean Whether the given string is a regex
5353
*/
54-
protected function isRegex($str) {
55-
54+
protected function isRegex($str)
55+
{
5656
if (preg_match('/^(.{3,}?)[imsxuADU]*$/', $str, $m)) {
5757
$start = substr($m[1], 0, 1);
5858
$end = substr($m[1], -1);

0 commit comments

Comments
 (0)
0