Skip to content

Commit 9f37d8d

Browse files
author
phalcon
committed
Coding style
1 parent 28d045c commit 9f37d8d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

phalcon/events/event.zep

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Event
4545
* @param mixed data
4646
* @param boolean cancelable
4747
*/
48-
public function __construct(string! type, source, data=null, boolean cancelable=true)
48+
public function __construct(string! type, source, data = null, boolean cancelable = true)
4949
{
5050

5151
let this->_type = type,
@@ -63,7 +63,7 @@ class Event
6363
/**
6464
* Stops the event preventing propagation
6565
*/
66-
public function stop()
66+
public function stop() -> void
6767
{
6868
if this->_cancelable {
6969
let this->_stopped = true;
@@ -81,5 +81,4 @@ class Event
8181
{
8282
return this->_stopped;
8383
}
84-
8584
}

phalcon/events/manager.zep

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Manager implements ManagerInterface
4545
* @param object handler
4646
* @param int priority
4747
*/
48-
public function attach(string! eventType, var handler, int! priority=100)
48+
public function attach(string! eventType, var handler, int! priority = 100)
4949
{
5050
var priorityQueue;
5151

@@ -173,7 +173,7 @@ class Manager implements ManagerInterface
173173
if typeof queue != "array" {
174174
if typeof queue == "object" {
175175
if !(queue instanceof \Phalcon\Events\Event) && !(queue instanceof \SplPriorityQueue) {
176-
throw new Exception(sprintf("Unexpected value type: expected object of type Phalcon\\Events\\Event or SplPriorityQueue, %s given", get_class(queue)));
176+
throw new Exception(sprintf("Unexpected value type: expected object of type Phalcon\\Events\\Event or SplPriorityQueue, %s given", get_class(queue)));
177177
}
178178
} else {
179179
throw new Exception("The queue is not valid");

0 commit comments

Comments
 (0)