Skip to content

Commit bad4a68

Browse files
committed
fix indention
1 parent 585683c commit bad4a68

File tree

26 files changed

+122
-121
lines changed

26 files changed

+122
-121
lines changed

best_practices/forms.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ view layer:
143143
{{ form_widget(form) }}
144144

145145
<input type="submit" value="Create"
146-
class="btn btn-default pull-right"/>
146+
class="btn btn-default pull-right"/>
147147
{{ form_end(form) }}
148148

149149
Validation

bundles/configuration.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ allow users to configure it with some configuration that looks like this:
8181
xsi:schemaLocation="http://symfony.com/schema/dic/services
8282
https://symfony.com/schema/dic/services/services-1.0.xsd">
8383
84-
<acme-social:config>
85-
<acme-social:twitter client-id="123" client-secret="your_secret"/>
86-
</acme-social:config>
84+
<acme-social:config>
85+
<acme-social:twitter client-id="123" client-secret="your_secret"/>
86+
</acme-social:config>
8787
88-
<!-- ... -->
88+
<!-- ... -->
8989
</container>
9090
9191
.. code-block:: php

components/cache/adapters/pdo_doctrine_dbal_adapter.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PDO & Doctrine DBAL Cache Adapter
99

1010
.. versionadded:: 3.2
1111

12-
The PDO & Doctrine DBAL adapter was introduced in Symfony 3.2.
12+
The PDO & Doctrine DBAL adapter was introduced in Symfony 3.2.
1313

1414
This adapter stores the cache items in an SQL database. It requires a `PDO`_,
1515
`Doctrine DBAL Connection`_, or `Data Source Name (DSN)`_ as its first parameter, and

components/cache/adapters/proxy_adapter.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ and optionally a namespace and default cache lifetime as its second and third pa
1515
use Psr\Cache\CacheItemPoolInterface;
1616
use Symfony\Component\Cache\Adapter\ProxyAdapter;
1717

18-
$psr6CachePool = \\ create your own cache pool instance that implements the PSR-6
19-
\\ interface `CacheItemPoolInterface`
18+
\\ create your own cache pool instance that implements the PSR-6
19+
\\ interface `CacheItemPoolInterface`
20+
$psr6CachePool = ...
2021

2122
$cache = new ProxyAdapter(
2223

components/console/console_arguments.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Have a look at the following command that has three options::
3939

4040
protected function execute(InputInterface $input, OutputInterface $output)
4141
{
42-
// ...
42+
// ...
4343
}
4444
}
4545

components/console/single_command_tool.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,44 @@ When building a command line tool, you may not need to provide several commands.
88
In such case, having to pass the command name each time is tedious. Fortunately,
99
it is possible to remove this need by declaring a single command application::
1010

11-
#!/usr/bin/env php
12-
<?php
13-
require __DIR__.'/vendor/autoload.php';
14-
15-
use Symfony\Component\Console\Application;
16-
use Symfony\Component\Console\Input\InputArgument;
17-
use Symfony\Component\Console\Input\InputInterface;
18-
use Symfony\Component\Console\Input\InputOption;
19-
use Symfony\Component\Console\Output\OutputInterface;
20-
21-
(new Application('echo', '1.0.0'))
22-
->register('echo')
23-
->addArgument('foo', InputArgument::OPTIONAL, 'The directory')
24-
->addOption('bar', null, InputOption::VALUE_REQUIRED)
25-
->setCode(function(InputInterface $input, OutputInterface $output) {
26-
// output arguments and options
27-
})
28-
->getApplication()
29-
->setDefaultCommand('echo', true) // Single command application
30-
->run();
11+
#!/usr/bin/env php
12+
<?php
13+
require __DIR__.'/vendor/autoload.php';
14+
15+
use Symfony\Component\Console\Application;
16+
use Symfony\Component\Console\Input\InputArgument;
17+
use Symfony\Component\Console\Input\InputInterface;
18+
use Symfony\Component\Console\Input\InputOption;
19+
use Symfony\Component\Console\Output\OutputInterface;
20+
21+
(new Application('echo', '1.0.0'))
22+
->register('echo')
23+
->addArgument('foo', InputArgument::OPTIONAL, 'The directory')
24+
->addOption('bar', null, InputOption::VALUE_REQUIRED)
25+
->setCode(function(InputInterface $input, OutputInterface $output) {
26+
// output arguments and options
27+
})
28+
->getApplication()
29+
->setDefaultCommand('echo', true) // Single command application
30+
->run();
3131

3232
The method :method:`Symfony\\Component\\Console\\Application::setDefaultCommand`
3333
accepts a boolean as second parameter. If true, the command ``echo`` will then
3434
always be used, without having to pass its name.
3535

3636
Of course, you can still register a command as usual::
3737

