File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -107,11 +107,11 @@ public function setAdditionalData($input)
107107 $ this ->cpuType = $ input ->cpu_type ?? null ;
108108 $ this ->architecture = property_exists ($ input , 'architecture ' ) ? $ input ->architecture : null ;
109109 $ this ->deprecation = (property_exists ($ input , 'deprecation ' ) && $ input ->deprecation !== null ) ? (array ) $ input ->deprecation : null ;
110- $ this -> locationAvailability = collect ( $ input -> locations ?? [])
111- -> mapWithKeys ( fn ( $ loc ): array => [
112- $ loc ->name => ($ loc ->deprecation !== null ) ? (array ) $ loc ->deprecation : null ,
113- ])
114- -> all () ;
110+ $ locationAvailability = [];
111+ foreach ( $ input -> locations ?? [] as $ loc ) {
112+ $ locationAvailability [ $ loc ->name ] = ($ loc ->deprecation !== null ) ? (array ) $ loc ->deprecation : null ;
113+ }
114+ $ this -> locationAvailability = $ locationAvailability ;
115115
116116 return $ this ;
117117 }
You can’t perform that action at this time.
0 commit comments