Skip to content

Commit e53b960

Browse files
committed
Remove unused members and variables
1 parent e6322e9 commit e53b960

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/Client.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,8 +1133,6 @@ private static function formatHeaders( $soapUrl, $content, $requestType = "POST"
11331133
* @return string response XML
11341134
*/
11351135
public static function getSoapResponse( $soapUrl, $content, $throwException = true ) {
1136-
/* Separate the provided URI into Path & Hostname sections */
1137-
$urlDetails = parse_url( $soapUrl );
11381136
/* Format cUrl headers */
11391137
$headers = self::formatHeaders( $soapUrl, $content );
11401138

@@ -1432,7 +1430,7 @@ public static function parseRetrieveMultipleResponse( Client $client, $soapRespo
14321430
/* If we are in "SimpleMode", just create the Attributes as a stdClass */
14331431
if ( $simpleMode ) {
14341432
/* Create an Array to hold the Entity properties */
1435-
$entityArray = Array();
1433+
$entityArray = [];
14361434
/* Identify the Attributes */
14371435
$keyValueNodes = $entityNode->getElementsByTagName( 'Attributes' )->item( 0 )->getElementsByTagName( 'KeyValuePairOfstringanyType' );
14381436
/* Add the Attributes in the Key/Value Pairs of String/AnyType to the Array */
@@ -1468,7 +1466,7 @@ public static function parseRetrieveMultipleResponse( Client $client, $soapRespo
14681466
*
14691467
* @ignore
14701468
*/
1471-
protected static function addAttributes( Array &$targetArray, DOMNodeList $keyValueNodes, Array $keys = null, $key1 = null ) {
1469+
protected static function addAttributes( array &$targetArray, DOMNodeList $keyValueNodes, Array $keys = null, $key1 = null ) {
14721470
foreach ( $keyValueNodes as $keyValueNode ) {
14731471
/* Get the Attribute name (key) */
14741472
$attributeKey = $keyValueNode->getElementsByTagName( 'key' )->item( 0 )->textContent;
@@ -1524,10 +1522,10 @@ protected static function addAttributes( Array &$targetArray, DOMNodeList $keyVa
15241522
if ( $keys == null ) {
15251523
/* Assume that if there is a duplicate, it's a formatted version of this */
15261524
if ( array_key_exists( $attributeKey, $targetArray ) ) {
1527-
$responseDataArray[ $attributeKey ] = (Object) Array(
1525+
$targetArray[ $attributeKey ] = (object)[
15281526
'Value' => $attributeValue,
15291527
'FormattedValue' => $targetArray[ $attributeKey ]
1530-
);
1528+
];
15311529
} else {
15321530
$targetArray[ $attributeKey ] = $attributeValue;
15331531
}

src/Entity.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,6 @@ public function __set( $property, $value ) {
292292
* according to the definition of the AlexaCRM\CRMToolkit\Entity\OptionSet
293293
*/
294294
if ( $this->attributes[ $property ]->optionSet != null ) {
295-
/* Which AlexaCRM\CRMToolkit\Entity\OptionSet is used? */
296-
$optionSetName = $this->attributes[ $property ]->optionSet;
297295
/* Container for the final value */
298296
$optionSetValue = null;
299297
/* Handle passing a String value */
@@ -909,7 +907,6 @@ private function setAttributesFromDOM( Client $auth, DOMElement $attributesNode,
909907
'Changed' => false,
910908
);
911909
/* Determine the Value for this field */
912-
$valueType = $keyValueNode->getElementsByTagName( 'value' )->item( 0 )->getElementsByTagName( 'Value' )->item( 0 )->getAttribute( 'type' );
913910
$storedValue = $keyValueNode->getElementsByTagName( 'value' )->item( 0 )->getElementsByTagName( 'Value' )->item( 0 )->textContent;
914911
} else {
915912
/* For an AliasedValue, we need to find the Alias first */

0 commit comments

Comments
 (0)