Skip to content

[4.3] update coding style #6501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/Config/Security.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ class Security extends BaseConfig
* Defaults to `Lax` as recommended in this link:
*
* @see https://portswigger.net/web-security/csrf/samesite-cookies
*
* @deprecated `Config\Cookie` $samesite property is used.
*/
public string $samesite = 'Lax';
Expand Down
8 changes: 4 additions & 4 deletions system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@ public static function promptByMultipleKeys(string $text, array $options): array
return $input;
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// Utility for promptBy...
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Validation for $options in promptByKey() and promptByMultipleKeys(). Return an error if $options is an empty array.
Expand All @@ -390,9 +390,9 @@ private static function printKeysAndValues(array $options): void
}
}

//--------------------------------------------------------------------
// --------------------------------------------------------------------
// End Utility for promptBy...
//--------------------------------------------------------------------
// --------------------------------------------------------------------

/**
* Validate one prompt "field" at a time
Expand Down
1 change: 0 additions & 1 deletion system/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ protected function checkRoutes(string $uri): bool

if ($this->collection->shouldUseSupportedLocalesOnly()
&& ! in_array($matched['locale'], config('App')->supportedLocales, true)) {

// Throw exception to prevent the autorouter, if enabled,
// from trying to find a route
throw PageNotFoundException::forLocaleNotSupported($matched['locale']);
Expand Down
1 change: 1 addition & 0 deletions tests/system/Autoloader/AutoloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ public function testAutoloaderLoadsNonClassFiles(): void

/**
* @runInSeparateProcess
*
* @preserveGlobalState disabled
*/
public function testLoadHelpers(): void
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Entity/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function testCastInteger()

public function testCastIntBool()
{
$entity = new class () extends Entity {
$entity = new class () extends Entity {
protected $casts = [
'active' => 'int-bool',
];
Expand Down
2 changes: 1 addition & 1 deletion tests/system/Models/InsertModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function testInsertPermitInsertNoData(): void
'updated_at' => ['type' => 'INTEGER', 'constraint' => 11, 'null' => true],
])->addKey('id', true)->createTable('insert_no_data', true);

$model = new class () extends Model {
$model = new class () extends Model {
protected $table = 'insert_no_data';
protected $allowedFields = [
'updated_at',
Expand Down