Issues (384)

src/Writer/Head/Char.php (4 issues)

Labels
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 Char
18
{
19
    /**
20
     * @param string $format
21
     * @param int    $level
22
     *
23
     * @return string
24
     */
25
    public static function convert(\Gedcom\Record\Head\Char &$char, $level)
26
    {
27
        $output = '';
28
        // char
29
        $_char = $char->getChar();
0 ignored issues
show
The method getChar() does not exist on Gedcom\Record\Head\Char. 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 ignore-call  annotation

29
        /** @scrutinizer ignore-call */ 
30
        $_char = $char->getChar();
Loading history...
30
        if ($_char) {
31
            $output .= $level.' CHAR '.$_char."\n";
0 ignored issues
show
Are you sure $_char of type Gedcom\Record\Head\Char|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 ignore-type  annotation

31
            $output .= $level.' CHAR './** @scrutinizer ignore-type */ $_char."\n";
Loading history...
32
        } else {
33
            return $output;
34
        }
35
36
        // level up
37
        $level++;
38
        // VERS
39
        $vers = $char->getVersion();
0 ignored issues
show
The method getVersion() does not exist on Gedcom\Record\Head\Char. 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 ignore-call  annotation

39
        /** @scrutinizer ignore-call */ 
40
        $vers = $char->getVersion();
Loading history...
40
        if ($vers) {
41
            $output .= $level.' VERS '.$vers."\n";
0 ignored issues
show
Are you sure $vers of type Gedcom\Record\Head\Char|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 ignore-type  annotation

41
            $output .= $level.' VERS './** @scrutinizer ignore-type */ $vers."\n";
Loading history...
42
        }
43
44
        return $output;
45
    }
46
}
47