Skip to content

Commit

Permalink
Cleanup more @return annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Aug 17, 2021
1 parent d63cd06 commit 3de2cac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions EventDispatcherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function removeSubscriber(EventSubscriberInterface $subscriber);
/**
* Gets the listeners of a specific event or all listeners sorted by descending priority.
*
* @return array The event listeners for the specified event, or all event listeners by event name
* @return array<callable[]|callable>
*/
public function getListeners(string $eventName = null);

Expand All @@ -57,14 +57,14 @@ public function getListeners(string $eventName = null);
*
* Returns null if the event or the listener does not exist.
*
* @return int|null The event listener priority
* @return int|null
*/
public function getListenerPriority(string $eventName, callable $listener);

/**
* Checks whether an event has any registered listeners.
*
* @return bool true if the specified event has any listeners, false otherwise
* @return bool
*/
public function hasListeners(string $eventName = null);
}
2 changes: 1 addition & 1 deletion EventSubscriberInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface EventSubscriberInterface
* The code must not depend on runtime state as it will only be called at compile time.
* All logic depending on runtime state must be put into the individual methods handling the events.
*
* @return array<string, mixed> The event names to listen to
* @return array<string, (string|list<string,int>|list<list<string,int>>)>
*/
public static function getSubscribedEvents();
}
4 changes: 2 additions & 2 deletions GenericEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function __construct($subject = null, array $arguments = [])
/**
* Getter for subject property.
*
* @return mixed The observer subject
* @return mixed
*/
public function getSubject()
{
Expand All @@ -50,7 +50,7 @@ public function getSubject()
/**
* Get argument by key.
*
* @return mixed Contents of array key
* @return mixed
*
* @throws \InvalidArgumentException if key is not found
*/
Expand Down

0 comments on commit 3de2cac

Please sign in to comment.