@@ -77,6 +77,9 @@ |
||
| 77 | 77 | return $scenarios; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | + /** |
|
| 81 | + * @param \Closure $callable |
|
| 82 | + */ |
|
| 80 | 83 | protected function buildCallee($feature, $scenario, $callable) |
| 81 | 84 | { |
| 82 | 85 | $description = sprintf('%s:%s', $feature->getFile(), $scenario->getLine()); |
@@ -80,11 +80,17 @@ |
||
| 80 | 80 | return $this->assert($expected === $real, $message); |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | + /** |
|
| 84 | + * @param integer $real |
|
| 85 | + */ |
|
| 83 | 86 | public function assertNotEquals($expected, $real, $message = "Failing to assert not equals.") |
| 84 | 87 | { |
| 85 | 88 | return $this->assert($expected !== $real, $message); |
| 86 | 89 | } |
| 87 | 90 | |
| 91 | + /** |
|
| 92 | + * @param boolean $result |
|
| 93 | + */ |
|
| 88 | 94 | public function assert($result, $message = "Assert failure") |
| 89 | 95 | { |
| 90 | 96 | if (false === $result) { |
@@ -4,11 +4,17 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | class TextFormater |
| 6 | 6 | { |
| 7 | + /** |
|
| 8 | + * @param string $str |
|
| 9 | + */ |
|
| 7 | 10 | public function toCamelCase($str) |
| 8 | 11 | { |
| 9 | 12 | return preg_replace('/ /', '', ucwords($str)); |
| 10 | 13 | } |
| 11 | 14 | |
| 15 | + /** |
|
| 16 | + * @param string $str |
|
| 17 | + */ |
|
| 12 | 18 | public function toUnderscoreCase($str) |
| 13 | 19 | { |
| 14 | 20 | $str = strtolower(preg_replace("[A-Z]", "_\$1", $str)); |
@@ -77,6 +83,9 @@ discard block |
||
| 77 | 83 | return $this->goDeeper($array, 0); |
| 78 | 84 | } |
| 79 | 85 | |
| 86 | + /** |
|
| 87 | + * @param integer $deep |
|
| 88 | + */ |
|
| 80 | 89 | protected function goDeeper(array $array, $deep) |
| 81 | 90 | { |
| 82 | 91 | $deep++; |
@@ -89,6 +98,9 @@ discard block |
||
| 89 | 98 | return $deep; |
| 90 | 99 | } |
| 91 | 100 | |
| 101 | + /** |
|
| 102 | + * @param string $input |
|
| 103 | + */ |
|
| 92 | 104 | protected function mbStrPad($input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT) |
| 93 | 105 | { |
| 94 | 106 | $diff = strlen($input) - mb_strlen($input, 'UTF8'); |