Test Failed
Push — 135-map-multiple-wordpress-obj... ( 3634c2...bb35fb )
by Jonathan
12:00
created

PackageVersionHeader   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
1
<?php
0 ignored issues
show
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
/*
3
 * Copyright (c) 2007, salesforce.com, inc.
4
 * All rights reserved.
5
 *
6
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided
7
 * that the following conditions are met:
8
 *
9
 *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
10
 *    following disclaimer.
11
 *
12
 *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
13
 *    the following disclaimer in the documentation and/or other materials provided with the distribution.
14
 *
15
 *    Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or
16
 *    promote products derived from this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
19
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20
 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
22
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
 * POSSIBILITY OF SUCH DAMAGE.
26
 */
27
28
/**
29
 * This file contains three classes.
30
 * @package SalesforceSoapClient
31
 */
32
33
34
class CallOptions {
35
	public $client;
36
	public $defaultNamespace;
37
38
	public function __construct($client, $defaultNamespace=NULL) {
0 ignored issues
show
introduced by
Expected 1 space between argument "$defaultNamespace" and equals sign; 0 found
Loading history...
introduced by
Expected 1 space between default value and equals sign for argument "$defaultNamespace";
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL must be lowercase; expected null, but found NULL.
Loading history...
39
		$this->client = $client;
40
		$this->defaultNamespace = $defaultNamespace;
41
	}
42
}
43
44
45
46
/**
47
 * To be used with Create and Update operations.
48
 * Only one attribute can be set at a time.
49
 *
50
 * @package SalesforceSoapClient
51
 */
52
class AssignmentRuleHeader {
53
	// int
54
	public $assignmentRuleId;
55
	// boolean
56
	public $useDefaultRuleFlag;
57
58
	/**
59
	 * Constructor.  Only one param can be set.
60
	 *
61
	 * @param int $id  AssignmentRuleId
62
	 * @param boolean $flag  UseDefaultRule flag
63
	 */
64
	public function __construct($id = NULL, $flag = NULL) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL must be lowercase; expected null, but found NULL.
Loading history...
65
		if ($id != NULL) {
0 ignored issues
show
Bug Best Practice introduced by
It seems like you are loosely comparing $id of type integer|null against null; this is ambiguous if the integer can be zero. Consider using a strict comparison !== instead.
Loading history...
introduced by
No space after opening parenthesis is prohibited
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL must be lowercase; expected null, but found NULL.
Loading history...
introduced by
No space before closing parenthesis is prohibited
Loading history...
66
			$this->assignmentRuleId = $id;
67
		}
68
		if ($flag != NULL) {
0 ignored issues
show
introduced by
No space after opening parenthesis is prohibited
Loading history...
Coding Style introduced by
TRUE, FALSE and NULL must be lowercase; expected null, but found NULL.
Loading history...
introduced by
No space before closing parenthesis is prohibited
Loading history...
69
			$this->useDefaultRuleFlag = $flag;
70
		}
71
	}
72
}
73
74
/**
75
 * To be used with Create and Update operations.
76
 *
77
 * @package SalesforceSoapClient
78
 */
79
class MruHeader {
80
	// boolean that Indicates whether to update the list of most recently used items (True) or not (False).
81
	public $updateMruFlag;
82
83
	public function __construct($bool) {
84
		$this->updateMruFlag = $bool;
85
	}
86
}
87
88
/**
89
 * To be used with the Login operation.
90
 *
91
 * @package SalesforceSoapClient
92
 */
93
class LoginScopeHeader {
94
  // boolean that Indicates whether to update the list of most recently used items (True) or not (False).
95
  public $organizationId;
96
  public $portalId;
97
98
  public function __construct($orgId = NULL, $portalId = NULL) {
0 ignored issues
show
Coding Style introduced by
TRUE, FALSE and NULL must be lowercase; expected null, but found NULL.
Loading history...
99
    $this->organizationId = $orgId;
100
    $this->portalId = $portalId;
101
  }
102
}
103
104
/**
105
 * To be used with Retrieve, Query, and QueryMore operations.
106
 *
107
 * @package SalesforceSoapClient
108
 */
109
class QueryOptions {
110
	// int - Batch size for the number of records returned in a query or queryMore call. The default is 500; the minimum is 200, and the maximum is 2,000.
111
	public $batchSize;
112
113
	/**
114
	 * Constructor
115
	 *
116
	 * @param int $limit  Batch size
117
	 */
118
	public function __construct($limit) {
119
		$this->batchSize = $limit;
120
	}
121
}
122
123
class EmailHeader {
124
	public $triggerAutoResponseEmail;
125
	public $triggerOtherEmail;
126
	public $triggerUserEmail;
127
128
	public function __construct($triggerAutoResponseEmail = false, $triggerOtherEmail = false, $triggerUserEmail = false) {
129
		$this->triggerAutoResponseEmail = $triggerAutoResponseEmail;
130
		$this->triggerOtherEmail = $triggerOtherEmail;
131
		$this->triggerUserEmail = $triggerUserEmail;
132
	}
133
}
134
135
class UserTerritoryDeleteHeader {
136
	public $transferToUserId;
137
138
	public function __construct($transferToUserId) {
139
		$this->transferToUserId = $transferToUserId;
140
	}
141
}
142
143
class AllowFieldTruncationHeader {
144
    public $allowFieldTruncation;
145
    
146
    public function __construct($allowFieldTruncation) {
147
        $this->allowFieldTruncation = $allowFieldTruncation;
148
    }
149
}
150
151
class LocaleOptions {
152
    public $language;
153
    
154
    /**
155
     * Class constructor.
156
     * 
157
     * @param string $language
158
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
159
     */
160
    public function __construct($language) {
161
        $this->language = $language;
162
    }
163
}
164
165
class PackageVersionHeader {
166
    /**
167
     * @var array $packageVersions
168
     */
169
    public $packageVersions;
170
    
171
    /**
172
     * Class constructor.
173
     * 
174
     * @param array $packageVersions
175
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
176
     */
177
    public function __construct($packageVersions) {
178
        $this->packageVersions = $packageVersions;
179
    }
180
}
181
182
/**
183
 * This class is used by PackageVersionHeader
184
 * @see PackageVersionHeader
185
 */
186
class PackageVersion {
187
    public $majorNumber;
188
    public $minorNumber;
189
    public $namespace;
190
    
191
    /**
192
     * Class constructor.
193
     * 
194
     * @param int $majorNumber
195
     * @param int $minorNumber
196
     * @param string $namespace
197
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
198
     */
199
    public function __construct($majorNumber, $minorNumber, $namespace) {
200
        $this->majorNumber = $majorNumber;
201
        $this->minorNumber = $minorNumber;
202
        $this->namespace = $namespace;
203
    }
204
}
205
206
?>
207