Make all Enumerations classes abstract

This commit is contained in:
the-djmaze 2024-02-26 11:12:02 +01:00
parent 9ef11db895
commit e1dced8007
9 changed files with 10 additions and 20 deletions

View file

@ -16,6 +16,8 @@ namespace MailSo\Mime\Enumerations;
* @package Mime * @package Mime
* @subpackage Enumerations * @subpackage Enumerations
*/ */
//enum DkimStatus:string
//final class DkimStatus extends \BackedEnumString
abstract class DkimStatus abstract class DkimStatus
{ {
const NONE = 'none'; const NONE = 'none';

View file

@ -27,8 +27,7 @@ abstract class ConnectionSecurityType
{ {
$iPort = (int) $iPort; $iPort = (int) $iPort;
$iResult = (int) $iSecurityType; $iResult = (int) $iSecurityType;
if (self::AUTO_DETECT === $iSecurityType) if (self::AUTO_DETECT === $iSecurityType) {
{
switch (true) switch (true)
{ {
case 993 === $iPort: case 993 === $iPort:
@ -39,8 +38,7 @@ abstract class ConnectionSecurityType
} }
} }
if (self::SSL === $iResult && !\in_array('ssl', \stream_get_transports())) if (self::SSL === $iResult && !\in_array('ssl', \stream_get_transports())) {
{
$iResult = self::NONE; $iResult = self::NONE;
} }

View file

@ -2,7 +2,7 @@
namespace RainLoop\Enumerations; namespace RainLoop\Enumerations;
class Capa abstract class Capa
{ {
const GNUPG = 'GnuPG'; const GNUPG = 'GnuPG';
const OPEN_PGP = 'OpenPGP'; const OPEN_PGP = 'OpenPGP';
@ -16,5 +16,4 @@ class Capa
const QUOTA = 'Quota'; const QUOTA = 'Quota';
const ATTACHMENTS_ACTIONS = 'AttachmentsActions'; const ATTACHMENTS_ACTIONS = 'AttachmentsActions';
const DANGEROUS_ACTIONS = 'DangerousActions'; const DANGEROUS_ACTIONS = 'DangerousActions';
const AUTOLOGOUT = ''; // Obsolete
} }

View file

@ -2,7 +2,7 @@
namespace RainLoop\Enumerations; namespace RainLoop\Enumerations;
class Layout abstract class Layout
{ {
const NO_PREVIEW = 0; const NO_PREVIEW = 0;
const SIDE_PREVIEW = 1; const SIDE_PREVIEW = 1;

View file

@ -2,7 +2,7 @@
namespace RainLoop\Enumerations; namespace RainLoop\Enumerations;
class PluginPropertyType abstract class PluginPropertyType
{ {
const const
GROUP = 7, GROUP = 7,

View file

@ -2,7 +2,7 @@
namespace RainLoop\Enumerations; namespace RainLoop\Enumerations;
class SignMeType abstract class SignMeType
{ {
const DEFAULT_OFF = 'DefaultOff'; const DEFAULT_OFF = 'DefaultOff';
const DEFAULT_ON = 'DefaultOn'; const DEFAULT_ON = 'DefaultOn';

View file

@ -1,9 +0,0 @@
<?php
namespace RainLoop\Enumerations;
class TimeFormat
{
const F12 = '12';
const F24 = '24';
}

View file

@ -2,7 +2,7 @@
namespace RainLoop\Providers\AddressBook\Enumerations; namespace RainLoop\Providers\AddressBook\Enumerations;
class PropertyType abstract class PropertyType
{ {
const UNKNOWN = 0; const UNKNOWN = 0;

View file

@ -8,7 +8,7 @@ enum StorageType: int {
case USER = 1; case USER = 1;
} }
*/ */
class StorageType abstract class StorageType
{ {
const USER = 1; const USER = 1;
const CONFIG = 2; const CONFIG = 2;