Ignore:
Timestamp:
Apr 7, 2020, 10:15:48 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved code formatting.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/MemoryStream.php

    r815 r880  
    2020    $Result = substr($this->Data, $this->Position, $Count);
    2121    $this->Position = $this->Position + $Count;
    22     return($Result);
     22    return $Result;
    2323  }
    2424
     
    2727    $Result = $this->Data[$this->Position];
    2828    $this->Position = $this->Position + 1;
    29     return($Result);
     29    return $Result;
    3030  }
    3131
     
    3434    $val = unpack('V*', substr($this->Data, $this->Position, 4));
    3535    $this->Position = $this->Position + 4;
    36     return($val[1]);
     36    return $val[1];
    3737  }
    3838
     
    4141    $val = unpack('I*', substr($this->Data, $this->Position, 4));
    4242    $this->Position = $this->Position + 4;
    43     return($val[1]);
     43    return $val[1];
    4444  }
    4545
     
    4848    $val = unpack('f*', substr($this->Data, $this->Position, 4));
    4949    $this->Position = $this->Position + 4;
    50     return($val[1]);
     50    return $val[1];
    5151  }
    5252
     
    5555    $Result = $this->Data[$this->Position];
    5656    $this->Position = $this->Position + 1;
    57     return($Result);
     57    return $Result;
    5858  }
    5959
     
    6262    $Length = 0;
    6363    $StartPosition = $this->Position;
    64     while(!$this->EOF())
     64    while (!$this->EOF())
    6565    {
    6666      $Char = $this->ReadChar();
    67       if($Char == $EndSymbol) break;
     67      if ($Char == $EndSymbol) break;
    6868    }
    6969    $Result = substr($this->Data, $StartPosition, $this->Position - $StartPosition);
    70     return($Result);
     70    return $Result;
    7171  }
    7272
     
    116116  public function GetPosition()
    117117  {
    118     return($this->Position);
     118    return $this->Position;
    119119  }
    120120
    121121  public function GetSize()
    122122  {
    123     return(strlen($this->Data));
     123    return strlen($this->Data);
    124124  }
    125125
    126126  public function SetSize($Size)
    127127  {
    128     return($this->Data = substr($this->Data, 0, $Size));
     128    return $this->Data = substr($this->Data, 0, $Size);
    129129  }
    130130
    131131  public function EOF()
    132132  {
    133     return($this->Position >= strlen($this->Data));
     133    return $this->Position >= strlen($this->Data);
    134134  }
    135135}
Note: See TracChangeset for help on using the changeset viewer.