Skip to content

Commit ef7f579

Browse files
committed
Code alignments, formatting
1 parent 09dc09c commit ef7f579

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

app/code/Magento/CustomerGraphQl/Model/Resolver/CustomerUpdate.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Magento\Framework\Encryption\EncryptorInterface as Encryptor;
2121
use Magento\Customer\Model\CustomerRegistry;
2222

23-
2423
/**
2524
* Customers field resolver, used for GraphQL request processing.
2625
*/
@@ -46,11 +45,6 @@ class CustomerUpdate implements ResolverInterface
4645
*/
4746
protected $subscriberFactory;
4847

49-
/**
50-
* @var AuthenticationInterface
51-
*/
52-
private $authentication;
53-
5448
/**
5549
* @var CustomerRegistry
5650
*/
@@ -118,33 +112,27 @@ public function resolve(
118112
if (isset($args['firstname'])) {
119113
$customer->setFirstname($args['firstname']);
120114
}
121-
if (isset($args['lastname'])){
115+
if (isset($args['lastname'])) {
122116
$customer->setLastname($args['lastname']);
123117
}
124118

125119
$customer->setStoreId($this->storeResolver->getCurrentStoreId());
126120
$this->customerRepository->save($customer);
127121

128122
if (isset($args['is_subscribed'])) {
129-
130123
$checkSubscriber = $this->subscriberFactory->create()->loadByCustomerId($context->getUserId());
131-
132124
if ($args['is_subscribed'] === true && !$checkSubscriber->isSubscribed()) {
133125
$this->subscriberFactory->create()->subscribeCustomerById($context->getUserId());
134126
} elseif ($args['is_subscribed'] === false && $checkSubscriber->isSubscribed()) {
135127
$this->subscriberFactory->create()->unsubscribeCustomerById($context->getUserId());
136128
}
137129
}
138130

139-
140131
$data = $args;
141132
$result = function () use ($data) {
142133
return !empty($data) ? $data : [];
143134
};
144135

145136
return $this->valueFactory->create($result);
146-
147-
148137
}
149-
150138
}

app/code/Magento/CustomerGraphQl/etc/schema.graphqls

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,5 @@ type customerItem {
5959
firstname: String
6060
lastname: String
6161
email: String
62-
password: String
6362
is_subscribed: Boolean
6463
}

0 commit comments

Comments
 (0)