Skip to content

Commit

Permalink
Remove unused use-statements and order them alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jan 12, 2024
1 parent dca6336 commit 730bed3
Show file tree
Hide file tree
Showing 274 changed files with 100 additions and 626 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
2 changes: 0 additions & 2 deletions src/SAML2/Assertion/Decrypter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
use Psr\Log\LoggerInterface;
use SimpleSAML\SAML2\Assertion\Exception\NotDecryptedException;
use SimpleSAML\SAML2\Certificate\PrivateKeyLoader;
use SimpleSAML\SAML2\Compat\ContainerSingleton;
use SimpleSAML\SAML2\Configuration\IdentityProvider;
use SimpleSAML\SAML2\Configuration\ServiceProvider;
use SimpleSAML\SAML2\XML\saml\Assertion;
use SimpleSAML\SAML2\XML\saml\EncryptedAssertion;

use function count;
use function get_class;
use function is_null;
use function sprintf;

class Decrypter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\Assertion\Exception\NotDecryptedException;
use SimpleSAML\SAML2\Certificate\PrivateKeyLoader;
use SimpleSAML\SAML2\Compat\ContainerSingleton;
use SimpleSAML\SAML2\Configuration\IdentityProvider;
use SimpleSAML\SAML2\Configuration\IdentityProviderAware;
use SimpleSAML\SAML2\Configuration\ServiceProvider;
Expand All @@ -20,7 +19,6 @@
use SimpleSAML\SAML2\XML\saml\Subject;

use function get_class;
use function is_null;
use function sprintf;

final class NameIdDecryptionTransformer implements
Expand Down
2 changes: 1 addition & 1 deletion src/SAML2/Assertion/Transformer/TransformerChain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace SimpleSAML\SAML2\Assertion\Transformer;

use SimpleSAML\SAML2\XML\saml\Assertion;
use SimpleSAML\SAML2\Configuration\IdentityProvider;
use SimpleSAML\SAML2\Configuration\IdentityProviderAware;
use SimpleSAML\SAML2\Configuration\ServiceProvider;
use SimpleSAML\SAML2\Configuration\ServiceProviderAware;
use SimpleSAML\SAML2\XML\saml\Assertion;

class TransformerChain implements TransformerInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
namespace SimpleSAML\SAML2\Assertion\Validation\ConstraintValidator;

use DateInterval;
use SimpleSAML\SAML2\XML\saml\Assertion;
use SimpleSAML\SAML2\Assertion\Validation\AssertionConstraintValidator;
use SimpleSAML\SAML2\Assertion\Validation\Result;
use SimpleSAML\SAML2\Utils;
use SimpleSAML\SAML2\XML\saml\Assertion;

class NotBefore implements AssertionConstraintValidator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
namespace SimpleSAML\SAML2\Assertion\Validation\ConstraintValidator;

use DateInterval;
use SimpleSAML\SAML2\XML\saml\Assertion;
use SimpleSAML\SAML2\Assertion\Validation\AssertionConstraintValidator;
use SimpleSAML\SAML2\Assertion\Validation\Result;
use SimpleSAML\SAML2\Utils;
use SimpleSAML\SAML2\XML\saml\Assertion;

class SessionNotOnOrAfter implements AssertionConstraintValidator
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
namespace SimpleSAML\SAML2\Assertion\Validation\ConstraintValidator;

use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\XML\saml\Assertion;
use SimpleSAML\SAML2\Assertion\Validation\AssertionConstraintValidator;
use SimpleSAML\SAML2\Assertion\Validation\Result;
use SimpleSAML\SAML2\Configuration\ServiceProvider;
use SimpleSAML\SAML2\Configuration\ServiceProviderAware;
use SimpleSAML\SAML2\XML\saml\Assertion;

use function implode;
use function sprintf;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SimpleSAML\SAML2\Assertion\Validation\ConstraintValidator;

use Psr\Clock\ClockInterface;
use DateInterval;
use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\Assertion\Validation\Result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\Assertion\Validation\Result;
use SimpleSAML\SAML2\Assertion\Validation\SubjectConfirmationConstraintValidator;
use SimpleSAML\SAML2\XML\saml\SubjectConfirmation;
use SimpleSAML\SAML2\Utils;
use SimpleSAML\SAML2\XML\saml\SubjectConfirmation;

