From 9f94cebdaaf4e830aa79043a0ed1439091209410 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Sat, 24 Feb 2018 14:06:58 -0800 Subject: [PATCH] Move classes to includes/ Change-Id: Iefaa21bf911fa7dcf11aedd38648bed945b905f9 --- .phpcs.xml | 2 -- extension.json | 10 +++--- includes/ExprError.php | 33 +++++++++++++++++ Expr.php => includes/ExprParser.php | 36 +++++++++---------- .../ExtParserFunctions.php | 0 .../ParserFunctionsHooks.php | 0 .../Scribunto_LuaParserFunctionsLibrary.php | 0 .../mw.ext.ParserFunctions.lua | 0 8 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 includes/ExprError.php rename Expr.php => includes/ExprParser.php (95%) rename ParserFunctions_body.php => includes/ExtParserFunctions.php (100%) rename ParserFunctions.hooks.php => includes/ParserFunctionsHooks.php (100%) rename ParserFunctions.library.php => includes/Scribunto_LuaParserFunctionsLibrary.php (100%) rename mw.ext.ParserFunctions.lua => includes/mw.ext.ParserFunctions.lua (100%) diff --git a/.phpcs.xml b/.phpcs.xml index 78048e1a..45019d0b 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -1,11 +1,9 @@ - - diff --git a/extension.json b/extension.json index e86a9fd1..8b811447 100644 --- a/extension.json +++ b/extension.json @@ -36,11 +36,11 @@ ] }, "AutoloadClasses": { - "ExtParserFunctions": "ParserFunctions_body.php", - "ExprParser": "Expr.php", - "ExprError": "Expr.php", - "Scribunto_LuaParserFunctionsLibrary": "ParserFunctions.library.php", - "ParserFunctionsHooks": "ParserFunctions.hooks.php" + "ExtParserFunctions": "includes/ExtParserFunctions.php", + "ExprParser": "includes/ExprParser.php", + "ExprError": "includes/ExprError.php", + "Scribunto_LuaParserFunctionsLibrary": "includes/Scribunto_LuaParserFunctionsLibrary.php", + "ParserFunctionsHooks": "includes/ParserFunctionsHooks.php" }, "ParserTestFiles": [ "funcsParserTests.txt", diff --git a/includes/ExprError.php b/includes/ExprError.php new file mode 100644 index 00000000..bb2032a9 --- /dev/null +++ b/includes/ExprError.php @@ -0,0 +1,33 @@ +message = wfMessage( "pfunc_expr_$msg", $parameter )->inContentLanguage()->text(); + } +} diff --git a/Expr.php b/includes/ExprParser.php similarity index 95% rename from Expr.php rename to includes/ExprParser.php index 3ea7f13d..4657ed5e 100644 --- a/Expr.php +++ b/includes/ExprParser.php @@ -1,11 +1,23 @@ message = wfMessage( "pfunc_expr_$msg", $parameter )->inContentLanguage()->text(); - } -} - class ExprParser { public $maxStackSize = 100; diff --git a/ParserFunctions_body.php b/includes/ExtParserFunctions.php similarity index 100% rename from ParserFunctions_body.php rename to includes/ExtParserFunctions.php diff --git a/ParserFunctions.hooks.php b/includes/ParserFunctionsHooks.php similarity index 100% rename from ParserFunctions.hooks.php rename to includes/ParserFunctionsHooks.php diff --git a/ParserFunctions.library.php b/includes/Scribunto_LuaParserFunctionsLibrary.php similarity index 100% rename from ParserFunctions.library.php rename to includes/Scribunto_LuaParserFunctionsLibrary.php diff --git a/mw.ext.ParserFunctions.lua b/includes/mw.ext.ParserFunctions.lua similarity index 100% rename from mw.ext.ParserFunctions.lua rename to includes/mw.ext.ParserFunctions.lua