| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 75 | 2 | public function getRandomSymbol ( MethodInterface $method = null ) |
|
| 76 | { |
||
| 77 | 2 | $length = strlen( $this->symbols ); |
|
| 78 | 2 | if ( $method ) { |
|
| 79 | 2 | $position = $method->getRandomInt( $length - 1 ); |
|
| 80 | 2 | } else { |
|
| 81 | 1 | $position = mt_rand( 0, $length - 1 ); |
|
| 82 | } |
||
| 83 | 2 | return $this->symbols[ $position ]; |
|
| 84 | } |
||
| 85 | } |
||
| 86 |