<commit_before><?php

declare(strict_types=1);

// phpcs:disable SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint

namespace App\Jobs;

use App\Team;
use App\User;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class NoAttendanceJediPush implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle(): void
    {
        $users = User::active()->whereDoesntHave('attendance', static function (Builder $query) {
            $query->where('attendable_type', Team::class)->where('created_at', '>', now()->startOfDay()->subDays(28));
        });
        foreach ($users as $user) {
            PushToJedi::dispatch($user, self::class, -1, 'no_attendance')->onQueue('jedi');
        }
    }
}
<commit_msg>Require users to be access active, not active<commit_after><?php

declare(strict_types=1);

// phpcs:disable SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint

namespace App\Jobs;

use App\Team;
use App\User;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class NoAttendanceJediPush implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle(): void
    {
        $users = User::accessActive()->whereDoesntHave('attendance', static function (Builder $query) {
            $query->where('attendable_type', Team::class)->where('created_at', '>', now()->startOfDay()->subDays(28));
        });
        foreach ($users as $user) {
            PushToJedi::dispatch($user, self::class, -1, 'no_attendance')->onQueue('jedi');
        }
    }
}

{'fraction_non_alphanumeric': 0.1314312441534144, 'fraction_numerical': 0.0037418147801683817, 'mean_word_length': 4.044811320754717, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4491404', 'n_tokens_mistral': 648, 'n_tokens_neox': 669, 'n_words': 121}