aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/hooks
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-05-08 14:27:22 +0200
committerRobin Appelman <icewind@owncloud.com>2015-06-02 14:07:55 +0200
commit0497534a6e5c7c856faf2f4a1939ab34a7f59a8f (patch)
tree9b6c1b92ad04cf9e980a2d9839af178c753486d3 /lib/private/hooks
parent8926bca0c7f27774959ec831c830c883bd284100 (diff)
downloadnextcloud-server-0497534a6e5c7c856faf2f4a1939ab34a7f59a8f.tar.gz
nextcloud-server-0497534a6e5c7c856faf2f4a1939ab34a7f59a8f.zip
more type hints
Diffstat (limited to 'lib/private/hooks')
-rw-r--r--lib/private/hooks/emitter.php4
-rw-r--r--lib/private/hooks/forwardingemitter.php4
-rw-r--r--lib/private/hooks/legacyemitter.php2
-rw-r--r--lib/private/hooks/publicemitter.php2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/hooks/emitter.php b/lib/private/hooks/emitter.php
index 895bd2d9cac..bea3f289b8d 100644
--- a/lib/private/hooks/emitter.php
+++ b/lib/private/hooks/emitter.php
@@ -37,7 +37,7 @@ interface Emitter {
* @param callable $callback
* @return void
*/
- public function listen($scope, $method, $callback);
+ public function listen($scope, $method, callable $callback);
/**
* @param string $scope optional
@@ -45,5 +45,5 @@ interface Emitter {
* @param callable $callback optional
* @return void
*/
- public function removeListener($scope = null, $method = null, $callback = null);
+ public function removeListener($scope = null, $method = null, callable $callback = null);
}
diff --git a/lib/private/hooks/forwardingemitter.php b/lib/private/hooks/forwardingemitter.php
index 853004310fb..90c1970f480 100644
--- a/lib/private/hooks/forwardingemitter.php
+++ b/lib/private/hooks/forwardingemitter.php
@@ -40,7 +40,7 @@ abstract class ForwardingEmitter extends BasicEmitter {
* @param string $method
* @param callable $callback
*/
- public function listen($scope, $method, $callback) {
+ public function listen($scope, $method, callable $callback) {
parent::listen($scope, $method, $callback);
foreach ($this->forwardEmitters as $emitter) {
$emitter->listen($scope, $method, $callback);
@@ -50,7 +50,7 @@ abstract class ForwardingEmitter extends BasicEmitter {
/**
* @param \OC\Hooks\Emitter $emitter
*/
- protected function forward($emitter) {
+ protected function forward(Emitter $emitter) {
$this->forwardEmitters[] = $emitter;
//forward all previously connected hooks
diff --git a/lib/private/hooks/legacyemitter.php b/lib/private/hooks/legacyemitter.php
index b0912d740d2..b28854f4638 100644
--- a/lib/private/hooks/legacyemitter.php
+++ b/lib/private/hooks/legacyemitter.php
@@ -23,7 +23,7 @@
namespace OC\Hooks;
abstract class LegacyEmitter extends BasicEmitter {
- protected function emit($scope, $method, $arguments = array()) {
+ protected function emit($scope, $method, array $arguments = array()) {
\OC_Hook::emit($scope, $method, $arguments);
parent::emit($scope, $method, $arguments);
}
diff --git a/lib/private/hooks/publicemitter.php b/lib/private/hooks/publicemitter.php
index 71641c9d5e0..12de07b27c7 100644
--- a/lib/private/hooks/publicemitter.php
+++ b/lib/private/hooks/publicemitter.php
@@ -28,7 +28,7 @@ class PublicEmitter extends BasicEmitter {
* @param string $method
* @param array $arguments optional
*/
- public function emit($scope, $method, $arguments = array()) {
+ public function emit($scope, $method, array $arguments = array()) {
parent::emit($scope, $method, $arguments);
}
}