Skip to content

Commit b5e112e

Browse files
committed
Typed constants
1 parent 930de8f commit b5e112e

3 files changed

Lines changed: 22 additions & 22 deletions

File tree

src/Auth/InvalidCredentialResult.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,49 @@ class InvalidCredentialResult
2525
*
2626
* @see https://ldapwiki.com/wiki/Common%20Active%20Directory%20Bind%20Errors
2727
*/
28-
public const LDAP_NO_SUCH_OBJECT = '525';
28+
public const string LDAP_NO_SUCH_OBJECT = '525';
2929

30-
public const ERROR_LOGON_FAILURE = '52e';
30+
public const string ERROR_LOGON_FAILURE = '52e';
3131

32-
public const ERROR_ACCOUNT_RESTRICTION = '52f';
32+
public const string ERROR_ACCOUNT_RESTRICTION = '52f';
3333

34-
public const ERROR_INVALID_LOGON_HOURS = '530';
34+
public const string ERROR_INVALID_LOGON_HOURS = '530';
3535

36-
public const ERROR_INVALID_WORKSTATION = '531';
36+
public const string ERROR_INVALID_WORKSTATION = '531';
3737

38-
public const ERROR_PASSWORD_EXPIRED = '532';
38+
public const string ERROR_PASSWORD_EXPIRED = '532';
3939

40-
public const ERROR_ACCOUNT_DISABLED = '533';
40+
public const string ERROR_ACCOUNT_DISABLED = '533';
4141

42-
public const ERROR_TOO_MANY_CONTEXT_IDS = '568';
42+
public const string ERROR_TOO_MANY_CONTEXT_IDS = '568';
4343

44-
public const ERROR_ACCOUNT_EXPIRED = '701';
44+
public const string ERROR_ACCOUNT_EXPIRED = '701';
4545

46-
public const ERROR_PASSWORD_MUST_CHANGE = '773';
46+
public const string ERROR_PASSWORD_MUST_CHANGE = '773';
4747

48-
public const ERROR_ACCOUNT_LOCKED_OUT = '775';
48+
public const string ERROR_ACCOUNT_LOCKED_OUT = '775';
4949

5050
/**
5151
* List of Simple Bind error codes
5252
*
5353
* N.B. - This is an incomplete list
5454
*/
55-
public const NT_STATUS_PASSWORD_EXPIRED = 'PASSWORD_EXPIRED';
55+
public const string NT_STATUS_PASSWORD_EXPIRED = 'PASSWORD_EXPIRED';
5656

57-
public const NT_STATUS_PASSWORD_MUST_CHANGE = 'PASSWORD_MUST_CHANGE';
57+
public const string NT_STATUS_PASSWORD_MUST_CHANGE = 'PASSWORD_MUST_CHANGE';
5858

59-
public const NT_STATUS_LOGON_FAILURE = 'LOGON_FAILURE';
59+
public const string NT_STATUS_LOGON_FAILURE = 'LOGON_FAILURE';
6060

6161
/**
6262
* List of keys for the code mapping
6363
*/
64-
public const KEY_INVALID_CREDENTIAL = 'invalid_credential';
64+
public const string KEY_INVALID_CREDENTIAL = 'invalid_credential';
6565

66-
public const KEY_PASSWORD_ERROR = 'password_error';
66+
public const string KEY_PASSWORD_ERROR = 'password_error';
6767

68-
public const KEY_ACCOUNT_ERROR = 'account_error';
68+
public const string KEY_ACCOUNT_ERROR = 'account_error';
6969

70-
public const KEY_RESTRICTION = 'restriction';
70+
public const string KEY_RESTRICTION = 'restriction';
7171

7272

7373
/**

src/Connector/ActiveDirectory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
*/
1414
class ActiveDirectory extends Ldap
1515
{
16-
public const ERR_PASSWORD_RESET = 'RESETPASSWORD';
16+
public const string ERR_PASSWORD_RESET = 'RESETPASSWORD';
1717

18-
public const ERR_ACCOUNT_RESET = 'RESETACCOUNT';
18+
public const string ERR_ACCOUNT_RESET = 'RESETACCOUNT';
1919

20-
public const ERR_LOGON_RESTRICTION = 'LOGONRESTRICTION';
20+
public const string ERR_LOGON_RESTRICTION = 'LOGONRESTRICTION';
2121

2222

2323
/**

src/ConnectorInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
interface ConnectorInterface
1111
{
12-
public const ERR_WRONG_PASS = 'WRONGUSERPASS';
12+
public const string ERR_WRONG_PASS = 'WRONGUSERPASS';
1313

1414

1515
/**

0 commit comments

Comments
 (0)