array_mapのcallbackをシンプルにする

This commit is contained in:
eai04191 2019-11-05 05:59:00 +09:00
parent dc0eb0a548
commit 12fd228e75

View File

@ -37,13 +37,7 @@ class XtubeResolver implements Resolver
$metadata->description = trim($crawler->filter('.fullDescription ')->text('')); $metadata->description = trim($crawler->filter('.fullDescription ')->text(''));
$metadata->image = str_replace('m=eSuQ8f', 'm=eaAaaEFb', $metadata->image); $metadata->image = str_replace('m=eSuQ8f', 'm=eaAaaEFb', $metadata->image);
$metadata->image = str_replace('240X180', 'original', $metadata->image); $metadata->image = str_replace('240X180', 'original', $metadata->image);
$metadata->tags = $metadata->tags = array_map('trim', $crawler->filter('.tagsCategories a')->extract('_text'));
array_map(
function ($text) {
return trim($text);
},
$crawler->filter('.tagsCategories a')->extract('_text')
);
return $metadata; return $metadata;
} }