src/Prophecy/Argument/ArgumentsWildcard.php 1 location
|
@@ 32-41 (lines=10) @@
|
| 29 |
|
* |
| 30 |
|
* @param array $arguments Array of argument tokens or values |
| 31 |
|
*/ |
| 32 |
|
public function __construct(array $arguments) |
| 33 |
|
{ |
| 34 |
|
foreach ($arguments as $argument) { |
| 35 |
|
if (!$argument instanceof Token\TokenInterface) { |
| 36 |
|
$argument = new Token\ExactValueToken($argument); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
$this->tokens[] = $argument; |
| 40 |
|
} |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
/** |
| 44 |
|
* Calculates wildcard match score for provided arguments. |
src/Prophecy/Argument/Token/LogicalAndToken.php 1 location
|
@@ 26-34 (lines=9) @@
|
| 23 |
|
/** |
| 24 |
|
* @param array $arguments exact values or tokens |
| 25 |
|
*/ |
| 26 |
|
public function __construct(array $arguments) |
| 27 |
|
{ |
| 28 |
|
foreach ($arguments as $argument) { |
| 29 |
|
if (!$argument instanceof TokenInterface) { |
| 30 |
|
$argument = new ExactValueToken($argument); |
| 31 |
|
} |
| 32 |
|
$this->tokens[] = $argument; |
| 33 |
|
} |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
/** |
| 37 |
|
* Scores maximum score from scores returned by tokens for this argument if all of them score. |