0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 11:12:15 +02:00

PSR2 -> PSR12 formatting

This commit is contained in:
David Goodwin 2022-06-28 13:46:11 +01:00
parent bed0300fae
commit 2d6ded2786
42 changed files with 84 additions and 70 deletions

View File

@ -14,7 +14,7 @@ $config = new PhpCsFixer\Config();
return $config
->setFinder($finder)
->setRules(array(
'@PSR2' => true,
'@PSR12' => true,
'method_argument_space' => false, # don't break formatting in initStruct()
'no_spaces_inside_parenthesis' => false, # don't break formatting in initStruct()
));

View File

@ -1,4 +1,5 @@
<?php
// vim:ts=4:sw=4:et
ini_set('include_path', get_include_path() . ':' . dirname(__FILE__));

View File

@ -1,4 +1,5 @@
<?php
require_once(dirname(__FILE__) . '/common.php');
$xmlrpc = get_xmlrpc();

View File

@ -1,4 +1,5 @@
<?php
// vim:ts=4:sw=4:et
if (!defined('SM_PATH')) {
die("Invalid internal state (don't access file directly)");

View File

@ -1,4 +1,5 @@
<?php
//
// Postfix Admin
// by Mischa Peters <mischa at high5 dot net>

View File

@ -1,4 +1,5 @@
<?php
# $Id$
class AdminHandler extends PFAHandler

View File

@ -1,4 +1,5 @@
<?php
# $Id$
class AdminpasswordHandler extends PFAHandler

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**
* class to handle 'delete' in Cli
@ -6,7 +7,6 @@
class CliDelete extends Shell
{
/**
* Execution method always used for tasks
*/

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**

View File

@ -1,4 +1,5 @@
<?php
# $Id$
class CliHelp extends Shell
@ -17,7 +18,7 @@ class CliHelp extends Shell
public function help()
{
$handler = new $this->handler_to_use;
$handler = new $this->handler_to_use();
# TODO: adjust help text according to $handler->taskNames
$module = preg_replace('/Handler$/', '', $this->handler_to_use);

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**
* class to display the database scheme (for usage in upgrade.php) in Cli

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**
* class to handle 'view' in Cli
@ -6,7 +7,6 @@
class CliView extends Shell
{
/**
* Execution method always used for tasks
*/

View File

@ -1,4 +1,5 @@
<?php
# $Id$
# This class is too static - if you inherit a class from it, it will share the static $instance and all its contents

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**

View File

@ -1,4 +1,5 @@
<?php
# $Id$
/**

View File

@ -1,7 +1,7 @@
<?php
abstract class PFAHandler
{
/**
* public variables
*/

View File

@ -1,9 +1,9 @@
<?php
# $Id$
class VacationHandler extends PFAHandler
{
/**
* @var string
*/

View File

@ -1,2 +1,3 @@
<?php
require_once(dirname(__FILE__) . '/../common.php');

View File

@ -1,4 +1,5 @@
<?php
//
// File: index.php
//

View File

@ -1,4 +1,5 @@
<?php
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
# Note: run with upgrade.php?debug=1 to see all SQL error messages

View File

@ -69,7 +69,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$error = true;
flash_error(Config::lang('pPassword_password_text_error'));
} else {
$handler = $context === 'admin' ? new AdminHandler : new MailboxHandler;
$handler = $context === 'admin' ? new AdminHandler() : new MailboxHandler();
if (!$handler->checkPasswordRecoveryCode($tUsername, $tCode)) {
flash_error(Config::lang('pPassword_code_text_error'));
} else {

View File

@ -69,7 +69,6 @@ echo $server->handle();
class UserProxy
{
/**
* @param string $old_password
* @param string $new_password

View File

@ -208,7 +208,7 @@ class PostfixAdmin
# TODO: add a way to Cli* to signal if the selected handler is supported (for example, not all *Handler support changing the password)
if (strtolower(get_parent_class($shell)) == 'shell') {
$handler = new $shell->handler_to_use;
$handler = new $shell->handler_to_use();
if (in_array($task, $handler->taskNames)) {
$this->shiftArgs();
$shell->startup();

View File

@ -2,7 +2,6 @@
class Crypt
{
/**
* @access private
*/

View File

@ -9,8 +9,6 @@ require_once('RemoteTest.php');
class RemoteVacationTest extends RemoteTest
{
/**
* Adds the test recipient data to the database.
*/