Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

declare(strict_types=1);

use Rector\Core\Configuration\Option;
use Rector\Php74\Rector\Property\TypedPropertyRector;
use Rector\Set\ValueObject\SetList;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
Expand Down
18 changes: 9 additions & 9 deletions src/Gedcom.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,31 +93,31 @@ class Gedcom
/**
* Retrieves the header record of the GEDCOM file.
*/
public function setHead (\Gedcom\Record\Head $head)
public function setHead(\Gedcom\Record\Head $head)
{
$this->head = $head;
}

/**
* Retrieves the submission record of the GEDCOM file.
*/
public function setSubn (\Gedcom\Record\Subn $subn)
public function setSubn(\Gedcom\Record\Subn $subn)
{
$this->subn = $subn;
}

/**
* Adds a source to the collection of sources.
*/
public function addSour (\Gedcom\Record\Sour $sour)
public function addSour(\Gedcom\Record\Sour $sour)
{
$this->sour[$sour->getSour()] = $sour;
}

/**
* Adds an individual to the collection of individuals.
*/
public function addIndi (\Gedcom\Record\Indi $indi)
public function addIndi(\Gedcom\Record\Indi $indi)
{
$this->indi[$indi->getId()] = $indi;
if ($indi->getUid()) {
Expand All @@ -128,39 +128,39 @@ public function addIndi (\Gedcom\Record\Indi $indi)
/**
* Adds a family to the collection of families.
*/
public function addFam (\Gedcom\Record\Fam $fam)
public function addFam(\Gedcom\Record\Fam $fam)
{
$this->fam[$fam->getId()] = $fam;
}

/**
* Adds a note to the collection of notes.
*/
public function addNote (\Gedcom\Record\Note $note)
public function addNote(\Gedcom\Record\Note $note)
{
$this->note[$note->getId()] = $note;
}

/**
* Adds a repository to the collection of repositories.
*/
public function addRepo (\Gedcom\Record\Repo $repo)
public function addRepo(\Gedcom\Record\Repo $repo)
{
$this->repo[$repo->getRepo()] = $repo;
}

/**
* Adds an object to the collection of objects.
*/
public function addObje (\Gedcom\Record\Obje $obje)
public function addObje(\Gedcom\Record\Obje $obje)
{
$this->obje[$obje->getId()] = $obje;
}

/**
* Adds a submitter record to the collection of submitters.
*/
public function addSubm (\Gedcom\Record\Subm $subm)
public function addSubm(\Gedcom\Record\Subm $subm)
{
$this->subm[$subm->getSubm()] = $subm;
}
Expand Down
18 changes: 9 additions & 9 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,23 @@ public function parse($fileName)
}

if (isset($record[1]) && trim($record[1]) == 'HEAD') {
\Gedcom\Parser\Head::parse($this);
\Gedcom\Parser\Head::parse($this);
} elseif (isset($record[2]) && trim($record[2]) == 'SUBN') {
\Gedcom\Parser\Subn::parse($this);
\Gedcom\Parser\Subn::parse($this);
} elseif (isset($record[2]) && trim($record[2]) == 'SUBM') {
\Gedcom\Parser\Subm::parse($this);
\Gedcom\Parser\Subm::parse($this);
} elseif (isset($record[2]) && $record[2] == 'SOUR') {
\Gedcom\Parser\Sour::parse($this);
\Gedcom\Parser\Sour::parse($this);
} elseif (isset($record[2]) && $record[2] == 'INDI') {
\Gedcom\Parser\Indi::parse($this);
\Gedcom\Parser\Indi::parse($this);
} elseif (isset($record[2]) && $record[2] == 'FAM') {
\Gedcom\Parser\Fam::parse($this);
\Gedcom\Parser\Fam::parse($this);
} elseif (isset($record[2]) && substr(trim($record[2]), 0, 4) == 'NOTE') {
\Gedcom\Parser\Note::parse($this);
\Gedcom\Parser\Note::parse($this);
} elseif (isset($record[2]) && $record[2] == 'REPO') {
\Gedcom\Parser\Repo::parse($this);
\Gedcom\Parser\Repo::parse($this);
} elseif (isset($record[2]) && $record[2] == 'OBJE') {
\Gedcom\Parser\Obje::parse($this);
\Gedcom\Parser\Obje::parse($this);
} elseif (isset($record[1]) && trim($record[1]) == 'TRLR') {
// EOF
break;
Expand Down
6 changes: 3 additions & 3 deletions src/Parser/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static function parse(\Gedcom\Parser $parser)

$parser->forward();
$record = $parser->getCurrentLineRecord();

if (isset($record[1])) {
$dat = new \Gedcom\Record\Date();
if (!empty($record[2])) {
Expand All @@ -34,9 +34,9 @@ public static function parse(\Gedcom\Parser $parser)

return null;
}

if ($dat->getYear() && $dat->getMonth() && $dat->getDay()) {
return $dat->getYear() .'-'. substr("0{$dat->getMonth()}", -2) .'-'. substr("0{$dat->getDay()}", -2);
return $dat->getYear().'-'.substr("0{$dat->getMonth()}", -2).'-'.substr("0{$dat->getDay()}", -2);
}

return null;
Expand Down
2 changes: 0 additions & 2 deletions src/Parser/Indi/Even.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Parser\Indi;

use \Gedcom\Parser\Chan;

class Even extends \Gedcom\Parser\Component
{
public static function parse(\Gedcom\Parser $parser)
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Addr.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record;

use \Gedcom\Record;

/**
* Class Addr.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Caln.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record;

use \Gedcom\Record;

/**
* Class Caln.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Record/Chan.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Gedcom\Record;

use \Gedcom\Record;
use Gedcom\Record;

/**
* Class Chan.
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record;

use \Gedcom\Record;

/**
* Class Data.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record;

use \Gedcom\Record;

/**
* Class Date.
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Record/Fam/Even.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@

namespace Gedcom\Record\Fam;

use \Gedcom\Record\Noteable;
use \Gedcom\Record\Objectable;
use \Gedcom\Record\Sourceable;
use Gedcom\Record\Noteable;
use Gedcom\Record\Objectable;
use Gedcom\Record\Sourceable;

/**
* Event record.
*
* @method mixed getType()
* @method mixed getType()
* @method \Record\Date getDate()
* @method string getPlac()
* @method string getPlac()
*/
class Even extends \Gedcom\Record implements Objectable, Sourceable, Noteable
{
Expand Down
4 changes: 2 additions & 2 deletions src/Record/Fam/Slgs.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

namespace Gedcom\Record\Fam;

use \Gedcom\Record\Noteable;
use \Gedcom\Record\Sourceable;
use Gedcom\Record\Noteable;
use Gedcom\Record\Sourceable;

class Slgs extends \Gedcom\Record implements Sourceable, Noteable
{
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Head.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record;

use \Gedcom\Record;

/**
* Stores the data from the HEAD section of a GEDCOM 5.5 file.
*/
Expand Down
11 changes: 4 additions & 7 deletions src/Record/Indi.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

namespace Gedcom\Record;

use \Gedcom\Record;


/**
* Class Indi.
*/
Expand Down Expand Up @@ -138,16 +135,16 @@ class Indi extends \Gedcom\Record implements Noteable, Objectable, Sourceable
* @var Indi\Asso[]
*/
protected $asso = [];

protected $birthday;

public function setBirthday($birthday = '')
{
$this->birthday = $birthday;

return $this;
}

public function getBirthday()
{
return $this->birthday;
Expand Down
4 changes: 2 additions & 2 deletions src/Record/Indi/Asso.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

namespace Gedcom\Record\Indi;

use \Gedcom\Record\Noteable;
use \Gedcom\Record\Sourceable;
use Gedcom\Record\Noteable;
use Gedcom\Record\Sourceable;

class Asso extends \Gedcom\Record implements Sourceable, Noteable
{
Expand Down
6 changes: 3 additions & 3 deletions src/Record/Indi/Attr.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

namespace Gedcom\Record\Indi;

use \Gedcom\Record\Noteable;
use \Gedcom\Record\Objectable;
use \Gedcom\Record\Sourceable;
use Gedcom\Record\Noteable;
use Gedcom\Record\Objectable;
use Gedcom\Record\Sourceable;

class Attr extends \Gedcom\Record\Indi\Even implements Sourceable, Noteable, Objectable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Record/Indi/Even.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Gedcom\Record\Indi;

use \Gedcom\Record;
use Gedcom\Record;

/**
* Class Even.
Expand Down
2 changes: 1 addition & 1 deletion src/Record/Indi/Even/Plac.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Gedcom\Record\Indi\Even;

use \Gedcom\Record;
use Gedcom\Record;

/**
* Class Plac.
Expand Down
2 changes: 1 addition & 1 deletion src/Record/Indi/Famc.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Gedcom\Record\Indi;

use \Gedcom\Record\Noteable;
use Gedcom\Record\Noteable;

class Famc extends \Gedcom\Record implements Noteable
{
Expand Down
2 changes: 1 addition & 1 deletion src/Record/Indi/Fams.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace Gedcom\Record\Indi;

use \Gedcom\Record\Noteable;
use Gedcom\Record\Noteable;

class Fams extends \Gedcom\Record implements Noteable
{
Expand Down
4 changes: 2 additions & 2 deletions src/Record/Indi/Lds.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

namespace Gedcom\Record\Indi;

use \Gedcom\Record\Noteable;
use \Gedcom\Record\Sourceable;
use Gedcom\Record\Noteable;
use Gedcom\Record\Sourceable;

abstract class Lds extends \Gedcom\Record implements Sourceable, Noteable
{
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Indi/Name/Fone.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record\Indi\Name;

use \Gedcom\Record;

/**
* Class Refn.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Indi/Name/Romn.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record\Indi\Name;

use \Gedcom\Record;

/**
* Class Refn.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Record/ObjeRef/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record\ObjeRef;

use \Gedcom\Record;

/**
* Class Refn.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Record/ObjeRef/File/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record\ObjeRef\File;

use \Gedcom\Record;

/**
* Class Refn.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Phon.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record;

use \Gedcom\Record;

/**
* Class Phon.
*/
Expand Down
2 changes: 0 additions & 2 deletions src/Record/Plac/Fone.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

namespace Gedcom\Record\Plac;

use \Gedcom\Record;

/**
* Class Refn.
*/
Expand Down
Loading