| @@ -2,8 +2,6 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Ups\Entity\Tradeability; | 
| 4 | 4 | |
| 5 | -use DomDocument; | |
| 6 | -use DomElement; | |
| 7 | 5 | use Ups\Entity\FreightCharges; | 
| 8 | 6 | use Ups\NodeInterface; | 
| 9 | 7 | |
| @@ -71,9 +71,9 @@ discard block | ||
| 71 | 71 | private $tariffCodeAlert; | 
| 72 | 72 | |
| 73 | 73 | /** | 
| 74 | - * @param null|DOMDocument $document | |
| 74 | + * @param null|\DOMDocument $document | |
| 75 | 75 | * | 
| 76 | - * @return DOMElement | |
| 76 | + * @return \DOMElement | |
| 77 | 77 | */ | 
| 78 | 78 | public function toNode(DOMDocument $document = null) | 
| 79 | 79 |      { | 
| @@ -303,7 +303,7 @@ discard block | ||
| 303 | 303 | } | 
| 304 | 304 | |
| 305 | 305 | /** | 
| 306 | - * @return mixed | |
| 306 | + * @return string|null | |
| 307 | 307 | */ | 
| 308 | 308 | public function getTransactionReferenceId() | 
| 309 | 309 |      { | 
| @@ -86,7 +86,7 @@ | ||
| 86 | 86 | * Create the TimeInTransit request. | 
| 87 | 87 | * | 
| 88 | 88 | * @param LocatorRequest $locatorRequest The request details. Refer to the UPS documentation for available structure | 
| 89 | - * @param $requestOption | |
| 89 | + * @param integer $requestOption | |
| 90 | 90 | * | 
| 91 | 91 | * @return string | 
| 92 | 92 | */ | 
| @@ -41,7 +41,7 @@ discard block | ||
| 41 | 41 | * | 
| 42 | 42 | * @throws Exception | 
| 43 | 43 | * | 
| 44 | - * @return TimeInTransitRequest | |
| 44 | + * @return TimeInTransitResponse | |
| 45 | 45 | */ | 
| 46 | 46 | public function getTimeInTransit(TimeInTransitRequest $shipment) | 
| 47 | 47 |      { | 
| @@ -56,7 +56,7 @@ discard block | ||
| 56 | 56 | * | 
| 57 | 57 | * @throws Exception | 
| 58 | 58 | * | 
| 59 | - * @return TimeInTransitRequest | |
| 59 | + * @return TimeInTransitResponse | |
| 60 | 60 | */ | 
| 61 | 61 | private function sendRequest(TimeInTransitRequest $timeInTransitRequest) | 
| 62 | 62 |      { | 
| @@ -154,7 +154,7 @@ discard block | ||
| 154 | 154 | * | 
| 155 | 155 | * @param SimpleXMLElement $response | 
| 156 | 156 | * | 
| 157 | - * @return TimeInTransitRequest | |
| 157 | + * @return TimeInTransitResponse | |
| 158 | 158 | */ | 
| 159 | 159 | private function formatResponse(SimpleXMLElement $response) | 
| 160 | 160 |      { | 
| @@ -30,11 +30,11 @@ | ||
| 30 | 30 | } | 
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | - /** | |
| 34 | - * @param null|DOMDocument $document | |
| 35 | - * | |
| 36 | - * @return DOMElement | |
| 37 | - */ | |
| 33 | + /** | |
| 34 | + * @param null|DOMDocument $document | |
| 35 | + * | |
| 36 | + * @return DOMElement | |
| 37 | + */ | |
| 38 | 38 | public function toNode(DOMDocument $document = null) | 
| 39 | 39 |      { | 
| 40 | 40 |          if (null === $document) { | 
| @@ -136,43 +136,43 @@ | ||
| 136 | 136 | $patterns = [ | 
| 137 | 137 | |
| 138 | 138 | // UPS Mail Innovations tracking numbers | 
| 139 | -            '/^MI\d{6}\d{1,22}$/',// MI 000000 00000000+ | |
| 139 | +            '/^MI\d{6}\d{1,22}$/', // MI 000000 00000000+ | |
| 140 | 140 | |
| 141 | 141 | // USPS - Certified Mail | 
| 142 | -            '/^94071\d{17}$/',    // 9407 1000 0000 0000 0000 00 | |
| 143 | -            '/^7\d{19}$/',        // 7000 0000 0000 0000 0000 | |
| 142 | +            '/^94071\d{17}$/', // 9407 1000 0000 0000 0000 00 | |
| 143 | +            '/^7\d{19}$/', // 7000 0000 0000 0000 0000 | |
| 144 | 144 | |
| 145 | 145 | // USPS - Collect on Delivery | 
| 146 | -            '/^93033\d{17}$/',    // 9303 3000 0000 0000 0000 00 | |
| 147 | -            '/^M\d{9}$/',         // M000 0000 00 | |
| 146 | +            '/^93033\d{17}$/', // 9303 3000 0000 0000 0000 00 | |
| 147 | +            '/^M\d{9}$/', // M000 0000 00 | |
| 148 | 148 | |
| 149 | 149 | // USPS - Global Express Guaranteed | 
| 150 | -            '/^82\d{10}$/',       // 82 000 000 00 | |
| 150 | +            '/^82\d{10}$/', // 82 000 000 00 | |
| 151 | 151 | |
| 152 | 152 | // USPS - Priority Mail Express International | 
| 153 | -            '/^EC\d{9}US$/',      // EC 000 000 000 US | |
| 153 | +            '/^EC\d{9}US$/', // EC 000 000 000 US | |
| 154 | 154 | |
| 155 | 155 | // USPS - Priority Mail Express | 
| 156 | -            '/^927\d{19}$/',      // 9270 1000 0000 0000 0000 00 | |
| 157 | -            '/^EA\d{9}US$/',      // EA 000 000 000 US | |
| 156 | +            '/^927\d{19}$/', // 9270 1000 0000 0000 0000 00 | |
| 157 | +            '/^EA\d{9}US$/', // EA 000 000 000 US | |
| 158 | 158 | |
| 159 | 159 | // USPS - Priority Mail International | 
| 160 | -            '/^CP\d{9}US$/',      // CP 000 000 000 US | |
| 160 | +            '/^CP\d{9}US$/', // CP 000 000 000 US | |
| 161 | 161 | |
| 162 | 162 | // USPS - Priority Mail | 
| 163 | -            '/^92055\d{17}$/',    // 9205 5000 0000 0000 0000 00 | |
| 164 | -            '/^14\d{18}$/',       // 1400 0000 0000 0000 0000 | |
| 163 | +            '/^92055\d{17}$/', // 9205 5000 0000 0000 0000 00 | |
| 164 | +            '/^14\d{18}$/', // 1400 0000 0000 0000 0000 | |
| 165 | 165 | |
| 166 | 166 | // USPS - Registered Mail | 
| 167 | -            '/^92088\d{17}$/',    // 9208 8000 0000 0000 0000 00 | |
| 168 | -            '/^RA\d{9}US$/',      // RA 000 000 000 US | |
| 167 | +            '/^92088\d{17}$/', // 9208 8000 0000 0000 0000 00 | |
| 168 | +            '/^RA\d{9}US$/', // RA 000 000 000 US | |
| 169 | 169 | |
| 170 | 170 | // USPS - Signature Confirmation | 
| 171 | -            '/^9202\d{16}US$/',   // 9202 1000 0000 0000 0000 00 | |
| 172 | -            '/^23\d{16}US$/',     // 2300 0000 0000 0000 0000 | |
| 171 | +            '/^9202\d{16}US$/', // 9202 1000 0000 0000 0000 00 | |
| 172 | +            '/^23\d{16}US$/', // 2300 0000 0000 0000 0000 | |
| 173 | 173 | |
| 174 | 174 | // USPS - Tracking | 
| 175 | -            '/^94\d{20}$/',       // 9400 1000 0000 0000 0000 00 | |
| 175 | +            '/^94\d{20}$/', // 9400 1000 0000 0000 0000 00 | |
| 176 | 176 |              '/^03\d{18}$/'        // 0300 0000 0000 0000 0000 | 
| 177 | 177 | ]; | 
| 178 | 178 | |
| @@ -69,7 +69,7 @@ | ||
| 69 | 69 | * | 
| 70 | 70 | * @throws Exception | 
| 71 | 71 | * | 
| 72 | - * @return stdClass | |
| 72 | + * @return \stdClass | |
| 73 | 73 | */ | 
| 74 | 74 | public function confirm( | 
| 75 | 75 | $validation, | 
| @@ -112,14 +112,14 @@ | ||
| 112 | 112 | /** | 
| 113 | 113 | * Creates and sends a request for the given data. Most errors are handled in SoapRequest | 
| 114 | 114 | * | 
| 115 | - * @param $request | |
| 116 | - * @param $endpoint | |
| 117 | - * @param $operation | |
| 118 | - * @param $wsdl | |
| 115 | + * @param string $request | |
| 116 | + * @param string $endpoint | |
| 117 | + * @param string $operation | |
| 118 | + * @param string $wsdl | |
| 119 | 119 | * | 
| 120 | 120 | * @throws Exception | 
| 121 | 121 | * | 
| 122 | - * @return TimeInTransitRequest | |
| 122 | + * @return \stdClass | |
| 123 | 123 | */ | 
| 124 | 124 | private function sendRequest($request, $endpoint, $operation, $wsdl) | 
| 125 | 125 |      { | 
| @@ -212,6 +212,6 @@ | ||
| 212 | 212 |      { | 
| 213 | 213 | $base = ($this->useIntegration ? $this->integrationBaseUrl : $this->productionBaseUrl); | 
| 214 | 214 | |
| 215 | - return $base . $segment; | |
| 215 | + return $base.$segment; | |
| 216 | 216 | } | 
| 217 | 217 | } | 
| @@ -40,9 +40,9 @@ | ||
| 40 | 40 |          $node = $document->createElement('AddressArtifactFormat'); | 
| 41 | 41 | |
| 42 | 42 |          for ($i = 1; $i <= 3; $i++) { | 
| 43 | -            $line = $this->{'getPoliticalDivision' . $i}(); | |
| 43 | +            $line = $this->{'getPoliticalDivision'.$i}(); | |
| 44 | 44 |              if ($line) { | 
| 45 | -                $node->appendChild($document->createElement('PoliticalDivision' . $i, $line)); | |
| 45 | +                $node->appendChild($document->createElement('PoliticalDivision'.$i, $line)); | |
| 46 | 46 | } | 
| 47 | 47 | } | 
| 48 | 48 | |