@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | * |
117 | 117 | * @return int|bool |
118 | 118 | */ |
119 | - public function increment(string $key, mixed $value = 1): int|bool; |
|
119 | + public function increment(string $key, mixed $value = 1): int | bool; |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * Decrement the value of an item in the cache. |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * |
127 | 127 | * @return int|bool |
128 | 128 | */ |
129 | - public function decrement(string $key, mixed $value = 1): int|bool; |
|
129 | + public function decrement(string $key, mixed $value = 1): int | bool; |
|
130 | 130 | |
131 | 131 | /** |
132 | 132 | * Remove a specific item from the cache store. |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * |
75 | 75 | * @return int|bool |
76 | 76 | */ |
77 | - public function increment(string $key, mixed $value = 1): int|bool; |
|
77 | + public function increment(string $key, mixed $value = 1): int | bool; |
|
78 | 78 | |
79 | 79 | /** |
80 | 80 | * Decrement the value of an item in the cache. |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * |
85 | 85 | * @return int|bool |
86 | 86 | */ |
87 | - public function decrement(string $key, mixed $value = 1): int|bool; |
|
87 | + public function decrement(string $key, mixed $value = 1): int | bool; |
|
88 | 88 | |
89 | 89 | /** |
90 | 90 | * Deletes a specific item from the cache store. |
@@ -30,103 +30,103 @@ |
||
30 | 30 | interface Factory |
31 | 31 | { |
32 | 32 | /** |
33 | - * Check existance view file. |
|
34 | - * |
|
35 | - * @param string $view |
|
36 | - * |
|
37 | - * @return bool |
|
38 | - */ |
|
33 | + * Check existance view file. |
|
34 | + * |
|
35 | + * @param string $view |
|
36 | + * |
|
37 | + * @return bool |
|
38 | + */ |
|
39 | 39 | public function viewExists($view): bool; |
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Global and local data are merged and extracted to create local variables within the view file. |
43 | - * Renders the view object to a string. |
|
44 | - * |
|
45 | - * @example $output = $view->make(); |
|
46 | - * |
|
47 | - * @param string $view View filename |
|
48 | - * @param array $data Array of values |
|
49 | - * |
|
50 | - * @return \Syscodes\Components\Contracts\View\View |
|
43 | + * Renders the view object to a string. |
|
44 | + * |
|
45 | + * @example $output = $view->make(); |
|
46 | + * |
|
47 | + * @param string $view View filename |
|
48 | + * @param array $data Array of values |
|
49 | + * |
|
50 | + * @return \Syscodes\Components\Contracts\View\View |
|
51 | 51 | */ |
52 | 52 | public function make($view, $data = []); |
53 | 53 | |
54 | 54 | /** |
55 | - * Call the creator for a given view. |
|
56 | - * |
|
57 | - * @param \Syscodes\View\View $view |
|
58 | - * |
|
59 | - * @return void |
|
60 | - */ |
|
61 | - public function callCreator(View $view): void; |
|
55 | + * Call the creator for a given view. |
|
56 | + * |
|
57 | + * @param \Syscodes\View\View $view |
|
58 | + * |
|
59 | + * @return void |
|
60 | + */ |
|
61 | + public function callCreator(View $view): void; |
|
62 | 62 | |
63 | 63 | /** |
64 | - * Get the extension to engine bindings. |
|
65 | - * |
|
66 | - * @return array |
|
67 | - */ |
|
68 | - public function getExtensions(): array; |
|
64 | + * Get the extension to engine bindings. |
|
65 | + * |
|
66 | + * @return array |
|
67 | + */ |
|
68 | + public function getExtensions(): array; |
|
69 | 69 | |
70 | 70 | |
71 | 71 | /** |
72 | - * Add a piece of shared data to the environment. |
|
73 | - * |
|
74 | - * @param array|string $key |
|
75 | - * @param mixed|null $value |
|
76 | - * |
|
77 | - * @return mixed |
|
78 | - */ |
|
79 | - public function share($key, $value = null); |
|
72 | + * Add a piece of shared data to the environment. |
|
73 | + * |
|
74 | + * @param array|string $key |
|
75 | + * @param mixed|null $value |
|
76 | + * |
|
77 | + * @return mixed |
|
78 | + */ |
|
79 | + public function share($key, $value = null); |
|
80 | 80 | |
81 | 81 | /** |
82 | - * Replace the namespace hints for the given namespace. |
|
83 | - * |
|
84 | - * @param string $namespace |
|
85 | - * @param string|array $hints |
|
86 | - * |
|
87 | - * @return self |
|
88 | - */ |
|
89 | - public function replaceNamespace($namespace, $hints): self; |
|
82 | + * Replace the namespace hints for the given namespace. |
|
83 | + * |
|
84 | + * @param string $namespace |
|
85 | + * @param string|array $hints |
|
86 | + * |
|
87 | + * @return self |
|
88 | + */ |
|
89 | + public function replaceNamespace($namespace, $hints): self; |
|
90 | 90 | |
91 | 91 | /** |
92 | - * Increment the rendering counter. |
|
93 | - * |
|
94 | - * @return int |
|
95 | - */ |
|
96 | - public function increment(): int; |
|
92 | + * Increment the rendering counter. |
|
93 | + * |
|
94 | + * @return int |
|
95 | + */ |
|
96 | + public function increment(): int; |
|
97 | 97 | |
98 | 98 | /** |
99 | - * Decrement the rendering counter. |
|
100 | - * |
|
101 | - * @return int |
|
102 | - */ |
|
103 | - public function decrement(): int; |
|
99 | + * Decrement the rendering counter. |
|
100 | + * |
|
101 | + * @return int |
|
102 | + */ |
|
103 | + public function decrement(): int; |
|
104 | 104 | |
105 | 105 | /** |
106 | - * Check if there are no active render operations. |
|
107 | - * |
|
108 | - * @return bool |
|
109 | - */ |
|
110 | - public function doneRendering(): bool; |
|
106 | + * Check if there are no active render operations. |
|
107 | + * |
|
108 | + * @return bool |
|
109 | + */ |
|
110 | + public function doneRendering(): bool; |
|
111 | 111 | |
112 | 112 | /** |
113 | - * Flush all of the parser state like sections. |
|
114 | - * |
|
115 | - * @return void |
|
116 | - */ |
|
117 | - public function flushState(): void; |
|
113 | + * Flush all of the parser state like sections. |
|
114 | + * |
|
115 | + * @return void |
|
116 | + */ |
|
117 | + public function flushState(): void; |
|
118 | 118 | |
119 | 119 | /** |
120 | - * Flush all of the section contents if done rendering. |
|
121 | - * |
|
122 | - * @return void |
|
123 | - */ |
|
124 | - public function flushStateIfDoneRendering(): void; |
|
120 | + * Flush all of the section contents if done rendering. |
|
121 | + * |
|
122 | + * @return void |
|
123 | + */ |
|
124 | + public function flushStateIfDoneRendering(): void; |
|
125 | 125 | |
126 | 126 | /** |
127 | - * Get all of the shared data for the environment. |
|
128 | - * |
|
129 | - * @return array |
|
130 | - */ |
|
131 | - public function getShared(): array; |
|
127 | + * Get all of the shared data for the environment. |
|
128 | + * |
|
129 | + * @return array |
|
130 | + */ |
|
131 | + public function getShared(): array; |
|
132 | 132 | } |
133 | 133 | \ No newline at end of file |
@@ -29,96 +29,96 @@ |
||
29 | 29 | */ |
30 | 30 | interface View extends Renderable |
31 | 31 | { |
32 | - /** |
|
33 | - * The view data will be extracted. |
|
34 | - * |
|
35 | - * @return array |
|
36 | - */ |
|
37 | - public function getArrayData(): array; |
|
32 | + /** |
|
33 | + * The view data will be extracted. |
|
34 | + * |
|
35 | + * @return array |
|
36 | + */ |
|
37 | + public function getArrayData(): array; |
|
38 | 38 | |
39 | - /** |
|
40 | - * Get the sections of the rendered view. |
|
41 | - * |
|
42 | - * @return array |
|
43 | - * |
|
44 | - * @throws \Throwable |
|
45 | - */ |
|
46 | - public function renderSections(); |
|
39 | + /** |
|
40 | + * Get the sections of the rendered view. |
|
41 | + * |
|
42 | + * @return array |
|
43 | + * |
|
44 | + * @throws \Throwable |
|
45 | + */ |
|
46 | + public function renderSections(); |
|
47 | 47 | |
48 | - /** |
|
49 | - * Add a piece of data to the view. |
|
50 | - * |
|
51 | - * @example $view->assign($content, $data); |
|
52 | - * |
|
53 | - * @param string|array $key |
|
54 | - * @param mixed $value |
|
55 | - * |
|
56 | - * @return self |
|
57 | - */ |
|
58 | - public function assign($key, $value = null): self; |
|
48 | + /** |
|
49 | + * Add a piece of data to the view. |
|
50 | + * |
|
51 | + * @example $view->assign($content, $data); |
|
52 | + * |
|
53 | + * @param string|array $key |
|
54 | + * @param mixed $value |
|
55 | + * |
|
56 | + * @return self |
|
57 | + */ |
|
58 | + public function assign($key, $value = null): self; |
|
59 | 59 | |
60 | - /** |
|
61 | - * Assigns a value by reference. The benefit of binding is that values can be altered |
|
62 | - * without re-setting them. It is also possible to bind variables before they have values. |
|
63 | - * Assigned values will be available as a variable within the view file: |
|
64 | - * |
|
65 | - * @example $view->bind('ref', $bar); |
|
66 | - * |
|
67 | - * @param string $key Variable name |
|
68 | - * @param mixed $value Referenced variable |
|
69 | - * |
|
70 | - * @return self |
|
71 | - */ |
|
72 | - public function bind($key, & $value): self; |
|
60 | + /** |
|
61 | + * Assigns a value by reference. The benefit of binding is that values can be altered |
|
62 | + * without re-setting them. It is also possible to bind variables before they have values. |
|
63 | + * Assigned values will be available as a variable within the view file: |
|
64 | + * |
|
65 | + * @example $view->bind('ref', $bar); |
|
66 | + * |
|
67 | + * @param string $key Variable name |
|
68 | + * @param mixed $value Referenced variable |
|
69 | + * |
|
70 | + * @return self |
|
71 | + */ |
|
72 | + public function bind($key, & $value): self; |
|
73 | 73 | |
74 | - /** |
|
75 | - * Get the array of view data. |
|
76 | - * |
|
77 | - * @return array |
|
78 | - */ |
|
79 | - public function getData(): array; |
|
74 | + /** |
|
75 | + * Get the array of view data. |
|
76 | + * |
|
77 | + * @return array |
|
78 | + */ |
|
79 | + public function getData(): array; |
|
80 | 80 | |
81 | - /** |
|
82 | - * Get the name of the view. |
|
83 | - * |
|
84 | - * @return string |
|
85 | - */ |
|
86 | - public function getView(): string; |
|
81 | + /** |
|
82 | + * Get the name of the view. |
|
83 | + * |
|
84 | + * @return string |
|
85 | + */ |
|
86 | + public function getView(): string; |
|
87 | 87 | |
88 | - /** |
|
89 | - * Get the path to the view file. |
|
90 | - * |
|
91 | - * @return string |
|
92 | - */ |
|
93 | - public function getPath(): string; |
|
88 | + /** |
|
89 | + * Get the path to the view file. |
|
90 | + * |
|
91 | + * @return string |
|
92 | + */ |
|
93 | + public function getPath(): string; |
|
94 | 94 | |
95 | - /** |
|
96 | - * Set the path to the view file. |
|
97 | - * |
|
98 | - * @param string $path |
|
99 | - * |
|
100 | - * @return void |
|
101 | - */ |
|
102 | - public function setPath($path): void; |
|
95 | + /** |
|
96 | + * Set the path to the view file. |
|
97 | + * |
|
98 | + * @param string $path |
|
99 | + * |
|
100 | + * @return void |
|
101 | + */ |
|
102 | + public function setPath($path): void; |
|
103 | 103 | |
104 | - /** |
|
105 | - * Assigns a variable by name. Assigned values will be available as a |
|
106 | - * variable within the view file: |
|
107 | - * |
|
108 | - * This value can be accessed as $var within the view |
|
109 | - * @example $view->set(array('food' => 'bread', 'beverage' => 'water')); |
|
110 | - * |
|
111 | - * @param string|array $key Variable name |
|
112 | - * @param mixed $value Value |
|
113 | - * |
|
114 | - * @return self |
|
115 | - */ |
|
116 | - public function set($key, $value = null): self; |
|
104 | + /** |
|
105 | + * Assigns a variable by name. Assigned values will be available as a |
|
106 | + * variable within the view file: |
|
107 | + * |
|
108 | + * This value can be accessed as $var within the view |
|
109 | + * @example $view->set(array('food' => 'bread', 'beverage' => 'water')); |
|
110 | + * |
|
111 | + * @param string|array $key Variable name |
|
112 | + * @param mixed $value Value |
|
113 | + * |
|
114 | + * @return self |
|
115 | + */ |
|
116 | + public function set($key, $value = null): self; |
|
117 | 117 | |
118 | - /** |
|
119 | - * Get content as a string of HTML. |
|
120 | - * |
|
121 | - * @return string |
|
122 | - */ |
|
123 | - public function toHtml(); |
|
118 | + /** |
|
119 | + * Get content as a string of HTML. |
|
120 | + * |
|
121 | + * @return string |
|
122 | + */ |
|
123 | + public function toHtml(); |
|
124 | 124 | } |
125 | 125 | \ No newline at end of file |
@@ -121,15 +121,15 @@ discard block |
||
121 | 121 | */ |
122 | 122 | public function rebinding($id, Closure $callback): mixed; |
123 | 123 | |
124 | - /** |
|
125 | - * Refresh an instance on the given target and method. |
|
126 | - * |
|
127 | - * @param string $id |
|
128 | - * @param mixed $target |
|
129 | - * @param string $method |
|
130 | - * |
|
131 | - * @return mixed |
|
132 | - */ |
|
124 | + /** |
|
125 | + * Refresh an instance on the given target and method. |
|
126 | + * |
|
127 | + * @param string $id |
|
128 | + * @param mixed $target |
|
129 | + * @param string $method |
|
130 | + * |
|
131 | + * @return mixed |
|
132 | + */ |
|
133 | 133 | public function refresh($id, mixed $target, string $method): mixed; |
134 | 134 | |
135 | 135 | /** |
@@ -139,14 +139,14 @@ discard block |
||
139 | 139 | */ |
140 | 140 | public function getBindings(): array; |
141 | 141 | |
142 | - /** |
|
143 | - * Register an existing instance as singleton in the container. |
|
144 | - * |
|
145 | - * @param string $id |
|
146 | - * @param mixed $instance |
|
147 | - * |
|
148 | - * @return mixed |
|
149 | - */ |
|
142 | + /** |
|
143 | + * Register an existing instance as singleton in the container. |
|
144 | + * |
|
145 | + * @param string $id |
|
146 | + * @param mixed $instance |
|
147 | + * |
|
148 | + * @return mixed |
|
149 | + */ |
|
150 | 150 | public function instance($id, mixed $instance); |
151 | 151 | |
152 | 152 | /** |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @return void |
53 | 53 | */ |
54 | - public function bind($id, Closure|string $value = null, bool $singleton = false): void; |
|
54 | + public function bind($id, Closure | string $value = null, bool $singleton = false): void; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * Determine if the given id type has been resolved. |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * |
81 | 81 | * @return void |
82 | 82 | */ |
83 | - public function singleton($id, Closure|string $value = null): void; |
|
83 | + public function singleton($id, Closure | string $value = null): void; |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Instantiate a class instance of the given type. |
@@ -389,9 +389,9 @@ |
||
389 | 389 | public function isLocale($locale): bool; |
390 | 390 | |
391 | 391 | /** |
392 | - * Shutdown the application. |
|
393 | - * |
|
394 | - * @return void |
|
395 | - */ |
|
396 | - public function shutdown(): void; |
|
392 | + * Shutdown the application. |
|
393 | + * |
|
394 | + * @return void |
|
395 | + */ |
|
396 | + public function shutdown(): void; |
|
397 | 397 | } |
398 | 398 | \ No newline at end of file |
@@ -44,7 +44,7 @@ |
||
44 | 44 | * |
45 | 45 | * @return static |
46 | 46 | */ |
47 | - public function define(string $ability, callable|string $callback): static; |
|
47 | + public function define(string $ability, callable | string $callback): static; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * Define abilities for a resource. |
@@ -31,14 +31,14 @@ discard block |
||
31 | 31 | */ |
32 | 32 | interface Application |
33 | 33 | { |
34 | - /** |
|
34 | + /** |
|
35 | 35 | * Gets the name of the application. |
36 | 36 | * |
37 | 37 | * @return string |
38 | 38 | */ |
39 | 39 | public function getName(): string; |
40 | 40 | |
41 | - /** |
|
41 | + /** |
|
42 | 42 | * Sets the name of the application. |
43 | 43 | * |
44 | 44 | * @param string $name The application name |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function setName(string $name): void; |
49 | 49 | |
50 | - /** |
|
50 | + /** |
|
51 | 51 | * Gets the version of the application. |
52 | 52 | * |
53 | 53 | * @return string |
54 | 54 | */ |
55 | 55 | public function getVersion(): string; |
56 | 56 | |
57 | - /** |
|
57 | + /** |
|
58 | 58 | * Sets the name of the application. |
59 | 59 | * |
60 | 60 | * @param string $version The application version |
@@ -63,17 +63,17 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function setVersion(string $version): void; |
65 | 65 | |
66 | - /** |
|
67 | - * Runs the current command discovered on the CLI. |
|
66 | + /** |
|
67 | + * Runs the current command discovered on the CLI. |
|
68 | 68 | * |
69 | 69 | * @param \Syscodes\Components\Contracts\Console\Input\Input|null $input The input interface implemented |
70 | 70 | * @param \Syscodes\Components\Contracts\Console\Output\Output|null $output The output interface implemented |
71 | 71 | * |
72 | 72 | * @return int |
73 | - */ |
|
74 | - public function run(InputInterface $input = null, OutputInterface $output = null); |
|
73 | + */ |
|
74 | + public function run(InputInterface $input = null, OutputInterface $output = null); |
|
75 | 75 | |
76 | - /** |
|
76 | + /** |
|
77 | 77 | * Executes the current application of console. |
78 | 78 | * |
79 | 79 | * @param \Syscodes\Components\Contracts\Console\Input\Input $input The input interface implemented |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function doExecute(InputInterface $input, OutputInterface $output): int; |
85 | 85 | |
86 | - /** |
|
86 | + /** |
|
87 | 87 | * Adds a command object. |
88 | 88 | * |
89 | 89 | * @param \Syscodes\Components\Console\Command\Command $command |
@@ -94,14 +94,14 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function addCommand(Command $command); |
96 | 96 | |
97 | - /** |
|
97 | + /** |
|
98 | 98 | * Gets input definition. |
99 | 99 | * |
100 | 100 | * @return \Syscodes\Components\Console\Input\InputDefinition |
101 | 101 | */ |
102 | 102 | public function getDefinition(); |
103 | 103 | |
104 | - /** |
|
104 | + /** |
|
105 | 105 | * Finds a command by name. |
106 | 106 | * |
107 | 107 | * @param string $name The command name |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function findCommand(string $name); |
114 | 114 | |
115 | - /** |
|
115 | + /** |
|
116 | 116 | * Gets a registered command. |
117 | 117 | * |
118 | 118 | * @param string $name The command name |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function get(string $name); |
125 | 125 | |
126 | - /** |
|
126 | + /** |
|
127 | 127 | * Returns true if the command exists, false otherwise. |
128 | 128 | * |
129 | 129 | * @param string $name The command name |
@@ -132,18 +132,18 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function has(string $name): bool; |
134 | 134 | |
135 | - /** |
|
135 | + /** |
|
136 | 136 | * Runs the current command. |
137 | 137 | * |
138 | 138 | * @param \Syscodes\Components\Console\Command\Command $command The command name |
139 | 139 | * @param \Syscodes\Components\Contracts\Console\Input\Input $input The input interface implemented |
140 | - * @param \Syscodes\Components\Contracts\Console\Output\Output $output The output interface implemented |
|
140 | + * @param \Syscodes\Components\Contracts\Console\Output\Output $output The output interface implemented |
|
141 | 141 | * |
142 | 142 | * @return int 0 if everything went fine, or an error code |
143 | 143 | */ |
144 | 144 | public function doCommand(Command $command, InputInterface $input, OutputInterface $output): int; |
145 | 145 | |
146 | - /** |
|
146 | + /** |
|
147 | 147 | * Gets the help message. |
148 | 148 | * |
149 | 149 | * @return string |
@@ -29,123 +29,123 @@ |
||
29 | 29 | */ |
30 | 30 | interface Output |
31 | 31 | { |
32 | - // Output formatter |
|
33 | - public const OUTPUT_NORMAL = 1; |
|
34 | - public const OUTPUT_RAW = 2; |
|
35 | - public const OUTPUT_PLAIN = 3; |
|
36 | - |
|
37 | - // Output verbose |
|
38 | - public const VERBOSITY_QUIET = 16; |
|
39 | - public const VERBOSITY_NORMAL = 32; |
|
40 | - public const VERBOSITY_VERBOSE = 64; |
|
41 | - public const VERBOSITY_VERY_VERBOSE = 128; |
|
42 | - public const VERBOSITY_DEBUG = 256; |
|
43 | - |
|
44 | - /** |
|
45 | - * Gets the decorated flag. |
|
46 | - * |
|
47 | - * @return bool |
|
48 | - */ |
|
49 | - public function getDecorated(): bool; |
|
50 | - |
|
51 | - /** |
|
52 | - * Sets the decorated flag. |
|
53 | - * |
|
54 | - * @param bool $decorated Whether to decorated messages |
|
55 | - * |
|
56 | - * @return void |
|
57 | - */ |
|
58 | - public function setDecorated(bool $decorated): void; |
|
59 | - |
|
60 | - /** |
|
61 | - * Returns a output formatter instance. |
|
62 | - * |
|
63 | - * @return \Syscodes\Components\Contracts\Console\Output\OutputFormatter |
|
64 | - */ |
|
65 | - public function getFormatter(); |
|
66 | - |
|
67 | - /** |
|
68 | - * Sets a output formatter instance. |
|
69 | - * |
|
70 | - * @param \Syscodes\Components\Contracts\Console\Output\OutputFormatter $formatter; |
|
71 | - * |
|
72 | - * @return void |
|
73 | - */ |
|
74 | - public function setFormatter(OutputFormatterInterface $formatter): void; |
|
75 | - |
|
76 | - /** |
|
77 | - * Gets the current verbosity of the output. |
|
78 | - * |
|
79 | - * @return int |
|
80 | - */ |
|
81 | - public function getVerbosity(): int; |
|
82 | - |
|
83 | - /** |
|
84 | - * Sets the verbosity of the output. |
|
85 | - * |
|
86 | - * @param int $level |
|
87 | - * |
|
88 | - * @return void |
|
89 | - */ |
|
90 | - public function setVerbosity(int $level): void; |
|
91 | - |
|
92 | - /** |
|
93 | - * Returns whether verbosity is quiet (-q). |
|
94 | - * |
|
95 | - * @return bool |
|
96 | - */ |
|
97 | - public function isQuiet(): bool; |
|
98 | - |
|
99 | - /** |
|
100 | - * Returns whether verbosity is verbose (-v). |
|
101 | - * |
|
102 | - * @return bool |
|
103 | - */ |
|
104 | - public function isVerbose(): bool; |
|
105 | - |
|
106 | - /** |
|
107 | - * Returns whether verbosity is very verbose (-vv). |
|
108 | - * |
|
109 | - * @return bool |
|
110 | - */ |
|
111 | - public function isVeryVerbose(): bool; |
|
112 | - |
|
113 | - /** |
|
114 | - * Returns whether verbosity is debug (-vvv). |
|
115 | - * |
|
116 | - * @return bool |
|
117 | - */ |
|
118 | - public function isDebug(): bool; |
|
32 | + // Output formatter |
|
33 | + public const OUTPUT_NORMAL = 1; |
|
34 | + public const OUTPUT_RAW = 2; |
|
35 | + public const OUTPUT_PLAIN = 3; |
|
36 | + |
|
37 | + // Output verbose |
|
38 | + public const VERBOSITY_QUIET = 16; |
|
39 | + public const VERBOSITY_NORMAL = 32; |
|
40 | + public const VERBOSITY_VERBOSE = 64; |
|
41 | + public const VERBOSITY_VERY_VERBOSE = 128; |
|
42 | + public const VERBOSITY_DEBUG = 256; |
|
119 | 43 | |
120 | 44 | /** |
121 | - * Outputs a string to the cli. If you send an array it will implode them |
|
122 | - * with a line break. |
|
123 | - * |
|
124 | - * @param string|iterable $messages The text to output, or array of lines |
|
125 | - * @param bool $newline Add a newline command |
|
126 | - * @param int $options A bitmask of options (0 is considered the same as self::OUTPUT_NORMAL) |
|
127 | - * |
|
128 | - * @return string |
|
129 | - */ |
|
130 | - public function write($messages, bool $newline = false, int $options = 0); |
|
45 | + * Gets the decorated flag. |
|
46 | + * |
|
47 | + * @return bool |
|
48 | + */ |
|
49 | + public function getDecorated(): bool; |
|
131 | 50 | |
132 | 51 | /** |
133 | - * Writes a message to the output and adds a newline at the end. |
|
134 | - * |
|
135 | - * @param string|iterable $messages The message as an iterable of strings or a single string |
|
136 | - * @param int $options A bitmask of options (0 is considered the same as self::OUTPUT_NORMAL) |
|
137 | - * |
|
138 | - * @return string |
|
139 | - */ |
|
140 | - public function writeln($messages, int $options = 0); |
|
141 | - |
|
142 | - /** |
|
143 | - * Writes a string formatting for stantard output. |
|
144 | - * |
|
145 | - * @param string $message |
|
146 | - * @param string|null $style |
|
147 | - * |
|
148 | - * @return void |
|
149 | - */ |
|
150 | - public function commandline(string $message, string $style = null); |
|
52 | + * Sets the decorated flag. |
|
53 | + * |
|
54 | + * @param bool $decorated Whether to decorated messages |
|
55 | + * |
|
56 | + * @return void |
|
57 | + */ |
|
58 | + public function setDecorated(bool $decorated): void; |
|
59 | + |
|
60 | + /** |
|
61 | + * Returns a output formatter instance. |
|
62 | + * |
|
63 | + * @return \Syscodes\Components\Contracts\Console\Output\OutputFormatter |
|
64 | + */ |
|
65 | + public function getFormatter(); |
|
66 | + |
|
67 | + /** |
|
68 | + * Sets a output formatter instance. |
|
69 | + * |
|
70 | + * @param \Syscodes\Components\Contracts\Console\Output\OutputFormatter $formatter; |
|
71 | + * |
|
72 | + * @return void |
|
73 | + */ |
|
74 | + public function setFormatter(OutputFormatterInterface $formatter): void; |
|
75 | + |
|
76 | + /** |
|
77 | + * Gets the current verbosity of the output. |
|
78 | + * |
|
79 | + * @return int |
|
80 | + */ |
|
81 | + public function getVerbosity(): int; |
|
82 | + |
|
83 | + /** |
|
84 | + * Sets the verbosity of the output. |
|
85 | + * |
|
86 | + * @param int $level |
|
87 | + * |
|
88 | + * @return void |
|
89 | + */ |
|
90 | + public function setVerbosity(int $level): void; |
|
91 | + |
|
92 | + /** |
|
93 | + * Returns whether verbosity is quiet (-q). |
|
94 | + * |
|
95 | + * @return bool |
|
96 | + */ |
|
97 | + public function isQuiet(): bool; |
|
98 | + |
|
99 | + /** |
|
100 | + * Returns whether verbosity is verbose (-v). |
|
101 | + * |
|
102 | + * @return bool |
|
103 | + */ |
|
104 | + public function isVerbose(): bool; |
|
105 | + |
|
106 | + /** |
|
107 | + * Returns whether verbosity is very verbose (-vv). |
|
108 | + * |
|
109 | + * @return bool |
|
110 | + */ |
|
111 | + public function isVeryVerbose(): bool; |
|
112 | + |
|
113 | + /** |
|
114 | + * Returns whether verbosity is debug (-vvv). |
|
115 | + * |
|
116 | + * @return bool |
|
117 | + */ |
|
118 | + public function isDebug(): bool; |
|
119 | + |
|
120 | + /** |
|
121 | + * Outputs a string to the cli. If you send an array it will implode them |
|
122 | + * with a line break. |
|
123 | + * |
|
124 | + * @param string|iterable $messages The text to output, or array of lines |
|
125 | + * @param bool $newline Add a newline command |
|
126 | + * @param int $options A bitmask of options (0 is considered the same as self::OUTPUT_NORMAL) |
|
127 | + * |
|
128 | + * @return string |
|
129 | + */ |
|
130 | + public function write($messages, bool $newline = false, int $options = 0); |
|
131 | + |
|
132 | + /** |
|
133 | + * Writes a message to the output and adds a newline at the end. |
|
134 | + * |
|
135 | + * @param string|iterable $messages The message as an iterable of strings or a single string |
|
136 | + * @param int $options A bitmask of options (0 is considered the same as self::OUTPUT_NORMAL) |
|
137 | + * |
|
138 | + * @return string |
|
139 | + */ |
|
140 | + public function writeln($messages, int $options = 0); |
|
141 | + |
|
142 | + /** |
|
143 | + * Writes a string formatting for stantard output. |
|
144 | + * |
|
145 | + * @param string $message |
|
146 | + * @param string|null $style |
|
147 | + * |
|
148 | + * @return void |
|
149 | + */ |
|
150 | + public function commandline(string $message, string $style = null); |
|
151 | 151 | } |
152 | 152 | \ No newline at end of file |