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/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;