]> git.mxchange.org Git - friendica.git/commitdiff
Some more code beauty
authorMichael <heluecht@pirati.ca>
Mon, 23 May 2022 12:44:21 +0000 (12:44 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 23 May 2022 12:44:21 +0000 (12:44 +0000)
src/Console/MoveToAvatarCache.php

index 49fb9c9243cb50fb9030360cd5f0fdafd2d16f4f..f158c934001141ac7d8e9dbd967f90fa4f2d43f8 100644 (file)
@@ -92,8 +92,8 @@ HELP;
                        echo ++$count . '/' . $total . "\t" . $contact['id'] . "\t" . $contact['url'] . "\t";
                        $resourceid = Photo::ridFromURI($contact['photo']);
                        if (empty($resourceid)) {
-                                       echo $this->l10n->t('no resource') . "\n";
-                                       continue;
+                               echo $this->l10n->t('no resource') . "\n";
+                               continue;
                        }
                        echo '1';
                        $photo = Photo::selectFirst([], ['resource-id' => $resourceid], ['order' => ['scale']]);
@@ -105,14 +105,14 @@ HELP;
                        echo '2';
                        $imgdata = Photo::getImageDataForPhoto($photo);
                        if (empty($imgdata)) {
-                                       echo $this->l10n->t('no image data') . "\n";
-                                       continue;
+                               echo $this->l10n->t('no image data') . "\n";
+                               continue;
                        }
                        echo '3';
                        $image = new Image($imgdata, Images::getMimeTypeByData($imgdata));
                        if (!$image->isValid()) {
-                                       echo $this->l10n->t('invalid image') . "\n";
-                                       continue;
+                               echo $this->l10n->t('invalid image') . "\n";
+                               continue;
                        }
 
                        echo '4';
@@ -121,7 +121,7 @@ HELP;
                        Contact::update($fields, ['uri-id' => $contact['uri-id']]);
                        echo '6';
                        Photo::delete(['resource-id' => $resourceid]);
-                       echo ' '.$fields['photo'] . "\n";
+                       echo ' ' . $fields['photo'] . "\n";
                }
 
                return 0;