Completed
Push — master ( 8b8afe...5f2bbe )
by Greg
02:21
created

src/Task/Composer/loadTasks.php (9 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\Composer;
3
4
trait loadTasks
5
{
6
    /**
7
     * @param null|string $pathToComposer
8
     *
9
     * @return Install
10
     */
11
    protected function taskComposerInstall($pathToComposer = null)
12
    {
13
        return $this->task(Install::class, $pathToComposer);
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 null|string $pathToComposer
18
     *
19
     * @return Update
20
     */
21
    protected function taskComposerUpdate($pathToComposer = null)
22
    {
23
        return $this->task(Update::class, $pathToComposer);
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 null|string $pathToComposer
28
     *
29
     * @return DumpAutoload
30
     */
31
    protected function taskComposerDumpAutoload($pathToComposer = null)
32
    {
33
        return $this->task(DumpAutoload::class, $pathToComposer);
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 null|string $pathToComposer
38
     *
39
     * @return Init
40
     */
41
    protected function taskComposerInit($pathToComposer = null)
42
    {
43
        return $this->task(Init::class, $pathToComposer);
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 null|string $pathToComposer
48
     *
49
     * @return Config
50
     */
51
    protected function taskComposerConfig($pathToComposer = null)
52
    {
53
        return $this->task(Config::class, $pathToComposer);
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 null|string $pathToComposer
58
     *
59
     * @return Validate
60
     */
61
    protected function taskComposerValidate($pathToComposer = null)
62
    {
63
        return $this->task(Validate::class, $pathToComposer);
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 null|string $pathToComposer
68
     *
69
     * @return Remove
70
     */
71
    protected function taskComposerRemove($pathToComposer = null)
72
    {
73
        return $this->task(Remove::class, $pathToComposer);
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 null|string $pathToComposer
78
     *
79
     * @return RequireDependency
80
     */
81
    protected function taskComposerRequire($pathToComposer = null)
82
    {
83
        return $this->task(RequireDependency::class, $pathToComposer);
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
    /**
87
     * @param null|string $pathToComposer
88
     *
89
     * @return CreateProject
90
     */
91
    protected function taskComposerCreateProject($pathToComposer = null)
92
    {
93
        return $this->task(CreateProject::class, $pathToComposer);
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...
94
    }
95
}
96