@@ -119,7 +119,7 @@ protected function initialize(InputInterface $input, OutputInterface $output)
119119
120120 protected function execute (InputInterface $ input , OutputInterface $ output )
121121 {
122- $ indexes = (null !== $ index = $ input ->getOption ('index ' )) ? [$ index ] : array_keys ($ this ->indexManager ->getAllIndexes ());
122+ $ indexes = (null !== $ index = $ input ->getOption ('index ' )) ? [$ index ] : \ array_keys ($ this ->indexManager ->getAllIndexes ());
123123 $ reset = !$ input ->getOption ('no-reset ' );
124124 $ delete = !$ input ->getOption ('no-delete ' );
125125
@@ -159,7 +159,7 @@ private function populateIndex(OutputInterface $output, string $index, bool $res
159159 $ this ->dispatcher ->dispatch ($ event = new PreIndexPopulateEvent ($ index , $ reset , $ options ));
160160
161161 if ($ reset = $ event ->isReset ()) {
162- $ output ->writeln (sprintf ('<info>Resetting</info> <comment>%s</comment> ' , $ index ));
162+ $ output ->writeln (\ sprintf ('<info>Resetting</info> <comment>%s</comment> ' , $ index ));
163163 $ this ->resetter ->resetIndex ($ index , true );
164164 }
165165
@@ -170,17 +170,17 @@ private function populateIndex(OutputInterface $output, string $index, bool $res
170170 OnExceptionEvent::class,
171171 function (OnExceptionEvent $ event ) use ($ loggerClosure ) {
172172 $ loggerClosure (
173- count ($ event ->getObjects ()),
173+ \ count ($ event ->getObjects ()),
174174 $ event ->getPager ()->getNbResults (),
175- sprintf ('<error>%s</error> ' , $ event ->getException ()->getMessage ())
175+ \ sprintf ('<error>%s</error> ' , $ event ->getException ()->getMessage ())
176176 );
177177 }
178178 );
179179
180180 $ this ->dispatcher ->addListener (
181181 PostInsertObjectsEvent::class,
182182 function (PostInsertObjectsEvent $ event ) use ($ loggerClosure ) {
183- $ loggerClosure (count ($ event ->getObjects ()), $ event ->getPager ()->getNbResults ());
183+ $ loggerClosure (\ count ($ event ->getObjects ()), $ event ->getPager ()->getNbResults ());
184184 }
185185 );
186186
@@ -205,7 +205,7 @@ function (OnExceptionEvent $event) {
205205 $ provider = $ this ->pagerProviderRegistry ->getProvider ($ index );
206206 $ pager = $ provider ->provide ($ options );
207207
208- $ this ->pagerPersister ->insert ($ pager , array_merge ($ options , ['indexName ' => $ index ]));
208+ $ this ->pagerPersister ->insert ($ pager , \ array_merge ($ options , ['indexName ' => $ index ]));
209209
210210 $ this ->dispatcher ->dispatch (new PostIndexPopulateEvent ($ index , $ reset , $ options ));
211211
@@ -217,7 +217,7 @@ function (OnExceptionEvent $event) {
217217 */
218218 private function refreshIndex (OutputInterface $ output , string $ index ): void
219219 {
220- $ output ->writeln (sprintf ('<info>Refreshing</info> <comment>%s</comment> ' , $ index ));
220+ $ output ->writeln (\ sprintf ('<info>Refreshing</info> <comment>%s</comment> ' , $ index ));
221221 $ this ->indexManager ->getIndex ($ index )->refresh ();
222222 $ output ->writeln ('' );
223223 }
0 commit comments