Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix some PHP codes #7736

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

Closed
wants to merge 1 commit into from
Closed
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
Fix some PHP codes
  • Loading branch information
Ahmed TAILOULOUTE committed Mar 31, 2017
commit d8dfefdb5200339ba714bb5c367625bcd1573fe8
2 changes: 1 addition & 1 deletion assetic/asset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ configuration under the ``assetic`` section. Read more in the
),
),
),
);
));

After you have defined the named assets, you can reference them in your templates
with the ``@named_asset`` notation:
Expand Down
3 changes: 1 addition & 2 deletions assetic/jpeg_optimize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ following configuration:
),
'twig' => array(
'functions' => array('jpegoptim'),
),
),
));

Expand Down Expand Up @@ -294,7 +293,7 @@ file:
'twig' => array(
'functions' => array(
'jpegoptim' => array(
output => 'images/*.jpg'
'output' => 'images/*.jpg'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a trailing comma here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is closed, I'll do this changes in another commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #7741

),
),
),
Expand Down
8 changes: 4 additions & 4 deletions assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ can configure its location using the ``node`` key:

// app/config/config.php
$container->loadFromExtension('assetic', array(
'node' => '/usr/bin/nodejs',
'node' => '/usr/bin/nodejs',
'uglifyjs2' => array(
// the path to the uglifyjs executable
'bin' => '/usr/local/bin/uglifyjs',
),
// the path to the uglifyjs executable
'bin' => '/usr/local/bin/uglifyjs',
),
));

Minify your Assets
Expand Down
2 changes: 1 addition & 1 deletion configuration/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ The best way to accomplish this is via a new environment called, for example,
.. code-block:: php

// app/config/config_benchmark.php
$loader->import('config_prod.php')
$loader->import('config_prod.php');

$container->loadFromExtension('framework', array(
'profiler' => array('only_exceptions' => false),
Expand Down
2 changes: 1 addition & 1 deletion controller/service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ controller:
$templating = $this->templating;
$callback = function () use ($templating, $view, $parameters) {
$templating->stream($view, $parameters);
}
};

return new StreamedResponse($callback);

Expand Down
2 changes: 1 addition & 1 deletion form/without_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ but here's a short example:

.. code-block:: php

new NotBlank(array('groups' => array('create', 'update')))
new NotBlank(array('groups' => array('create', 'update')));
4 changes: 2 additions & 2 deletions reference/constraints/CardScheme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on an object that will contain a credit card number.
.. code-block:: php-annotations

// src/AppBundle/Entity/Transaction.php
namespace AppBundle\Entity\Transaction;
namespace AppBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;

Expand Down Expand Up @@ -76,7 +76,7 @@ on an object that will contain a credit card number.
.. code-block:: php

// src/AppBundle/Entity/Transaction.php
namespace AppBundle\Entity\Transaction;
namespace AppBundle\Entity;

use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Constraints as Assert;
Expand Down
2 changes: 1 addition & 1 deletion reference/constraints/UniqueEntity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ your user table:

.. code-block:: php

// src/AppBundle/Entity/User.php
// src/AppBundle/Entity/Author.php
namespace AppBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;
Expand Down
2 changes: 1 addition & 1 deletion routing/requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ accomplished with the following route configuration:

.. code-block:: php-annotations

// src/AppBundle/Controller/MainController.php
// src/AppBundle/Controller/BlogApiController.php
namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
Expand Down
2 changes: 1 addition & 1 deletion security/pre_authenticated.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ corresponding firewall in your security configuration:
$container->loadFromExtension('security', array(
'firewalls' => array(
'secured_area' => array(
'pattern' => '^/'
'pattern' => '^/',
'remote_user' => array(
'provider' => 'your_user_provider',
),
Expand Down
2 changes: 1 addition & 1 deletion serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Here is an example on how to load the
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;

$container->register('get_set_method_normalizer', GetSetMethodNormalizer::class)
->setPublic(false);
->setPublic(false)
->addTag('serializer.normalizer')
;

Expand Down
2 changes: 1 addition & 1 deletion service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ Injecting the dependency by the setter method just needs a change of syntax:

$container->setDefinition('app.mailer', ...);

$definition = new Definition(NewsletterManager::class)
$definition = new Definition(NewsletterManager::class);
$definition->addMethodCall('setMailer', array(
new Reference('app.mailer'),
));
Expand Down
2 changes: 1 addition & 1 deletion service_container/configurators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ You can configure the service configurator using the ``configurator`` option:
->setConfigurator(array(new Reference('app.email_configurator'), 'configure'))
;

$container->register('app.greeting_card_manager', GreetingCardManager::class);
$container->register('app.greeting_card_manager', GreetingCardManager::class)
->addArgument(new Reference('mailer'))
->setConfigurator(array(new Reference('app.email_configurator'), 'configure'))
;
Expand Down
2 changes: 2 additions & 0 deletions session/php_bridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ for the ``handler_id``:
'session' => array(
'storage_id' => 'session.storage.php_bridge',
'handler_id' => null,
),
));

Otherwise, if the problem is simply that you cannot avoid the application
Expand Down Expand Up @@ -77,6 +78,7 @@ the example below:
'session' => array(
'storage_id' => 'session.storage.php_bridge',
'handler_id' => 'session.storage.native_file',
),
));

.. note::
Expand Down
2 changes: 1 addition & 1 deletion templating/namespaced_paths.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ directory:
$container->loadFromExtension('twig', array(
'paths' => array(
'%kernel.root_dir%/../vendor/acme/foo-bar/templates' => 'foo_bar',
);
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add a trailing comma here

));

.. caution::
Expand Down