Skip to content

Commit

Permalink
phpcs insists on some brace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoodwin committed Apr 13, 2021
1 parent bbec16a commit 2edabc3
Show file tree
Hide file tree
Showing 60 changed files with 926 additions and 466 deletions.
3 changes: 0 additions & 3 deletions .php_cs.dist
Expand Up @@ -13,9 +13,6 @@ return PhpCsFixer\Config::create()
->setFinder($finder)
->setRules(array(
'@PSR2' => true,
'braces' => array(
'position_after_functions_and_oop_constructs' => 'same',
),
'method_argument_space' => false, # don't break formatting in initStruct()
'no_spaces_inside_parenthesis' => false, # don't break formatting in initStruct()
));
Expand Down
18 changes: 12 additions & 6 deletions ADDITIONS/squirrelmail-plugin/functions.inc.php
Expand Up @@ -6,16 +6,19 @@
*/


function do_header() {
function do_header()
{
global $color;
displayPageHeader($color, 'None');
}

function do_footer() {
function do_footer()
{
echo "</body></html>";
}

function _display_password_form() {
function _display_password_form()
{
bindtextdomain('postfixadmin', SM_PATH . 'plugins/postfixadmin/locale');
textdomain('postfixadmin');
do_header('Postfixadmin Squirrelmail - Login');
Expand All @@ -31,7 +34,8 @@ function _display_password_form() {
/**
* This returns a Zend_XmlRpc_Client instance - unless we can't log you in...
*/
function get_xmlrpc() {
function get_xmlrpc()
{
global $CONF;
require_once('Zend/XmlRpc/Client.php');
$client = new Zend_XmlRpc_Client($CONF['xmlrpc_url']);
Expand Down Expand Up @@ -73,7 +77,8 @@ function get_xmlrpc() {
return $client;
}

function include_if_exists($filename) {
function include_if_exists($filename)
{
if (file_exists($filename)) {
include_once($filename);
}
Expand All @@ -87,7 +92,8 @@ function include_if_exists($filename) {
// Action: Checks if email is valid and returns TRUE if this is the case.
// Call: check_email (string email)
//
function check_email($email) {
function check_email($email)
{
$return = filter_var($email, FILTER_VALIDATE_EMAIL);
if ($return === false) {
return false;
Expand Down
9 changes: 6 additions & 3 deletions ADDITIONS/squirrelmail-plugin/setup.php
Expand Up @@ -5,18 +5,21 @@
}
include_once(SM_PATH . 'functions/i18n.php');

function squirrelmail_plugin_init_postfixadmin() {
function squirrelmail_plugin_init_postfixadmin()
{
include(dirname(__FILE__) . '/config.php');
global $squirrelmail_plugin_hooks;

$squirrelmail_plugin_hooks['optpage_register_block']['postfixadmin'] = 'postfixadmin_optpage_register_block';
}

function postfixadmin_version() {
function postfixadmin_version()
{
return '2.3.0';
}

function postfixadmin_optpage_register_block() {
function postfixadmin_optpage_register_block()
{
// Gets added to the user's OPTIONS page.
global $optpage_blocks;
global $AllowVacation;
Expand Down
3 changes: 2 additions & 1 deletion ADDITIONS/virtualmaildel.php
Expand Up @@ -46,7 +46,8 @@
//
// Recursive Delete Function
//
function deldir($dir) {
function deldir($dir)
{
$current_dir = opendir($dir);
while ($entryname = readdir($current_dir)) {
if (is_dir("$dir/$entryname") and ($entryname != "." and $entryname!="..")) {
Expand Down
3 changes: 2 additions & 1 deletion common.php
Expand Up @@ -36,7 +36,8 @@
* @param string $class
* __autoload implementation, for use with spl_autoload_register().
*/
function postfixadmin_autoload($class) {
function postfixadmin_autoload($class)
{
$PATH = dirname(__FILE__) . '/model/' . $class . '.php';

if (is_file($PATH)) {
Expand Down

0 comments on commit 2edabc3

Please sign in to comment.