Skip to content

Commit

Permalink
chore: fixing the formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
agebhardt committed Nov 27, 2024
1 parent 970fd77 commit 2096e45
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
php-version: '8.3'
tools: php-cs-fixer, cs2pr
- name: Format
run: php-cs-fixer fix --dry-run --allow-risky=yes --format=checkstyle | cs2pr
run: php-cs-fixer fix --dry-run --allow-risky=yes --format=checkstyle --rules=@PSR12 | cs2pr
test:
name: Test
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
],
"scripts": {
"lint": "./vendor/bin/phpcs --standard=PSR12 --report=full custom",
"lint-fix": "./vendor/bin/phpcbf --standard=PSR12 custom"
"phpcs-fix": "./vendor/bin/phpcbf --standard=PSR12 custom",
"format": "./vendor/bin/php-cs-fixer fix --allow-risky=yes --rules=@PSR12"
},
"require": {
"php": "^7.4 || ^8.0",
Expand Down
3 changes: 0 additions & 3 deletions custom/lib/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
use Phpfastcache\CacheManager;
use OpenAPI\Client\ApiException;

require 'vendor/autoload.php';

class Authentication
{
private $passage;
Expand All @@ -26,7 +24,6 @@ class Authentication
*/
public function __construct(Passage $passage)
{
// require_once 'vendor/autoload.php';
$this->passage = $passage;

$appId = $this->passage->getAppId();
Expand Down
10 changes: 5 additions & 5 deletions custom/lib/Passage.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ public function getUser(string $user_id): UserInfo|Model401Error|Model404Error|M
return $this->usersApi->getUser($this->appId, $user_id)['user'];
}

/**
* Get a user by identifier
*
* @return UserInfo|Model401Error|Model404Error|Model500Error
*/
/**
* Get a user by identifier
*
* @return UserInfo|Model401Error|Model404Error|Model500Error
*/
public function getUserByIdentifier(string $identifier): UserInfo|Model401Error|Model404Error|Model500Error
{
$users = $this->usersApi->listPaginatedUsers(
Expand Down
6 changes: 4 additions & 2 deletions custom/models/UpdatePasskeysAuthMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,12 @@ public function __construct(array $data = null)
*/
private function setIfExists(string $variableName, array $fields, $defaultValue): void
{
if self::isNullable($variableName) {
if (
self::isNullable($variableName)
&& array_key_exists($variableName, $fields)
&& is_null($fields[$variableName])
) $this->openAPINullablesSetToNull[] = $variableName;
) {
$this->openAPINullablesSetToNull[] = $variableName;
}

$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
Expand Down

0 comments on commit 2096e45

Please sign in to comment.