Plac::convert()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 2
dl 0
loc 13
rs 10
c 0
b 0
f 0
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 PhpGedcom\Writer\Head;
16
17
class Plac
18
{
19
    /**
20
     * @param \PhpGedcom\Record\Head\Plac $plac
21
     * @param string                      $format
22
     * @param int                         $level
23
     *
24
     * @return string
25
     */
26
    public static function convert(\PhpGedcom\Record\Head\Plac &$plac, $level)
27
    {
28
        $output = $level." PLAC \n";
29
30
        // level up
31
        $level++;
32
        // FORM
33
        $form = $plac->getForm();
0 ignored issues
show
Bug introduced by
The method getForm() does not exist on PhpGedcom\Record\Head\Plac. 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

33
        /** @scrutinizer ignore-call */ 
34
        $form = $plac->getForm();
Loading history...
34
        if ($form) {
35
            $output .= $level.' FORM '.$form."\n";
0 ignored issues
show
Bug introduced by
Are you sure $form of type PhpGedcom\Record\Head\Plac|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

35
            $output .= $level.' FORM './** @scrutinizer ignore-type */ $form."\n";
Loading history...
36
        }
37
38
        return $output;
39
    }
40
}
41