@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * Formats a log record. |
80 | 80 | * |
81 | 81 | * @param array $record A record to format |
82 | - * @return mixed The formatted record |
|
82 | + * @return string The formatted record |
|
83 | 83 | */ |
84 | 84 | public function format(array $record) |
85 | 85 | { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * Formats a set of log records. |
114 | 114 | * |
115 | 115 | * @param array $records A set of records to format |
116 | - * @return mixed The formatted set of records |
|
116 | + * @return string The formatted set of records |
|
117 | 117 | */ |
118 | 118 | public function formatBatch(array $records) |
119 | 119 | { |
@@ -125,6 +125,9 @@ discard block |
||
125 | 125 | return $message; |
126 | 126 | } |
127 | 127 | |
128 | + /** |
|
129 | + * @return string |
|
130 | + */ |
|
128 | 131 | protected function convertToString($data) |
129 | 132 | { |
130 | 133 | if (null === $data || is_scalar($data)) { |
@@ -72,6 +72,9 @@ discard block |
||
72 | 72 | return $record; |
73 | 73 | } |
74 | 74 | |
75 | + /** |
|
76 | + * @param integer $nestingLevel |
|
77 | + */ |
|
75 | 78 | protected function formatObject($value, $nestingLevel) |
76 | 79 | { |
77 | 80 | $objectVars = get_object_vars($value); |
@@ -80,6 +83,9 @@ discard block |
||
80 | 83 | return $this->formatArray($objectVars, $nestingLevel); |
81 | 84 | } |
82 | 85 | |
86 | + /** |
|
87 | + * @param integer $nestingLevel |
|
88 | + */ |
|
83 | 89 | protected function formatException(\Exception $exception, $nestingLevel) |
84 | 90 | { |
85 | 91 | $formattedException = array( |
@@ -98,6 +104,9 @@ discard block |
||
98 | 104 | return $this->formatArray($formattedException, $nestingLevel); |
99 | 105 | } |
100 | 106 | |
107 | + /** |
|
108 | + * @param integer $nestingLevel |
|
109 | + */ |
|
101 | 110 | protected function formatDate(\DateTime $value, $nestingLevel) |
102 | 111 | { |
103 | 112 | return new \MongoDate($value->getTimestamp()); |
@@ -113,6 +113,9 @@ discard block |
||
113 | 113 | return '[unknown('.gettype($data).')]'; |
114 | 114 | } |
115 | 115 | |
116 | + /** |
|
117 | + * @param \Throwable $e |
|
118 | + */ |
|
116 | 119 | protected function normalizeException($e) |
117 | 120 | { |
118 | 121 | // TODO 2.0 only check for Throwable |
@@ -277,6 +280,7 @@ discard block |
||
277 | 280 | * can be used as a callback for array_walk_recursive. |
278 | 281 | * |
279 | 282 | * @param mixed &$data Input to check and convert if needed |
283 | + * @param string $data |
|
280 | 284 | * @private |
281 | 285 | */ |
282 | 286 | public function detectAndCleanUtf8(&$data) |
@@ -284,6 +288,10 @@ discard block |
||
284 | 288 | if (is_string($data) && !preg_match('//u', $data)) { |
285 | 289 | $data = preg_replace_callback( |
286 | 290 | '/[\x80-\xFF]+/', |
291 | + |
|
292 | + /** |
|
293 | + * @param string $m |
|
294 | + */ |
|
287 | 295 | function ($m) { return utf8_encode($m[0]); }, |
288 | 296 | $data |
289 | 297 | ); |
@@ -118,7 +118,7 @@ |
||
118 | 118 | /** |
119 | 119 | * Sets minimum logging level at which this handler will be triggered. |
120 | 120 | * |
121 | - * @param int|string $level Level or level name |
|
121 | + * @param integer $level Level or level name |
|
122 | 122 | * @return self |
123 | 123 | */ |
124 | 124 | public function setLevel($level) |
@@ -71,7 +71,7 @@ |
||
71 | 71 | |
72 | 72 | /** |
73 | 73 | * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided |
74 | - * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array |
|
74 | + * @param integer $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array |
|
75 | 75 | */ |
76 | 76 | public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY) |
77 | 77 | { |
@@ -74,6 +74,9 @@ |
||
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | + /** |
|
78 | + * @param string $endpoint |
|
79 | + */ |
|
77 | 80 | protected function send($data, $endpoint) |
78 | 81 | { |
79 | 82 | $url = sprintf("https://%s/%s/%s/", self::HOST, $endpoint, $this->token); |
@@ -84,7 +84,7 @@ |
||
84 | 84 | /** |
85 | 85 | * Add headers to the message |
86 | 86 | * |
87 | - * @param string|array $headers Custom added headers |
|
87 | + * @param string $headers Custom added headers |
|
88 | 88 | * @return self |
89 | 89 | */ |
90 | 90 | public function addHeader($headers) |
@@ -212,7 +212,7 @@ |
||
212 | 212 | /** |
213 | 213 | * Gets extra parameters supported by Raven that can be found in "extra" and "context" |
214 | 214 | * |
215 | - * @return array |
|
215 | + * @return string[] |
|
216 | 216 | */ |
217 | 217 | protected function getExtraParameters() |
218 | 218 | { |
@@ -85,6 +85,11 @@ |
||
85 | 85 | */ |
86 | 86 | private $normalizerFormatter; |
87 | 87 | |
88 | + /** |
|
89 | + * @param string $channel |
|
90 | + * @param string $username |
|
91 | + * @param string $userIcon |
|
92 | + */ |
|
88 | 93 | public function __construct($channel = null, $username = null, $useAttachment = true, $userIcon = null, $useShortAttachment = false, $includeContextAndExtra = false, array $excludeFields = array(), FormatterInterface $formatter = null) |
89 | 94 | { |
90 | 95 | $this->channel = $channel; |