8000 fixed CS · symfony/symfony@d34d50f · GitHub
[go: up one dir, main page]

Skip to content

Commit d34d50f

Browse files
committed
fixed CS
1 parent 99a96d3 commit d34d50f

34 files changed

+198
-192
lines changed

src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,4 +204,4 @@ private function createNewSession($id, $data = '')
204204

205205
return true;
206206
}
207-
}
207+
}

src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionStorageSchema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ private function addSessionTable()
3636
$table->addColumn('sess_time', 'integer')->setNotNull(true)->setUnsigned(true);
3737
$table->setPrimaryKey(array('sess_id'));
3838
}
39-
}
39+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public function isEnabled()
3737
if (!$router instanceof RouterInterface) {
3838
return false;
3939
}
40+
4041
return parent::isEnabled();
4142
}
4243

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function isEnabled()
3636
if (!$router instanceof RouterInterface) {
3737
return false;
3838
}
39+
3940
return parent::isEnabled();
4041
}
4142

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public function isEnabled()
3636
if (!$router instanceof RouterInterface) {
3737
return false;
3838
}
39+
3940
return parent::isEnabled();
4041
}
4142

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8181
// check presence of force or dump-message
8282
if ($input->getOption('force') !== true && $input->getOption('dump-messages') !== true) {
8383
$output->writeln('<info>You must choose one of --force or --dump-messages</info>');
84+
8485
return;
8586
}
8687

