diff --git a/composer.json b/composer.json index 8af3eb8..ded0e88 100644 --- a/composer.json +++ b/composer.json @@ -21,10 +21,11 @@ } ], "require": { - "php": "^7.3||^8.0", + "php": "^7.4||^8.0", "ext-json": "*", "guzzlehttp/guzzle": "~6||~7", "illuminate/support": "~6||~7||~8", + "laravel/framework": "~6||~7||~8", "illuminate/http": "~6||~7||~8", "symfony/http-foundation": "^4.4.7 || ^5.1", "symfony/psr-http-message-bridge": "^1.0 || ^2.0" diff --git a/src/Authentication.php b/src/Authentication.php index 606d314..c6aed96 100644 --- a/src/Authentication.php +++ b/src/Authentication.php @@ -93,7 +93,7 @@ private function requestNewToken() */ private function cache($accessToken, $expiry) { - $minutes = ($expiry / 60); + $minutes = (int) ($expiry / 60); Cache::store('file')->put($this->cacheKey, $accessToken, now()->addMinutes($minutes)); return Cache::store('file')->get($this->cacheKey); diff --git a/src/Controllers/HumanResourcesEmployeeController.php b/src/Controllers/HumanResourcesEmployeeController.php index e1cb78d..035cfda 100644 --- a/src/Controllers/HumanResourcesEmployeeController.php +++ b/src/Controllers/HumanResourcesEmployeeController.php @@ -12,6 +12,7 @@ use spkm\isams\Endpoint; use spkm\isams\Wrappers\Employee; use spkm\isams\Wrappers\EmployeePhoto; +use Exception; class HumanResourcesEmployeeController extends Endpoint { @@ -129,10 +130,10 @@ public function show(int $id): Employee public function getCurrentPhoto(int $id, int $quality = 75): EmployeePhoto { /** - * At the moment this package doesn't auto-include Intervention, so we need to check for its existance first. + * At the moment this package doesn't auto-include Intervention, so we need to check for its existence first. */ if (! method_exists(ImageManagerStatic::class, 'make')) { - throw new \Exception('This method requires Intervention/Image package.', 500); + throw new Exception('This method requires Intervention/Image package.', 500); } try { diff --git a/src/Controllers/StorageFileController.php b/src/Controllers/StorageFileController.php index a70bacd..dd9070e 100644 --- a/src/Controllers/StorageFileController.php +++ b/src/Controllers/StorageFileController.php @@ -24,7 +24,7 @@ protected function setEndpoint() * * @param string $path * @param string $name - * @return binary|string + * @return mixed * @throws \GuzzleHttp\Exception\GuzzleException */ public function show(string $path, string $name) @@ -42,7 +42,7 @@ public function show(string $path, string $name) * @author Fred Bradley * @param string $path * @param string $name - * @return binary|string + * @return mixed * @throws \GuzzleHttp\Exception\GuzzleException */ public function download(string $path, string $name) diff --git a/src/Endpoint.php b/src/Endpoint.php index 72dc7af..bff823e 100644 --- a/src/Endpoint.php +++ b/src/Endpoint.php @@ -40,7 +40,7 @@ abstract protected function setEndpoint(); /** * Get the School to be queried. * - * @return \spkm\Isams\Contracts\Institution + * @return \spkm\isams\Contracts\Institution */ protected function getInstitution() { diff --git a/src/Wrappers/TeachingSubject.php b/src/Wrappers/TeachingSubject.php index 7413481..6d3ebd4 100644 --- a/src/Wrappers/TeachingSubject.php +++ b/src/Wrappers/TeachingSubject.php @@ -9,6 +9,7 @@ */ class TeachingSubject extends Wrapper { + protected bool $isHidden; /** * Handle the data. *