diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
new file mode 100644
index 0000000..8695228
--- /dev/null
+++ b/.php-cs-fixer.php
@@ -0,0 +1,49 @@
+setRules([
+ '@PSR12' => true,
+ 'binary_operator_spaces' => true,
+ 'blank_line_after_opening_tag' => true,
+ 'compact_nullable_typehint' => true,
+ 'declare_equal_normalize' => true,
+ 'lowercase_cast' => true,
+ 'lowercase_static_reference' => true,
+ 'new_with_braces' => true,
+ 'no_blank_lines_after_class_opening' => true,
+ 'no_leading_import_slash' => true,
+ 'no_whitespace_in_blank_line' => true,
+ 'no_unused_imports' => true,
+ 'ordered_class_elements' => [
+ 'order' => [
+ 'use_trait',
+ ],
+ ],
+ 'ordered_imports' => [
+ 'imports_order' => [
+ 'class',
+ 'function',
+ 'const',
+ ],
+ 'sort_algorithm' => 'none',
+ ],
+ 'return_type_declaration' => true,
+ 'short_scalar_cast' => true,
+ 'single_blank_line_before_namespace' => true,
+ 'single_trait_insert_per_statement' => true,
+ 'ternary_operator_spaces' => true,
+ 'unary_operator_spaces' => true,
+ 'visibility_required' => [
+ 'elements' => [
+ 'const',
+ 'method',
+ 'property',
+ ],
+ ],
+ ])
+ ->setFinder(
+ PhpCsFixer\Finder::create()
+ ->exclude('vendor')
+ ->in([__DIR__.'/src/', __DIR__.'/tests/'])
+ )
+;
diff --git a/.php_cs b/.php_cs
deleted file mode 100755
index 8fa6f76..0000000
--- a/.php_cs
+++ /dev/null
@@ -1,16 +0,0 @@
-in(__DIR__ . '/src/')
-;
-
-return Symfony\CS\Config\Config::create()
- ->fixers(array (
- 0 => 'symfony',
-))
- ->finder($finder)
- ->setUsingCache(true)
-;
diff --git a/README.md b/README.md
index 5b4c27d..aa0e085 100755
--- a/README.md
+++ b/README.md
@@ -1,18 +1,25 @@
-
Laravel-socialite
+# Laravel Socialite
+
+![Laravel Octane Ready Status](https://img.shields.io/badge/Octance-ready-green?style=flat-square)
+![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/overtrue/laravel-socialite?style=flat-square)
+![GitHub License](https://img.shields.io/github/license/overtrue/laravel-socialite?style=flat-square)
+![Packagist Downloads](https://img.shields.io/packagist/dt/overtrue/laravel-socialite?style=flat-square)
[![Sponsor me](https://github.com/overtrue/overtrue/blob/master/sponsor-me-button-s.svg?raw=true)](https://github.com/sponsors/overtrue)
# Installation
```
-$ composer require "overtrue/laravel-socialite:~3.0"
+$ composer require "overtrue/laravel-socialite"
```
+
> if you have been installed the `overtrue/socialite` package, please remove it from `composer.json` before this command.
# Configuration
1. You will also need to add credentials for the OAuth services your application utilizes. These credentials should be placed in your `config/socialite.php` or `config/services.php` configuration file, and should use the key facebook, twitter, linkedin, google, github or bitbucket, depending on the providers your application requires. For example:
- ```php
+
+```php
app->singleton(SocialiteManager::class, function ($app) {
+ $this->app->singleton(SocialiteManager::class, function () {
$config = array_merge(\config('socialite', []), \config('services', []));
return new SocialiteManager($config);
});
}
- /**
- * Get the services provided by the provider.
- *
- * @return array
- */
public function provides()
{
return [SocialiteManager::class];
diff --git a/src/Socialite.php b/src/Socialite.php
index b64ff15..1e2424a 100755
--- a/src/Socialite.php
+++ b/src/Socialite.php
@@ -4,16 +4,8 @@
use Illuminate\Support\Facades\Facade;
-/**
- * Class Socialite.
- */
class Socialite extends Facade
{
- /**
- * Return the facade accessor.
- *
- * @return string
- */
public static function getFacadeAccessor()
{
return 'Overtrue\\Socialite\\SocialiteManager';
diff --git a/src/.gitkeep b/tests/.gitkeep
old mode 100755
new mode 100644
similarity index 100%
rename from src/.gitkeep
rename to tests/.gitkeep