Completed
Pull Request — master (#1866)
by Rico
52:31 queued 43:48
created
app/Census/CensusColumnAgeFemale.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,6 +38,6 @@
 block discarded – undo
38 38
             return '';
39 39
         }
40 40
 
41
-        return (string)Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
41
+        return (string) Date::getAge($individual->getEstimatedBirthDate(), $this->date(), 0);
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
app/I18N.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -836,31 +836,31 @@
 block discarded – undo
836 836
         $year   = 365 * $day;
837 837
 
838 838
         if ($seconds > $year) {
839
-            $years = (int)($seconds / $year);
839
+            $years = (int) ($seconds / $year);
840 840
 
841 841
             return self::plural('%s year ago', '%s years ago', $years, self::number($years));
842 842
         }
843 843
 
844 844
         if ($seconds > $month) {
845
-            $months = (int)($seconds / $month);
845
+            $months = (int) ($seconds / $month);
846 846
 
847 847
             return self::plural('%s month ago', '%s months ago', $months, self::number($months));
848 848
         }
849 849
 
850 850
         if ($seconds > $day) {
851
-            $days = (int)($seconds / $day);
851
+            $days = (int) ($seconds / $day);
852 852
 
853 853
             return self::plural('%s day ago', '%s days ago', $days, self::number($days));
854 854
         }
855 855
 
856 856
         if ($seconds > $hour) {
857
-            $hours = (int)($seconds / $hour);
857
+            $hours = (int) ($seconds / $hour);
858 858
 
859 859
             return self::plural('%s hour ago', '%s hours ago', $hours, self::number($hours));
860 860
         }
861 861
 
862 862
         if ($seconds > $minute) {
863
-            $minutes = (int)($seconds / $minute);
863
+            $minutes = (int) ($seconds / $minute);
864 864
 
865 865
             return self::plural('%s minute ago', '%s minutes ago', $minutes, self::number($minutes));
866 866
         }
Please login to merge, or discard this patch.
resources/views/media-list-page.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -123,49 +123,49 @@
 block discarded – undo
123 123
 
124 124
 							<p class="card-text">
125 125
 								<?php
126
-								// Show file details
127
-								$mediatype = $media_file->type();
128
-								if ($mediatype) {
129
-									echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype));
130
-								}
131
-								echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1);
132
-								echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1);
133
-								if ($media_file->isExternal()) {
134
-									echo GedcomTag::getLabelValue('URL', $media_file->filename());
135
-								} elseif ($media_file->fileExists()) {
136
-									?>
126
+                                // Show file details
127
+                                $mediatype = $media_file->type();
128
+                                if ($mediatype) {
129
+                                    echo GedcomTag::getLabelValue('TYPE', GedcomTag::getFileFormTypeValue($mediatype));
130
+                                }
131
+                                echo FunctionsPrintFacts::printFactSources($tree, $media_object->getGedcom(), 1);
132
+                                echo FunctionsPrint::printFactNotes($tree, $media_object->getGedcom(), 1);
133
+                                if ($media_file->isExternal()) {
134
+                                    echo GedcomTag::getLabelValue('URL', $media_file->filename());
135
+                                } elseif ($media_file->fileExists()) {
136
+                                    ?>
137 137
 								<button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#details-<?= e($n) ?>" aria-expanded="false" aria-controls="details-<?= e($n) ?>">
138 138
 									<?= I18N::translate('Media file') ?>
139 139
 								</button>
140 140
 							<div class="collapse" id="details-<?= e($n) ?>">
141 141
 								<?php
142
-								if (Auth::isEditor($tree)) {
143
-									echo GedcomTag::getLabelValue('FILE', $media_file->filename());
144
-								}
145
-								echo GedcomTag::getLabelValue('FORM', $media_file->mimeType());
146
-								foreach ($media_file->attributes() as $tag => $value) {
147
-									echo GedcomTag::getLabelValue($tag, $value);
148
-								}
149
-								?>
142
+                                if (Auth::isEditor($tree)) {
143
+                                    echo GedcomTag::getLabelValue('FILE', $media_file->filename());
144
+                                }
145
+                                echo GedcomTag::getLabelValue('FORM', $media_file->mimeType());
146
+                                foreach ($media_file->attributes() as $tag => $value) {
147
+                                    echo GedcomTag::getLabelValue($tag, $value);
148
+                                }
149
+                                ?>
150 150
 							</div>
151 151
 						<?php
152
-								} else {
153
-									echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>';
154
-								}
155
-								?>
152
+                                } else {
153
+                                    echo '<p class="alert alert-danger">', /* I18N: %s is a filename */ I18N::translate('The file “%s” does not exist.', $media_file->filename()), '</p>';
154
+                                }
155
+                                ?>
156 156
 							</p>
