Completed
Push — master ( d3a073...5737c8 )
by Greg
02:21
created

src/Task/Docker/loadTasks.php (8 issues)

Labels
Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
namespace Robo\Task\Docker;
3
4
trait loadTasks
5
{
6
    /**
7
     * @param string $image
8
     *
9
     * @return \Robo\Task\Docker\Run
10
     */
11
    protected function taskDockerRun($image)
12
    {
13
        return $this->task(Run::class, $image);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
14
    }
15
16
    /**
17
     * @param string $image
18
     *
19
     * @return \Robo\Task\Docker\Pull
20
     */
21
    protected function taskDockerPull($image)
22
    {
23
        return $this->task(Pull::class, $image);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
24
    }
25
26
    /**
27
     * @param string $path
28
     *
29
     * @return \Robo\Task\Docker\Build
30
     */
31
    protected function taskDockerBuild($path = '.')
32
    {
33
        return $this->task(Build::class, $path);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
34
    }
35
36
    /**
37
     * @param string|\Robo\Task\Docker\Result $cidOrResult
38
     *
39
     * @return \Robo\Task\Docker\Stop
40
     */
41
    protected function taskDockerStop($cidOrResult)
42
    {
43
        return $this->task(Stop::class, $cidOrResult);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
44
    }
45
46
    /**
47
     * @param string|\Robo\Task\Docker\Result $cidOrResult
48
     *
49
     * @return \Robo\Task\Docker\Commit
50
     */
51
    protected function taskDockerCommit($cidOrResult)
52
    {
53
        return $this->task(Commit::class, $cidOrResult);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
54
    }
55
56
    /**
57
     * @param string|\Robo\Task\Docker\Result $cidOrResult
58
     *
59
     * @return \Robo\Task\Docker\Start
60
     */
61
    protected function taskDockerStart($cidOrResult)
62
    {
63
        return $this->task(Start::class, $cidOrResult);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
64
    }
65
66
    /**
67
     * @param string|\Robo\Task\Docker\Result $cidOrResult
68
     *
69
     * @return \Robo\Task\Docker\Remove
70
     */
71
    protected function taskDockerRemove($cidOrResult)
72
    {
73
        return $this->task(Remove::class, $cidOrResult);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
74
    }
75
76
    /**
77
     * @param string|\Robo\Task\Docker\Result $cidOrResult
78
     *
79
     * @return \Robo\Task\Docker\Exec
80
     */
81
    protected function taskDockerExec($cidOrResult)
82
    {
83
        return $this->task(Exec::class, $cidOrResult);
0 ignored issues
show
It seems like task() must be provided by classes using this trait. How about adding it as abstract method to this trait?

This check looks for methods that are used by a trait but not required by it.

To illustrate, let’s look at the following code example

trait Idable {
    public function equalIds(Idable $other) {
        return $this->getId() === $other->getId();
    }
}

The trait Idable provides a method equalsId that in turn relies on the method getId(). If this method does not exist on a class mixing in this trait, the method will fail.

Adding the getId() as an abstract method to the trait will make sure it is available.

Loading history...
84
    }
85
}
86