Skip to content

Commit

Permalink
fix "single_line_comment_spacing"
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 21, 2024
1 parent 38df08e commit 23a3530
Show file tree
Hide file tree
Showing 22 changed files with 99 additions and 100 deletions.
1 change: 0 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
'no_useless_else' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_summary' => false,
'single_line_comment_spacing' => false,
'string_length_to_empty' => false,

// TODO - risky
Expand Down
6 changes: 3 additions & 3 deletions bin/install-jsdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if (($CACHEDIR = getenv('CACHEDIR')) && is_writable($CACHEDIR)) {
$CACHEDIR = sys_get_temp_dir();
}

//////////////// License definitions
// ////////////// License definitions

$LICENSES = [];
$LICENSES['MIT'] = <<<'EOM'
Expand Down Expand Up @@ -98,7 +98,7 @@ $LICENSES['LGPL'] = <<<'EOL'

EOL;

//////////////// Functions
// ////////////// Functions

/**
* Fetch package file from source
Expand Down Expand Up @@ -309,7 +309,7 @@ function delete_destfile($package)
}
}

//////////////// Execution
// ////////////// Execution

$args = rcube_utils::get_opt([
'f' => 'force:bool',
Expand Down
2 changes: 1 addition & 1 deletion bin/msgimport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (!isset($_SERVER['argv'][1]) || $_SERVER['argv'][1] == 'help') {

// prompt for username if not set
if (empty($args['user'])) {
//fwrite(STDOUT, "Please enter your name\n");
// fwrite(STDOUT, "Please enter your name\n");
echo 'IMAP user: ';
$args['user'] = trim(fgets(\STDIN));
}
Expand Down
8 changes: 4 additions & 4 deletions config/defaults.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
// See http://www.haproxy.org/download/1.6/doc/proxy-protocol.txt
// WARNING: Please note this is currently incompatible with implicit ssl,
// since the proxy protocol preamble is expected before the ssl handshake.
//$config['imap_conn_options'] = [
// $config['imap_conn_options'] = [
// 'ssl' => [
// 'verify_peer' => true,
// 'verify_depth' => 3,
Expand All @@ -171,7 +171,7 @@
// 'local_addr' => $_SERVER['SERVER_ADDR'], // optional
// 'local_port' => $_SERVER['SERVER_PORT'], // optional
// ],
//];
// ];
// Note: These can be also specified as an array of options indexed by hostname
$config['imap_conn_options'] = null;

Expand Down Expand Up @@ -413,7 +413,7 @@
'language' => ['locale'],
];

///// Example config for Gmail
// /// Example config for Gmail

// Register your service at https://console.developers.google.com/
// - use https://<your-roundcube-url>/index.php/login/oauth as redirect URL
Expand All @@ -429,7 +429,7 @@
// $config['oauth_scope'] = "email profile openid https://mail.google.com/";
// $config['oauth_auth_parameters'] = ['access_type' => 'offline', 'prompt' => 'consent'];

///// Example config for Outlook.com (Office 365)
// /// Example config for Outlook.com (Office 365)

// Register your OAuth client at https://portal.azure.com
// - use https://<your-roundcube-url>/index.php/login/oauth as redirect URL
Expand Down
2 changes: 1 addition & 1 deletion plugins/acl/acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ private function action_save()
*/
private function action_delete()
{
$mbox = trim(rcube_utils::get_input_string('_mbox', rcube_utils::INPUT_POST, true)); //UTF7-IMAP
$mbox = trim(rcube_utils::get_input_string('_mbox', rcube_utils::INPUT_POST, true)); // UTF7-IMAP
$user = trim(rcube_utils::get_input_string('_user', rcube_utils::INPUT_POST));

$user = explode(',', $user);
Expand Down
2 changes: 1 addition & 1 deletion plugins/enigma/lib/enigma_driver_phpssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private function parse_sig_cert($file, $validity)

$data = new enigma_signature();

$data->id = $cert['hash']; //?
$data->id = $cert['hash']; // ?
$data->valid = $validity;
$data->fingerprint = $cert['serialNumber'];
$data->created = $cert['validFrom_time_t'];
Expand Down
2 changes: 1 addition & 1 deletion plugins/managesieve/config.inc.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $config['managesieve_auth_pw'] = null;
// Connection socket context options
// See http://php.net/manual/en/context.ssl.php
// The example below enables server certificate validation
//$config['managesieve_conn_options'] = [
// $config['managesieve_conn_options'] = [
// 'ssl' => [
// 'verify_peer' => true,
// 'verify_depth' => 3,
Expand Down
2 changes: 1 addition & 1 deletion plugins/password/config.inc.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $config['password_dovecotpw_with_method'] = false;
// Must be at least 1000. If not set, then the number of rounds is left up
// to the crypt() implementation. On glibc this defaults to 5000.
// Be aware, the higher the value, the longer it takes to generate the password hashes.
//$config['password_crypt_rounds'] = 50000;
// $config['password_crypt_rounds'] = 50000;

// This option temporarily disables the password change functionality.
// Use it when the users database server is in maintenance mode or something like that.
Expand Down
14 changes: 7 additions & 7 deletions plugins/password/drivers/directadmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public function save($curpass, $passwd)

$response = $Socket->fetch_parsed_body();

//DEBUG
//rcube::console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");
// DEBUG
// rcube::console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");

if ($Socket->result_status_code != 200) {
return ['code' => PASSWORD_CONNECT_ERROR, 'message' => $Socket->error[0]];
Expand Down Expand Up @@ -243,9 +243,9 @@ public function query($request, $content = '')
$ch = curl_init($this->remote_host . ':' . $this->remote_port . $request);

if ($is_ssl) {
curl_setopt($ch, \CURLOPT_SSL_VERIFYPEER, false); //1
curl_setopt($ch, \CURLOPT_SSL_VERIFYHOST, false); //2
//curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
curl_setopt($ch, \CURLOPT_SSL_VERIFYPEER, false); // 1
curl_setopt($ch, \CURLOPT_SSL_VERIFYHOST, false); // 2
// curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
}

curl_setopt($ch, \CURLOPT_HTTP_VERSION, \CURL_HTTP_VERSION_1_1);
Expand Down Expand Up @@ -279,7 +279,7 @@ public function query($request, $content = '')
curl_setopt($ch, \CURLOPT_POST, 1);
curl_setopt($ch, \CURLOPT_POSTFIELDS, $content);

//$array_headers['Content-type'] = 'application/x-www-form-urlencoded';
// $array_headers['Content-type'] = 'application/x-www-form-urlencoded';
$array_headers['Content-length'] = strlen($content);
}

Expand Down Expand Up @@ -309,7 +309,7 @@ public function query($request, $content = '')

// now, if we're being passed a location header, should we follow it?
if ($this->doFollowLocationHeader) {
//dont bother if we didn't even setup the script correctly
// dont bother if we didn't even setup the script correctly
if (isset($headers['x-use-https']) && $headers['x-use-https'] == 'yes') {
exit($this->ssl_setting_message);
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/password/drivers/plesk.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function save($currpass, $newpass, $username)

// try to change password and return the status
$result = $plesk->change_mailbox_password($username, $newpass);
//$plesk->destroy();
// $plesk->destroy();

if ($result == 'ok') {
return PASSWORD_SUCCESS;
Expand Down
2 changes: 1 addition & 1 deletion plugins/password/drivers/ximss.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function save($pass, $newpass, $username)
fwrite($sock, '<passwordModify id="A002" oldPassword="' . $pass . '" newPassword="' . $newpass . '" />' . "\0");
fwrite($sock, '<bye id="A003" />' . "\0");

//example responses
// example responses
// <session id="A001" urlID="4815-vN2Txjkggy7gjHRD10jw" userName="user@example.com"/>\0
// <response id="A001"/>\0
// <response id="A002"/>\0
Expand Down
2 changes: 1 addition & 1 deletion program/actions/login/oauth_backchannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function run($args = [])
// default message
$answer = ['error' => 'invalid_request', 'error_description' => 'Error, no action'];

//Beware we are in back-channel from OP (IDP)
// Beware we are in back-channel from OP (IDP)
$logout_token = rcube_utils::get_input_string('logout_token', rcube_utils::INPUT_POST);

if (!empty($logout_token)) {
Expand Down
22 changes: 11 additions & 11 deletions program/include/rcmail_oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function __construct($options = [])
'identity_uri' => $this->rcmail->config->get('oauth_identity_uri'),
'identity_fields' => $this->rcmail->config->get('oauth_identity_fields', ['email']),
'user_create_map' => $this->rcmail->config->get('oauth_user_create_map', [
//rc key => OIDC Claim @see: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims )
// rc key => OIDC Claim @see: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims )
'user_name' => ['name'],
'user_email' => ['email'],
'language' => ['locale'],
Expand Down Expand Up @@ -228,12 +228,12 @@ protected function discover(): void
$response = $this->http_client->get($config_uri);
$data = json_decode($response->getBody(), true);

//sanity check
// sanity check
if (!isset($data['issuer'])) {
throw new RuntimeException('incorrect response from %s', $config_uri);
}

//cache answer
// cache answer
if ($this->cache) {
$this->cache->set($key_cache, $data);
}
Expand Down Expand Up @@ -298,7 +298,7 @@ protected function fetch_jwks(): void
$response = $this->http_client->get($jwks_uri);
$this->jwks = json_decode($response->getBody(), true);

//sanity check
// sanity check
if (!isset($this->jwks['keys'])) {
$this->log_debug('incorrect jwks response from %s', $jwks_uri);
} elseif ($this->cache) {
Expand Down Expand Up @@ -420,7 +420,7 @@ public function jwt_decode($jwt)

$header = json_decode(static::base64url_decode($headb64), true);
$body = json_decode(static::base64url_decode($bodyb64), true);
//$crypto = static::base64url_decode($cryptob64);
// $crypto = static::base64url_decode($cryptob64);

if ($this->options['jwks_uri']) {
// jwks_uri defined, will check JWT signature
Expand Down Expand Up @@ -807,7 +807,7 @@ public function schedule_token_revocation($sub): void
protected function is_token_revoked($token)
{
if ($this->cache === null) {
//oops cache not enabled
// oops cache not enabled
return false;
}

Expand Down Expand Up @@ -1179,7 +1179,7 @@ public function user_create($data)
$data[$rc_key] = $value;

$this->log_debug('user_create: setting %s=%s (from claim %s)', $rc_key, $value, $oidc_claim);
break; //no need to continue
break; // no need to continue
}
}
}
Expand All @@ -1200,7 +1200,7 @@ public function logout_after(array $options)

if ($this->logout_redirect_url) {
// propagate logout request to the identity provider
$this->rcmail->output->redirect($this->logout_redirect_url); //exit
$this->rcmail->output->redirect($this->logout_redirect_url); // exit
}
}

Expand Down Expand Up @@ -1230,7 +1230,7 @@ public function startup(array $args)
$oauth_handler = new rcmail_action_login_oauth_backchannel();
$oauth_handler->run();
} elseif ($args['task'] == 'logout') {
//handle only logout task
// handle only logout task
$this->handle_logout();
}

Expand All @@ -1256,10 +1256,10 @@ public function handle_logout(): void
switch ($this->check_token_validity($_SESSION['oauth_token'])) {
case self::TOKEN_REFRESHED:
case self::TOKEN_STILL_VALID:
//token still ok or refreshed
// token still ok or refreshed
break;
default:
//got an error, cannot request IDP to cleanup other sessions
// got an error, cannot request IDP to cleanup other sessions
return;
}

Expand Down
Loading

0 comments on commit 23a3530

Please sign in to comment.