From 40942c7412fc81f9856161befa05dcd8b5936514 Mon Sep 17 00:00:00 2001
From: webchick <drupal@webchick.net>
Date: Sun, 15 Jun 2014 23:42:31 -0700
Subject: [PATCH] Issue #2282125 by joshi.rohit100, mtift: Fixed Remove
 instances of '@return self'.

---
 core/lib/Drupal/Core/Config/ConfigInstallerInterface.php | 6 ++----
 .../Drupal/Core/Config/ConfigModuleOverridesEvent.php    | 3 +--
 .../Core/Entity/Display/EntityDisplayInterface.php       | 9 +++------
 core/lib/Drupal/Core/Entity/EntityInterface.php          | 2 +-
 core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php   | 3 +--
 core/lib/Drupal/Core/Image/ImageFactory.php              | 3 +--
 core/lib/Drupal/Core/Page/HeadElement.php                | 6 ++----
 core/lib/Drupal/Core/Plugin/DefaultPluginBag.php         | 3 +--
 core/lib/Drupal/Core/TypedData/ListDataDefinition.php    | 3 +--
 core/modules/image/src/ImageEffectInterface.php          | 3 +--
 core/modules/image/src/ImageStyleInterface.php           | 6 ++----
 core/modules/system/src/DateFormatInterface.php          | 3 +--
 .../modules/system/src/Plugin/ImageToolkit/GDToolkit.php | 3 +--
 13 files changed, 18 insertions(+), 35 deletions(-)

diff --git a/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
index 642044e2b908..43d9e86224af 100644
--- a/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
+++ b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php
@@ -55,16 +55,14 @@ public function installCollectionDefaultConfig($collection);
    *
    * @param \Drupal\Core\Config\StorageInterface $storage
    *
-   * @return self
-   *   The configuration installer.
+   * @return $this
    */
   public function setSourceStorage(StorageInterface $storage);
 
   /**
    * Resets the configuration storage that provides the default configuration.
    *
-   * @return self
-   *   The configuration installer.
+   * @return $this
    */
   public function resetSourceStorage();
 
