Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Konstantinov committed Dec 31, 2012
1 parent 4c14ff4 commit 0e6147b
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion book/http_fundamentals.rst
Expand Up @@ -366,7 +366,7 @@ on that value. This can get ugly quickly::
$request = Request::createFromGlobals();
$path = $request->getPathInfo(); // the URI path being requested

if (in_array($path, array('', '/')) {
if (in_array($path, array('', '/'))) {
$response = new Response('Welcome to the homepage.');
} elseif ($path == '/contact') {
$response = new Response('Contact us');
Expand Down
2 changes: 1 addition & 1 deletion book/propel.rst
Expand Up @@ -263,7 +263,7 @@ If you want to reuse some queries, you can add your own methods to the
public function filterByExpensivePrice()
{
return $this
->filterByPrice(array('min' => 1000))
->filterByPrice(array('min' => 1000));
}
}

Expand Down
2 changes: 1 addition & 1 deletion book/validation.rst
Expand Up @@ -825,7 +825,7 @@ it looks like this::
// this IS a valid email address, do something
} else {
// this is *not* a valid email address
$errorMessage = $errorList[0]->getMessage()
$errorMessage = $errorList[0]->getMessage();

// ... do something with the error
}
Expand Down
2 changes: 1 addition & 1 deletion components/console/helpers/dialoghelper.rst
Expand Up @@ -136,7 +136,7 @@ You can also ask and validate a hidden response::
if (trim($value) == '') {
throw new \Exception('The password can not be empty');
}
}
};

$password = $dialog->askHiddenResponseAndValidate(
$output,
Expand Down
2 changes: 1 addition & 1 deletion components/console/single_command_tool.rst
Expand Up @@ -37,7 +37,7 @@ it is possible to remove this need by extending the application::
{
// Keep the core default commands to have the HelpCommand
// which is used when using the --help option
$defaultCommands = parent::getDefaultCommands()
$defaultCommands = parent::getDefaultCommands();

$defaultCommands[] = new MyCommand();

Expand Down
2 changes: 1 addition & 1 deletion components/dependency_injection/compilation.rst
Expand Up @@ -213,7 +213,7 @@ benefit of merging multiple files and validation of the configuration::
$processor = new Processor();
$config = $processor->processConfiguration($configuration, $configs);

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

// ...
}
Expand Down
2 changes: 1 addition & 1 deletion components/event_dispatcher/generic_event.rst
Expand Up @@ -74,7 +74,7 @@ the event arguments::

$event = new GenericEvent(
$subject,
array('type' => 'foo', 'counter' => 0))
array('type' => 'foo', 'counter' => 0)
);
$dispatcher->dispatch('foo', $event);

Expand Down
2 changes: 1 addition & 1 deletion components/event_dispatcher/introduction.rst
Expand Up @@ -190,7 +190,7 @@ event to determine the exact ``Symfony\Component\EventDispatcher\Event``
instance that's being passed. For example, the ``kernel.event`` event passes an
instance of ``Symfony\Component\HttpKernel\Event\FilterResponseEvent``::

use Symfony\Component\HttpKernel\Event\FilterResponseEvent
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;

public function onKernelResponse(FilterResponseEvent $event)
{
Expand Down
2 changes: 1 addition & 1 deletion components/http_foundation/introduction.rst
Expand Up @@ -250,7 +250,7 @@ If you need to get full access to parsed data from ``Accept``, ``Accept-Language
use Symfony\Component\HttpFoundation\AcceptHeader;

$accept = AcceptHeader::fromString($request->headers->get('Accept'));
if ($accept->has('text/html') {
if ($accept->has('text/html')) {
$item = $accept->get('html');
$charset = $item->getAttribute('charset', 'utf-8');
$quality = $item->getQuality();
Expand Down
6 changes: 3 additions & 3 deletions components/routing/introduction.rst
Expand Up @@ -33,7 +33,7 @@ your autoloader to load the Routing component::
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;

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

Expand Down Expand Up @@ -333,9 +333,9 @@ automatically in the background if you want to use it. A basic example of the

$router = new Router(
new YamlFileLoader($locator),
"routes.yml",
'routes.yml',
array('cache_dir' => __DIR__.'/cache'),
$requestContext,
$requestContext
);
$router->match('/foo/bar');

Expand Down
12 changes: 7 additions & 5 deletions components/security/authentication.rst
Expand Up @@ -130,11 +130,13 @@ password was valid::
use Symfony\Component\Security\Core\Encoder\EncoderFactory;

$userProvider = new InMemoryUserProvider(
array('admin' => array(
// password is "foo"
'password' => '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==',
'roles' => array('ROLE_ADMIN'),
),
array(
'admin' => array(
// password is "foo"
'password' => '5FZ2Z8QIkA7UTZ4BYkoC+GsReLf569mSKDsfods6LYQ8t+a8EW9oaircfMpmaLbPBh4FOBiiFyLfuZmTSUwzZg==',
'roles' => array('ROLE_ADMIN'),
),
)
);

// for some extra checks: is account enabled, locked, expired, etc.?
Expand Down
1 change: 1 addition & 0 deletions cookbook/bundles/extension.rst
Expand Up @@ -537,6 +537,7 @@ Comments and examples can be added to your configuration nodes using the

return $treeBuilder;
}
}

This text appears as yaml comments in the output of the ``config:dump-reference``
command.
Expand Down
2 changes: 1 addition & 1 deletion cookbook/bundles/prepend_extension.rst
Expand Up @@ -29,7 +29,7 @@ To give an Extension the power to do this, it needs to implement
namespace Acme\HelloBundle\DependencyInjection;

use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\\DependencyInjection\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class AcmeHelloExtension extends Extension implements PrependExtensionInterface
Expand Down
1 change: 1 addition & 0 deletions cookbook/form/create_form_type_extension.rst
Expand Up @@ -168,6 +168,7 @@ database)::

return $webPath;
}
}

Your form type extension class will need to do two things in order to extend
the ``file`` form type:
Expand Down
2 changes: 1 addition & 1 deletion cookbook/security/custom_provider.rst
Expand Up @@ -134,7 +134,7 @@ Here's an example of how this might look::

// ...

return new WebserviceUser($username, $password, $salt, $roles)
return new WebserviceUser($username, $password, $salt, $roles);
}

throw new UsernameNotFoundException(sprintf('Username "%s" does not exist.', $username));
Expand Down
1 change: 1 addition & 0 deletions reference/constraints/Callback.rst
Expand Up @@ -88,6 +88,7 @@ those errors should be attributed::
$context->addViolationAtSubPath('firstname', 'This name sounds totally fake!', array(), null);
}
}
}

Options
-------
Expand Down
2 changes: 1 addition & 1 deletion reference/dic_tags.rst
Expand Up @@ -621,7 +621,7 @@ other source, first create a class that implements the
// src/Acme/MainBundle/Translation/MyCustomLoader.php
namespace Acme\MainBundle\Translation;

use Symfony\Component\Translation\Loader\LoaderInterface
use Symfony\Component\Translation\Loader\LoaderInterface;
use Symfony\Component\Translation\MessageCatalogue;

class MyCustomLoader implements LoaderInterface
Expand Down

0 comments on commit 0e6147b

Please sign in to comment.