@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | if (($fact->getDate() || $fact->getPlace()) && $fact->canShow()) { |
71 | 71 | switch ($style) { |
72 | 72 | case 10: |
73 | - return '<i>'.$fact->getLabel().' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactDateShort($fact) .' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactPlaceShort($fact, '%1') .'</i>'; |
|
73 | + return '<i>'.$fact->getLabel().' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactDateShort($fact) .' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactPlaceShort($fact, '%1') .'</i>'; |
|
74 | 74 | default: |
75 | 75 | return $this->gedcomrecord->formatFirstMajorFact($facts, $style); |
76 | 76 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | public function canDisplayIsSourced($access_level = null){ |
89 | 89 | if(!$this->gedcomrecord->canShow($access_level)) return false; |
90 | 90 | if($access_level === null ) |
91 | - $access_level = \Fisharebest\Webtrees\Auth::accessLevel($this->gedcomrecord->getTree()); |
|
91 | + $access_level = \Fisharebest\Webtrees\Auth::accessLevel($this->gedcomrecord->getTree()); |
|
92 | 92 | |
93 | 93 | $global_facts = Globals::getGlobalFacts(); |
94 | 94 | if (isset($global_facts['SOUR'])) { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | * @return int Level of sources |
128 | 128 | */ |
129 | 129 | public function isFactSourced($eventslist){ |
130 | - if(empty($eventslist)) return 0; |
|
130 | + if(empty($eventslist)) return 0; |
|
131 | 131 | $isSourced=0; |
132 | 132 | $facts = $this->gedcomrecord->getFacts($eventslist); |
133 | 133 | foreach($facts as $fact){ |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | protected $gedcomrecord; |
24 | 24 | |
25 | 25 | /** @var bool Is the GedcomRecord sourced (cache) */ |
26 | - protected $_issourced=null; |
|
26 | + protected $_issourced = null; |
|
27 | 27 | |
28 | 28 | /** |
29 | 29 | * Contructor for the decorator |
30 | 30 | * |
31 | 31 | * @param \Fisharebest\Webtrees\GedcomRecord $gedcomrecord_in The GedcomRecord to extend |
32 | 32 | */ |
33 | - public function __construct(\Fisharebest\Webtrees\GedcomRecord $gedcomrecord_in){ |
|
33 | + public function __construct(\Fisharebest\Webtrees\GedcomRecord $gedcomrecord_in) { |
|
34 | 34 | $this->gedcomrecord = $gedcomrecord_in; |
35 | 35 | } |
36 | 36 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @return \Fisharebest\Webtrees\GedcomRecord Embedded gedcom record |
41 | 41 | */ |
42 | - public function getDerivedRecord(){ |
|
42 | + public function getDerivedRecord() { |
|
43 | 43 | return $this->gedcomrecord; |
44 | 44 | } |
45 | 45 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | if (($fact->getDate() || $fact->getPlace()) && $fact->canShow()) { |
71 | 71 | switch ($style) { |
72 | 72 | case 10: |
73 | - return '<i>'.$fact->getLabel().' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactDateShort($fact) .' '. \MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactPlaceShort($fact, '%1') .'</i>'; |
|
73 | + return '<i>'.$fact->getLabel().' '.\MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactDateShort($fact).' '.\MyArtJaub\Webtrees\Functions\FunctionsPrint::formatFactPlaceShort($fact, '%1').'</i>'; |
|
74 | 74 | default: |
75 | 75 | return $this->gedcomrecord->formatFirstMajorFact($facts, $style); |
76 | 76 | } |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | * @param int $access_level |
86 | 86 | * @return boolean |
87 | 87 | */ |
88 | - public function canDisplayIsSourced($access_level = null){ |
|
89 | - if(!$this->gedcomrecord->canShow($access_level)) return false; |
|
90 | - if($access_level === null ) |
|
88 | + public function canDisplayIsSourced($access_level = null) { |
|
89 | + if (!$this->gedcomrecord->canShow($access_level)) return false; |
|
90 | + if ($access_level === null) |
|
91 | 91 | $access_level = \Fisharebest\Webtrees\Auth::accessLevel($this->gedcomrecord->getTree()); |
92 | 92 | |
93 | 93 | $global_facts = Globals::getGlobalFacts(); |
@@ -107,14 +107,14 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @return int Level of sources |
109 | 109 | */ |
110 | - public function isSourced(){ |
|
111 | - if($this->_issourced !== null) return $this->_issourced; |
|
112 | - $this->_issourced=-1; |
|
110 | + public function isSourced() { |
|
111 | + if ($this->_issourced !== null) return $this->_issourced; |
|
112 | + $this->_issourced = -1; |
|
113 | 113 | $sourcesfacts = $this->gedcomrecord->getFacts('SOUR'); |
114 | - foreach($sourcesfacts as $sourcefact){ |
|
115 | - $this->_issourced=max($this->_issourced, 1); |
|
116 | - if($sourcefact->getAttribute('_ACT')){ |
|
117 | - $this->_issourced=max($this->_issourced, 2); |
|
114 | + foreach ($sourcesfacts as $sourcefact) { |
|
115 | + $this->_issourced = max($this->_issourced, 1); |
|
116 | + if ($sourcefact->getAttribute('_ACT')) { |
|
117 | + $this->_issourced = max($this->_issourced, 2); |
|
118 | 118 | } |
119 | 119 | } |
120 | 120 | return $this->_issourced; |
@@ -126,19 +126,19 @@ discard block |
||
126 | 126 | * @param string $eventslist |
127 | 127 | * @return int Level of sources |
128 | 128 | */ |
129 | - public function isFactSourced($eventslist){ |
|
130 | - if(empty($eventslist)) return 0; |
|
131 | - $isSourced=0; |
|
129 | + public function isFactSourced($eventslist) { |
|
130 | + if (empty($eventslist)) return 0; |
|
131 | + $isSourced = 0; |
|
132 | 132 | $facts = $this->gedcomrecord->getFacts($eventslist); |
133 | - foreach($facts as $fact){ |
|
134 | - if($isSourced < Fact::MAX_IS_SOURCED_LEVEL){ |
|
133 | + foreach ($facts as $fact) { |
|
134 | + if ($isSourced < Fact::MAX_IS_SOURCED_LEVEL) { |
|
135 | 135 | $dfact = new Fact($fact); |
136 | 136 | $tmpIsSourced = $dfact->isSourced(); |
137 | - if($tmpIsSourced != 0) { |
|
138 | - if($isSourced==0) { |
|
139 | - $isSourced = $tmpIsSourced; |
|
137 | + if ($tmpIsSourced != 0) { |
|
138 | + if ($isSourced == 0) { |
|
139 | + $isSourced = $tmpIsSourced; |
|
140 | 140 | } |
141 | - else{ |
|
141 | + else { |
|
142 | 142 | $isSourced = max($isSourced, $tmpIsSourced); |
143 | 143 | } |
144 | 144 | } |