diff --git a/components/finder.rst b/components/finder.rst index 621d98afe81..1e7501118ee 100644 --- a/components/finder.rst +++ b/components/finder.rst @@ -308,7 +308,8 @@ The contents of returned files can be read with foreach ($finder as $file) { $contents = $file->getContents(); - ... + + // ... } .. _strtotime: http://www.php.net/manual/en/datetime.formats.php diff --git a/components/form/form_events.rst b/components/form/form_events.rst index d89e4ca5e89..838d59efe02 100644 --- a/components/form/form_events.rst +++ b/components/form/form_events.rst @@ -131,7 +131,7 @@ The ``FormEvents::PRE_SUBMIT`` event is dispatched at the beginning of the It can be used to: -* Change data from the request, before submitting the data to the form. +* Change data from the request, before submitting the data to the form; * Add or remove form fields, before submitting the data to the form. :ref:`Form Events Information Table` @@ -303,7 +303,10 @@ callback for better readability:: { $builder->add('username', 'text'); $builder->add('show_email', 'checkbox'); - $builder->addEventListener(FormEvents::PRE_SET_DATA, array($this, 'onPreSetData')); + $builder->addEventListener( + FormEvents::PRE_SET_DATA, + array($this, 'onPreSetData') + ); } public function onPreSetData(FormEvent $event) diff --git a/components/form/introduction.rst b/components/form/introduction.rst index 05d4a0d1584..d17ae87e0e2 100644 --- a/components/form/introduction.rst +++ b/components/form/introduction.rst @@ -186,17 +186,17 @@ to bootstrap or access Twig and add the :class:`Symfony\\Bridge\\Twig\\Extension // this file comes with TwigBridge $defaultFormTheme = 'form_div_layout.html.twig'; - $vendorDir = realpath(__DIR__ . '/../vendor'); + $vendorDir = realpath(__DIR__.'/../vendor'); // the path to TwigBridge so Twig can locate the // form_div_layout.html.twig file $vendorTwigBridgeDir = - $vendorDir . '/symfony/twig-bridge/Symfony/Bridge/Twig'; + $vendorDir.'/symfony/twig-bridge/Symfony/Bridge/Twig'; // the path to your other templates - $viewsDir = realpath(__DIR__ . '/../views'); + $viewsDir = realpath(__DIR__.'/../views'); $twig = new Twig_Environment(new Twig_Loader_Filesystem(array( $viewsDir, - $vendorTwigBridgeDir . '/Resources/views/Form', + $vendorTwigBridgeDir.'/Resources/views/Form', ))); $formEngine = new TwigRendererEngine(array($defaultFormTheme)); $formEngine->setEnvironment($twig); @@ -315,10 +315,10 @@ Your integration with the Validation component will look something like this:: use Symfony\Component\Form\Extension\Validator\ValidatorExtension; use Symfony\Component\Validator\Validation; - $vendorDir = realpath(__DIR__ . '/../vendor'); - $vendorFormDir = $vendorDir . '/symfony/form/Symfony/Component/Form'; + $vendorDir = realpath(__DIR__.'/../vendor'); + $vendorFormDir = $vendorDir.'/symfony/form/Symfony/Component/Form'; $vendorValidatorDir = - $vendorDir . '/symfony/validator/Symfony/Component/Validator'; + $vendorDir.'/symfony/validator/Symfony/Component/Validator'; // create the validator - details will vary $validator = Validation::createValidator(); @@ -326,13 +326,13 @@ Your integration with the Validation component will look something like this:: // there are built-in translations for the core error messages $translator->addResource( 'xlf', - $vendorFormDir . '/Resources/translations/validators.en.xlf', + $vendorFormDir.'/Resources/translations/validators.en.xlf', 'en', 'validators' ); $translator->addResource( 'xlf', - $vendorValidatorDir . '/Resources/translations/validators.en.xlf', + $vendorValidatorDir.'/Resources/translations/validators.en.xlf', 'en', 'validators' ); @@ -671,10 +671,12 @@ object:: // ... - // an array of FormError objects, but only errors attached to this form level (e.g. "global errors) + // an array of FormError objects, but only errors attached to this + // form level (e.g. "global errors) $errors = $form->getErrors(); - // an array of FormError objects, but only errors attached to the "firstName" field + // an array of FormError objects, but only errors attached to the + // "firstName" field $errors = $form['firstName']->getErrors(); // a string representation of all errors of the whole form tree diff --git a/components/form/type_guesser.rst b/components/form/type_guesser.rst index 819e835ca8e..ae5f305a5c9 100644 --- a/components/form/type_guesser.rst +++ b/components/form/type_guesser.rst @@ -46,7 +46,7 @@ Start by creating the class and these methods. Next, you'll learn how to fill ea use Symfony\Component\Form\FormTypeGuesserInterface; - class PhpdocTypeGuesser implements FormTypeGuesserInterface + class PHPDocTypeGuesser implements FormTypeGuesserInterface { public function guessType($class, $property) { @@ -92,7 +92,7 @@ With this knowledge, you can easily implement the ``guessType`` method of the use Symfony\Component\Form\Guess\Guess; use Symfony\Component\Form\Guess\TypeGuess; - class PhpdocTypeGuesser implements FormTypeGuesserInterface + class PHPDocTypeGuesser implements FormTypeGuesserInterface { public function guessType($class, $property) { diff --git a/components/process.rst b/components/process.rst index 3acc2c55137..8063ca7972f 100644 --- a/components/process.rst +++ b/components/process.rst @@ -117,7 +117,7 @@ Stopping a Process Any asynchronous process can be stopped at any time with the :method:`Symfony\\Component\\Process\\Process::stop` method. This method takes -two arguments : a timeout and a signal. Once the timeout is reached, the signal +two arguments: a timeout and a signal. Once the timeout is reached, the signal is sent to the running process. The default signal sent to a process is ``SIGKILL``. Please read the :ref:`signal documentation below` to find out more about signal handling in the Process component:: @@ -217,7 +217,7 @@ Process Signals .. versionadded:: 2.3 The ``signal`` method was introduced in Symfony 2.3. -When running a program asynchronously, you can send it posix signals with the +When running a program asynchronously, you can send it POSIX signals with the :method:`Symfony\\Component\\Process\\Process::signal` method:: use Symfony\Component\Process\Process;