Skip to content

Commit

Permalink
PHP 8.3 allows class constants to have type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Nov 22, 2024
1 parent 95a8620 commit e873f43
Show file tree
Hide file tree
Showing 362 changed files with 1,833 additions and 2,253 deletions.
8 changes: 4 additions & 4 deletions app/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
class Auth
{
// Privacy constants
public const PRIV_PRIVATE = 2; // Allows visitors to view the item
public const PRIV_USER = 1; // Allows members to access the item
public const PRIV_NONE = 0; // Allows managers to access the item
public const PRIV_HIDE = -1; // Hide the item to all users
public const int PRIV_PRIVATE = 2; // Allows visitors to view the item
public const int PRIV_USER = 1; // Allows members to access the item
public const int PRIV_NONE = 0; // Allows managers to access the item
public const int PRIV_HIDE = -1; // Hide the item to all users

/**
* Are we currently logged in?
Expand Down
22 changes: 11 additions & 11 deletions app/Census/AbstractCensusColumnCondition.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,37 @@
abstract class AbstractCensusColumnCondition extends AbstractCensusColumn implements CensusColumnInterface
{
// Text to display for married males
protected const HUSBAND = '';
protected const string HUSBAND = '';

// Text to display for married females
protected const WIFE = '';
protected const string WIFE = '';

// Text to display for married unmarried males
protected const BACHELOR = '';
protected const string BACHELOR = '';

// Text to display for married unmarried females
protected const SPINSTER = '';
protected const string SPINSTER = '';

// Text to display for male children
protected const BOY = '';
protected const string BOY = '';

// Text to display for female children
protected const GIRL = '';
protected const string GIRL = '';

// Text to display for divorced males
protected const DIVORCE = '';
protected const string DIVORCE = '';

// Text to display for divorced females
protected const DIVORCEE = '';
protected const string DIVORCEE = '';

// Text to display for widowed males
protected const WIDOWER = '';
protected const string WIDOWER = '';

// Text to display for widowed females
protected const WIDOW = '';
protected const string WIDOW = '';

// At what age is this individual recorded as an adult
protected const AGE_ADULT = 15;
protected const int AGE_ADULT = 15;

/**
* Generate the likely value of this census column, based on available information.
Expand Down
20 changes: 10 additions & 10 deletions app/Census/CensusColumnConditionCanada.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
class CensusColumnConditionCanada extends AbstractCensusColumnCondition
{
// Text to display for married males
protected const HUSBAND = 'M';
protected const string HUSBAND = 'M';

// Text to display for married females
protected const WIFE = 'M';
protected const string WIFE = 'M';

// Text to display for married unmarried males
protected const BACHELOR = 'S';
protected const string BACHELOR = 'S';

// Text to display for married unmarried females
protected const SPINSTER = 'S';
protected const string SPINSTER = 'S';

// Text to display for male children
protected const BOY = 'S';
protected const string BOY = 'S';

// Text to display for female children
protected const GIRL = 'S';
protected const string GIRL = 'S';

// Text to display for divorced individuals
protected const DIVORCE = 'D';
protected const string DIVORCE = 'D';

// Text to display for divorced females
protected const DIVORCEE = 'D';
protected const string DIVORCEE = 'D';

// Text to display for widowed males
protected const WIDOWER = 'W';
protected const string WIDOWER = 'W';

// Text to display for widowed females
protected const WIDOW = 'W';
protected const string WIDOW = 'W';
}
20 changes: 10 additions & 10 deletions app/Census/CensusColumnConditionCanadaMarriedSingle.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
class CensusColumnConditionCanadaMarriedSingle extends AbstractCensusColumnCondition
{
// Text to display for married males
protected const HUSBAND = 'M';
protected const string HUSBAND = 'M';

// Text to display for married females
protected const WIFE = 'M';
protected const string WIFE = 'M';

// Text to display for married unmarried males
protected const BACHELOR = 'S';
protected const string BACHELOR = 'S';

// Text to display for married unmarried females
protected const SPINSTER = 'S';
protected const string SPINSTER = 'S';

// Text to display for male children
protected const BOY = 'S';
protected const string BOY = 'S';

// Text to display for female children
protected const GIRL = 'S';
protected const string GIRL = 'S';

// Text to display for divorced individuals
protected const DIVORCE = '';
protected const string DIVORCE = '';

// Text to display for divorced females
protected const DIVORCEE = '';
protected const string DIVORCEE = '';

// Text to display for widowed males
protected const WIDOWER = '';
protected const string WIDOWER = '';

// Text to display for widowed females
protected const WIDOW = '';
protected const string WIDOW = '';
}
20 changes: 10 additions & 10 deletions app/Census/CensusColumnConditionCanadaMarriedWidowed.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
class CensusColumnConditionCanadaMarriedWidowed extends AbstractCensusColumnCondition
{
// Text to display for married males
protected const HUSBAND = 'M';
protected const string HUSBAND = 'M';

// Text to display for married females
protected const WIFE = 'M';
protected const string WIFE = 'M';

// Text to display for married unmarried males
protected const BACHELOR = '';
protected const string BACHELOR = '';

// Text to display for married unmarried females
protected const SPINSTER = '';
protected const string SPINSTER = '';

// Text to display for male children
protected const BOY = '';
protected const string BOY = '';

// Text to display for female children
protected const GIRL = '';
protected const string GIRL = '';

// Text to display for divorced individuals
protected const DIVORCE = '';
protected const string DIVORCE = '';

// Text to display for divorced females
protected const DIVORCEE = '';
protected const string DIVORCEE = '';

// Text to display for widowed males
protected const WIDOWER = 'W';
protected const string WIDOWER = 'W';

// Text to display for widowed females
protected const WIDOW = 'W';
protected const string WIDOW = 'W';
}
20 changes: 10 additions & 10 deletions app/Census/CensusColumnConditionCanadaWidowed.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
class CensusColumnConditionCanadaWidowed extends AbstractCensusColumnCondition
{
// Text to display for married males
protected const HUSBAND = '';
protected const string HUSBAND = '';

// Text to display for married females
protected const WIFE = '';
protected const string WIFE = '';

// Text to display for married unmarried males
protected const BACHELOR = '';
protected const string BACHELOR = '';

// Text to display for married unmarried females
protected const SPINSTER = '';
protected const string SPINSTER = '';

// Text to display for male children
protected const BOY = '';
protected const string BOY = '';

// Text to display for female children
protected const GIRL = '';
protected const string GIRL = '';

// Text to display for divorced individuals
protected const DIVORCE = '';
protected const string DIVORCE = '';

// Text to display for divorced females
protected const DIVORCEE = '';
protected const string DIVORCEE = '';

// Text to display for widowed males
protected const WIDOWER = 'W';
protected const string WIDOWER = 'W';

// Text to display for widowed females
protected const WIDOW = 'W';
protected const string WIDOW = 'W';
}
20 changes: 10 additions & 10 deletions app/Census/CensusColumnConditionCanadaWidowedFemale.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
class CensusColumnConditionCanadaWidowedFemale extends AbstractCensusColumnCondition
{
// Text to display for married males
protected const HUSBAND = '';
protected const string HUSBAND = '';

// Text to display for married females
protected const WIFE = '';
protected const string WIFE = '';

// Text to display for married unmarried males
protected const BACHELOR = '';
protected const string BACHELOR = '';

// Text to display for married unmarried females
protected const SPINSTER = '';
protected const string SPINSTER = '';

// Text to display for male children
protected const BOY = '';
protected const string BOY = '';

// Text to display for female children
protected const GIRL = '';
protected const string GIRL = '';

// Text to display for divorced individuals
protected const DIVORCE = '';
protected const string DIVORCE = '';

// Text to display for divorced females
protected const DIVORCEE = '';
protected const string DIVORCEE = '';

// Text to display for widowed males
protected const WIDOWER = '';
protected const string WIDOWER = '';

// Text to display for widowed females
protected const WIDOW = 'W';
protected const string WIDOW = 'W';
}
20 changes: 10 additions & 10 deletions app/Census/CensusColumnConditionCanadaWidowedMale.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
class CensusColumnConditionCanadaWidowedMale extends AbstractCensusColumnCondition
{
// Text to display for married males
protected const HUSBAND = '';
protected const string HUSBAND = '';

// Text to display for married females
protected const WIFE = '';
protected const string WIFE = '';

// Text to display for married unmarried males
protected const BACHELOR = '';
protected const string BACHELOR = '';

// Text to display for married unmarried females
protected const SPINSTER = '';
protected const string SPINSTER = '';

// Text to display for male children
protected const BOY = '';
protected const string BOY = '';

// Text to display for female children
protected const GIRL = '';
protected const string GIRL = '';

// Text to display for divorced individuals
protected const DIVORCE = '';
protected const string DIVORCE = '';

// Text to display for divorced females
protected const DIVORCEE = '';
protected const string DIVORCEE = '';

// Text to display for widowed males
protected const WIDOWER = 'W';
protected const string WIDOWER = 'W';

// Text to display for widowed females
protected const WIDOW = '';
protected const string WIDOW = '';
}
16 changes: 8 additions & 8 deletions app/Census/CensusColumnConditionDanish.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@
class CensusColumnConditionDanish extends CensusColumnConditionEnglish
{
// Text to display for married males
protected const HUSBAND = 'Gift';
protected const string HUSBAND = 'Gift';

// Text to display for married females
protected const WIFE = 'Gift';
protected const string WIFE = 'Gift';

// Text to display for married unmarried males
protected const BACHELOR = 'Ugift';
protected const string BACHELOR = 'Ugift';

// Text to display for married unmarried females
protected const SPINSTER = 'Ugift';
protected const string SPINSTER = 'Ugift';

// Text to display for divorced males
protected const DIVORCE = 'Skilt';
protected const string DIVORCE = 'Skilt';

// Text to display for divorced females
protected const DIVORCEE = 'Skilt';
protected const string DIVORCEE = 'Skilt';

// Text to display for widowed males
protected const WIDOWER = 'Gift';
protected const string WIDOWER = 'Gift';

// Text to display for widowed females
protected const WIDOW = 'Gift';
protected const string WIDOW = 'Gift';
}
16 changes: 8 additions & 8 deletions app/Census/CensusColumnConditionEnglish.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@
class CensusColumnConditionEnglish extends AbstractCensusColumnCondition
{
// Text to display for married males
protected const HUSBAND = 'Mar';
protected const string HUSBAND = 'Mar';

// Text to display for married females
protected const WIFE = 'Mar';
protected const string WIFE = 'Mar';

// Text to display for married unmarried males
protected const BACHELOR = 'Unm';
protected const string BACHELOR = 'Unm';

// Text to display for married unmarried females
protected const SPINSTER = 'Unm';
protected const string SPINSTER = 'Unm';

// Text to display for divorced males
protected const DIVORCE = 'Div';
protected const string DIVORCE = 'Div';

// Text to display for divorced females
protected const DIVORCEE = 'Div';
protected const string DIVORCEE = 'Div';

// Text to display for widowed males
protected const WIDOWER = 'Wid';
protected const string WIDOWER = 'Wid';

// Text to display for widowed females
protected const WIDOW = 'Wid';
protected const string WIDOW = 'Wid';
}
Loading

0 comments on commit e873f43

Please sign in to comment.