public function buildTree(): Node
    {
        $sections = [];

        foreach (self::SECTION_TO_RECORD_STORE_MAP as $sectionName => $recordStore) {
            if (!empty($this->$recordStore)) {
                $sections[] = new Section($sectionName, $this->opening, ...$this->$recordStore);
            }
        }

        return new AutogiroFile('AutogiroRequestFile', ...$sections);
    }
public function buildTree(): Node
    {
        $sections = [];

        foreach (self::SECTION_TO_RECORD_STORE_MAP as $sectionName => $recordStore) {
            if (!empty($this->$recordStore)) {
                $sections[] = new Section($sectionName, $this->opening, ...$this->$recordStore);
            }
        }

        return new AutogiroFile('AutogiroRequestFile', ...$sections);
    }
public function buildTree ( ) : Node { $ sections = [ ] ; foreach ( self :: SECTION_TO_RECORD_STORE_MAP as $ sectionName => $ recordStore ) { if ( ! empty ( $ this -> $ recordStore ) ) { $ sections [ ] = new Section ( $ sectionName , $ this -> opening , ... $ this -> $ recordStore ) ; } } return new AutogiroFile ( 'AutogiroRequestFile' , ... $ sections ) ; }
Get the created request tree
Get the created request tree