Skip to content
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

[5.x] Add isLog to IncomingEntry #1485

Merged
merged 3 commits into from
Jun 10, 2024
Merged

[5.x] Add isLog to IncomingEntry #1485

merged 3 commits into from
Jun 10, 2024

Conversation

ngunyimacharia
Copy link
Contributor

This commit introduces the isLog convenience method to check if a Telescope IncomingEntry is of type Log.

This will improve the readability of the code in the application's TelescopeServiceProvider

Before:

Telescope::filter(function (IncomingEntry $entry) {
    if ($this->app->environment('local')) {
        return true;
    }

    return $entry->type === EntryType::LOG;
});

After:

Telescope::filter(function (IncomingEntry $entry) {
    if ($this->app->environment('local')) {
        return true;
    }

    return $entry->isLog();
});

ngunyimacharia and others added 3 commits June 10, 2024 13:47
This commit introduces the `isLog` convenience method to check if a Telescope IncomingEntry is of type Log.

This will improve the readability of the code in the application's `TelescopeServiceProvider`
@taylorotwell taylorotwell merged commit 6923dc1 into laravel:5.x Jun 10, 2024
12 checks passed
@ngunyimacharia ngunyimacharia deleted the patch-1 branch June 10, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants