💚 Corrige via PHPCS

This commit is contained in:
Clement 2020-07-24 11:15:45 +02:00
parent 49248fb16b
commit 2decec3fab

View File

@ -30,7 +30,8 @@ class Pap extends Parser
$parsedHome = new ParsedHome();
$parsedHome->city = $annonce['_embedded']['place'][0]['title'];
//ex: Vente maison 110 m² Tréguier (22220)
$parsedHome->title = sprintf('%s %s %s m² %s',
$parsedHome->title = sprintf(
'%s %s %s m² %s',
ucfirst($annonce['produit']),
$annonce['typebien'],
$annonce['surface'],
@ -43,7 +44,7 @@ class Pap extends Parser
$parsedHome->description = $annonce['texte'];
$parsedHome->pictures = collect(
$annonce['_embedded']['photo']
)->map(static function($photo) {
)->map(static function ($photo) {
return $photo['_links']['self']['href'];
});
$location = $annonce['marker'];
@ -53,7 +54,7 @@ class Pap extends Parser
return $parsedHome;
}
function getIdAnnonceFromUrl($url)
private function getIdAnnonceFromUrl($url)
{
//ex: https://www.pap.fr/annonces/maison-treguier-22220-r432301732
return substr(collect(explode('-', collect(array_filter(explode('/', $url)))->last()))->last(), 1);