Skip to content

Commit 819269e

Browse files
committed
Bit of tidying up from #6
1 parent af15d60 commit 819269e

File tree

4 files changed

+22
-32
lines changed

4 files changed

+22
-32
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.DS_Store*
33
.idea/
44
vendor/
5+
.project

.project

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ Available methods:
6161
* `setTopicAttributes($topicArn, $attrName, $attrValue)`
6262
* `subscribe($topicArn, $protocol, $endpoint)`
6363
* `unsubscribe($subscriptionArn)`
64-
* `createPlatformEndpoint($platformapplicationarn, $token, $userdata)`
65-
* `deleteEndpoint($devicearn)`
64+
* `createPlatformEndpoint($platformApplicationArn, $token, $userData)`
65+
* `deleteEndpoint($deviceArn)`
6666

6767
To set the API region (us-east-1, us-west-2, us-west-1, eu-west-1, etc):
6868

lib/AmazonSNS.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -420,53 +420,53 @@ public function unsubscribe($subscriptionArn) {
420420
return true;
421421
}
422422

423-
/**
423+
/**
424424
* Create Platform endpoint
425425
*
426426
* @link http://docs.aws.amazon.com/sns/latest/api/API_CreatePlatformEndpoint.html
427-
* @param string $platformapplicationarn
427+
* @param string $platformApplicationArn
428428
* @param string $token
429-
* @param string $userdata
429+
* @param string $userData
430430
* @return bool
431431
* @throws InvalidArgumentException
432432
*/
433-
public function createPlatformEndpoint($platformapplicationarn, $token, $userdata) {
434-
if(empty($platformapplicationarn) || empty($token) || empty($userdata)) {
435-
throw new InvalidArgumentException('Must supply a Platformapplicationarn,Token & Userdata to create platform endpoint');
433+
public function createPlatformEndpoint($platformApplicationArn, $token, $userData) {
434+
if(empty($platformApplicationArn) || empty($token) || empty($userData)) {
435+
throw new InvalidArgumentException('Must supply a PlatformApplicationArn,Token & UserData to create platform endpoint');
436436
}
437437

438-
$response= $this->_request('CreatePlatformEndpoint', array(
439-
'PlatformApplicationArn' => $platformapplicationarn,
438+
$response = $this->_request('CreatePlatformEndpoint', array(
439+
'PlatformApplicationArn' => $platformApplicationArn,
440440
'Token' => $token,
441-
'CustomUserData' => $userdata
441+
'CustomUserData' => $userData
442442
));
443-
443+
444444
return strval($response->CreatePlatformEndpointResult->EndpointArn);
445445
}
446446

447-
/*
447+
/**
448448
* Delete endpoint
449449
*
450450
* @link http://docs.aws.amazon.com/sns/latest/api/API_DeleteEndpoint.html
451-
* @param string $devicearn
452-
451+
* @param string $deviceArn
452+
*
453453
* @return bool
454454
* @throws InvalidArgumentException
455455
*/
456-
public function deleteEndpoint($devicearn) {
457-
if(empty($devicearn)) {
456+
public function deleteEndpoint($deviceArn) {
457+
if(empty($deviceArn)) {
458458
throw new InvalidArgumentException('Must supply a DeviceARN to remove platform endpoint');
459459
}
460460

461-
$response= $this->_request('DeleteEndpoint', array(
462-
'EndpointArn' => $devicearn,
461+
$this->_request('DeleteEndpoint', array(
462+
'EndpointArn' => $deviceArn,
463463

464464
));
465465

466466
return true;
467467
}
468-
469-
468+
469+
470470
//
471471
// Private functions
472472
//

0 commit comments

Comments
 (0)