Skip to content

Commit

Permalink
Remove useless constant type hint
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Feb 18, 2020
1 parent f9b9c7e commit 57b812d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 38 deletions.
6 changes: 0 additions & 6 deletions src/Context.php
Expand Up @@ -31,8 +31,6 @@ abstract class Context
* The maximum length of a keyword.
*
* @see static::$TOKEN_KEYWORD
*
* @var int
*/
public const KEYWORD_MAX_LENGTH = 30;

Expand All @@ -41,17 +39,13 @@ abstract class Context
*
* @see static::$TOKEN_LABEL
* Ref: https://dev.mysql.com/doc/refman/5.7/en/statement-labels.html
*
* @var int
*/
public const LABEL_MAX_LENGTH = 16;

/**
* The maximum length of an operator.
*
* @see static::$TOKEN_OPERATOR
*
* @var int
*/
public const OPERATOR_MAX_LENGTH = 4;

Expand Down
4 changes: 0 additions & 4 deletions src/Statements/TransactionStatement.php
Expand Up @@ -18,15 +18,11 @@ class TransactionStatement extends Statement
{
/**
* START TRANSACTION and BEGIN.
*
* @var int
*/
public const TYPE_BEGIN = 1;

/**
* COMMIT and ROLLBACK.
*
* @var int
*/
public const TYPE_END = 2;

Expand Down
22 changes: 0 additions & 22 deletions src/Token.php
Expand Up @@ -27,15 +27,11 @@ class Token
* This type is used when the token is invalid or its type cannot be
* determined because of the ambiguous context. Further analysis might be
* required to detect its type.
*
* @var int
*/
public const TYPE_NONE = 0;

/**
* SQL specific keywords: SELECT, UPDATE, INSERT, etc.
*
* @var int
*/
public const TYPE_KEYWORD = 1;

Expand All @@ -48,15 +44,11 @@ class Token
* Assignment operators: =, +=, -=, etc.
* SQL specific operators: . (e.g. .. WHERE database.table ..),
* * (e.g. SELECT * FROM ..)
*
* @var int
*/
public const TYPE_OPERATOR = 2;

/**
* Spaces, tabs, new lines, etc.
*
* @var int
*/
public const TYPE_WHITESPACE = 3;

Expand All @@ -77,46 +69,34 @@ class Token
* comment*\/
*
* Backslashes were added to respect PHP's comments syntax.
*
* @var int
*/
public const TYPE_COMMENT = 4;

/**
* Boolean values: true or false.
*
* @var int
*/
public const TYPE_BOOL = 5;

/**
* Numbers: 4, 0x8, 15.16, 23e42, etc.
*
* @var int
*/
public const TYPE_NUMBER = 6;

/**
* Literal strings: 'string', "test".
* Some of these strings are actually symbols.
*
* @var int
*/
public const TYPE_STRING = 7;

/**
* Database, table names, variables, etc.
* For example: ```SELECT `foo`, `bar` FROM `database`.`table`;```.
*
* @var int
*/
public const TYPE_SYMBOL = 8;

/**
* Delimits an unknown string.
* For example: ```SELECT * FROM test;```, `test` is a delimiter.
*
* @var int
*/
public const TYPE_DELIMITER = 9;

Expand All @@ -127,8 +107,6 @@ class Token
* begin_label: LOOP [statement_list] END LOOP [end_label]
* begin_label: REPEAT [statement_list] ... END REPEAT [end_label]
* begin_label: WHILE ... DO [statement_list] END WHILE [end_label].
*
* @var int
*/
public const TYPE_LABEL = 10;

Expand Down
4 changes: 0 additions & 4 deletions tests/Misc/UtfStringTest.php
Expand Up @@ -12,15 +12,11 @@ class UtfStringTest extends TestCase
{
/**
* Sample phrase in French.
*
* @var UtfString
*/
public const TEST_PHRASE = 'Les naïfs ægithales hâtifs pondant à Noël où il gèle sont sûrs d\'être déçus en voyant leurs drôles d\'œufs abîmés.';

/**
* The length of the sample phrase.
*
* @var int
*/
public const TEST_PHRASE_LEN = 113;

Expand Down
2 changes: 0 additions & 2 deletions tools/ContextGenerator.php
Expand Up @@ -79,8 +79,6 @@ class ContextGenerator
* 2 - class
* 3 - link
* 4 - keywords array
*
* @var string
*/
public const TEMPLATE =
'<?php' . "\n" .
Expand Down

0 comments on commit 57b812d

Please sign in to comment.