Skip to content

Improve readability #4722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 20 additions & 12 deletions book/page_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ the bundle is registered with the kernel::
public function registerBundles()
{
$bundles = array(
...,
// ...
new Acme\DemoBundle\AcmeDemoBundle(),
);
// ...
Expand Down Expand Up @@ -282,7 +282,9 @@ route is matched::
{
public function indexAction($limit)
{
return new Response('<html><body>Number: '.rand(1, $limit).'</body></html>');
return new Response(
'<html><body>Number: '.rand(1, $limit).'</body></html>'
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this, simply putting the argument on its own line already prevents the horizontal scrollbar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't thought about that, will fix it

}
}

Expand Down Expand Up @@ -420,7 +422,7 @@ Step through the Twig template line-by-line:

The parent template, ``::base.html.twig``, is missing both the **BundleName**
and **ControllerName** portions of its name (hence the double colon (``::``)
at the beginning). This means that the template lives outside of the bundles
at the beginning). This means that the template lives outside of the bundle
and in the ``app`` directory:

.. configuration-block::
Expand Down Expand Up @@ -451,7 +453,8 @@ and in the ``app`` directory:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php $view['slots']->output('title', 'Welcome!') ?></title>
<?php $view['slots']->output('stylesheets') ?>
<link rel="shortcut icon" href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
<link rel="shortcut icon"
href="<?php echo $view['assets']->getUrl('favicon.ico') ?>" />
</head>
<body>
<?php $view['slots']->output('_content') ?>
Expand Down Expand Up @@ -718,8 +721,8 @@ Now that you've created the bundle, enable it via the ``AppKernel`` class::
public function registerBundles()
{
$bundles = array(
...,
// register your bundles
// ...
// register your bundle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the standard is // ... register your bundles

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, wait. Sorry you are correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as it's a tutorial and this is telling you what to do, the singular form works much better.

new Acme\TestBundle\AcmeTestBundle(),
);
// ...
Expand Down Expand Up @@ -824,9 +827,12 @@ format you prefer:
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xmlns:twig="http://symfony.com/schema/dic/twig"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd">
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd
http://symfony.com/schema/dic/twig
http://symfony.com/schema/dic/twig/twig-1.0.xsd">

<imports>
<import resource="parameters.yml" />
Expand Down Expand Up @@ -1017,8 +1023,10 @@ the configuration file for the ``dev`` environment.
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">

<imports>
<import resource="config.xml" />
Expand All @@ -1038,7 +1046,7 @@ the configuration file for the ``dev`` environment.
$loader->import('config.php');

$container->loadFromExtension('framework', array(
'router' => array(
'router' => array(
'resource' => '%kernel.root_dir%/config/routing_dev.php',
),
'profiler' => array('only-exceptions' => false),
Expand Down