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

Work with Laravel 6.5 Update Rating.php #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexsaab
Copy link

In Laravel 6.5 array_get function not exist

In Laravel 6.5 array_get function not exist
Copy link

@pelmered pelmered left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is conditional is not needed. Arr::get should be enough. It has been around since at least 5.0 and is not the only way.

@@ -115,7 +115,13 @@ public function withStyles(array $styles)
{
$build = [];
foreach (static::$defaultStyles as $key => $defaultValue) {
$build[$key] = Arr::get($styles, $key, $defaultValue);
// In Laravel 6.5 array_get function not exist
if (function_exists('array_get')) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is conditional is not needed. Arr::get should be enough. It has been around since at least 5.0 and is not the only way.

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