Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 200
Zeile 1... Zeile 1...
1
<?php
1
<?php
Zeile 2... Zeile 2...
2
 
2
 
3
/*
3
/*
4
 * This file is part of Psy Shell.
4
 * This file is part of Psy Shell.
5
 *
5
 *
6
 * (c) 2012-2022 Justin Hileman
6
 * (c) 2012-2023 Justin Hileman
7
 *
7
 *
8
 * For the full copyright and license information, please view the LICENSE
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
9
 * file that was distributed with this source code.
Zeile 54... Zeile 54...
54
    }
54
    }
Zeile 55... Zeile 55...
55
 
55
 
56
    /**
56
    /**
57
     * Get defined properties for the given class or object Reflector.
57
     * Get defined properties for the given class or object Reflector.
58
     *
58
     *
59
     * @param bool       $showAll   Include private and protected properties
59
     * @param bool             $showAll   Include private and protected properties
60
     * @param \Reflector $reflector
60
     * @param \ReflectionClass $reflector
61
     * @param bool       $noInherit Exclude inherited properties
61
     * @param bool             $noInherit Exclude inherited properties
62
     *
62
     *
63
     * @return array
63
     * @return array
64
     */
64
     */
65
    protected function getProperties(bool $showAll, \Reflector $reflector, bool $noInherit = false): array
65
    protected function getProperties(bool $showAll, \ReflectionClass $reflector, bool $noInherit = false): array
66
    {
66
    {
Zeile 67... Zeile 67...
67
        $className = $reflector->getName();
67
        $className = $reflector->getName();
68
 
68
 
Zeile 110... Zeile 110...
110
 
110
 
111
    /**
111
    /**
112
     * Get a label for the particular kind of "class" represented.
112
     * Get a label for the particular kind of "class" represented.
113
     *
113
     *
114
     * @param \ReflectionClass $reflector
-
 
115
     *
-
 
116
     * @return string
114
     * @param \ReflectionClass $reflector
117
     */
115
     */
118
    protected function getKindLabel(\ReflectionClass $reflector): string
116
    protected function getKindLabel(\ReflectionClass $reflector): string
119
    {
117
    {
120
        if (\method_exists($reflector, 'isTrait') && $reflector->isTrait()) {
118
        if (\method_exists($reflector, 'isTrait') && $reflector->isTrait()) {
Zeile 126... Zeile 124...
126
 
124
 
127
    /**
125
    /**
128
     * Get output style for the given property's visibility.
126
     * Get output style for the given property's visibility.
129
     *
127
     *
130
     * @param \ReflectionProperty $property
-
 
131
     *
-
 
132
     * @return string
128
     * @param \ReflectionProperty $property
133
     */
129
     */
134
    private function getVisibilityStyle(\ReflectionProperty $property): string
130
    private function getVisibilityStyle(\ReflectionProperty $property): string
135
    {
131
    {
136
        if ($property->isPublic()) {
132
        if ($property->isPublic()) {
Zeile 145... Zeile 141...
145
    /**
141
    /**
146
     * Present the $target's current value for a reflection property.
142
     * Present the $target's current value for a reflection property.
147
     *
143
     *
148
     * @param \ReflectionProperty $property
144
     * @param \ReflectionProperty $property
149
     * @param mixed               $target
145
     * @param mixed               $target
150
     *
-
 
151
     * @return string
-
 
152
     */
146
     */
153
    protected function presentValue(\ReflectionProperty $property, $target): string
147
    protected function presentValue(\ReflectionProperty $property, $target): string
154
    {
148
    {
155
        if (!$target) {
149
        if (!$target) {
156
            return '';
150
            return '';