Skip to content

Commit 333a7e5

Browse files
committed
Revert unjust const>enum convertion
1 parent 8ea6dbc commit 333a7e5

20 files changed

+38
-140
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -258,24 +258,6 @@ parameters:
258258
count: 2
259259
path: src/SOAPClient.php
260260

261-
-
262-
message: '#^Access to constant Any on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
263-
identifier: class.notFound
264-
count: 1
265-
path: src/XML/alg/DigestMethod.php
266-
267-
-
268-
message: '#^Access to constant Any on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
269-
identifier: class.notFound
270-
count: 1
271-
path: src/XML/alg/SigningMethod.php
272-
273-
-
274-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
275-
identifier: class.notFound
276-
count: 2
277-
path: src/XML/md/AbstractEndpointType.php
278-
279261
-
280262
message: '#^Unsafe usage of new static\(\)\.$#'
281263
identifier: new.static
@@ -294,30 +276,12 @@ parameters:
294276
count: 2
295277
path: src/XML/md/AbstractLocalizedName.php
296278

297-
-
298-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
299-
identifier: class.notFound
300-
count: 1
301-
path: src/XML/md/AbstractRoleDescriptorType.php
302-
303279
-
304280
message: '#^Call to an undefined static method SimpleSAML\\SAML2\\XML\\md\\AbstractSignedMdElement\:\:getXsiTypeNamespaceURI\(\)\.$#'
305281
identifier: staticMethod.notFound
306282
count: 1
307283
path: src/XML/md/AbstractSignedMdElement.php
308284

309-
-
310-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
311-
identifier: class.notFound
312-
count: 1
313-
path: src/XML/md/AffiliationDescriptor.php
314-
315-
-
316-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
317-
identifier: class.notFound
318-
count: 1
319-
path: src/XML/md/ContactPerson.php
320-
321285
-
322286
message: '#^Call to an undefined method SimpleSAML\\XML\\AbstractElement\:\:getList\(\)\.$#'
323287
identifier: method.notFound
@@ -330,66 +294,24 @@ parameters:
330294
count: 1
331295
path: src/XML/md/EntitiesDescriptor.php
332296

333-
-
334-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
335-
identifier: class.notFound
336-
count: 1
337-
path: src/XML/md/EntityDescriptor.php
338-
339-
-
340-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
341-
identifier: class.notFound
342-
count: 1
343-
path: src/XML/md/Organization.php
344-
345297
-
346298
message: '#^Call to an undefined method SimpleSAML\\XML\\AbstractElement\:\:getList\(\)\.$#'
347299
identifier: method.notFound
348300
count: 1
349301
path: src/XML/md/Organization.php
350302

351-
-
352-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
353-
identifier: class.notFound
354-
count: 1
355-
path: src/XML/mdui/DiscoHints.php
356-
357303
-
358304
message: '#^Call to an undefined method SimpleSAML\\XMLSchema\\Type\\Interface\\ValueTypeInterface\:\:toArray\(\)\.$#'
359305
identifier: method.notFound
360306
count: 1
361307
path: src/XML/mdui/Keywords.php
362308

363-
-
364-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
365-
identifier: class.notFound
366-
count: 1
367-
path: src/XML/mdui/UIInfo.php
368-
369-
-
370-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
371-
identifier: class.notFound
372-
count: 1
373-
path: src/XML/saml/Advice.php
374-
375-
-
376-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
377-
identifier: class.notFound
378-
count: 1
379-
path: src/XML/saml/Attribute.php
380-
381309
-
382310
message: '#^Unsafe usage of new static\(\)\.$#'
383311
identifier: new.static
384312
count: 1
385313
path: src/XML/saml/Attribute.php
386314

387-
-
388-
message: '#^Access to constant Any on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
389-
identifier: class.notFound
390-
count: 2
391-
path: src/XML/saml/AuthnContextDecl.php
392-
393315
-
394316
message: '#^Unsafe usage of new static\(\)\.$#'
395317
identifier: new.static
@@ -407,27 +329,3 @@ parameters:
407329
identifier: new.static
408330
count: 1
409331
path: src/XML/saml/NameIDType.php
410-
411-
-
412-
message: '#^Access to constant Any on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
413-
identifier: class.notFound
414-
count: 1
415-
path: src/XML/saml/SubjectConfirmationData.php
416-
417-
-
418-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
419-
identifier: class.notFound
420-
count: 1
421-
path: src/XML/saml/SubjectConfirmationData.php
422-
423-
-
424-
message: '#^Access to constant Any on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
425-
identifier: class.notFound
426-
count: 1
427-
path: src/XML/samlp/StatusDetail.php
428-
429-
-
430-
message: '#^Access to constant Other on an unknown class SimpleSAML\\XMLSchema\\XML\\Enumeration\\NamespaceEnum\.$#'
431-
identifier: class.notFound
432-
count: 1
433-
path: src/XML/shibmd/KeyAuthority.php

src/XML/alg/DigestMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use SimpleSAML\XML\SchemaValidatableElementInterface;
1212
use SimpleSAML\XML\SchemaValidatableElementTrait;
1313
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
14-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
14+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1515

1616
/**
1717
* Class for handling the alg:DigestMethod element.
@@ -26,7 +26,7 @@ final class DigestMethod extends AbstractAlgElement implements SchemaValidatable
2626

2727

2828
/** The namespace-attribute for the xs:any element */
29-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Any;
29+
public const XS_ANY_ELT_NAMESPACE = NS::ANY;
3030

3131

