| @@ 37-43 (lines=7) @@ | ||
| 34 | * @param StringUtil $util |
|
| 35 | * @param ComparatorFactory $comparatorFactory |
|
| 36 | */ |
|
| 37 | public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null) |
|
| 38 | { |
|
| 39 | $this->value = $value; |
|
| 40 | $this->util = $util ?: new StringUtil(); |
|
| 41 | ||
| 42 | $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * Scores 10 if argument matches preset value. |
|
| @@ 38-49 (lines=12) @@ | ||
| 35 | * @param null|StringUtil $util |
|
| 36 | * @param ComparatorFactory $comparatorFactory |
|
| 37 | */ |
|
| 38 | public function __construct( |
|
| 39 | $methodName, |
|
| 40 | $value, |
|
| 41 | StringUtil $util = null, |
|
| 42 | ComparatorFactory $comparatorFactory = null |
|
| 43 | ) { |
|
| 44 | $this->name = $methodName; |
|
| 45 | $this->value = $value; |
|
| 46 | $this->util = $util ?: new StringUtil; |
|
| 47 | ||
| 48 | $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Scores 8 if argument is an object, which method returns expected value. |
|