Exemplo n.º 1
0
 /**
  * @return MegaBytes
  */
 public function megaBytes()
 {
     return MegaBytes::allocateBytes(Bytes::allocateUnits($this->numberOfBytes()));
 }
Exemplo n.º 2
0
 /**
  * @param Bytes $bytes
  * @return self
  */
 public static function allocateBytes(Bytes $bytes)
 {
     return MegaBytes::allocateUnits(self::calculateUnitsFromBytes($bytes->numberOfBytes()));
 }