Skip to content

Commit

Permalink
psr12
Browse files Browse the repository at this point in the history
  • Loading branch information
rathorevaibhav committed Jan 9, 2025
1 parent a22c28e commit 44a06bb
Show file tree
Hide file tree
Showing 79 changed files with 173 additions and 96 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use PhpCsFixer\Finder;

$rules = [
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private function createCalendarEvent(ApplicationRound $applicationRound)
$applicationLink = URL::route($route, $applicationRound->application->id);
$description = "<a href='{$applicationLink}'>Application Link</a> for Job role: <a href='{$applicationRound->application->job->link}'>{$applicationRound->application->job->title}</a>";

$event = new CalendarEventService;
$event = new CalendarEventService();

$event->create([
'summary' => $summary,
Expand Down
6 changes: 4 additions & 2 deletions Modules/Client/Entities/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

class Client extends Model
{
use HasHierarchy, HasFactory, Filters;
use HasHierarchy;
use HasFactory;
use Filters;

protected $fillable = ['name', 'key_account_manager_id', 'status', 'is_channel_partner', 'has_departments', 'channel_partner_id', 'parent_organisation_id', 'client_id', 'is_billable'];

Expand Down Expand Up @@ -409,7 +411,7 @@ public function getClientsAttribute()

protected static function booted()
{
static::addGlobalScope(new ClientGlobalScope);
static::addGlobalScope(new ClientGlobalScope());
}

protected static function newFactory()
Expand Down
4 changes: 3 additions & 1 deletion Modules/Client/Http/Controllers/ModuleBaseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@

class ModuleBaseController extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
use AuthorizesRequests;
use DispatchesJobs;
use ValidatesRequests;
}
3 changes: 2 additions & 1 deletion Modules/CodeTrek/Emails/CodeTrekApplicantRoundMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class CodeTrekApplicantRoundMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;
public $applicationRound;
public $codetrekApplicant;

Expand Down
3 changes: 2 additions & 1 deletion Modules/CodeTrek/Emails/CodetrekMailApplicant.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class CodetrekMailApplicant extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;
public $applicant;

/**
Expand Down
3 changes: 2 additions & 1 deletion Modules/CodeTrek/Entities/CodeTrekApplicant.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

class CodeTrekApplicant extends Model
{
use SoftDeletes, HasFactory;
use SoftDeletes;
use HasFactory;
protected $guarded = [];

public function roundDetails()
Expand Down
2 changes: 1 addition & 1 deletion Modules/CodeTrek/Services/CodeTrekRoundDetailService.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function takeAction($data, $id)

public function takeActionApplicantToRound($applicant)
{
$applicationRound = new CodeTrekApplicantRoundDetail;
$applicationRound = new CodeTrekApplicantRoundDetail();
$applicationRound->applicant_id = $applicant->id;
$applicationRound->latest_round_name = $applicant->latest_round_name;
$applicationRound->feedback = null;
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/AppointmentSlotSelectionMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class AppointmentSlotSelectionMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

protected $mailData = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class ApplicantCreateAutoResponder extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* The mail subject.
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/Recruitment/Applicant/NoShow.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

class NoShow extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* Instance of the ApplicationMeta.
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/Recruitment/Applicant/OnHold.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class OnHold extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* The mail subject.
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/Recruitment/Applicant/RoundReviewed.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

class RoundReviewed extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* The ApplicationRound instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

class ScheduledInterviewReminder extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* Instance of the application round for which the applicant needs to be reminded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

class ApplicationHandover extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

public $application;
public $userName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

class CustomApplicationMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;
public $application;
public $mailSubject;
public $mailBody;
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/Recruitment/Application/JobChanged.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

class JobChanged extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* Application instance for which job has changed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

class RoundNotConducted extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* Application instance for which round wasn't conducted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class InterviewerScheduledRoundsReminder extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

/**
* Application rounds scheduled for the user.
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/Recruitment/SendForApproval.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

class SendForApproval extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

public $approver;
public $application;
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/Recruitment/SendOfferLetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

class SendOfferLetter extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

public $application;
public $body;
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/SendHiringMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class SendHiringMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

public $jobHiring;
/**
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/SendJobExpiredMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class SendJobExpiredMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

public $jobsData;
/**
Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/SendPayrollListMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

class SendPayrollListMail extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;
public $toEmail;
public $employeesData;

Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Emails/SendThreshholdFollowUp.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

class SendThreshholdFollowUp extends Mailable
{
use Queueable, SerializesModels;
use Queueable;
use SerializesModels;

public $applications;
public $user;
Expand Down
5 changes: 3 additions & 2 deletions Modules/HR/Entities/Applicant.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

class Applicant extends Model
{
use Notifiable, HasFactory;
use Notifiable;
use HasFactory;

protected $guarded = [];

Expand Down Expand Up @@ -117,7 +118,7 @@ public function hasGraduated()

public function onboard($email, $password, $params = [])
{
$gsuiteUser = new GSuiteUserService;
$gsuiteUser = new GSuiteUserService();
$gsuiteUser->create($this->splitName(), $email, $password, $params);
}

Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Entities/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

class Application extends Model
{
use HasTags,HasFactory;
use HasTags;
use HasFactory;

protected $guarded = ['id'];

Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Entities/ApplicationRound.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

class ApplicationRound extends Model
{
use HasTags, HasCalendarMeetings;
use HasTags;
use HasCalendarMeetings;

public $timestamps = false;

Expand Down
3 changes: 2 additions & 1 deletion Modules/HR/Entities/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

class Job extends Model
{
use SoftDeletes, HasFactory;
use SoftDeletes;
use HasFactory;

protected $fillable = ['opportunity_id', 'title', 'type', 'domain', 'start_date', 'description', 'posted_by', 'link', 'end_date', 'status', 'facebook_post', 'instagram_post', 'twitter_post', 'linkedin_post', 'hr_resource_category_id', 'job_id'];

Expand Down
4 changes: 3 additions & 1 deletion Modules/HR/Events/Recruitment/ApplicantEmailVerified.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

class ApplicantEmailVerified
{
use Dispatchable, InteractsWithSockets, SerializesModels;
use Dispatchable;
use InteractsWithSockets;
use SerializesModels;

public $application;

Expand Down
4 changes: 3 additions & 1 deletion Modules/HR/Events/Recruitment/ApplicationCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

class ApplicationCreated
{
use Dispatchable, InteractsWithSockets, SerializesModels;
use Dispatchable;
use InteractsWithSockets;
use SerializesModels;

public $application;
/**
Expand Down
4 changes: 3 additions & 1 deletion Modules/HR/Events/Recruitment/JobUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

class JobUpdated
{
use Dispatchable, InteractsWithSockets, SerializesModels;
use Dispatchable;
use InteractsWithSockets;
use SerializesModels;

public $job;
public $attr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function index()
public function interviewsIndex(Request $request)
{
$today = today()->toDateString();
$applicationService = new ApplicationService;
$applicationService = new ApplicationService();

$parsedData = $request->query();
$searchCategory = $parsedData['searchValue'] ?? null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@

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

/**
* The number of seconds the job can run before timing out.
Expand Down
5 changes: 4 additions & 1 deletion Modules/HR/Jobs/SendHiringMailJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@

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

public $jobHiring;
/**
Expand Down
2 changes: 1 addition & 1 deletion Modules/HR/Listeners/AppointmentSlotMailSent.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function handle($event)
$applicationRound->scheduledPerson->notify(new RoundMailSentNotification($applicationRound));
}

$applicationMeta = new ApplicationMeta;
$applicationMeta = new ApplicationMeta();
$applicationMeta->hr_application_id = $applicationRound->application->id;
$applicationMeta->key = config('constants.hr.application-meta.keys.custom-mail');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function toMail()
$applicant = $application->applicant;
$job = $application->job;

return (new MailMessage)
return (new MailMessage())
->subject(config('app.name') . ": {$this->applicationRound->round->name} scheduled")
->line('You have been assigned an application round.')
->line("Candidate name: {$applicant->name}")
Expand Down
2 changes: 1 addition & 1 deletion Modules/HR/Notifications/RoundMailSentNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function toMail()
$applicant = $this->applicationRound->application->applicant;
$conductedPerson = $this->applicationRound->getPreviousApplicationRound()->conductedPerson;

return (new MailMessage)
return (new MailMessage())
->subject(config('app.name') . ' – HR application round assigned to you')
->line("{$conductedPerson->name} has assigned you an HR application for {$this->applicationRound->round->name}.")
->line("Candidate name: {$applicant->name}")
Expand Down
Loading

0 comments on commit 44a06bb

Please sign in to comment.