fix phpcs issues

This commit is contained in:
Jonny Barnes 2017-09-14 09:49:18 +01:00
parent 8491589fbd
commit 9c5b2e3bac
3 changed files with 10 additions and 4 deletions

View file

@ -90,7 +90,9 @@ class MicropubController extends Controller
if (is_array($request->input('properties.location.0'))) {
if ($request->input('properties.location.0.type.0' === 'h-card')) {
try {
$place = $this->placeService->createPlaceFromCheckin($request->input('properties.location.0'));
$place = $this->placeService->createPlaceFromCheckin(
$request->input('properties.location.0')
);
$data['checkin'] = $place->longurl;
} catch (\Exception $e) {
//
@ -102,7 +104,9 @@ class MicropubController extends Controller
if (array_key_exists('checkin', $request->input('properties'))) {
$data['swarm-url'] = $request->input('properties.syndication.0');
try {
$place = $this->placeService->createPlaceFromCheckin($request->input('properties.checkin.0'));
$place = $this->placeService->createPlaceFromCheckin(
$request->input('properties.checkin.0')
);
$data['checkin'] = $place->longurl;
} catch (\Exception $e) {
$data['checkin'] = null;

View file

@ -368,7 +368,8 @@ class Note extends Model
return $matches[0];
}
if ($contact->facebook) {
return '<a class="u-category h-card" href="https://facebook.com/' . $contact->facebook . '">' . $contact->name . '</a>';
return '<a class="u-category h-card" href="https://facebook.com/'
. $contact->facebook . '">' . $contact->name . '</a>';
}
return $contact->name;

View file

@ -67,7 +67,8 @@ class Place extends Model
public function scopeNear(Builder $query, Point $point, $distance = 1000)
{
$field = DB::raw(
sprintf("ST_Distance(%s.location, ST_GeogFromText('%s'))",
sprintf(
"ST_Distance(%s.location, ST_GeogFromText('%s'))",
$this->getTable(),
$point->toWKT()
)