diff options
| author | Greg Roach <fisharebest@gmail.com> | 2016-12-23 21:15:42 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2016-12-23 21:15:42 +0000 |
| commit | 13abd6f3a37322f885d85df150e105d27ad81f8d (patch) | |
| tree | f023015b458c95273afe5876246adf141de169ca /app/GedcomCode | |
| parent | 2c55bacfbfed3c49d3f2ac181fb519d24ffe2803 (diff) | |
| download | webtrees-13abd6f3a37322f885d85df150e105d27ad81f8d.tar.gz webtrees-13abd6f3a37322f885d85df150e105d27ad81f8d.tar.bz2 webtrees-13abd6f3a37322f885d85df150e105d27ad81f8d.zip | |
Code style - short array syntax
Diffstat (limited to 'app/GedcomCode')
| -rw-r--r-- | app/GedcomCode/GedcomCodeAdop.php | 4 | ||||
| -rw-r--r-- | app/GedcomCode/GedcomCodeName.php | 4 | ||||
| -rw-r--r-- | app/GedcomCode/GedcomCodePedi.php | 4 | ||||
| -rw-r--r-- | app/GedcomCode/GedcomCodeQuay.php | 4 | ||||
| -rw-r--r-- | app/GedcomCode/GedcomCodeRela.php | 6 | ||||
| -rw-r--r-- | app/GedcomCode/GedcomCodeStat.php | 10 | ||||
| -rw-r--r-- | app/GedcomCode/GedcomCodeTemp.php | 6 |
7 files changed, 19 insertions, 19 deletions
diff --git a/app/GedcomCode/GedcomCodeAdop.php b/app/GedcomCode/GedcomCodeAdop.php index 5151cf4065..93a92191c4 100644 --- a/app/GedcomCode/GedcomCodeAdop.php +++ b/app/GedcomCode/GedcomCodeAdop.php @@ -24,7 +24,7 @@ use Fisharebest\Webtrees\Individual; */ class GedcomCodeAdop { /** @var string[] A list of possible adoption codes */ - private static $TYPES = array('BOTH', 'HUSB', 'WIFE'); + private static $TYPES = ['BOTH', 'HUSB', 'WIFE']; /** * Translate a code, for an (optional) record @@ -82,7 +82,7 @@ class GedcomCodeAdop { * @return string[] */ public static function getValues(GedcomRecord $record = null) { - $values = array(); + $values = []; foreach (self::$TYPES as $type) { $values[$type] = self::getValue($type, $record); } diff --git a/app/GedcomCode/GedcomCodeName.php b/app/GedcomCode/GedcomCodeName.php index 729dc5d224..d684db0f69 100644 --- a/app/GedcomCode/GedcomCodeName.php +++ b/app/GedcomCode/GedcomCodeName.php @@ -24,7 +24,7 @@ use Fisharebest\Webtrees\Individual; */ class GedcomCodeName { /** @var string[] A list of possible types of name */ - private static $TYPES = array('adopted', 'aka', 'birth', 'change', 'estate', 'immigrant', 'maiden', 'married', 'religious'); + private static $TYPES = ['adopted', 'aka', 'birth', 'change', 'estate', 'immigrant', 'maiden', 'married', 'religious']; /** * Translate a code, for an (optional) record @@ -156,7 +156,7 @@ class GedcomCodeName { * @return string[] */ public static function getValues(GedcomRecord $record = null) { - $values = array(); + $values = []; foreach (self::$TYPES as $type) { $values[$type] = self::getValue($type, $record); } diff --git a/app/GedcomCode/GedcomCodePedi.php b/app/GedcomCode/GedcomCodePedi.php index 383d3c2c4f..e594a36541 100644 --- a/app/GedcomCode/GedcomCodePedi.php +++ b/app/GedcomCode/GedcomCodePedi.php @@ -24,7 +24,7 @@ use Fisharebest\Webtrees\Individual; */ class GedcomCodePedi { /** @var string[] Possible values for pedigree field */ - private static $TYPES = array('adopted', 'birth', 'foster', 'rada', 'sealing'); + private static $TYPES = ['adopted', 'birth', 'foster', 'rada', 'sealing']; /** * Translate a code, for an optional record @@ -104,7 +104,7 @@ class GedcomCodePedi { * @return string[] */ public static function getValues(GedcomRecord $record = null) { - $values = array(); + $values = []; foreach (self::$TYPES as $type) { $values[$type] = self::getValue($type, $record); } diff --git a/app/GedcomCode/GedcomCodeQuay.php b/app/GedcomCode/GedcomCodeQuay.php index ebd5dd05d9..edc6650980 100644 --- a/app/GedcomCode/GedcomCodeQuay.php +++ b/app/GedcomCode/GedcomCodeQuay.php @@ -22,7 +22,7 @@ use Fisharebest\Webtrees\I18N; */ class GedcomCodeQuay { /** @var string[] Valid values for a QUAY tag. */ - private static $TYPES = array('3', '2', '1', '0'); + private static $TYPES = ['3', '2', '1', '0']; /** * Translate a code, for an optional record @@ -60,7 +60,7 @@ class GedcomCodeQuay { * @return string[] */ public static function getValues() { - $values = array(); + $values = []; foreach (self::$TYPES as $type) { $values[$type] = self::getValue($type); } diff --git a/app/GedcomCode/GedcomCodeRela.php b/app/GedcomCode/GedcomCodeRela.php index 2453bc4c2f..ed0805e687 100644 --- a/app/GedcomCode/GedcomCodeRela.php +++ b/app/GedcomCode/GedcomCodeRela.php @@ -24,7 +24,7 @@ use Fisharebest\Webtrees\Individual; */ class GedcomCodeRela { /** @var string[] List of possible values for the RELA tag */ - private static $TYPES = array( + private static $TYPES = [ 'attendant', 'attending', 'best_man', 'bridesmaid', 'buyer', 'circumciser', 'civil_registrar', 'employee', 'employer', 'foster_child', 'foster_father', 'foster_mother', 'friend', 'godfather', 'godmother', @@ -32,7 +32,7 @@ class GedcomCodeRela { 'informant', 'lodger', 'nanny', 'nurse', 'owner', 'priest', 'rabbi', 'registry_officer', 'seller', 'servant', 'slave', 'ward', 'witness', - ); + ]; /** * Translate a code, for an (optional) record. @@ -278,7 +278,7 @@ class GedcomCodeRela { * @return string[] */ public static function getValues(GedcomRecord $record = null) { - $values = array(); + $values = []; foreach (self::$TYPES as $type) { $values[$type] = self::getValue($type, $record); } diff --git a/app/GedcomCode/GedcomCodeStat.php b/app/GedcomCode/GedcomCodeStat.php index 717e558c89..a861ec3c2c 100644 --- a/app/GedcomCode/GedcomCodeStat.php +++ b/app/GedcomCode/GedcomCodeStat.php @@ -33,16 +33,16 @@ class GedcomCodeStat { case 'BAPL': case 'CONL': // LDS_BAPTISM_DATE_STATUS - return array('CHILD', 'COMPLETED', 'EXCLUDED', 'INFANT', 'PRE-1970', 'STILLBORN', 'SUBMITTED', 'UNCLEARED'); + return ['CHILD', 'COMPLETED', 'EXCLUDED', 'INFANT', 'PRE-1970', 'STILLBORN', 'SUBMITTED', 'UNCLEARED']; case 'ENDL': // LDS_ENDOWMENT_DATE_STATUS - return array('CHILD', 'COMPLETED', 'EXCLUDED', 'INFANT', 'PRE-1970', 'STILLBORN', 'SUBMITTED', 'UNCLEARED'); + return ['CHILD', 'COMPLETED', 'EXCLUDED', 'INFANT', 'PRE-1970', 'STILLBORN', 'SUBMITTED', 'UNCLEARED']; case 'SLGC': // LDS_CHILD_SEALING_DATE_STATUS - return array('BIC', 'COMPLETED', 'EXCLUDED', 'PRE-1970', 'STILLBORN', 'SUBMITTED', 'UNCLEARED'); + return ['BIC', 'COMPLETED', 'EXCLUDED', 'PRE-1970', 'STILLBORN', 'SUBMITTED', 'UNCLEARED']; case 'SLGS': // LDS_SPOUSE_SEALING_DATE_STATUS - return array('CANCELED', 'COMPLETED', 'DNS', 'DNS/CAN', 'EXCLUDED', 'PRE-1970', 'SUBMITTED', 'UNCLEARED'); + return ['CANCELED', 'COMPLETED', 'DNS', 'DNS/CAN', 'EXCLUDED', 'PRE-1970', 'SUBMITTED', 'UNCLEARED']; default: throw new \InvalidArgumentException('Internal error - bad argument to GedcomCodeStat::statusCodes("' . $tag . '")'); } @@ -123,7 +123,7 @@ class GedcomCodeStat { * @return string[] */ public static function statusNames($tag) { - $status_names = array(); + $status_names = []; foreach (self::statusCodes($tag) as $status_code) { $status_names[$status_code] = self::statusName($status_code); } diff --git a/app/GedcomCode/GedcomCodeTemp.php b/app/GedcomCode/GedcomCodeTemp.php index 474bedf352..056bba8f28 100644 --- a/app/GedcomCode/GedcomCodeTemp.php +++ b/app/GedcomCode/GedcomCodeTemp.php @@ -44,7 +44,7 @@ class GedcomCodeTemp { * @return string[] */ public static function templeCodes() { - return array( + return [ 'ABA', 'ACCRA', 'ADELA', 'ALBER', 'ALBUQ', 'ANCHO', 'ARIZO', 'ASUNC', 'ATLAN', 'BAIRE', 'BILLI', 'BIRMI', 'BISMA', 'BOGOT', 'BOISE', 'BOSTO', 'BOUNT', 'BRIGH', 'BRISB', 'BROUG', 'CALGA', 'CAMPI', 'CARAC', 'CEBUP', @@ -65,7 +65,7 @@ class GedcomCodeTemp { 'STOCK', 'SUVA', 'SWISS', 'SYDNE', 'TAIPE', 'TAMPI', 'TEGUC', 'TGUTI', 'TIHUA', 'TOKYO', 'TORNO', 'TRUJI', 'TWINF', 'VANCO', 'VERAC', 'VERNA', 'VILLA', 'WASHI', 'WINTE', - ); + ]; } /** @@ -398,7 +398,7 @@ class GedcomCodeTemp { * @return string[] */ public static function templeNames() { - $temple_names = array(); + $temple_names = []; foreach (self::templeCodes() as $temple_code) { $temple_names[$temple_code] = self::templeName($temple_code); } |