157 157
 						</div>
158 158
 						<div class="card-footer">
159 159
 							<?php
160
-							foreach ($media_object->linkedIndividuals('OBJE') as $individual) {
161
-								echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>';
162
-							}
163
-							foreach ($media_object->linkedFamilies('OBJE') as $family) {
164
-								echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>';
165
-							}
166
-							foreach ($media_object->linkedSources('OBJE') as $source) {
167
-								echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>';
168
-							} ?>
160
+                            foreach ($media_object->linkedIndividuals('OBJE') as $individual) {
161
+                                echo '<a href="' . e($individual->url()) . '">' . FontAwesome::semanticIcon('individual', I18N::translate('Individual')) . ' ' . $individual->getFullName() . '</a><br>';
162
+                            }
163
+                            foreach ($media_object->linkedFamilies('OBJE') as $family) {
164
+                                echo '<a href="' . e($family->url()) . '">' . FontAwesome::semanticIcon('family', I18N::translate('Family')) . ' ' . $family->getFullName() . '</a><br>';
165
+                            }
166
+                            foreach ($media_object->linkedSources('OBJE') as $source) {
167
+                                echo '<a href="' . e($source->url()) . '">' . FontAwesome::semanticIcon('source', I18N::translate('Source')) . ' ' . $source->getFullName() . '</a><br>';
168
+                            } ?>
169 169
 						</div>
170 170
 					</div>
171 171
 				</div>
Please login to merge, or discard this patch.
resources/views/calendar-page.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -159,16 +159,16 @@
 block discarded – undo
159 159
 			</td>
160 160
 			<td class="topbottombar width50">
161 161
 				<?php
162
-					$n = 0;
163
-					foreach (Date::calendarNames() as $newcal => $cal_name) {
164
-						$tmp = $cal_date->convertToCalendar($newcal);
165
-						if ($tmp->inValidRange()) {
166
-							if ($n++) {
167
-								echo ' | ';
168
-							}
169
-							echo '<a ' . (get_class($tmp) === get_class($cal_date) ? 'class="error"' : '') . 'href="' . e(route('calendar', ['cal' => $tmp->format('%@'), 'day' => $tmp->d, 'month' => $tmp->format('%O'), 'year' => $tmp->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) . '" rel="nofollow">', $cal_name, '</a>';
170
-						}
171
-					} ?>
162
+                    $n = 0;
163
+                    foreach (Date::calendarNames() as $newcal => $cal_name) {
164
+                        $tmp = $cal_date->convertToCalendar($newcal);
165
+                        if ($tmp->inValidRange()) {
166
+                            if ($n++) {
167
+                                echo ' | ';
168
+                            }
169
+                            echo '<a ' . (get_class($tmp) === get_class($cal_date) ? 'class="error"' : '') . 'href="' . e(route('calendar', ['cal' => $tmp->format('%@'), 'day' => $tmp->d, 'month' => $tmp->format('%O'), 'year' => $tmp->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => $view, 'ged' => $tree->getName()])) . '" rel="nofollow">', $cal_name, '</a>';
170
+                        }
171
+                    } ?>
172 172
 			</td>
173 173
 		</tr>
174 174
 	</table>
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@  discard block
 block discarded – undo
45 45
                     <a href="<?= e(route('calendar', ['cal' => $cal, 'day' => $cal_date->d, 'month' => $m, 'year' => $cal_date->y, 'filterev' => $filterev, 'filterof' => $filterof, 'filtersx' => $filtersx, 'view' => 'month', 'ged' => $tree->getName()])) ?>" rel="nofollow">
46 46
                         <?php if ($m === $cal_month): ?>
47 47
                             <span class="error"><?= e($month_name) ?></span>
48
-                        <?php else: ?>
48
+                        <?php else {
49
+    : ?>
49 50
                             <?= e($month_name) ?>
50 51
                         <?php endif ?>
51 52
                     </a> |
@@ -160,6 +161,7 @@  discard block
 block discarded – undo
160 161
 			<td class="topbottombar width50">
161 162
 				<?php
162 163
 					$n = 0;
164
+}
163 165
 					foreach (Date::calendarNames() as $newcal => $cal_name) {
164 166
 						$tmp = $cal_date->convertToCalendar($newcal);
165 167
 						if ($tmp->inValidRange()) {
Please login to merge, or discard this patch.