[Pkg-owncloud-commits] [owncloud] 259/457: more type hints

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:06:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 0497534a6e5c7c856faf2f4a1939ab34a7f59a8f
Author: Robin Appelman <icewind at owncloud.com>
Date:   Fri May 8 14:27:22 2015 +0200

    more type hints
---
 lib/private/files/node/root.php         | 4 ++--
 lib/private/hooks/emitter.php           | 4 ++--
 lib/private/hooks/forwardingemitter.php | 4 ++--
 lib/private/hooks/legacyemitter.php     | 2 +-
 lib/private/hooks/publicemitter.php     | 2 +-
 lib/private/user/session.php            | 4 ++--
 tests/lib/hooks/forwardingemitter.php   | 2 +-
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/lib/private/files/node/root.php b/lib/private/files/node/root.php
index e47f98b..7ffb367 100644
--- a/lib/private/files/node/root.php
+++ b/lib/private/files/node/root.php
@@ -94,7 +94,7 @@ class Root extends Folder implements IRootFolder {
 	 * @param string $method
 	 * @param callable $callback
 	 */
-	public function listen($scope, $method, $callback) {
+	public function listen($scope, $method, callable $callback) {
 		$this->emitter->listen($scope, $method, $callback);
 	}
 
@@ -103,7 +103,7 @@ class Root extends Folder implements IRootFolder {
 	 * @param string $method optional
 	 * @param callable $callback optional
 	 */
-	public function removeListener($scope = null, $method = null, $callback = null) {
+	public function removeListener($scope = null, $method = null, callable $callback = null) {
 		$this->emitter->removeListener($scope, $method, $callback);
 	}
 
diff --git a/lib/private/hooks/emitter.php b/lib/private/hooks/emitter.php
index 895bd2d..bea3f289 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 8530043..90c1970 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 b0912d7..b28854f 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 71641c9..12de07b 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);
 	}
 }
diff --git a/lib/private/user/session.php b/lib/private/user/session.php
index a66ae6b..75a884f 100644
--- a/lib/private/user/session.php
+++ b/lib/private/user/session.php
@@ -81,7 +81,7 @@ class Session implements IUserSession, Emitter {
 	 * @param string $method
 	 * @param callable $callback
 	 */
-	public function listen($scope, $method, $callback) {
+	public function listen($scope, $method, callable $callback) {
 		$this->manager->listen($scope, $method, $callback);
 	}
 
@@ -90,7 +90,7 @@ class Session implements IUserSession, Emitter {
 	 * @param string $method optional
 	 * @param callable $callback optional
 	 */
-	public function removeListener($scope = null, $method = null, $callback = null) {
+	public function removeListener($scope = null, $method = null, callable $callback = null) {
 		$this->manager->removeListener($scope, $method, $callback);
 	}
 
diff --git a/tests/lib/hooks/forwardingemitter.php b/tests/lib/hooks/forwardingemitter.php
index decf6bb..5e8e252 100644
--- a/tests/lib/hooks/forwardingemitter.php
+++ b/tests/lib/hooks/forwardingemitter.php
@@ -17,7 +17,7 @@ class DummyForwardingEmitter extends \OC\Hooks\ForwardingEmitter {
 	/**
 	 * @param \OC\Hooks\Emitter $emitter
 	 */
-	public function forward($emitter) {
+	public function forward(\OC\Hooks\Emitter $emitter) {
 		parent::forward($emitter);
 	}
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list