@@ -112,14 +112,15 @@ private function parseEggFiles(Nest $nest)
112112 $ files = $ this ->filesystem ->allFiles (database_path ('seeds/eggs/ ' . kebab_case ($ nest ->name )));
113113
114114 $ this ->command ->alert ('Updating Eggs for Nest: ' . $ nest ->name );
115- collect ($ files )->each (function ($ file ) use ($ nest ) {
115+ Collection:: make ($ files )->each (function ($ file ) use ($ nest ) {
116116 /* @var \Symfony\Component\Finder\SplFileInfo $file */
117117 $ decoded = json_decode ($ file ->getContents ());
118118 if (json_last_error () !== JSON_ERROR_NONE ) {
119- return $ this ->command ->error ('JSON decode exception for ' . $ file ->getFilename () . ': ' . json_last_error_msg ());
119+ $ this ->command ->error ('JSON decode exception for ' . $ file ->getFilename () . ': ' . json_last_error_msg ());
120+ return ;
120121 }
121122
122- $ file = new UploadedFile ($ file ->getPathname (), $ file ->getFilename (), 'application/json ' , $ file -> getSize () );
123+ $ file = new UploadedFile ($ file ->getPathname (), $ file ->getFilename (), 'application/json ' );
123124
124125 try {
125126 $ egg = $ this ->repository ->setColumns ('id ' )->findFirstWhere ([
@@ -130,11 +131,11 @@ private function parseEggFiles(Nest $nest)
130131
131132 $ this ->updateImporterService ->handle ($ egg ->id , $ file );
132133
133- return $ this ->command ->info ('Updated ' . $ decoded ->name );
134+ $ this ->command ->info ('Updated ' . $ decoded ->name );
134135 } catch (RecordNotFoundException $ exception ) {
135136 $ this ->importerService ->handle ($ file , $ nest ->id );
136137
137- return $ this ->command ->comment ('Created ' . $ decoded ->name );
138+ $ this ->command ->comment ('Created ' . $ decoded ->name );
138139 }
139140 });
140141
0 commit comments