Fix phpcs issues
This commit is contained in:
parent
7706a7cf62
commit
c9bff19efa
3 changed files with 30 additions and 12 deletions
|
@ -109,16 +109,22 @@ class NotesController extends Controller
|
|||
case 'in-reply-to':
|
||||
$content['source'] = $webmention->source;
|
||||
if (isset($microformats['items'][0]['properties']['published'][0])) {
|
||||
$content['date'] = $carbon->parse($microformats['items'][0]['properties']['published'][0])->toDayDateTimeString();
|
||||
$content['date'] = $carbon->parse(
|
||||
$microformats['items'][0]['properties']['published'][0]
|
||||
)->toDayDateTimeString();
|
||||
} else {
|
||||
$content['date'] = $webmention->updated_at->toDayDateTimeString();
|
||||
}
|
||||
$content['reply'] = $this->filterHTML($microformats['items'][0]['properties']['content'][0]['html']);
|
||||
$content['reply'] = $this->filterHTML(
|
||||
$microformats['items'][0]['properties']['content'][0]['html']
|
||||
);
|
||||
$replies[] = $content;
|
||||
break;
|
||||
|
||||
case 'repost-of':
|
||||
$content['date'] = $carbon->parse($microformats['items'][0]['properties']['published'][0])->toDayDateTimeString();
|
||||
$content['date'] = $carbon->parse(
|
||||
$microformats['items'][0]['properties']['published'][0]
|
||||
)->toDayDateTimeString();
|
||||
$content['source'] = $webmention->source;
|
||||
$reposts[] = $content;
|
||||
break;
|
||||
|
@ -311,7 +317,11 @@ class NotesController extends Controller
|
|||
]);
|
||||
$json = json_decode($response->getBody());
|
||||
if (isset($json->address->town)) {
|
||||
$address = '<span class="p-locality">' . $json->address->town . '</span>, <span class="p-country-name">' . $json->address->country . '</span>';
|
||||
$address = '<span class="p-locality">'
|
||||
. $json->address->town
|
||||
. '</span>, <span class="p-country-name">'
|
||||
. $json->address->country
|
||||
. '</span>';
|
||||
Cache::forever($latlng, $address);
|
||||
|
||||
return $address;
|
||||
|
@ -323,7 +333,11 @@ class NotesController extends Controller
|
|||
return $address;
|
||||
}
|
||||
if (isset($json->address->county)) {
|
||||
$address = '<span class="p-region">' . $json->address->county . '</span>, <span class="p-country-name">' . $json->address->country . '</span>';
|
||||
$address = '<span class="p-region">'
|
||||
. $json->address->county
|
||||
. '</span>, <span class="p-country-name">'
|
||||
. $json->address->country
|
||||
. '</span>';
|
||||
Cache::forever($latlng, $address);
|
||||
|
||||
return $address;
|
||||
|
|
|
@ -235,7 +235,11 @@ class Note extends Model implements HasMedia
|
|||
foreach ($matches[0] as $name) {
|
||||
$name = str_replace('#', '', $name);
|
||||
$replacements[$name] =
|
||||
'<a rel="tag" class="p-category" href="/notes/tagged/' . Tag::normalizeTag($name) . '">#' . $name . '</a>';
|
||||
'<a rel="tag" class="p-category" href="/notes/tagged/'
|
||||
. Tag::normalizeTag($name)
|
||||
. '">#'
|
||||
. $name
|
||||
. '</a>';
|
||||
}
|
||||
|
||||
// Replace #tags with valid microformat-enabled link
|
||||
|
|
|
@ -73,23 +73,23 @@ class NoteService
|
|||
|
||||
//syndication targets
|
||||
//string sent from either local admin CP or micropub
|
||||
if ($request->input('twitter') == true || $request->input('syndicate-to') == 'https://twitter.com/jonnybarnes') {
|
||||
if ($request->input('twitter') == true
|
||||
|| $request->input('syndicate-to') == 'https://twitter.com/jonnybarnes') {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if ($request->input('facebook') == true || $request->input('syndicate-to') == 'https://facebook.com/jonnybarnes') {
|
||||
if ($request->input('facebook') == true
|
||||
|| $request->input('syndicate-to') == 'https://facebook.com/jonnybarnes') {
|
||||
dispatch(new SyndicateToFacebook($note));
|
||||
}
|
||||
|
||||
//micropub request, syndication sent as array
|
||||
if (
|
||||
(is_array($request->input('syndicate-to')))
|
||||
if ((is_array($request->input('syndicate-to')))
|
||||
&&
|
||||
(in_array('https://twitter.com/jonnybarnes', $request->input('syndicate-to')))
|
||||
) {
|
||||
dispatch(new SyndicateToTwitter($note));
|
||||
}
|
||||
if (
|
||||
(is_array($request->input('syndicate-to')))
|
||||
if ((is_array($request->input('syndicate-to')))
|
||||
&&
|
||||
(in_array('https://facebook.com/jonnybarnes', $request->input('syndicate-to')))
|
||||
) {
|
||||
|
|
Loading…
Add table
Reference in a new issue