loadTasks::taskPackPhar()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Robo\Task\Development;
4
5
trait loadTasks
6
{
7
    /**
8
     * @param string $filename
9
     *
10
     * @return \Robo\Task\Development\Changelog|\Robo\Collection\CollectionBuilder
11
     */
12
    protected function taskChangelog($filename = 'CHANGELOG.md')
13
    {
14
        return $this->task(Changelog::class, $filename);
0 ignored issues
show
Bug introduced by
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...
15
    }
16
17
    /**
18
     * @param string $filename
19
     *
20
     * @return \Robo\Task\Development\GenerateMarkdownDoc|\Robo\Collection\CollectionBuilder
21
     */
22
    protected function taskGenDoc($filename)
23
    {
24
        return $this->task(GenerateMarkdownDoc::class, $filename);
0 ignored issues
show
Bug introduced by
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...
25
    }
26
27
    /**
28
     * @param string $className
29
     * @param string $wrapperClassName
30
     *
31
     * @return \Robo\Task\Development\GenerateTask|\Robo\Collection\CollectionBuilder
32
     */
33
    protected function taskGenTask($className, $wrapperClassName = '')
34
    {
35
        return $this->task(GenerateTask::class, $className, $wrapperClassName);
0 ignored issues
show
Bug introduced by
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...
36
    }
37
38
    /**
39
     * @param string $pathToSemVer
40
     *
41
     * @return \Robo\Task\Development\SemVer|\Robo\Collection\CollectionBuilder
42
     */
43
    protected function taskSemVer($pathToSemVer = '.semver')
44
    {
45
        return $this->task(SemVer::class, $pathToSemVer);
0 ignored issues
show
Bug introduced by
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...
46
    }
47
48
    /**
49
     * @param int $port
50
     *
51
     * @return \Robo\Task\Development\PhpServer|\Robo\Collection\CollectionBuilder
52
     */
53
    protected function taskServer($port = 8000)
54
    {
55
        return $this->task(PhpServer::class, $port);
0 ignored issues
show
Bug introduced by
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...
56
    }
57
58
    /**
59
     * @param string $filename
60
     *
61
     * @return \Robo\Task\Development\PackPhar|\Robo\Collection\CollectionBuilder
62
     */
63
    protected function taskPackPhar($filename)
64
    {
65
        return $this->task(PackPhar::class, $filename);
0 ignored issues
show
Bug introduced by
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...
66
    }
67
68
    /**
69
     * @param string $tag
70
     *
71
     * @return \Robo\Task\Development\GitHubRelease|\Robo\Collection\CollectionBuilder
72
     */
73
    protected function taskGitHubRelease($tag)
74
    {
75
        return $this->task(GitHubRelease::class, $tag);
0 ignored issues
show
Bug introduced by
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...
76
    }
77
78
    /**
79
     * @param string|array $url
80
     *
81
     * @return \Robo\Task\Development\OpenBrowser|\Robo\Collection\CollectionBuilder
82
     */
83
    protected function taskOpenBrowser($url)
84
    {
85
        return $this->task(OpenBrowser::class, $url);
0 ignored issues
show
Bug introduced by
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...
86
    }
87
}
88