@@ -52,7 +52,7 @@ random) number and prints it. To do that, create a "Controller class" and a
52
52
*/
53
53
public function numberAction()
54
54
{
55
- $number = rand (0, 100);
55
+ $number = mt_rand (0, 100);
56
56
57
57
return new Response(
58
58
'<html><body>Lucky number: '.$number.'</body></html>'
@@ -117,7 +117,7 @@ variable so we can render that::
117
117
*/
118
118
public function numberAction()
119
119
{
120
- $number = rand (0, 100);
120
+ $number = mt_rand (0, 100);
121
121
122
122
return $this->render('lucky/number.html.twig', array(
123
123
'number' => $number
@@ -126,7 +126,7 @@ variable so we can render that::
126
126
}
127
127
128
128
Finally, template files should live in the ``app/Resources/view `` directory. Create
129
- a a new ``app/Resources/views/lucky `` directory with a new ``number.html.twig `` file
129
+ a new ``app/Resources/views/lucky `` directory with a new ``number.html.twig `` file
130
130
inside:
131
131
132
132
.. code-block :: twig
@@ -166,7 +166,7 @@ So what about the other directories in the project?
166
166
package manager.
167
167
168
168
``web/ ``
169
- This is the document root for your project: but any publicly accessible files
169
+ This is the document root for your project: put any publicly accessible files
170
170
here (e.g. CSS, JS and images).
171
171
172
172
Bundles & Configuration
@@ -184,11 +184,11 @@ Bundles are registered in your ``app/AppKernel.php`` file (a rare PHP file in th
184
184
{
185
185
public function registerBundles()
186
186
{
187
- $bundles = [
187
+ $bundles = array(
188
188
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
189
189
new Symfony\Bundle\TwigBundle\TwigBundle(),
190
190
// ...
191
- ] ;
191
+ ) ;
192
192
// ...
193
193
194
194
return $bundles;
0 commit comments