Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
Removed the phpcs.xml definition. Added a SignerInterface interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Oct 29, 2014
1 parent 788bf6b commit 3b7fa80
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 87 deletions.
73 changes: 0 additions & 73 deletions phpcs.xml.dist

This file was deleted.

19 changes: 5 additions & 14 deletions src/Signer/Signer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* For example, in the original AWS implementation, the "self key" for AWS was "AWS4".
*/
class Signer
class Signer implements SignerInterface
{
/**************************************************************************/
// PROPERTIES
Expand Down Expand Up @@ -73,9 +73,7 @@ public function __construct($self_key, $client_id, $client_secret, $hash_algo =
}

/**
* Gets the self key that was set in the constructor.
*
* @return string The self key.
* {@inheritdoc}
*/
public function getSelfKey()
{
Expand All @@ -84,9 +82,7 @@ public function getSelfKey()
}

/**
* Gets the client key that was set in the constructor.
*
* @return string The client key.
* {@inheritdoc}
*/
public function getClientId()
{
Expand All @@ -95,9 +91,7 @@ public function getClientId()
}

/**
* Gets the client secret that was set in the constructor.
*
* @return string The client secret.
* {@inheritdoc}
*/
public function getClientSecret()
{
Expand All @@ -106,10 +100,7 @@ public function getClientSecret()
}

/**
* Sign the payload to produce a signature for its contents.
*
* @param array $payload The data to generate a signature for.
* @return string The signature for the payload contents.
* {@inheritdoc}
*/
public function sign(array $payload)
{
Expand Down
40 changes: 40 additions & 0 deletions src/Signer/SignerInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php
/**
* Copyright (c) 2014 Ryan Parman.
*
* http://opensource.org/licenses/Apache2.0
*/

namespace Skyzyx\Signer;

interface SignerInterface
{
/**
* Gets the self key that was set in the constructor.
*
* @return string The self key.
*/
public function getSelfKey();

/**
* Gets the client key that was set in the constructor.
*
* @return string The client key.
*/
public function getClientId();

/**
* Gets the client secret that was set in the constructor.
*
* @return string The client secret.
*/
public function getClientSecret();

/**
* Sign the payload to produce a signature for its contents.
*
* @param array $payload The data to generate a signature for.
* @return string The signature for the payload contents.
*/
public function sign(array $payload);
}

0 comments on commit 3b7fa80

Please sign in to comment.