Skip to content

Commit

Permalink
Merge pull request #4 from humhub-contrib/enh/php-cs-fixer
Browse files Browse the repository at this point in the history
Use PHP CS Fixer
  • Loading branch information
luke- authored Oct 11, 2024
2 parents 90f3efe + 63d69fe commit 9801304
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 9 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/php-cs-fixer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: PHP CS Fixer

on: push

jobs:
fixers:
uses: humhub/actions/.github/workflows/module-php-cs-fixer.yml@main
2 changes: 1 addition & 1 deletion Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]);
}
}
Expand Down
1 change: 0 additions & 1 deletion Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
class Module extends \humhub\components\Module
{

/**
* @inheritdoc
*/
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']],
],
];
1 change: 0 additions & 1 deletion controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
class AdminController extends Controller
{

/**
* Render admin only page
*
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions models/ConfigureForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class ConfigureForm extends Model
{
/**
* @var boolean Enable this authclient
* @var bool Enable this authclient
*/
public $enabled;

Expand Down Expand Up @@ -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');

Expand All @@ -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);

Expand All @@ -101,7 +101,7 @@ public function saveSettings()
*/
public static function getInstance()
{
$config = new static;
$config = new static();
$config->loadSettings();

return $config;
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9801304

Please sign in to comment.