Completed
Branch master (5acf81)
by Steevan
04:21
created

ByReferenceTrait::removeByReference()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace steevanb\SymfonyFormOptionsBuilder\Behavior;
4
5 View Code Duplication
trait ByReferenceTrait
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...
6
{
7
    use OptionAccessorsTrait;
8
9
    /**
10
     * @param bool $byReference
11
     * @return $this
12
     * @link http://symfony.com/doc/current/reference/forms/types/collection.html#by-reference
13
     */
14
    public function setByReference($byReference = true)
15
    {
16
        return $this->setOption('by_reference', $byReference);
17
    }
18
19
    /**
20
     * @return bool|string
21
     * @link http://symfony.com/doc/current/reference/forms/types/collection.html#by-reference
22
     */
23
    public function getByReference()
24
    {
25
        return $this->getOption('by_reference');
26
    }
27
28
    /**
29
     * @return $this
30
     * @link http://symfony.com/doc/current/reference/forms/types/collection.html#by-reference
31
     */
32
    public function removeByReference()
33
    {
34
        return $this->removeOption('by_reference');
35
    }
36
}
37