for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* php-gedcom.
*
* php-gedcom is a library for parsing, manipulating, importing and exporting
* GEDCOM 5.5 files in PHP 5.3+.
* @author Xiang Ming <[email protected]>
* @copyright Copyright (c) 2010-2013, Xiang Ming
* @license MIT
* @link http://github.com/mrkrstphr/php-gedcom
*/
namespace Gedcom\Writer\Head;
class Sour
{
* @param string $format
* @param int $level
* @return string
public static function convert(\Gedcom\Record\Head\Sour &$sour, $level)
$output = '';
$_sour = $sour->getSour();
getSour()
Gedcom\Record\Head\Sour
__call
If this is a false-positive, you can also ignore this issue in your code via the ignore-call annotation
ignore-call
/** @scrutinizer ignore-call */
if ($_sour) {
$output .= $level.' SOUR '.$_sour."\n";
$_sour
Gedcom\Record\Head\Sour|mixed
concatenation
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
$output .= $level.' SOUR './** @scrutinizer ignore-type */ $_sour."\n";
} else {
return $output;
}
// level up
$level++;
// VERS
$vers = $sour->getVersion();
if ($vers) {
$vers
Gedcom\Record\Head\Sour\Version
true
$output .= $level.' VERS '.$vers."\n";
// NAME
$name = $sour->getName();
if ($name) {
$name
Gedcom\Record\Head\Sour\Name
$output .= $level.' NAME '.$name."\n";
// CORP
$corp = $sour->getCorp();
if ($corp) {
$corp
Gedcom\Record\Head\Sour\Corp
$_convert = \Gedcom\Writer\Head\Sour\Corp::convert($corp, $level);
$output .= $_convert;
// DATA
$data = $sour->getData();
if ($data) {
$data
Gedcom\Record\Head\Sour\Data
$_convert = \Gedcom\Writer\Head\Sour\Data::convert($data, $level);