@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace spec\Prophecy\Comparator; |
4 | 4 | |
5 | 5 | use PhpSpec\ObjectBehavior; |
6 | -use Prophecy\Argument; |
|
7 | 6 | use Prophecy\Prophet; |
8 | 7 | |
9 | 8 | class ProphecyComparatorSpec extends ObjectBehavior |
@@ -270,6 +270,9 @@ discard block |
||
270 | 270 | return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); |
271 | 271 | } |
272 | 272 | |
273 | + /** |
|
274 | + * @return string |
|
275 | + */ |
|
273 | 276 | public static function mb_detect_encoding($str, $encodingList = null, $strict = false) |
274 | 277 | { |
275 | 278 | if (null === $encodingList) { |
@@ -574,6 +577,9 @@ discard block |
||
574 | 577 | return $code; |
575 | 578 | } |
576 | 579 | |
580 | + /** |
|
581 | + * @param boolean $part |
|
582 | + */ |
|
577 | 583 | private static function getSubpart($pos, $part, $haystack, $encoding) |
578 | 584 | { |
579 | 585 | if (false === $pos) { |
@@ -621,6 +627,9 @@ discard block |
||
621 | 627 | return self::mb_convert_case($s[0], MB_CASE_UPPER, 'UTF-8'); |
622 | 628 | } |
623 | 629 | |
630 | + /** |
|
631 | + * @param string $file |
|
632 | + */ |
|
624 | 633 | private static function getData($file) |
625 | 634 | { |
626 | 635 | if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { |
@@ -64,6 +64,7 @@ |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | + * @param string $content |
|
67 | 68 | * @return string Path to the new file |
68 | 69 | */ |
69 | 70 | private function createFile($content) |
@@ -164,6 +164,9 @@ discard block |
||
164 | 164 | static::notEmpty($value, $message); |
165 | 165 | } |
166 | 166 | |
167 | + /** |
|
168 | + * @param integer $value |
|
169 | + */ |
|
167 | 170 | public static function integer($value, $message = '') |
168 | 171 | { |
169 | 172 | if (!is_int($value)) { |
@@ -204,6 +207,9 @@ discard block |
||
204 | 207 | } |
205 | 208 | } |
206 | 209 | |
210 | + /** |
|
211 | + * @param boolean $value |
|
212 | + */ |
|
207 | 213 | public static function boolean($value, $message = '') |
208 | 214 | { |
209 | 215 | if (!is_bool($value)) { |
@@ -334,6 +340,9 @@ discard block |
||
334 | 340 | } |
335 | 341 | } |
336 | 342 | |
343 | + /** |
|
344 | + * @param null|\phpDocumentor\Reflection\DocBlock\DescriptionFactory $value |
|
345 | + */ |
|
337 | 346 | public static function notNull($value, $message = '') |
338 | 347 | { |
339 | 348 | if (null === $value) { |
@@ -363,6 +372,9 @@ discard block |
||
363 | 372 | } |
364 | 373 | } |
365 | 374 | |
375 | + /** |
|
376 | + * @param integer $value |
|
377 | + */ |
|
366 | 378 | public static function eq($value, $value2, $message = '') |
367 | 379 | { |
368 | 380 | if ($value2 != $value) { |
@@ -712,6 +724,9 @@ discard block |
||
712 | 724 | } |
713 | 725 | } |
714 | 726 | |
727 | + /** |
|
728 | + * @param string $value |
|
729 | + */ |
|
715 | 730 | public static function classExists($value, $message = '') |
716 | 731 | { |
717 | 732 | if (!class_exists($value)) { |
@@ -733,6 +748,9 @@ discard block |
||
733 | 748 | } |
734 | 749 | } |
735 | 750 | |
751 | + /** |
|
752 | + * @param string $value |
|
753 | + */ |
|
736 | 754 | public static function implementsInterface($value, $interface, $message = '') |
737 | 755 | { |
738 | 756 | if (!in_array($interface, class_implements($value))) { |
@@ -937,6 +955,9 @@ discard block |
||
937 | 955 | return mb_strwidth($value, $encoding); |
938 | 956 | } |
939 | 957 | |
958 | + /** |
|
959 | + * @param string $message |
|
960 | + */ |
|
940 | 961 | protected static function reportInvalidArgument($message) |
941 | 962 | { |
942 | 963 | throw new InvalidArgumentException($message); |
@@ -1043,6 +1043,10 @@ discard block |
||
1043 | 1043 | |
1044 | 1044 | var $list_level = 0; |
1045 | 1045 | |
1046 | + /** |
|
1047 | + * @param string $list_str |
|
1048 | + * @param string $marker_any_re |
|
1049 | + */ |
|
1046 | 1050 | function processListItems($list_str, $marker_any_re) { |
1047 | 1051 | # |
1048 | 1052 | # Process the contents of a single ordered or unordered list, splitting it |
@@ -1146,6 +1150,9 @@ discard block |
||
1146 | 1150 | } |
1147 | 1151 | |
1148 | 1152 | |
1153 | + /** |
|
1154 | + * @param string $code |
|
1155 | + */ |
|
1149 | 1156 | function makeCodeSpan($code) { |
1150 | 1157 | # |
1151 | 1158 | # Create a code span markup for $code. Called from handleSpanToken. |
@@ -1638,6 +1645,9 @@ discard block |
||
1638 | 1645 | # hanlde UTF-8 if the default function does not exist. |
1639 | 1646 | var $utf8_strlen = 'mb_strlen'; |
1640 | 1647 | |
1648 | + /** |
|
1649 | + * @param string $text |
|
1650 | + */ |
|
1641 | 1651 | function detab($text) { |
1642 | 1652 | # |
1643 | 1653 | # Replace tabs with the appropriate amount of space. |
@@ -2182,6 +2192,12 @@ discard block |
||
2182 | 2192 | |
2183 | 2193 | return array($parsed, $text); |
2184 | 2194 | } |
2195 | + |
|
2196 | + /** |
|
2197 | + * @param string $text |
|
2198 | + * @param string $hash_method |
|
2199 | + * @param boolean $md_attr |
|
2200 | + */ |
|
2185 | 2201 | function _hashHTMLBlocks_inHTML($text, $hash_method, $md_attr) { |
2186 | 2202 | # |
2187 | 2203 | # Parse HTML, calling _HashHTMLBlocks_InMarkdown for block tags. |
@@ -2846,6 +2862,9 @@ discard block |
||
2846 | 2862 | } |
2847 | 2863 | |
2848 | 2864 | |
2865 | + /** |
|
2866 | + * @return string |
|
2867 | + */ |
|
2849 | 2868 | function processDefListItems($list_str) { |
2850 | 2869 | # |
2851 | 2870 | # Process the contents of a single definition list, splitting it |
@@ -561,7 +561,7 @@ |
||
561 | 561 | /** |
562 | 562 | * Return an array of fields which can be exported. |
563 | 563 | * |
564 | - * @return array |
|
564 | + * @return string[] |
|
565 | 565 | * @deprecated 1.9 Use toObject() |
566 | 566 | */ |
567 | 567 | public function getExportableValues() { |
@@ -561,7 +561,7 @@ |
||
561 | 561 | /** |
562 | 562 | * Return an array of fields which can be exported. |
563 | 563 | * |
564 | - * @return array |
|
564 | + * @return string[] |
|
565 | 565 | * @deprecated 1.9 Use toObject() |
566 | 566 | */ |
567 | 567 | public function getExportableValues() { |
@@ -724,6 +724,9 @@ |
||
724 | 724 | $this->message = $this->StripSlashes($_POST['message']); |
725 | 725 | } |
726 | 726 | |
727 | + /** |
|
728 | + * @param string $error |
|
729 | + */ |
|
727 | 730 | function add_error($error) |
728 | 731 | { |
729 | 732 | array_push($this->errors,$error); |
@@ -724,6 +724,9 @@ |
||
724 | 724 | $this->message = $this->StripSlashes($_POST['message']); |
725 | 725 | } |
726 | 726 | |
727 | + /** |
|
728 | + * @param string $error |
|
729 | + */ |
|
727 | 730 | function add_error($error) |
728 | 731 | { |
729 | 732 | array_push($this->errors,$error); |