Update::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Robo\Task\Npm;
4
5
/**
6
 * Npm Update
7
 *
8
 * ```php
9
 * <?php
10
 * // simple execution
11
 * $this->taskNpmUpdate()->run();
12
 *
13
 * // prefer dist with custom path
14
 * $this->taskNpmUpdate('path/to/my/npm')
15
 *      ->noDev()
16
 *      ->run();
17
 * ?>
18
 * ```
19
 */
20
class Update extends Base
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    protected $action = 'update';
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function run()
31
    {
32
        $this->printTaskInfo('Update Npm packages: {arguments}', ['arguments' => $this->arguments]);
33
        return $this->executeCommand($this->getCommand());
34
    }
35
}
36