38-
#!/usr/bin/env php
39-
<?php
40-
require __DIR__.'/vendor/autoload.php';
38+
#!/usr/bin/env php
39+
<?php
40+
require __DIR__.'/vendor/autoload.php';
4141

42-
use Acme\Command\DefaultCommand;
43-
use Symfony\Component\Console\Application;
42+
use Acme\Command\DefaultCommand;
43+
use Symfony\Component\Console\Application;
4444

45-
$application = new Application('echo', '1.0.0');
46-
$command = new DefaultCommand();
45+
$application = new Application('echo', '1.0.0');
46+
$command = new DefaultCommand();
4747

48-
$application->add($command);
48+
$application->add($command);
4949

50-
$application->setDefaultCommand($command->getName(), true);
51-
$application->run();
50+
$application->setDefaultCommand($command->getName(), true);
51+
$application->run();

components/dependency_injection/compilation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ compilation::
325325
{
326326
public function process(ContainerBuilder $container)
327327
{
328-
// ... do something during the compilation
328+
// ... do something during the compilation
329329
}
330330

331331
// ...
@@ -379,7 +379,7 @@ class implementing the ``CompilerPassInterface``::
379379
{
380380
public function process(ContainerBuilder $container)
381381
{
382-
// ... do something during the compilation
382+
// ... do something during the compilation
383383
}
384384
}
385385

components/serializer.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -856,11 +856,11 @@ because it is deeper than the configured maximum depth of 2::
856856
$result = [
857857
'foo' => 'level1',
858858
'child' => [
859-
'foo' => 'level2',
860-
'child' => [
861-
'child' => null,
862-
],
859+
'foo' => 'level2',
860+
'child' => [
861+
'child' => null,
863862
],
863+
],
864864
];
865865
*/
866866

@@ -1031,7 +1031,7 @@ parameter of the ``ObjectNormalizer``::
10311031

10321032
$obj = $serializer->denormalize(
10331033
['inner' => ['foo' => 'foo', 'bar' => 'bar'], 'date' => '1988/01/21'],
1034-
'Acme\ObjectOuter'
1034+
'Acme\ObjectOuter'
10351035
);
10361036

10371037
dump($obj->getInner()->foo); // 'foo'

configuration/environments.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ this code and changing the environment string.
214214
.. code-block:: yaml
215215
216216
doctrine:
217-
dbal:
218-
logging: '%kernel.debug%'
219-
# ...
217+
dbal:
218+
logging: '%kernel.debug%'
219+
# ...
220220
221221
.. code-block:: xml
222222

configuration/external_parameters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ will be used whenever the corresponding environment variable is *not* found:
8787
<parameter key="database_host">%env(DATABASE_HOST)%</parameter>
8888
<parameter key="env(DATABASE_HOST)">localhost</parameter>
8989
</parameters>
90-
</container>
90+
</container>
9191
9292
.. code-block:: php
9393

console/commands_as_services.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Or set the ``command`` attribute on the ``console.command`` tag in your service
112112
<services>
113113
114114
<service id="AppBundle\Command\SunshineCommand">
115-
<tag name="console.command" command="app:sunshine"/>
115+
<tag name="console.command" command="app:sunshine"/>
116116
</service>
117117
118118
</services>

create_framework/routing.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -95,25 +95,25 @@ The ``match()`` method takes a request path and returns an array of attributes
9595

9696
print_r($matcher->match('/bye'));
9797
/* Gives:
98-
array (
99-
'_route' => 'bye',
100-
);
98+
[
99+
'_route' => 'bye',
100+
];
101101
*/
102102

103103
print_r($matcher->match('/hello/Fabien'));
104104
/* Gives:
105-
array (
106-
'name' => 'Fabien',
107-
'_route' => 'hello',
108-
);
105+
[
106+
'name' => 'Fabien',
107+
'_route' => 'hello',
108+
];
109109
*/
110110

111111
print_r($matcher->match('/hello'));
112112
/* Gives:
113-
array (
114-
'name' => 'World',
115-
'_route' => 'hello',
116-
);
113+
[
114+
'name' => 'World',
115+
'_route' => 'hello',
116+
];
117117
*/
118118

119119
.. note::
@@ -165,23 +165,23 @@ There are a few new things in the code:
165165

166166
* Request attributes are extracted to keep our templates simple::
167167

168-
<!-- example.com/src/pages/hello.php -->
169-
Hello <?= htmlspecialchars($name, ENT_QUOTES, 'UTF-8') ?>
168+
// example.com/src/pages/hello.php
169+
Hello <?= htmlspecialchars($name, ENT_QUOTES, 'UTF-8') ?>
170170

171171
* Route configuration has been moved to its own file::
172172

173-
// example.com/src/app.php
174-
use Symfony\Component\Routing;
173+
// example.com/src/app.php
174+
use Symfony\Component\Routing;
175175

176-
$routes = new Routing\RouteCollection();
177-
$routes->add('hello', new Routing\Route('/hello/{name}', ['name' => 'World']));
178-
$routes->add('bye', new Routing\Route('/bye'));
176+
$routes = new Routing\RouteCollection();
177+
$routes->add('hello', new Routing\Route('/hello/{name}', ['name' => 'World']));
178+
$routes->add('bye', new Routing\Route('/bye'));
179179

180-
return $routes;
180+
return $routes;
181181

182-
We now have a clear separation between the configuration (everything
183-
specific to our application in ``app.php``) and the framework (the generic
184-
code that powers our application in ``front.php``).
182+
We now have a clear separation between the configuration (everything
183+
specific to our application in ``app.php``) and the framework (the generic
184+
code that powers our application in ``front.php``).
185185

186186
With less than 30 lines of code, we have a new framework, more powerful and
187187
more flexible than the previous one. Enjoy!

doctrine/dbal.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ mapping type:
164164
# app/config/config.yml
165165
doctrine:
166166
dbal:
167-
mapping_types:
168-
enum: string
167+
mapping_types:
168+
enum: string
169169
170170
.. code-block:: xml
171171
@@ -180,7 +180,7 @@ mapping type:
180180
181181
<doctrine:config>
182182
<doctrine:dbal>
183-
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
183+
<doctrine:mapping-type name="enum">string</doctrine:mapping-type>
184184
</doctrine:dbal>
185185
</doctrine:config>
186186
</container>
@@ -190,9 +190,9 @@ mapping type:
190190
// app/config/config.php
191191
$container->loadFromExtension('doctrine', [
192192
'dbal' => [
193-
'mapping_types' => [
194-
'enum' => 'string',
195-
],
193+
'mapping_types' => [
194+
'enum' => 'string',
195+
],
196196
],
197197
]);
198198

email/dev_environment.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ by adding the ``delivery_whitelist`` option:
145145
swiftmailer:
146146
delivery_addresses: ['dev@example.com']
147147
delivery_whitelist:
148-
# all email addresses matching these regexes will be delivered
149-
# like normal, as well as being sent to dev@example.com
150-
- '/@specialdomain\.com$/'
151-
- '/^admin@mydomain\.com$/'
148+
# all email addresses matching these regexes will be delivered
149+
# like normal, as well as being sent to dev@example.com
150+
- '/@specialdomain\.com$/'
151+
- '/^admin@mydomain\.com$/'
152152
153153
.. code-block:: xml
154154

email/spool.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ swiftmailer with the memory option, use the following configuration:
5151
5252
// app/config/config.php
5353
$container->loadFromExtension('swiftmailer', [
54-
// ...
54+
// ...
5555
'spool' => ['type' => 'memory'],
5656
]);
5757
@@ -101,7 +101,7 @@ In order to use the spool with files, use the following configuration:
101101
102102
// app/config/config.php
103103
$container->loadFromExtension('swiftmailer', [
104-
// ...
104+
// ...
105105
106106
'spool' => [
107107
'type' => 'file',

quick_tour/the_view.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,23 +68,23 @@ on its type:
6868
6969
{# 1. Simple variables #}
7070
{# $this->render('template.html.twig', [
71-
'name' => 'Fabien',
72-
]) #}
71+
'name' => 'Fabien',
72+
]) #}
7373
{{ name }}
7474
7575
{# 2. Arrays #}
7676
{# $this->render('template.html.twig', [
77-
'user' => ['name' => 'Fabien']
78-
]) #}
77+
'user' => ['name' => 'Fabien'],
78+
]) #}
7979
{{ user.name }}
8080
8181
{# alternative syntax for arrays #}
8282
{{ user['name'] }}
8383
8484
{# 3. Objects #}
8585
{# $this->render('template.html.twig', [
86-
'user' => new User('Fabien')
87-
]) #}
86+
'user' => new User('Fabien'),
87+
]) #}
8888
{{ user.name }}
8989
{{ user.getName }}
9090

reference/configuration/doctrine.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ can be placed directly under ``doctrine.orm`` config level.
194194
orm:
195195
# ...
196196
query_cache_driver:
197-
# ...
197+
# ...
198198
metadata_cache_driver:
199199
# ...
200200
result_cache_driver:

reference/constraints/Collection.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ following:
8080
* allowMissingFields = true
8181
* )
8282
*/
83-
protected $profileData = [
84-
'personal_email' => '...',
85-
'short_bio' => '...',
86-
];
83+
protected $profileData = [
84+
'personal_email' => '...',
85+
'short_bio' => '...',
86+
];
8787
}
8888
8989
.. code-block:: yaml

0 commit comments

Comments
 (0)