@@ -9,18 +9,17 @@ |
||
9 | 9 | namespace flipbox\patron\services; |
10 | 10 | |
11 | 11 | use Craft; |
12 | +use League\OAuth2\Client\Provider\AbstractProvider; |
|
12 | 13 | use craft\db\Query; |
13 | 14 | use craft\helpers\ArrayHelper; |
14 | 15 | use craft\helpers\Json; |
15 | 16 | use flipbox\ember\helpers\ObjectHelper; |
16 | 17 | use flipbox\ember\services\traits\objects\AccessorByString; |
18 | +use flipbox\patron\Patron; |
|
17 | 19 | use flipbox\patron\db\ProviderQuery; |
18 | 20 | use flipbox\patron\helpers\ProviderHelper; |
19 | -use flipbox\patron\Patron; |
|
20 | 21 | use flipbox\patron\providers\SettingsInterface; |
21 | -use flipbox\patron\records\Provider; |
|
22 | 22 | use flipbox\patron\records\Provider as ProviderRecord; |
23 | -use League\OAuth2\Client\Provider\AbstractProvider; |
|
24 | 23 | use yii\base\Component; |
25 | 24 | |
26 | 25 | /** |
@@ -9,21 +9,21 @@ |
||
9 | 9 | namespace flipbox\patron\services; |
10 | 10 | |
11 | 11 | use Craft; |
12 | +use Flipbox\OAuth2\Client\Provider\Guardian as GuardianProvider; |
|
13 | +use League\OAuth2\Client\Provider\Facebook as FacebookProvider; |
|
12 | 14 | use craft\helpers\ArrayHelper; |
13 | 15 | use craft\helpers\Json; |
14 | 16 | use flipbox\ember\helpers\ModelHelper; |
15 | 17 | use flipbox\ember\services\traits\records\AccessorByString; |
16 | -use Flipbox\OAuth2\Client\Provider\Guardian as GuardianProvider; |
|
18 | +use flipbox\patron\Patron; |
|
17 | 19 | use flipbox\patron\db\ProviderQuery; |
18 | 20 | use flipbox\patron\events\RegisterProviderSettings; |
19 | -use flipbox\patron\Patron; |
|
20 | 21 | use flipbox\patron\providers\Base; |
21 | 22 | use flipbox\patron\providers\Facebook as FacebookSettings; |
22 | 23 | use flipbox\patron\providers\Guardian as GuardianSettings; |
23 | 24 | use flipbox\patron\providers\SettingsInterface; |
24 | 25 | use flipbox\patron\records\Provider; |
25 | 26 | use flipbox\patron\records\ProviderEnvironment; |
26 | -use League\OAuth2\Client\Provider\Facebook as FacebookProvider; |
|
27 | 27 | use yii\base\Component; |
28 | 28 | use yii\base\InvalidConfigException; |
29 | 29 |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | |
128 | 128 | /** |
129 | 129 | * @param string $providerClass |
130 | - * @return mixed |
|
130 | + * @return string |
|
131 | 131 | */ |
132 | 132 | protected function resolveSettingsClass(string $providerClass = null): string |
133 | 133 | { |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | /** |
154 | 154 | * Check settings instance |
155 | 155 | * |
156 | - * @param $class |
|
156 | + * @param string $class |
|
157 | 157 | * @return bool |
158 | 158 | */ |
159 | 159 | private function isSettingsInstance($class): bool |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
165 | - * @param $providerClass |
|
165 | + * @param string $providerClass |
|
166 | 166 | * @param array $settings |
167 | 167 | * @return SettingsInterface |
168 | 168 | * @throws InvalidConfigException |
@@ -269,8 +269,7 @@ discard block |
||
269 | 269 | *******************************************/ |
270 | 270 | |
271 | 271 | /** |
272 | - * @param Provider $record |
|
273 | - * @return bool |
|
272 | + * @return boolean|null |
|
274 | 273 | */ |
275 | 274 | public function changeEncryption(bool $changeTo) |
276 | 275 | { |
@@ -9,6 +9,7 @@ discard block |
||
9 | 9 | namespace flipbox\patron\records; |
10 | 10 | |
11 | 11 | use Craft; |
12 | +use Twig_Markup; |
|
12 | 13 | use craft\base\PluginInterface; |
13 | 14 | use craft\db\Query; |
14 | 15 | use craft\helpers\StringHelper; |
@@ -19,12 +20,11 @@ discard block |
||
19 | 20 | use flipbox\ember\records\ActiveRecordWithId; |
20 | 21 | use flipbox\ember\records\traits\StateAttribute; |
21 | 22 | use flipbox\ember\traits\HandleRules; |
23 | +use flipbox\patron\Patron; |
|
22 | 24 | use flipbox\patron\db\ProviderActiveQuery; |
23 | 25 | use flipbox\patron\helpers\ProviderHelper; |
24 | -use flipbox\patron\Patron; |
|
25 | 26 | use flipbox\patron\providers\SettingsInterface; |
26 | 27 | use flipbox\patron\validators\ProviderValidator; |
27 | -use Twig_Markup; |
|
28 | 28 | use yii\helpers\ArrayHelper; |
29 | 29 | |
30 | 30 | /** |