Skip to content

Commit fedf61a

Browse files
author
Martin Brecht-Precht
committed
Refactored the Message class.
1 parent 1274949 commit fedf61a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Request/Message/Message.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public function clearHeaders()
8686
*/
8787
public function setHeaders(array $headers)
8888
{
89-
// TODO: Validate argument
9089
$this->headers = $headers;
9190
return $this;
9291
}
@@ -176,11 +175,11 @@ public function hasHeaders()
176175
}
177176

178177
/**
179-
* @return bool
178+
* @return int
180179
*/
181180
public function getHeaderCount()
182181
{
183-
return count($this->headers);
182+
return (int)count($this->headers);
184183
}
185184

186185
/**
@@ -301,11 +300,11 @@ public function hasCookies()
301300
}
302301

303302
/**
304-
* @return bool
303+
* @return int
305304
*/
306305
public function getCookieCount()
307306
{
308-
return count($this->cookies);
307+
return (int)count($this->cookies);
309308
}
310309

311310
/**

0 commit comments

Comments
 (0)