src/Events/php_exporter.php
public function validate_event($event_name, $line)
	{
		$event = substr(ltrim($line, " \t"), strlen('* @event '));

		if ($event !== trim($event))
		{
			throw new \LogicException("Invalid '@event' information for event "
				. "'{$this->current_event}' in file '{$this->current_clean_file}:{$this->current_event_line}'", 1);
		}

		if ($event !== $event_name)
		{
			throw new \LogicException("Event name does not match '@event' tag for event "
				. "'{$this->current_event}' in file '{$this->current_clean_file}:{$this->current_event_line}'", 2);
		}

		return $event;
	}
public function validate_event($event_name, $line)
	{
		$event = substr(ltrim($line, " \t"), strlen('* @event '));

		if ($event !== trim($event))
		{
			throw new \LogicException("Invalid '@event' information for event "
				. "'{$this->current_event}' in file '{$this->current_clean_file}:{$this->current_event_line}'", 1);
		}

		if ($event !== $event_name)
		{
			throw new \LogicException("Event name does not match '@event' tag for event "
				. "'{$this->current_event}' in file '{$this->current_clean_file}:{$this->current_event_line}'", 2);
		}

		return $event;
	}
Validate "@event" Information

@param string $event_name
@param string $line

@return string
@throws \LogicException