private static function parseNotes(SimpleXMLElement $noteElement, ?string $encoding = null): array
    {
        $notes = [];

        /** @var \SimpleXMLElement $xmlNote */
        foreach ($noteElement as $xmlNote) {
            $noteAttributes = $xmlNote->attributes();
            $note           = ['content' => self::utf8ToCharset((string) $xmlNote, $encoding)];

            if (isset($noteAttributes['priority'])) {
                $note['priority'] = (int) $noteAttributes['priority'];
            }

            if (isset($noteAttributes['from'])) {
                $note['from'] = (string) $noteAttributes['from'];
            }

            $notes[] = $note;
        }

        return $notes;
    }
private static function parseNotes(SimpleXMLElement $noteElement, ?string $encoding = null): array
    {
        $notes = [];

        /** @var \SimpleXMLElement $xmlNote */
        foreach ($noteElement as $xmlNote) {
            $noteAttributes = $xmlNote->attributes();
            $note           = ['content' => self::utf8ToCharset((string) $xmlNote, $encoding)];

            if (isset($noteAttributes['priority'])) {
                $note['priority'] = (int) $noteAttributes['priority'];
            }

            if (isset($noteAttributes['from'])) {
                $note['from'] = (string) $noteAttributes['from'];
            }

            $notes[] = $note;
        }

        return $notes;
    }
private static function parseNotes ( SimpleXMLElement $ noteElement , ? string $ encoding = null ) : array { $ notes = [ ] ; /** @var \SimpleXMLElement $xmlNote */ foreach ( $ noteElement as $ xmlNote ) { $ noteAttributes = $ xmlNote -> attributes ( ) ; $ note = [ 'content' => self :: utf8ToCharset ( ( string ) $ xmlNote , $ encoding ) ] ; if ( isset ( $ noteAttributes [ 'priority' ] ) ) { $ note [ 'priority' ] = ( int ) $ noteAttributes [ 'priority' ] ; } if ( isset ( $ noteAttributes [ 'from' ] ) ) { $ note [ 'from' ] = ( string ) $ noteAttributes [ 'from' ] ; } $ notes [ ] = $ note ; } return $ notes ; }
Parse xliff notes.

@param \SimpleXMLElement $noteElement
@param null|string       $encoding

@return array
Parse xliff notes .