Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use \DomainException;
- use \InvalidArgumentException;
- /**
- * junk_anno_issue.php
- *
- * PHP version 5.4
- *
- * @since 20150803 19:33
- * @author Michael Cummings <mgcummings@yahoo.com>
- */
- class test
- {
- /**
- * Hi I'm a docblock.
- *
- * @param string $eventName
- * @param array $listener
- * @param int $priority
- *
- * @throws DomainException
- * @throws InvalidArgumentException
- */
- public function addListener($eventName, array $listener, $priority = 0)
- {
- $this->checkEventName($eventName);
- $this->checkAllowedListener($listener);
- /* other code */
- }
- /**
- * Hi I'm a docblock too.
- *
- * @param string $eventName
- *
- * @throws DomainException
- */
- public function checkEventName($eventName)
- {
- $eventName = (string)$eventName;
- throw new DomainException('oops');
- }
- /**
- * Hi I'm a docblock three.
- *
- * @param $listener
- *
- * @throws InvalidArgumentException
- */
- public function checkAllowedListener($listener)
- {
- $listener = (array)$listener;
- throw new InvalidArgumentException;
- }
- }
- class test1 extends test
- {
- /**
- * REMOVE THIS ONE!!!
- *
- * @inheritdoc
- */
- public function addListener($eventName, array $listener, $priority = 0)
- {
- $this->checkEventName($eventName);
- $this->checkAllowedListener($listener);
- /* other code */
- }
- /**
- * @param $eventName
- *
- * @throws DomainException
- */
- public function checkEventName($eventName)
- {
- $eventName = (string)$eventName;
- throw new DomainException('oops');
- }
- /**
- * @param $listener
- */
- public function checkAllowedListener($listener)
- {
- $listener = (array)$listener;
- throw new InvalidArgumentException;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement