BRAIN-43 - application tests #193
php.yml
on: pull_request
ecs
13s
phpstan
25s
phpunit-unit
17s
phpunit-integration
23s
phpunit-application
21s
infection
50s
doctrine
18s
Annotations
10 warnings
infection:
src/Braintree/Payment/OrderInformationService.php#L23
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
}
public function extractTaxAmount(PaymentPayAction $payment): float
{
- return \round($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()), 2);
+ return \round($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()), 1);
}
public function extractShippingTaxAmount(PaymentPayAction $payment): float
{
|
infection:
src/Braintree/Payment/OrderInformationService.php#L23
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
}
public function extractTaxAmount(PaymentPayAction $payment): float
{
- return \round($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()), 2);
+ return \round($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()), 3);
}
public function extractShippingTaxAmount(PaymentPayAction $payment): float
{
|
infection:
src/Braintree/Payment/OrderInformationService.php#L23
Escaped Mutant for Mutator "RoundingFamily":
@@ @@
}
public function extractTaxAmount(PaymentPayAction $payment): float
{
- return \round($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()), 2);
+ return ceil($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()));
}
public function extractShippingTaxAmount(PaymentPayAction $payment): float
{
|
infection:
src/Braintree/Payment/OrderInformationService.php#L23
Escaped Mutant for Mutator "RoundingFamily":
@@ @@
}
public function extractTaxAmount(PaymentPayAction $payment): float
{
- return \round($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()), 2);
+ return floor($this->taxService->sumTaxes($payment->orderTransaction->getAmount()->getCalculatedTaxes()));
}
public function extractShippingTaxAmount(PaymentPayAction $payment): float
{
|
infection:
src/Command/ManifestGenerateCommand.php#L35
Escaped Mutant for Mutator "LogicalOr":
@@ @@
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
- if ($this->appUrl === null || $this->appSecret === null || $this->environment === null || $this->projectDir === null) {
+ if ($this->appUrl === null && $this->appSecret === null || $this->environment === null || $this->projectDir === null) {
$io->error('Missing environment variables');
return Command::FAILURE;
}
|
infection:
src/Command/ManifestGenerateCommand.php#L35
Escaped Mutant for Mutator "LogicalOr":
@@ @@
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
- if ($this->appUrl === null || $this->appSecret === null || $this->environment === null || $this->projectDir === null) {
+ if (($this->appUrl === null || $this->appSecret === null) && $this->environment === null || $this->projectDir === null) {
$io->error('Missing environment variables');
return Command::FAILURE;
}
|
infection:
src/Command/ManifestGenerateCommand.php#L35
Escaped Mutant for Mutator "LogicalOr":
@@ @@
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
- if ($this->appUrl === null || $this->appSecret === null || $this->environment === null || $this->projectDir === null) {
+ if (($this->appUrl === null || $this->appSecret === null || $this->environment === null) && $this->projectDir === null) {
$io->error('Missing environment variables');
return Command::FAILURE;
}
|
infection:
src/Command/ManifestGenerateCommand.php#L41
Escaped Mutant for Mutator "ArrayItemRemoval":
@@ @@
$io->error('Missing environment variables');
return Command::FAILURE;
}
- $manifest = $this->twig->render('manifest.xml.twig', ['appUrl' => $this->environment === 'prod' ? 'https://braintree.shopware.com' : $this->appUrl, 'appSecret' => $this->appSecret, 'isProd' => $this->environment === 'prod']);
+ $manifest = $this->twig->render('manifest.xml.twig', ['appSecret' => $this->appSecret, 'isProd' => $this->environment === 'prod']);
$write = true;
if ($this->manifestExists() && !$input->getOption('force')) {
$write = $io->confirm('manifest.xml already exists. Do you want to overwrite it?', false);
|
infection:
src/Command/ManifestGenerateCommand.php#L42
Escaped Mutant for Mutator "Identical":
@@ @@
$io->error('Missing environment variables');
return Command::FAILURE;
}
- $manifest = $this->twig->render('manifest.xml.twig', ['appUrl' => $this->environment === 'prod' ? 'https://braintree.shopware.com' : $this->appUrl, 'appSecret' => $this->appSecret, 'isProd' => $this->environment === 'prod']);
+ $manifest = $this->twig->render('manifest.xml.twig', ['appUrl' => $this->environment !== 'prod' ? 'https://braintree.shopware.com' : $this->appUrl, 'appSecret' => $this->appSecret, 'isProd' => $this->environment === 'prod']);
$write = true;
if ($this->manifestExists() && !$input->getOption('force')) {
$write = $io->confirm('manifest.xml already exists. Do you want to overwrite it?', false);
|
infection:
src/Command/ManifestGenerateCommand.php#L42
Escaped Mutant for Mutator "Ternary":
@@ @@
$io->error('Missing environment variables');
return Command::FAILURE;
}
- $manifest = $this->twig->render('manifest.xml.twig', ['appUrl' => $this->environment === 'prod' ? 'https://braintree.shopware.com' : $this->appUrl, 'appSecret' => $this->appSecret, 'isProd' => $this->environment === 'prod']);
+ $manifest = $this->twig->render('manifest.xml.twig', ['appUrl' => $this->environment === 'prod' ? $this->appUrl : 'https://braintree.shopware.com', 'appSecret' => $this->appSecret, 'isProd' => $this->environment === 'prod']);
$write = true;
if ($this->manifestExists() && !$input->getOption('force')) {
$write = $io->confirm('manifest.xml already exists. Do you want to overwrite it?', false);
|