From 3829460ab8cbb6de65c53583a20fd04cbe7927dd Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Fri, 7 Sep 2012 15:22:01 +0200 Subject: adding space between) and { --- lib/hook.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/hook.php') diff --git a/lib/hook.php b/lib/hook.php index ee390d6cd5a..1bf80f604f6 100644 --- a/lib/hook.php +++ b/lib/hook.php @@ -19,12 +19,12 @@ class OC_Hook{ * * TODO: write example */ - static public function connect( $signalclass, $signalname, $slotclass, $slotname ){ + static public function connect( $signalclass, $signalname, $slotclass, $slotname ) { // Create the data structure - if( !array_key_exists( $signalclass, self::$registered )){ + if( !array_key_exists( $signalclass, self::$registered )) { self::$registered[$signalclass] = array(); } - if( !array_key_exists( $signalname, self::$registered[$signalclass] )){ + if( !array_key_exists( $signalname, self::$registered[$signalclass] )) { self::$registered[$signalclass][$signalname] = array(); } @@ -48,17 +48,17 @@ class OC_Hook{ * * TODO: write example */ - static public function emit( $signalclass, $signalname, $params = array()){ + static public function emit( $signalclass, $signalname, $params = array()) { // Return false if there are no slots - if( !array_key_exists( $signalclass, self::$registered )){ + if( !array_key_exists( $signalclass, self::$registered )) { return false; } - if( !array_key_exists( $signalname, self::$registered[$signalclass] )){ + if( !array_key_exists( $signalname, self::$registered[$signalclass] )) { return false; } // Call all slots - foreach( self::$registered[$signalclass][$signalname] as $i ){ + foreach( self::$registered[$signalclass][$signalname] as $i ) { call_user_func( array( $i["class"], $i["name"] ), $params ); } @@ -71,9 +71,9 @@ class OC_Hook{ * @param string signalclass * @param string signalname */ - static public function clear($signalclass='', $signalname=''){ - if($signalclass){ - if($signalname){ + static public function clear($signalclass='', $signalname='') { + if($signalclass) { + if($signalname) { self::$registered[$signalclass][$signalname]=array(); }else{ self::$registered[$signalclass]=array(); -- cgit v1.2.3