Skip to content

Commit

Permalink
Autocommit PHP CS Fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin authored and github-actions[bot] committed Oct 9, 2024
1 parent 6fd3a71 commit 402f93e
Show file tree
Hide file tree
Showing 10 changed files with 294 additions and 155 deletions.
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('twitter', [
'class' => TwitterAuth::class,
'consumerKey' => ConfigureForm::getInstance()->consumerId,
'consumerSecret' => ConfigureForm::getInstance()->consumerSecret
'consumerSecret' => ConfigureForm::getInstance()->consumerSecret,
]);
}
}
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 authclient/TwitterAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TwitterAuth extends Twitter
* @inheritdoc
*/
public $attributeParams = [
'include_email' => 'true'
'include_email' => 'true',
];

/**
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\twitter\Module',
'namespace' => 'humhubContrib\auth\twitter',
'events' => [
[Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\twitter\Events', 'onAuthClientCollectionInit']]
[Collection::class, Collection::EVENT_AFTER_CLIENTS_SET, ['humhubContrib\auth\twitter\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
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 Down Expand Up @@ -74,12 +74,12 @@ public function loadSettings()

$settings = $module->settings;

$this->enabled = (boolean)$settings->get('enabled');
$this->enabled = (bool)$settings->get('enabled');
$this->consumerId = $settings->get('consumerId');
$this->consumerSecret = $settings->get('consumerSecret');

$this->redirectUri = Url::to(['/user/auth/external', 'authclient' => 'twitter'], true);
// $this->redirectUri = Url::to(['user/auth/twitter'], true);
// $this->redirectUri = Url::to(['user/auth/twitter'], true);
}

/**
Expand All @@ -90,7 +90,7 @@ public function saveSettings()
/** @var Module $module */
$module = Yii::$app->getModule('auth-twitter');

$module->settings->set('enabled', (boolean)$this->enabled);
$module->settings->set('enabled', (bool)$this->enabled);
$module->settings->set('consumerId', $this->consumerId);
$module->settings->set('consumerSecret', $this->consumerSecret);

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

return $config;
Expand Down
5 changes: 2 additions & 3 deletions tests/codeception/_bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@
\Codeception\Util\Autoload::addNamespace('', Yii::getAlias('@humhubTests/codeception/_support'));
\Codeception\Util\Autoload::addNamespace('tests\codeception\fixtures', Yii::getAlias('@humhubTests/codeception/fixtures'));
\Codeception\Util\Autoload::addNamespace('', Yii::getAlias('@humhubTests/codeception/_pages'));
if(isset($cfg['modules'])) {
if (isset($cfg['modules'])) {
\Codeception\Configuration::append(['humhub_modules' => $cfg['modules']]);
}

if(isset($cfg['fixtures'])) {
if (isset($cfg['fixtures'])) {
\Codeception\Configuration::append(['fixtures' => $cfg['fixtures']]);
}
?>
1 change: 1 addition & 0 deletions tests/codeception/_support/AcceptanceTester.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace twitter;

/**
Expand Down
Loading

0 comments on commit 402f93e

Please sign in to comment.