Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / consolidation / robo / src / Task / Composer / Validate.php
1 <?php
2 namespace Robo\Task\Composer;
3
4 /**
5  * Composer Validate
6  *
7  * ``` php
8  * <?php
9  * // simple execution
10  * $this->taskComposerValidate()->run();
11  * ?>
12  * ```
13  */
14 class Validate extends Base
15 {
16     /**
17      * {@inheritdoc}
18      */
19     protected $action = 'validate';
20
21     /**
22      * @return $this
23      */
24     public function noCheckAll($noCheckAll = true)
25     {
26         if ($noCheckAll) {
27             $this->option('--no-check-all');
28         }
29         return $this;
30     }
31
32     /**
33      * @return $this
34      */
35     public function noCheckLock($noCheckLock = true)
36     {
37         if ($noCheckLock) {
38             $this->option('--no-check-lock');
39         }
40         return $this;
41     }
42
43     /**
44      * @return $this
45      */
46     public function noCheckPublish($noCheckPublish = true)
47     {
48         if ($noCheckPublish) {
49             $this->option('--no-check-publish');
50         }
51         return $this;
52     }
53
54     /**
55      * @return $this
56      */
57     public function withDependencies($withDependencies = true)
58     {
59         if ($withDependencies) {
60             $this->option('--with-dependencies');
61         }
62         return $this;
63     }
64
65     /**
66      * @return $this
67      */
68     public function strict($strict = true)
69     {
70         if ($strict) {
71             $this->option('--strict');
72         }
73         return $this;
74     }
75
76     /**
77      * {@inheritdoc}
78      */
79     public function run()
80     {
81         $command = $this->getCommand();
82         $this->printTaskInfo('Validating composer.json: {command}', ['command' => $command]);
83         return $this->executeCommand($command);
84     }
85 }