Completed
Push — 16.1 ( 2b6741...abc73d )
by Nathan
50:22 queued 36:36
created
api/src/Storage/Base2.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 *
54 54
 	 * @return so_sql2
55 55
 	 */
56
-	function __construct($app='',$table='',Api\Db $db=null,$column_prefix='',$no_clone=false)
56
+	function __construct($app = '', $table = '', Api\Db $db = null, $column_prefix = '', $no_clone = false)
57 57
 	{
58
-		parent::__construct($app,$table,$db,$column_prefix,$no_clone);
58
+		parent::__construct($app, $table, $db, $column_prefix, $no_clone);
59 59
 	}
60 60
 
61 61
 	/**
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 	 */
69 69
 	function __get($property)
70 70
 	{
71
-		switch($property)
71
+		switch ($property)
72 72
 		{
73 73
 			case 'id':
74 74
 				$property = $this->autoinc_id;
75 75
 				break;
76 76
 		}
77
-		if (in_array($property,$this->db_cols) || in_array($property,$this->non_db_cols))
77
+		if (in_array($property, $this->db_cols) || in_array($property, $this->non_db_cols))
78 78
 		{
79 79
 			return $this->data[$property];
80 80
 		}
@@ -88,15 +88,15 @@  discard block
 block discarded – undo
88 88
 	 * @param string $property
89 89
 	 * @param mixed $value
90 90
 	 */
91
-	function __set($property,$value)
91
+	function __set($property, $value)
92 92
 	{
93
-		switch($property)
93
+		switch ($property)
94 94
 		{
95 95
 			case 'id':
96 96
 				$property = $this->autoinc_id;
97 97
 				break;
98 98
 		}
99
-		if (in_array($property,$this->db_cols) || in_array($property,$this->non_db_cols))
99
+		if (in_array($property, $this->db_cols) || in_array($property, $this->non_db_cols))
100 100
 		{
101 101
 			$this->data[$property] = $value;
102 102
 		}
Please login to merge, or discard this patch.
api/src/Exception/NoPermission/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  */
22 22
 class App extends Exception\NoPermission
23 23
 {
24
-	function __construct($msg=null,$code=101)
24
+	function __construct($msg = null, $code = 101)
25 25
 	{
26 26
 		if (isset($GLOBALS['egw_info']['apps'][$msg]))
27 27
 		{
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
 						'"'.$app.'"');
40 40
 			}
41 41
 		}
42
-		parent::__construct($msg,$code);
42
+		parent::__construct($msg, $code);
43 43
 	}
44 44
 }
Please login to merge, or discard this patch.
api/src/Exception/NoPermission/Admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  */
20 20
 class Admin extends App
21 21
 {
22
-	function __construct($msg=null,$code=102)
22
+	function __construct($msg = null, $code = 102)
23 23
 	{
24 24
 		if (is_null($msg)) $msg = 'admin';
25 25
 
26
-		parent::__construct($msg,$code);
26
+		parent::__construct($msg, $code);
27 27
 	}
28 28
 }
Please login to merge, or discard this patch.
api/src/Exception/NotFound.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
 	 * @param string $msg =null message, default "Entry not found!"
27 27
 	 * @param int $code =99 numerical code, default 2
28 28
 	 */
29
-	function __construct($msg=null,$code=2)
29
+	function __construct($msg = null, $code = 2)
30 30
 	{
31 31
 		if (is_null($msg)) $msg = lang('Entry not found!');
32 32
 
33
-		parent::__construct($msg,$code);
33
+		parent::__construct($msg, $code);
34 34
 	}
35 35
 }
Please login to merge, or discard this patch.
api/src/Exception/Redirect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 	 * @param string $msg
34 34
 	 * @param int $code
35 35
 	 */
