Apply code style
This commit is contained in:
@@ -53,7 +53,10 @@ class OCRController extends ApiController
|
|||||||
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128); // more progress info
|
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128); // more progress info
|
||||||
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
|
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
|
||||||
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, function (
|
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, function (
|
||||||
$downloadSize, $downloaded, $uploadSize, $uploaded
|
$downloadSize,
|
||||||
|
$downloaded,
|
||||||
|
$uploadSize,
|
||||||
|
$uploaded
|
||||||
) use ($maxDownloadSize) {
|
) use ($maxDownloadSize) {
|
||||||
return ($downloaded > $maxDownloadSize) ? 1 : 0;
|
return ($downloaded > $maxDownloadSize) ? 1 : 0;
|
||||||
});
|
});
|
||||||
@@ -99,7 +102,6 @@ class OCRController extends ApiController
|
|||||||
$result = '';
|
$result = '';
|
||||||
$img = imagecreatefromstring($curlResult);
|
$img = imagecreatefromstring($curlResult);
|
||||||
if ($img !== false && (($options !== null && imagefilter($img, $filter, $options) === true) || ($options === null && imagefilter($img, $filter) === true))) {
|
if ($img !== false && (($options !== null && imagefilter($img, $filter, $options) === true) || ($options === null && imagefilter($img, $filter) === true))) {
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
imagepng($img);
|
imagepng($img);
|
||||||
$imgData = ob_get_contents();
|
$imgData = ob_get_contents();
|
||||||
@@ -192,7 +194,7 @@ class OCRController extends ApiController
|
|||||||
$command = escapeshellcmd($cmd);
|
$command = escapeshellcmd($cmd);
|
||||||
$output = shell_exec($cmd);
|
$output = shell_exec($cmd);
|
||||||
if ($output !== null && strlen($output) > 0) {
|
if ($output !== null && strlen($output) > 0) {
|
||||||
$output = substr($output, strpos($output, '----------START----------') + 25);
|
$output = substr($output, (strpos($output, '----------START----------') + 25));
|
||||||
} else {
|
} else {
|
||||||
$output = '';
|
$output = '';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ class SubscriptionController extends ApiController
|
|||||||
return $this->respondAsResource(
|
return $this->respondAsResource(
|
||||||
$collection,
|
$collection,
|
||||||
['isCollection' => true,
|
['isCollection' => true,
|
||||||
'appendData' => ['total' => $total]]
|
'appendData' => ['total' => $total]
|
||||||
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class Permission extends Model
|
|||||||
'user',
|
'user',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the User associated with this model
|
* Get the User associated with this model
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
@@ -6,6 +7,7 @@ class ContactFormTest extends TestCase
|
|||||||
{
|
{
|
||||||
use RefreshDatabase;
|
use RefreshDatabase;
|
||||||
|
|
||||||
|
|
||||||
public function testContactForm()
|
public function testContactForm()
|
||||||
{
|
{
|
||||||
$formData = [
|
$formData = [
|
||||||
|
|||||||
Reference in New Issue
Block a user