Skip to content

Commit 3eb7439

Browse files
committed
Replace grouped use-statements and fix incorrect number of newlines
1 parent 8c526f8 commit 3eb7439

72 files changed

Lines changed: 430 additions & 189 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/admin/src/Controller/Config.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
namespace SimpleSAML\Module\admin\Controller;
66

7-
use SimpleSAML\{Configuration, Module, Session, Utils};
7+
use SimpleSAML\Configuration;
88
use SimpleSAML\Locale\Translate;
9+
use SimpleSAML\Module;
10+
use SimpleSAML\Session;
11+
use SimpleSAML\Utils;
912
use SimpleSAML\XHTML\Template;
10-
use Symfony\Component\HttpFoundation\{Request, Response, StreamedResponse};
13+
use Symfony\Component\HttpFoundation\Request;
14+
use Symfony\Component\HttpFoundation\StreamedResponse;
1115

1216
use function curl_close;
1317
use function curl_exec;
@@ -34,6 +38,7 @@ class Config
3438

3539
public const RELEASES_API = 'https://api.github.com/repos/simplesamlphp/simplesamlphp/releases/latest';
3640

41+
3742
/** @var \SimpleSAML\Utils\Auth */
3843
protected Utils\Auth $authUtils;
3944

@@ -203,6 +208,7 @@ public function phpinfo(/** @scrutinizer ignore-unused */ Request $request): Res
203208
return $response;
204209
}
205210

211+
206212
/**
207213
* Perform a list of checks on the current installation, and return the results as an array.
208214
*

modules/admin/src/Controller/Federation.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
namespace SimpleSAML\Module\admin\Controller;
66

77
use Exception;
8+
use SimpleSAML\Assert\Assert;
89
use SimpleSAML\Auth;
910
use SimpleSAML\Configuration;
10-
use SimpleSAML\Logger;
11-
use SimpleSAML\Module;
12-
use SimpleSAML\Utils;
13-
use SimpleSAML\Assert\Assert;
1411
use SimpleSAML\Locale\Translate;
12+
use SimpleSAML\Logger;
1513
use SimpleSAML\Metadata\MetaDataStorageHandler;
1614
use SimpleSAML\Metadata\SAMLBuilder;
1715
use SimpleSAML\Metadata\SAMLParser;
1816
use SimpleSAML\Metadata\Signer;
17+
use SimpleSAML\Module;
1918
use SimpleSAML\Module\adfs\IdP\ADFS as ADFS_IdP;
2019
use SimpleSAML\Module\saml\IdP\SAML2 as SAML2_IdP;
2120
use SimpleSAML\SAML2\Constants as C;
2221
use SimpleSAML\SAML2\Exception\ArrayValidationException;
2322
use SimpleSAML\SAML2\XML\md\ContactPerson;
23+
use SimpleSAML\Utils;
2424
use SimpleSAML\XHTML\Template;
2525
use Symfony\Component\HttpFoundation\Request;
2626
use Symfony\Component\HttpFoundation\Response;
@@ -73,7 +73,7 @@ class Federation
7373
* FederationController constructor.
7474
*
7575
* @param \SimpleSAML\Configuration $config The configuration to use.
76-
* @throws Exception
76+
* @throws \Exception
7777
*/
7878
public function __construct(
7979
protected Configuration $config,
@@ -221,7 +221,11 @@ private function getHostedIdP(): array
221221
$selfHost = $httpUtils->getSelfHostWithPath();
222222
foreach ($idps as $index => $idp) {
223223
if (isset($idp['host']) && $idp['host'] !== '__DEFAULT__') {
224-
$mdHostBase = str_replace('://' . $selfHost . '/', '://' . $idp['host'] . '/', $metadataBase);
224+
$mdHostBase = str_replace(
225+
'://' . $selfHost . '/',
226+
'://' . $idp['host'] . '/',
227+
$metadataBase,
228+
);
225229
} else {
226230
$mdHostBase = $metadataBase;
227231
}

modules/admin/src/Controller/Sandbox.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
namespace SimpleSAML\Module\admin\Controller;
66

7-
use SimpleSAML\{Configuration, Session};
7+
use SimpleSAML\Configuration;
8+
use SimpleSAML\Session;
89
use SimpleSAML\XHTML\Template;
910

1011
use function time;

modules/admin/src/Controller/Test.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@
44

55
namespace SimpleSAML\Module\admin\Controller;
66

7-
use SimpleSAML\{Auth, Configuration, Module, Session, Utils};
87
use SimpleSAML\Assert\Assert;
8+
use SimpleSAML\Auth;
9+
use SimpleSAML\Configuration;
910
use SimpleSAML\Locale\Translate;
11+
use SimpleSAML\Module;
12+
use SimpleSAML\Session;
13+
use SimpleSAML\Utils;
1014
use SimpleSAML\XHTML\Template;
11-
use Symfony\Component\HttpFoundation\{Request, Response};
15+
use Symfony\Component\HttpFoundation\Request;
16+
use Symfony\Component\HttpFoundation\Response;
1217

1318
use function is_null;
1419
use function time;

modules/core/src/Auth/Process/AttributeAdd.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class AttributeAdd extends Auth\ProcessingFilter
4444
*
4545
* @param array &$config Configuration information about this filter.
4646
* @param mixed $reserved For future use.
47-
* @throws Exception
47+
* @throws \Exception
4848
*/
4949
public function __construct(array &$config, $reserved)
5050
{

modules/core/src/Auth/Process/AttributeAlter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
namespace SimpleSAML\Module\core\Auth\Process;
66

7-
use SimpleSAML\{Auth, Error};
87
use SimpleSAML\Assert\Assert;
8+
use SimpleSAML\Auth;
9+
use SimpleSAML\Error;
910

1011
use function array_diff;
1112
use function array_key_exists;

modules/core/src/Auth/Process/AttributeCopy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class AttributeCopy extends Auth\ProcessingFilter
4141
*
4242
* @param array &$config Configuration information about this filter.
4343
* @param mixed $reserved For future use.
44-
* @throws Exception
44+
* @throws \Exception
4545
*/
4646
public function __construct(array &$config, $reserved)
4747
{

modules/core/src/Auth/Process/AttributeLimit.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace SimpleSAML\Module\core\Auth\Process;
66

7-
use SimpleSAML\{Auth, Error, Logger};
87
use SimpleSAML\Assert\Assert;
8+
use SimpleSAML\Auth;
9+
use SimpleSAML\Error;
10+
use SimpleSAML\Logger;
911

1012
use function array_intersect;
1113
use function array_key_exists;

modules/core/src/Auth/Process/AttributeMap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
namespace SimpleSAML\Module\core\Auth\Process;
66

77
use Exception;
8-
use SimpleSAML\{Auth, Configuration, Module};
98
use SimpleSAML\Assert\Assert;
9+
use SimpleSAML\Auth;
10+
use SimpleSAML\Configuration;
11+
use SimpleSAML\Module;
1012
use Symfony\Component\Filesystem\Filesystem;
1113

1214
use function array_key_exists;

modules/core/src/Auth/Process/AttributeValueMap.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
namespace SimpleSAML\Module\core\Auth\Process;
66

7-
use SimpleSAML\{Auth, Error, Logger};
87
use SimpleSAML\Assert\Assert;
8+
use SimpleSAML\Auth;
9+
use SimpleSAML\Error;
10+
use SimpleSAML\Logger;
911

1012
use function array_intersect;
1113
use function array_key_exists;

0 commit comments

Comments
 (0)