Unverified Commit 508258e3 authored by Alex Pott's avatar Alex Pott
Browse files

[#3541201] feat: 10.x backport - Inconsistent switch case syntax

By: andypost
parent 8689bc5e
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -150,11 +150,11 @@ public function loadByProperties(array $conditions = []) {
            $checked_value = $field_storage->uuid();
            break;

          case 'uuid';
          case 'uuid':
            $checked_value = $field->uuid();
            break;

          case 'deleted';
          case 'deleted':
            $checked_value = $field->isDeleted();
            break;

+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
      $list = array_map('trim', $list);
      $list = FilterArray::removeEmptyStrings($list);
      switch ($field_type) {
        case 'boolean';
        case 'boolean':
          $option = preg_replace('/^option_/', '', $row->getSourceProperty('property'));
          for ($i = 0; $i < 2; $i++) {
            $value = $list[$i];
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
    if (isset($data['settings']['allowed_values'])) {
      $allowed_values = $data['settings']['allowed_values'];
      switch ($type) {
        case 'boolean';
        case 'boolean':
          if (isset($allowed_values[$property])) {
            $translation = $row->getSourceProperty('translation');
            break;
+2 −2
Original line number Diff line number Diff line
@@ -293,10 +293,10 @@ protected function getExpectedCacheContexts(?array $sparse_fieldset = NULL) {
   */
  protected function getExpectedUnauthorizedAccessMessage($method) {
    switch ($method) {
      case 'GET';
      case 'GET':
        return "The 'access comments' permission is required and the comment must be published.";

      case 'POST';
      case 'POST':
        return "The 'post comments' permission is required.";

      case 'PATCH':
+1 −1
Original line number Diff line number Diff line
@@ -323,7 +323,7 @@ protected function getPostDocument() {
   */
  protected function getExpectedUnauthorizedAccessMessage($method) {
    switch ($method) {
      case 'GET';
      case 'GET':
        return "The 'view media' permission is required when the media item is published.";

      case 'POST':
Loading