Skip to content
This repository was archived by the owner on Sep 14, 2018. It is now read-only.

Commit 0b56bca

Browse files
committed
minor #130 Simplify extend calls (hkdobrev)
This PR was merged into the 2.0.x-dev branch. Discussion ---------- Simplify extend calls Since Pimple 2.x there is no need to re-assign the result from the extend() call to the same key. Pimple already does that. Commits ------- 19989b3 Simplify extend calls
2 parents 30bfe7d + 19989b3 commit 0b56bca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

WebProfilerServiceProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function register(Container $app)
136136
}
137137

138138
if (class_exists('Symfony\Bridge\Twig\Extension\ProfilerExtension')) {
139-
$app['data_collectors'] = $app->extend('data_collectors', function ($collectors, $app) {
139+
$app->extend('data_collectors', function ($collectors, $app) {
140140
$collectors['twig'] = function ($app) {
141141
return new TwigDataCollector($app['twig.profiler.profile'], $app['twig']);
142142
};
@@ -154,7 +154,7 @@ public function register(Container $app)
154154
return new DumpListener($app['var_dumper.cloner'], $app['var_dumper.data_collector']);
155155
};
156156

157-
$app['data_collectors'] = $app->extend('data_collectors', function ($collectors, $app) {
157+
$app->extend('data_collectors', function ($collectors, $app) {
158158
if ($app['profiler.templates_path.debug']) {
159159
$collectors['dump'] = function ($app) {
160160
$dumper = null === $app['var_dumper.dump_destination'] ? null : $app['var_dumper.cli_dumper'];
@@ -168,7 +168,7 @@ public function register(Container $app)
168168
}
169169

170170
if (class_exists('Symfony\Component\HttpKernel\DataCollector\AjaxDataCollector')) {
171-
$app['data_collectors'] = $app->extend('data_collectors', function ($collectors, $app) {
171+
$app->extend('data_collectors', function ($collectors, $app) {
172172
$collectors['ajax'] = function ($app) {
173173
return new AjaxDataCollector();
174174
};
@@ -223,7 +223,7 @@ public function register(Container $app)
223223
}
224224

225225
if (isset($app['translator']) && class_exists('Symfony\Component\Translation\DataCollector\TranslationDataCollector')) {
226-
$app['data_collectors'] = $app->extend('data_collectors', function ($collectors, $app) {
226+
$app->extend('data_collectors', function ($collectors, $app) {
227227
$collectors['translation'] = function ($app) {
228228
return new TranslationDataCollector($app['translator']);
229229
};

0 commit comments

Comments
 (0)