public function __construct($minCount, $maxSize)
 {
     if ($minCount < 1) {
         throw new \InvalidArgumentException('At least one file should be set as minimum backup count.');
     }
     $this->minCount = $minCount;
     $this->maxSize = Filesize::getBytes($maxSize);
 }
Example #2
0
 /**
  * @test
  *
  * @expectedException \InvalidArgumentException
  */
 public function invalidSizeFormat()
 {
     Filesize::getBytes('15 M');
 }
Example #3
0
 /**
  * @param string|int $maxSize
  */
 public function __construct($maxSize)
 {
     $this->maxSize = Filesize::getBytes($maxSize);
 }