Skip to content

Commit 39e1221

Browse files
committed
refactor: code style and smell
1 parent 0249907 commit 39e1221

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
}
2222
],
2323
"require": {
24-
"php": "^7.3||^8.0",
24+
"php": "^7.4||^8.0",
2525
"ext-json": "*",
2626
"guzzlehttp/guzzle": "~6||~7",
2727
"illuminate/support": "~6||~7||~8",
28+
"laravel/framework": "~6||~7||~8",
2829
"illuminate/http": "~6||~7||~8",
2930
"symfony/http-foundation": "^4.4.7 || ^5.1",
3031
"symfony/psr-http-message-bridge": "^1.0 || ^2.0"

src/Authentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private function requestNewToken()
9393
*/
9494
private function cache($accessToken, $expiry)
9595
{
96-
$minutes = ($expiry / 60);
96+
$minutes = (int) ($expiry / 60);
9797
Cache::store('file')->put($this->cacheKey, $accessToken, now()->addMinutes($minutes));
9898

9999
return Cache::store('file')->get($this->cacheKey);

src/Controllers/HumanResourcesEmployeeController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use spkm\isams\Endpoint;
1313
use spkm\isams\Wrappers\Employee;
1414
use spkm\isams\Wrappers\EmployeePhoto;
15+
use Exception;
1516

1617
class HumanResourcesEmployeeController extends Endpoint
1718
{
@@ -129,10 +130,10 @@ public function show(int $id): Employee
129130
public function getCurrentPhoto(int $id, int $quality = 75): EmployeePhoto
130131
{
131132
/**
132-
* At the moment this package doesn't auto-include Intervention, so we need to check for its existance first.
133+
* At the moment this package doesn't auto-include Intervention, so we need to check for its existence first.
133134
*/
134135
if (! method_exists(ImageManagerStatic::class, 'make')) {
135-
throw new \Exception('This method requires Intervention/Image package.', 500);
136+
throw new Exception('This method requires Intervention/Image package.', 500);
136137
}
137138

138139
try {

src/Controllers/StorageFileController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function setEndpoint()
2424
*
2525
* @param string $path
2626
* @param string $name
27-
* @return binary|string
27+
* @return mixed
2828
* @throws \GuzzleHttp\Exception\GuzzleException
2929
*/
3030
public function show(string $path, string $name)
@@ -42,7 +42,7 @@ public function show(string $path, string $name)
4242
* @author Fred Bradley <frb@cranleigh.org>
4343
* @param string $path
4444
* @param string $name
45-
* @return binary|string
45+
* @return mixed
4646
* @throws \GuzzleHttp\Exception\GuzzleException
4747
*/
4848
public function download(string $path, string $name)

src/Endpoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract protected function setEndpoint();
4040
/**
4141
* Get the School to be queried.
4242
*
43-
* @return \spkm\Isams\Contracts\Institution
43+
* @return \spkm\isams\Contracts\Institution
4444
*/
4545
protected function getInstitution()
4646
{

src/Wrappers/TeachingSubject.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
class TeachingSubject extends Wrapper
1111
{
12+
protected bool $isHidden;
1213
/**
1314
* Handle the data.
1415
*

0 commit comments

Comments
 (0)