Skip to content

Commit 80e398a

Browse files
author
Nikita Konstantinov
committed
fix typos in 2.0
1 parent 5e561b2 commit 80e398a

File tree

12 files changed

+20
-16
lines changed

12 files changed

+20
-16
lines changed

book/http_fundamentals.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ on that value. This can get ugly quickly::
366366
$request = Request::createFromGlobals();
367367
$path = $request->getPathInfo(); // the URI path being requested
368368

369-
if (in_array($path, array('', '/')) {
369+
if (in_array($path, array('', '/'))) {
370370
$response = new Response('Welcome to the homepage.');
371371
} elseif ($path == '/contact') {
372372
$response = new Response('Contact us');

book/propel.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ If you want to reuse some queries, you can add your own methods to the
263263
public function filterByExpensivePrice()
264264
{
265265
return $this
266-
->filterByPrice(array('min' => 1000))
266+
->filterByPrice(array('min' => 1000));
267267
}
268268
}
269269

book/validation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ it looks like this::
815815
// this IS a valid email address, do something
816816
} else {
817817
// this is *not* a valid email address
818-
$errorMessage = $errorList[0]->getMessage()
818+
$errorMessage = $errorList[0]->getMessage();
819819

820820
// ... do something with the error
821821
}

components/console/single_command_tool.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ it is possible to remove this need by extending the application::
3737
{
3838
// Keep the core default commands to have the HelpCommand
3939
// which is used when using the --help option
40-
$defaultCommands = parent::getDefaultCommands()
40+
$defaultCommands = parent::getDefaultCommands();
4141

4242
$defaultCommands[] = new MyCommand();
4343

components/dependency_injection/compilation.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ benefit of merging multiple files and validation of the configuration::
213213
$processor = new Processor();
214214
$config = $processor->processConfiguration($configuration, $configs);
215215

216-
$container->setParameter('acme_demo.FOO', $config['foo'])
216+
$container->setParameter('acme_demo.FOO', $config['foo']);
217217

218218
// ...
219219
}

components/event_dispatcher/introduction.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ instance of ``Symfony\Component\HttpKernel\Event\FilterResponseEvent``:
200200

201201
.. code-block:: php
202202
203-
use Symfony\Component\HttpKernel\Event\FilterResponseEvent
203+
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
204204
205205
public function onKernelResponse(FilterResponseEvent $event)
206206
{

components/routing/introduction.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ your autoloader to load the Routing component::
3333
use Symfony\Component\Routing\RouteCollection;
3434
use Symfony\Component\Routing\Route;
3535

36-
$route = new Route('/foo', array('controller' => 'MyController'))
36+
$route = new Route('/foo', array('controller' => 'MyController'));
3737
$routes = new RouteCollection();
3838
$routes->add('route_name', $route);
3939

@@ -322,9 +322,9 @@ automatically in the background if you want to use it. A basic example of the
322322

323323
$router = new Router(
324324
new YamlFileLoader($locator),
325-
"routes.yml",
325+
'routes.yml',
326326
array('cache_dir' => __DIR__.'/cache'),
327-
$requestContext,
327+
$requestContext
328328
);
329329
$router->match('/foo/bar');
330330

components/security/authentication.rst

+7-5
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ password was valid::
130130
use Symfony\Component\Security\Core\Encoder\EncoderFactory;
131131

132132
$userProvider = new InMemoryUserProvider(
133-
array('admin' => array(
134-
// password is "foo"
135-
'password' => '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==',
136-
'roles' => array('ROLE_ADMIN'),
137-
),
133+
array(
134+
'admin' => array(
135+
// password is "foo"
136+
'password' => '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==',
137+
'roles' => array('ROLE_ADMIN'),
138+
),
139+
)
138140
);
139141

140142
// for some extra checks: is account enabled, locked, expired, etc.?

cookbook/form/create_form_type_extension.rst

+1
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ database)::
170170

171171
return $webPath;
172172
}
173+
}
173174

174175
Your form type extension class will need to do two things in order to extend
175176
the ``file`` form type:

cookbook/security/custom_provider.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Here's an example of how this might look::
134134

135135
// ...
136136

137-
return new WebserviceUser($username, $password, $salt, $roles)
137+
return new WebserviceUser($username, $password, $salt, $roles);
138138
}
139139

140140
throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username));

reference/constraints/Callback.rst

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ those errors should be attributed::
9090
$context->addViolation('This name sounds totally fake!', array(), null);
9191
}
9292
}
93+
}
9394

9495
Options
9596
-------

reference/dic_tags.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ other source, first create a class that implements the
558558
// src/Acme/MainBundle/Translation/MyCustomLoader.php
559559
namespace Acme\MainBundle\Translation;
560560

561-
use Symfony\Component\Translation\Loader\LoaderInterface
561+
use Symfony\Component\Translation\Loader\LoaderInterface;
562562
use Symfony\Component\Translation\MessageCatalogue;
563563

564564
class MyCustomLoader implements LoaderInterface

0 commit comments

Comments
 (0)