Passed
Push — master ( 2f077f...5155e5 )
by Julito
09:41
created

BaseTool::getTypes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CourseBundle\Tool;
5
6
use Sonata\CoreBundle\Model\BaseEntityManager;
7
use Sylius\Bundle\SettingsBundle\Schema\SchemaInterface;
8
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
9
10
/**
11
 * Class BaseTool.
12
 *
13
 * @package Chamilo\CourseBundle\Tool
14
 */
15
abstract class BaseTool implements ToolInterface
16
{
17
    protected $name;
18
    protected $category;
19
    protected $link;
20
    protected $image;
21
    protected $admin;
22
    protected $courseSettings;
23
    protected $platformSettings;
24
    protected $manager;
25
    protected $types;
26
27
    /**
28
     * @param string $name
29
     * @param string $category
30
     * @param string $link
31
     * @param string $image
32
     * @param $courseSettings
33
     */
34
    public function __construct($name, $category, $link, $image, $courseSettings, $types, $manager = null)
0 ignored issues
show
Unused Code introduced by
The parameter $manager is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

34
    public function __construct($name, $category, $link, $image, $courseSettings, $types, /** @scrutinizer ignore-unused */ $manager = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
35
    {
36
        $this->name = $name;
37
        $this->category = $category;
38
        $this->link = $link;
39
        $this->image = $image;
40
        $this->admin = 0;
41
        $this->courseSettings = $courseSettings;
42
        $this->types = $types;
43
        var_dump($types);
0 ignored issues
show
Security Debugging Code introduced by
var_dump($types) looks like debug code. Are you sure you do not want to remove it?
Loading history...
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function getName()
50
    {
51
        return $this->name;
52
    }
53
54
    /**
55
     * {@inheritdoc}
56
     */
57
    public function getLink()
58
    {
59
        return $this->link;
60
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65
    public function getCategory()
66
    {
67
        return $this->category;
68
    }
69
70
    /**
71
     * {@inheritdoc}
72
     */
73
    public function getTarget()
74
    {
75
        return '_self';
76
    }
77
78
    /**
79
     * {@inheritdoc}
80
     */
81
    public function getImage()
82
    {
83
        return $this->image;
84
    }
85
86
    /**
87
     * @param int $admin
88
     */
89
    public function setAdmin($admin)
90
    {
91
        $this->admin = $admin;
92
    }
93
94
    /**
95
     * @return int
96
     */
97
    public function getAdmin()
98
    {
99
        return $this->admin;
100
    }
101
102
    /**
103
     * @return BaseEntityManager;
104
     */
105
    public function getManager()
106
    {
107
        return $this->manager;
108
    }
109
110
    /**
111
     * @return int
112
     */
113
    public function setCourseSettings($settings)
114
    {
115
        $this->courseSettings = $settings;
116
    }
117
118
    /**
119
     * @return SchemaInterface
120
     */
121
    public function getCourseSettings()
122
    {
123
        return $this->courseSettings;
124
    }
125
126
    public function addType($type)
127
    {
128
        $this->types[] = $type;
129
    }
130
131
    public function getTypes()
132
    {
133
       return $this->types;
134
    }
135
136
    /**
137
     * {@inheritdoc}
138
     */
139
    public function setDefaultSettings(OptionsResolverInterface $resolver)
0 ignored issues
show
Unused Code introduced by
The parameter $resolver is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

139
    public function setDefaultSettings(/** @scrutinizer ignore-unused */ OptionsResolverInterface $resolver)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
140
    {
141
    }
142
}
143