mirror of
https://github.com/Karaka-Management/oms-Billing.git
synced 2026-02-09 04:48:42 +00:00
rector fixes
This commit is contained in:
parent
b411168594
commit
af04b82068
|
|
@ -141,9 +141,9 @@ final class Installer extends InstallerAbstract
|
|||
continue;
|
||||
}
|
||||
|
||||
$billAttrType[$attribute['name']] = !\is_array($responseData['response'])
|
||||
? $responseData['response']->toArray()
|
||||
: $responseData['response'];
|
||||
$billAttrType[$attribute['name']] = \is_array($responseData['response'])
|
||||
? $responseData['response']
|
||||
: $responseData['response']->toArray();
|
||||
|
||||
$isFirst = true;
|
||||
foreach ($attribute['l11n'] as $language => $l11n) {
|
||||
|
|
@ -212,9 +212,9 @@ final class Installer extends InstallerAbstract
|
|||
continue;
|
||||
}
|
||||
|
||||
$attrValue = !\is_array($responseData['response'])
|
||||
? $responseData['response']->toArray()
|
||||
: $responseData['response'];
|
||||
$attrValue = \is_array($responseData['response'])
|
||||
? $responseData['response']
|
||||
: $responseData['response']->toArray();
|
||||
|
||||
$billAttrValue[$attribute['name']][] = $attrValue;
|
||||
|
||||
|
|
@ -298,9 +298,9 @@ final class Installer extends InstallerAbstract
|
|||
continue;
|
||||
}
|
||||
|
||||
$result = !\is_array($responseData['response'])
|
||||
? $responseData['response']->toArray()
|
||||
: $responseData['response'];
|
||||
$result = \is_array($responseData['response'])
|
||||
? $responseData['response']
|
||||
: $responseData['response']->toArray();
|
||||
|
||||
$results[] = $result;
|
||||
}
|
||||
|
|
@ -350,9 +350,9 @@ final class Installer extends InstallerAbstract
|
|||
continue;
|
||||
}
|
||||
|
||||
$billType = !\is_array($responseData['response'])
|
||||
? $responseData['response']->toArray()
|
||||
: $responseData['response'];
|
||||
$billType = \is_array($responseData['response'])
|
||||
? $responseData['response']
|
||||
: $responseData['response']->toArray();
|
||||
|
||||
$billTypes[] = $billType;
|
||||
|
||||
|
|
|
|||
|
|
@ -321,14 +321,12 @@ final class ApiBillController extends Controller
|
|||
$taxCode = $this->app->moduleManager->get('Billing', 'ApiTax')
|
||||
->getTaxCodeFromClientItem($client, $item, $request->header->l11n->country);
|
||||
|
||||
$element = BillElement::fromItem(
|
||||
return BillElement::fromItem(
|
||||
$item,
|
||||
$taxCode,
|
||||
$request->getDataInt('quantity') ?? 1,
|
||||
$bill->id
|
||||
);
|
||||
|
||||
return $element;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ $archive = $bill->getFileByTypeName('original');
|
|||
$logs = $this->data['logs'] ?? [];
|
||||
|
||||
$editable = $bill->id === 0 || \in_array($bill->getStatus(), [BillStatus::DRAFT, BillStatus::UNPARSED]);
|
||||
$disabled = !$editable ? ' disabled' : '';
|
||||
$disabled = $editable ? '' : ' disabled';
|
||||
|
||||
echo $this->data['nav']->render(); ?>
|
||||
|
||||
|
|
|
|||
|
|
@ -171,11 +171,11 @@ echo $this->data['nav']->render(); ?>
|
|||
?>"><?= $value->billAddress; ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->billZip; ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->billCity; ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= !empty($value->billCountry)
|
||||
? ISO3166NameEnum::getByName(
|
||||
<td><a href="<?= $url; ?>"><?= empty($value->billCountry)
|
||||
? ''
|
||||
: ISO3166NameEnum::getByName(
|
||||
ISO3166TwoEnum::getName($value->billCountry)
|
||||
)
|
||||
: ''; ?></a>
|
||||
); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->grossCosts->getAmount(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->billDate?->format('Y-m-d'); ?></a>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ function phpServe() : void
|
|||
|
||||
// Execute the command and store the process ID
|
||||
$output = [];
|
||||
echo \sprintf('Starting server...') . \PHP_EOL;
|
||||
echo 'Starting server...' . \PHP_EOL;
|
||||
echo \sprintf(' Current directory: %s', \getcwd()) . \PHP_EOL;
|
||||
echo \sprintf(' %s', $command);
|
||||
\exec($command, $output);
|
||||
|
|
@ -406,7 +406,7 @@ function phpServe() : void
|
|||
|
||||
// Kill the web server when the process ends
|
||||
\register_shutdown_function(function() use ($killCommand, $pid) : void {
|
||||
echo \PHP_EOL . \sprintf('Stopping server...') . \PHP_EOL;
|
||||
echo \PHP_EOL . 'Stopping server...' . \PHP_EOL;
|
||||
echo \sprintf(' %s - Killing process with ID %d', \date('r'), $pid) . \PHP_EOL;
|
||||
\exec($killCommand . $pid);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user