fix phpcs issues
This commit is contained in:
parent
8491589fbd
commit
9c5b2e3bac
3 changed files with 10 additions and 4 deletions
|
@ -90,7 +90,9 @@ class MicropubController extends Controller
|
||||||
if (is_array($request->input('properties.location.0'))) {
|
if (is_array($request->input('properties.location.0'))) {
|
||||||
if ($request->input('properties.location.0.type.0' === 'h-card')) {
|
if ($request->input('properties.location.0.type.0' === 'h-card')) {
|
||||||
try {
|
try {
|
||||||
$place = $this->placeService->createPlaceFromCheckin($request->input('properties.location.0'));
|
$place = $this->placeService->createPlaceFromCheckin(
|
||||||
|
$request->input('properties.location.0')
|
||||||
|
);
|
||||||
$data['checkin'] = $place->longurl;
|
$data['checkin'] = $place->longurl;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
//
|
//
|
||||||
|
@ -102,7 +104,9 @@ class MicropubController extends Controller
|
||||||
if (array_key_exists('checkin', $request->input('properties'))) {
|
if (array_key_exists('checkin', $request->input('properties'))) {
|
||||||
$data['swarm-url'] = $request->input('properties.syndication.0');
|
$data['swarm-url'] = $request->input('properties.syndication.0');
|
||||||
try {
|
try {
|
||||||
$place = $this->placeService->createPlaceFromCheckin($request->input('properties.checkin.0'));
|
$place = $this->placeService->createPlaceFromCheckin(
|
||||||
|
$request->input('properties.checkin.0')
|
||||||
|
);
|
||||||
$data['checkin'] = $place->longurl;
|
$data['checkin'] = $place->longurl;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$data['checkin'] = null;
|
$data['checkin'] = null;
|
||||||
|
|
|
@ -368,7 +368,8 @@ class Note extends Model
|
||||||
return $matches[0];
|
return $matches[0];
|
||||||
}
|
}
|
||||||
if ($contact->facebook) {
|
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;
|
return $contact->name;
|
||||||
|
|
|
@ -67,7 +67,8 @@ class Place extends Model
|
||||||
public function scopeNear(Builder $query, Point $point, $distance = 1000)
|
public function scopeNear(Builder $query, Point $point, $distance = 1000)
|
||||||
{
|
{
|
||||||
$field = DB::raw(
|
$field = DB::raw(
|
||||||
sprintf("ST_Distance(%s.location, ST_GeogFromText('%s'))",
|
sprintf(
|
||||||
|
"ST_Distance(%s.location, ST_GeogFromText('%s'))",
|
||||||
$this->getTable(),
|
$this->getTable(),
|
||||||
$point->toWKT()
|
$point->toWKT()
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue