]> git.agnieray.net Git - galette.git/commitdiff
CS: declare visibility for constants
authorJohan Cwiklinski <johan@x-tnd.be>
Fri, 31 Jul 2020 13:47:03 +0000 (15:47 +0200)
committerJohan Cwiklinski <johan@x-tnd.be>
Fri, 31 Jul 2020 13:47:03 +0000 (15:47 +0200)
52 files changed:
galette/lib/Galette/Common/XHProf.php
galette/lib/Galette/Core/AbstractPassword.php
galette/lib/Galette/Core/Authentication.php
galette/lib/Galette/Core/GaletteMail.php
galette/lib/Galette/Core/History.php
galette/lib/Galette/Core/I18n.php
galette/lib/Galette/Core/Install.php
galette/lib/Galette/Core/Links.php
galette/lib/Galette/Core/Login.php
galette/lib/Galette/Core/Mailing.php
galette/lib/Galette/Core/MailingHistory.php
galette/lib/Galette/Core/Pagination.php
galette/lib/Galette/Core/Password.php
galette/lib/Galette/Core/Picture.php
galette/lib/Galette/Core/Plugins.php
galette/lib/Galette/DynamicFields/DynamicField.php
galette/lib/Galette/Entity/Adherent.php
galette/lib/Galette/Entity/Contribution.php
galette/lib/Galette/Entity/ContributionsTypes.php
galette/lib/Galette/Entity/Entitled.php
galette/lib/Galette/Entity/FieldsCategories.php
galette/lib/Galette/Entity/FieldsConfig.php
galette/lib/Galette/Entity/Group.php
galette/lib/Galette/Entity/ImportModel.php
galette/lib/Galette/Entity/PaymentType.php
galette/lib/Galette/Entity/Reminder.php
galette/lib/Galette/Entity/SavedSearch.php
galette/lib/Galette/Entity/Status.php
galette/lib/Galette/Entity/Texts.php
galette/lib/Galette/Entity/Title.php
galette/lib/Galette/Entity/Transaction.php
galette/lib/Galette/Filters/ContributionsList.php
galette/lib/Galette/Filters/HistoryList.php
galette/lib/Galette/Filters/MailingsList.php
galette/lib/Galette/Filters/SavedSearchesList.php
galette/lib/Galette/IO/Charts.php
galette/lib/Galette/IO/Csv.php
galette/lib/Galette/IO/CsvIn.php
galette/lib/Galette/IO/CsvOut.php
galette/lib/Galette/IO/FileInterface.php
galette/lib/Galette/IO/Pdf.php
galette/lib/Galette/IO/PdfAttendanceSheet.php
galette/lib/Galette/IO/PdfGroups.php
galette/lib/Galette/IO/PdfMembersCards.php
galette/lib/Galette/Middleware/UpdateAndMaintenance.php
galette/lib/Galette/Repository/Contributions.php
galette/lib/Galette/Repository/Reminders.php
galette/lib/Galette/Repository/SavedSearches.php
galette/lib/Galette/Repository/Titles.php
galette/lib/Galette/Repository/Transactions.php
galette/lib/Galette/Updater/AbstractUpdater.php
galette/lib/Galette/Util/FakeData.php