@@ -90,6 +91,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9091
if (!in_array($input->getOption('output-format'), $supportedFormats)) {
9192
$output->writeln('<error>Wrong output format</error>');
9293
$output->writeln('Supported formats are '.implode(', ', $supportedFormats).'.');
94+
9395
return;
9496
}
9597

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/TranslatorPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function process(ContainerBuilder $container)
2727
foreach ($container->findTaggedServiceIds('translation.loader') as $id => $attributes) {
2828
$loaders[$id] = $attributes[0]['alias'];
2929
}
30-
30+
3131
if ($container->hasDefinition('translation.loader')) {
3232
$definition = $container->getDefinition('translation.loader');
3333
foreach ($loaders as $id => $format) {

src/Symfony/Bundle/FrameworkBundle/Resources/config/translation.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@
9999
<service id="translation.extractor.php" class="%translation.extractor.php.class%">
100100
<tag name="translation.extractor" alias="php" />
101101
</service>
102-
102+
103103
<service id="translation.loader" class="%translation.loader.class%"/>
104-
104+
105105
<service id="translation.extractor" class="%translation.extractor.class%"/>
106106

107107
<service id="translation.writer" class="%translation.writer.class%"/>

src/Symfony/Bundle/FrameworkBundle/Tests/Translation/PhpExtractorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public function testExtraction()
2323
$extractor = new PhpExtractor();
2424
$extractor->setPrefix('prefix');
2525
$catalogue = new MessageCatalogue('en');
26-
26+
2727
// Act
2828
$extractor->extract(__DIR__.'/../Fixtures/Resources/views/', $catalogue);
29-
29+
3030
// Assert
3131
$this->assertEquals(1, count($catalogue->all('messages')), '->extract() should find 1 translation');
3232
$this->assertTrue($catalogue->has('new key'), '->extract() should find at leat "new key" message');

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818
/**
1919
* PhpExtractor extracts translation messages from a php template.
20-
*
20+
*
2121
* @author Michel Salib <michelsalib@hotmail.com>
2222
*/
2323
class PhpExtractor implements ExtractorInterface
2424
{
2525
const MESSAGE_TOKEN = 300;
2626
const IGNORE_TOKEN = 400;
27-
27+
2828
/**
2929
* Prefix for new found message.
3030
*
@@ -34,8 +34,8 @@ class PhpExtractor implements ExtractorInterface
3434

3535
/**
3636
* The sequence that captures translation messages.
37-
*
38-
* @var array
37+
*
38+
* @var array
3939
*/
4040
protected $sequences = array(
4141
array(
@@ -63,7 +63,7 @@ public function extract($directory, MessageCatalogue $catalog)
6363
$this->parseTokens(token_get_all(file_get_contents($file)), $catalog);
6464
}
6565
}
66-
66+
6767
/**
6868
* {@inheritDoc}
6969
*/
@@ -74,24 +74,24 @@ public function setPrefix($prefix)
7474

7575
/**
7676
* Normalizes a token.
77-
*
77+
*
7878
* @param mixed $token
79-
* @return string
79+
* @return string
8080
*/
8181
protected function normalizeToken($token)
8282
{
8383
if (is_array($token)) {
8484
return $token[1];
8585
}
86-
86+
8787
return $token;
8888
}
8989

9090
/**
9191
* Extracts trans message from php tokens.
92-
*
92+
*
9393
* @param array $tokens
94-
* @param MessageCatalogue $catalog
94+
* @param MessageCatalogue $catalog
9595
*/
9696
protected function parseTokens($tokens, MessageCatalogue $catalog)
9797
{
@@ -112,7 +112,7 @@ protected function parseTokens($tokens, MessageCatalogue $catalog)
112112
}
113113

114114
$message = trim($message, '\'');
115-
115+
116116
if ($message) {
117117
$catalog->set($message, $this->prefix.$message);
118118
break;

src/Symfony/Component/Console/Application.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ public function add(Command $command)
384384

385385
if (!$command->isEnabled()) {
386386
$command->setApplication(null);
387+
387388
return;
388389
}
389390

src/Symfony/Component/HttpFoundation/ParameterBag.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -242,34 +242,34 @@ public function getInt($key, $default = 0, $deep = false)
242242
{
243243
return (int) $this->get($key, $default, $deep);
244244
}
245-
245+
246246
/**
247247
* Filter key.
248-
*
248+
*
249249
* @param string $key Key.
250250
* @param mixed $default Default = null.
251251
* @param boolean $deep Default = false.
252252
* @param integer $filter FILTER_* constant.
253253
* @param mixed $options Filter options.
254-
*
254+
*
255255
* @see http://php.net/manual/en/function.filter-var.php
256256
*
257257
* @return mixed
258258
*/
259259
public function filter($key, $default = null, $deep = false, $filter=FILTER_DEFAULT, $options=array())
260260
{
261261
$value = $this->get($key, $default, $deep);
262-
262+
263263
// Always turn $options into an array - this allows filter_var option shortcuts.
264264
if (!is_array($options) && $options) {
265265
$options = array('flags' => $options);
266266
}
267-
267+
268268
// Add a convenience check for arrays.
269269
if (is_array($value) && !isset($options['flags'])) {
270270
$options['flags'] = FILTER_REQUIRE_ARRAY;
271271
}
272-
272+
273273
return filter_var($value, $filter, $options);
274274
}
275275
}

src/Symfony/Component/Translation/Dumper/CsvFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function setCsvControl($delimiter = ';', $enclosure = '"')
5252
$this->delimiter = $delimiter;
5353
$this->enclosure = $enclosure;
5454
}
55-
55+
5656
/**
5757
* {@inheritDoc}
5858
*/

src/Symfony/Component/Translation/Dumper/FileDumper.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
/**
1717
* FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s).
1818
* Performs backup of already existing files.
19-
*
19+
*
2020
* Options:
2121
* - path (mandatory): the directory where the files should be saved
2222
*
2323
* @author Michel Salib <michelsalib@hotmail.com>
2424
*/
2525
abstract class FileDumper implements DumperInterface
26-
{
26+
{
2727
/**
2828
* {@inheritDoc}
2929
*/
@@ -32,7 +32,7 @@ public function dump(MessageCatalogue $messages, $options = array())
3232
if (!array_key_exists('path', $options)) {
3333
throw new \InvalidArgumentException('The file dumper need a path options.');
3434
}
35-
35+
3636
// save a file for each domain
3737
foreach ($messages->getDomains() as $domain) {
3838
$file = $domain.'.'.$messages->getLocale().'.'.$this->getExtension();
@@ -44,17 +44,17 @@ public function dump(MessageCatalogue $messages, $options = array())
4444
file_put_contents($options['path'].'/'.$file, $this->format($messages, $domain));
4545
}
4646
}
47-
47+
4848
/**
4949
* Transforms a domain of a message catalogue to its string representation.
50-
*
50+
*
5151
* @return The string representation
5252
*/
5353
abstract protected function format(MessageCatalogue $messages, $domain);
54-
54+
5555
/**
5656
* Gets the file extension of the dumper.
57-
*
57+
*
5858
* @return The file extension
5959
*/
6060
abstract protected function getExtension();

src/Symfony/Component/Translation/Dumper/PhpFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ protected function format(MessageCatalogue $messages, $domain)
2929

3030
return $output;
3131
}
32-
32+
3333
/**
3434
* {@inheritDoc}
3535
*/

src/Symfony/Component/Translation/Dumper/QtFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function format(MessageCatalogue $messages, $domain)
3939

4040
return $dom->saveXML();
4141
}
42-
42+
4343
/**
4444
* {@inheritDoc}
4545
*/

src/Symfony/Component/Translation/Dumper/XliffFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected function format(MessageCatalogue $messages, $domain)
4949

5050
return $dom->saveXML();
5151
}
52-
52+
5353
/**
5454
* {@inheritDoc}
5555
*/

