diff --git a/core/modules/editor/js/editor.formattedTextEditor.js b/core/modules/editor/js/editor.formattedTextEditor.js
index 3efbaa2..0329800 100644
--- a/core/modules/editor/js/editor.formattedTextEditor.js
+++ b/core/modules/editor/js/editor.formattedTextEditor.js
@@ -94,8 +94,7 @@
     stateChange: function (fieldModel, state) {
       var editorModel = this.model;
       var from = fieldModel.previous('state');
-      var to = state;
-      switch (to) {
+      switch (state) {
         case 'inactive':
           break;
 
diff --git a/core/modules/editor/src/Element.php b/core/modules/editor/src/Element.php
index a43364d..b9fcef1 100644
--- a/core/modules/editor/src/Element.php
+++ b/core/modules/editor/src/Element.php
@@ -36,6 +36,12 @@ public function __construct(PluginManagerInterface $plugin_manager) {
 
   /**
    * Additional #pre_render callback for 'text_format' elements.
+   *
+   * @param array $element
+   *   An array of elements.
+   *
+   * @return array
+   *   An pre rendered text format of array.
    */
   function preRenderTextFormat(array $element) {
     // Allow modules to programmatically enforce no client-side editor by
diff --git a/core/modules/editor/src/Plugin/InPlaceEditor/Editor.php b/core/modules/editor/src/Plugin/InPlaceEditor/Editor.php
index d56cfff..ffb430d 100644
--- a/core/modules/editor/src/Plugin/InPlaceEditor/Editor.php
+++ b/core/modules/editor/src/Plugin/InPlaceEditor/Editor.php
@@ -59,6 +59,12 @@ function getMetadata(FieldItemListInterface $items) {
 
   /**
    * Returns whether the text format has transformation filters.
+   *
+   * @param int $format_id
+   *   A format id.
+   *
+   * @return bool
+   *   A bool value.
    */
   protected function textFormatHasTransformationFilters($format_id) {
     $format = entity_load('filter_format', $format_id);
diff --git a/core/modules/editor/src/Tests/QuickEditIntegrationTest.php b/core/modules/editor/src/Tests/QuickEditIntegrationTest.php
index f9e1625..4c5d9f8 100644
--- a/core/modules/editor/src/Tests/QuickEditIntegrationTest.php
+++ b/core/modules/editor/src/Tests/QuickEditIntegrationTest.php
@@ -112,6 +112,16 @@ protected function setUp() {
 
   /**
    * Returns the in-place editor that Edit selects.
+   *
+   * @param int $entity_id
+   *   An integer id.
+   * @param string $field_name
+   *   A field name.
+   * @param string $view_mode
+   *   A view mode.
+   *
+   * @return string
+   *   Returns a selected editor.
    */
   protected function getSelectedEditor($entity_id, $field_name, $view_mode = 'default') {
     $entity = entity_load('entity_test', $entity_id, TRUE);
