Fix Pint formatting
This commit is contained in:
@@ -6,9 +6,7 @@ use Illuminate\Support\Facades\Log;
|
||||
|
||||
class StickerPrintService
|
||||
{
|
||||
public function __construct(private StickerQueryService $queryService)
|
||||
{
|
||||
}
|
||||
public function __construct(private StickerQueryService $queryService) {}
|
||||
|
||||
public function generate(array $payload): array
|
||||
{
|
||||
@@ -23,7 +21,7 @@ class StickerPrintService
|
||||
|
||||
if ($studentId > 0) {
|
||||
$student = $this->queryService->findStudent($studentId);
|
||||
if (!$student) {
|
||||
if (! $student) {
|
||||
return ['ok' => false, 'message' => 'Student not found.'];
|
||||
}
|
||||
$students = [$student];
|
||||
@@ -102,7 +100,7 @@ class StickerPrintService
|
||||
$minPt = 8;
|
||||
$hPad = 2;
|
||||
|
||||
$fullName = trim(($student['firstname'] ?? '') . ' ' . ($student['lastname'] ?? '')) ?: 'Student';
|
||||
$fullName = trim(($student['firstname'] ?? '').' '.($student['lastname'] ?? '')) ?: 'Student';
|
||||
|
||||
$bestPt = $maxPt;
|
||||
$textW = 0.0;
|
||||
@@ -158,6 +156,7 @@ class StickerPrintService
|
||||
for ($k = 0; $k < $qty; $k++) {
|
||||
$printList[] = $students[0];
|
||||
}
|
||||
|
||||
return $printList;
|
||||
}
|
||||
|
||||
@@ -221,19 +220,19 @@ class StickerPrintService
|
||||
|| (abs($stickerWidth - 100.0) < 0.6 && abs($stickerHeight - 24.5) < 0.6);
|
||||
|
||||
if ($isXSmallPreset) {
|
||||
if (!$marginLeftProvided) {
|
||||
if (! $marginLeftProvided) {
|
||||
$marginLeft = 4.0;
|
||||
if (!$marginRightProvided) {
|
||||
if (! $marginRightProvided) {
|
||||
$marginRight = 4.0;
|
||||
}
|
||||
}
|
||||
if (!$marginRightProvided && $marginRight < 4.0) {
|
||||
if (! $marginRightProvided && $marginRight < 4.0) {
|
||||
$marginRight = 4.0;
|
||||
}
|
||||
if (!$gapXProvided) {
|
||||
if (! $gapXProvided) {
|
||||
$gapX = 0.0;
|
||||
}
|
||||
if (!$gapYProvided) {
|
||||
if (! $gapYProvided) {
|
||||
$gapY = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user