src/Symfony/Component/Translation/Dumper/YamlFileDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ protected function format(MessageCatalogue $messages, $domain)
2828
{
2929
return Yaml::dump($messages->all($domain));
3030
}
31-
31+
3232
/**
3333
* {@inheritDoc}
3434
*/

src/Symfony/Component/Translation/Extractor/ChainExtractor.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515

1616
/**
1717
* ChainExtractor extracts translation messages from template files.
18-
*
18+
*
1919
* @author Michel Salib <michelsalib@hotmail.com>
2020
*/
2121
class ChainExtractor implements ExtractorInterface
2222
{
2323
/**
2424
* The extractors.
25-
*
25+
*
2626
* @var array
2727
*/
2828
private $extractors = array();
2929

3030
/**
3131
* Adds a loader to the translation extractor.
32-
*
32+
*
3333
* @param string $format The format of the loader
3434
* @param ExtractorInterface $extractor The loader
3535
*/
@@ -47,7 +47,7 @@ public function setPrefix($prefix)
4747
$extractor->setPrefix($prefix);
4848
}
4949
}
50-
50+
5151
/**
5252
* {@inheritDoc}
5353
*/

src/Symfony/Component/Translation/Extractor/ExtractorInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,22 @@
1616
/**
1717
* Extracts translation messages from a template directory to the catalogue.
1818
* New found messages are injected to the catalogue using the prefix.
19-
*
19+
*
2020
* @author Michel Salib <michelsalib@hotmail.com>
2121
*/
2222
interface ExtractorInterface
2323
{
2424
/**
2525
* Extracts translation messages from a template directory to the catalogue.
26-
*
26+
*
2727
* @param string $directory The path to look into
2828
* @param MessageCatalogue $catalogue The catalogue
2929
*/
3030
function extract($directory, MessageCatalogue $catalogue);
31-
31+
3232
/**
3333
* Sets the prefix that should be used for new found messages.
34-
*
34+
*
3535
* @param string $prefix The prefix
3636
*/
3737
public function setPrefix($prefix);

src/Symfony/Component/Translation/Loader/QtTranslationsLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ private function getXmlErrors()
8282

8383
return $errors;
8484
}
85-
}
85+
}

0 commit comments

Comments
 (0)
0