Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed documentation block typo on Mage::addObserver #3404

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

denisahac
Copy link
Contributor

Description (*)

Fixed a documentation block typo on Mage::addObserver.

From "Add observer to even object"

/**
 * Add observer to even object
 *
 * @param string $eventName
 * @param callback $callback
 * @param array $data
 * @param string $observerName
 * @param string $observerClass
 * @return Varien_Event_Collection
 */
 public static function addObserver($eventName, $callback, $data = [], $observerName = '', $observerClass = '')
 { }

To: "Add observer to events object"

/**
 * Add observer to events object
 *
 * @param string $eventName
 * @param callback $callback
 * @param array $data
 * @param string $observerName
 * @param string $observerClass
 * @return Varien_Event_Collection
 */
 public static function addObserver($eventName, $callback, $data = [], $observerName = '', $observerClass = '')
 { }

Manual testing scenarios (*)

  1. Open app/Mage.php and locate the static function addObserver -- Mage::addObserver

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added the Mage.php Relates to app/Mage.php label Jul 24, 2023
@fballiano
Copy link
Contributor

@ADDISON74 is the wording ok? :-)

@ADDISON74
Copy link
Contributor

Is it a trick question? At first glance I can't find anything wrong.

@fballiano
Copy link
Contributor

hahaha no it's not a trick question :-D

"Add observer to events object" maybe should be "Add observer to event objects"?

@fballiano
Copy link
Contributor

no, my fault, it calls "getEvents()->addObserver" so @denisahac is totally right, sorry about that

@fballiano fballiano merged commit f578a5c into OpenMage:main Jul 24, 2023
15 checks passed
@fballiano fballiano changed the title Fixed documentation block typo on Mage::addObserver -- from even object to events object Fixed documentation block typo on Mage::addObserver Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mage.php Relates to app/Mage.php
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants