💚 Corrige via PHPCS
This commit is contained in:
parent
49248fb16b
commit
2decec3fab
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user