ReleaseNotes::isRelevantTo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 4
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Sugarcrm\UpgradeSpec\Element\Section;
4
5
use Sugarcrm\UpgradeSpec\Data\DataAwareInterface;
6
use Sugarcrm\UpgradeSpec\Data\DataAwareTrait;
7
use Sugarcrm\UpgradeSpec\Element\ElementInterface;
8
use Sugarcrm\UpgradeSpec\Context\Upgrade;
9
use Sugarcrm\UpgradeSpec\Template\RendererAwareInterface;
10
use Sugarcrm\UpgradeSpec\Template\RendererAwareTrait;
11
12 View Code Duplication
class ReleaseNotes implements ElementInterface, RendererAwareInterface, DataAwareInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
    use RendererAwareTrait, DataAwareTrait;
15
16
    /**
17
     * @return string
18
     */
19
    public function getTitle()
20
    {
21
        return 'Review release notes';
22
    }
23
24
    /**
25
     * @return int
26
     */
27
    public function getOrder()
28
    {
29
        return 1;
30
    }
31
32
    /**
33
     * @param Upgrade $context
34
     *
35
     * @return bool
36
     */
37
    public function isRelevantTo(Upgrade $context)
38
    {
39
        return true;
40
    }
41
42
    /**
43
     * @param Upgrade $context
44
     *
45
     * @return string
46
     */
47
    public function getBody(Upgrade $context)
48
    {
49
        return $this->renderer->render('release_notes', [
50
            'release_notes' => $this->dataManager->getReleaseNotes($context),
51
        ]);
52
    }
53
}
54