Skip to content

Commit 7719942

Browse files
committed
removes whitespace
1 parent 31278bd commit 7719942

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

amqp_wire.inc

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class AMQPWriter
6767
if($x<0)
6868
$x = sprintf("%u", $x);
6969
}
70-
70+
7171
$res = array();
7272
for($i=0;$i<$bytes;$i++)
7373
{
@@ -79,7 +79,7 @@ class AMQPWriter
7979
throw new Exception("Value too big!");
8080
return $res;
8181
}
82-
82+
8383
private function flushbits()
8484
{
8585
if(count($this->bits))
@@ -122,10 +122,10 @@ class AMQPWriter
122122
$last = 0;
123123
else
124124
$last = array_pop($this->bits);
125-
125+
126126
$last |= ($b << $shift);
127127
array_push($this->bits, $last);
128-
128+
129129
$this->bitcount += 1;
130130
}
131131

@@ -275,7 +275,7 @@ class AMQPReader
275275

276276
if(!function_exists("bcmul"))
277277
throw new Exception("'bc math' module required");
278-
278+
279279
$this->buffer_read_timeout = 5; // in seconds
280280
}
281281

@@ -290,14 +290,14 @@ class AMQPReader
290290
$this->bitcount = $this->bits = 0;
291291
return $this->rawread($n);
292292
}
293-
293+
294294
private function rawread($n)
295295
{
296296
if($this->sock)
297297
{
298298
$res = '';
299299
$read = 0;
300-
300+
301301
$start = time();
302302
while($read < $n && !feof($this->sock->real_sock()) &&
303303
(false !== ($buf = fread($this->sock->real_sock(), $n - $read))))
@@ -307,8 +307,8 @@ class AMQPReader
307307
usleep(100);
308308
}
309309
else
310-
$start = time();
311-
310+
$start = time();
311+
312312
$read += strlen($buf);
313313
$res .= $buf;
314314
}
@@ -378,7 +378,7 @@ class AMQPReader
378378
return $res;
379379
}
380380
}
381-
381+
382382
// PHP does not have unsigned 32 bit int,
383383
// so we return it as a string
384384
public function read_long()
@@ -410,7 +410,7 @@ class AMQPReader
410410
// workaround signed/unsigned braindamage in php
411411
$hi = sprintf ( "%u", $hi[1] );
412412
$lo = sprintf ( "%u", $lo[1] );
413-
413+
414414
return bcadd(bcmul($hi, "4294967296" ), $lo);
415415
}
416416

@@ -424,7 +424,7 @@ class AMQPReader
424424
list(,$slen) = unpack('C', $this->rawread(1));
425425
return $this->rawread($slen);
426426
}
427-
427+
428428
/**
429429
* Read a string that's up to 2**32 bytes, the encoding
430430
* isn't specified in the AMQP spec, so just return it as
@@ -438,7 +438,7 @@ class AMQPReader
438438
throw new Exception("Strings longer than supported on this platform");
439439
return $this->rawread($slen);
440440
}
441-
441+
442442
/**
443443
* Read and AMQP timestamp, which is a 64-bit integer representing
444444
* seconds since the Unix epoch in 1-second resolution.
@@ -488,12 +488,12 @@ class AMQPReader
488488
return $result;
489489
}
490490

491-
491+
492492
protected function tell()
493493
{
494494
return $this->offset;
495495
}
496-
496+
497497
}
498498

499499

@@ -530,11 +530,11 @@ class GenericContent
530530
{
531531
if(array_key_exists($name,$this->properties))
532532
return $this->properties[$name];
533-
533+
534534
if(isset($this->delivery_info))
535535
if(array_key_exists($name,$this->delivery_info))
536536
return $this->delivery_info[$name];
537-
537+
538538
throw new Exception("No such property");
539539
}
540540

@@ -603,7 +603,7 @@ class GenericContent
603603
$flag_bits = 0;
604604
$shift = 15;
605605
}
606-
606+
607607
$flag_bits |= (1 << $shift);
608608
if($proptype != "bit")
609609
call_user_func(array($raw_bytes, "write_" . $proptype),
@@ -616,7 +616,7 @@ class GenericContent
616616
foreach($flags as $flag_bits)
617617
$result->write_short($flag_bits);
618618
$result->write($raw_bytes->getvalue());
619-
619+
620620
return $result->getvalue();
621621
}
622622
}
@@ -629,14 +629,14 @@ class BufferedInput
629629

630630
$this->sock = $sock;
631631
$this->reset("");
632-
632+
633633
}
634-
634+
635635
public function real_sock()
636636
{
637637
return $this->sock;
638638
}
639-
639+
640640
public function read($n)
641641
{
642642
if ($this->offset >= strlen($this->buffer))
@@ -648,13 +648,13 @@ class BufferedInput
648648
}
649649
return $this->read_buffer($n);
650650
}
651-
651+
652652
public function close()
653653
{
654654
fclose($this->sock);
655655
$this->reset("");
656656
}
657-
657+
658658
private function read_buffer($n)
659659
{
660660
$n = min($n, strlen($this->buffer) - $this->offset);
@@ -669,21 +669,21 @@ class BufferedInput
669669
$this->offset += $n;
670670
return $block;
671671
}
672-
672+
673673
private function reset($block)
674674
{
675675
$this->buffer = $block;
676676
$this->offset = 0;
677677
}
678-
678+
679679
private function populate_buffer()
680680
{
681681
if(feof($this->sock))
682682
{
683683
$this->reset("");
684684
return FALSE;
685685
}
686-
686+
687687
$block = fread($this->sock, $this->block_size);
688688
if ($block !== FALSE)
689689
{

0 commit comments

Comments
 (0)