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 94d45de..9131f75 100644 --- a/Events.php +++ b/Events.php @@ -21,7 +21,7 @@ public static function onAuthClientCollectionInit($event) $authClientCollection->setClient('github', [ 'class' => GithubAuth::class, 'clientId' => ConfigureForm::getInstance()->clientId, - 'clientSecret' => ConfigureForm::getInstance()->clientSecret + 'clientSecret' => ConfigureForm::getInstance()->clientSecret, ]); } } diff --git a/Module.php b/Module.php index 0d14bae..7dbc458 100644 --- a/Module.php +++ b/Module.php @@ -9,7 +9,6 @@ */ class Module extends \humhub\components\Module { - /** * @inheritdoc */ diff --git a/config.php b/config.php index 81e49f8..57889b9 100644 --- a/config.php +++ b/config.php @@ -7,6 +7,6 @@ 'class' => 'humhubContrib\auth\github\Module', 'namespace' => 'humhubContrib\auth\github', 'events' => [ - [Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\github\Events', 'onAuthClientCollectionInit']] + [Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\github\Events', 'onAuthClientCollectionInit']], ], ]; diff --git a/controllers/AdminController.php b/controllers/AdminController.php index eb412bf..118bb34 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 62e85fe..0ee0b0f 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.0.5 (Unreleased) +--------------------- +- Enh #4: Use PHP CS Fixer + 1.0.4 (May 23, 2024) --------------------- - Fix: E-Mail Lookup diff --git a/models/ConfigureForm.php b/models/ConfigureForm.php index 0d7798e..3b30899 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; @@ -74,7 +74,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'); @@ -89,7 +89,7 @@ public function saveSettings() /** @var Module $module */ $module = Yii::$app->getModule('auth-github'); - $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); @@ -101,7 +101,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 de755ac..c8c4f6a 100644 --- a/module.json +++ b/module.json @@ -4,7 +4,7 @@ "description": "Integrating GitHub Sign-In (OAuth 2.0).", "keywords": [ ], - "version": "1.0.4", + "version": "1.0.5", "homepage": "https://github.com/humhub-contrib/auth-github", "humhub": { "minVersion": "1.6"