Completed
Push — master ( b40ea8...2ebfe4 )
by Jonathan
05:27
created
src/Webtrees/Fact.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	*
39 39
 	* @param \Fisharebest\Webtrees\Fact $fact_in The Fact to extend
40 40
 	*/
41
-	public function __construct(\Fisharebest\Webtrees\Fact $fact_in){
41
+	public function __construct(\Fisharebest\Webtrees\Fact $fact_in) {
42 42
 		$this->fact = $fact_in;
43 43
 	}
44 44
 	
@@ -54,22 +54,22 @@  discard block
 block discarded – undo
54 54
 	*
55 55
 	* @return int Level of sources
56 56
 	*/
57
-	public function isSourced(){
58
-		$isSourced=0;
57
+	public function isSourced() {
58
+		$isSourced = 0;
59 59
 		$date = $this->fact->getDate();
60
-		if($date->isOK()) {
61
-			$isSourced=-1;
62
-			if($date->qual1=='' && $date->minimumJulianDay() == $date->maximumJulianDay()){
63
-				$isSourced=-2;
60
+		if ($date->isOK()) {
61
+			$isSourced = -1;
62
+			if ($date->qual1 == '' && $date->minimumJulianDay() == $date->maximumJulianDay()) {
63
+				$isSourced = -2;
64 64
 				$citations = $this->fact->getCitations();
65
-				foreach($citations as $citation){
66
-					$isSourced=max($isSourced, 1);
67
-					if(preg_match('/3 _ACT (.*)/', $citation) ){
68
- 						$isSourced=max($isSourced, 2);
65
+				foreach ($citations as $citation) {
66
+					$isSourced = max($isSourced, 1);
67
+					if (preg_match('/3 _ACT (.*)/', $citation)) {
68
+ 						$isSourced = max($isSourced, 2);
69 69
  						preg_match_all("/4 DATE (.*)/", $citation, $datessource, PREG_SET_ORDER);
70
- 						foreach($datessource as $daterec){
70
+ 						foreach ($datessource as $daterec) {
71 71
  							$datesource = new Date($daterec[1]);
72
- 							if(abs($datesource->julianDay() - $date->julianDay()) < self::DATE_PRECISION_MARGIN){
72
+ 							if (abs($datesource->julianDay() - $date->julianDay()) < self::DATE_PRECISION_MARGIN) {
73 73
  								$isSourced = max($isSourced, 3); //If this level increases, do not forget to change the constant MAX_IS_SOURCED_LEVEL
74 74
  							}
75 75
  						}
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/Views/WelcomeBlockView.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -36,20 +36,20 @@  discard block
 block discarded – undo
36 36
             '<table>
37 37
                 <tr>
38 38
                     <td>
39
-                        <a href="pedigree.php?rootid=' . $indi->getXref() . '&amp;ged=' . $tree->getNameUrl() . '">
40
-                            <i class="icon-pedigree"></i><br>' . I18N::translate('Default chart') . '
39
+                        <a href="pedigree.php?rootid=' . $indi->getXref().'&amp;ged='.$tree->getNameUrl().'">
40
+                            <i class="icon-pedigree"></i><br>' . I18N::translate('Default chart').'
41 41
                         </a>
42 42
                     </td>
43 43
                     <td>
44
-                        <a href="individual.php?pid=' . $indi->getXref() . '&amp;ged=' . $tree->getNameUrl() . '">
45
-                            <i class="icon-indis"></i><br>' . I18N::translate('Default individual') . '
44
+                        <a href="individual.php?pid=' . $indi->getXref().'&amp;ged='.$tree->getNameUrl().'">
45
+                            <i class="icon-indis"></i><br>' . I18N::translate('Default individual').'
46 46
                         </a>
47 47
                     </td>';
48 48
         
49 49
         if (Site::getPreference('USE_REGISTRATION_MODULE') && !Auth::check()) {
50 50
             $content .= '
51 51
                     <td>
52
-                        <a href="' . WT_LOGIN_URL . '?action=register">
52
+                        <a href="' . WT_LOGIN_URL.'?action=register">
53 53
                             <i class="icon-user_add"></i><br>'.I18N::translate('Request a new user account').'
54 54
                         </a>
55 55
                     </td>';
@@ -59,16 +59,16 @@  discard block
 block discarded – undo
59 59
             </table>';
60 60
         
61 61
         // Piwik Statistics        
62
-        if ($this->data->get('piwik_enabled', false)){
62
+        if ($this->data->get('piwik_enabled', false)) {
63 63
             $content .= '
64 64
                 <div class="center">
65 65
                     <div id="piwik_stats">
66
-                        <i class="icon-loading-small"></i>&nbsp;' . I18N::translate('Retrieving Piwik statistics...') . '
66
+                        <i class="icon-loading-small"></i>&nbsp;' . I18N::translate('Retrieving Piwik statistics...').'
67 67
                     </div>
68 68
                 </div>';
69 69
         }
70 70
         
71
-        $content .=  '<hr />';
71
+        $content .= '<hr />';
72 72
         
73 73
         // Login section - based on login_block
74 74
         if (Auth::check()) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             <div class="center">
77 77
                 <form method="post" action="logout.php" name="logoutform" onsubmit="return true;">
78 78
                     <br>
79
-                    <a href="edituser.php" class="name2">' . I18N::translate('You are signed in as %s.', '<a href="edituser.php" class="name2">' . Auth::user()->getRealNameHtml() . '</a>') . '</a>
79
+                    <a href="edituser.php" class="name2">' . I18N::translate('You are signed in as %s.', '<a href="edituser.php" class="name2">'.Auth::user()->getRealNameHtml().'</a>').'</a>
80 80
                     <br><br>
81 81
                     <input type="submit" value="'.I18N::translate('sign out').'">
82 82
                     <br><br>
@@ -98,34 +98,34 @@  discard block
 block discarded – undo
98 98
 						</label>
99 99
 					</div>
100 100
 					<div>
101
-						<input type="submit" value="'. I18N::translate('sign in'). '">
101
+						<input type="submit" value="'. I18N::translate('sign in').'">
102 102
 					</div>
103 103
 					<div>
104 104
 						<a href="#" id="maj-passwd_click">'. I18N::translate('Request a new password').'</a>
105 105
 					</div>';
106 106
             if (Site::getPreference('USE_REGISTRATION_MODULE')) {
107
-                $content.= '
107
+                $content .= '
108 108
                     <div>
109
-                        <a href="'.WT_LOGIN_URL.'?action=register">'. I18N::translate('Request a new user account').'</a>
109
+                        <a href="'.WT_LOGIN_URL.'?action=register">'.I18N::translate('Request a new user account').'</a>
110 110
                     </div>';
111 111
             }
112
-            $content.= '
112
+            $content .= '
113 113
                 </form>'; // close "login-form"
114 114
              
115 115
             // hidden New Password block
116
-            $content.= '
116
+            $content .= '
117 117
                 <div id="maj-new_passwd">
118 118
                     <form id="maj-new_passwd_form" name="new_passwd_form" action="'.WT_LOGIN_URL.'" method="post">
119 119
                         <input type="hidden" name="time" value="">
120 120
                         <input type="hidden" name="action" value="requestpw">
121 121
                         <h4>'. I18N::translate('Lost password request').'</h4>
122 122
                         <div>
123
-                            <label for="maj-new_passwd_username">'. I18N::translate('Username or email address') . '
123
+                            <label for="maj-new_passwd_username">'. I18N::translate('Username or email address').'
124 124
                                 <input type="text" id="maj-new_passwd_username" name="new_passwd_username" value="">
125 125
                             </label>
126 126
         				</div>
127 127
         				<div>
128
-                            <input type="submit" value="'. I18N::translate('Continue'). '">
128
+                            <input type="submit" value="'. I18N::translate('Continue').'">
129 129
                         </div>
130 130
                     </form>
131 131
                 </div>
Please login to merge, or discard this patch.
src/Webtrees/Module/WelcomeBlock/WelcomeBlockController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     public function index(PageController $parent_controller, Tree $tree, $block_id, $template) {        
46 46
         $view_bag = new ViewBag();
47 47
         
48
-        if($parent_controller && $tree) {
48
+        if ($parent_controller && $tree) {
49 49
         
50 50
             $view_bag->set('tree', $tree);
51 51
             $view_bag->set('indi', $parent_controller->getSignificantIndividual());
@@ -64,22 +64,22 @@  discard block
 block discarded – undo
64 64
     			');
65 65
     
66 66
             if (Auth::isAdmin()) {
67
-                $title='<a class="icon-admin" title="'.I18N::translate('Preferences').'" href="block_edit.php?block_id='.$block_id.'&amp;ged=' . $tree->getNameHtml() . '&amp;ctype=gedcom"></a>';
67
+                $title = '<a class="icon-admin" title="'.I18N::translate('Preferences').'" href="block_edit.php?block_id='.$block_id.'&amp;ged='.$tree->getNameHtml().'&amp;ctype=gedcom"></a>';
68 68
             } else {
69
-                $title='';
69
+                $title = '';
70 70
             }
71
-            $title .='<span dir="auto">'.$tree->getTitleHtml().'</span>';
71
+            $title .= '<span dir="auto">'.$tree->getTitleHtml().'</span>';
72 72
     
73 73
             $piwik_enabled = $this->module->getBlockSetting($block_id, 'piwik_enabled', false);
74 74
             $view_bag->set('piwik_enabled', $piwik_enabled);
75
-            if($piwik_enabled) {
75
+            if ($piwik_enabled) {
76 76
                 $parent_controller->addInlineJavascript(
77 77
                     '$("#piwik_stats")
78 78
                         .load("module.php?mod='.$this->module->getName().'&mod_action=Piwik&block_id='.$block_id.'");'
79 79
                 );
80 80
             }
81 81
     
82
-            $content = ViewFactory::make('WelcomeBlock', $this,  new BaseController(), $view_bag)->getHtmlPartial();   
82
+            $content = ViewFactory::make('WelcomeBlock', $this, new BaseController(), $view_bag)->getHtmlPartial();   
83 83
             
84 84
             if ($template) {
85 85
                 return Theme::theme()->formatBlock($id, $title, $class, $content);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function config($block_id = null) {
100 100
         
101
-        if(empty($block_id)) throw new MvcException(404);
101
+        if (empty($block_id)) throw new MvcException(404);
102 102
 
103 103
         if (Filter::postBool('save') && Filter::checkCsrf()) {
104 104
             $this->module->setBlockSetting($block_id, 'piwik_enabled', Filter::postBool('piwik_enabled'));
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaListFamView.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
     protected function renderContent() { 
36 36
         
37
-        if($this->data->get('has_sosa', false)) {
37
+        if ($this->data->get('has_sosa', false)) {
38 38
             $table_id = $this->data->get('table_id');            
39 39
         ?>   
40 40
         
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 										class="ui-state-default"
53 53
 										title="<?php echo I18N::translate('Show individuals who are alive or couples where both partners are alive.'); ?>"
54 54
 									>
55
-									<?php echo I18N::translate('Both alive');?>
55
+									<?php echo I18N::translate('Both alive'); ?>
56 56
 									</button>
57 57
 									<button
58 58
 										type="button"
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 										class="ui-state-default"
62 62
 										title="<?php echo I18N::translate('Show couples where only the female partner is dead.'); ?>"
63 63
 									>
64
-									<?php echo I18N::translate('Widower');?>
64
+									<?php echo I18N::translate('Widower'); ?>
65 65
 									</button>
66 66
 									<button
67 67
 										type="button"
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 				</thead>
176 176
 				<tbody>
177 177
 			
178
-			<?php foreach($this->data->get('sosa_list') as $sosa => $family) {
178
+			<?php foreach ($this->data->get('sosa_list') as $sosa => $family) {
179 179
 			    /** @var \Fisharebest\Webtrees\Family $person */
180 180
 
181 181
 			    //PERSO Create decorator for Family
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 			    }
193 193
 			    $dwife = new \MyArtJaub\Webtrees\Individual($wife);
194 194
 			    
195
-			    $mdate=$family->getMarriageDate();
195
+			    $mdate = $family->getMarriageDate();
196 196
 			    
197 197
 			    if ($family->isPendingAddtion()) {
198 198
 			        $class = ' class="new"';
@@ -208,17 +208,17 @@  discard block
 block discarded – undo
208 208
         			<?php list($surn_givn, $givn_surn) = FunctionsPrintLists::sortableNames($husb); ?>
209 209
         			<td colspan="2" data-sort="<?= Filter::escapeHtml($givn_surn) ?>">        			
210 210
         			<?php foreach ($husb->getAllNames() as $num=>$name) {
211
-        				if ($name['type']=='NAME') {
212
-        					$title='';
211
+        				if ($name['type'] == 'NAME') {
212
+        					$title = '';
213 213
         				} else {
214
-        					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"';
214
+        					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $husb)).'"';
215 215
         				}
216
-        				if ($num==$husb->getPrimaryName()) {
217
-        					$class=' class="name2"';
218
-        					$sex_image=$husb->getSexImage();
216
+        				if ($num == $husb->getPrimaryName()) {
217
+        					$class = ' class="name2"';
218
+        					$sex_image = $husb->getSexImage();
219 219
         				} else {
220
-        					$class='';
221
-        					$sex_image='';
220
+        					$class = '';
221
+        					$sex_image = '';
222 222
         				} ?>
223 223
         				<a <?php echo $title.' '.$class; ?> href="<?php echo $husb->getHtmlUrl(); ?>">
224 224
         					<?php echo \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']); ?>
@@ -230,23 +230,23 @@  discard block
 block discarded – undo
230 230
             		?>
231 231
             		</td>
232 232
             		<td hidden data-sort="<?= Filter::escapeHtml($surn_givn) ?>"></td>
233
-            		<?php $hdate=$husb->getBirthDate(); ?>
233
+            		<?php $hdate = $husb->getBirthDate(); ?>
234 234
             		<td class="center" data-sort="<?= Date::getAge($hdate, $mdate, 1) ?>"><?= Date::getAge($hdate, $mdate, 2) ?></td>
235 235
             		<!--  WIFE -->            		
236 236
         			<?php list($surn_givn, $givn_surn) = FunctionsPrintLists::sortableNames($wife); ?>
237 237
         			<td colspan="2">
238 238
         			<?php foreach ($wife->getAllNames() as $num=>$name) {
239
-        				if ($name['type']=='NAME') {
240
-        					$title='';
239
+        				if ($name['type'] == 'NAME') {
240
+        					$title = '';
241 241
         				} else {
242
-        					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"';
242
+        					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $wife)).'"';
243 243
         				}
244
-        				if ($num==$wife->getPrimaryName()) {
245
-        					$class=' class="name2"';
246
-        					$sex_image=$wife->getSexImage();
244
+        				if ($num == $wife->getPrimaryName()) {
245
+        					$class = ' class="name2"';
246
+        					$sex_image = $wife->getSexImage();
247 247
         				} else {
248
-        					$class='';
249
-        					$sex_image='';
248
+        					$class = '';
249
+        					$sex_image = '';
250 250
         				} ?>
251 251
         				<a <?= $title.' '.$class ?> href="<?= $wife->getHtmlUrl() ?>">
252 252
         					<?= \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']) ?>
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             		?>
259 259
             		</td>
260 260
             		<td hidden data-sort="<?= Filter::escapeHtml($surn_givn) ?>"></td>
261
-            		<?php $wdate=$wife->getBirthDate(); ?>
261
+            		<?php $wdate = $wife->getBirthDate(); ?>
262 262
             		<td class="center" data-sort="<?= Date::getAge($wdate, $mdate, 1) ?>"><?= Date::getAge($wdate, $mdate, 2) ?></td>
263 263
             		<td data-sort="<?= $mdate->julianDay() ?>"><?php 
264 264
             		if ($marriage_dates = $family->getAllMarriageDates()) {
Please login to merge, or discard this patch.
src/Webtrees/Module/Sosa/Views/SosaListIndiView.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 */
34 34
     protected function renderContent() { 
35 35
         
36
-        if($this->data->get('has_sosa', false)) {
36
+        if ($this->data->get('has_sosa', false)) {
37 37
             $table_id = $this->data->get('table_id');            
38 38
         ?>   
39 39
         
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 				</thead>
177 177
 			<tbody>
178 178
 			
179
-			<?php foreach($this->data->get('sosa_list') as $sosa => $person) {
179
+			<?php foreach ($this->data->get('sosa_list') as $sosa => $person) {
180 180
 			    /** @var \Fisharebest\Webtrees\Individual $person */
181 181
 			    if ($person->isPendingAddtion()) {
182 182
 			        $class = ' class="new"';
@@ -193,17 +193,17 @@  discard block
 block discarded – undo
193 193
         			<?php list($surn_givn, $givn_surn) = FunctionsPrintLists::sortableNames($person); ?>
194 194
         			<td colspan="2" data-sort="<?= Filter::escapeHtml($givn_surn) ?>">
195 195
         			<?php foreach ($person->getAllNames() as $num=>$name) {
196
-        				if ($name['type']=='NAME') {
197
-        					$title='';
196
+        				if ($name['type'] == 'NAME') {
197
+        					$title = '';
198 198
         				} else {
199
-        					$title='title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
199
+        					$title = 'title="'.strip_tags(GedcomTag::getLabel($name['type'], $person)).'"';
200 200
         				}
201
-        				if ($num==$person->getPrimaryName()) {
202
-        					$class=' class="name2"';
203
-        					$sex_image=$person->getSexImage();
201
+        				if ($num == $person->getPrimaryName()) {
202
+        					$class = ' class="name2"';
203
+        					$sex_image = $person->getSexImage();
204 204
         				} else {
205
-        					$class='';
206
-        					$sex_image='';
205
+        					$class = '';
206
+        					$sex_image = '';
207 207
         				} ?>
208 208
         				<a <?= $title.' '.$class; ?> href="<?= $person->getHtmlUrl() ?>">
209 209
         					<?= \Fisharebest\Webtrees\Functions\FunctionsPrint::highlightSearchHits($name['full']) ?>
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         			<?php } ?>
263 263
         			</td>
264 264
         			<?php if (ModuleManager::getInstance()->isOperational(Constants::MODULE_MAJ_ISSOURCED_NAME)) {
265
-        			    if($person->isDead()) {
265
+        			    if ($person->isDead()) {
266 266
         			        $isDSourced = $dperson->isDeathSourced(); ?>
267 267
 				   	<td data-sort=<?= $isDSourced ?>><?= FunctionsPrint::formatIsSourcedIcon('E', $isDSourced, 'DEAT', 1, 'medium') ?></td>
268 268
 					<?php } else { ?>
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
 							<?= I18N::translate('Number of Sosa ancestors: %1$s known / %2$s theoretical (%3$s)',
310 310
 							    I18N::number($this->data->get('sosa_count')),
311 311
 							    I18N::number($this->data->get('sosa_theo')), 
312
-							    I18N::percentage($this->data->get('sosa_ratio'),2)
312
+							    I18N::percentage($this->data->get('sosa_ratio'), 2)
313 313
 							    ) ?>
314
-							<?php if($this->data->get('sosa_hidden') > 0) {
315
-							    echo '['. I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']';
314
+							<?php if ($this->data->get('sosa_hidden') > 0) {
315
+							    echo '['.I18N::translate('%s hidden', I18N::number($this->data->get('sosa_hidden'))).']';
316 316
 							} ?>
317 317
 						</div>
318 318
 					</th>
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 								<button type="button" class="ui-state-default btn-toggle-parents">
325 325
 									<?= I18N::translate('Show parents') ?>
326 326
 								</button>
327
-								<button id="btn-toggle-statistics-<?= $table_id ;?>" type="button" class="ui-state-default btn-toggle-statistics">
327
+								<button id="btn-toggle-statistics-<?= $table_id; ?>" type="button" class="ui-state-default btn-toggle-statistics">
328 328
 									<?= I18N::translate('Show statistics charts') ?>
329 329
 								</button>
330 330
 							</div>
Please login to merge, or discard this patch.