Skip to content

Commit

Permalink
Maintenance Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tomshaw committed Mar 24, 2024
1 parent 0f17930 commit 0b4fbdf
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 54 deletions.
17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.1|^8.2",
"google/apiclient": "2.15.0",
"illuminate/session": "^10.14"
"illuminate/session": "^10.14|^11.0"
},
"require-dev": {
"laravel/pint": "^1.13",
"mockery/mockery": "^1.6",
"nunomaduro/larastan": "^2.6",
"orchestra/testbench": "^8.5",
"pestphp/pest": "^2.23",
"larastan/larastan": "^2.9",
"laravel/pint": "^1.10|^2.0",
"mockery/mockery": "^1.4.4",
"orchestra/testbench": "^8.5|^9.0",
"pestphp/pest": "^2.8|^3.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.4"
"phpunit/phpunit": "^10.1.1|^11.0"
},
"autoload": {
"psr-4": {
Expand All @@ -40,6 +40,7 @@
},
"scripts" : {
"analyse" : "vendor/bin/phpstan analyse",
"baseline": "vendor/bin/phpstan analyse --ansi --memory-limit=-1 --generate-baseline --allow-empty-baseline",
"test" : "vendor/bin/pest",
"format": "vendor/bin/pint --config pint.json"
},
Expand Down
2 changes: 1 addition & 1 deletion phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
parameters:
ignoreErrors:
ignoreErrors: []
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
includes:
- ./vendor/nunomaduro/larastan/extension.neon
- ./vendor/larastan/larastan/extension.neon
- phpstan-baseline.neon

parameters:
Expand Down
32 changes: 16 additions & 16 deletions src/Api/GoogleCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public function __construct(
/**
* Lists events from a calendar.
*
* @param int $maxResults The maximum number of events to return. Default is 10.
* @param string $orderBy The order of the events returned in the result. Default is 'startTime'.
* @param bool $singleEvents Whether to expand recurring events into instances and only return single one-off events and instances of recurring events. Default is true.
* @param int $maxResults The maximum number of events to return. Default is 10.
* @param string $orderBy The order of the events returned in the result. Default is 'startTime'.
* @param bool $singleEvents Whether to expand recurring events into instances and only return single one-off events and instances of recurring events. Default is true.
* @return Events Returns an Events object containing the list of events.
*
* @throws \Google\Exception Throws a Google Exception if the API request fails.
Expand All @@ -64,11 +64,11 @@ public function listEvents(int $maxResults = 10, string $orderBy = 'startTime',
/**
* Adds an event.
*
* @param string $summary The summary of the event.
* @param string $location The location of the event.
* @param string $from The start time of the event.
* @param string $to The end time of the event.
* @param string $description The description of the event (optional).
* @param string $summary The summary of the event.
* @param string $location The location of the event.
* @param string $from The start time of the event.
* @param string $to The end time of the event.
* @param string $description The description of the event (optional).
* @return Event The added event.
*/
public function addEvent(string $summary, string $location, string $from, string $to, string $description = ''): Event
Expand All @@ -92,12 +92,12 @@ public function addEvent(string $summary, string $location, string $from, string
/**
* Updates an event.
*
* @param string $eventId The ID of the event to update.
* @param string $summary The summary of the event.
* @param string $location The location of the event.
* @param string $from The start time of the event.
* @param string $to The end time of the event.
* @param string $description The description of the event (optional).
* @param string $eventId The ID of the event to update.
* @param string $summary The summary of the event.
* @param string $location The location of the event.
* @param string $from The start time of the event.
* @param string $to The end time of the event.
* @param string $description The description of the event (optional).
* @return Event The updated event.
*/
public function updateEvent(string $eventId, string $summary, string $location, string $from, string $to, string $description = ''): Event
Expand All @@ -121,8 +121,8 @@ public function updateEvent(string $eventId, string $summary, string $location,
/**
* Deletes an event.
*
* @param string $eventId The ID of the event to delete.
* @param array $optParams Optional parameters.
* @param string $eventId The ID of the event to delete.
* @param array $optParams Optional parameters.
* @return mixed The response from the Calendar API.
*/
public function deleteEvent(string $eventId, array $optParams = []): mixed
Expand Down
38 changes: 19 additions & 19 deletions src/Api/GoogleMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
/**
* Sets the 'to' name.
*
* @param string $toName The name to set.
* @param string $toName The name to set.
* @return GoogleMail The current instance.
*/
public function setToName(string $toName): GoogleMail
Expand All @@ -94,7 +94,7 @@ public function getToName(): string
/**
* Sets the 'to' email.
*
* @param string $toEmail The email to set.
* @param string $toEmail The email to set.
* @return GoogleMail The current instance.
*/
public function setToEmail(string $toEmail): GoogleMail
Expand All @@ -117,7 +117,7 @@ public function getToEmail(): string
/**
* Sets the CC list.
*
* @param array $ccList The CC list to set.
* @param array $ccList The CC list to set.
* @return GoogleMail The current instance.
*/
public function setCC(array $ccList = []): GoogleMail
Expand Down Expand Up @@ -156,7 +156,7 @@ public function getCCString(): string
/**
* Sets the 'from' name.
*
* @param string $fromName The name to set.
* @param string $fromName The name to set.
* @return GoogleMail The current instance.
*/
public function setFromName(string $fromName): GoogleMail
Expand All @@ -179,7 +179,7 @@ public function getFromName(): string
/**
* Sets the 'from' email.
*
* @param string $fromEmail The email to set.
* @param string $fromEmail The email to set.
* @return GoogleMail The current instance.
*/
public function setFromEmail(string $fromEmail): GoogleMail
Expand All @@ -202,7 +202,7 @@ public function getFromEmail(): string
/**
* Sets the subject of the email.
*
* @param string $subject The subject to set.
* @param string $subject The subject to set.
* @return GoogleMail The current instance.
*/
public function setSubject(string $subject): GoogleMail
Expand All @@ -225,7 +225,7 @@ public function getSubject(): string
/**
* Sets the message of the email.
*
* @param string $message The message to set.
* @param string $message The message to set.
* @return GoogleMail The current instance.
*/
public function setMessage(string $message): GoogleMail
Expand All @@ -248,7 +248,7 @@ public function getMessage(): string
/**
* Sets both 'to' name and email in one method call.
*
* @param string $email The 'to' email to set.
* @param string $email The 'to' email to set.
* @param string $name The 'to' name to set.
* @return GoogleMail The current instance.
*/
Expand All @@ -263,7 +263,7 @@ public function to(string $email, string $name): GoogleMail
/**
* Sets both 'from' name and email in one method call.
*
* @param string $email The 'from' email to set.
* @param string $email The 'from' email to set.
* @param string $name The 'from' name to set.
* @return GoogleMail The current instance.
*/
Expand All @@ -278,7 +278,7 @@ public function from(string $email, string $name): GoogleMail
/**
* Sets the subject of the email.
*
* @param mixed $subject The subject to set.
* @param mixed $subject The subject to set.
* @return GoogleMail The current instance.
*/
public function subject($subject): GoogleMail
Expand All @@ -291,7 +291,7 @@ public function subject($subject): GoogleMail
/**
* Sets the message of the email.
*
* @param mixed $message The message to set.
* @param mixed $message The message to set.
* @return GoogleMail The current instance.
*/
public function message($message): GoogleMail
Expand All @@ -304,7 +304,7 @@ public function message($message): GoogleMail
/**
* Sets the message of the email using a Mailable instance.
*
* @param Mailable $mailable The Mailable instance.
* @param Mailable $mailable The Mailable instance.
* @return GoogleMail The current instance.
*/
public function mailable(Mailable $mailable): GoogleMail
Expand Down Expand Up @@ -368,13 +368,13 @@ public function send(): Message
/**
* Builds an email message string.
*
* @param string $fromEmail The sender's email address.
* @param string $fromName The sender's name.
* @param string $toEmail The recipient's email address.
* @param string $toName The recipient's name.
* @param string $ccListString The list of CC recipients as a string.
* @param string $subject The subject of the email.
* @param string $message The body of the email.
* @param string $fromEmail The sender's email address.
* @param string $fromName The sender's name.
* @param string $toEmail The recipient's email address.
* @param string $toName The recipient's name.
* @param string $ccListString The list of CC recipients as a string.
* @param string $subject The subject of the email.
* @param string $message The body of the email.
* @return string Returns the built message as a string.
*/
protected function buildMessage(string $fromEmail, string $fromName, string $toEmail, string $toName, string $ccListString, string $subject, string $message): string
Expand Down
18 changes: 9 additions & 9 deletions src/GoogleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getAccessToken(): GoogleToken|Collection|null
/**
* Sets the access token.
*
* @param mixed $accessToken The access token to set.
* @param mixed $accessToken The access token to set.
* @return GoogleToken|bool The new access token, or true if the token was stored in the session.
*/
public function setAccessToken($accessToken): GoogleToken|bool
Expand All @@ -135,7 +135,7 @@ public function setAccessToken($accessToken): GoogleToken|bool
/**
* Fetches an access token with a refresh token.
*
* @param mixed $refreshToken The refresh token to use.
* @param mixed $refreshToken The refresh token to use.
* @return array|bool The new access token, or false on failure.
*
* @throws GoogleClientException If there is an error in the response from the API.
Expand All @@ -156,7 +156,7 @@ public function fetchAccessTokenWithRefreshToken($refreshToken): array|bool
/**
* Fetches an access token with an authorization code.
*
* @param mixed $authCode The authorization code to use.
* @param mixed $authCode The authorization code to use.
* @return array|bool The new access token, or false on failure.
*/
public function fetchAccessTokenWithAuthCode($authCode): array|bool
Expand All @@ -175,12 +175,12 @@ public function fetchAccessTokenWithAuthCode($authCode): array|bool
/**
* Validates the provided access token data.
*
* @param string $accessToken The access token.
* @param string $refreshToken The refresh token.
* @param int $expiresIn The expiration time of the access token, in seconds.
* @param string $scope The scope of the access token.
* @param string $tokenType The type of the token.
* @param int $created The time the token was created, as a Unix timestamp.
* @param string $accessToken The access token.
* @param string $refreshToken The refresh token.
* @param int $expiresIn The expiration time of the access token, in seconds.
* @param string $scope The scope of the access token.
* @param string $tokenType The type of the token.
* @param int $created The time the token was created, as a Unix timestamp.
* @return array The validated data.
*
* @throws GoogleClientException If validation fails.
Expand Down

0 comments on commit 0b4fbdf

Please sign in to comment.