Completed
Push — scrutinizer ( 84e9d0...6a9613 )
by Fabio
22:48
created
tests/test_tools/simpletest/url.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             $this->_port = false;
51 51
             if (preg_match('/(.*?):(.*)/', $this->_host, $host_parts)) {
52 52
                 $this->_host = $host_parts[1];
53
-                $this->_port = (integer)$host_parts[2];
53
+                $this->_port = (integer) $host_parts[2];
54 54
             }
55 55
             $this->_path = $this->_chompPath($url);
56 56
             $this->_request = $this->_parseRequest($this->_chompRequest($url));
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         function _chompCoordinates($url) {
69 69
             if (preg_match('/(.*)\?(\d+),(\d+)$/', $url, $matches)) {
70 70
                 $url = $matches[1];
71
-                return array((integer)$matches[2], (integer)$matches[3]);
71
+                return array((integer) $matches[2], (integer) $matches[3]);
72 72
             }
73 73
             return array(false, false);
74 74
         }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
          *    @access public
258 258
          */
259 259
         function getPath() {
260
-            if (! $this->_path && $this->_host) {
260
+            if (!$this->_path && $this->_host) {
261 261
                 return '/';
262 262
             }
263 263
             return $this->_path;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
          *    @access public
271 271
          */
272 272
         function getPage() {
273
-            if (! preg_match('/([^\/]*?)$/', $this->getPath(), $matches)) {
273
+            if (!preg_match('/([^\/]*?)$/', $this->getPath(), $matches)) {
274 274
                 return false;
275 275
             }
276 276
             return $matches[1];
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
          *    @access public
283 283
          */
284 284
         function getBasePath() {
285
-            if (! preg_match('/(.*\/)[^\/]*?$/', $this->getPath(), $matches)) {
285
+            if (!preg_match('/(.*\/)[^\/]*?$/', $this->getPath(), $matches)) {
286 286
                 return false;
287 287
             }
288 288
             return $matches[1];
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
                 $this->_x = $this->_y = false;
310 310
                 return;
311 311
             }
312
-            $this->_x = (integer)$x;
313
-            $this->_y = (integer)$y;
312
+            $this->_x = (integer) $x;
313
+            $this->_y = (integer) $y;
314 314
         }
315 315
 
316 316
         /**
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
                 $path = $this->normalisePath($this->_path);
422 422
             }
423 423
             $encoded = $this->getEncodedRequest();
424
-            $fragment = $this->getFragment() ? '#'. $this->getFragment() : '';
424
+            $fragment = $this->getFragment() ? '#' . $this->getFragment() : '';
425 425
             $coords = $this->getX() === false ? '' : '?' . $this->getX() . ',' . $this->getY();
426 426
             return "$scheme://$identity$host$path$encoded$fragment$coords";
427 427
         }
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
          *    @access public
435 435
          */
436 436
         function makeAbsolute($base) {
437
-            if (! is_object($base)) {
437
+            if (!is_object($base)) {
438 438
                 $base = new SimpleUrl($base);
439 439
             }
440 440
             $scheme = $this->getScheme() ? $this->getScheme() : $base->getScheme();
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
                 $host = $this->getHost();
443 443
                 $port = $this->getPort() ? ':' . $this->getPort() : '';
444 444
                 $identity = $this->getIdentity() ? $this->getIdentity() . '@' : '';
445
-                if (! $identity) {
445
+                if (!$identity) {
446 446
                     $identity = $base->getIdentity() ? $base->getIdentity() . '@' : '';
447 447
                 }
448 448
             } else {
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
             }
453 453
             $path = $this->normalisePath($this->_extractAbsolutePath($base));
454 454
             $encoded = $this->getEncodedRequest();
455
-            $fragment = $this->getFragment() ? '#'. $this->getFragment() : '';
455
+            $fragment = $this->getFragment() ? '#' . $this->getFragment() : '';
456 456
             $coords = $this->getX() === false ? '' : '?' . $this->getX() . ',' . $this->getY();
457 457
             return new SimpleUrl("$scheme://$identity$host$port$path$encoded$fragment$coords");
458 458
         }
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
             if ($this->getHost()) {
469 469
                 return $this->_path;
470 470
             }
471
-            if (! $this->_isRelativePath($this->_path)) {
471
+            if (!$this->_isRelativePath($this->_path)) {
472 472
                 return $this->_path;
473 473
             }
474 474
             if ($this->_path) {
Please login to merge, or discard this patch.
tests/test_tools/simpletest/web_tester.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             if (is_array($compare) && count($compare) == 1) {
81 81
                 $compare = $compare[0];
82 82
             }
83
-            if (! $this->_isSingle($compare)) {
83
+            if (!$this->_isSingle($compare)) {
84 84
                 return false;
85 85
             }
86 86
             return ($this->_value == $compare);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             if (is_string($compare)) {
97 97
                 $compare = array($compare);
98 98
             }
99
-            if (! is_array($compare)) {
99
+            if (!is_array($compare)) {
100 100
                 return false;
101 101
             }
102 102
             sort($compare);
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
          *    @access public
402 402
          */
403 403
         function test($compare) {
404
-            return ! parent::test($compare);
404
+            return !parent::test($compare);
405 405
         }
406 406
 
407 407
         /**
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
          *    @access private
623 623
          */
624 624
         function _failOnError($result) {
625
-            if (! $this->_ignore_errors) {
625
+            if (!$this->_ignore_errors) {
626 626
                 if ($error = $this->_browser->getTransportError()) {
627 627
                     $this->fail($error);
628 628
                 }
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
          *    @access public
649 649
          */
650 650
         function setMaximumRedirects($max) {
651
-            if (! $this->_browser) {
651
+            if (!$this->_browser) {
652 652
                 trigger_error(
653 653
                         'Can only set maximum redirects in a test method, setUp() or tearDown()');
654 654
             }
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
                         isset($value),
1166 1166
                         sprintf($message, "Field [$identifier] should exist"));
1167 1167
             }
1168
-            if (! SimpleExpectation::isExpectation($expected)) {
1168
+            if (!SimpleExpectation::isExpectation($expected)) {
1169 1169
                 $identifier = str_replace('%', '%%', $identifier);
1170 1170
                 $expected = new FieldExpectation(
1171 1171
                         $expected,
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
          *    @access public
1217 1217
          */
1218 1218
         function assertAuthentication($authentication = false, $message = '%s') {
1219
-            if (! $authentication) {
1219
+            if (!$authentication) {
1220 1220
                 $message = sprintf($message, "Expected any authentication type, got [" .
1221 1221
                         $this->_browser->getAuthentication() . "]");
1222 1222
                 return $this->assertTrue(
@@ -1252,7 +1252,7 @@  discard block
 block discarded – undo
1252 1252
          *    @access public
1253 1253
          */
1254 1254
         function assertRealm($realm, $message = '%s') {
1255
-            if (! SimpleExpectation::isExpectation($realm)) {
1255
+            if (!SimpleExpectation::isExpectation($realm)) {
1256 1256
                 $realm = new EqualExpectation($realm);
1257 1257
             }
1258 1258
             return $this->assert(
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
          *    @access public
1320 1320
          */
1321 1321
         function assertTitle($title = false, $message = '%s') {
1322
-            if (! SimpleExpectation::isExpectation($title)) {
1322
+            if (!SimpleExpectation::isExpectation($title)) {
1323 1323
                 $title = new EqualExpectation($title);
1324 1324
             }
1325 1325
             return $this->assert($title, $this->_browser->getTitle(), $message);
@@ -1427,12 +1427,12 @@  discard block
 block discarded – undo
1427 1427
          */
1428 1428
         function assertCookie($name, $expected = false, $message = '%s') {
1429 1429
             $value = $this->getCookie($name);
1430
-            if (! $expected) {
1430
+            if (!$expected) {
1431 1431
                 return $this->assertTrue(
1432 1432
                         $value,
1433 1433
                         sprintf($message, "Expecting cookie [$name]"));
1434 1434
             }
1435
-            if (! SimpleExpectation::isExpectation($expected)) {
1435
+            if (!SimpleExpectation::isExpectation($expected)) {
1436 1436
                 $expected = new EqualExpectation($expected);
1437 1437
             }
1438 1438
             return $this->assert($expected, $value, "Expecting cookie [$name] -> $message");
Please login to merge, or discard this patch.
tests/test_tools/simpletest/dumper.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     /**
9 9
      * does type matter
10 10
      */
11
-    if (! defined('TYPE_MATTERS')) {
11
+    if (!defined('TYPE_MATTERS')) {
12 12
         define('TYPE_MATTERS', true);
13 13
     }
14 14
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
          */
28 28
         function describeValue($value) {
29 29
             $type = $this->getType($value);
30
-            switch($type) {
30
+            switch ($type) {
31 31
                 case "Null":
32 32
                     return "NULL";
33 33
                 case "Boolean":
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
          *    @access public
52 52
          */
53 53
         function getType($value) {
54
-            if (! isset($value)) {
54
+            if (!isset($value)) {
55 55
                 return "Null";
56 56
             } elseif (is_bool($value)) {
57 57
                 return "Boolean";
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
          */
84 84
         function describeDifference($first, $second, $identical = false) {
85 85
             if ($identical) {
86
-                if (! $this->_isTypeMatch($first, $second)) {
86
+                if (!$this->_isTypeMatch($first, $second)) {
87 87
                     return "with type mismatch as [" . $this->describeValue($first) .
88 88
                         "] does not match [" . $this->describeValue($second) . "]";
89 89
                 }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
                 return $value;
122 122
             }
123 123
             $position = min($position, $length);
124
-            $start = ($size/2 > $position ? 0 : $position - $size/2);
124
+            $start = ($size / 2 > $position ? 0 : $position - $size / 2);
125 125
             if ($start + $size > $length) {
126 126
                 $start = $length - $size;
127 127
             }
@@ -239,10 +239,10 @@  discard block
 block discarded – undo
239 239
          *    @access private
240 240
          */
241 241
         function _describeArrayDifference($first, $second, $identical) {
242
-            if (! is_array($second)) {
242
+            if (!is_array($second)) {
243 243
                 return $this->_describeGenericDifference($first, $second);
244 244
             }
245
-            if (! $this->_isMatchingKeys($first, $second, $identical)) {
245
+            if (!$this->_isMatchingKeys($first, $second, $identical)) {
246 246
                 return "as key list [" .
247 247
                         implode(", ", array_keys($first)) . "] does not match key list [" .
248 248
                         implode(", ", array_keys($second)) . "]";
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
                 if ($identical && ($first[$key] === $second[$key])) {
252 252
                     continue;
253 253
                 }
254
-                if (! $identical && ($first[$key] == $second[$key])) {
254
+                if (!$identical && ($first[$key] == $second[$key])) {
255 255
                     continue;
256 256
                 }
257 257
                 return "with member [$key] " . $this->describeDifference(
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
          *    @access private
307 307
          */
308 308
         function _describeObjectDifference($first, $second, $identical) {
309
-            if (! is_object($second)) {
309
+            if (!is_object($second)) {
310 310
                 return $this->_describeGenericDifference($first, $second);
311 311
             }
312 312
             return $this->_describeArrayDifference(
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
          *    @access private
326 326
          */
327 327
         function _stringDiffersAt($first, $second) {
328
-            if (! $first || ! $second) {
328
+            if (!$first || !$second) {
329 329
                 return 0;
330 330
             }
331 331
             if (strlen($first) < strlen($second)) {
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             $position = 0;
335 335
             $step = strlen($first);
336 336
             while ($step > 1) {
337
-                $step = (integer)(($step + 1) / 2);
337
+                $step = (integer) (($step + 1) / 2);
338 338
                 if (strncmp($first, $second, $position + $step) == 0) {
339 339
                     $position += $step;
340 340
                 }
Please login to merge, or discard this patch.
tests/test_tools/simpletest/runner.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     require_once(dirname(__FILE__) . '/scorer.php');
16 16
     require_once(dirname(__FILE__) . '/expectation.php');
17 17
     require_once(dirname(__FILE__) . '/dumper.php');
18
-    if (! defined('SIMPLE_TEST')) {
18
+    if (!defined('SIMPLE_TEST')) {
19 19
         define('SIMPLE_TEST', dirname(__FILE__) . '/');
20 20
     }
21 21
     /**#@-*/
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             $methods = get_class_methods(get_class($this->_test_case));
173 173
             $invoker = $this->_test_case->createInvoker();
174 174
             foreach ($methods as $method) {
175
-                if (! $this->_isTest($method)) {
175
+                if (!$this->_isTest($method)) {
176 176
                     continue;
177 177
                 }
178 178
                 if ($this->_isConstructor($method)) {
Please login to merge, or discard this patch.
tests/test_tools/simpletest/http.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
                     $this->_url->getHost(),
80 80
                     $this->_url->getPort() ? $this->_url->getPort() : $default_port,
81 81
                     $timeout);
82
-            if (! $socket->isError()) {
82
+            if (!$socket->isError()) {
83 83
                 $socket->write($this->_getRequestLine($method) . "\r\n");
84 84
                 $socket->write($this->_getHostLine() . "\r\n");
85 85
                 $socket->write("Connection: close\r\n");
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
          */
226 226
         function &fetch($timeout) {
227 227
             $socket = $this->_route->createConnection($this->_encoding->getMethod(), $timeout);
228
-            if (! $socket->isError()) {
228
+            if (!$socket->isError()) {
229 229
                 $this->_dispatchRequest($socket, $this->_encoding);
230 230
             }
231 231
             $response = $this->_createResponse($socket);
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
          *    @access public
346 346
          */
347 347
         function getResponseCode() {
348
-            return (integer)$this->_response_code;
348
+            return (integer) $this->_response_code;
349 349
         }
350 350
 
351 351
         /**
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
          */
366 366
         function isRedirect() {
367 367
             return in_array($this->_response_code, array(301, 302, 303, 307)) &&
368
-                    (boolean)$this->getLocation();
368
+                    (boolean) $this->getLocation();
369 369
         }
370 370
 
371 371
         /**
@@ -376,8 +376,8 @@  discard block
 block discarded – undo
376 376
          */
377 377
         function isChallenge() {
378 378
             return ($this->_response_code == 401) &&
379
-                    (boolean)$this->_authentication &&
380
-                    (boolean)$this->_realm;
379
+                    (boolean) $this->_authentication &&
380
+                    (boolean) $this->_realm;
381 381
         }
382 382
 
383 383
         /**
@@ -514,10 +514,10 @@  discard block
 block discarded – undo
514 514
          *    @access private
515 515
          */
516 516
         function _parse($raw) {
517
-            if (! $raw) {
517
+            if (!$raw) {
518 518
                 $this->_setError('Nothing fetched');
519 519
                 $this->_headers = new SimpleHttpHeaders('');
520
-            } elseif (! strstr($raw, "\r\n\r\n")) {
520
+            } elseif (!strstr($raw, "\r\n\r\n")) {
521 521
                 $this->_setError('Could not split headers from content');
522 522
                 $this->_headers = new SimpleHttpHeaders($raw);
523 523
             } else {
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
          */
602 602
         function _readAll($socket) {
603 603
             $all = '';
604
-            while (! $this->_isLastPacket($next = $socket->read())) {
604
+            while (!$this->_isLastPacket($next = $socket->read())) {
605 605
                 $all .= $next;
606 606
             }
607 607
             return $all;
@@ -618,6 +618,6 @@  discard block
 block discarded – undo
618 618
             if (is_string($packet)) {
619 619
                 return $packet === '';
620 620
             }
621
-            return ! $packet;
621
+            return !$packet;
622 622
         }
623 623
     }
624 624
\ No newline at end of file
Please login to merge, or discard this patch.
tests/test_tools/simpletest/user_agent.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
     require_once(dirname(__FILE__) . '/authentication.php');
16 16
     /**#@-*/
17 17
 
18
-    if (! defined('DEFAULT_MAX_REDIRECTS')) {
18
+    if (!defined('DEFAULT_MAX_REDIRECTS')) {
19 19
         define('DEFAULT_MAX_REDIRECTS', 3);
20 20
     }
21 21
 
22
-    if (! defined('DEFAULT_CONNECTION_TIMEOUT')) {
22
+    if (!defined('DEFAULT_CONNECTION_TIMEOUT')) {
23 23
         define('DEFAULT_CONNECTION_TIMEOUT', 15);
24 24
     }
25 25
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
          *    @access public
120 120
          */
121 121
         function getBaseCookieValue($name, $base) {
122
-            if (! $base) {
122
+            if (!$base) {
123 123
                 return null;
124 124
             }
125 125
             return $this->getCookieValue($base->getHost(), $base->getPath(), $name);
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
          *    @access public
171 171
          */
172 172
         function useProxy($proxy, $username, $password) {
173
-            if (! $proxy) {
173
+            if (!$proxy) {
174 174
                 $this->_proxy = false;
175 175
                 return;
176 176
             }
177 177
             if ((strncmp($proxy, 'http://', 7) != 0) && (strncmp($proxy, 'https://', 8) != 0)) {
178
-                $proxy = 'http://'. $proxy;
178
+                $proxy = 'http://' . $proxy;
179 179
             }
180 180
             $this->_proxy = new SimpleUrl($proxy);
181 181
             $this->_proxy_username = $username;
@@ -250,11 +250,11 @@  discard block
 block discarded – undo
250 250
                 if ($this->_cookies_enabled) {
251 251
                     $headers->writeCookiesToJar($this->_cookie_jar, $url);
252 252
                 }
253
-                if (! $headers->isRedirect()) {
253
+                if (!$headers->isRedirect()) {
254 254
                     break;
255 255
                 }
256 256
                 $encoding = new SimpleGetEncoding();
257
-            } while (! $this->_isTooManyRedirects(++$redirects));
257
+            } while (!$this->_isTooManyRedirects(++$redirects));
258 258
             return $response;
259 259
         }
260 260
 
Please login to merge, or discard this patch.
tests/test_tools/simpletest/tag.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
          *    @access public
67 67
          */
68 68
         function addContent($content) {
69
-            $this->_content .= (string)$content;
69
+            $this->_content .= (string) $content;
70 70
         }
71 71
 
72 72
         /**
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
          */
104 104
         function getAttribute($label) {
105 105
             $label = strtolower($label);
106
-            if (! isset($this->_attributes[$label])) {
106
+            if (!isset($this->_attributes[$label])) {
107 107
                 return false;
108 108
             }
109
-            return (string)$this->_attributes[$label];
109
+            return (string) $this->_attributes[$label];
110 110
         }
111 111
 
112 112
         /**
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
          *    @access public
248 248
          */
249 249
         function getValue() {
250
-            if (! $this->_is_set) {
250
+            if (!$this->_is_set) {
251 251
                 return $this->getDefault();
252 252
             }
253 253
             return $this->_value;
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
          *    @param integer $y                  Y coordinate of click.
472 472
          *    @access public
473 473
          */
474
-        function write($encoding){//, $x, $y) {
474
+        function write($encoding) {//, $x, $y) {
475 475
             if ($this->getName()) {
476 476
                 $encoding->add($this->getName() . '.x', $x);
477 477
                 $encoding->add($this->getName() . '.y', $y);
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
             if ($this->_wrapIsEnabled()) {
609 609
                 return wordwrap(
610 610
                         $text,
611
-                        (integer)$this->getAttribute('cols'),
611
+                        (integer) $this->getAttribute('cols'),
612 612
                         "\r\n");
613 613
             }
614 614
             return $text;
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
          *    @access public
656 656
          */
657 657
         function write($encoding) {
658
-            if (! file_exists($this->getValue())) {
658
+            if (!file_exists($this->getValue())) {
659 659
                 return;
660 660
             }
661 661
             $encoding->attach(
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
                         break;
827 827
                     }
828 828
                 }
829
-                if (! $success) {
829
+                if (!$success) {
830 830
                     return false;
831 831
                 }
832 832
             }
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
          */
1169 1169
         function setValue($values) {
1170 1170
             $values = $this->_makeArray($values);
1171
-            if (! $this->_valuesArePossible($values)) {
1171
+            if (!$this->_valuesArePossible($values)) {
1172 1172
                 return false;
1173 1173
             }
1174 1174
             $widgets = $this->_getWidgets();
@@ -1258,13 +1258,13 @@  discard block
 block discarded – undo
1258 1258
          *    @access public
1259 1259
          */
1260 1260
         function setValue($value) {
1261
-            if (! $this->_valueIsPossible($value)) {
1261
+            if (!$this->_valueIsPossible($value)) {
1262 1262
                 return false;
1263 1263
             }
1264 1264
             $index = false;
1265 1265
             $widgets = $this->_getWidgets();
1266 1266
             for ($i = 0, $count = count($widgets); $i < $count; $i++) {
1267
-                if (! $widgets[$i]->setValue($value)) {
1267
+                if (!$widgets[$i]->setValue($value)) {
1268 1268
                     $widgets[$i]->setValue(false);
1269 1269
                 }
1270 1270
             }
Please login to merge, or discard this patch.
tests/test_tools/simpletest/form.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
          */
106 106
         function getAction() {
107 107
             $url = $this->_action;
108
-            if ($this->_default_target && ! $url->getTarget()) {
108
+            if ($this->_default_target && !$url->getTarget()) {
109 109
                 $url->setTarget($this->_default_target);
110 110
             }
111 111
             return $url;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
          *    @access private
173 173
          */
174 174
         function _addRadioButton($tag) {
175
-            if (! isset($this->_radios[$tag->getName()])) {
175
+            if (!isset($this->_radios[$tag->getName()])) {
176 176
                 $this->_widgets[] = new SimpleRadioGroup();
177 177
                 $this->_radios[$tag->getName()] = count($this->_widgets) - 1;
178 178
             }
@@ -185,12 +185,12 @@  discard block
 block discarded – undo
185 185
          *    @access private
186 186
          */
187 187
         function _addCheckbox($tag) {
188
-            if (! isset($this->_checkboxes[$tag->getName()])) {
188
+            if (!isset($this->_checkboxes[$tag->getName()])) {
189 189
                 $this->_widgets[] = $tag;
190 190
                 $this->_checkboxes[$tag->getName()] = count($this->_widgets) - 1;
191 191
             } else {
192 192
                 $index = $this->_checkboxes[$tag->getName()];
193
-                if (! SimpleTestCompatibility::isA($this->_widgets[$index], 'SimpleCheckboxGroup')) {
193
+                if (!SimpleTestCompatibility::isA($this->_widgets[$index], 'SimpleCheckboxGroup')) {
194 194
                     $previous = $this->_widgets[$index];
195 195
                     $this->_widgets[$index] = new SimpleCheckboxGroup();
196 196
                     $this->_widgets[$index]->addWidget($previous);
Please login to merge, or discard this patch.
tests/test_tools/simpletest/reflection_php5.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
          *    @access public
32 32
          */
33 33
         function classExists() {
34
-            if (! class_exists($this->_interface)) {
34
+            if (!class_exists($this->_interface)) {
35 35
                 return false;
36 36
             }
37 37
             $reflection = new ReflectionClass($this->_interface);
38
-            return ! $reflection->isInterface();
38
+            return !$reflection->isInterface();
39 39
         }
40 40
 
41 41
         /**
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         function _onlyParents($interfaces) {
172 172
             $parents = array();
173 173
             foreach ($interfaces as $interface) {
174
-                foreach($interfaces as $possible_parent) {
174
+                foreach ($interfaces as $possible_parent) {
175 175
                     if ($interface->getName() == $possible_parent->getName()) {
176 176
                         continue;
177 177
                     }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         	if ($name == '__set') {
200 200
         		return 'function __set($key, $value)';
201 201
         	}
202
-        	if (! is_callable(array($this->_interface, $name))) {
202
+        	if (!is_callable(array($this->_interface, $name))) {
203 203
         		return "function $name()";
204 204
         	}
205 205
         	if ($this->_isInterfaceMethod($name)) {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
             foreach ($method->getParameters() as $parameter) {
239 239
                 $type = $parameter->getClass();
240 240
             	$signatures[] =
241
-					(! is_null($type) ? $type->getName() . ' ' : '') .
241
+					(!is_null($type) ? $type->getName() . ' ' : '') .
242 242
             			($parameter->isPassedByReference() ? '&' : '') .
243 243
             			'$' . $this->_suppressSpurious($parameter->getName()) .
244 244
             			($this->_isOptional($parameter) ? ' = null' : '');
Please login to merge, or discard this patch.