From 5dcf6bfc58dd69d8535ccc8163ae32e3acfae386 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 16 Oct 2019 08:58:09 -0400 Subject: [PATCH] Remove extra spaces before closing parentheses in src/ --- src/App/BaseURL.php | 8 ++++---- src/BaseObject.php | 2 +- src/Core/Config/Configuration.php | 8 ++++---- src/Core/Config/PConfiguration.php | 8 ++++---- src/Database/DBStructure.php | 4 ++-- src/Model/GContact.php | 6 +++--- src/Model/Profile.php | 2 +- src/Protocol/ActivityPub/Processor.php | 2 +- src/Util/Logger/SyslogLogger.php | 2 +- src/Util/Network.php | 4 ++-- src/Util/Profiler.php | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/App/BaseURL.php b/src/App/BaseURL.php index 9d9a2711e9..8d76a0d2d2 100644 --- a/src/App/BaseURL.php +++ b/src/App/BaseURL.php @@ -339,10 +339,10 @@ class BaseURL * Not all of those $_SERVER properties can be present, so we do by inverse priority order */ $relative_script_path = - ($this->server['REDIRECT_URL'] ?? '' ) ?: - ($this->server['REDIRECT_URI'] ?? '' ) ?: - ($this->server['REDIRECT_SCRIPT_URL'] ?? '' ) ?: - ($this->server['SCRIPT_URL'] ?? '' ) ?: + ($this->server['REDIRECT_URL'] ?? '') ?: + ($this->server['REDIRECT_URI'] ?? '') ?: + ($this->server['REDIRECT_SCRIPT_URL'] ?? '') ?: + ($this->server['SCRIPT_URL'] ?? '') ?: $this->server['REQUEST_URI'] ?? ''; /* $relative_script_path gives /relative/path/to/friendica/module/parameter diff --git a/src/BaseObject.php b/src/BaseObject.php index fcec89bb42..996824f4a1 100644 --- a/src/BaseObject.php +++ b/src/BaseObject.php @@ -60,7 +60,7 @@ class BaseObject throw new InternalServerErrorException('DICE isn\'t initialized.'); } - if (class_exists($name) || interface_exists($name )) { + if (class_exists($name) || interface_exists($name)) { return self::$dice->create($name); } else { throw new InternalServerErrorException('Class \'' . $name . '\' isn\'t valid.'); diff --git a/src/Core/Config/Configuration.php b/src/Core/Config/Configuration.php index f904f369bb..c54fbb27e7 100644 --- a/src/Core/Config/Configuration.php +++ b/src/Core/Config/Configuration.php @@ -7,8 +7,8 @@ use Friendica\Model; /** * This class is responsible for all system-wide configuration values in Friendica * There are two types of storage - * - The Config-Files (loaded into the FileCache @see Cache\ConfigCache ) - * - The Config-DB-Table (per Config-DB-model @see Model\Config\Config ) + * - The Config-Files (loaded into the FileCache @see Cache\ConfigCache) + * - The Config-DB-Table (per Config-DB-model @see Model\Config\Config) */ abstract class Configuration { @@ -59,7 +59,7 @@ abstract class Configuration * * Get a particular config value from the given category ($cat) * and the $key from a cached storage either from the $this->configAdapter - * (@see IConfigAdapter ) or from the $this->configCache (@see ConfigCache ). + * (@see IConfigAdapter) or from the $this->configCache (@see ConfigCache). * * @param string $cat The category of the configuration value * @param string $key The configuration key to query @@ -89,7 +89,7 @@ abstract class Configuration * @brief Deletes the given key from the system configuration. * * Removes the configured value from the stored cache in $this->configCache - * (@see ConfigCache ) and removes it from the database (@see IConfigAdapter ). + * (@see ConfigCache) and removes it from the database (@see IConfigAdapter). * * @param string $cat The category of the configuration value * @param string $key The configuration key to delete diff --git a/src/Core/Config/PConfiguration.php b/src/Core/Config/PConfiguration.php index badec9dfca..c54fc31220 100644 --- a/src/Core/Config/PConfiguration.php +++ b/src/Core/Config/PConfiguration.php @@ -8,7 +8,7 @@ use Friendica\Model; * This class is responsible for the user-specific configuration values in Friendica * The values are set through the Config-DB-Table (per Config-DB-model @see Model\Config\PConfig) * - * The configuration cache (@see Cache\PConfigCache ) is used for temporary caching of database calls. This will + * The configuration cache (@see Cache\PConfigCache) is used for temporary caching of database calls. This will * increase the performance. */ abstract class PConfiguration @@ -52,7 +52,7 @@ abstract class PConfiguration * @param string $cat The category of the configuration value * * @return void - * @see PConfigCache ) + * @see PConfigCache * */ abstract public function load(int $uid, string $cat = 'config'); @@ -63,7 +63,7 @@ abstract class PConfiguration * * Get a particular user's config value from the given category ($cat) * and the $key with the $uid from a cached storage either from the $this->configAdapter - * (@see IConfigAdapter ) or from the $this->configCache (@see PConfigCache ). + * (@see IConfigAdapter) or from the $this->configCache (@see PConfigCache). * * @param int $uid The user_id * @param string $cat The category of the configuration value @@ -96,7 +96,7 @@ abstract class PConfiguration * Deletes the given key from the users's configuration. * * Removes the configured value from the stored cache in $this->configCache - * (@see ConfigCache ) and removes it from the database (@see IConfigAdapter ) + * (@see ConfigCache) and removes it from the database (@see IConfigAdapter) * with the given $uid. * * @param int $uid The user_id diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 0c775377e4..218cab9507 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -717,8 +717,8 @@ class DBStructure * @todo You cannot rename a primary key if "auto increment" is set * * @param string $table Table name - * @param array $columns Columns Syntax for Rename: [ $old1 => [ $new1, $type1 ], $old2 => [ $new2, $type2 ], ... ] ) - * Syntax for Primary Key: [ $col1, $col2, ...] ) + * @param array $columns Columns Syntax for Rename: [ $old1 => [ $new1, $type1 ], $old2 => [ $new2, $type2 ], ... ] + * Syntax for Primary Key: [ $col1, $col2, ...] * @param int $type The type of renaming (Default is Column) * * @return boolean Was the renaming successful? diff --git a/src/Model/GContact.php b/src/Model/GContact.php index f3ce0c92cc..3caabdd19b 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -255,7 +255,7 @@ class GContact WHERE `glink`.`cid` = %d AND `glink`.`uid` = %d AND ((`gcontact`.`last_contact` >= `gcontact`.`last_failure`) OR (`gcontact`.`updated` >= `gcontact`.`last_failure`)) - AND `gcontact`.`nurl` IN (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d ) ", + AND `gcontact`.`nurl` IN (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 and id != %d) ", intval($cid), intval($uid), intval($uid), @@ -281,7 +281,7 @@ class GContact "SELECT count(*) as `total` FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id` where `glink`.`zcid` = %d - and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 ) ", + and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0) ", intval($zcid), intval($uid) ); @@ -353,7 +353,7 @@ class GContact "SELECT `gcontact`.* FROM `glink` INNER JOIN `gcontact` on `glink`.`gcid` = `gcontact`.`id` where `glink`.`zcid` = %d - and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0 ) + and `gcontact`.`nurl` in (select nurl from contact where uid = %d and self = 0 and blocked = 0 and hidden = 0) $sql_extra limit %d, %d", intval($zcid), intval($uid), diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 0c1ae01e41..b69860edff 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -460,7 +460,7 @@ class Profile $diaspora = [ 'guid' => $profile['guid'], 'podloc' => System::baseUrl(), - 'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ), + 'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false'), 'nickname' => $profile['nickname'], 'fullname' => $profile['name'], 'firstname' => $firstname, diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index 48af31cc65..50e8dd91e8 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -893,7 +893,7 @@ class Processor // Extract one prepended mention at a time from the body while(preg_match('#^(@\[url=([^\]]+)].*?\[\/url]\s)(.*)#is', $body, $matches)) { - if (!in_array($matches[2], $potential_mentions) ) { + if (!in_array($matches[2], $potential_mentions)) { $kept_mentions[] = $matches[1]; } diff --git a/src/Util/Logger/SyslogLogger.php b/src/Util/Logger/SyslogLogger.php index 83c3fc3ce5..7ef4f6b27a 100644 --- a/src/Util/Logger/SyslogLogger.php +++ b/src/Util/Logger/SyslogLogger.php @@ -111,7 +111,7 @@ class SyslogLogger extends AbstractLogger } /** - * Maps the LogLevel (@see LogLevel ) to a SysLog priority (@see http://php.net/manual/en/function.syslog.php#refsect1-function.syslog-parameters ) + * Maps the LogLevel (@see LogLevel) to a SysLog priority (@see http://php.net/manual/en/function.syslog.php#refsect1-function.syslog-parameters) * * @param string $level A LogLevel * diff --git a/src/Util/Network.php b/src/Util/Network.php index 348bff50e3..7e1012827e 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -380,7 +380,7 @@ class Network /// @TODO Really suppress function outcomes? Why not find them + debug them? $h = @parse_url($url); - if (!empty($h['host']) && (@dns_get_record($h['host'], DNS_A + DNS_CNAME) || filter_var($h['host'], FILTER_VALIDATE_IP) )) { + if (!empty($h['host']) && (@dns_get_record($h['host'], DNS_A + DNS_CNAME) || filter_var($h['host'], FILTER_VALIDATE_IP))) { return $url; } @@ -406,7 +406,7 @@ class Network $h = substr($addr, strpos($addr, '@') + 1); // Concerning the @ see here: https://stackoverflow.com/questions/36280957/dns-get-record-a-temporary-server-error-occurred - if ($h && (@dns_get_record($h, DNS_A + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP) )) { + if ($h && (@dns_get_record($h, DNS_A + DNS_MX) || filter_var($h, FILTER_VALIDATE_IP))) { return true; } if ($h && @dns_get_record($h, DNS_CNAME + DNS_MX)) { diff --git a/src/Util/Profiler.php b/src/Util/Profiler.php index b42d0facca..e745a8bbdf 100644 --- a/src/Util/Profiler.php +++ b/src/Util/Profiler.php @@ -13,7 +13,7 @@ use Psr\Log\LoggerInterface; * A class to store profiling data * It can handle different logging data for specific functions or global performance measures * - * It stores the data as log entries (@see LoggerInterface ) + * It stores the data as log entries (@see LoggerInterface) */ class Profiler implements ContainerInterface { -- 2.39.5