1 | <?php |
||
11 | class SocialiteWasCalled |
||
12 | { |
||
13 | const SERVICE_CONTAINER_PREFIX = 'SocialiteProviders.config.'; |
||
14 | |||
15 | /** |
||
16 | * @var LaravelApp |
||
17 | */ |
||
18 | protected $app; |
||
19 | |||
20 | /** |
||
21 | * @var ConfigRetrieverInterface |
||
22 | */ |
||
23 | private $configRetriever; |
||
24 | |||
25 | /** |
||
26 | * @var bool |
||
27 | */ |
||
28 | public static $spoofedConfig = false; |
||
29 | 10 | ||
30 | /** |
||
31 | 10 | * @param LaravelApp $app |
|
32 | 10 | * @param ConfigRetrieverInterface $configRetriever |
|
33 | 10 | */ |
|
34 | public function __construct(Application $app, ConfigRetrieverInterface $configRetriever) |
||
39 | |||
40 | /** |
||
41 | * @param string $providerName 'meetup' |
||
42 | * @param string $providerClass 'Your\Name\Space\ClassNameProvider' must extend |
||
43 | * either Laravel\Socialite\Two\AbstractProvider or |
||
44 | 10 | * Laravel\Socialite\One\AbstractProvider |
|
45 | * @param string $oauth1Server 'Your\Name\Space\ClassNameServer' must extend League\OAuth1\Client\Server\Server |
||
46 | * |
||
47 | 10 | * @throws InvalidArgumentException |
|
48 | 10 | */ |
|
49 | 4 | public function extendSocialite($providerName, $providerClass, $oauth1Server = null) |
|
72 | 2 | ||
73 | /** |
||
74 | * @param SocialiteManager $socialite |
||
75 | 4 | * @param $providerName |
|
76 | 3 | * @param string $providerClass |
|
77 | * @param null|string $oauth1Server |
||
78 | * |
||
79 | * @return \Laravel\Socialite\One\AbstractProvider|\Laravel\Socialite\Two\AbstractProvider |
||
80 | */ |
||
81 | protected function buildProvider(SocialiteManager $socialite, $providerName, $providerClass, $oauth1Server) |
||
89 | |||
90 | 2 | /** |
|
91 | 1 | * Build an OAuth 1 provider instance. |
|
92 | * |
||
93 | 1 | * @param string $providerClass must extend Laravel\Socialite\One\AbstractProvider |
|
94 | 1 | * @param string $oauth1Server must extend League\OAuth1\Client\Server\Server |
|
95 | 1 | * @param array $config |
|
96 | * |
||
97 | * @return \Laravel\Socialite\One\AbstractProvider |
||
98 | */ |
||
99 | protected function buildOAuth1Provider(SocialiteManager $socialite, $providerClass, $providerName, $oauth1Server) |
||
115 | |||
116 | /** |
||
117 | * Build an OAuth 2 provider instance. |
||
118 | * |
||
119 | * @param SocialiteManager $socialite |
||
120 | * @param string $providerClass must extend Laravel\Socialite\Two\AbstractProvider |
||
121 | 6 | * @param array $config |
|
122 | * |
||
123 | 6 | * @return \Laravel\Socialite\Two\AbstractProvider |
|
124 | 6 | */ |
|
125 | 6 | protected function buildOAuth2Provider(SocialiteManager $socialite, $providerClass, $providerName) |
|
137 | 1 | ||
138 | 1 | /** |
|
139 | * @param string $providerClass |
||
140 | * @param string $providerName |
||
141 | 1 | * |
|
142 | * @throws MissingConfigException |
||
143 | * |
||
144 | * @return array |
||
145 | */ |
||
146 | protected function getConfig($providerClass, $providerName) |
||
178 | |||
179 | /** |
||
180 | * Check if a server is given, which indicates that OAuth1 is used. |
||
181 | * |
||
182 | * @param string $oauth1Server |
||
183 | * |
||
184 | * @return bool |
||
185 | */ |
||
186 | private function isOAuth1($oauth1Server) |
||
190 | |||
191 | /** |
||
192 | * @param string $class |
||
193 | * @param string $baseClass |
||
194 | * |
||
195 | * @throws InvalidArgumentException |
||
196 | */ |
||
197 | private function classExtends($class, $baseClass) |
||
204 | |||
205 | private function classExists($providerClass) |
||
211 | } |
||
212 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..