diff --git a/src/Shoplo/AuthStore.php b/src/Shoplo/AuthStore.php index 46c34e3..3a140bd 100644 --- a/src/Shoplo/AuthStore.php +++ b/src/Shoplo/AuthStore.php @@ -4,10 +4,15 @@ class AuthStore { + /** + * @var AuthStoreAbstract|AuthSessionStore + */ static private $instance = false; /** * Request an instance of the OAuthStore + * @param null|AuthStoreAbstract $object + * @return AuthStoreAbstract|AuthSessionStore */ public static function getInstance($object = null, $options = array()) { diff --git a/src/Shoplo/Resource.php b/src/Shoplo/Resource.php index 1f2cf82..4431fd8 100755 --- a/src/Shoplo/Resource.php +++ b/src/Shoplo/Resource.php @@ -6,6 +6,9 @@ class Resource { + /** + * @var \Shoplo\ShoploStoreAdapterInterface + */ protected $client; protected $bucket = array(); protected $prefix = ''; @@ -22,6 +25,10 @@ public function __construct(ShoploStoreAdapterInterface $client, $apiUrl) $this->api_url = $apiUrl; } + /** + * @param array $params + * @return false|string + */ protected function prepare_params($params) { $string = ''; @@ -37,6 +44,10 @@ protected function prepare_params($params) return $string; } + /** + * @param array $result + * @return array + */ protected function prepare_result($result) { if (!is_array($result)) { diff --git a/src/Shoplo/ShoploApi.php b/src/Shoplo/ShoploApi.php index 7a3c0c8..8a1bdca 100755 --- a/src/Shoplo/ShoploApi.php +++ b/src/Shoplo/ShoploApi.php @@ -11,32 +11,32 @@ class ShoploApi { /** - * @var String + * @var string */ private $api_key; /** - * @var String + * @var string */ private $secret_key; /** - * @var ShoploAuthStore + * @var \Shoplo\AuthStore */ private $auth_store; /** - * @var String + * @var string */ private $oauth_token; /** - * @var String + * @var string */ private $oauth_token_secret; /** - * @var Boolean + * @var boolean */ public $authorized = false; @@ -173,7 +173,7 @@ class ShoploApi public $api_url; /** - * @var String + * @var string */ public $shop_domain = null; @@ -182,6 +182,9 @@ class ShoploApi */ private $ssoAuthClient; + /** + * @var GuzzleAdapter + */ private $shoploStoreAdapterInterface; public function __construct($config, $authStore = null, $disableSession = false) @@ -221,7 +224,7 @@ public function __construct($config, $authStore = null, $disableSession = false) } /** - * @param $config + * @param array $config */ public function initSSOAuthClient($config) { @@ -238,6 +241,9 @@ public function initSSOAuthClient($config) ); } + /** + * @return string + */ public function getAuthorizeUrl() { return $this->api_url.'/services/oauth/authorize';