diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml new file mode 100644 index 0000000..2d37e13 --- /dev/null +++ b/.github/workflows/php-cs-fixer.yml @@ -0,0 +1,7 @@ +name: PHP CS Fixer + +on: push + +jobs: + fixers: + uses: humhub/actions/.github/workflows/module-php-cs-fixer.yml@main diff --git a/Events.php b/Events.php index 86e9b61..f9d9985 100644 --- a/Events.php +++ b/Events.php @@ -22,7 +22,7 @@ public static function onAuthClientCollectionInit($event) $authClientCollection->setClient('linkedin', [ 'class' => ConfigureForm::getInstance()->useV2 ? LinkedinAuthV2::class : LinkedinAuth::class, 'clientId' => ConfigureForm::getInstance()->clientId, - 'clientSecret' => ConfigureForm::getInstance()->clientSecret + 'clientSecret' => ConfigureForm::getInstance()->clientSecret, ]); } } diff --git a/Module.php b/Module.php index 75cfb96..1233484 100644 --- a/Module.php +++ b/Module.php @@ -9,7 +9,6 @@ */ class Module extends \humhub\components\Module { - /** * @inheritdoc */ diff --git a/authclient/LinkedinAuth.php b/authclient/LinkedinAuth.php index 9eb6a7c..7c436fe 100644 --- a/authclient/LinkedinAuth.php +++ b/authclient/LinkedinAuth.php @@ -9,7 +9,6 @@ */ class LinkedinAuth extends LinkedIn { - /** * @inheritdoc */ diff --git a/authclient/LinkedinAuthV2.php b/authclient/LinkedinAuthV2.php index 3f14a48..82a7544 100644 --- a/authclient/LinkedinAuthV2.php +++ b/authclient/LinkedinAuthV2.php @@ -10,7 +10,6 @@ */ class LinkedinAuthV2 extends LinkedIn { - /** * @inheritdoc */ diff --git a/config.php b/config.php index 5c40517..4cf23fb 100644 --- a/config.php +++ b/config.php @@ -7,6 +7,6 @@ 'class' => 'humhubContrib\auth\linkedin\Module', 'namespace' => 'humhubContrib\auth\linkedin', 'events' => [ - [Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\linkedin\Events', 'onAuthClientCollectionInit']] + [Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\linkedin\Events', 'onAuthClientCollectionInit']], ], ]; diff --git a/controllers/AdminController.php b/controllers/AdminController.php index 50b1e6f..2315530 100644 --- a/controllers/AdminController.php +++ b/controllers/AdminController.php @@ -11,7 +11,6 @@ */ class AdminController extends Controller { - /** * Render admin only page * diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ebdc0be..80fd253 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.1.1 (Unreleased) +-------------------- +- Enh #7: Use PHP CS Fixer + 1.1.0 (June 7, 2024) -------------------- - Fix #5: Fixed LinkedIn Auth Deprecations. Added `useV2` checkbox to switch beetween new and old auth clients diff --git a/models/ConfigureForm.php b/models/ConfigureForm.php index f7de2f1..b1f52af 100644 --- a/models/ConfigureForm.php +++ b/models/ConfigureForm.php @@ -13,7 +13,7 @@ class ConfigureForm extends Model { /** - * @var boolean Enable this authclient + * @var bool Enable this authclient */ public $enabled; @@ -33,7 +33,7 @@ class ConfigureForm extends Model public $redirectUri; /** - * @var boolean use signing with LinkedIn version 2 + * @var bool use signing with LinkedIn version 2 */ public $useV2; @@ -80,7 +80,7 @@ public function loadSettings() $settings = $module->settings; - $this->enabled = (boolean)$settings->get('enabled'); + $this->enabled = (bool)$settings->get('enabled'); $this->clientId = $settings->get('clientId'); $this->clientSecret = $settings->get('clientSecret'); $this->useV2 = $settings->get('useV2'); @@ -96,7 +96,7 @@ public function saveSettings() /** @var Module $module */ $module = Yii::$app->getModule('auth-linkedin'); - $module->settings->set('enabled', (boolean)$this->enabled); + $module->settings->set('enabled', (bool)$this->enabled); $module->settings->set('clientId', $this->clientId); $module->settings->set('clientSecret', $this->clientSecret); $module->settings->set('useV2', $this->useV2); @@ -109,7 +109,7 @@ public function saveSettings() */ public static function getInstance() { - $config = new static; + $config = new static(); $config->loadSettings(); return $config; diff --git a/module.json b/module.json index 7ede80f..3cced9b 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "Integrating LinkedIn Sign-In (OAuth 2.0).", "keywords": [ ], - "version": "1.1.0", + "version": "1.1.1", "homepage": "https://github.com/humhub/auth-linkedin", "humhub": { "minVersion": "1.10"