This file is indexed.

/usr/share/php/phpDocumentor/Reflection/InterfaceReflector.php is in php-phpdocumentor-reflection 1.0.7-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
/**
 * phpDocumentor
 *
 * PHP Version 5.3
 *
 * @author    Mike van Riel <mike.vanriel@naenius.com>
 * @copyright 2010-2012 Mike van Riel / Naenius (http://www.naenius.com)
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
 * @link      http://phpdoc.org
 */

namespace phpDocumentor\Reflection;

use PHPParser_Node_Name;
use PHPParser_Node_Stmt_Class;
use PHPParser_Node_Stmt_Interface;

class InterfaceReflector extends BaseReflector
{
    /** @var PHPParser_Node_Stmt_Interface|PHPParser_Node_Stmt_Class */
    protected $node;

    /**
     * @var ClassReflector\ConstantReflector[]
     */
    protected $constants = array();
    /**
     * @var ClassReflector\PropertyReflector[]
     */
    protected $properties = array();
    /**
     * @var ClassReflector\MethodReflector[]
     */
    protected $methods = array();

    public function parseSubElements()
    {
        foreach ($this->node->stmts as $stmt) {
            switch (get_class($stmt)) {
                case 'PHPParser_Node_Stmt_Property':
                    foreach ($stmt->props as $property) {
                        $this->properties[] = new ClassReflector\PropertyReflector(
                            $stmt,
                            $this->context,
                            $property
                        );
                    }
                    break;
                case 'PHPParser_Node_Stmt_ClassMethod':
                    $this->methods[strtolower($stmt->name)] = new ClassReflector\MethodReflector(
                        $stmt,
                        $this->context
                    );
                    break;
                case 'PHPParser_Node_Stmt_ClassConst':
                    foreach ($stmt->consts as $constant) {
                        $this->constants[] = new ClassReflector\ConstantReflector(
                            $stmt,
                            $this->context,
                            $constant
                        );
                    }
                    break;
            }
        }
    }

    public function getParentInterfaces()
    {
        $names = array();
        if ($this->node instanceof PHPParser_Node_Stmt_Interface
            && $this->node->extends
        ) {
            /** @var PHPParser_Node_Name */
            foreach ($this->node->extends as $node) {
                $names[] = '\\'.(string) $node;
            }
        }

        return $names;
    }

    /**
     * @return ClassReflector\ConstantReflector[]
     */
    public function getConstants()
    {
        return $this->constants;
    }

    /**
     * @return ClassReflector\PropertyReflector[]
     */
    public function getProperties()
    {
        return $this->properties;
    }

    /**
     * @return ClassReflector\MethodReflector[]
     */
    public function getMethods()
    {
        return $this->methods;
    }

    /**
     * @param string $name the method name
     * @return ClassReflector\MethodReflector|null
     */
    public function getMethod($name)
    {
        $name = strtolower($name);

        return isset($this->methods[$name]) ? $this->methods[$name] : null;
    }
}