projects
/
m6w6
/
seekat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
8d41e21
)
simplification
author
Michael Wallner
<mike@php.net>
Mon, 16 Jan 2017 08:34:13 +0000
(09:34 +0100)
committer
Michael Wallner
<mike@php.net>
Mon, 16 Jan 2017 08:34:13 +0000
(09:34 +0100)
lib/API.php
patch
|
blob
|
history
diff --git
a/lib/API.php
b/lib/API.php
index 15b38302c23015c78170667099873d89bce4b44f..63fd004f386a73ce82b2dead3ee2669d7726c6d7 100644
(file)
--- a/
lib/API.php
+++ b/
lib/API.php
@@
-102,7
+102,7
@@
class API implements IteratorAggregate, Countable {
$this->exists($seg, $that->data);
}
$this->exists($seg, $that->data);
}
- $this->logger->debug(
__FUNCTION__."
($seg)", [
+ $this->logger->debug(
"get
($seg)", [
"url" => [
(string) $this->url,
(string) $that->url
"url" => [
(string) $this->url,
(string) $that->url
@@
-164,12
+164,8
@@
class API implements IteratorAggregate, Countable {
goto invoke;
}
goto invoke;
}
- throw InvalidArgumentException(
- "Expected callable or Generator, got ".(
- is_object($cbg)
- ? "instance of ".get_class($cbg)
- : gettype($cbg).": ".var_export($cbg, true)
- )
+ throw new InvalidArgumentException(
+ "Expected callable or Generator, got ".typeof($cbg, true)
);
}
);
}
@@
-403,11
+399,11
@@
class API implements IteratorAggregate, Countable {
* @return API self
*/
function send() : API {
* @return API self
*/
function send() : API {
- $this->logger->debug(
__FUNCTION__."
: start loop");
+ $this->logger->debug(
"send
: start loop");
while (count($this->client)) {
$this->client->send();
}
while (count($this->client)) {
$this->client->send();
}
- $this->logger->debug(
__FUNCTION__."
: end loop");
+ $this->logger->debug(
"send
: end loop");
return $this;
}
return $this;
}
@@
-430,14
+426,8
@@
class API implements IteratorAggregate, Countable {
$exists = false;
}
$exists = false;
}
- $this->logger->debug(__FUNCTION__."($seg) in ".(
- is_object($this->data)
- ? get_class($this->data)
- : gettype($this->data)
- )." -> ".(
- $exists
- ? "true"
- : "false"
+ $this->logger->debug(sprintf("exists(%s) in %s -> %s",
+ $seg, typeof($this->data, false), $exists ? "true" : "false"
), [
"url" => (string) $this->url,
"val" => $val,
), [
"url" => (string) $this->url,
"val" => $val,