1 | <?php |
||
5 | abstract class ExpectationFailed extends \Exception |
||
6 | { |
||
7 | abstract function getContextText(); |
||
8 | |||
9 | /** |
||
10 | * Returns exception message with additional context info. |
||
11 | * |
||
12 | * @return string |
||
13 | */ |
||
14 | public function __toString() |
||
25 | |||
26 | /** |
||
27 | * Prepends every line in a string with pipe (|). |
||
28 | * |
||
29 | * @param string $string |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | protected function pipeString($string) |
||
37 | |||
38 | /** |
||
39 | * Trims string to specified number of chars. |
||
40 | * |
||
41 | * @param string $string response content |
||
42 | * @param int $count trim count |
||
43 | * |
||
44 | * @return string |
||
45 | */ |
||
46 | protected function trimString($string, $count = 1000) |
||
55 | } |
||
56 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.