Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

Commit b271508

Browse files
committed
Added better PHP-Doc Comments (More details)
Fixed typos in PHP-Doc Comments
1 parent f385de0 commit b271508

13 files changed

+849
-300
lines changed

includes/Address.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* Authors-Website: http://petschko.org/
88
* Date: 15.09.2016
99
* Time: 15:23
10-
* Update: 14.07.2018
11-
* Version: 0.0.4
10+
* Update: 16.07.2018
11+
* Version: 0.0.5
1212
*
1313
* Notes: Contains the DHL-Address Class
1414
*/
@@ -243,7 +243,7 @@ public function setLocation($location) {
243243
}
244244

245245
/**
246-
* Alias for getLocation
246+
* Alias for $this->getLocation
247247
*
248248
* @return string - Location
249249
*/
@@ -252,7 +252,7 @@ public function getCity() {
252252
}
253253

254254
/**
255-
* Alias for setLocation
255+
* Alias for $this->setLocation
256256
*
257257
* @param string $city - Location
258258
*/

includes/BankData.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,6 @@ public function getBankClass_v1() {
250250
trigger_error('[DHL-PHP-SDK]: Version 1 Methods are deprecated and will removed soon (Called method ' . __METHOD__ . ')!', E_USER_DEPRECATED);
251251
trigger_error('[DHL-PHP-SDK]: Called Version 1 Method: ' . __METHOD__ . ' is incomplete (does nothing)!', E_USER_WARNING);
252252

253-
// TODO: Implement getBankClass_v1() method.
254-
255253
return new StdClass;
256254
}
257255

includes/BusinessShipment.php

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ class BusinessShipment extends Version {
173173
* Max-Len: 70
174174
*
175175
* @var string|null $receiverEmail - Receiver-E-Mail | null for none
176+
*
176177
* @deprecated - Moved Receiver E-Mail to correct Class (Shipment-Details)
177178
*/
178179
private $receiverEmail = null;
@@ -540,6 +541,7 @@ public function setSequenceNumber($sequenceNumber) {
540541
* Get the Receiver-Email
541542
*
542543
* @return null|string - Receiver-Email or null if none
544+
*
543545
* @deprecated - Moved Receiver E-Mail to correct Class (Shipment-Details)
544546
*/
545547
public function getReceiverEmail() {
@@ -554,6 +556,7 @@ public function getReceiverEmail() {
554556
* Set the Receiver-Email
555557
*
556558
* @param null|string $receiverEmail - Receiver-Email or null for none
559+
*
557560
* @deprecated - Moved Receiver E-Mail to correct Class (Shipment-Details)
558561
*/
559562
public function setReceiverEmail($receiverEmail) {
@@ -732,7 +735,7 @@ private function sendGetVersionRequest($data) {
732735
private function sendDoManifestRequest($data) {
733736
switch($this->getMayor()) {
734737
case 1:
735-
return $this->getSoapClient()->DoManifestTD($data); // todo verify if correct
738+
return $this->getSoapClient()->DoManifestTD($data);
736739
case 2:
737740
default:
738741
return $this->getSoapClient()->doManifest($data);
@@ -785,8 +788,6 @@ private function createDoManifestClass_v1($shipmentNumber) {
785788

786789
$data = new StdClass;
787790

788-
// todo implement v1 method
789-
790791
return $data;
791792
}
792793

@@ -942,8 +943,6 @@ private function createShipmentClass_v1() {
942943

943944
$data = new StdClass;
944945

945-
// todo implement v1 method
946-
947946
return $data;
948947
}
949948

@@ -971,7 +970,7 @@ private function createShipmentClass_v2() {
971970
if($this->getShipmentDetails()->getNotificationEmail() !== null)
972971
$email = $this->getShipmentDetails()->getNotificationEmail();
973972
else if($this->receiverEmail !== null)
974-
$email = $this->getReceiverEmail();
973+
$email = $this->getReceiverEmail(); // Use old E-Mail implementation for BC
975974

976975
if($email !== null) {
977976
$data->ShipmentOrder->Shipment->ShipmentDetails->Notification = new StdClass;
@@ -1074,8 +1073,6 @@ private function createDeleteClass_v1($shipmentNumber) {
10741073

10751074
$data = new StdClass;
10761075

1077-
// todo implement v1 method
1078-
10791076
return $data;
10801077
}
10811078

@@ -1156,8 +1153,6 @@ private function getLabelClass_v1($shipmentNumber) {
11561153

11571154
$data = new StdClass;
11581155

1159-
// todo implement v1 method
1160-
11611156
return $data;
11621157
}
11631158

@@ -1240,8 +1235,6 @@ private function getExportDocClass_v1($shipmentNumber) {
12401235

12411236
$data = new StdClass;
12421237

1243-
// todo implement v1 method
1244-
12451238
return $data;
12461239
}
12471240

includes/ExportDocPosition.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
* Authors-Website: http://petschko.org/
88
* Date: 10.04.2017
99
* Time: 12:48
10-
* Update: 16.07.2018
11-
* Version: 0.0.4
10+
* Update: 06.08.2018
11+
* Version: 0.0.5
1212
*
1313
* Notes: Contains the ExportDocPosition class
14-
* ToDo: Please edit/add more details to the doc comments if you know more about them
1514
*/
1615

1716
use stdClass;
@@ -85,8 +84,10 @@ class ExportDocPosition {
8584
*/
8685
public function __construct($description, $countryCodeOrigin, $customsTariffNumber, $amount, $netWeightInKG, $customsValue) {
8786
if(! $description || ! $countryCodeOrigin || ! $amount || ! $netWeightInKG || ! $customsValue) {
87+
trigger_error('PHP-DHL-API: ' . __CLASS__ . '->' . __FUNCTION__ .
88+
': All values must be filled out! (Not null, Not false, Not 0, Not "", Not empty) - Ignore this function for this call now', E_USER_WARNING);
8889
error_log('PHP-DHL-API: ' . __CLASS__ . '->' . __FUNCTION__ .
89-
': All values must be filled out! (Not null, Not false, Not 0, Not "", Not empty) - Ignore this function for this call now', E_USER_NOTICE);
90+
': All values must be filled out! (Not null, Not false, Not 0, Not "", Not empty) - Ignore this function for this call now', E_USER_WARNING);
9091
return;
9192
}
9293

@@ -231,8 +232,6 @@ protected function getExportDocPositionClass_v1() {
231232

232233
$class = new StdClass;
233234

234-
// todo implement v1 method
235-
236235
return $class;
237236
}
238237

0 commit comments

Comments
 (0)