class SubjectConfirmationNotOnOrAfter implements SubjectConfirmationConstraintValidator
{
Expand Down
2 changes: 0 additions & 2 deletions src/SAML2/Assertion/Validation/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace SimpleSAML\SAML2\Assertion\Validation;

use SimpleSAML\SAML2\Exception\InvalidArgumentException;

/**
* Simple Result object
*/
Expand Down
3 changes: 1 addition & 2 deletions src/SAML2/Binding.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@

namespace SimpleSAML\SAML2;

use Exception;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use SimpleSAML\SAML2\Constants as C;
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;
use SimpleSAML\SAML2\Exception\Protocol\UnsupportedBindingException;
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;

use function array_key_exists;
use function array_keys;
Expand Down
1 change: 0 additions & 1 deletion src/SAML2/Certificate/Key.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use SimpleSAML\SAML2\Exception\InvalidArgumentException;

use function array_key_exists;
use function in_array;
use function is_string;

/**
Expand Down
1 change: 0 additions & 1 deletion src/SAML2/Certificate/KeyLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use SimpleSAML\SAML2\Certificate\Exception\NoKeysFoundException;
use SimpleSAML\SAML2\Certificate\KeyCollection;
use SimpleSAML\SAML2\Configuration\CertificateProvider;
use SimpleSAML\SAML2\Exception\InvalidArgumentException;
use SimpleSAML\SAML2\Utilities\File;
use SimpleSAML\XMLSecurity\Utils\Certificate;

Expand Down
2 changes: 0 additions & 2 deletions src/SAML2/Certificate/PrivateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace SimpleSAML\SAML2\Certificate;

use SimpleSAML\SAML2\Exception\InvalidArgumentException;

class PrivateKey extends Key
{
/**
Expand Down
4 changes: 2 additions & 2 deletions src/SAML2/Compat/AbstractContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
use Psr\Clock\ClockInterface;
use Psr\Log\LoggerInterface;
use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\XML\ExtensionPointInterface;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\SAML2\XML\ExtensionPointInterface;

use function array_key_exists;
use function is_subclass_of;
use function implode;
use function is_subclass_of;

abstract class AbstractContainer
{
Expand Down
1 change: 0 additions & 1 deletion src/SAML2/Configuration/Destination.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SimpleSAML\SAML2\Configuration;

use SimpleSAML\SAML2\Exception\InvalidArgumentException;
use Stringable;

/**
Expand Down
2 changes: 0 additions & 2 deletions src/SAML2/Configuration/PrivateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
namespace SimpleSAML\SAML2\Configuration;

use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\Exception\InvalidArgumentException;
use SimpleSAML\SAML2\Exception\RuntimeException;

/**
* Configuration of a private key.
Expand Down
2 changes: 0 additions & 2 deletions src/SAML2/HTTPPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace SimpleSAML\SAML2;

use DOMDocument;
use DOMElement;
use Exception;
use Nyholm\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
Expand Down
7 changes: 2 additions & 5 deletions src/SAML2/HTTPRedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,29 @@

namespace SimpleSAML\SAML2;

use DOMElement;
use Exception;
use Nyholm\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\Compat\ContainerSingleton;
use SimpleSAML\SAML2\Constants as C;
use SimpleSAML\XMLSecurity\Exception\SignatureVerificationFailedException;
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;
use SimpleSAML\SAML2\XML\samlp\AbstractRequest;
use SimpleSAML\SAML2\XML\samlp\MessageFactory;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmFactory;
use SimpleSAML\XMLSecurity\Key\PublicKey;
use SimpleSAML\XMLSecurity\Exception\SignatureVerificationFailedException;
use SimpleSAML\XMLSecurity\TestUtils\PEMCertificatesMock;
use SimpleSAML\XMLSecurity\Utils\Security;

use function array_key_exists;
use function base64_decode;
use function base64_encode;
use function gzdeflate;
use function gzinflate;
use function sprintf;
use function strlen;
use function str_contains;
use function strlen;
use function urlencode;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
use function implode;
use function sprintf;
use function strlen;
use function str_contains;
use function substr;

class IsSuccessful implements ConstraintValidator
Expand Down
8 changes: 2 additions & 6 deletions src/SAML2/SOAP.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,24 @@

namespace SimpleSAML\SAML2;

use DOMDocument;
use Exception;
use Nyholm\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use SimpleSAML\SAML2\Exception\Protocol\UnsupportedBindingException;
use SimpleSAML\SAML2\Utils;
use SimpleSAML\SOAP11\Utils\XPath;
use SimpleSAML\SAML2\XML\ecp\Response as ECPResponse;
use SimpleSAML\SAML2\XML\ecp\RequestAuthenticated;
use SimpleSAML\SAML2\XML\ecp\Response as ECPResponse;
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;
use SimpleSAML\SAML2\XML\samlp\MessageFactory;
use SimpleSAML\SAML2\XML\samlp\Response as SAML2_Response;
use SimpleSAML\SOAP\Constants as C;
use SimpleSAML\SOAP11\Utils\XPath;
use SimpleSAML\SOAP11\XML\env\Body;
use SimpleSAML\SOAP11\XML\env\Envelope;
use SimpleSAML\SOAP11\XML\env\Header;
use SimpleSAML\XML\DOMDocumentFactory;

use function file_get_contents;
use function header;
use function sprintf;

/**
* Class which implements the SOAP binding.
Expand Down
3 changes: 0 additions & 3 deletions src/SAML2/SOAPClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
use Exception;
use SimpleSAML\Configuration;
use SimpleSAML\SAML2\Compat\ContainerSingleton;
use SimpleSAML\SAML2\Exception\InvalidArgumentException;
use SimpleSAML\SAML2\Exception\RuntimeException;
use SimpleSAML\SAML2\XML\samlp\AbstractMessage;
use SimpleSAML\SAML2\XML\samlp\MessageFactory;
use SimpleSAML\SOAP11\Utils\XPath;
Expand All @@ -20,7 +18,6 @@
use SimpleSAML\Utils\Crypto;
use SimpleSAML\XML\Chunk;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Exception\UnparseableXMLException;
use SimpleSAML\XMLSecurity\XMLSecurityKey;
use SoapClient as BuiltinSoapClient;

Expand Down
1 change: 0 additions & 1 deletion src/SAML2/Signature/AbstractChainedValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
use SimpleSAML\XMLSecurity\Alg\Signature\SignatureAlgorithmFactory;
use SimpleSAML\XMLSecurity\CryptoEncoding\PEM;
use SimpleSAML\XMLSecurity\Key\X509Certificate as X509;
use SimpleSAML\XMLSecurity\Utils\Security;
use SimpleSAML\XMLSecurity\XML\SignedElementInterface;

use function sprintf;
Expand Down
1 change: 0 additions & 1 deletion src/SAML2/Utilities/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SimpleSAML\SAML2\Utilities;

use SimpleSAML\SAML2\Exception\InvalidArgumentException;
use SimpleSAML\SAML2\Exception\RuntimeException;

use function file_get_contents;
Expand Down
1 change: 0 additions & 1 deletion src/SAML2/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SimpleSAML\SAML2;

use SimpleSAML\Assert\Assert;
use SimpleSAML\SAML2\Compat\AbstractContainer;
use SimpleSAML\SAML2\Compat\ContainerSingleton;
use SimpleSAML\SAML2\XML\md\KeyDescriptor;
Expand Down
4 changes: 2 additions & 2 deletions src/SAML2/XML/IdentifierTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Exception\TooManyElementsException;
use SimpleSAML\SAML2\XML\saml\AbstractBaseID;
use SimpleSAML\SAML2\XML\saml\EncryptedID;
use SimpleSAML\SAML2\XML\saml\NameID;
use SimpleSAML\SAML2\XML\saml\IdentifierInterface;
use SimpleSAML\SAML2\XML\saml\NameID;
use SimpleSAML\XML\Exception\TooManyElementsException;

use function array_pop;

Expand Down
2 changes: 0 additions & 2 deletions src/SAML2/XML/alg/DigestMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Chunk;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XML\XsNamespace as NS;
use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException;

/**
* Class for handling the alg:DigestMethod element.
Expand Down
3 changes: 0 additions & 3 deletions src/SAML2/XML/alg/SigningMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Chunk;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\Exception\MissingAttributeException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XML\XsNamespace as NS;
use SimpleSAML\XMLSecurity\Exception\InvalidArgumentException;

use function strval;

Expand Down
6 changes: 0 additions & 6 deletions src/SAML2/XML/ecp/RelayState.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@
use SimpleSAML\SOAP\Constants as C;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\Exception\MissingAttributeException;
use SimpleSAML\XML\Exception\TooManyElementsException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\StringElementTrait;

use function boolval;
use function intval;
use function strval;

/**
* Class representing the ECP RelayState element.
*
Expand Down
4 changes: 0 additions & 4 deletions src/SAML2/XML/ecp/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\Exception\MissingAttributeException;
use SimpleSAML\XML\Exception\TooManyElementsException;
use SimpleSAML\XML\Exception\SchemaViolationException;

use function boolval;
use function intval;
use function is_null;
use function is_numeric;
use function strval;

/**
Expand Down
2 changes: 0 additions & 2 deletions src/SAML2/XML/ecp/RequestAuthenticated.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use SimpleSAML\XML\Exception\MissingAttributeException;

use function boolval;
use function is_null;
use function is_numeric;
use function strval;

/**
Expand Down
Loading

0 comments on commit 730bed3

Please sign in to comment.