Skip to content

Commit

Permalink
Fixes for Naming Convention ValidClassName.NoUpperAcronyms PHPCS
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire committed Jan 9, 2025
1 parent 6f8e8af commit abb3484
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Plugin/ApigeeFieldStorageFormat/CSV.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*
* @see https://github.com/symfony/symfony/issues/27447
*/
class CSV implements FieldStorageFormatInterface {
class Csv implements FieldStorageFormatInterface {

/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion src/Plugin/ApigeeFieldStorageFormat/JSON.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* weight = 1000,
* )
*/
class JSON implements FieldStorageFormatInterface {
class Json implements FieldStorageFormatInterface {

/**
* {@inheritdoc}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Functional/DeveloperAppFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testFieldableDeveloperApp() {
}

/**
* Tests field storage formatters (CSV and JSON).
* Tests field storage formatters (Csv and Json).
*/
protected function fieldStorageFormattersTest() {
$field_name_prefix = (string) $this->config('field_ui.settings')->get('field_prefix');
Expand Down
12 changes: 6 additions & 6 deletions tests/src/Functional/DeveloperSyncTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
use Drupal\Core\Url;
use Drupal\Tests\field_ui\Traits\FieldUiTestTrait;
use Drupal\apigee_edge\Entity\Developer;
use Drupal\apigee_edge\Plugin\ApigeeFieldStorageFormat\CSV;
use Drupal\apigee_edge\Plugin\ApigeeFieldStorageFormat\JSON;
use Drupal\apigee_edge\Plugin\ApigeeFieldStorageFormat\Csv;
use Drupal\apigee_edge\Plugin\ApigeeFieldStorageFormat\Json;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\user\Entity\User;
Expand Down Expand Up @@ -579,11 +579,11 @@ protected function verify() {

foreach ($this->fields as $field_type => $data) {
$formatter = $this->formatManager->lookupPluginForFieldType($field_type);
if ($formatter instanceof JSON) {
if ($formatter instanceof Json) {
$this->assertJsonStringEqualsJsonString($developer->getAttributeValue($data['name']), $formatter->encode($user->get($this->fieldNamePrefix . $data['name'])->getValue()));
$this->assertJsonStringEqualsJsonString($developer->getAttributeValue($data['name']), $formatter->encode($data['data_changed']));
}
elseif ($formatter instanceof CSV) {
elseif ($formatter instanceof Csv) {
$this->assertEquals($developer->getAttributeValue($data['name']), $formatter->encode($user->get($this->fieldNamePrefix . $data['name'])->getValue()));
$this->assertEquals($developer->getAttributeValue($data['name']), $formatter->encode($data['data_changed']));
}
Expand All @@ -592,11 +592,11 @@ protected function verify() {
else {
foreach ($this->fields as $field_type => $data) {
$formatter = $this->formatManager->lookupPluginForFieldType($field_type);
if ($formatter instanceof JSON) {
if ($formatter instanceof Json) {
$this->assertJsonStringEqualsJsonString($developer->getAttributeValue($data['name']), $formatter->encode($user->get($this->fieldNamePrefix . $data['name'])->getValue()));
$this->assertJsonStringEqualsJsonString($developer->getAttributeValue($data['name']), $formatter->encode($data['data']));
}
elseif ($formatter instanceof CSV) {
elseif ($formatter instanceof Csv) {
$this->assertEquals($developer->getAttributeValue($data['name']), $formatter->encode($user->get($this->fieldNamePrefix . $data['name'])->getValue()));
$this->assertEquals($developer->getAttributeValue($data['name']), $formatter->encode($data['data']));
}
Expand Down

0 comments on commit abb3484

Please sign in to comment.