Skip to content

Reducing some code sample line lengths to stop horizontal scrolling #1970

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

Merged
merged 1 commit into from
Nov 26, 2012
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion components/event_dispatcher/container_aware_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ method where the first argument is the service ID of the subscriber service,
and the second argument is the the service's class name (which must implement
:class:`Symfony\\Component\\EventDispatcher\\EventSubscriberInterface`) as follows::

$dispatcher->addSubscriberService('kernel.store_subscriber', 'StoreSubscriber');
$dispatcher->addSubscriberService(
'kernel.store_subscriber',
'StoreSubscriber'
);

The ``EventSubscriberInterface`` will be exactly as you would expect::

Expand Down
5 changes: 4 additions & 1 deletion components/event_dispatcher/generic_event.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ the event arguments::

use Symfony\Component\EventDispatcher\GenericEvent;

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

echo $event['counter'];
Expand Down
8 changes: 6 additions & 2 deletions components/filesystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ does not support symbolic links, a third boolean argument is available::

// create a symbolic link
$fs->symlink('/path/to/source', '/path/to/destination');
// duplicate the source directory if the filesystem does not support symbolic links
// duplicate the source directory if the filesystem
// does not support symbolic links
$fs->symlink('/path/to/source', '/path/to/destination', true);

makePathRelative
Expand All @@ -198,7 +199,10 @@ makePathRelative
Return the relative path of a directory given another one::

// returns '../'
$fs->makePathRelative('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component');
$fs->makePathRelative(
'/var/lib/symfony/src/Symfony/',
'/var/lib/symfony/src/Symfony/Component'
);
// returns 'videos'
$fs->makePathRelative('/tmp', '/tmp/videos');

Expand Down
5 changes: 4 additions & 1 deletion components/http_foundation/sessions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,10 @@ Examples of setting multiple flashes::
$session->start();

// add flash messages
$session->getFlashBag()->add('warning', 'Your config file is writable, it should be set read-only');
$session->getFlashBag()->add(
'warning',
'Your config file is writable, it should be set read-only'
);
$session->getFlashBag()->add('error', 'Failed to update name');
$session->getFlashBag()->add('error', 'Another error');

Expand Down