Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/console/Helper/DebugFormatterHelper.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
18 * | 18 * |
19 * @author Fabien Potencier <fabien@symfony.com> | 19 * @author Fabien Potencier <fabien@symfony.com> |
20 */ | 20 */ |
21 class DebugFormatterHelper extends Helper | 21 class DebugFormatterHelper extends Helper |
22 { | 22 { |
23 private $colors = array('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default'); | 23 private $colors = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white', 'default']; |
24 private $started = array(); | 24 private $started = []; |
25 private $count = -1; | 25 private $count = -1; |
26 | 26 |
27 /** | 27 /** |
28 * Starts a debug formatting session. | 28 * Starts a debug formatting session. |
29 * | 29 * |
33 * | 33 * |
34 * @return string | 34 * @return string |
35 */ | 35 */ |
36 public function start($id, $message, $prefix = 'RUN') | 36 public function start($id, $message, $prefix = 'RUN') |
37 { | 37 { |
38 $this->started[$id] = array('border' => ++$this->count % count($this->colors)); | 38 $this->started[$id] = ['border' => ++$this->count % \count($this->colors)]; |
39 | 39 |
40 return sprintf("%s<bg=blue;fg=white> %s </> <fg=blue>%s</>\n", $this->getBorder($id), $prefix, $message); | 40 return sprintf("%s<bg=blue;fg=white> %s </> <fg=blue>%s</>\n", $this->getBorder($id), $prefix, $message); |
41 } | 41 } |
42 | 42 |
43 /** | 43 /** |