Skip to content

Commit

Permalink
Merge pull request #2749 from aragon999/chore/phpstan-1.11.11
Browse files Browse the repository at this point in the history
chore(deps-dev): bump phpstan/phpstan from 1.11.9 to 1.11.11
  • Loading branch information
aragon999 authored Aug 26, 2024
2 parents dea39cc + 5986a84 commit 6c94e73
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 29 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"friends-of-behat/mink-extension": "2.7.5",
"php-parallel-lint/php-var-dump-check": "^0.5",
"phpstan/extension-installer": "1.4.1",
"phpstan/phpstan": "1.11.9",
"phpstan/phpstan": "1.11.11",
"phpstan/phpstan-doctrine": "1.5.0",
"phpstan/phpstan-phpunit": "1.4.0",
"phpstan/phpstan-symfony": "1.4.8",
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions engine/Shopware/Controllers/Backend/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ public function getWhitelistedCSRFActions()
private function generateExport($output)
{
$outputHandle = fopen($output, 'w');

if (!\is_resource($outputHandle)) {
throw new RuntimeException(sprintf('Output file %s can not be opened', $outputHandle));
if ($outputHandle === false) {
throw new RuntimeException(sprintf('Output file %s can not be opened', $output));
}

$this->export->sSmarty = $this->View()->Engine();
Expand Down
34 changes: 15 additions & 19 deletions tests/Functional/Bundle/CustomerSearchBundleDBAL/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,18 @@ protected function createCustomer(array $customer)
unset($customerData['addresses'], $customerData['orders'], $customerData['newsletter']);
$customerId = $this->insert('s_user', $customerData);

if (\array_key_exists('addresses', $customer)) {
foreach ($customer['addresses'] as $address) {
$address['user_id'] = $customerId;
$addressId = $this->insert('s_user_addresses', $address);

$this->connection->update(
's_user',
[
'default_billing_address_id' => $addressId,
'default_shipping_address_id' => $addressId,
],
['id' => $customerId]
);
}
foreach ($customer['addresses'] as $address) {
$address['user_id'] = $customerId;
$addressId = $this->insert('s_user_addresses', $address);

$this->connection->update(
's_user',
[
'default_billing_address_id' => $addressId,
'default_shipping_address_id' => $addressId,
],
['id' => $customerId]
);
}

if (\array_key_exists('orders', $customer)) {
Expand All @@ -159,11 +157,9 @@ protected function createCustomer(array $customer)
$order['userID'] = $customerId;
$orderId = $this->insert('s_order', $order);

if (\array_key_exists('details', $order)) {
foreach ($order['details'] as $detail) {
$detail['orderID'] = $orderId;
$this->insert('s_order_details', $detail);
}
foreach ($order['details'] as $detail) {
$detail['orderID'] = $orderId;
$this->insert('s_order_details', $detail);
}
}
}
Expand Down

0 comments on commit 6c94e73

Please sign in to comment.