From f83e5a87313d078c87ae88989fa06b86d403fde6 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Thu, 20 Nov 2014 23:52:29 +0000 Subject: [PATCH] Learnt how to spell delimiter --- src/AuthorizationServer.php | 14 +++++++------- src/Grant/AbstractGrant.php | 2 +- tests/unit/AuthorizationServerTest.php | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/AuthorizationServer.php b/src/AuthorizationServer.php index a7a1dd7d..671a7685 100644 --- a/src/AuthorizationServer.php +++ b/src/AuthorizationServer.php @@ -25,7 +25,7 @@ class AuthorizationServer extends AbstractServer * The OAuth 2 specification states it should be a space but most use a comma * @var string */ - protected $scopeDelimeter = ' '; + protected $scopeDelimiter = ' '; /** * The TTL (time to live) of an access token in seconds (default: 3600) @@ -184,22 +184,22 @@ class AuthorizationServer extends AbstractServer } /** - * Get the scope delimeter + * Get the scope delimiter * @return string The scope delimiter (default: ",") */ - public function getScopeDelimeter() + public function getScopeDelimiter() { - return $this->scopeDelimeter; + return $this->scopeDelimiter; } /** * Set the scope delimiter - * @param string $scopeDelimeter + * @param string $scopeDelimiter * @return self */ - public function setScopeDelimeter($scopeDelimeter = ' ') + public function setScopeDelimiter($scopeDelimiter = ' ') { - $this->scopeDelimeter = $scopeDelimeter; + $this->scopeDelimiter = $scopeDelimiter; return $this; } diff --git a/src/Grant/AbstractGrant.php b/src/Grant/AbstractGrant.php index 522115b2..99d9885a 100644 --- a/src/Grant/AbstractGrant.php +++ b/src/Grant/AbstractGrant.php @@ -129,7 +129,7 @@ abstract class AbstractGrant implements GrantTypeInterface */ public function validateScopes($scopeParam = '', ClientEntity $client, $redirectUri = null) { - $scopesList = explode($this->server->getScopeDelimeter(), $scopeParam); + $scopesList = explode($this->server->getScopeDelimiter(), $scopeParam); for ($i = 0; $i < count($scopesList); $i++) { $scopesList[$i] = trim($scopesList[$i]); diff --git a/tests/unit/AuthorizationServerTest.php b/tests/unit/AuthorizationServerTest.php index f0873a71..10a21686 100644 --- a/tests/unit/AuthorizationServerTest.php +++ b/tests/unit/AuthorizationServerTest.php @@ -15,7 +15,7 @@ class AuthorizationServerTest extends \PHPUnit_Framework_TestCase $server->requireScopeParam(true); $server->requireStateParam(true); $server->setDefaultScope('foobar'); - $server->setScopeDelimeter(','); + $server->setScopeDelimiter(','); $server->setAccessTokenTTL(1); $grant = M::mock('League\OAuth2\Server\Grant\GrantTypeInterface'); @@ -36,7 +36,7 @@ class AuthorizationServerTest extends \PHPUnit_Framework_TestCase $this->assertTrue($server->stateParamRequired()); $this->assertTrue($server->getScopeStorage() instanceof ScopeInterface); $this->assertEquals('foobar', $server->getDefaultScope()); - $this->assertEquals(',', $server->getScopeDelimeter()); + $this->assertEquals(',', $server->getScopeDelimiter()); $this->assertEquals(1, $server->getAccessTokenTTL()); }