From dc48f9b8f079d6270b00b8b7eab26109c4c4b0b2 Mon Sep 17 00:00:00 2001
From: Michael <heluecht@pirati.ca>
Date: Sun, 16 Jan 2022 20:17:31 +0000
Subject: [PATCH] White spaces

---
 src/Factory/Api/Friendica/Photo.php              |  7 ++++---
 src/Module/Api/Friendica/Group/Show.php          |  2 +-
 src/Module/Api/Friendica/Photo/Create.php        |  2 +-
 src/Module/Api/Friendica/Photo/Update.php        |  8 ++++----
 .../Api/Twitter/Account/UpdateProfileImage.php   | 16 ++++++++--------
 src/Module/Api/Twitter/Search/Tweets.php         |  2 +-
 6 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/src/Factory/Api/Friendica/Photo.php b/src/Factory/Api/Friendica/Photo.php
index 9c0a48dea7..dad90d13f1 100644
--- a/src/Factory/Api/Friendica/Photo.php
+++ b/src/Factory/Api/Friendica/Photo.php
@@ -91,9 +91,9 @@ class Photo extends BaseFactory
 			$link = $this->baseUrl->get() . '/photo/' . $data['resource-id'] . '-' . $photo['scale'] . Images::getExtensionByMimeType($data['type']);
 			if ($type == 'xml') {
 				$data['links'][$photo['scale'] . ':link']['@attributes'] = [
-					'type' => $data['type'],
+					'type'  => $data['type'],
 					'scale' => $photo['scale'],
-					'href' => $link
+					'href'  => $link
 				];
 			} else {
 				$data['link'][$id] = $link;
@@ -108,6 +108,7 @@ class Photo extends BaseFactory
 		if ($with_posts) {
 			// retrieve item element for getting activities (like, dislike etc.) related to photo
 			$condition = ['uid' => $uid, 'resource-id' => $photo_id];
+
 			$item = Post::selectFirst(['id', 'uid', 'uri', 'uri-id', 'parent', 'allow_cid', 'deny_cid', 'allow_gid', 'deny_gid'], $condition);
 		}
 		if (!empty($item)) {
@@ -147,7 +148,7 @@ class Photo extends BaseFactory
 		} elseif ($with_posts) {
 			$data['friendica_activities'] = [];
 			$data['friendica_comments']   = [];
-			$data['rights_mismatch'] = false;
+			$data['rights_mismatch']      = false;
 		}
 
 		return $data;
diff --git a/src/Module/Api/Friendica/Group/Show.php b/src/Module/Api/Friendica/Group/Show.php
index 1a0e7b6be5..d150827694 100644
--- a/src/Module/Api/Friendica/Group/Show.php
+++ b/src/Module/Api/Friendica/Group/Show.php
@@ -36,7 +36,7 @@ class Show extends BaseApi
 	{
 		BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
 		$uid  = BaseApi::getCurrentUserID();
-		$type = $this->getRequestValue($this->parameters, 'extension', 'json');		
+		$type = $this->getRequestValue($this->parameters, 'extension', 'json');
 
 		// params
 		$gid = $this->getRequestValue($request, 'gid', 0);
diff --git a/src/Module/Api/Friendica/Photo/Create.php b/src/Module/Api/Friendica/Photo/Create.php
index c8ea2fbd78..b0dc5d7a14 100644
--- a/src/Module/Api/Friendica/Photo/Create.php
+++ b/src/Module/Api/Friendica/Photo/Create.php
@@ -54,7 +54,7 @@ class Create extends BaseApi
 		$uid  = BaseApi::getCurrentUserID();
 		$type = $this->getRequestValue($this->parameters, 'extension', 'json');
 
-		// input params	
+		// input params
 		$desc      = $this->getRequestValue($request, 'desc');
 		$album     = $this->getRequestValue($request, 'album');
 		$allow_cid = $this->getRequestValue($request, 'allow_cid');
diff --git a/src/Module/Api/Friendica/Photo/Update.php b/src/Module/Api/Friendica/Photo/Update.php
index 6723cad538..44fd554b09 100644
--- a/src/Module/Api/Friendica/Photo/Update.php
+++ b/src/Module/Api/Friendica/Photo/Update.php
@@ -96,22 +96,22 @@ class Update extends BaseApi
 		}
 
 		if (!is_null($allow_cid)) {
-			$allow_cid = trim($allow_cid);
+			$allow_cid                   = trim($allow_cid);
 			$updated_fields['allow_cid'] = $allow_cid;
 		}
 
 		if (!is_null($deny_cid)) {
-			$deny_cid = trim($deny_cid);
+			$deny_cid                   = trim($deny_cid);
 			$updated_fields['deny_cid'] = $deny_cid;
 		}
 
 		if (!is_null($allow_gid)) {
-			$allow_gid = trim($allow_gid);
+			$allow_gid                   = trim($allow_gid);
 			$updated_fields['allow_gid'] = $allow_gid;
 		}
 
 		if (!is_null($deny_gid)) {
-			$deny_gid = trim($deny_gid);
+			$deny_gid                   = trim($deny_gid);
 			$updated_fields['deny_gid'] = $deny_gid;
 		}
 
diff --git a/src/Module/Api/Twitter/Account/UpdateProfileImage.php b/src/Module/Api/Twitter/Account/UpdateProfileImage.php
index 02194316b2..5af835289a 100644
--- a/src/Module/Api/Twitter/Account/UpdateProfileImage.php
+++ b/src/Module/Api/Twitter/Account/UpdateProfileImage.php
@@ -37,36 +37,36 @@ class UpdateProfileImage extends BaseApi
 	{
 		BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
 		$uid = BaseApi::getCurrentUserID();
-	
+
 		// get mediadata from image or media (Twitter call api/account/update_profile_image provides image)
 		if (!empty($_FILES['image'])) {
 			$media = $_FILES['image'];
 		} elseif (!empty($_FILES['media'])) {
 			$media = $_FILES['media'];
 		}
-	
+
 		// error if image data is missing
 		if (empty($media)) {
 			throw new HTTPException\BadRequestException('no media data submitted');
 		}
-		
+
 		// save new profile image
 		$resource_id = Photo::uploadAvatar($uid, $media);
 		if (empty($resource_id)) {
 			throw new HTTPException\InternalServerErrorException('image upload failed');
 		}
-	
+
 		// output for client
 		$skip_status = $this->getRequestValue($request, 'skip_status', false);
-	
+
 		$user_info = DI::twitterUser()->createFromUserId($uid, $skip_status)->toArray();
-	
+
 		// "verified" isn't used here in the standard
 		unset($user_info['verified']);
-	
+
 		// "uid" is only needed for some internal stuff, so remove it from here
 		unset($user_info['uid']);
-	
+
 		$this->response->exit('user', ['user' => $user_info], $this->parameters['extension'] ?? null);
 	}
 }
diff --git a/src/Module/Api/Twitter/Search/Tweets.php b/src/Module/Api/Twitter/Search/Tweets.php
index 0e0b2802e2..5da579b7ce 100644
--- a/src/Module/Api/Twitter/Search/Tweets.php
+++ b/src/Module/Api/Twitter/Search/Tweets.php
@@ -49,7 +49,7 @@ class Tweets extends BaseApi
 
 		$data['status'] = [];
 
-		$count            = $this->getRequestValue($request, 'count', 15);
+		$count            = $this->getRequestValue($request, 'count', 20, 1, 100);
 		$count            = $this->getRequestValue($request, 'rpp', $count);
 		$since_id         = $this->getRequestValue($request, 'since_id', 0, 0);
 		$max_id           = $this->getRequestValue($request, 'max_id', 0, 0);
-- 
2.39.5