Code Style: Replace "AS" with "as"

This commit is contained in:
Michael 2021-10-03 10:34:41 +00:00
parent 96b41fdb67
commit 9961943b73
10 changed files with 39 additions and 39 deletions

View file

@ -2719,7 +2719,7 @@ class Diaspora
/// @todo enable support for polls
//if ($data->poll) {
// foreach ($data->poll AS $poll)
// foreach ($data->poll as $poll)
// print_r($poll);
// die("poll!\n");
//}

View file

@ -111,7 +111,7 @@ class Feed
if ($xpath->query('/atom:feed')->length > 0) {
$alternate = XML::getFirstAttributes($xpath, "atom:link[@rel='alternate']");
if (is_object($alternate)) {
foreach ($alternate AS $attribute) {
foreach ($alternate as $attribute) {
if ($attribute->name == "href") {
$author["author-link"] = $attribute->textContent;
}
@ -121,7 +121,7 @@ class Feed
if (empty($author["author-link"])) {
$self = XML::getFirstAttributes($xpath, "atom:link[@rel='self']");
if (is_object($self)) {
foreach ($self AS $attribute) {
foreach ($self as $attribute) {
if ($attribute->name == "href") {
$author["author-link"] = $attribute->textContent;
}
@ -175,7 +175,7 @@ class Feed
$avatar = XML::getFirstAttributes($xpath, "atom:author/atom:link[@rel='avatar']");
if (is_object($avatar)) {
foreach ($avatar AS $attribute) {
foreach ($avatar as $attribute) {
if ($attribute->name == "href") {
$author["author-avatar"] = $attribute->textContent;
}
@ -267,7 +267,7 @@ class Feed
$alternate = XML::getFirstAttributes($xpath, "atom:link", $entry);
}
if (is_object($alternate)) {
foreach ($alternate AS $attribute) {
foreach ($alternate as $attribute) {
if ($attribute->name == "href") {
$item["plink"] = $attribute->textContent;
}
@ -383,12 +383,12 @@ class Feed
$attachments = [];
$enclosures = $xpath->query("enclosure|atom:link[@rel='enclosure']", $entry);
foreach ($enclosures AS $enclosure) {
foreach ($enclosures as $enclosure) {
$href = "";
$length = null;
$type = null;
foreach ($enclosure->attributes AS $attribute) {
foreach ($enclosure->attributes as $attribute) {
if (in_array($attribute->name, ["url", "href"])) {
$href = $attribute->textContent;
} elseif ($attribute->name == "length") {
@ -405,7 +405,7 @@ class Feed
$taglist = [];
$categories = $xpath->query("category", $entry);
foreach ($categories AS $category) {
foreach ($categories as $category) {
$taglist[] = $category->nodeValue;
}
@ -459,7 +459,7 @@ class Feed
$preview = '';
if (!empty($contact["fetch_further_information"]) && ($contact["fetch_further_information"] < 3)) {
// Handle enclosures and treat them as preview picture
foreach ($attachments AS $attachment) {
foreach ($attachments as $attachment) {
if ($attachment["mimetype"] == "image/jpeg") {
$preview = $attachment["url"];
}

View file

@ -77,7 +77,7 @@ class Relay
if ($scope == SR_SCOPE_TAGS) {
$server_tags = $config->get('system', 'relay_server_tags');
$tagitems = explode(',', mb_strtolower($server_tags));
foreach ($tagitems AS $tag) {
foreach ($tagitems as $tag) {
$systemTags[] = trim($tag, '# ');
}
@ -90,7 +90,7 @@ class Relay
$deny_tags = $config->get('system', 'relay_deny_tags');
$tagitems = explode(',', mb_strtolower($deny_tags));
foreach ($tagitems AS $tag) {
foreach ($tagitems as $tag) {
$tag = trim($tag, '# ');
$denyTags[] = $tag;
}