Skip to content

Commit

Permalink
minor silexphp#1638 Simplify extend call (hkdobrev)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3.x-dev branch.

Discussion
----------

Simplify extend call

Since Pimple 2.x there is no need to re-assign the result from `extend()` call to the same key. Pimple already does that.

Commits
-------

84bcb9b Simplify extend call
  • Loading branch information
fabpot committed Apr 4, 2018
2 parents dab3259 + 84bcb9b commit 6a9ce90
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function testAddResource($registerValidatorFirst)

$app->register(new ValidatorServiceProvider());
$app->register(new TranslationServiceProvider());
$app['translator'] = $app->extend('translator', function ($translator, $app) {
$app->extend('translator', function ($translator, $app) {
$translator->addResource('array', ['This value should not be blank.' => 'Pas vide'], 'fr', 'validators');

return $translator;
Expand Down

0 comments on commit 6a9ce90

Please sign in to comment.