SapphireSoapServerTest_MyServer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 7
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A Link() 0 4 1
1
<?php
2
/**
3
 */
4
class SapphireSoapServerTest extends FunctionalTest
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
5
{
6
    /**
7
     * @see http://open.silverstripe.com/ticket/4570
8
     */
9
    public function testWsdl()
10
    {
11
        $response = $this->get('SapphireSoapServerTest_MyServer/wsdl');
12
13
        $this->assertEquals(
0 ignored issues
show
Bug introduced by
The method assertEquals() does not seem to exist on object<SapphireSoapServerTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
14
            $response->getHeader('Content-Type'),
15
            'text/xml; charset=utf-8',
16
            'wsdl request returns with correct XML content type'
17
        );
18
    }
19
}
20
21
/**
22
 */
23
class SapphireSoapServerTest_MyServer extends SapphireSoapServer
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
24
{
25
    public function Link($action = null)
26
    {
27
        return Controller::join_links('SapphireSoapServerTest_MyServer', $action);
28
    }
29
}
30