Skip to content

Commit a5004a7

Browse files
committed
fix on review comment: move constant DEFAULT_PRIORITY to the interface
1 parent be81eee commit a5004a7

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

phalcon/Events/Manager.zep

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ use SplPriorityQueue;
2121
*/
2222
class Manager implements ManagerInterface
2323
{
24-
const DEFAULT_PRIORITY = 100;
25-
2624
/**
2725
* @var bool
2826
*/

phalcon/Events/ManagerInterface.zep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ namespace Phalcon\Events;
1515
*/
1616
interface ManagerInterface
1717
{
18+
public const DEFAULT_PRIORITY = 100;
1819
/**
1920
* Attach a listener to the events manager
2021
*
2122
* @param object|callable handler
2223
*/
23-
public function attach(string! eventType, handler, int! priority = 100) -> void;
24+
public function attach(string! eventType, handler, int! priority = self::DEFAULT_PRIORITY) -> void;
2425

2526
/**
2627
* Detach the listener from the events manager

0 commit comments

Comments
 (0)