Skip to content

Commit 6c94e73

Browse files
authored
Merge pull request #2749 from aragon999/chore/phpstan-1.11.11
chore(deps-dev): bump phpstan/phpstan from 1.11.9 to 1.11.11
2 parents dea39cc + 5986a84 commit 6c94e73

File tree

4 files changed

+24
-29
lines changed

4 files changed

+24
-29
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"friends-of-behat/mink-extension": "2.7.5",
113113
"php-parallel-lint/php-var-dump-check": "^0.5",
114114
"phpstan/extension-installer": "1.4.1",
115-
"phpstan/phpstan": "1.11.9",
115+
"phpstan/phpstan": "1.11.11",
116116
"phpstan/phpstan-doctrine": "1.5.0",
117117
"phpstan/phpstan-phpunit": "1.4.0",
118118
"phpstan/phpstan-symfony": "1.4.8",

composer.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

engine/Shopware/Controllers/Backend/Export.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,8 @@ public function getWhitelistedCSRFActions()
123123
private function generateExport($output)
124124
{
125125
$outputHandle = fopen($output, 'w');
126-
127-
if (!\is_resource($outputHandle)) {
128-
throw new RuntimeException(sprintf('Output file %s can not be opened', $outputHandle));
126+
if ($outputHandle === false) {
127+
throw new RuntimeException(sprintf('Output file %s can not be opened', $output));
129128
}
130129

131130
$this->export->sSmarty = $this->View()->Engine();

tests/Functional/Bundle/CustomerSearchBundleDBAL/TestCase.php

+15-19
Original file line numberDiff line numberDiff line change
@@ -126,20 +126,18 @@ protected function createCustomer(array $customer)
126126
unset($customerData['addresses'], $customerData['orders'], $customerData['newsletter']);
127127
$customerId = $this->insert('s_user', $customerData);
128128

129-
if (\array_key_exists('addresses', $customer)) {
130-
foreach ($customer['addresses'] as $address) {
131-
$address['user_id'] = $customerId;
132-
$addressId = $this->insert('s_user_addresses', $address);
133-
134-
$this->connection->update(
135-
's_user',
136-
[
137-
'default_billing_address_id' => $addressId,
138-
'default_shipping_address_id' => $addressId,
139-
],
140-
['id' => $customerId]
141-
);
142-
}
129+
foreach ($customer['addresses'] as $address) {
130+
$address['user_id'] = $customerId;
131+
$addressId = $this->insert('s_user_addresses', $address);
132+
133+
$this->connection->update(
134+
's_user',
135+
[
136+
'default_billing_address_id' => $addressId,
137+
'default_shipping_address_id' => $addressId,
138+
],
139+
['id' => $customerId]
140+
);
143141
}
144142

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

162-
if (\array_key_exists('details', $order)) {
163-
foreach ($order['details'] as $detail) {
164-
$detail['orderID'] = $orderId;
165-
$this->insert('s_order_details', $detail);
166-
}
160+
foreach ($order['details'] as $detail) {
161+
$detail['orderID'] = $orderId;
162+
$this->insert('s_order_details', $detail);
167163
}
168164
}
169165
}

0 commit comments

Comments
 (0)