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 = 126-131 lines in 2 locations

examples/document_literal_wrapped/ObjectExampleSoapServer.php 1 location

@@ 39-169 (lines=131) @@
36
    public $number;
37
}
38
39
class ObjectSoapServer
40
{
41
    /**
42
     * @WebMethod
43
     * @param object $info @string=$name @int=$age
44
     * @return string $returnInfo
45
     */
46
    public function userInfo($info)
47
    {
48
        return 'Your name is: ' . $info->name . ' and you have ' . $info->age . ' years old, it\'s ok?';
49
    }
50
51
    /**
52
     * @WebMethod
53
     * @param string $name
54
     * @param string $number
55
     * @return object $agentNameWithId @(wrapper $agent @className=Agent) @int=$id
56
     */
57
    public function getAgentWithId($name, $number)
58
    {
59
        $agent = new Agent();
60
        $agent->name = $name;
61
        $agent->number = $number;
62
63
        $return = new stdClass();
64
        $return->agent = $agent;
65
        $return->id = 3543456;
66
        return $return;
67
    }
68
69
    /**
70
     * @WebMethod
71
     * @param object $namesInfo @string[]=$names @int=$id
72
     * @return string $namesForId
73
     */
74
    public function namesForId($namesInfo)
75
    {
76
        //FIXME incorrect $names array
77
        return '[#' . $namesInfo->id . '] Names: ' . implode(', ', $namesInfo->names);
78
    }
79
80
    /**
81
     * @WebMethod
82
     * @return object[] $companies @string=$name @int=$id
83
     */
84
    public function getCompanies()
85
    {
86
        //FIXME incorrect response structure
87
        $companies = array();
88
        $companies[0] = new stdClass();
89
        $companies[0]->name = 'Example1';
90
        $companies[0]->id = '1';
91
        $companies[1] = new stdClass();
92
        $companies[1]->name = 'Example2';
93
        $companies[1]->id = '3';
94
        return $companies;
95
    }
96
97
    /**
98
     * @WebMethod
99
     * @return object $listOfAgents @(wrapper[] $agents @className=Agent) @int=$id
100
     */
101
    public function getListOfAgentsWithId()
102
    {
103
        //FIXME incorrect response structure
104
        $obj = new stdClass();
105
        $obj->agents[0] = new Agent();
106
        $obj->agents[0]->name = 'agent1';
107
        $obj->agents[1] = new Agent();
108
        $obj->agents[1]->name = 'agent2';
109
        $obj->id = '555';
110
        return $obj;
111
    }
112
113
    /**
114
     * @WebMethod
115
     * @param object[] $payments @float[]=$payment @string=$user
116
     * @return object[] $paymentsUsers @string=$user @int=$countPayment
117
     */
118
    public function setPayment($payments)
119
    {
120
        //FIXME incorrect response structure
121
        $paymentsUsers = array();
122
        foreach ($payments as $i => $payment) {
123
            $paymentsUsers[$i] = new stdClass();
124
            $paymentsUsers[$i]->user = $payment->user;
125
            $paymentsUsers[$i]->countPayment = count($payment->payment);
126
        }
127
        return $paymentsUsers;
128
    }
129
130
    /**
131
     * @WebMethod
132
     * @return object[] $agentsWithPayment @(wrapper $agent @className=Agent) @float=$payment
133
     */
134
    public function getAgentsWithPayment()
135
    {
136
        //FIXME incorrect response structure
137
        $obj = array();
138
        $obj[0] = new stdClass();
139
        $obj[0]->agent = new Agent();
140
        $obj[0]->agent->name = 'agent1';
141
        $obj[0]->payment = '123.56';
142
        $obj[1] = new stdClass();
143
        $obj[1]->agent = new Agent();
144
        $obj[1]->agent->name = 'agent2';
145
        $obj[1]->payment = '6546.56';
146
        return $obj;
147
    }
148
149
    /**
150
     * @WebMethod
151
     * @return object[] $employeesList @(wrapper[] $agents @className=Agent)
152
     */
153
    public function getEmployeesWithAgents()
154
    {
155
        //FIXME incorrect response structure
156
        $obj = array();
157
        $obj[0] = new stdClass();
158
        $obj[0]->agents[0] = new Agent();
159
        $obj[0]->agents[0]->name = 'agent1';
160
        $obj[0]->agents[1] = new Agent();
161
        $obj[0]->agents[1]->name = 'agent2';
162
        $obj[1] = new stdClass();
163
        $obj[1]->agents[0] = new Agent();
164
        $obj[1]->agents[0]->name = 'agent3';
165
        $obj[1]->agents[1] = new Agent();
166
        $obj[1]->agents[1]->name = 'agent4';
167
        return $obj;
168
    }
169
}

