Skip to content

Commit 4ae613e

Browse files
Reducing some code sample line lengths to stop horizontal scrolling
1 parent d93407d commit 4ae613e

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

components/event_dispatcher/container_aware_dispatcher.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ method where the first argument is the service ID of the subscriber service,
6262
and the second argument is the the service's class name (which must implement
6363
:class:`Symfony\\Component\\EventDispatcher\\EventSubscriberInterface`) as follows::
6464

65-
$dispatcher->addSubscriberService('kernel.store_subscriber', 'StoreSubscriber');
65+
$dispatcher->addSubscriberService(
66+
'kernel.store_subscriber',
67+
'StoreSubscriber'
68+
);
6669

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

components/event_dispatcher/generic_event.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ the event arguments::
7272

7373
use Symfony\Component\EventDispatcher\GenericEvent;
7474

75-
$event = new GenericEvent($subject, array('type' => 'foo', 'counter' => 0)));
75+
$event = new GenericEvent(
76+
$subject,
77+
array('type' => 'foo', 'counter' => 0))
78+
);
7679
$dispatcher->dispatch('foo', $event);
7780

7881
echo $event['counter'];

components/filesystem.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ does not support symbolic links, a third boolean argument is available::
189189

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

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

200201
// returns '../'
201-
$fs->makePathRelative('/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component');
202+
$fs->makePathRelative(
203+
'/var/lib/symfony/src/Symfony/',
204+
'/var/lib/symfony/src/Symfony/Component'
205+
);
202206
// returns 'videos'
203207
$fs->makePathRelative('/tmp', '/tmp/videos');
204208

components/http_foundation/sessions.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,10 @@ Examples of setting multiple flashes::
305305
$session->start();
306306

307307
// add flash messages
308-
$session->getFlashBag()->add('warning', 'Your config file is writable, it should be set read-only');
308+
$session->getFlashBag()->add(
309+
'warning',
310+
'Your config file is writable, it should be set read-only'
311+
);
309312
$session->getFlashBag()->add('error', 'Failed to update name');
310313
$session->getFlashBag()->add('error', 'Another error');
311314

0 commit comments

Comments
 (0)