-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Improve readability #4722
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,7 +122,7 @@ the bundle is registered with the kernel:: | |
public function registerBundles() | ||
{ | ||
$bundles = array( | ||
..., | ||
// ... | ||
new Acme\DemoBundle\AcmeDemoBundle(), | ||
); | ||
// ... | ||
|
@@ -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>' | ||
); | ||
} | ||
} | ||
|
||
|
@@ -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:: | ||
|
@@ -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') ?> | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the standard is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, wait. Sorry you are correct There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(), | ||
); | ||
// ... | ||
|
@@ -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" /> | ||
|
@@ -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" /> | ||
|
@@ -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), | ||
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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