Skip to content

Commit

Permalink
FIXED Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rexchoppers committed Oct 12, 2022
1 parent 7aad523 commit 2330b8f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/Http/Controllers/DecodeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@

use Dmtx\Reader;
use Exception;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Labelary\Client;
use Laravel\Lumen\Routing\Controller as BaseController;

class DecodeController extends BaseController
{
public function isBase64Encoded($data)
public function isBase64Encoded($data): bool
{
if (preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $data)) {
return true;
Expand All @@ -19,7 +20,8 @@ public function isBase64Encoded($data)
}
}

public function generateName() {
public function generateName(): string
{
$length = 10;
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

Expand All @@ -33,7 +35,8 @@ public function generateName() {
return $randomString;
}

public function decode(Request $request) {
public function decode(Request $request): JsonResponse
{
$label = $request->all();

if(!array_key_exists('label', $label)) {
Expand Down

0 comments on commit 2330b8f

Please sign in to comment.