36
-	function __construct($url,$app=null,$msg=null,$code=301)
36
+	function __construct($url, $app = null, $msg = null, $code = 301)
37 37
 	{
38 38
 		$this->url = $url;
39 39
 		$this->app = $app;
Please login to merge, or discard this patch.
api/src/Exception/NoPermission.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
 	 * @param string $msg =null message, default "Permission denied!"
28 28
 	 * @param int $code =100 numerical code, default 100
29 29
 	 */
30
-	function __construct($msg=null,$code=100)
30
+	function __construct($msg = null, $code = 100)
31 31
 	{
32 32
 		if (is_null($msg)) $msg = lang('Permisson denied!');
33 33
 
34
-		parent::__construct($msg,$code);
34
+		parent::__construct($msg, $code);
35 35
 	}
36 36
 }
Please login to merge, or discard this patch.
api/src/Db/CallbackIterator.php 1 patch
Spacing   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 	 * @param array $params =array() additional parameters, row is always first parameter
100 100
 	 * @param $key_callback =null optional callback, if you want different keys
101 101
 	 */
102
-	public function __construct(\Traversable $rs, $callback, $params=array(), $key_callback=null)
102
+	public function __construct(\Traversable $rs, $callback, $params = array(), $key_callback = null)
103 103
 	{
104 104
 		$this->callback = $callback;
105 105
 		$this->params = $params;
106 106
 		$this->key_callback = $key_callback;
107 107
 
108
-		if (is_a($rs,'IteratorAggregate'))
108
+		if (is_a($rs, 'IteratorAggregate'))
109 109
 		{
110 110
 			$this->rs = $rs->getIterator();
111 111
 		}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function current()
124 124
 	{
125
-		if (is_a($this->rs,'iterator'))
125
+		if (is_a($this->rs, 'iterator'))
126 126
 		{
127 127
 			$params = $this->params;
128 128
 			array_unshift($params, $this->rs->current());
@@ -138,11 +138,10 @@  discard block
 block discarded – undo
138 138
 	 */
139 139
 	public function key()
140 140
 	{
141
-		if (is_a($this->rs,'iterator'))
141
+		if (is_a($this->rs, 'iterator'))
142 142
 		{
143 143
 			return $this->key_callback ?
144
-				call_user_func($this->key_callback, $this->rs->current()) :
145
-				$this->rs->key();
144
+				call_user_func($this->key_callback, $this->rs->current()) : $this->rs->key();
146 145
 		}
147 146
 		return 0;
148 147
 	}
@@ -152,7 +151,7 @@  discard block
 block discarded – undo
152 151
 	 */
153 152
 	public function next()
154 153
 	{
155
-		if (is_a($this->rs,'iterator'))
154
+		if (is_a($this->rs, 'iterator'))
156 155
 		{
157 156
 			return $this->rs->next();
158 157
 		}
@@ -163,7 +162,7 @@  discard block
 block discarded – undo
163 162
 	 */
164 163
 	public function rewind()
165 164
 	{
166
-		if (is_a($this->rs,'iterator'))
165
+		if (is_a($this->rs, 'iterator'))
167 166
 		{
168 167
 			return $this->rs->rewind();
169 168
 		}
@@ -174,9 +173,9 @@  discard block
 block discarded – undo
174 173
 	 *
175 174
 	 * @return boolean
176 175
 	 */
177
-	public function valid ()
176
+	public function valid()
178 177
 	{
179
-		if (is_a($this->rs,'iterator'))
178
+		if (is_a($this->rs, 'iterator'))
180 179
 		{
181 180
 			return $this->rs->valid();
182 181
 		}
Please login to merge, or discard this patch.
api/src/Db/Exception.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
 	 * @param string $msg =null message, default "Database error!"
28 28
 	 * @param int $code =100
29 29
 	 */
30
-	function __construct($msg=null,$code=100)
30
+	function __construct($msg = null, $code = 100)
31 31
 	{
32 32
 		if (is_null($msg)) $msg = lang('Database error!');
33 33
 
34
-		parent::__construct($msg,$code);
34
+		parent::__construct($msg, $code);
35 35
 	}
36 36
 }
Please login to merge, or discard this patch.
api/src/Db/Deprecated.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	* @return ADORecordSet or false, if the query fails
55 55
 	* @throws EGroupware\Api\Db\Exception\InvalidSql with $this->Link_ID->ErrorNo() as code
56 56
 	*/
57
-	function query($Query_String, $line = '', $file = '', $offset=0, $num_rows=-1, $inputarr=false, $fetchmode=self::FETCH_BOTH, $reconnect=true)
57
+	function query($Query_String, $line = '', $file = '', $offset = 0, $num_rows = -1, $inputarr = false, $fetchmode = self::FETCH_BOTH, $reconnect = true)
58 58
 	{
59 59
 		// New query, discard previous result.
60 60
 		if ($this->Query_ID)
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 */
103 103
 	function free()
104 104
 	{
105
-		unset($this->Query_ID);	// else copying of the db-object does not work
105
+		unset($this->Query_ID); // else copying of the db-object does not work
106 106
 		$this->Query_ID = 0;
107 107
 	}
108 108
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	* @param int $fetch_mode self::FETCH_BOTH = numerical+assoc keys (eGW default), self::FETCH_ASSOC or self::FETCH_NUM
116 116
 	* @return bool was another row found?
117 117
 	*/
118
-	function next_record($fetch_mode=self::FETCH_BOTH)
118
+	function next_record($fetch_mode = self::FETCH_BOTH)
119 119
 	{
120 120
 		if (!$this->Query_ID)
121 121
 		{
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 		}
136 136
 		if ($this->capabilities[self::CAPABILITY_NAME_CASE] == 'upper')	// maxdb, oracle, ...
137 137
 		{
138
-			switch($fetch_mode)
138
+			switch ($fetch_mode)
139 139
 			{
140 140
 				case self::FETCH_ASSOC:
141 141
 					$this->Record = array_change_key_case($this->Record);
@@ -172,9 +172,9 @@  discard block
 block discarded – undo
172 172
 	*/
173 173
 	function seek($pos = 0)
174 174
 	{
175
-		if (!$this->Query_ID  || !$this->Query_ID->Move($this->Row = $pos))
175
+		if (!$this->Query_ID || !$this->Query_ID->Move($this->Row = $pos))
176 176
 		{
177
-			throw new Exception("seek($pos) failed: resultset has " . $this->num_rows() . " rows");
177
+			throw new Exception("seek($pos) failed: resultset has ".$this->num_rows()." rows");
178 178
 		}
179 179
 		return True;
180 180
 	}
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
 	* @param string $mode type of lock required (optional), default write
188 188
 	* @return bool True if sucessful, False if fails
189 189
 	*/
190
-	function lock($table, $mode='write')
190
+	function lock($table, $mode = 'write')
191 191
 	{
192
-		unset($table, $mode);	// not used anymore
192
+		unset($table, $mode); // not used anymore
193 193
 	}
194 194
 
195 195
 	/**
@@ -278,18 +278,18 @@  discard block
 block discarded – undo
278 278
 	* @param string $strip ='' string to strip of the column-name, default ''
279 279
 	* @return array/bool the associative array or False if no (more) result-row is availible
280 280
 	*/
281
-	function row($do_next_record=False,$strip='')
281
+	function row($do_next_record = False, $strip = '')
282 282
 	{
283 283
 		if ($do_next_record && !$this->next_record(self::FETCH_ASSOC) || !is_array($this->Record))
284 284
 		{
285 285
 			return False;
286 286
 		}
287 287
 		$result = array();
288
-		foreach($this->Record as $column => $value)
288
+		foreach ($this->Record as $column => $value)
289 289
 		{
290 290
 			if (!is_numeric($column))
291 291
 			{
292
-				if ($strip) $column = str_replace($strip,'',$column);
292
+				if ($strip) $column = str_replace($strip, '', $column);
293 293
 
294 294
 				$result[$column] = $value;
295 295
 			}
Please login to merge, or discard this patch.