Browse Source

whitespace cleanup

pull/64/head
Aaron Parecki 6 years ago
parent
commit
85c3a17934
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      lib/XRay/Formats/Mf2.php

+ 9
- 9
lib/XRay/Formats/Mf2.php View File

@ -65,7 +65,7 @@ class Mf2 extends Format {
}
}
// Check the list of items on the page to see if one matches the URL of the page,
// Check the list of items on the page to see if one matches the URL of the page,
// and treat as a permalink for that object if so.
foreach($mf2['items'] as $item) {
if(array_key_exists('url', $item['properties'])) {
@ -403,7 +403,7 @@ class Mf2 extends Format {
$data['name'] = $name;
}
}
}
}
}
private static function parseAsHEntry($mf2, $item, $http, $url) {
@ -721,7 +721,7 @@ class Mf2 extends Format {
and in_array(\p3k\XRay\normalize_url($authorPage), \p3k\XRay\normalize_urls($i['properties']['url']))
and array_key_exists('uid', $i['properties'])
and in_array(\p3k\XRay\normalize_url($authorPage), \p3k\XRay\normalize_urls($i['properties']['uid']))
) {
) {
return self::parseAsHCard($i, $http, $url, $authorPage)['data'];
}
@ -749,7 +749,7 @@ class Mf2 extends Format {
}
}
// Also check the "author" property
// Also check the "author" property
// (for finding the author of an h-feed's children when the author is the p-author property of the h-feed)
if(isset($i['properties']['author'])) {
foreach($i['properties']['author'] as $ic) {
@ -775,16 +775,16 @@ class Mf2 extends Format {
}
private static function hasNumericKeys(array $arr) {
foreach($arr as $key=>$val)
if (is_numeric($key))
foreach($arr as $key=>$val)
if (is_numeric($key))
return true;
return false;
}
private static function isMicroformat($mf) {
return is_array($mf)
and !self::hasNumericKeys($mf)
and !empty($mf['type'])
return is_array($mf)
and !self::hasNumericKeys($mf)
and !empty($mf['type'])
and isset($mf['properties']);
}

Loading…
Cancel
Save