File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,46 @@ class Color
74
74
'warn ' => ['fg ' => 33 ],
75
75
];
76
76
77
+ /**
78
+ * Returns a line formatted as comment.
79
+ */
80
+ public function comment (string $ text , array $ style = []): string
81
+ {
82
+ return $ this ->line ($ text , static ::$ styles ['comment ' ] + $ style );
83
+ }
84
+
85
+ /**
86
+ * Returns a line formatted as comment.
87
+ */
88
+ public function error (string $ text , array $ style = []): string
89
+ {
90
+ return $ this ->line ($ text , static ::$ styles ['error ' ] + $ style );
91
+ }
92
+
93
+ /**
94
+ * Returns a line formatted as ok msg.
95
+ */
96
+ public function ok (string $ text , array $ style = []): string
97
+ {
98
+ return $ this ->line ($ text , static ::$ styles ['ok ' ] + $ style );
99
+ }
100
+
101
+ /**
102
+ * Returns a line formatted as warning.
103
+ */
104
+ public function warn (string $ text , array $ style = []): string
105
+ {
106
+ return $ this ->line ($ text , static ::$ styles ['warn ' ] + $ style );
107
+ }
108
+
109
+ /**
110
+ * Returns a line formatted as info.
111
+ */
112
+ public function info (string $ text , array $ style = []): string
113
+ {
114
+ return $ this ->line ($ text , static ::$ styles ['info ' ] + $ style );
115
+ }
116
+
77
117
/**
78
118
* Returns the color code for a 256 background color.
79
119
*/
You can’t perform that action at this time.
0 commit comments