-
Notifications
You must be signed in to change notification settings - Fork 2
Okonomiyaki3000: _log returns the class instance for method chaining #43 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…f count, use array_map instead of foreach, call isset with multiple args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We love fluent interfaces! Hurray!
foreach ($args as $arg) { | ||
$logs[] = $logger->_convert($arg); | ||
} | ||
$logs = array_map(array($logger, '_convert'), $args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the array syntax should be short syntax because of consistency. Using the [....]
instead.
And this short syntax is supported sine the php-5.4+
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in PR #6.
|
||
$backtrace = debug_backtrace(false); | ||
$level = $logger->getSetting(self::BACKTRACE_LEVEL); | ||
|
||
$backtrace_message = 'unknown'; | ||
if (isset($backtrace[$level]['file']) && isset($backtrace[$level]['line'])) { | ||
if (isset($backtrace[$level]['file'], $backtrace[$level]['line'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is about two styles for presenting check two values will be set.
If we accept this, we should change all related conditions to this in this respo.
Copied from ccampbell/chromephp#43:
This merges ccampbell/chromephp/pull/43.
This change is