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