Apply code style

This commit is contained in:
Shift
2023-05-24 21:36:42 +00:00
parent 41147b26f2
commit c6c639afc2
7 changed files with 38 additions and 32 deletions

View File

@@ -53,7 +53,10 @@ class OCRController extends ApiController
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128); // more progress info
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, function (
$downloadSize, $downloaded, $uploadSize, $uploaded
$downloadSize,
$downloaded,
$uploadSize,
$uploaded
) use ($maxDownloadSize) {
return ($downloaded > $maxDownloadSize) ? 1 : 0;
});
@@ -99,7 +102,6 @@ class OCRController extends ApiController
$result = '';
$img = imagecreatefromstring($curlResult);
if ($img !== false && (($options !== null && imagefilter($img, $filter, $options) === true) || ($options === null && imagefilter($img, $filter) === true))) {
ob_start();
imagepng($img);
$imgData = ob_get_contents();
@@ -192,7 +194,7 @@ class OCRController extends ApiController
$command = escapeshellcmd($cmd);
$output = shell_exec($cmd);
if ($output !== null && strlen($output) > 0) {
$output = substr($output, strpos($output, '----------START----------') + 25);
$output = substr($output, (strpos($output, '----------START----------') + 25));
} else {
$output = '';
}

View File

@@ -35,7 +35,8 @@ class SubscriptionController extends ApiController
return $this->respondAsResource(
$collection,
['isCollection' => true,
'appendData' => ['total' => $total]]
'appendData' => ['total' => $total]
]
);
}

View File

@@ -21,6 +21,7 @@ class Permission extends Model
'user',
];
/**
* Get the User associated with this model
*

View File

@@ -1,4 +1,5 @@
<?php
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
@@ -6,6 +7,7 @@ class ContactFormTest extends TestCase
{
use RefreshDatabase;
public function testContactForm()
{
$formData = [