Skip to content

Commit

Permalink
Merge pull request #7 from humhub/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 9, 2024
2 parents f27855a + 07d9041 commit 02c8688
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 12 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 @@ -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,
]);
}
}
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
1 change: 0 additions & 1 deletion authclient/LinkedinAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
class LinkedinAuth extends LinkedIn
{

/**
* @inheritdoc
*/
Expand Down
1 change: 0 additions & 1 deletion authclient/LinkedinAuthV2.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
class LinkedinAuthV2 extends LinkedIn
{

/**
* @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\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']],
],
];
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.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
Expand Down
10 changes: 5 additions & 5 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 All @@ -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;

Expand Down Expand Up @@ -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');
Expand All @@ -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);
Expand All @@ -109,7 +109,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 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"
Expand Down

0 comments on commit 02c8688

Please sign in to comment.