@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | {
|
| 40 | 40 | $xml = $this->getXml(); |
| 41 | 41 | |
| 42 | - return json_decode(json_encode((array) $xml), true); |
|
| 42 | + return json_decode(json_encode((array)$xml), true); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | * @param array $data |
| 49 | 49 | * @return string |
| 50 | 50 | */ |
| 51 | - public function toXml($data=array()) |
|
| 51 | + public function toXml($data = array()) |
|
| 52 | 52 | {
|
| 53 | 53 | return ArrayToXml::convert($data); |
| 54 | 54 | } |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * PhpUnitManager constructor. |
| 14 | 14 | * @param array $data |
| 15 | 15 | */ |
| 16 | - public function __construct($data=array()) |
|
| 16 | + public function __construct($data = array()) |
|
| 17 | 17 | {
|
| 18 | 18 | $this->data = $data; |
| 19 | 19 | } |
@@ -26,21 +26,21 @@ discard block |
||
| 26 | 26 | * @param null|string $value |
| 27 | 27 | * @return mixed |
| 28 | 28 | */ |
| 29 | - public function add($attribute=null,$key=null,$value=null) |
|
| 29 | + public function add($attribute = null, $key = null, $value = null) |
|
| 30 | 30 | {
|
| 31 | 31 | $list = []; |
| 32 | 32 | |
| 33 | 33 | //all add method parameters must come full. |
| 34 | - if(!is_null($attribute) && !is_null($key) && !is_null($value)){
|
|
| 34 | + if (!is_null($attribute) && !is_null($key) && !is_null($value)) {
|
|
| 35 | 35 | |
| 36 | 36 | // we do 0 key control for the testsuite data. |
| 37 | 37 | // this phpunit has a multiple test suite data if 0 key is present. |
| 38 | - if(isset($this->data['testsuites']['testsuite'][0])){
|
|
| 39 | - foreach ($this->data['testsuites']['testsuite'] as $key=>$item){
|
|
| 38 | + if (isset($this->data['testsuites']['testsuite'][0])) {
|
|
| 39 | + foreach ($this->data['testsuites']['testsuite'] as $key=>$item) {
|
|
| 40 | 40 | $list[$key] = $item; |
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | - else{
|
|
| 43 | + else {
|
|
| 44 | 44 | //only for a single test suite data |
| 45 | 45 | $list[] = $this->data['testsuites']['testsuite']; |
| 46 | 46 | } |
@@ -39,8 +39,7 @@ |
||
| 39 | 39 | foreach ($this->data['testsuites']['testsuite'] as $key=>$item){
|
| 40 | 40 | $list[$key] = $item; |
| 41 | 41 | } |
| 42 | - } |
|
| 43 | - else{
|
|
| 42 | + } else{
|
|
| 44 | 43 | //only for a single test suite data |
| 45 | 44 | $list[] = $this->data['testsuites']['testsuite']; |
| 46 | 45 | } |