summaryrefslogtreecommitdiffstats
path: root/src/Components
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauricio@fauth.dev>2019-12-14 12:43:05 -0300
committerMaurício Meneghini Fauth <mauricio@fauth.dev>2019-12-14 12:43:05 -0300
commit53b6ab87749357700f7129d0400fee3afc9ec50d (patch)
tree6325a11c1513e6099d1bc07eabf0c2f1e9d49aa1 /src/Components
parent53441d712bc5e8d0f5f08144fd0ec4dfd5f8b04c (diff)
downloadsql-parser-53b6ab87749357700f7129d0400fee3afc9ec50d.zip
sql-parser-53b6ab87749357700f7129d0400fee3afc9ec50d.tar.gz
sql-parser-53b6ab87749357700f7129d0400fee3afc9ec50d.tar.bz2
Remove useless comments and annotations
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'src/Components')
-rw-r--r--src/Components/AlterOperation.php7
-rw-r--r--src/Components/Array2d.php4
-rw-r--r--src/Components/ArrayObj.php7
-rw-r--r--src/Components/CaseExpression.php7
-rw-r--r--src/Components/Condition.php6
-rw-r--r--src/Components/CreateDefinition.php6
-rw-r--r--src/Components/DataType.php6
-rw-r--r--src/Components/Expression.php6
-rw-r--r--src/Components/ExpressionArray.php4
-rw-r--r--src/Components/FunctionCall.php6
-rw-r--r--src/Components/GroupKeyword.php6
-rw-r--r--src/Components/IndexHint.php7
-rw-r--r--src/Components/IntoKeyword.php14
-rw-r--r--src/Components/JoinKeyword.php8
-rw-r--r--src/Components/Key.php6
-rw-r--r--src/Components/Limit.php6
-rw-r--r--src/Components/LockExpression.php4
-rw-r--r--src/Components/OptionsArray.php6
-rw-r--r--src/Components/OrderKeyword.php6
-rw-r--r--src/Components/ParameterDefinition.php6
-rw-r--r--src/Components/PartitionDefinition.php4
-rw-r--r--src/Components/Reference.php6
-rw-r--r--src/Components/RenameOperation.php6
-rw-r--r--src/Components/SetOperation.php6
-rw-r--r--src/Components/UnionKeyword.php4
25 files changed, 7 insertions, 147 deletions
diff --git a/src/Components/AlterOperation.php b/src/Components/AlterOperation.php
index e0c0e0b..09f928f 100644
--- a/src/Components/AlterOperation.php
+++ b/src/Components/AlterOperation.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses an alter operation.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class AlterOperation extends Component
{
@@ -156,8 +152,6 @@ class AlterOperation extends Component
public $unknown = [];
/**
- * Constructor.
- *
* @param OptionsArray $options options of alter operation
* @param Expression $field altered field
* @param array $unknown unparsed tokens found at the end of operation
@@ -331,6 +325,7 @@ class AlterOperation extends Component
* between column and table alteration
*
* @param string $tokenValue Value of current token
+ *
* @return bool
*/
private static function checkIfColumnDefinitionKeyword($tokenValue)
diff --git a/src/Components/Array2d.php b/src/Components/Array2d.php
index 7c99952..1ae5c30 100644
--- a/src/Components/Array2d.php
+++ b/src/Components/Array2d.php
@@ -14,10 +14,6 @@ use PhpMyAdmin\SqlParser\Translator;
/**
* `VALUES` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class Array2d extends Component
{
diff --git a/src/Components/ArrayObj.php b/src/Components/ArrayObj.php
index 2d10ff1..1166a9b 100644
--- a/src/Components/ArrayObj.php
+++ b/src/Components/ArrayObj.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses an array.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class ArrayObj extends Component
{
@@ -35,8 +31,6 @@ class ArrayObj extends Component
public $values = [];
/**
- * Constructor.
- *
* @param array $raw the unprocessed values
* @param array $values the processed values
*/
@@ -158,7 +152,6 @@ class ArrayObj extends Component
// () => array()
// (a,) => array('a', '')
// (a) => array('a')
- //
$lastRaw = trim($lastRaw);
if (empty($options['type'])
&& ((strlen($lastRaw) > 0) || ($isCommaLast))
diff --git a/src/Components/CaseExpression.php b/src/Components/CaseExpression.php
index f9f2f76..26c044f 100644
--- a/src/Components/CaseExpression.php
+++ b/src/Components/CaseExpression.php
@@ -14,10 +14,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses a reference to a CASE expression.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class CaseExpression extends Component
{
@@ -70,9 +66,6 @@ class CaseExpression extends Component
*/
public $expr = '';
- /**
- * Constructor.
- */
public function __construct()
{
}
diff --git a/src/Components/Condition.php b/src/Components/Condition.php
index 4ad9864..b719b28 100644
--- a/src/Components/Condition.php
+++ b/src/Components/Condition.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `WHERE` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class Condition extends Component
{
@@ -81,8 +77,6 @@ class Condition extends Component
public $expr;
/**
- * Constructor.
- *
* @param string $expr the condition or the operator
*/
public function __construct($expr = null)
diff --git a/src/Components/CreateDefinition.php b/src/Components/CreateDefinition.php
index 310038e..243729d 100644
--- a/src/Components/CreateDefinition.php
+++ b/src/Components/CreateDefinition.php
@@ -18,10 +18,6 @@ use PhpMyAdmin\SqlParser\TokensList;
* Parses the create definition of a column or a key.
*
* Used for parsing `CREATE TABLE` statement.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class CreateDefinition extends Component
{
@@ -144,8 +140,6 @@ class CreateDefinition extends Component
public $options;
/**
- * Constructor.
- *
* @param string $name the name of the field
* @param OptionsArray $options the options of this field
* @param DataType|Key $type the data type of this field or the key
diff --git a/src/Components/DataType.php b/src/Components/DataType.php
index 242947f..6ebfc94 100644
--- a/src/Components/DataType.php
+++ b/src/Components/DataType.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses a data type.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class DataType extends Component
{
@@ -73,8 +69,6 @@ class DataType extends Component
public $options;
/**
- * Constructor.
- *
* @param string $name the name of this data type
* @param array $parameters the parameters (size or possible values)
* @param OptionsArray $options the options of this data type
diff --git a/src/Components/Expression.php b/src/Components/Expression.php
index 2c22241..38de90a 100644
--- a/src/Components/Expression.php
+++ b/src/Components/Expression.php
@@ -16,10 +16,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses a reference to an expression (column, table or database name, function
* call, mathematical expression, etc.).
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class Expression extends Component
{
@@ -92,8 +88,6 @@ class Expression extends Component
public $subquery;
/**
- * Constructor.
- *
* Syntax:
* new Expression('expr')
* new Expression('expr', 'alias')
diff --git a/src/Components/ExpressionArray.php b/src/Components/ExpressionArray.php
index eb05aac..186693d 100644
--- a/src/Components/ExpressionArray.php
+++ b/src/Components/ExpressionArray.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses a list of expressions delimited by a comma.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class ExpressionArray extends Component
{
diff --git a/src/Components/FunctionCall.php b/src/Components/FunctionCall.php
index 073b0e3..b41e6b2 100644
--- a/src/Components/FunctionCall.php
+++ b/src/Components/FunctionCall.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses a function call.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class FunctionCall extends Component
{
@@ -35,8 +31,6 @@ class FunctionCall extends Component
public $parameters;
/**
- * Constructor.
- *
* @param string $name the name of the function to be called
* @param array|ArrayObj $parameters the parameters of this function
*/
diff --git a/src/Components/GroupKeyword.php b/src/Components/GroupKeyword.php
index bef1ebe..7d95fb2 100644
--- a/src/Components/GroupKeyword.php
+++ b/src/Components/GroupKeyword.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `GROUP BY` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class GroupKeyword extends Component
{
@@ -28,8 +24,6 @@ class GroupKeyword extends Component
public $expr;
/**
- * Constructor.
- *
* @param Expression $expr the expression that we are sorting by
*/
public function __construct($expr = null)
diff --git a/src/Components/IndexHint.php b/src/Components/IndexHint.php
index 7484172..36218df 100644
--- a/src/Components/IndexHint.php
+++ b/src/Components/IndexHint.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses an Index hint.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class IndexHint extends Component
{
@@ -49,8 +45,6 @@ class IndexHint extends Component
public $indexes = [];
/**
- * Constructor.
- *
* @param string $type the type of hint (USE/FORCE/IGNORE)
* @param string $indexOrKey What the hint is for (INDEX/KEY)
* @param string $for the clause for which this hint is (JOIN/ORDER BY/GROUP BY)
@@ -86,6 +80,7 @@ class IndexHint extends Component
* 2 -------------------- [ expr_list ] --------------------> 0
* 3 -------------- [ JOIN/GROUP BY/ORDER BY ] -------------> 4
* 4 -------------------- [ expr_list ] --------------------> 0
+ *
* @var int
*/
$state = 0;
diff --git a/src/Components/IntoKeyword.php b/src/Components/IntoKeyword.php
index cebfa7a..81cddb8 100644
--- a/src/Components/IntoKeyword.php
+++ b/src/Components/IntoKeyword.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `INTO` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class IntoKeyword extends Component
{
@@ -88,9 +84,9 @@ class IntoKeyword extends Component
/**
* Options for FIELDS/COLUMNS keyword.
*
- * @var OptionsArray
- *
* @see static::$FIELDS_OPTIONS
+ *
+ * @var OptionsArray
*/
public $fields_options;
@@ -104,15 +100,13 @@ class IntoKeyword extends Component
/**
* Options for OPTIONS keyword.
*
- * @var OptionsArray
- *
* @see static::$LINES_OPTIONS
+ *
+ * @var OptionsArray
*/
public $lines_options;
/**
- * Constructor.
- *
* @param string $type type of destination (may be OUTFILE)
* @param string|Expression $dest actual destination
* @param array $columns column list of destination
diff --git a/src/Components/JoinKeyword.php b/src/Components/JoinKeyword.php
index 0c9dd70..91bab01 100644
--- a/src/Components/JoinKeyword.php
+++ b/src/Components/JoinKeyword.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `JOIN` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class JoinKeyword extends Component
{
@@ -74,14 +70,12 @@ class JoinKeyword extends Component
public $using;
/**
- * Constructor.
+ * @see JoinKeyword::$JOINS
*
* @param string $type Join type
* @param Expression $expr join expression
* @param Condition[] $on join conditions
* @param ArrayObj $using columns joined
- *
- * @see JoinKeyword::$JOINS
*/
public function __construct($type = null, $expr = null, $on = null, $using = null)
{
diff --git a/src/Components/Key.php b/src/Components/Key.php
index 92c25ee..669a7c0 100644
--- a/src/Components/Key.php
+++ b/src/Components/Key.php
@@ -16,10 +16,6 @@ use PhpMyAdmin\SqlParser\TokensList;
* Parses the definition of a key.
*
* Used for parsing `CREATE TABLE` statement.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class Key extends Component
{
@@ -76,8 +72,6 @@ class Key extends Component
public $options;
/**
- * Constructor.
- *
* @param string $name the name of the key
* @param array $columns the columns covered by this key
* @param string $type the type of this key
diff --git a/src/Components/Limit.php b/src/Components/Limit.php
index e18219d..e0c7199 100644
--- a/src/Components/Limit.php
+++ b/src/Components/Limit.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `LIMIT` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class Limit extends Component
{
@@ -35,8 +31,6 @@ class Limit extends Component
public $rowCount;
/**
- * Constructor.
- *
* @param int $rowCount the row count
* @param int $offset the offset
*/
diff --git a/src/Components/LockExpression.php b/src/Components/LockExpression.php
index 039d011..755825d 100644
--- a/src/Components/LockExpression.php
+++ b/src/Components/LockExpression.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* Parses a reference to a LOCK expression.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class LockExpression extends Component
{
diff --git a/src/Components/OptionsArray.php b/src/Components/OptionsArray.php
index 3e8196b..da73dc6 100644
--- a/src/Components/OptionsArray.php
+++ b/src/Components/OptionsArray.php
@@ -14,10 +14,6 @@ use PhpMyAdmin\SqlParser\Translator;
/**
* Parses a list of options.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class OptionsArray extends Component
{
@@ -29,8 +25,6 @@ class OptionsArray extends Component
public $options = [];
/**
- * Constructor.
- *
* @param array $options The array of options. Options that have a value
* must be an array with at least two keys `name` and
* `expr` or `value`.
diff --git a/src/Components/OrderKeyword.php b/src/Components/OrderKeyword.php
index 7d80683..966758e 100644
--- a/src/Components/OrderKeyword.php
+++ b/src/Components/OrderKeyword.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `ORDER BY` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class OrderKeyword extends Component
{
@@ -35,8 +31,6 @@ class OrderKeyword extends Component
public $type;
/**
- * Constructor.
- *
* @param Expression $expr the expression that we are sorting by
* @param string $type the sorting type
*/
diff --git a/src/Components/ParameterDefinition.php b/src/Components/ParameterDefinition.php
index 9294273..d7aa293 100644
--- a/src/Components/ParameterDefinition.php
+++ b/src/Components/ParameterDefinition.php
@@ -14,10 +14,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* The definition of a parameter of a function or procedure.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class ParameterDefinition extends Component
{
@@ -43,8 +39,6 @@ class ParameterDefinition extends Component
public $type;
/**
- * Constructor.
- *
* @param string $name parameter's name
* @param string $inOut parameter's directional type (IN / OUT or None)
* @param DataType $type parameter's type
diff --git a/src/Components/PartitionDefinition.php b/src/Components/PartitionDefinition.php
index 487fffd..e67e92f 100644
--- a/src/Components/PartitionDefinition.php
+++ b/src/Components/PartitionDefinition.php
@@ -17,10 +17,6 @@ use PhpMyAdmin\SqlParser\TokensList;
* Parses the create definition of a partition.
*
* Used for parsing `CREATE TABLE` statement.
- *
- * @category Components
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class PartitionDefinition extends Component
{
diff --git a/src/Components/Reference.php b/src/Components/Reference.php
index aac73ac..759f3ad 100644
--- a/src/Components/Reference.php
+++ b/src/Components/Reference.php
@@ -14,10 +14,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `REFERENCES` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class Reference extends Component
{
@@ -63,8 +59,6 @@ class Reference extends Component
public $options;
/**
- * Constructor.
- *
* @param Expression $table the name of the table referenced
* @param array $columns the columns referenced
* @param OptionsArray $options the options
diff --git a/src/Components/RenameOperation.php b/src/Components/RenameOperation.php
index 0008a41..a2a8d1f 100644
--- a/src/Components/RenameOperation.php
+++ b/src/Components/RenameOperation.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `RENAME TABLE` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class RenameOperation extends Component
{
@@ -35,8 +31,6 @@ class RenameOperation extends Component
public $new;
/**
- * Constructor.
- *
* @param Expression $old old expression
* @param Expression $new new expression containing new name
*/
diff --git a/src/Components/SetOperation.php b/src/Components/SetOperation.php
index eef0f80..1e44650 100644
--- a/src/Components/SetOperation.php
+++ b/src/Components/SetOperation.php
@@ -13,10 +13,6 @@ use PhpMyAdmin\SqlParser\TokensList;
/**
* `SET` keyword parser.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class SetOperation extends Component
{
@@ -35,8 +31,6 @@ class SetOperation extends Component
public $value;
/**
- * Constructor.
- *
* @param string $column Field's name..
* @param string $value new value
*/
diff --git a/src/Components/UnionKeyword.php b/src/Components/UnionKeyword.php
index dc06831..3acc66b 100644
--- a/src/Components/UnionKeyword.php
+++ b/src/Components/UnionKeyword.php
@@ -10,10 +10,6 @@ use PhpMyAdmin\SqlParser\Component;
/**
* `UNION` keyword builder.
- *
- * @category Keywords
- *
- * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
*/
class UnionKeyword extends Component
{