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 84... Zeile 84...
84
    }
84
    }
Zeile 85... Zeile 85...
85
 
85
 
86
    /**
86
    /**
87
     * These arguments will be excluded from help output.
87
     * These arguments will be excluded from help output.
88
     *
88
     *
89
     * @return array
89
     * @return string[]
90
     */
90
     */
91
    protected function getHiddenArguments(): array
91
    protected function getHiddenArguments(): array
92
    {
92
    {
93
        return ['command'];
93
        return ['command'];
Zeile 106... Zeile 106...
106
    }
106
    }
Zeile 107... Zeile 107...
107
 
107
 
108
    /**
108
    /**
109
     * These options will be excluded from help output.
109
     * These options will be excluded from help output.
110
     *
110
     *
111
     * @return array
111
     * @return string[]
112
     */
112
     */
113
    protected function getHiddenOptions(): array
113
    protected function getHiddenOptions(): array
114
    {
114
    {
115
        return ['verbose'];
115
        return ['verbose'];
Zeile 116... Zeile 116...
116
    }
116
    }
117
 
117
 
118
    /**
-
 
119
     * Format command aliases as text..
-
 
120
     *
118
    /**
121
     * @return string
119
     * Format command aliases as text..
122
     */
120
     */
123
    private function aliasesAsText(): string
121
    private function aliasesAsText(): string
124
    {
122
    {
Zeile 125... Zeile 123...
125
        return '<comment>Aliases:</comment> <info>'.\implode(', ', $this->getAliases()).'</info>'.\PHP_EOL;
123
        return '<comment>Aliases:</comment> <info>'.\implode(', ', $this->getAliases()).'</info>'.\PHP_EOL;
126
    }
124
    }
127
 
-
 
128
    /**
-
 
129
     * Format command arguments as text.
125
 
130
     *
126
    /**
131
     * @return string
127
     * Format command arguments as text.
132
     */
128
     */
133
    private function argumentsAsText(): string
129
    private function argumentsAsText(): string
Zeile 156... Zeile 152...
156
        return \implode(\PHP_EOL, $messages);
152
        return \implode(\PHP_EOL, $messages);
157
    }
153
    }
Zeile 158... Zeile 154...
158
 
154
 
159
    /**
155
    /**
160
     * Format options as text.
-
 
161
     *
-
 
162
     * @return string
156
     * Format options as text.
163
     */
157
     */
164
    private function optionsAsText(): string
158
    private function optionsAsText(): string
165
    {
159
    {
166
        $max = $this->getMaxWidth();
160
        $max = $this->getMaxWidth();
Zeile 197... Zeile 191...
197
        return \implode(\PHP_EOL, $messages);
191
        return \implode(\PHP_EOL, $messages);
198
    }
192
    }
Zeile 199... Zeile 193...
199
 
193
 
200
    /**
194
    /**
201
     * Calculate the maximum padding width for a set of lines.
-
 
202
     *
-
 
203
     * @return int
195
     * Calculate the maximum padding width for a set of lines.
204
     */
196
     */
205
    private function getMaxWidth(): int
197
    private function getMaxWidth(): int
206
    {
198
    {
Zeile 224... Zeile 216...
224
 
216
 
225
    /**
217
    /**
226
     * Format an option default as text.
218
     * Format an option default as text.
227
     *
219
     *
228
     * @param mixed $default
-
 
229
     *
-
 
230
     * @return string
220
     * @param mixed $default
231
     */
221
     */
232
    private function formatDefaultValue($default): string
222
    private function formatDefaultValue($default): string
233
    {
223
    {
234
        if (\is_array($default) && $default === \array_values($default)) {
224
        if (\is_array($default) && $default === \array_values($default)) {
Zeile 271... Zeile 261...
271
            ->setStyle($style);
261
            ->setStyle($style);
272
    }
262
    }
Zeile 273... Zeile 263...
273
 
263
 
274
    /**
264
    /**
275
     * Legacy fallback for getTable.
-
 
276
     *
-
 
277
     * @return TableHelper
265
     * Legacy fallback for getTable.
278
     */
266
     */
279
    protected function getTableHelper(): TableHelper
267
    protected function getTableHelper(): TableHelper
280
    {
268
    {