1 | <?php |
||||||
2 | /** |
||||||
3 | * php-gedcom. |
||||||
4 | * |
||||||
5 | * php-gedcom is a library for parsing, manipulating, importing and exporting |
||||||
6 | * GEDCOM 5.5 files in PHP 5.3+. |
||||||
7 | * |
||||||
8 | * @author Xiang Ming <[email protected]> |
||||||
9 | * @copyright Copyright (c) 2010-2013, Xiang Ming |
||||||
10 | * @license MIT |
||||||
11 | * |
||||||
12 | * @link http://github.com/mrkrstphr/php-gedcom |
||||||
13 | */ |
||||||
14 | |||||||
15 | namespace Gedcom\Writer\Head; |
||||||
16 | |||||||
17 | class Date |
||||||
18 | { |
||||||
19 | /** |
||||||
20 | * @param string $format |
||||||
21 | * @param int $level |
||||||
22 | * |
||||||
23 | * @return string |
||||||
24 | */ |
||||||
25 | public static function convert(\Gedcom\Record\Head\Date &$date, $level) |
||||||
26 | { |
||||||
27 | $output = ''; |
||||||
28 | $_date = $date->getDate(); |
||||||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||||||
29 | if ($_date) { |
||||||
30 | $output .= $level.' DATE '.$_date."\n"; |
||||||
0 ignored issues
–
show
Are you sure
$_date of type Gedcom\Record\Head\Date|mixed can be used in concatenation ?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
31 | } else { |
||||||
32 | return $output; |
||||||
33 | } |
||||||
34 | |||||||
35 | // level up |
||||||
36 | $level++; |
||||||
37 | // Time |
||||||
38 | $time = $date->getTime(); |
||||||
0 ignored issues
–
show
The method
getTime() does not exist on Gedcom\Record\Head\Date . Since you implemented __call , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
39 | if ($time) { |
||||||
40 | $output .= $level.' TIME '.$time."\n"; |
||||||
0 ignored issues
–
show
Are you sure
$time of type Gedcom\Record\Head\Date|mixed can be used in concatenation ?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||||
41 | } |
||||||
42 | |||||||
43 | return $output; |
||||||
44 | } |
||||||
45 | } |
||||||
46 |