@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDeutschland1819 extends CensusOfDeutschland implements CensusInterface { |
|
21 | +class CensusOfDeutschland1819 extends CensusOfDeutschland implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return 'AUG 1819'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return string |
35 | 37 | */ |
36 | - public function censusPlace() { |
|
38 | + public function censusPlace() |
|
39 | + { |
|
37 | 40 | return 'Mecklenburg-Schwerin, Deutschland'; |
38 | 41 | } |
39 | 42 | |
@@ -42,7 +45,8 @@ discard block |
||
42 | 45 | * |
43 | 46 | * @return CensusColumnInterface[] |
44 | 47 | */ |
45 | - public function columns() { |
|
48 | + public function columns() |
|
49 | + { |
|
46 | 50 | return array( |
47 | 51 | new CensusColumnNull($this, 'Nr.', 'Laufende Num̅er.'), |
48 | 52 | new CensusColumnNull($this, 'Geschlecht', 'Ob männlichen oder weiblichen Geschlechts.'), |
@@ -20,7 +20,8 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * The individual's date of birth. |
22 | 22 | */ |
23 | -class CensusColumnBirthDayDotMonthYear extends AbstractCensusColumn implements CensusColumnInterface { |
|
23 | +class CensusColumnBirthDayDotMonthYear extends AbstractCensusColumn implements CensusColumnInterface |
|
24 | +{ |
|
24 | 25 | /** |
25 | 26 | * Generate the likely value of this census column, based on available information. |
26 | 27 | * |
@@ -29,7 +30,8 @@ discard block |
||
29 | 30 | * |
30 | 31 | * @return string |
31 | 32 | */ |
32 | - public function generate(Individual $individual, Individual $head = null) { |
|
33 | + public function generate(Individual $individual, Individual $head = null) |
|
34 | + { |
|
33 | 35 | $birth_date = $individual->getBirthDate(); |
34 | 36 | |
35 | 37 | if ($birth_date->minimumJulianDay() === $birth_date->maximumJulianDay()) { |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDenmark1834 extends CensusOfDenmark implements CensusInterface { |
|
21 | +class CensusOfDenmark1834 extends CensusOfDenmark implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '18 FEB 1834'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return CensusColumnInterface[] |
35 | 37 | */ |
36 | - public function columns() { |
|
38 | + public function columns() |
|
39 | + { |
|
37 | 40 | return array( |
38 | 41 | new CensusColumnFullName($this, 'Navn', ''), |
39 | 42 | new CensusColumnAge($this, 'Alder', ''), |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfScotland extends Census implements CensusPlaceInterface { |
|
21 | +class CensusOfScotland extends Census implements CensusPlaceInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * All available censuses for this census place. |
24 | 25 | * |
25 | 26 | * @return CensusInterface[] |
26 | 27 | */ |
27 | - public function allCensusDates() { |
|
28 | + public function allCensusDates() |
|
29 | + { |
|
28 | 30 | return array( |
29 | 31 | new CensusOfScotland1841(), |
30 | 32 | new CensusOfScotland1851(), |
@@ -42,7 +44,8 @@ discard block |
||
42 | 44 | * |
43 | 45 | * @return string |
44 | 46 | */ |
45 | - public function censusPlace() { |
|
47 | + public function censusPlace() |
|
48 | + { |
|
46 | 49 | return 'Scotland'; |
47 | 50 | } |
48 | 51 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfCzechRepublic extends Census implements CensusPlaceInterface { |
|
21 | +class CensusOfCzechRepublic extends Census implements CensusPlaceInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * All available censuses for this census place. |
24 | 25 | * |
25 | 26 | * @return CensusInterface[] |
26 | 27 | */ |
27 | - public function allCensusDates() { |
|
28 | + public function allCensusDates() |
|
29 | + { |
|
28 | 30 | return array( |
29 | 31 | new CensusOfCzechRepublic1880(), |
30 | 32 | new CensusOfCzechRepublic1921(), |
@@ -36,7 +38,8 @@ discard block |
||
36 | 38 | * |
37 | 39 | * @return string |
38 | 40 | */ |
39 | - public function censusPlace() { |
|
41 | + public function censusPlace() |
|
42 | + { |
|
40 | 43 | return 'Česko'; |
41 | 44 | } |
42 | 45 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfUnitedStates1790 extends CensusOfUnitedStates implements CensusInterface { |
|
21 | +class CensusOfUnitedStates1790 extends CensusOfUnitedStates implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '02 AUG 1790'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return CensusColumnInterface[] |
35 | 37 | */ |
36 | - public function columns() { |
|
38 | + public function columns() |
|
39 | + { |
|
37 | 40 | return array( |
38 | 41 | new CensusColumnFullName($this, 'Name', 'Name of head of family'), |
39 | 42 | new CensusColumnOccupation($this, 'Occupation', 'Professions and occupation'), |
@@ -21,7 +21,8 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * The number of children born alive. |
23 | 23 | */ |
24 | -class CensusColumnChildrenBornAlive extends AbstractCensusColumn implements CensusColumnInterface { |
|
24 | +class CensusColumnChildrenBornAlive extends AbstractCensusColumn implements CensusColumnInterface |
|
25 | +{ |
|
25 | 26 | /** |
26 | 27 | * Generate the likely value of this census column, based on available information. |
27 | 28 | * |
@@ -30,7 +31,8 @@ discard block |
||
30 | 31 | * |
31 | 32 | * @return string |
32 | 33 | */ |
33 | - public function generate(Individual $individual, Individual $head = null) { |
|
34 | + public function generate(Individual $individual, Individual $head = null) |
|
35 | + { |
|
34 | 36 | if ($individual->getSex() !== 'F') { |
35 | 37 | return ''; |
36 | 38 | } |
@@ -18,13 +18,15 @@ discard block |
||
18 | 18 | /** |
19 | 19 | * Definitions for a census |
20 | 20 | */ |
21 | -class CensusOfDenmark1885 extends CensusOfDenmark implements CensusInterface { |
|
21 | +class CensusOfDenmark1885 extends CensusOfDenmark implements CensusInterface |
|
22 | +{ |
|
22 | 23 | /** |
23 | 24 | * When did this census occur. |
24 | 25 | * |
25 | 26 | * @return string |
26 | 27 | */ |
27 | - public function censusDate() { |
|
28 | + public function censusDate() |
|
29 | + { |
|
28 | 30 | return '01 FEB 1885'; |
29 | 31 | } |
30 | 32 | |
@@ -33,7 +35,8 @@ discard block |
||
33 | 35 | * |
34 | 36 | * @return string |
35 | 37 | */ |
36 | - public function censusPlace() { |
|
38 | + public function censusPlace() |
|
39 | + { |
|
37 | 40 | return 'København, Danmark'; |
38 | 41 | } |
39 | 42 | |
@@ -42,7 +45,8 @@ discard block |
||
42 | 45 | * |
43 | 46 | * @return CensusColumnInterface[] |
44 | 47 | */ |
45 | - public function columns() { |
|
48 | + public function columns() |
|
49 | + { |
|
46 | 50 | return array( |
47 | 51 | new CensusColumnFullName($this, 'Navn', ''), |
48 | 52 | new CensusColumnSexMK($this, 'Køn', ''), |
@@ -21,7 +21,8 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * The individual's age. |
23 | 23 | */ |
24 | -class CensusColumnAge extends AbstractCensusColumn implements CensusColumnInterface { |
|
24 | +class CensusColumnAge extends AbstractCensusColumn implements CensusColumnInterface |
|
25 | +{ |
|
25 | 26 | /** |
26 | 27 | * Generate the likely value of this census column, based on available information. |
27 | 28 | * |
@@ -30,7 +31,8 @@ discard block |
||
30 | 31 | * |
31 | 32 | * @return string |
32 | 33 | */ |
33 | - public function generate(Individual $individual, Individual $head = null) { |
|
34 | + public function generate(Individual $individual, Individual $head = null) |
|
35 | + { |
|
34 | 36 | return (string) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0); |
35 | 37 | } |
36 | 38 | } |