Merge pull request #6302 from pixelfed/miscClosureUnusedUseV2

Larastan: fix Unused Use - Low risk
pull/6311/head^2
dansup 11 months ago committed by GitHub
commit 14d5fe940e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -117,7 +117,7 @@ trait Instagram
$data->save();
});
}
DB::transaction(function() use ($profile, $job) {
DB::transaction(function() use ($job) {
$job->stage = 2;
$job->save();
});

@ -203,7 +203,7 @@ class PortfolioController extends Controller
->pluck('status_id');
});
return $media->map(function($sid) use($id) {
return $media->map(function($sid) {
return StatusService::get($sid);
})
->filter(function($post) {

@ -125,7 +125,7 @@ class SeasonalController extends Controller
];
});
$res = Cache::remember($userKey, $userTtl, function() use($uid, $pid, $epochStart, $epochEnd, $request) {
$res = Cache::remember($userKey, $userTtl, function() use($pid, $epochStart, $epochEnd, $request) {
return [
'account' => [
'user_id' => $request->user()->id,

@ -87,7 +87,7 @@ class ImageS3UploadPipeline implements ShouldQueue
protected function handleResilientStore($storagePath, $path, $name)
{
$attempts = 0;
return retry(4, function() use($storagePath, $path, $name, $attempts) {
return retry(4, function() use($storagePath, $path, $name) {
self::$attempts++;
usleep(100000);
$baseDisk = self::$attempts > 1 ? $this->getAltDriver() : config('filesystems.cloud');

@ -85,7 +85,7 @@ class ImportInstagram implements ShouldQueue
}
DB::transaction(function() use(
$fs, $job, $profile, $caption, $taken_at, $filename,
$fs, $profile, $caption, $taken_at, $filename,
$monthHash, $userHash, $importData
) {
$status = new Status();

@ -28,7 +28,7 @@ class GroupService
$res = Cache::remember(
self::key($id),
1209600,
function() use($id, $pid) {
function() use($id) {
$group = (new Group)->withoutRelations()->whereNull('status')->find($id);
if(!$group) {

@ -35,7 +35,7 @@ class ResilientMediaStorageService
public static function handleResilientStore($storagePath, $path, $name)
{
$attempts = 0;
return retry(4, function() use($storagePath, $path, $name, $attempts) {
return retry(4, function() use($storagePath, $path, $name) {
self::$attempts++;
usleep(100000);
$baseDisk = self::$attempts > 1 ? self::getAltDriver() : config('filesystems.cloud');

Loading…
Cancel
Save