Settings.php | ||||
![]() | ||||
|
||||
![]() |
Coverage | ||||||||||
Classes | Functions / Methods | Lines | ||||||||
Total |
|
0.00% | 0 / 1 |
|
80.00% | 4 / 5 | CRAP |
|
84.62% | 11 / 13 |
Settings |
|
0.00% | 0 / 1 |
|
80.00% | 4 / 5 | 7.18 |
|
84.62% | 11 / 13 |
getInstance() |
|
100.00% | 1 / 1 | 2 |
|
100.00% | 4 / 4 | |||
setImagemagickBinaryPath($path) |
|
100.00% | 1 / 1 | 1 |
|
100.00% | 2 / 2 | |||
getImagemagickBinaryPath() |
|
0.00% | 0 / 1 | 2.50 |
|
50.00% | 2 / 4 | |||
setDebug($boolean) |
|
100.00% | 1 / 1 | 1 |
|
100.00% | 2 / 2 | |||
isDebug() |
|
100.00% | 1 / 1 | 1 |
|
100.00% | 1 / 1 |
1 : <?php 2 : namespace phMagick\Core; 3 : use phMagick\Core\Path; 4 : 5 : class Settings 6 : { 7 : static private $instance = null; 8 : private $binaryPath = null; 9 : private $debug = false; 10 : 11 : public function getInstance() 12 : { 13 5 : if (is_null(self::$instance)) { 14 1 : self::$instance = new Settings(); 15 1 : } 16 : 17 5 : return self::$instance; 18 : } 19 : 20 : public function setImagemagickBinaryPath($path) 21 : { 22 1 : $this->binaryPath = new Path($path); 23 1 : } 24 : 25 : public function getImagemagickBinaryPath() 26 : { 27 1 : if (is_null($this->binaryPath)) { 28 0 : $this->binaryPath = new Path(); 29 0 : } 30 : 31 1 : return $this->binaryPath; 32 : } 33 : 34 : public function setDebug($boolean) 35 : { 36 1 : $this->debug = $boolean; 37 1 : } 38 : 39 : public function isDebug() 40 : { 41 2 : return $this->debug; 42 : } 43 : } |
![]() |
Generated by PHP_CodeCoverage 1.1.1 using PHP 5.3.10 and PHPUnit 3.6.7 at Fri Apr 20 19:24:32 CEST 2012. |