Skip to content

Commit 75f28a5

Browse files
authored
Remove entity save on config form (#1149)
* Remove entity save on config form * Removed save() not seeded after set() * Fixes PHP CS issue - Generic.Strings.UnnecessaryStringConcat.Found
1 parent fb6498d commit 75f28a5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Form/AuthenticationForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public function save(array $form, FormStateInterface $form_state) {
184184
$status = parent::save($form, $form_state);
185185

186186
// Save the authentication key entity id to module's configuration.
187-
$this->configFactory->getEditable(static::CONFIG_NAME)->set('active_key', $this->entity->id())->save();
187+
$this->configFactory->getEditable(static::CONFIG_NAME)->set('active_key', $this->entity->id());
188188
// Override the redirect destination.
189189
$form_state->setRedirect('apigee_edge.settings');
190190

tests/src/Kernel/UserAgentTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testUserAgentWithoutMonetization() {
8181
\Drupal::moduleHandler()->invokeAll('apigee_edge_user_agent_string_alter', [&$user_agent_parts]);
8282
$userAgentPrefix = implode('; ', $user_agent_parts);
8383

84-
$this->assertSame($userAgentPrefix, 'Apigee/3.x-dev;' . ' Drupal/' . \Drupal::VERSION);
84+
$this->assertSame($userAgentPrefix, 'Apigee/3.x-dev; Drupal/' . \Drupal::VERSION);
8585
}
8686

8787
}

tests/src/Unit/Command/Util/ApigeeEdgeManagementCliServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public function testHandleHttpClientExceptions302Code() {
472472
// User should see error message.
473473
$io = $this->prophet->prophesize(StyleInterface::class);
474474
$io->error(Argument::containingString('Error connecting to Apigee Edge'))->shouldBeCalledTimes(1);
475-
$io->note(Argument::containingString('the url ' . $this->baseUrl . '/test' . ' does not seem to be a valid Apigee Edge endpoint.'))->shouldBeCalledTimes(1);
475+
$io->note(Argument::containingString('the url ' . $this->baseUrl . '/test does not seem to be a valid Apigee Edge endpoint.'))->shouldBeCalledTimes(1);
476476

477477
$apigee_edge_management_cli_service = new ApigeeEdgeManagementCliService($this->httpClient->reveal());
478478
$apigee_edge_management_cli_service->handleHttpClientExceptions($exception, $io->reveal(), [$this, 'mockDt'], $this->baseUrl . '/test', $this->org, $this->email);

0 commit comments

Comments
 (0)