Skip to content

Commit db1a1a8

Browse files
Merge pull request #7 from shellrent/resetfix
Fix reset() use
2 parents 7cada75 + 89e2261 commit db1a1a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Api/Operator/Webspace.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getStatus( $webspaceId )
137137
return null;
138138
}
139139

140-
return trim( reset( $response->data->gen_info->status ) );
140+
return trim( $response->data->gen_info->status );
141141
}
142142

143143

@@ -253,7 +253,7 @@ public function getPlanGuid( $guid )
253253
return null;
254254
}
255255

256-
return trim( reset( $response->data->subscriptions->subscription->plan->$guidPropertyName ) );
256+
return trim( $response->data->subscriptions->subscription->plan->$guidPropertyName );
257257
}
258258

259259

@@ -369,7 +369,7 @@ public function getCurrentCertificate( $filters ) {
369369

370370
foreach( $responseProperties as $property ) {
371371
if( $property->name == 'certificate_name' ) {
372-
return trim( reset( $property->value ) );
372+
return trim( $property->value );
373373
}
374374
}
375375

src/Api/Struct/Webspace/HostingSetting.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct($apiResponse)
1818
}
1919

2020
foreach ($apiResponse->vrt_hst->property as $propertyInfo) {
21-
$this->properties[reset( $propertyInfo->name)] = reset( $propertyInfo->value );
21+
$this->properties[$propertyInfo->name] = $propertyInfo->value;
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)