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 11, 2024
1 parent 193f7e1 commit 44bf01f
Show file tree
Hide file tree
Showing 28 changed files with 11 additions and 58 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
2 changes: 1 addition & 1 deletion src/AbstractElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

use DOMElement;
use RuntimeException;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Exception\MissingAttributeException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\SerializableElementTrait;
use SimpleSAML\Assert\Assert;

use function array_slice;
use function defined;
Expand Down
2 changes: 0 additions & 2 deletions src/ArrayizableElementInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

namespace SimpleSAML\XML;

use DOMElement;

/**
* interface class to be implemented by all the classes that represent an arrayizable XML element
*
Expand Down
4 changes: 1 addition & 3 deletions src/Base64ElementTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Constants;
use SimpleSAML\XML\StringElementTrait;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\StringElementTrait;

use function str_replace;

Expand Down
2 changes: 0 additions & 2 deletions src/Chunk.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
use SimpleSAML\XML\Exception\MissingAttributeException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\SerializableElementTrait;
use SimpleSAML\XML\Utils;

use function func_num_args;
use function in_array;
use function intval;

Expand Down
3 changes: 0 additions & 3 deletions src/DOMDocumentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
namespace SimpleSAML\XML;

use DOMDocument;
use InvalidArgumentException;
use RuntimeException;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Exception\IOException;
use SimpleSAML\XML\Exception\UnparseableXMLException;

use function defined;
use function file_get_contents;
use function is_file;
use function is_readable;
use function libxml_clear_errors;
use function libxml_get_last_error;
use function libxml_use_internal_errors;
Expand Down
1 change: 0 additions & 1 deletion src/ExtendableElementTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SimpleSAML\XML;

use DOMElement;
use RuntimeException;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Chunk;
Expand Down
1 change: 0 additions & 1 deletion src/QNameElementTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Constants;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\StringElementTrait;
Expand Down
2 changes: 0 additions & 2 deletions src/SerializableElementTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
namespace SimpleSAML\XML;

use DOMElement;
use RuntimeException;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\DOMDocumentFactory;

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

use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\Constants;
use SimpleSAML\XML\Exception\InvalidDOMElementException;

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

namespace SimpleSAML\XML\TestUtils;

use DOMDocument;

use function class_exists;

/**
Expand Down
2 changes: 0 additions & 2 deletions src/Utils/XPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
namespace SimpleSAML\XML\Utils;

use DOMDocument;
use DOMElement;
use DOMNode;
use DOMXPath;
use InvalidArgumentException;
use SimpleSAML\Assert\Assert;

/**
Expand Down
5 changes: 2 additions & 3 deletions tests/Utils/ExtendableAttributesElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@

use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\XsNamespace as NS;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\ExtendableAttributesTrait;
use SimpleSAML\XML\XsNamespace as NS;

/**
* Empty shell class for testing ExtendableAttributesTrait.
Expand Down
4 changes: 1 addition & 3 deletions tests/Utils/ExtendableElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
namespace SimpleSAML\Test\XML;

use DOMElement;
use SimpleSAML\Assert\Assert;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\Chunk;
use SimpleSAML\XML\XsNamespace as NS;
use SimpleSAML\XML\ExtendableElementTrait;
use SimpleSAML\XML\Exception\InvalidDOMElementException;
use SimpleSAML\XML\SerializableElementTrait;
use SimpleSAML\XML\XsNamespace as NS;

/**
* Empty shell class for testing ExtendableElementTrait.
Expand Down
2 changes: 1 addition & 1 deletion tests/Utils/QNameElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace SimpleSAML\Test\XML;

use SimpleSAML\XML\QNameElementTrait;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\QNameElementTrait;

/**
* Empty shell class for testing QNameElement.
Expand Down
1 change: 0 additions & 1 deletion tests/Utils/StringElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace SimpleSAML\Test\XML;

use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\SerializableElementTrait;
use SimpleSAML\XML\StringElementTrait;

/**
Expand Down
1 change: 0 additions & 1 deletion tests/XML/AbstractElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use PHPUnit\Framework\TestCase;
use SimpleSAML\Test\XML\Element;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Exception\MissingAttributeException;
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait;
Expand Down
5 changes: 1 addition & 4 deletions tests/XML/AttributeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@

use DOMDocument;
use PHPUnit\Framework\TestCase;
use SimpleSAML\XML\Constants as C;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Attribute;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\TestUtils\ArrayizableElementTestTrait;

use function dirname;

/**
* Class \SimpleSAML\XML\AttributeTest
*
Expand Down
4 changes: 0 additions & 4 deletions tests/XML/Base64ElementTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
namespace SimpleSAML\Test\XML;

use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Test\XML\Base64EStringlement;
use SimpleSAML\Test\XML\XMLDumper;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Base64ElementTrait;
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait;

use function dirname;
Expand Down
3 changes: 1 addition & 2 deletions tests/XML/DOMDocumentFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

namespace SimpleSAML\Test\XML;

use InvalidArgumentException;
use RuntimeException;
use PHPUnit\Framework\TestCase;
use RuntimeException;
use SimpleSAML\Assert\AssertionFailedException;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Exception\UnparseableXMLException;
Expand Down
1 change: 0 additions & 1 deletion tests/XML/Exception/IOExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace SimpleSAML\Test\XML;

use LibXMLError;
use PHPUnit\Framework\TestCase;
use SimpleSAML\XML\Exception\IOException;

Expand Down
1 change: 0 additions & 1 deletion tests/XML/Exception/UnparseableXMLExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
namespace SimpleSAML\Test\XML;

use LibXMLError;
use LIBXML_ERR_ERROR;
use PHPUnit\Framework\TestCase;
use SimpleSAML\XML\Exception\UnparseableXMLException;

Expand Down
5 changes: 0 additions & 5 deletions tests/XML/ExtendableAttributesTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@
namespace SimpleSAML\Test\XML;

use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Assert\AssertionFailedException;
use SimpleSAML\Test\XML\ExtendableAttributesElement;
use SimpleSAML\Test\XML\ExtendableAttributesTestTrait;
use SimpleSAML\XML\Attribute;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\XsNamespace as NS;

use function dirname;

/**
* Class \SimpleSAML\XML\ExtendableAttributesTraitTest
*
Expand Down
3 changes: 1 addition & 2 deletions tests/XML/ExtendableElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
namespace SimpleSAML\Test\XML;

use PHPUnit\Framework\TestCase;
use SimpleSAML\Test\XML\ExtendableElementElement;
use SimpleSAML\XML\Chunk;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\TestUtils\SchemaValidationTestTrait;
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait;
use SimpleSAML\XML\Attribute;

use function dirname;
use function strval;

/**
* Class \SimpleSAML\XML\ExtendableElementTest
Expand Down
2 changes: 0 additions & 2 deletions tests/XML/ExtendableElementTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
use SimpleSAML\XML\ElementInterface;
use SimpleSAML\XML\XsNamespace as NS;

use function dirname;

/**
* Class \SimpleSAML\XML\ExtendableElementTraitTest
*
Expand Down
2 changes: 0 additions & 2 deletions tests/XML/LocalizedStringElementTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

use PHPUnit\Framework\TestCase;
use SimpleSAML\Test\XML\LocalizedStringElement;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\StringElementTrait;
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait;

use function dirname;
Expand Down
3 changes: 0 additions & 3 deletions tests/XML/QNameElementTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
namespace SimpleSAML\Test\XML;

use PHPUnit\Framework\TestCase;
use SimpleSAML\Assert\Assert;
use SimpleSAML\Test\XML\QNamelement;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\Exception\SchemaViolationException;
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait;
Expand Down
2 changes: 0 additions & 2 deletions tests/XML/StringElementTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

use PHPUnit\Framework\TestCase;
use SimpleSAML\Test\XML\StringElement;
use SimpleSAML\XML\AbstractElement;
use SimpleSAML\XML\DOMDocumentFactory;
use SimpleSAML\XML\StringElementTrait;
use SimpleSAML\XML\TestUtils\SerializableElementTestTrait;

use function dirname;
Expand Down

0 comments on commit 44bf01f

Please sign in to comment.