3232
/**

src/XML/alg/SigningMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use SimpleSAML\XML\SchemaValidatableElementTrait;
1313
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
1414
use SimpleSAML\XMLSchema\Type\PositiveIntegerValue;
15-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
15+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1616

1717
/**
1818
* Class for handling the alg:SigningMethod element.
@@ -27,7 +27,7 @@ final class SigningMethod extends AbstractAlgElement implements SchemaValidatabl
2727

2828

2929
/** The namespace-attribute for the xs:any element */
30-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Any;
30+
public const XS_ANY_ELT_NAMESPACE = NS::ANY;
3131

3232

3333
/**

src/XML/md/AbstractEndpointType.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use SimpleSAML\XML\ExtendableElementTrait;
1515
use SimpleSAML\XML\SerializableElementInterface;
1616
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
17-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
17+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1818

1919
use function array_change_key_case;
2020
use function array_key_exists;
@@ -43,10 +43,10 @@ abstract class AbstractEndpointType extends AbstractMdElement implements Arrayiz
4343

4444

4545
/** The namespace-attribute for the xs:any element */
46-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Other;
46+
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
4747

4848
/** The namespace-attribute for the xs:anyAttribute element */
49-
public const XS_ANY_ATTR_NAMESPACE = NamespaceEnum::Other;
49+
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
5050

5151

5252
/**

src/XML/md/AbstractRoleDescriptorType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use SimpleSAML\XML\ExtendableAttributesTrait;
1515
use SimpleSAML\XMLSchema\Type\DurationValue;
1616
use SimpleSAML\XMLSchema\Type\IDValue;
17-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
17+
use SimpleSAML\XMLSchema\XML\Constants\NS;
1818

1919
use function strval;
2020

@@ -29,7 +29,7 @@ abstract class AbstractRoleDescriptorType extends AbstractMetadataDocument
2929

3030

3131
/** The namespace-attribute for the xs:anyAttribute element */
32-
public const XS_ANY_ATTR_NAMESPACE = NamespaceEnum::Other;
32+
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
3333

3434

3535
/**

src/XML/md/AffiliationDescriptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use SimpleSAML\XMLSchema\Exception\TooManyElementsException;
1717
use SimpleSAML\XMLSchema\Type\DurationValue;
1818
use SimpleSAML\XMLSchema\Type\IDValue;
19-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
19+
use SimpleSAML\XMLSchema\XML\Constants\NS;
2020
use SimpleSAML\XMLSecurity\XML\ds\Signature;
2121

2222
/**
@@ -31,7 +31,7 @@ final class AffiliationDescriptor extends AbstractMetadataDocument implements Sc
3131

3232

3333
/** The namespace-attribute for the xs:anyAttribute element */
34-
public const XS_ANY_ATTR_NAMESPACE = NamespaceEnum::Other;
34+
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
3535

3636

3737
/**

src/XML/md/ContactPerson.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use SimpleSAML\XML\SchemaValidatableElementTrait;
1818
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
1919
use SimpleSAML\XMLSchema\Exception\TooManyElementsException;
20-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
20+
use SimpleSAML\XMLSchema\XML\Constants\NS;
2121

2222
use function array_change_key_case;
2323
use function array_filter;
@@ -42,7 +42,7 @@ final class ContactPerson extends AbstractMdElement implements
4242

4343

4444
/** The namespace-attribute for the xs:anyAttribute element */
45-
public const XS_ANY_ATTR_NAMESPACE = NamespaceEnum::Other;
45+
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
4646

4747
/**
4848
* The several different contact types as defined per specification

src/XML/md/EntityDescriptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use SimpleSAML\XMLSchema\Exception\TooManyElementsException;
1818
use SimpleSAML\XMLSchema\Type\DurationValue;
1919
use SimpleSAML\XMLSchema\Type\IDValue;
20-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
20+
use SimpleSAML\XMLSchema\XML\Constants\NS;
2121
use SimpleSAML\XMLSecurity\XML\ds\Signature;
2222

2323
use function is_null;
@@ -34,7 +34,7 @@ final class EntityDescriptor extends AbstractMetadataDocument implements SchemaV
3434

3535

3636
/** The namespace-attribute for the xs:anyAttribute element */
37-
public const XS_ANY_ATTR_NAMESPACE = NamespaceEnum::Other;
37+
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
3838

3939

4040
/**

src/XML/md/Organization.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
1919
use SimpleSAML\XMLSchema\Exception\MissingElementException;
2020
use SimpleSAML\XMLSchema\Exception\TooManyElementsException;
21-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
21+
use SimpleSAML\XMLSchema\XML\Constants\NS;
2222

2323
use function array_change_key_case;
2424
use function array_filter;
@@ -41,7 +41,7 @@ final class Organization extends AbstractMdElement implements
4141

4242

4343
/** The namespace-attribute for the xs:anyAttribute element */
44-
public const XS_ANY_ATTR_NAMESPACE = NamespaceEnum::Other;
44+
public const XS_ANY_ATTR_NAMESPACE = NS::OTHER;
4545

4646

4747
/**

src/XML/mdui/DiscoHints.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use SimpleSAML\XML\SchemaValidatableElementTrait;
1919
use SimpleSAML\XML\SerializableElementInterface;
2020
use SimpleSAML\XMLSchema\Exception\InvalidDOMElementException;
21-
use SimpleSAML\XMLSchema\XML\Enumeration\NamespaceEnum;
21+
use SimpleSAML\XMLSchema\XML\Constants\NS;
2222

2323
use function array_filter;
2424
use function array_key_exists;
@@ -39,7 +39,7 @@ final class DiscoHints extends AbstractMduiElement implements
3939

4040

4141
/** The namespace-attribute for the xs:any element */
42-
public const XS_ANY_ELT_NAMESPACE = NamespaceEnum::Other;
42+
public const XS_ANY_ELT_NAMESPACE = NS::OTHER;
4343

4444

4545
/**

0 commit comments

Comments
 (0)