/**
  * @return int|mixed
  */
 public function parseQuality()
 {
     if ($this->request->query->has('quality')) {
         $quality = (int) $this->request->query->get('quality');
         if ($quality <= 100 && $quality > 0) {
             $this->quality = $quality;
         } else {
             $this->quality = $this->configuration->getDefaultQuality();
         }
     } else {
         $this->quality = $this->configuration->getDefaultQuality();
     }
     return $this->quality;
 }