Test Setup Failed
Push — master ( adde48...26bb6e )
by Hunter
03:44
created
src/HookOverride_extend.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -30,72 +30,72 @@
 block discarded – undo
30 30
   protected $_hookPrefix = '';
31 31
 
32 32
   public function _hookObject() {
33
-    return $this->_hookObject;
33
+	return $this->_hookObject;
34 34
   }
35 35
 
36 36
   public function __construct(&$object, $prefix = '') {
37
-    $this->_hookObject = $object;
38
-    $this->_hookPrefix = $prefix;
37
+	$this->_hookObject = $object;
38
+	$this->_hookPrefix = $prefix;
39 39
   }
40 40
 
41 41
   public function &__get($name) {
42
-    $val =& $this->_hookObject->$name;
43
-    return $val;
42
+	$val =& $this->_hookObject->$name;
43
+	return $val;
44 44
   }
45 45
 
46 46
   public function __set($name, $value) {
47
-    return $this->_hookObject->$name = $value;
47
+	return $this->_hookObject->$name = $value;
48 48
   }
49 49
 
50 50
   public function __isset($name) {
51
-    return isset($this->_hookObject->$name);
51
+	return isset($this->_hookObject->$name);
52 52
   }
53 53
 
54 54
   public function __unset($name) {
55
-    unset($this->_hookObject->$name);
55
+	unset($this->_hookObject->$name);
56 56
   }
57 57
 
58 58
   public function __toString() {
59
-    return (string) $this->_hookObject;
59
+	return (string) $this->_hookObject;
60 60
   }
61 61
 
62 62
   public function __invoke() {
63
-    if (method_exists($this->_hookObject, '__invoke')) {
64
-      $args = func_get_args();
65
-      return call_user_func_array(array($this->_hookObject, '__invoke'), $args);
66
-    }
63
+	if (method_exists($this->_hookObject, '__invoke')) {
64
+	  $args = func_get_args();
65
+	  return call_user_func_array(array($this->_hookObject, '__invoke'), $args);
66
+	}
67 67
   }
68 68
 
69 69
   public function __set_state() {
70
-    if (method_exists($this->_hookObject, '__set_state')) {
71
-      $args = func_get_args();
72
-      return call_user_func_array(array($this->_hookObject, '__set_state'), $args);
73
-    }
70
+	if (method_exists($this->_hookObject, '__set_state')) {
71
+	  $args = func_get_args();
72
+	  return call_user_func_array(array($this->_hookObject, '__set_state'), $args);
73
+	}
74 74
   }
75 75
 
76 76
   public function __clone() {
77
-    // TODO: Test this. Make sure cloning works properly.
78
-    $newObject = clone $this->_hookObject;
79
-    Hook::hookObject($newObject, get_class($newObject).'->', false);
80
-    return $newObject;
77
+	// TODO: Test this. Make sure cloning works properly.
78
+	$newObject = clone $this->_hookObject;
79
+	Hook::hookObject($newObject, get_class($newObject).'->', false);
80
+	return $newObject;
81 81
   }
82 82
 
83 83
   public function jsonSerialize() {
84
-    $_HOOK_arguments = func_get_args();
85
-    $_HOOK_function = array($this->_hookObject, 'jsonSerialize');
86
-    $_HOOK_data = array();
87
-    \SciActive\Hook::runCallbacks($this->_hookPrefix.'jsonSerialize', $_HOOK_arguments, 'before', $this->_hookObject, $_HOOK_function, $_HOOK_data);
88
-    if ($_HOOK_arguments !== false) {
89
-      if (is_callable($this->_hookObject, 'jsonSerialize') && !empty($_HOOK_arguments)) {
90
-        $_HOOK_return = array(call_user_func_array($_HOOK_function, $_HOOK_arguments));
91
-      } else {
92
-        $_HOOK_return = array($this->_hookObject);
93
-      }
94
-      \SciActive\Hook::runCallbacks($this->_hookPrefix.'jsonSerialize', $_HOOK_return, 'after', $this->_hookObject, $_HOOK_function, $_HOOK_data);
95
-      if ((array) $_HOOK_return === $_HOOK_return) {
96
-        return $_HOOK_return[0];
97
-      }
98
-    }
84
+	$_HOOK_arguments = func_get_args();
85
+	$_HOOK_function = array($this->_hookObject, 'jsonSerialize');
86
+	$_HOOK_data = array();
87
+	\SciActive\Hook::runCallbacks($this->_hookPrefix.'jsonSerialize', $_HOOK_arguments, 'before', $this->_hookObject, $_HOOK_function, $_HOOK_data);
88
+	if ($_HOOK_arguments !== false) {
89
+	  if (is_callable($this->_hookObject, 'jsonSerialize') && !empty($_HOOK_arguments)) {
90
+		$_HOOK_return = array(call_user_func_array($_HOOK_function, $_HOOK_arguments));
91
+	  } else {
92
+		$_HOOK_return = array($this->_hookObject);
93
+	  }
94
+	  \SciActive\Hook::runCallbacks($this->_hookPrefix.'jsonSerialize', $_HOOK_return, 'after', $this->_hookObject, $_HOOK_function, $_HOOK_data);
95
+	  if ((array) $_HOOK_return === $_HOOK_return) {
96
+		return $_HOOK_return[0];
97
+	  }
98
+	}
99 99
   }
100 100
 
101 101
 //#CODEHERE#
Please login to merge, or discard this patch.