66use Cake \Command \Command ;
77use Cake \Console \Arguments ;
88use Cake \Console \ConsoleIo ;
9- use Cake \Console \ConsoleOptionParser ;
109use Cake \Log \Log ;
1110use Packagist \Api \Client ;
1211
@@ -62,10 +61,10 @@ public function execute(Arguments $args, ConsoleIo $io)
6261 'repo_url ' => $ package ->getRepository (),
6362 'packagist_url ' => $ package ->getUrl (),
6463 'downloads ' => $ package ->getDownloads (),
65- 'stars ' => $ package ->getFavers ()
64+ 'stars ' => $ package ->getFavers (),
6665 ];
6766
68- $ entity = $ packagesTable ->find ()->where (['package ' => $ package ->getName ()])->first ();
67+ $ entity = $ packagesTable ->find ()->where (['package ' => $ package ->getName ()])->first ();
6968 if (!$ entity ) {
7069 $ entity = $ packagesTable ->newEmptyEntity ();
7170 }
@@ -74,10 +73,9 @@ public function execute(Arguments $args, ConsoleIo $io)
7473 if (!$ packagesTable ->save ($ entity )) {
7574 Log::warning ('Unable to save package ' , [
7675 'package ' => $ package ->getName (),
77- 'errors ' => $ entity ->getErrors ()
76+ 'errors ' => $ entity ->getErrors (),
7877 ]);
7978 }
80-
8179 }
8280 }
8381}
0 commit comments