afd7daf8d6f3bf37539a8ed1dcc7b474ebb19b38
[yaffs-website] / vendor / drupal / console / src / Command / Config / PrintConfigValidationTrait.php
1 <?php
2
3 /**
4  * @file
5  * Contains \Drupal\Console\Command\Config\PrintConfigValidationTrait.
6  */
7
8 namespace Drupal\Console\Command\Config;
9
10 trait PrintConfigValidationTrait
11 {
12     protected function printResults($valid)
13     {
14         if ($valid === true) {
15             $this->getIo()->info($this->trans('commands.config.validate.messages.success'));
16             return 0;
17         }
18
19         foreach ($valid as $key => $error) {
20             $this->getIo()->warning($key . ': ' . $error);
21         }
22         return 1;
23     }
24 }