File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,25 +38,19 @@ public function handleResult(DetectionResult $detectionResult): void
3838 $ installation = $ this ->installationFactory ->getInstallation ($ detectionResult );
3939 $ installation ->setType (FrameworkTypes::SYMFONY );
4040
41- if (isset ($ data ->composerVersion )) {
42- $ installation ->setComposerVersion ($ data ->composerVersion );
43- }
44- if (isset ($ data ->symfony ->version )) {
45- $ installation ->setFrameworkVersion ($ data ->symfony ->version );
46- }
47- if (isset ($ data ->symfony ->eof )) {
48- $ installation ->setEol ($ data ->symfony ->eof );
49- }
41+ $ installation ->setComposerVersion ($ data ->composerVersion ?? null );
42+ $ installation ->setFrameworkVersion ($ data ->symfony ->version ?? null );
43+ $ installation ->setEol ($ data ->symfony ->eof ?? '' );
5044 if (isset ($ data ->symfony ->lts )) {
5145 $ lts = 'Yes ' === $ data ->symfony ->lts ;
5246 $ installation ->setLts ($ lts );
5347 }
54- if (isset ($ data ->symfony ->phpVersion )) {
55- $ installation ->setPhpVersion ($ data ->symfony ->phpVersion );
56- }
48+ $ installation ->setPhpVersion ($ data ->symfony ->phpVersion ?? null );
5749
5850 if (isset ($ data ->packages ->installed )) {
5951 $ this ->packageVersionFactory ->setPackageVersions ($ installation , $ data ->packages ->installed );
52+ } else {
53+ $ this ->packageVersionFactory ->setPackageVersions ($ installation , []);
6054 }
6155 } catch (\JsonException ) {
6256 // @TODO log exceptions
You can’t perform that action at this time.
0 commit comments