@@ -206,15 +206,15 @@ public static function fromArray(array $data): self
206206
207207 $ creators = array_values (array_filter (
208208 array_map (
209- fn ( array $ item ): ? Creator => Creator ::fromArray ($ item ),
209+ Creator::fromArray (... ),
210210 $ creatorsData
211211 ),
212212 fn (?Creator $ creator ): bool => $ creator instanceof \VincentAuger \DataCiteSdk \Data \Metadata \Creator
213213 ));
214214 assert ($ creators !== [], 'At least one creator is required ' );
215215
216216 $ titles = array_map (
217- fn ( array $ item ): Title => Title ::fromArray ($ item ),
217+ Title::fromArray (... ),
218218 $ titlesData
219219 );
220220 assert ($ titles !== [], 'At least one title is required ' );
@@ -226,11 +226,11 @@ public static function fromArray(array $data): self
226226 prefix: $ attributes ['prefix ' ] ?? null ,
227227 suffix: $ attributes ['suffix ' ] ?? null ,
228228 identifiers: array_map (
229- fn ( array $ item ): Identifier => Identifier ::fromArray ($ item ),
229+ Identifier::fromArray (... ),
230230 $ identifiersData
231231 ),
232232 alternateIdentifiers: array_map (
233- fn ( array $ item ): AlternateIdentifier => AlternateIdentifier ::fromArray ($ item ),
233+ AlternateIdentifier::fromArray (... ),
234234 $ alternateIdentifiersData
235235 ),
236236 creators: $ creators ,
@@ -239,50 +239,50 @@ public static function fromArray(array $data): self
239239 container: ContainerData::fromArray ($ containerData ),
240240 publicationYear: (int ) $ attributes ['publicationYear ' ],
241241 subjects: array_map (
242- fn ( array $ item ): Subject => Subject ::fromArray ($ item ),
242+ Subject::fromArray (... ),
243243 $ subjectsData
244244 ),
245245 contributors: array_values (array_filter (
246246 array_map (
247- fn ( array $ item ): ? Contributor => Contributor ::fromArray ($ item ),
247+ Contributor::fromArray (... ),
248248 $ contributorsData
249249 ),
250250 fn (?Contributor $ contributor ): bool => $ contributor instanceof \VincentAuger \DataCiteSdk \Data \Metadata \Contributor
251251 )),
252252 dates: array_map (
253- fn ( array $ item ): Date => Date ::fromArray ($ item ),
253+ Date::fromArray (... ),
254254 $ datesData
255255 ),
256256 language: isset ($ attributes ['language ' ]) && is_string ($ attributes ['language ' ]) ? $ attributes ['language ' ] : null ,
257257 types: ResourceType::fromArray ($ typesData ),
258258 relatedIdentifiers: array_map (
259- fn ( array $ item ): RelatedIdentifier => RelatedIdentifier ::fromArray ($ item ),
259+ RelatedIdentifier::fromArray (... ),
260260 $ relatedIdentifiersData
261261 ),
262262 relatedItems: array_map (
263- fn ( array $ item ): RelatedItem => RelatedItem ::fromArray ($ item ),
263+ RelatedItem::fromArray (... ),
264264 $ relatedItemsData
265265 ),
266266 sizes: $ sizesData ,
267267 formats: $ formatsData ,
268268 version: isset ($ attributes ['version ' ]) && is_string ($ attributes ['version ' ]) ? $ attributes ['version ' ] : null ,
269269 rightsList: array_map (
270- fn ( array $ item ): RightsList => RightsList ::fromArray ($ item ),
270+ RightsList::fromArray (... ),
271271 $ rightsListData
272272 ),
273273 descriptions: array_values (array_filter (
274274 array_map (
275- fn ( array $ item ): ? Description => Description ::fromArray ($ item ),
275+ Description::fromArray (... ),
276276 $ descriptionsData
277277 ),
278278 fn (?Description $ description ): bool => $ description instanceof \VincentAuger \DataCiteSdk \Data \Metadata \Description
279279 )),
280280 geoLocations: array_map (
281- fn ( array $ item ): GeoLocation => GeoLocation ::fromArray ($ item ),
281+ GeoLocation::fromArray (... ),
282282 $ geoLocationsData
283283 ),
284284 fundingReferences: array_map (
285- fn ( array $ item ): FundingReference => FundingReference ::fromArray ($ item ),
285+ FundingReference::fromArray (... ),
286286 $ fundingReferencesData
287287 ),
288288 xml: $ attributes ['xml ' ] ?? null ,
0 commit comments