File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212namespace PhpMyAdmin \SqlParser ;
1313
14+ use Exception ;
15+
1416/**
1517 * A component (of a statement) is a part of a statement that is common to
1618 * multiple query types.
@@ -29,7 +31,7 @@ abstract class Component
2931 * @param TokensList $list the list of tokens that are being parsed
3032 * @param array $options parameters for parsing
3133 *
32- * @throws \ Exception not implemented yet
34+ * @throws Exception not implemented yet
3335 *
3436 * @return mixed
3537 */
@@ -40,7 +42,7 @@ public static function parse(
4042 ) {
4143 // This method should be abstract, but it can't be both static and
4244 // abstract.
43- throw new \ Exception (Translator::gettext ('Not implemented yet. ' ));
45+ throw new Exception (Translator::gettext ('Not implemented yet. ' ));
4446 }
4547
4648 /**
@@ -52,15 +54,15 @@ public static function parse(
5254 * @param mixed $component the component to be built
5355 * @param array $options parameters for building
5456 *
55- * @throws \ Exception not implemented yet
57+ * @throws Exception not implemented yet
5658 *
5759 * @return string
5860 */
5961 public static function build ($ component , array $ options = [])
6062 {
6163 // This method should be abstract, but it can't be both static and
6264 // abstract.
63- throw new \ Exception (Translator::gettext ('Not implemented yet. ' ));
65+ throw new Exception (Translator::gettext ('Not implemented yet. ' ));
6466 }
6567
6668 /**
Original file line number Diff line number Diff line change 66
77namespace PhpMyAdmin \SqlParser ;
88
9+ use Exception ;
10+
911class Core
1012{
1113 /**
@@ -24,7 +26,7 @@ class Core
2426 * error might be false positive or a partial result (even a bad one)
2527 * might be needed.
2628 *
27- * @var \ Exception[]
29+ * @var Exception[]
2830 *
2931 * @see Core::error()
3032 */
@@ -33,9 +35,9 @@ class Core
3335 /**
3436 * Creates a new error log.
3537 *
36- * @param \ Exception $error the error exception
38+ * @param Exception $error the error exception
3739 *
38- * @throws \ Exception throws the exception, if strict mode is enabled
40+ * @throws Exception throws the exception, if strict mode is enabled
3941 */
4042 public function error ($ error )
4143 {
Original file line number Diff line number Diff line change 66
77namespace PhpMyAdmin \SqlParser \Exceptions ;
88
9+ use Exception ;
10+
911/**
1012 * Exception thrown by the lexer.
1113 *
1214 * @category Exceptions
1315 *
1416 * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
1517 */
16- class LexerException extends \ Exception
18+ class LexerException extends Exception
1719{
1820 /**
1921 * The character that produced this error.
Original file line number Diff line number Diff line change 66
77namespace PhpMyAdmin \SqlParser \Exceptions ;
88
9+ use Exception ;
10+
911/**
1012 * Exception thrown by the lexer.
1113 *
1214 * @category Exceptions
1315 *
1416 * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
1517 */
16- class LoaderException extends \ Exception
18+ class LoaderException extends Exception
1719{
1820 /**
1921 * The failed load name.
Original file line number Diff line number Diff line change 66
77namespace PhpMyAdmin \SqlParser \Exceptions ;
88
9+ use Exception ;
910use PhpMyAdmin \SqlParser \Token ;
1011
1112/**
1516 *
1617 * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
1718 */
18- class ParserException extends \ Exception
19+ class ParserException extends Exception
1920{
2021 /**
2122 * The token that produced this error.
Original file line number Diff line number Diff line change 66
77namespace PhpMyAdmin \SqlParser \Statements ;
88
9- use PhpMyAdmin \SqlParser \Components \ArrayObj ;
109use PhpMyAdmin \SqlParser \Components \Array2d ;
10+ use PhpMyAdmin \SqlParser \Components \ArrayObj ;
1111use PhpMyAdmin \SqlParser \Components \IntoKeyword ;
1212use PhpMyAdmin \SqlParser \Components \OptionsArray ;
1313use PhpMyAdmin \SqlParser \Components \SetOperation ;
Original file line number Diff line number Diff line change 77namespace PhpMyAdmin \SqlParser \Statements ;
88
99use PhpMyAdmin \SqlParser \Components \Expression ;
10- use PhpMyAdmin \SqlParser \Components \OptionsArray ;
1110use PhpMyAdmin \SqlParser \Parser ;
1211use PhpMyAdmin \SqlParser \Statement ;
1312use PhpMyAdmin \SqlParser \Token ;
Original file line number Diff line number Diff line change 66
77namespace PhpMyAdmin \SqlParser ;
88
9+ use ArrayAccess ;
10+
911/**
1012 * A structure representing a list of tokens.
1113 *
1214 * @category Tokens
1315 *
1416 * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
1517 */
16- class TokensList implements \ ArrayAccess
18+ class TokensList implements ArrayAccess
1719{
1820 /**
1921 * The array of tokens.
Original file line number Diff line number Diff line change 66
77namespace PhpMyAdmin \SqlParser ;
88
9+ use PhpMyAdmin \MoTranslator \Loader ;
10+
911class Translator
1012{
1113 /**
1214 * The MoTranslator loader object.
1315 *
14- * @var \PhpMyAdmin\MoTranslator\ Loader
16+ * @var Loader
1517 */
1618 private static $ loader ;
1719
@@ -29,7 +31,7 @@ public static function load()
2931 {
3032 if (is_null (self ::$ loader )) {
3133 // Create loader object
32- self ::$ loader = new \ PhpMyAdmin \ MoTranslator \ Loader ();
34+ self ::$ loader = new Loader ();
3335
3436 // Set locale
3537 self ::$ loader ->setlocale (
Original file line number Diff line number Diff line change 1313
1414namespace PhpMyAdmin \SqlParser ;
1515
16+ use ArrayAccess ;
17+ use Exception ;
18+
1619/**
1720 * Implements array-like access for UTF-8 strings.
1821 *
2225 *
2326 * @license https://www.gnu.org/licenses/gpl-2.0.txt GPL-2.0+
2427 */
25- class UtfString implements \ ArrayAccess
28+ class UtfString implements ArrayAccess
2629{
2730 /**
2831 * The raw, multi-byte string.
@@ -141,23 +144,23 @@ public function offsetGet($offset)
141144 * @param int $offset the offset to be set
142145 * @param string $value the value to be set
143146 *
144- * @throws \ Exception not implemented
147+ * @throws Exception not implemented
145148 */
146149 public function offsetSet ($ offset , $ value )
147150 {
148- throw new \ Exception ('Not implemented. ' );
151+ throw new Exception ('Not implemented. ' );
149152 }
150153
151154 /**
152155 * Unsets an index.
153156 *
154157 * @param int $offset the value to be unset
155158 *
156- * @throws \ Exception not implemented
159+ * @throws Exception not implemented
157160 */
158161 public function offsetUnset ($ offset )
159162 {
160- throw new \ Exception ('Not implemented. ' );
163+ throw new Exception ('Not implemented. ' );
161164 }
162165
163166 /**
You can’t perform that action at this time.
0 commit comments