1<?php
2/**
3 * This file is part of phpDocumentor.
4 *
5 * For the full copyright and license information, please view the LICENSE
6 * file that was distributed with this source code.
7 *
8 * @copyright 2010-2015 Mike van Riel<mike@phpdoc.org>
9 * @license   http://www.opensource.org/licenses/mit-license.php MIT
10 * @link      http://phpdoc.org
11 */
12
13namespace phpDocumentor\Reflection\Types;
14
15use phpDocumentor\Reflection\Type;
16
17/**
18 * Value Object representing the '$this' pseudo-type.
19 *
20 * $this, as a Type, represents the instance of the class associated with the element as it was called. $this is
21 * commonly used when documenting fluent interfaces since it represents that the same object is returned.
22 */
23final class This implements Type
24{
25    /**
26     * Returns a rendered output of the Type as it would be used in a DocBlock.
27     *
28     * @return string
29     */
30    public function __toString()
31    {
32        return '$this';
33    }
34}
35