GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 35-35 lines in 3 locations

src/Builder/OrderedButtonBuilder.php 1 location

@@ 22-56 (lines=35) @@
19
/**
20
 * @author GeLo <[email protected]>
21
 */
22
class OrderedButtonBuilder extends ButtonBuilder implements OrderedFormConfigBuilderInterface, OrderedFormConfigInterface
23
{
24
    /**
25
     * @var string|array|null
26
     */
27
    private $position;
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function getPosition()
33
    {
34
        return $this->position;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function setPosition($position)
41
    {
42
        if ($this->locked) {
43
            throw new BadMethodCallException('The config builder cannot be modified anymore.');
44
        }
45
46
        if (is_string($position) && ($position !== 'first') && ($position !== 'last')) {
47
            throw OrderedConfigurationException::createInvalidStringPosition($this->getName(), $position);
48
        }
49
50
        if (is_array($position) && !isset($position['before']) && !isset($position['after'])) {
51
            throw OrderedConfigurationException::createInvalidArrayPosition($this->getName(), $position);
52
        }
53
54
        $this->position = $position;
55
56
        return $this;
57
    }
58
}
59

src/Builder/OrderedFormBuilder.php 1 location

@@ 22-56 (lines=35) @@
19
/**
20
 * @author GeLo <[email protected]>
21
 */
22
class OrderedFormBuilder extends FormBuilder implements OrderedFormConfigBuilderInterface, OrderedFormConfigInterface
23
{
24
    /**
25
     * @var string|array|null
26
     */
27
    private $position;
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function getPosition()
33
    {
34
        return $this->position;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function setPosition($position)
41
    {
42
        if ($this->locked) {
43
            throw new BadMethodCallException('The config builder cannot be modified anymore.');
44
        }
45
46
        if (is_string($position) && ($position !== 'first') && ($position !== 'last')) {
47
            throw OrderedConfigurationException::createInvalidStringPosition($this->getName(), $position);
48
        }
49
50
        if (is_array($position) && !isset($position['before']) && !isset($position['after'])) {
51
            throw OrderedConfigurationException::createInvalidArrayPosition($this->getName(), $position);
52
        }
53
54
        $this->position = $position;
55
56
        return $this;
57
    }
58
}
59

src/Builder/OrderedSubmitButtonBuilder.php 1 location

@@ 22-56 (lines=35) @@
19
/**
20
 * @author GeLo <[email protected]>
21
 */
22
class OrderedSubmitButtonBuilder extends SubmitButtonBuilder implements OrderedFormConfigBuilderInterface, OrderedFormConfigInterface
23
{
24
    /**
25
     * @var string|array|null
26
     */
27
    private $position;
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function getPosition()
33
    {
34
        return $this->position;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function setPosition($position)
41
    {
42
        if ($this->locked) {
43
            throw new BadMethodCallException('The config builder cannot be modified anymore.');
44
        }
45
46
        if (is_string($position) && ($position !== 'first') && ($position !== 'last')) {
47
            throw OrderedConfigurationException::createInvalidStringPosition($this->getName(), $position);
48
        }
49
50
        if (is_array($position) && !isset($position['before']) && !isset($position['after'])) {
51
            throw OrderedConfigurationException::createInvalidArrayPosition($this->getName(), $position);
52
        }
53
54
        $this->position = $position;
55
56
        return $this;
57
    }
58
}
59