diff --git a/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php b/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php
index a2c65d5eca47..4d7251d56328 100644
--- a/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php
+++ b/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php
@@ -89,8 +89,7 @@ public function getOverrides() {
    * @param array $values
    *   The values in the configuration object to override.
    *
-   * @return self
-   *   The ConfigModuleOverridesEvent object.
+   * @return $this
    */
   public function setOverride($name, array $values) {
     if (in_array($name, $this->names)) {
diff --git a/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php b/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php
index 45663ac5f81a..719d865aa276 100644
--- a/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php
+++ b/core/lib/Drupal/Core/Entity/Display/EntityDisplayInterface.php
@@ -21,8 +21,7 @@ interface EntityDisplayInterface {
    * @param $view_mode
    *   The view mode for the new object.
    *
-   * @return self
-   *   The new object.
+   * @return static
    */
   public function createCopy($view_mode);
 
@@ -54,8 +53,7 @@ public function getComponent($name);
    * @param array $options
    *   The display options.
    *
-   * @return self
-   *   The entity display object.
+   * @return $this
    */
   public function setComponent($name, array $options = array());
 
@@ -65,8 +63,7 @@ public function setComponent($name, array $options = array());
    * @param string $name
    *   The name of the component.
    *
-   * @return self
-   *   The entity display object.
+   * @return $this
    */
   public function removeComponent($name);
 
diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php
index 396449237db1..c6054a343880 100644
--- a/core/lib/Drupal/Core/Entity/EntityInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityInterface.php
@@ -65,7 +65,7 @@ public function isNew();
    *   (optional) Whether the entity should be forced to be new. Defaults to
    *   TRUE.
    *
-   * @return self
+   * @return $this
    *
    * @see \Drupal\Core\Entity\EntityInterface::isNew()
    */
diff --git a/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php b/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php
index d0d51ae44749..b737a54f53cc 100644
--- a/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php
+++ b/core/lib/Drupal/Core/File/MimeType/MimeTypeGuesser.php
@@ -63,8 +63,7 @@ public function guess($path) {
    * @param int $priority
    *   The priority of the guesser being added.
    *
-   * @return self
-   *   The called object.
+   * @return $this
    */
   public function addGuesser(MimeTypeGuesserInterface $guesser, $priority = 0) {
     $this->guessers[$priority][] = $guesser;
diff --git a/core/lib/Drupal/Core/Image/ImageFactory.php b/core/lib/Drupal/Core/Image/ImageFactory.php
index ebd30b59fd0d..efcf3d984fd6 100644
--- a/core/lib/Drupal/Core/Image/ImageFactory.php
+++ b/core/lib/Drupal/Core/Image/ImageFactory.php
@@ -45,8 +45,7 @@ public function __construct(ImageToolkitManager $toolkit_manager) {
    * @param string $toolkit_id
    *   The ID of the image toolkit to use for this image factory.
    *
-   * @return self
-   *   Returns this image.
+   * @return $this
    */
   public function setToolkitId($toolkit_id) {
     $this->toolkitId = $toolkit_id;
diff --git a/core/lib/Drupal/Core/Page/HeadElement.php b/core/lib/Drupal/Core/Page/HeadElement.php
index 85055ad6fafe..49c1f2d73298 100644
--- a/core/lib/Drupal/Core/Page/HeadElement.php
+++ b/core/lib/Drupal/Core/Page/HeadElement.php
@@ -63,8 +63,7 @@ public function __toString() {
    * @param mixed $value
    *   The value to which to set it.
    *
-   * @return self
-   *   The invoked object.
+   * @return $this
    */
   public function setAttribute($key, $value) {
     $this->attributes[$key] = $value;
@@ -88,8 +87,7 @@ public function &getAttributes() {
    *   (optional) Whether or not this element should be wrapped in <noscript>.
    *   Defaults to TRUE.
    *
-   * @return self
-   *   The element..
+   * @return $this
    */
   public function setNoScript($value = TRUE) {
     $this->noScript = $value;
diff --git a/core/lib/Drupal/Core/Plugin/DefaultPluginBag.php b/core/lib/Drupal/Core/Plugin/DefaultPluginBag.php
index a6bb5c9cb8ca..9287d7c64b29 100644
--- a/core/lib/Drupal/Core/Plugin/DefaultPluginBag.php
+++ b/core/lib/Drupal/Core/Plugin/DefaultPluginBag.php
@@ -86,8 +86,7 @@ protected function initializePlugin($instance_id) {
   /**
    * Sorts all plugin instances in this bag.
    *
-   * @return self
-   *   Returns the plugin bag.
+   * @return $this
    */
   public function sort() {
     uasort($this->instanceIDs, array($this, 'sortHelper'));
diff --git a/core/lib/Drupal/Core/TypedData/ListDataDefinition.php b/core/lib/Drupal/Core/TypedData/ListDataDefinition.php
index be253e125683..b710a75ea5e1 100644
--- a/core/lib/Drupal/Core/TypedData/ListDataDefinition.php
+++ b/core/lib/Drupal/Core/TypedData/ListDataDefinition.php
@@ -106,8 +106,7 @@ public function getItemDefinition() {
    * @param \Drupal\Core\TypedData\DataDefinition $definition
    *   A list item's data definition.
    *
-   * @return self
-   *   The object itself for chaining.
+   * @return $this
    */
   public function setItemDefinition(DataDefinitionInterface $definition) {
     $this->itemDefinition = $definition;
diff --git a/core/modules/image/src/ImageEffectInterface.php b/core/modules/image/src/ImageEffectInterface.php
index 7079d6341849..d2db1cdef364 100644
--- a/core/modules/image/src/ImageEffectInterface.php
+++ b/core/modules/image/src/ImageEffectInterface.php
@@ -74,8 +74,7 @@ public function getWeight();
    * @param int $weight
    *   The weight for this image effect.
    *
-   * @return self
-   *   This image effect.
+   * @return $this
    */
   public function setWeight($weight);
 
diff --git a/core/modules/image/src/ImageStyleInterface.php b/core/modules/image/src/ImageStyleInterface.php
index efff9abd0139..175213e2bfae 100644
--- a/core/modules/image/src/ImageStyleInterface.php
+++ b/core/modules/image/src/ImageStyleInterface.php
@@ -95,8 +95,7 @@ public function getPathToken($uri);
    *   (optional) The original image path or URI. If it's supplied, only this
    *   image derivative will be flushed.
    *
-   * @return self
-   *   This image style.
+   * @return $this
    */
   public function flush($path = NULL);
 
@@ -167,8 +166,7 @@ public function addImageEffect(array $configuration);
    * @param \Drupal\image\ImageEffectInterface $effect
    *   The image effect object.
    *
-   * @return self
-   *   This image style.
+   * @return $this
    */
   public function deleteImageEffect(ImageEffectInterface $effect);
 
diff --git a/core/modules/system/src/DateFormatInterface.php b/core/modules/system/src/DateFormatInterface.php
index 0d6b34b4862a..fe1353d1a71c 100644
--- a/core/modules/system/src/DateFormatInterface.php
+++ b/core/modules/system/src/DateFormatInterface.php
@@ -29,8 +29,7 @@ public function getPattern();
    * @param string $pattern
    *   The date pattern to use for this format.
    *
-   * @return self
-   *   Returns the date format.
+   * @return $this
    */
   public function setPattern($pattern);
 
diff --git a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
index aa373cab20e1..2adc45a60a02 100644
--- a/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
+++ b/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php
@@ -42,8 +42,7 @@ class GDToolkit extends ImageToolkitBase {
    * @param resource $resource
    *   The GD image resource.
    *
-   * @return self
-   *   Returns this toolkit object.
+   * @return $this
    */
   public function setResource($resource) {
     $this->resource = $resource;
-- 
GitLab