index 9830a5d5e31be6e35e52a4812f458b99866d2dbc..23e3c7fa7da17185ab1e25b913ea718c52338996 100644 (file)
@@ -74,8 +74,8 @@ class XHProf
 {
 
     // this can be overloaded in config/config_path.php
-    const XHPROF_PATH = '/usr/share/xhprof/xhprof_lib';
-    const XHPROF_URL  = '/xhprof';
+    public const XHPROF_PATH = '/usr/share/xhprof/xhprof_lib';
+    public const XHPROF_URL  = '/xhprof';
 
     private static $run = false;
 
index 47f749901adb3f6615995e5124e48b2d5dd064db..9334c6463fa10c8a7d84673c1cb0dfca7a756174 100644 (file)
@@ -61,7 +61,7 @@ use Galette\Entity\Adherent;
 abstract class AbstractPassword
 {
     /** Default password size */
-    const DEFAULT_SIZE = 8;
+    public const DEFAULT_SIZE = 8;
 
     protected $chars = 'abcdefghjkmnpqrstuvwxyz0123456789';
     protected $hash = null;
index 9f0b75109f1eef2b55cdd83c9dce9e1f53ec369a..4063c5c1ca3ee4db15ca7dcf23d7c7e91043d32e 100644 (file)
@@ -51,11 +51,11 @@ namespace Galette\Core;
 
 abstract class Authentication
 {
-    const ACCESS_USER = 0;
-    const ACCESS_MANAGER = 1;
-    const ACCESS_STAFF = 2;
-    const ACCESS_ADMIN = 3;
-    const ACCESS_SUPERADMIN = 4;
+    public const ACCESS_USER = 0;
+    public const ACCESS_MANAGER = 1;
+    public const ACCESS_STAFF = 2;
+    public const ACCESS_ADMIN = 3;
+    public const ACCESS_SUPERADMIN = 4;
 
     private $login;
     private $name;
index 959e66ee3e922fb3096f05dd291b9b9a6a43eb2b..da9caa6fff5a59c858f3de3aa71d992cbf39e43c 100644 (file)
@@ -53,19 +53,19 @@ use PHPMailer\PHPMailer\PHPMailer;
  */
 class GaletteMail
 {
-    const MAIL_ERROR = 0;
-    const MAIL_SENT = 1;
-
-    const METHOD_DISABLED = 0;
-    const METHOD_PHPMAIL = 1;
-    const METHOD_SMTP = 2;
-    const METHOD_QMAIL = 3;
-    const METHOD_GMAIL = 4;
-    const METHOD_SENDMAIL = 5;
-
-    const SENDER_PREFS = 0;
-    const SENDER_CURRENT = 1;
-    const SENDER_OTHER = 2;
+    public const MAIL_ERROR = 0;
+    public const MAIL_SENT = 1;
+
+    public const METHOD_DISABLED = 0;
+    public const METHOD_PHPMAIL = 1;
+    public const METHOD_SMTP = 2;
+    public const METHOD_QMAIL = 3;
+    public const METHOD_GMAIL = 4;
+    public const METHOD_SENDMAIL = 5;
+
+    public const SENDER_PREFS = 0;
+    public const SENDER_CURRENT = 1;
+    public const SENDER_OTHER = 2;
 
     private $sender_name;
     private $sender_address;
index 648212cb5495a31ce537e33ba16227c034ce6328..9b87e073d641eb279bbafb6b1755f1b082f488b6 100644 (file)
@@ -57,8 +57,8 @@ use Galette\Core\Preferences;
 
 class History
 {
-    const TABLE = 'logs';
-    const PK = 'id_log';
+    public const TABLE = 'logs';
+    public const PK = 'id_log';
 
     protected $count;
     protected $zdb;
index cc0626eb368e80ef128f334c8dea1371b0b431ae..bf9f8efb2d48916bf3b4bac8472518e8e44ba8b0 100644 (file)
@@ -58,7 +58,7 @@ class I18n
     private $name;
     private $abbrev;
 
-    const DEFAULT_LANG = 'fr_FR';
+    public const DEFAULT_LANG = 'fr_FR';
 
     private $dir = 'lang/';
     private $path;
index 03231537934eb381ec6c9b6768d274ad05e8bdf1..33c58044a683162628d183424963edd3db2671e3 100644 (file)
@@ -53,19 +53,19 @@ use Laminas\Db\Adapter\Adapter;
  */
 class Install
 {
-    const STEP_CHECK = 0;
-    const STEP_TYPE = 1;
-    const STEP_DB = 2;
-    const STEP_DB_CHECKS = 3;
-    const STEP_VERSION = 4; //only for update
-    const STEP_DB_UPGRADE = 5;
-    const STEP_DB_INSTALL = 6;
-    const STEP_ADMIN = 7;
-    const STEP_GALETTE_INIT = 8;
-    const STEP_END = 9;
-
-    const INSTALL = 'i';
-    const UPDATE = 'u';
+    public const STEP_CHECK = 0;
+    public const STEP_TYPE = 1;
+    public const STEP_DB = 2;
+    public const STEP_DB_CHECKS = 3;
+    public const STEP_VERSION = 4; //only for update
+    public const STEP_DB_UPGRADE = 5;
+    public const STEP_DB_INSTALL = 6;
+    public const STEP_ADMIN = 7;
+    public const STEP_GALETTE_INIT = 8;
+    public const STEP_END = 9;
+
+    public const INSTALL = 'i';
+    public const UPDATE = 'u';
 
     //db version/galette version mapper
     private $versions_mapper = array(
index 1462d7a13783f081ecd6d546f3345cfe51cb8f35..db8f499b6e1a40e2d10c3b70dd9cfc57c8fef745 100644 (file)
@@ -56,12 +56,12 @@ use Galette\Entity\Contribution;
 
 class Links
 {
-    const TABLE = 'tmplinks';
-    const PK = 'hash';
+    public const TABLE = 'tmplinks';
+    public const PK = 'hash';
 
-    const TARGET_MEMBERCARD = 1;
-    const TARGET_INVOICE    = 2;
-    const TARGET_RECEIPT    = 3;
+    public const TARGET_MEMBERCARD = 1;
+    public const TARGET_INVOICE    = 2;
+    public const TARGET_RECEIPT    = 3;
 
     private $zdb;
 
index 687ad1c28b279bdccec3600d64422042acc80fbb..090e0fdaa6ca6399b0a10265a63ffed5a6701615 100644 (file)
@@ -58,8 +58,8 @@ use RKA\Session;
  */
 class Login extends Authentication
 {
-    const TABLE = Adherent::TABLE;
-    const PK = 'login_adh';
+    public const TABLE = Adherent::TABLE;
+    public const PK = 'login_adh';
 
     private $zdb;
     private $i18n;
index 5b1013a90ea84a2253aae627d06b5b908adcf0b5..995a0950f96c903123dcb3ef3598524c9ed28506 100644 (file)
@@ -54,14 +54,14 @@ use Galette\IO\File;
  */
 class Mailing extends GaletteMail
 {
-    const STEP_START = 0;
-    const STEP_PREVIEW = 1;
-    const STEP_SEND = 2;
-    const STEP_SENT = 3;
-
-    const MIME_HTML = 'text/html';
-    const MIME_TEXT = 'text/plain';
-    const MIME_DEFAULT = self::MIME_TEXT;
+    public const STEP_START = 0;
+    public const STEP_PREVIEW = 1;
+    public const STEP_SEND = 2;
+    public const STEP_SENT = 3;
+
+    public const MIME_HTML = 'text/html';
+    public const MIME_TEXT = 'text/plain';
+    public const MIME_DEFAULT = self::MIME_TEXT;
 
     private $id;
 
index ed643095c1412e0f3d454d404bc71d5a07bbe736..1a0a581f949c430ad65d2f72c722a607c6a15991 100644 (file)
@@ -57,12 +57,12 @@ use Laminas\Db\Sql\Expression;
  */
 class MailingHistory extends History
 {
-    const TABLE = 'mailing_history';
-    const PK = 'mailing_id';
+    public const TABLE = 'mailing_history';
+    public const PK = 'mailing_id';
 
-    const FILTER_DC_SENT = 0;
-    const FILTER_SENT = 1;
-    const FILTER_NOT_SENT = 2;
+    public const FILTER_DC_SENT = 0;
+    public const FILTER_SENT = 1;
+    public const FILTER_NOT_SENT = 2;
 
     private $mailing = null;
     private $id;
index c61dd347fa27eb7f40522203ff5dcc6383b37eb3..1f7f417d75a0afa897847017d94e837c2aa7fa7b 100644 (file)
@@ -63,8 +63,8 @@ abstract class Pagination
     protected $view;
     protected $router;
 
-    const ORDER_ASC = 'ASC';
-    const ORDER_DESC = 'DESC';
+    public const ORDER_ASC = 'ASC';
+    public const ORDER_DESC = 'DESC';
 
     protected $pagination_fields = array(
         'current_page',
index c144545b38649197b28a2c199c10ca5ece3978fd..74cd7552a108a7d7dfca3a7fc29580e11b285c89 100644 (file)
@@ -59,8 +59,8 @@ use Galette\Entity\Adherent;
 
 class Password extends AbstractPassword
 {
-    const TABLE = 'tmppasswds';
-    const PK = Adherent::PK;
+    public const TABLE = 'tmppasswds';
+    public const PK = Adherent::PK;
 
     private $zdb;
 
index 5903bd64150994cdabc187290e54cf627a28dfcf..12b95e0d7c40653e3789730978c6a1ab79c12dcc 100644 (file)
@@ -59,12 +59,12 @@ class Picture implements FileInterface
     use FileTrait;
 
     //constants that will not be overrided
-    const SQL_ERROR = -10;
-    const SQL_BLOB_ERROR = -11;
+    public const SQL_ERROR = -10;
+    public const SQL_BLOB_ERROR = -11;
     //constants that can be overrided
     //(do not use self::CONSTANT, but get_class[$this]::CONSTANT)
-    const TABLE = 'pictures';
-    const PK = Adherent::PK;
+    public const TABLE = 'pictures';
+    public const PK = Adherent::PK;
 
     protected $tbl_prefix = '';
 
index 4ca8f816f4c66001ccb9a9d23dd3ae0f7079111e..c7c6f09c72de42ecb54b7d5cc8c7a401749c8658 100644 (file)
@@ -55,9 +55,9 @@ use Galette\Core\Preferences;
 
 class Plugins
 {
-    const DISABLED_COMPAT   = 0;
-    const DISABLED_MISS     = 1;
-    const DISABLED_EXPLICIT = 2;
+    public const DISABLED_COMPAT   = 0;
+    public const DISABLED_MISS     = 1;
+    public const DISABLED_EXPLICIT = 2;
 
     protected $path;
     protected $modules = array();
index bb080e8d95ed1313c70fc413159b6099d76d893a..4b2523b938909b48d8742a9337ae0650e8613320 100644 (file)
@@ -62,32 +62,32 @@ abstract class DynamicField
     use TranslatableTrait;
     use I18nTrait;
 
-    const TABLE = 'field_types';
-    const PK = 'field_id';
+    public const TABLE = 'field_types';
+    public const PK = 'field_id';
 
     /** Separator field */
-    const SEPARATOR = 0;
+    public const SEPARATOR = 0;
     /** Simple text field */
-    const TEXT = 1;
+    public const TEXT = 1;
     /** Line field */
-    const LINE = 2;
+    public const LINE = 2;
     /** Choice field (listbox) */
-    const CHOICE = 3;
+    public const CHOICE = 3;
     /** Date field */
-    const DATE = 4;
+    public const DATE = 4;
     /** Boolean field (checkbox) */
-    const BOOLEAN = 5;
+    public const BOOLEAN = 5;
     /** File field (upload) */
-    const FILE = 6;
+    public const FILE = 6;
 
-    const PERM_USER_WRITE = 0;
-    const PERM_ADMIN = 1;
-    const PERM_STAFF = 2;
-    const PERM_MANAGER = 3;
-    const PERM_USER_READ = 4;
+    public const PERM_USER_WRITE = 0;
+    public const PERM_ADMIN = 1;
+    public const PERM_STAFF = 2;
+    public const PERM_MANAGER = 3;
+    public const PERM_USER_READ = 4;
 
-    const DEFAULT_MAX_FILE_SIZE = 1024;
-    const VALUES_FIELD_LENGTH = 100;
+    public const DEFAULT_MAX_FILE_SIZE = 1024;
+    public const VALUES_FIELD_LENGTH = 100;
 
     protected $has_data = false;
     protected $has_width = false;
index 83d88bcb5b71d373dbe662125d7044b59eeb2906..3c5e2e0ed2664436a57c6412498d0b9df527c98c 100644 (file)
@@ -63,19 +63,19 @@ class Adherent
 {
     use DynamicsTrait;
 
-    const TABLE = 'adherents';
-    const PK = 'id_adh';
-
-    const NC = 0;
-    const MAN = 1;
-    const WOMAN = 2;
-
-    const AFTER_ADD_DEFAULT = 0;
-    const AFTER_ADD_TRANS = 1;
-    const AFTER_ADD_NEW = 2;
-    const AFTER_ADD_SHOW = 3;
-    const AFTER_ADD_LIST = 4;
-    const AFTER_ADD_HOME = 5;
+    public const TABLE = 'adherents';
+    public const PK = 'id_adh';
+
+    public const NC = 0;
+    public const MAN = 1;
+    public const WOMAN = 2;
+
+    public const AFTER_ADD_DEFAULT = 0;
+    public const AFTER_ADD_TRANS = 1;
+    public const AFTER_ADD_NEW = 2;
+    public const AFTER_ADD_SHOW = 3;
+    public const AFTER_ADD_LIST = 4;
+    public const AFTER_ADD_HOME = 5;
 
     private $_id;
     //Identity
index 0da7f96b7c5f1602f076d338d57683c533236fd3..b73ae726e5f79a87838579d4f714410fad30e52c 100644 (file)
@@ -60,8 +60,8 @@ class Contribution
 {
     use DynamicsTrait;
 
-    const TABLE = 'cotisations';
-    const PK = 'id_cotis';
+    public const TABLE = 'cotisations';
+    public const PK = 'id_cotis';
 
     private $_id;
     private $_date;
index 1c9e567fe49e3e985fc64d5cf95c4c60c0d0359e..c99da09157dee463a9f7880303119e82bffb7c95 100644 (file)
@@ -53,13 +53,13 @@ use Galette\Core\Db;
 
 class ContributionsTypes extends Entitled
 {
-    const DEFAULT_TYPE = 1;
-    const TABLE = 'types_cotisation';
-    const PK = 'id_type_cotis';
-    const LABEL_FIELD = 'libelle_type_cotis';
-    const EXT_FIELD = 'cotis_extension';
+    public const DEFAULT_TYPE = 1;
+    public const TABLE = 'types_cotisation';
+    public const PK = 'id_type_cotis';
+    public const LABEL_FIELD = 'libelle_type_cotis';
+    public const EXT_FIELD = 'cotis_extension';
 
-    const ID_NOT_EXITS = -1;
+    public const ID_NOT_EXITS = -1;
 
     public static $fields = array(
         'id'        => 'id_type_cotis',
index 0e16d5983cbe15de68cb096bec43d385b7351b4c..e390ed7e4166716ca02b71f55cea12cc3cc612f2 100644 (file)
@@ -61,7 +61,7 @@ abstract class Entitled
 {
     use I18nTrait;
 
-    const ID_NOT_EXITS = -1;
+    public const ID_NOT_EXITS = -1;
 
     private $zdb;
     private $table;
index 685508eb2839830ee3de40d192aa1df027da3213..958dd76c533bf17bc83d53a6e23979c606d0bb3f 100644 (file)
@@ -54,16 +54,16 @@ use Galette\Core\Db;
 
 class FieldsCategories
 {
-    const TABLE = 'fields_categories';
-    const PK = 'id_field_category';
+    public const TABLE = 'fields_categories';
+    public const PK = 'id_field_category';
 
     private $defaults;
 
     private $zdb;
 
-    const ADH_CATEGORY_IDENTITY = 1;
-    const ADH_CATEGORY_GALETTE = 2;
-    const ADH_CATEGORY_CONTACT = 3;
+    public const ADH_CATEGORY_IDENTITY = 1;
+    public const ADH_CATEGORY_GALETTE = 2;
+    public const ADH_CATEGORY_CONTACT = 3;
 
     /**
      * Default constructor
index 767a34b4e4a9f16781d5f89e4d96f6cbda20f246..29e43069ae6d9fd022ca799b0642505af7a771be 100644 (file)
@@ -59,25 +59,25 @@ use Galette\Core\Authentication;
  */
 class FieldsConfig
 {
-    const NOBODY = 0;
-    const USER_WRITE = 1;
-    const ADMIN = 2;
-    const STAFF = 3;
-    const MANAGER = 4;
-    const USER_READ = 5;
-
-    const TYPE_STR = 0;
-    const TYPE_HIDDEN = 1;
-    const TYPE_BOOL = 2;
-    const TYPE_INT = 3;
-    const TYPE_DEC = 4;
-    const TYPE_DATE = 5;
-    const TYPE_TXT = 6;
-    const TYPE_PASS = 7;
-    const TYPE_EMAIL = 8;
-    const TYPE_URL = 9;
-    const TYPE_RADIO = 10;
-    const TYPE_SELECT = 11;
+    public const NOBODY = 0;
+    public const USER_WRITE = 1;
+    public const ADMIN = 2;
+    public const STAFF = 3;
+    public const MANAGER = 4;
+    public const USER_READ = 5;
+
+    public const TYPE_STR = 0;
+    public const TYPE_HIDDEN = 1;
+    public const TYPE_BOOL = 2;
+    public const TYPE_INT = 3;
+    public const TYPE_DEC = 4;
+    public const TYPE_DATE = 5;
+    public const TYPE_TXT = 6;
+    public const TYPE_PASS = 7;
+    public const TYPE_EMAIL = 8;
+    public const TYPE_URL = 9;
+    public const TYPE_RADIO = 10;
+    public const TYPE_SELECT = 11;
 
     protected $zdb;
     protected $core_db_fields = array();
@@ -99,7 +99,7 @@ class FieldsConfig
         'bool_admin_adh'
     );
 
-    const TABLE = 'fields_config';
+    public const TABLE = 'fields_config';
 
     /*
      * Fields that are not visible in the
index 4f648ec4847d40d2d96de3fa65a4a7e4df130611..939f8e2bd9ea213d840a6ef6ab129da37798c52a 100644 (file)
@@ -54,14 +54,14 @@ use Laminas\Db\Sql\Expression;
  */
 class Group
 {
-    const TABLE = 'groups';
-    const PK = 'id_group';
+    public const TABLE = 'groups';
+    public const PK = 'id_group';
     //relations tables
-    const GROUPSUSERS_TABLE = 'groups_members';
-    const GROUPSMANAGERS_TABLE = 'groups_managers';
+    public const GROUPSUSERS_TABLE = 'groups_members';
+    public const GROUPSMANAGERS_TABLE = 'groups_managers';
 
-    const MEMBER_TYPE = 0;
-    const MANAGER_TYPE = 1;
+    public const MEMBER_TYPE = 0;
+    public const MANAGER_TYPE = 1;
 
     private $id;
     private $group_name;
index 069ac65195b8d9c4338c47af0f3d9351b6bcb2c5..84b4096df7cb1f3b1aa9921643a36b0b3fb31288 100644 (file)
@@ -53,8 +53,8 @@ use Laminas\Db\Adapter\Adapter;
  */
 class ImportModel
 {
-    const TABLE = 'import_model';
-    const PK = 'model_id';
+    public const TABLE = 'import_model';
+    public const PK = 'model_id';
 
     private $id;
     private $fields;
index 84ab31f1f6f081a437e01c83b699320457d6f693..606716eeeba2258682fb4b76bf0063c92dbbc602 100644 (file)
@@ -60,18 +60,18 @@ class PaymentType
     use TranslatableTrait;
     use I18nTrait;
 
-    const TABLE = 'paymenttypes';
-    const PK = 'type_id';
+    public const TABLE = 'paymenttypes';
+    public const PK = 'type_id';
 
     private $zdb;
     private $id;
 
-    const OTHER = 6;
-    const CASH = 1;
-    const CREDITCARD = 2;
-    const CHECK = 3;
-    const TRANSFER = 4;
-    const PAYPAL = 5;
+    public const OTHER = 6;
+    public const CASH = 1;
+    public const CREDITCARD = 2;
+    public const CHECK = 3;
+    public const TRANSFER = 4;
+    public const PAYPAL = 5;
 
     /**
      * Main constructor
index 9cff34da922c9b81509f4885920ace18bcc0bf39..77a4b201d7e2a33907b86d27e4b01bfbe574c8a9 100644 (file)
@@ -58,8 +58,8 @@ use Galette\Core\History;
 
 class Reminder
 {
-    const TABLE = 'reminders';
-    const PK = 'reminder_id';
+    public const TABLE = 'reminders';
+    public const PK = 'reminder_id';
 
     private $id;
     private $type;
@@ -71,8 +71,8 @@ class Reminder
     private $replaces;
     private $msg;
 
-    const IMPENDING = 1;
-    const LATE = 2;
+    public const IMPENDING = 1;
+    public const LATE = 2;
 
     /**
      * Main constructor
index 80e3e7128cfafb65125d0e9671620ad857237170..2a016a6e6703a9934aee0ceba250ebe57f679b4a 100644 (file)
@@ -56,8 +56,8 @@ use Analog\Analog;
 
 class SavedSearch
 {
-    const TABLE = 'searches';
-    const PK = 'search_id';
+    public const TABLE = 'searches';
+    public const PK = 'search_id';
 
     private $zdb;
     private $id;
index cd5808c4025184185700c3c1b1d11d31185866c8..26230ec7a7e7d617a051e3899355e94ad2bd60ae 100644 (file)
@@ -52,13 +52,13 @@ use Galette\Core\Db;
  */
 class Status extends Entitled
 {
-    const DEFAULT_STATUS = 9;
-    const TABLE = 'statuts';
-    const PK = 'id_statut';
-    const LABEL_FIELD = 'libelle_statut';
-    const ORDER_FIELD = 'priorite_statut';
+    public const DEFAULT_STATUS = 9;
+    public const TABLE = 'statuts';
+    public const PK = 'id_statut';
+    public const LABEL_FIELD = 'libelle_statut';
+    public const ORDER_FIELD = 'priorite_statut';
 
-    const ID_NOT_EXITS = -1;
+    public const ID_NOT_EXITS = -1;
 
     public static $fields = array(
         'id'        => 'id_statut',
index 97e3e9289eb935c70c8f6b94a78c697225563859..8ea09e6c9ef5ab409437c4b7069fa66ac48860fc 100644 (file)
@@ -58,9 +58,9 @@ use Slim\Router;
 class Texts
 {
     private $all_texts;
-    const TABLE = "texts";
-    const PK = 'tid';
-    const DEFAULT_REF = 'sub';
+    public const TABLE = "texts";
+    public const PK = 'tid';
+    public const DEFAULT_REF = 'sub';
 
     private $patterns;
     private $replaces;
index f7733987f834aa8a326659164b71a58e8accdfe6..2c733e1730db8697af6e400fa541c12c5d8b747a 100644 (file)
@@ -53,16 +53,16 @@ use Analog\Analog;
 
 class Title
 {
-    const TABLE = 'titles';
-    const PK = 'id_title';
+    public const TABLE = 'titles';
+    public const PK = 'id_title';
 
     private $id;
     private $short;
     private $long;
 
-    const MR = 1;
-    const MRS = 2;
-    const MISS = 3;
+    public const MR = 1;
+    public const MRS = 2;
+    public const MISS = 3;
 
     /**
      * Main constructor
index df58c0168c2eac429af409db00de446985de0d4c..a7079b3bdba9f67353ee4db171c3664d091fe01e 100644 (file)
@@ -59,8 +59,8 @@ class Transaction
 {
     use DynamicsTrait;
 
-    const TABLE = 'transactions';
-    const PK = 'trans_id';
+    public const TABLE = 'transactions';
+    public const PK = 'trans_id';
 
     private $_id;
     private $_date;
index e2b78a591897799c581c920487ed847406a089e0..c44c193b9ad5e5a6c8b13c69cec797905af4f425 100644 (file)
@@ -55,18 +55,18 @@ use Galette\Core\Pagination;
 class ContributionsList extends Pagination
 {
 
-    const ORDERBY_DATE = 0;
-    const ORDERBY_BEGIN_DATE = 1;
-    const ORDERBY_END_DATE = 2;
-    const ORDERBY_MEMBER = 3;
-    const ORDERBY_TYPE = 4;
-    const ORDERBY_AMOUNT = 5;
-    const ORDERBY_DURATION = 6;
-    const ORDERBY_PAYMENT_TYPE = 7;
+    public const ORDERBY_DATE = 0;
+    public const ORDERBY_BEGIN_DATE = 1;
+    public const ORDERBY_END_DATE = 2;
+    public const ORDERBY_MEMBER = 3;
+    public const ORDERBY_TYPE = 4;
+    public const ORDERBY_AMOUNT = 5;
+    public const ORDERBY_DURATION = 6;
+    public const ORDERBY_PAYMENT_TYPE = 7;
 
-    const DATE_BEGIN = 0;
-    const DATE_END = 1;
-    const DATE_RECORD = 2;
+    public const DATE_BEGIN = 0;
+    public const DATE_END = 1;
+    public const DATE_RECORD = 2;
 
     //filters
     private $date_field = null;
index 198149469cf7f83cc5025630a76c0c363e3e22c1..325560c33d10afc095b417771f41dc77d6f9053e 100644 (file)
@@ -54,10 +54,10 @@ use Galette\Core\Pagination;
 
 class HistoryList extends Pagination
 {
-    const ORDERBY_DATE = 0;
-    const ORDERBY_IP = 1;
-    const ORDERBY_USER = 2;
-    const ORDERBY_ACTION = 3;
+    public const ORDERBY_DATE = 0;
+    public const ORDERBY_IP = 1;
+    public const ORDERBY_USER = 2;
+    public const ORDERBY_ACTION = 3;
 
     //filters
     private $start_date_filter = null;
index 44754d7ac9abd85eed701400bf316c81df99d981..e5b479ad34c6be3e0b725edac9237eb4d57f89ba 100644 (file)
@@ -55,10 +55,10 @@ use Galette\Core\MailingHistory;
 
 class MailingsList extends Pagination
 {
-    const ORDERBY_DATE = 0;
-    const ORDERBY_SENDER = 1;
-    const ORDERBY_SUBJECT = 2;
-    const ORDERBY_SENT = 3;
+    public const ORDERBY_DATE = 0;
+    public const ORDERBY_SENDER = 1;
+    public const ORDERBY_SUBJECT = 2;
+    public const ORDERBY_SENT = 3;
 
     //filters
     private $start_date_filter = null;
index bbe5f41a7f5a74a4320280dcd000511f8960347f..e13058bf6c9888195de93a43439fe150694aef18 100644 (file)
@@ -56,7 +56,7 @@ use Galette\Repository\Members;
 
 class SavedSearchesList extends Pagination
 {
-    const ORDERBY_DATE = 0;
+    public const ORDERBY_DATE = 0;
 
     /**
      * Returns the field we want to default set order to
index 369adf2183d0f85fe47ca2e7555bbbc6627af657..b835453ec09e6444da31582e034e3d0e0bcd8dd1 100644 (file)
@@ -59,12 +59,12 @@ use Galette\Repository\Members;
  */
 class Charts
 {
-    const DEFAULT_CHART = 'MembersStatusPie';
-    const MEMBERS_STATUS_PIE = 'MembersStatusPie';
-    const MEMBERS_STATEDUE_PIE = 'MembersStateDuePie';
-    const CONTRIBS_TYPES_PIE = 'ContribsTypesPie';
-    const COMPANIES_OR_NOT = 'CompaniesOrNot';
-    const CONTRIBS_ALLTIME = 'ContribsAllTime';
+    public const DEFAULT_CHART = 'MembersStatusPie';
+    public const MEMBERS_STATUS_PIE = 'MembersStatusPie';
+    public const MEMBERS_STATEDUE_PIE = 'MembersStateDuePie';
+    public const CONTRIBS_TYPES_PIE = 'ContribsTypesPie';
+    public const COMPANIES_OR_NOT = 'CompaniesOrNot';
+    public const CONTRIBS_ALLTIME = 'ContribsAllTime';
 
     private $types;
     private $charts;
index 1a703f9ec9d2dda61d0e1bee0382df106c22ed87..ddfce772f3e8dcd7e0b32d432abb4930c69a52c3 100644 (file)
@@ -53,14 +53,14 @@ use Analog\Analog;
 
 abstract class Csv
 {
-    const NEWLINE = "\r\n";
-    const BUFLINES = 100;
+    public const NEWLINE = "\r\n";
+    public const BUFLINES = 100;
 
-    const DEFAULT_SEPARATOR = ';';
-    const DEFAULT_QUOTE = '"';
+    public const DEFAULT_SEPARATOR = ';';
+    public const DEFAULT_QUOTE = '"';
 
-    const FILE_NOT_WRITABLE = -1;
-    const DB_ERROR = -2;
+    public const FILE_NOT_WRITABLE = -1;
+    public const DB_ERROR = -2;
 
     protected $separator;
     protected $quote;
index 412d3f8aff37d30eda3ac5206dc6bd1e4968dbd6..12fe0373f402a1a620198a66b947711074334030 100644 (file)
@@ -66,8 +66,8 @@ class CsvIn extends Csv implements FileInterface
 {
     use FileTrait;
 
-    const DEFAULT_DIRECTORY = GALETTE_IMPORTS_PATH;
-    const DATA_IMPORT_ERROR = -10;
+    public const DEFAULT_DIRECTORY = GALETTE_IMPORTS_PATH;
+    public const DATA_IMPORT_ERROR = -10;
 
     protected $extensions = array('csv', 'txt');
 
index 9f05d4385a9985bdc91b3535719b531aec48f1c4..5642ce5f57d0a539ee8d39a0c76055492e4c80ee 100644 (file)
@@ -54,7 +54,7 @@ use Laminas\Db\Adapter\Adapter;
 
 class CsvOut extends Csv
 {
-    const DEFAULT_DIRECTORY = GALETTE_EXPORTS_PATH;
+    public const DEFAULT_DIRECTORY = GALETTE_EXPORTS_PATH;
 
     private $rs;
     private $parameted_path;
index 73f23260c5efb70a36e0db25a9c7116e84b27105..7deb2de691f0f19ee0a1468329473fe0ecf41109 100644 (file)
@@ -51,12 +51,12 @@ namespace Galette\IO;
 
 interface FileInterface
 {
-    const INVALID_FILENAME = -1;
-    const INVALID_EXTENSION = -2;
-    const FILE_TOO_BIG = -3;
-    const MIME_NOT_ALLOWED = -4;
-    const NEW_FILE_EXISTS = -5;
-    const INVALID_FILE = -6;
-    const CANT_WRITE = -7;
-    const MAX_FILE_SIZE = 1024;
+    public const INVALID_FILENAME = -1;
+    public const INVALID_EXTENSION = -2;
+    public const FILE_TOO_BIG = -3;
+    public const MIME_NOT_ALLOWED = -4;
+    public const NEW_FILE_EXISTS = -5;
+    public const INVALID_FILE = -6;
+    public const CANT_WRITE = -7;
+    public const MAX_FILE_SIZE = 1024;
 }
index 71cb958b7efdf281b7a7fb051e8062c270e0d84a..3103dfa69e84ad2affceafe9ec72d8c77213082c 100644 (file)
@@ -67,8 +67,8 @@ require_once GALETTE_CONFIG_PATH . 'galette_tcpdf_config.php';
 class Pdf extends \TCPDF
 {
 
-    const FONT = 'DejaVuSans';
-    const FONT_SIZE = 10;
+    public const FONT = 'DejaVuSans';
+    public const FONT_SIZE = 10;
 
     protected $preferences;
     protected $i18n;
index 11ca85683578759c7eefdb13e1712071dc41a88e..80ca1afa3f33f33ffbd73dea0e41ed77ec175fdc 100644 (file)
@@ -58,7 +58,7 @@ use Analog\Analog;
 
 class PdfAttendanceSheet extends Pdf
 {
-    const SHEET_FONT = self::FONT_SIZE - 2;
+    public const SHEET_FONT = self::FONT_SIZE - 2;
 
     public $doc_title = null;
     public $sheet_title = null;
index 35bd57aece85f9326583ac78e026b7b070e9533d..41436cf79b6fc761ef97fd646db42920cef1eb45 100644 (file)
@@ -57,7 +57,7 @@ use Galette\Core\Login;
 
 class PdfGroups extends Pdf
 {
-    const SHEET_FONT = self::FONT_SIZE - 2;
+    public const SHEET_FONT = self::FONT_SIZE - 2;
 
     private $doc_title;
 
index 713d27f9e4aff5da6fe7885d0a5a6ce5265f2d1e..580f6e688e3c8c66d2d706e6b6d13b8cb6046059 100644 (file)
@@ -56,10 +56,10 @@ use Analog\Analog;
 
 class PdfMembersCards extends Pdf
 {
-    const WIDTH = 75;
-    const HEIGHT = 40;
-    const COLS = 2;
-    const ROWS = 6;
+    public const WIDTH = 75;
+    public const HEIGHT = 40;
+    public const COLS = 2;
+    public const ROWS = 6;
 
     private $tcol;
     private $scol;
index d436c1c602c61c839112647b6e552dcc49ad6cd2..493f1c0088823076d51b59cf685404c6222555ae 100644 (file)
@@ -59,8 +59,8 @@ use Psr\Http\Message\ResponseInterface as Response;
  */
 class UpdateAndMaintenance
 {
-    const MAINTENANCE = 0;
-    const NEED_UPDATE = 1;
+    public const MAINTENANCE = 0;
+    public const NEED_UPDATE = 1;
 
     /**
      * @var callable
index e007d526b23b75176f606b37eabc968abb0cf110..f89f4ebfc6785e2cc178341fa55c5ca1fde95322 100644 (file)
@@ -61,8 +61,8 @@ use Galette\Filters\ContributionsList;
  */
 class Contributions
 {
-    const TABLE = Contribution::TABLE;
-    const PK = Contribution::PK;
+    public const TABLE = Contribution::TABLE;
+    public const PK = Contribution::PK;
 
     private $count = null;
 
index 0d6917b9de22db3e8635e0e22facf911cb717640..d3686166612546d16f5014aa10c37e6d26c017c2 100644 (file)
@@ -56,8 +56,8 @@ use Laminas\Db\Sql\Expression;
 
 class Reminders
 {
-    const TABLE = 'reminders';
-    const PK = 'reminder_id';
+    public const TABLE = 'reminders';
+    public const PK = 'reminder_id';
 
     private $selected;
     private $types;
index d949dd287953ec4b7d13e22b5344068e471165e7..ab7e07a6f7ea9e4b9bf9de0bd2ffe9c746dda4bd 100644 (file)
@@ -59,8 +59,8 @@ use Galette\Entity\Adherent;
  */
 class SavedSearches
 {
-    const TABLE = SavedSearch::TABLE;
-    const PK = SavedSearch::PK;
+    public const TABLE = SavedSearch::TABLE;
+    public const PK = SavedSearch::PK;
 
     private $count = null;
 
index a5bd0d58e53f991e4f3bd480cbd729556e2c09f1..ca584232144ae23b21cc5aa1fe7179a1925555a7 100644 (file)
@@ -54,12 +54,12 @@ use Analog\Analog;
 
 class Titles
 {
-    const TABLE = 'titles';
-    const PK = 'id_title';
+    public const TABLE = 'titles';
+    public const PK = 'id_title';
 
-    const MR = 1;
-    const MRS = 2;
-    const MISS = 3;
+    public const MR = 1;
+    public const MRS = 2;
+    public const MISS = 3;
 
     private static $defaults = array(
         array(
index 4021a811ee55c410b9ff0707e648d9823e177b29..83da61d5d46d1f5b8a6f90ef7abfd611c33bf0e4 100644 (file)
@@ -59,8 +59,8 @@ use Galette\Filters\TransactionsList;
  */
 class Transactions
 {
-    const TABLE = Transaction::TABLE;
-    const PK = Transaction::PK;
+    public const TABLE = Transaction::TABLE;
+    public const PK = Transaction::PK;
 
     private $count = null;
     private $zdb;
index 4c7ba6b60cc071d44b1cc261f0cfb7e74a289c64..5165cfb26570bdc512acff46444016acb732bf90 100644 (file)
@@ -53,9 +53,9 @@ use Galette\Core\Db;
  */
 abstract class AbstractUpdater
 {
-    const REPORT_SUCCESS = 0;
-    const REPORT_ERROR = 1;
-    const REPORT_WARNING = 2;
+    public const REPORT_SUCCESS = 0;
+    public const REPORT_ERROR = 1;
+    public const REPORT_WARNING = 2;
 
     protected $sql_scripts = null;
     protected $db_version = null;
index d9f8d857d1ab84cff9a942e4f7d4389b40a7caec..5f50a281214fcb070d7c6c3248055d302caf3a11 100644 (file)
@@ -66,11 +66,11 @@ use Galette\Entity\PaymentType;
  */
 class FakeData
 {
-    const DEFAULT_NB_MEMBERS       = 20;
-    const DEFAULT_NB_CONTRIB       = 5;
-    const DEFAULT_NB_GROUPS        = 5;
-    const DEFAULT_NB_TRANSACTIONS  = 2;
-    const DEFAULT_PHOTOS           = false;
+    public const DEFAULT_NB_MEMBERS       = 20;
+    public const DEFAULT_NB_CONTRIB       = 5;
+    public const DEFAULT_NB_GROUPS        = 5;
+    public const DEFAULT_NB_TRANSACTIONS  = 2;
+    public const DEFAULT_PHOTOS           = false;
 
     protected $preferences;
     protected $member_fields;