Inheritance: implements SimpleSoftwareIO\QrCode\ImageMergeInterface
 /**
  * Generates a QrCode.
  *
  * @param string      $text     The text to be converted into a QrCode
  * @param null|string $filename The filename and path to save the QrCode file
  *
  * @return string|void Returns a QrCode string depending on the format, or saves to a file.
  */
 public function generate($text, $filename = null)
 {
     $qrCode = $this->writer->writeString($text, $this->encoding, $this->errorCorrection);
     if ($this->imageMerge !== null) {
         $merger = new ImageMerge(new Image($qrCode), new Image($this->imageMerge));
         $qrCode = $merger->merge($this->imagePercentage);
     }
     if ($filename === null) {
         return $qrCode;
     } else {
         file_put_contents($filename, $qrCode);
     }
 }
 /**
  * @expectedException InvalidArgumentException
  */
 public function test_it_throws_an_exception_when_percentage_is_greater_than_1()
 {
     $this->testImage->merge(1.1);
 }