diff --git a/api/BusinessLogic/Attachments/AttachmentHandler.php b/api/BusinessLogic/Attachments/AttachmentHandler.php index 3a874ae9..08c3d39a 100644 --- a/api/BusinessLogic/Attachments/AttachmentHandler.php +++ b/api/BusinessLogic/Attachments/AttachmentHandler.php @@ -33,7 +33,11 @@ class AttachmentHandler { /* @var $userToTicketChecker UserToTicketChecker */ private $userToTicketChecker; - function __construct($ticketGateway, $attachmentGateway, $fileWriter, $userToTicketChecker, $fileDeleter) { + function __construct(TicketGateway $ticketGateway, + AttachmentGateway $attachmentGateway, + FileWriter $fileWriter, + UserToTicketChecker $userToTicketChecker, + FileDeleter $fileDeleter) { $this->ticketGateway = $ticketGateway; $this->attachmentGateway = $attachmentGateway; $this->fileWriter = $fileWriter; diff --git a/api/BusinessLogic/Categories/CategoryHandler.php b/api/BusinessLogic/Categories/CategoryHandler.php index 8c6c42ca..5a40255a 100644 --- a/api/BusinessLogic/Categories/CategoryHandler.php +++ b/api/BusinessLogic/Categories/CategoryHandler.php @@ -26,7 +26,10 @@ class CategoryHandler { /* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */ private $modsForHeskSettingsGateway; - function __construct($categoryGateway, $ticketGateway, $permissionChecker, $modsForHeskSettingsGateway) { + function __construct(CategoryGateway $categoryGateway, + TicketGateway $ticketGateway, + PermissionChecker $permissionChecker, + ModsForHeskSettingsGateway $modsForHeskSettingsGateway) { $this->categoryGateway = $categoryGateway; $this->ticketGateway = $ticketGateway; $this->permissionChecker = $permissionChecker; diff --git a/api/BusinessLogic/Categories/CategoryRetriever.php b/api/BusinessLogic/Categories/CategoryRetriever.php index 88fa413c..526d9f88 100644 --- a/api/BusinessLogic/Categories/CategoryRetriever.php +++ b/api/BusinessLogic/Categories/CategoryRetriever.php @@ -17,7 +17,8 @@ class CategoryRetriever { */ private $modsForHeskSettingsGateway; - function __construct($categoryGateway, $modsForHeskSettingsGateway) { + function __construct(CategoryGateway $categoryGateway, + ModsForHeskSettingsGateway $modsForHeskSettingsGateway) { $this->categoryGateway = $categoryGateway; $this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway; } diff --git a/api/BusinessLogic/Emails/EmailSenderHelper.php b/api/BusinessLogic/Emails/EmailSenderHelper.php index b02453ab..5c6b23cb 100644 --- a/api/BusinessLogic/Emails/EmailSenderHelper.php +++ b/api/BusinessLogic/Emails/EmailSenderHelper.php @@ -21,7 +21,9 @@ class EmailSenderHelper { */ private $mailgunEmailSender; - function __construct($emailTemplateParser, $basicEmailSender, $mailgunEmailSender) { + function __construct(EmailTemplateParser $emailTemplateParser, + BasicEmailSender $basicEmailSender, + MailgunEmailSender $mailgunEmailSender) { $this->emailTemplateParser = $emailTemplateParser; $this->basicEmailSender = $basicEmailSender; $this->mailgunEmailSender = $mailgunEmailSender; diff --git a/api/BusinessLogic/Emails/EmailTemplateParser.php b/api/BusinessLogic/Emails/EmailTemplateParser.php index e53a03b2..e96db960 100644 --- a/api/BusinessLogic/Emails/EmailTemplateParser.php +++ b/api/BusinessLogic/Emails/EmailTemplateParser.php @@ -35,7 +35,10 @@ class EmailTemplateParser { */ private $emailTemplateRetriever; - function __construct($statusGateway, $categoryGateway, $userGateway, $emailTemplateRetriever) { + function __construct(StatusGateway $statusGateway, + CategoryGateway $categoryGateway, + UserGateway $userGateway, + EmailTemplateRetriever $emailTemplateRetriever) { $this->statusGateway = $statusGateway; $this->categoryGateway = $categoryGateway; $this->userGateway = $userGateway; @@ -50,6 +53,7 @@ class EmailTemplateParser { * @param $modsForHeskSettings array * @return ParsedEmailProperties * @throws InvalidEmailTemplateException + * @throws \Exception */ function getFormattedEmailForLanguage($templateId, $languageCode, $ticket, $heskSettings, $modsForHeskSettings) { global $hesklang; diff --git a/api/BusinessLogic/Emails/ParsedEmailProperties.php b/api/BusinessLogic/Emails/ParsedEmailProperties.php index 5cbe594f..a0421bca 100644 --- a/api/BusinessLogic/Emails/ParsedEmailProperties.php +++ b/api/BusinessLogic/Emails/ParsedEmailProperties.php @@ -1,10 +1,4 @@ customNavElementGateway = $customNavElementGateway; } diff --git a/api/BusinessLogic/Security/BanRetriever.php b/api/BusinessLogic/Security/BanRetriever.php index e44fa344..66213cf5 100644 --- a/api/BusinessLogic/Security/BanRetriever.php +++ b/api/BusinessLogic/Security/BanRetriever.php @@ -11,7 +11,7 @@ class BanRetriever { */ private $banGateway; - function __construct($banGateway) { + function __construct(BanGateway $banGateway) { $this->banGateway = $banGateway; } diff --git a/api/BusinessLogic/Security/UserContextBuilder.php b/api/BusinessLogic/Security/UserContextBuilder.php index 65c4972e..7bb975ee 100644 --- a/api/BusinessLogic/Security/UserContextBuilder.php +++ b/api/BusinessLogic/Security/UserContextBuilder.php @@ -14,7 +14,7 @@ class UserContextBuilder { */ private $userGateway; - function __construct($userGateway) { + function __construct(UserGateway $userGateway) { $this->userGateway = $userGateway; } diff --git a/api/BusinessLogic/Security/UserToTicketChecker.php b/api/BusinessLogic/Security/UserToTicketChecker.php index 3da75192..9a2f9c90 100644 --- a/api/BusinessLogic/Security/UserToTicketChecker.php +++ b/api/BusinessLogic/Security/UserToTicketChecker.php @@ -10,7 +10,7 @@ class UserToTicketChecker { /* @var $userGateway UserGateway */ private $userGateway; - function __construct($userGateway) { + function __construct(UserGateway $userGateway) { $this->userGateway = $userGateway; } diff --git a/api/BusinessLogic/Settings/ApiChecker.php b/api/BusinessLogic/Settings/ApiChecker.php index 863a6e06..8645dd5c 100644 --- a/api/BusinessLogic/Settings/ApiChecker.php +++ b/api/BusinessLogic/Settings/ApiChecker.php @@ -9,7 +9,7 @@ class ApiChecker { /* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */ private $modsForHeskSettingsGateway; - function __construct($modsForHeskSettingsGateway) { + function __construct(ModsForHeskSettingsGateway $modsForHeskSettingsGateway) { $this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway; } diff --git a/api/BusinessLogic/Settings/SettingsRetriever.php b/api/BusinessLogic/Settings/SettingsRetriever.php index e8db0e48..21eeb13a 100644 --- a/api/BusinessLogic/Settings/SettingsRetriever.php +++ b/api/BusinessLogic/Settings/SettingsRetriever.php @@ -9,7 +9,7 @@ class SettingsRetriever { /* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */ private $modsForHeskSettingsGateway; - function __construct($modsForHeskSettingsGateway) { + function __construct(ModsForHeskSettingsGateway $modsForHeskSettingsGateway) { $this->modsForHeskSettingsGateway = $modsForHeskSettingsGateway; } diff --git a/api/BusinessLogic/Statuses/StatusRetriever.php b/api/BusinessLogic/Statuses/StatusRetriever.php index 0bcfe844..181ceae1 100644 --- a/api/BusinessLogic/Statuses/StatusRetriever.php +++ b/api/BusinessLogic/Statuses/StatusRetriever.php @@ -10,7 +10,7 @@ class StatusRetriever { /* @var $statusGateway StatusGateway */ private $statusGateway; - function __construct($statusGateway) { + function __construct(StatusGateway $statusGateway) { $this->statusGateway = $statusGateway; } diff --git a/api/BusinessLogic/Tickets/Autoassigner.php b/api/BusinessLogic/Tickets/Autoassigner.php index 49723095..e4095815 100644 --- a/api/BusinessLogic/Tickets/Autoassigner.php +++ b/api/BusinessLogic/Tickets/Autoassigner.php @@ -15,7 +15,8 @@ class Autoassigner { /* @var $userGateway UserGateway */ private $userGateway; - function __construct($categoryGateway, $userGateway) { + function __construct(CategoryGateway $categoryGateway, + UserGateway $userGateway) { $this->categoryGateway = $categoryGateway; $this->userGateway = $userGateway; } diff --git a/api/BusinessLogic/Tickets/NewTicketValidator.php b/api/BusinessLogic/Tickets/NewTicketValidator.php index bb80a1f8..7697f860 100644 --- a/api/BusinessLogic/Tickets/NewTicketValidator.php +++ b/api/BusinessLogic/Tickets/NewTicketValidator.php @@ -24,7 +24,9 @@ class NewTicketValidator { */ private $ticketValidators; - function __construct($categoryRetriever, $banRetriever, $ticketValidators) { + function __construct(CategoryRetriever $categoryRetriever, + BanRetriever $banRetriever, + TicketValidators $ticketValidators) { $this->categoryRetriever = $categoryRetriever; $this->banRetriever = $banRetriever; $this->ticketValidators = $ticketValidators; diff --git a/api/BusinessLogic/Tickets/TicketCreator.php b/api/BusinessLogic/Tickets/TicketCreator.php index 245da2a1..d9e8c346 100644 --- a/api/BusinessLogic/Tickets/TicketCreator.php +++ b/api/BusinessLogic/Tickets/TicketCreator.php @@ -56,8 +56,15 @@ class TicketCreator { /* @var $modsForHeskSettingsGateway ModsForHeskSettingsGateway */ private $modsForHeskSettingsGateway; - function __construct($newTicketValidator, $trackingIdGenerator, $autoassigner, $statusGateway, $ticketGateway, - $verifiedEmailChecker, $emailSenderHelper, $userGateway, $modsForHeskSettingsGateway) { + function __construct(NewTicketValidator $newTicketValidator, + TrackingIdGenerator $trackingIdGenerator, + Autoassigner $autoassigner, + StatusGateway $statusGateway, + TicketGateway $ticketGateway, + VerifiedEmailChecker $verifiedEmailChecker, + EmailSenderHelper $emailSenderHelper, + UserGateway $userGateway, + ModsForHeskSettingsGateway $modsForHeskSettingsGateway) { $this->newTicketValidator = $newTicketValidator; $this->trackingIdGenerator = $trackingIdGenerator; $this->autoassigner = $autoassigner; diff --git a/api/BusinessLogic/Tickets/TicketDeleter.php b/api/BusinessLogic/Tickets/TicketDeleter.php index fde51ee7..7d1fa4d9 100644 --- a/api/BusinessLogic/Tickets/TicketDeleter.php +++ b/api/BusinessLogic/Tickets/TicketDeleter.php @@ -20,7 +20,9 @@ class TicketDeleter { /* @var $attachmentHandler AttachmentHandler */ private $attachmentHandler; - function __construct($ticketGateway, $userToTicketChecker, $attachmentHandler) { + function __construct(TicketGateway $ticketGateway, + UserToTicketChecker $userToTicketChecker, + AttachmentHandler $attachmentHandler) { $this->ticketGateway = $ticketGateway; $this->userToTicketChecker = $userToTicketChecker; $this->attachmentHandler = $attachmentHandler; diff --git a/api/BusinessLogic/Tickets/TicketEditor.php b/api/BusinessLogic/Tickets/TicketEditor.php index a5fe9774..ac0bca61 100644 --- a/api/BusinessLogic/Tickets/TicketEditor.php +++ b/api/BusinessLogic/Tickets/TicketEditor.php @@ -22,7 +22,8 @@ class TicketEditor { /* @var $userToTicketChecker UserToTicketChecker */ private $userToTicketChecker; - function __construct($ticketGateway, $userToTicketChecker) { + function __construct(TicketGateway $ticketGateway, + UserToTicketChecker $userToTicketChecker) { $this->ticketGateway = $ticketGateway; $this->userToTicketChecker = $userToTicketChecker; } diff --git a/api/BusinessLogic/Tickets/TicketRetriever.php b/api/BusinessLogic/Tickets/TicketRetriever.php index 5a237a98..569210ef 100644 --- a/api/BusinessLogic/Tickets/TicketRetriever.php +++ b/api/BusinessLogic/Tickets/TicketRetriever.php @@ -19,7 +19,8 @@ class TicketRetriever { /* @var $userToTicketChecker UserToTicketChecker */ private $userToTicketChecker; - function __construct($ticketGateway, $userToTicketChecker) { + function __construct(TicketGateway $ticketGateway, + UserToTicketChecker $userToTicketChecker) { $this->ticketGateway = $ticketGateway; $this->userToTicketChecker = $userToTicketChecker; } diff --git a/api/BusinessLogic/Tickets/TicketValidators.php b/api/BusinessLogic/Tickets/TicketValidators.php index 15a53bb3..ff310757 100644 --- a/api/BusinessLogic/Tickets/TicketValidators.php +++ b/api/BusinessLogic/Tickets/TicketValidators.php @@ -10,7 +10,7 @@ class TicketValidators { */ private $ticketGateway; - function __construct($ticketGateway) { + function __construct(TicketGateway $ticketGateway) { $this->ticketGateway = $ticketGateway; } diff --git a/api/BusinessLogic/Tickets/TrackingIdGenerator.php b/api/BusinessLogic/Tickets/TrackingIdGenerator.php index 623ab1fe..892953e5 100644 --- a/api/BusinessLogic/Tickets/TrackingIdGenerator.php +++ b/api/BusinessLogic/Tickets/TrackingIdGenerator.php @@ -12,7 +12,7 @@ class TrackingIdGenerator { */ private $ticketGateway; - function __construct($ticketGateway) { + function __construct(TicketGateway $ticketGateway) { $this->ticketGateway = $ticketGateway; } diff --git a/api/BusinessLogic/Tickets/VerifiedEmailChecker.php b/api/BusinessLogic/Tickets/VerifiedEmailChecker.php index fccb32fc..3846fbc3 100644 --- a/api/BusinessLogic/Tickets/VerifiedEmailChecker.php +++ b/api/BusinessLogic/Tickets/VerifiedEmailChecker.php @@ -17,7 +17,7 @@ class VerifiedEmailChecker { */ private $verifiedEmailGateway; - function __construct($verifiedEmailGateway) { + function __construct(VerifiedEmailGateway $verifiedEmailGateway) { $this->verifiedEmailGateway = $verifiedEmailGateway; }