@@ -45,17 +45,17 @@ |
||
45 | 45 | use GanbaroDigital\MissingBits\ListTraversals\TraverseList; |
46 | 46 | use GanbaroDigital\MissingBits\ListTraversals\TraverseObject; |
47 | 47 | |
48 | - /** |
|
49 | - * traverse a list held in an array |
|
50 | - * |
|
51 | - * @param array $list |
|
52 | - * the list to walk |
|
53 | - * @param string $listName |
|
54 | - * what is the name of $list in the calling code? |
|
55 | - * @param callable $callable |
|
56 | - * what are we calling |
|
57 | - * @return void |
|
58 | - */ |
|
48 | + /** |
|
49 | + * traverse a list held in an array |
|
50 | + * |
|
51 | + * @param array $list |
|
52 | + * the list to walk |
|
53 | + * @param string $listName |
|
54 | + * what is the name of $list in the calling code? |
|
55 | + * @param callable $callable |
|
56 | + * what are we calling |
|
57 | + * @return void |
|
58 | + */ |
|
59 | 59 | function traverse_array($list, $listName, callable $callable) |
60 | 60 | { |
61 | 61 | return TraverseArray::using($list, $listName, $callable); |
@@ -194,7 +194,7 @@ |
||
194 | 194 | * |
195 | 195 | * @param mixed $item |
196 | 196 | * the item to examine |
197 | - * @return array |
|
197 | + * @return string[] |
|
198 | 198 | * the basic type of the examined item |
199 | 199 | */ |
200 | 200 | private static function fromString($item) |
@@ -44,13 +44,13 @@ |
||
44 | 44 | use GanbaroDigital\MissingBits\TraceInspectors\GetCaller; |
45 | 45 | use GanbaroDigital\MissingBits\TraceInspectors\StackFrame; |
46 | 46 | |
47 | - /** |
|
48 | - * work out who has called a piece of code |
|
49 | - * |
|
50 | - * @param array $filterList |
|
51 | - * a list of namespaces and classes to skip over |
|
52 | - * @return StackFrame |
|
53 | - */ |
|
47 | + /** |
|
48 | + * work out who has called a piece of code |
|
49 | + * |
|
50 | + * @param array $filterList |
|
51 | + * a list of namespaces and classes to skip over |
|
52 | + * @return StackFrame |
|
53 | + */ |
|
54 | 54 | function get_caller(array $filterList = []) |
55 | 55 | { |
56 | 56 | // we supply the trace |
@@ -57,13 +57,37 @@ |
||
57 | 57 | */ |
58 | 58 | interface Throwable |
59 | 59 | { |
60 | + |
|
61 | + /** |
|
62 | + * @return string |
|
63 | + */ |
|
60 | 64 | public function getMessage(); |
61 | 65 | public function getCode(); |
66 | + |
|
67 | + /** |
|
68 | + * @return string |
|
69 | + */ |
|
62 | 70 | public function getFile(); |
71 | + |
|
72 | + /** |
|
73 | + * @return integer |
|
74 | + */ |
|
63 | 75 | public function getLine(); |
64 | 76 | public function getTrace(); |
77 | + |
|
78 | + /** |
|
79 | + * @return string |
|
80 | + */ |
|
65 | 81 | public function getTraceAsString(); |
82 | + |
|
83 | + /** |
|
84 | + * @return Exception |
|
85 | + */ |
|
66 | 86 | public function getPrevious(); |
87 | + |
|
88 | + /** |
|
89 | + * @return string |
|
90 | + */ |
|
67 | 91 | public function __toString(); |
68 | 92 | } |
69 | 93 | } |
@@ -69,9 +69,9 @@ |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | if (!class_exists('Error')) { |
72 | - /** |
|
73 | - * taken from: http://php.net/manual/en/class.error.php |
|
74 | - */ |
|
72 | + /** |
|
73 | + * taken from: http://php.net/manual/en/class.error.php |
|
74 | + */ |
|
75 | 75 | class Error extends Exception implements Throwable |
76 | 76 | { |
77 | 77 | public function __toString() |