HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/public/snappymail/snappymail/v/2.38.2/app/libraries/snappymail/rtf/group.php
<?php

namespace SnappyMail\Rtf;

class Group implements Entity
{
	public ?Group $parent = null;
	public array $children = []; // Entities

	public function getType()
	{
		if (isset($this->children[0])) {
			$child = $this->children[0];

			// If the first child is a control word, then
			// the group type is the word.
			if ($child instanceof ControlWord) {
				return $child->word;
			}

			// If the first child is a control symbol, then
			// the group type is * for a special symbol, or null.
			if ($child instanceof ControlSymbol) {
				return ('*' === $child->symbol) ? '*' : null;
			}
		}

		// If first child is neither word nor symbol, then
		// group type is null.
		return null;
	}
}