app/Fact.php
public function getCitations(): array
    {
        preg_match_all('/\n(2 SOUR @(' . Gedcom::REGEX_XREF . ')@(?:\n[3-9] .*)*)/', $this->gedcom(), $matches, PREG_SET_ORDER);
        $citations = [];
        foreach ($matches as $match) {
            $source = Source::getInstance($match[2], $this->record()->tree());
            if ($source && $source->canShow()) {
                $citations[] = $match[1];
            }
        }

        return $citations;
    }
public function getCitations(): array
    {
        preg_match_all('/\n(2 SOUR @(' . Gedcom::REGEX_XREF . ')@(?:\n[3-9] .*)*)/', $this->gedcom(), $matches, PREG_SET_ORDER);
        $citations = [];
        foreach ($matches as $match) {
            $source = Source::getInstance($match[2], $this->record()->tree());
            if ($source && $source->canShow()) {
                $citations[] = $match[1];
            }
        }

        return $citations;
    }
public function getCitations ( ) : array { preg_match_all ( '/\n(2 SOUR @(' . Gedcom :: REGEX_XREF . ')@(?:\n[3-9] .*)*)/' , $ this -> gedcom ( ) , $ matches , PREG_SET_ORDER ) ; $ citations = [ ] ; foreach ( $ matches as $ match ) { $ source = Source :: getInstance ( $ match [ 2 ] , $ this -> record ( ) -> tree ( ) ) ; if ( $ source && $ source -> canShow ( ) ) { $ citations [ ] = $ match [ 1 ] ; } } return $ citations ; }
Source citations linked to this fact

@return string[]
Source citations linked to this fact