Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Zur aktuellen Revision | 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 120... Zeile 120...
120
     * Tries to incorporate doc comments if possible.
120
     * Tries to incorporate doc comments if possible.
121
     *
121
     *
122
     * This is typehinted as \Reflector but we've narrowed the input via self::isReflectable already.
122
     * This is typehinted as \Reflector but we've narrowed the input via self::isReflectable already.
123
     *
123
     *
124
     * @param \ReflectionClass|\ReflectionFunctionAbstract $reflector
124
     * @param \ReflectionClass|\ReflectionFunctionAbstract $reflector
125
     *
-
 
126
     * @return int
-
 
127
     */
125
     */
128
    private static function getStartLine(\Reflector $reflector): int
126
    private static function getStartLine(\Reflector $reflector): int
129
    {
127
    {
130
        $startLine = $reflector->getStartLine();
128
        $startLine = $reflector->getStartLine();
Zeile 307... Zeile 305...
307
    }
305
    }
Zeile 308... Zeile 306...
308
 
306
 
309
    /**
307
    /**
310
     * Check whether a Reflector instance is reflectable by this formatter.
308
     * Check whether a Reflector instance is reflectable by this formatter.
311
     *
309
     *
312
     * @param \Reflector $reflector
310
     * @phpstan-assert-if-true \ReflectionClass|\ReflectionFunctionAbstract $reflector
313
     *
311
     *
314
     * @return bool
312
     * @param \Reflector $reflector
315
     */
313
     */
316
    private static function isReflectable(\Reflector $reflector): bool
314
    private static function isReflectable(\Reflector $reflector): bool
317
    {
315
    {
318
        return ($reflector instanceof \ReflectionClass || $reflector instanceof \ReflectionFunctionAbstract) && \is_file($reflector->getFileName());
316
        return ($reflector instanceof \ReflectionClass || $reflector instanceof \ReflectionFunctionAbstract) && \is_file($reflector->getFileName());