/**
  * @param $result
  * @param UnitOfMeasurement $unitOfMeasurement
  * @return StorageCollection
  */
 private function parseResultIntoCollection($result, UnitOfMeasurement $unitOfMeasurement)
 {
     $storageCollection = new StorageCollection();
     while ($row = $result->fetch()) {
         $storageCollection->add($this->mapStorageUsageRowToStorage($row, $unitOfMeasurement->type()));
     }
     return $storageCollection;
 }
 /**
  * @param StorageCollection $collection
  * @param string $username
  */
 private function addStorageToCollection(StorageCollection $collection, $username)
 {
     $collection->add(Storage::withUserDateUsageQuota(User::named($username), new \DateTime("2015-12-31 23:50:01"), Bytes::allocateUnits(0), Quota::fromBytes(Bytes::allocateUnits(1))));
 }