SeleniumOptions   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 82
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 10
lcom 1
cbo 0
dl 0
loc 82
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A setSeleniumUrl() 0 4 1
A getSeleniumUrl() 0 4 1
A setSeleniumQuery() 0 4 1
A getSeleniumQuery() 0 4 1
A setSeleniumLogLocation() 0 4 1
A getSeleniumLogLocation() 0 4 1
A setSeleniumJarLocation() 0 4 1
A getSeleniumJarLocation() 0 4 1
A setSeleniumPort() 0 4 1
A getSeleniumPort() 0 4 1
1
<?php
2
3
namespace BeubiQA\Application\Selenium\Options;
4
5
class SeleniumOptions
6
{
7
    protected $seleniumJarLocation = './selenium-server-standalone.jar';
8
    protected $seleniumLogLocation = 'selenium.log';
9
    protected $seleniumPort = 4444;
10
    protected $seleniumUrl = 'http://localhost:%d/selenium-server/driver/';
11
    protected $seleniumQuery = ['query' => ['cmd' => 'getLogMessages']];
12
13
    public function setSeleniumUrl($url)
14
    {
15
        $this->seleniumUrl = $url;
16
    }
17
18
    public function getSeleniumUrl()
19
    {
20
        return sprintf($this->seleniumUrl, $this->getSeleniumPort());
21
    }
22
23
    /**
24
     * @param string $query
25
     */
26
    public function setSeleniumQuery($query)
27
    {
28
        $this->seleniumQuery = $query;
29
    }
30
31
    /**
32
     * @return string
33
     */
34
    public function getSeleniumQuery()
35
    {
36
        return $this->seleniumQuery;
37
    }
38
39
    /**
40
     * @param string $path
41
     */
42
    public function setSeleniumLogLocation($path)
43
    {
44
        $this->seleniumLogLocation = $path;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function getSeleniumLogLocation()
51
    {
52
        return $this->seleniumLogLocation;
53
    }
54
55
    /**
56
     * @param string $path
57
     */
58
    public function setSeleniumJarLocation($path)
59
    {
60
        $this->seleniumJarLocation = $path;
61
    }
62
63
    /**
64
     * @return string
65
     */
66
    public function getSeleniumJarLocation()
67
    {
68
        return $this->seleniumJarLocation;
69
    }
70
71
    /**
72
     * @param int $port
73
     */
74
    public function setSeleniumPort($port)
75
    {
76
        $this->seleniumPort = $port;
77
    }
78
79
    /**
80
     * @return int
81
     */
82
    public function getSeleniumPort()
83
    {
84
        return $this->seleniumPort;
85
    }
86
}
87