examples/rpc_encoded/ObjectExampleSoapServer.php 1 location

@@ 38-163 (lines=126) @@
35
    public $number;
36
}
37
38
class ObjectSoapServer
39
{
40
    /**
41
     * @WebMethod
42
     * @param object $info @string=$name @int=$age
43
     * @return string $returnInfo
44
     */
45
    public function userInfo($info)
46
    {
47
        return 'Your name is: ' . $info->name . ' and you have ' . $info->age . ' years old, it\'s ok?';
48
    }
49
50
    /**
51
     * @WebMethod
52
     * @param string $name
53
     * @param string $number
54
     * @return object $agentNameWithId @(wrapper $agent @className=Agent) @int=$id
55
     */
56
    public function getAgentWithId($name, $number)
57
    {
58
        $agent = new Agent();
59
        $agent->name = $name;
60
        $agent->number = $number;
61
62
        $return = new stdClass();
63
        $return->agent = $agent;
64
        $return->id = 3543456;
65
        return $return;
66
    }
67
68
    /**
69
     * @WebMethod
70
     * @param object $namesInfo @string[]=$names @int=$id
71
     * @return string $namesForId
72
     */
73
    public function namesForId($namesInfo)
74
    {
75
        return '[#' . $namesInfo->id . '] Names: ' . implode(', ', $namesInfo->names);
76
    }
77
78
    /**
79
     * @WebMethod
80
     * @return object[] $companies @string=$name @int=$id
81
     */
82
    public function getCompanies()
83
    {
84
        $companies = array();
85
        $companies[0] = new stdClass();
86
        $companies[0]->name = 'Example1';
87
        $companies[0]->id = '1';
88
        $companies[1] = new stdClass();
89
        $companies[1]->name = 'Example2';
90
        $companies[1]->id = '3';
91
        return $companies;
92
    }
93
94
    /**
95
     * @WebMethod
96
     * @return object $listOfAgents @(wrapper[] $agents @className=Agent) @int=$id
97
     */
98
    public function getListOfAgentsWithId()
99
    {
100
        $obj = new stdClass();
101
        $obj->agents[0] = new Agent();
102
        $obj->agents[0]->name = 'agent1';
103
        $obj->agents[1] = new Agent();
104
        $obj->agents[1]->name = 'agent2';
105
        $obj->id = '555';
106
        return $obj;
107
    }
108
109
    /**
110
     * @WebMethod
111
     * @param object[] $payments @float[]=$payment @string=$user
112
     * @return object[] $paymentsUsers @string=$user @int=$countPayment
113
     */
114
    public function setPayment($payments)
115
    {
116
        $paymentsUsers = array();
117
        foreach ($payments as $i => $payment) {
118
            $paymentsUsers[$i] = new stdClass();
119
            $paymentsUsers[$i]->user = $payment->user;
120
            $paymentsUsers[$i]->countPayment = count($payment->payment);
121
        }
122
        return $paymentsUsers;
123
    }
124
125
    /**
126
     * @WebMethod
127
     * @return object[] $agentsWithPayment @(wrapper $agent @className=Agent) @float=$payment
128
     */
129
    public function getAgentsWithPayment()
130
    {
131
        $obj = array();
132
        $obj[0] = new stdClass();
133
        $obj[0]->agent = new Agent();
134
        $obj[0]->agent->name = 'agent1';
135
        $obj[0]->payment = '123.56';
136
        $obj[1] = new stdClass();
137
        $obj[1]->agent = new Agent();
138
        $obj[1]->agent->name = 'agent2';
139
        $obj[1]->payment = '6546.56';
140
        return $obj;
141
    }
142
143
    /**
144
     * @WebMethod
145
     * @return object[] $employeesList @(wrapper[] $agents @className=Agent)
146
     */
147
    public function getEmployeesWithAgents()
148
    {
149
        //FIXME getting correct $employeesList
150
        $obj = array();
151
        $obj[0] = new stdClass();
152
        $obj[0]->agent[0] = new Agent();
153
        $obj[0]->agent[0]->name = 'agent1';
154
        $obj[0]->agent[1] = new Agent();
155
        $obj[0]->agent[1]->name = 'agent2';
156
        $obj[1] = new stdClass();
157
        $obj[1]->agent[0] = new Agent();
158
        $obj[1]->agent[0]->name = 'agent3';
159
        $obj[1]->agent[1] = new Agent();
160
        $obj[1]->agent[1]->name = 'agent4';
161
        return $obj;
162
    }
163
}