@@ -163,7 +163,7 @@ protected function __construct($s, $mock = false, $m = null, $config = null)
163
163
$ this ->setConfig ($ config );
164
164
}
165
165
166
- $ this ->env = __DIR__ . '/environment.php ' ;
166
+ $ this ->env = __DIR__ . '/environment.php ' ;
167
167
$ this ->options ['SignatureVersion ' ] = 2 ;
168
168
$ this ->options ['SignatureMethod ' ] = 'HmacSHA256 ' ;
169
169
}
@@ -252,13 +252,13 @@ protected function fetchMockFile($load = true)
252
252
) {
253
253
$ url = $ this ->mockFiles [$ this ->mockIndex ];
254
254
} else {
255
- $ url = __DIR__ . '/../tests/mocks/ ' . $ this ->mockFiles [$ this ->mockIndex ];
255
+ $ url = __DIR__ . '/../tests/mocks/ ' . $ this ->mockFiles [$ this ->mockIndex ];
256
256
}
257
257
$ this ->mockIndex ++;
258
258
259
259
if (file_exists ($ url )) {
260
260
try {
261
- $ this ->log ('Fetched Mock File: ' . basename ($ url ));
261
+ $ this ->log ('Fetched Mock File: ' . basename ($ url ));
262
262
if ($ load ) {
263
263
$ return = simplexml_load_file ($ url );
264
264
} else {
@@ -267,7 +267,7 @@ protected function fetchMockFile($load = true)
267
267
268
268
return $ return ;
269
269
} catch (\Exception $ e ) {
270
- $ this ->log ("Error when opening Mock File: $ url - " . $ e ->getMessage (), 'Warning ' );
270
+ $ this ->log ("Error when opening Mock File: $ url - " . $ e ->getMessage (), 'Warning ' );
271
271
272
272
return false ;
273
273
}
@@ -361,15 +361,15 @@ protected function fetchMockResponse()
361
361
<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">
362
362
<Error>
363
363
<Type>Sender</Type>
364
- <Code> ' . $ r ['error ' ] . '</Code>
365
- <Message> ' . $ r ['answer ' ] . '</Message>
364
+ <Code> '. $ r ['error ' ]. '</Code>
365
+ <Message> '. $ r ['answer ' ]. '</Message>
366
366
</Error>
367
367
<RequestID>123</RequestID>
368
368
</ErrorResponse> ' ;
369
369
}
370
370
371
371
$ r ['headarray ' ] = [];
372
- $ this ->log ('Returning Mock Response: ' . $ r ['code ' ]);
372
+ $ this ->log ('Returning Mock Response: ' . $ r ['code ' ]);
373
373
374
374
$ this ->rawResponses [] = $ r ;
375
375
@@ -398,7 +398,7 @@ protected function checkResponse($r)
398
398
} else {
399
399
$ xml = simplexml_load_string ($ r ['body ' ])->Error ;
400
400
$ this ->log (
401
- 'Bad Response! ' . $ r ['code ' ] . ' ' . $ r ['error ' ] . ': ' . $ xml ->Code . ' - ' . $ xml ->Message ,
401
+ 'Bad Response! ' . $ r ['code ' ]. ' ' . $ r ['error ' ]. ': ' . $ xml ->Code . ' - ' . $ xml ->Message ,
402
402
'Urgent '
403
403
);
404
404
@@ -638,12 +638,12 @@ protected function genQuery()
638
638
*/
639
639
protected function sendRequest ($ url , $ param )
640
640
{
641
- $ this ->log ('Making request to Amazon: ' . $ this ->options ['Action ' ]);
641
+ $ this ->log ('Making request to Amazon: ' . $ this ->options ['Action ' ]);
642
642
$ this ->throttleCount = 0 ;
643
643
$ response = $ this ->fetchURL ($ url , $ param );
644
644
645
645
if (! isset ($ response ['code ' ]) || ! array_key_exists ('code ' , $ response )) {
646
- $ this ->log ('Unrecognized response: ' . print_r ($ response , true ));
646
+ $ this ->log ('Unrecognized response: ' . print_r ($ response , true ));
647
647
648
648
return ;
649
649
}
@@ -748,7 +748,7 @@ protected function sleep()
748
748
{
749
749
flush ();
750
750
$ s = ($ this ->throttleTime == 1 ) ? '' : 's ' ;
751
- $ this ->log ('Request was throttled, Sleeping for ' . $ this ->throttleTime . " second $ s " , 'Throttle ' );
751
+ $ this ->log ('Request was throttled, Sleeping for ' . $ this ->throttleTime . " second $ s " , 'Throttle ' );
752
752
sleep ($ this ->throttleTime );
753
753
}
754
754
@@ -900,7 +900,7 @@ protected function _getParametersAsString(array $parameters)
900
900
{
901
901
$ queryParameters = [];
902
902
foreach ($ parameters as $ key => $ value ) {
903
- $ queryParameters [] = $ key . '= ' . $ this ->_urlencode ($ value );
903
+ $ queryParameters [] = $ key. '= ' . $ this ->_urlencode ($ value );
904
904
}
905
905
906
906
return implode ('& ' , $ queryParameters );
@@ -939,7 +939,7 @@ protected function _calculateStringToSignV2(array $parameters)
939
939
{
940
940
$ data = 'POST ' ;
941
941
$ data .= "\n" ;
942
- $ endpoint = parse_url ($ this ->urlbase . $ this ->urlbranch );
942
+ $ endpoint = parse_url ($ this ->urlbase . $ this ->urlbranch );
943
943
$ data .= $ endpoint ['host ' ];
944
944
$ data .= "\n" ;
945
945
$ uri = array_key_exists ('path ' , $ endpoint ) ? $ endpoint ['path ' ] : null ;
0 commit comments