Skip to content

Conversation

@hopeseekr
Copy link
Member

@hopeseekr hopeseekr commented May 15, 2019

Copied from ccampbell/chromephp#43:

So that you can do stuff like:

ChromePhp::group('Some Logs')
    ->log('A log message')
    ->log('Another log message')
    ->log('This can go on as long as you like.')
    ->groupEnd();

Which I think is pretty slick.

This merges ccampbell/chromephp/pull/43.


This change is Reviewable

Copy link
Member Author

@hopeseekr hopeseekr left a 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);
Copy link
Collaborator

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+.

Copy link
Member Author

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_message = 'unknown';
if (isset($backtrace[$level]['file']) && isset($backtrace[$level]['line'])) {
if (isset($backtrace[$level]['file'], $backtrace[$level]['line'])) {
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants