Created
February 11, 2020 17:00
-
-
Save scmrus/c4d597bee0e1a7952e2432236a98d4fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @mixin \Illuminate\Support\Collection | |
* | |
* @psalm-suppress UndefinedMethod | |
* @psalm-suppress UndefinedThisPropertyFetch | |
* @psalm-suppress UndefinedThisPropertyAssignment | |
*/ | |
class CollectionMixin | |
{ | |
public function fill() | |
{ | |
return function ($value) { | |
/** @var \Illuminate\Support\Collection $this */ | |
return $this->map(fn () => $value); | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment