From ef25403e42447b4ca793d5bc9a308c2a7b30706a Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Tue, 24 Jun 2025 11:57:42 +0200 Subject: [PATCH] json <-> xml --- .phpunit.result.cache | 2 +- bin/console | 8 + composer.json | 9 +- composer.lock | 1277 ++++++++++------- src/Article.php | 52 +- src/Command/Convert.php | 74 + src/ConsoleApplication.php | 13 + src/Engine.php | 66 +- src/General/Parser/Edge.php | 46 +- src/General/Parser/EdgeCollection.php | 59 +- .../Parser/EdgeCollectionContainer.php | 42 +- src/General/Type/Edge.php | 57 +- src/General/Type/EdgeCollection.php | 28 +- src/Option/Parser.php | 59 +- src/Option/Parser/Base.php | 46 +- src/Option/Parser/Checkbox.php | 20 +- src/Option/Parser/Checkbox/Opt.php | 7 +- src/Option/Parser/Headline.php | 13 +- src/Option/Parser/Hidden.php | 31 +- src/Option/Parser/Input.php | 31 +- src/Option/Parser/Radio.php | 14 +- src/Option/Parser/Radio/Opt.php | 5 +- src/Option/Parser/Row.php | 12 +- src/Option/Parser/Row/Column.php | 26 +- src/Option/Parser/Select.php | 134 +- src/Option/Parser/Select/DeliveryOpt.php | 34 +- src/Option/Parser/Select/Opt.php | 35 +- src/Option/Parser/Template.php | 11 +- src/Option/Parser/Text.php | 27 +- src/Option/Parser/Textarea.php | 11 +- src/Option/Type/Base.php | 32 + src/Option/Type/ColorDBSelect.php | 10 + src/Option/Type/DeliverySelect.php | 9 + src/Option/Type/Hidden.php | 9 +- src/Option/Type/Input.php | 21 + src/Option/Type/PaperDbSelect.php | 9 + src/Option/Type/Select.php | 42 + src/Option/Type/Select/Opt.php | 33 +- src/Option/Type/Text.php | 9 +- src/PaperContainer.php | 7 +- src/Parser.php | 56 +- test.json | 1 + tests/CMS/Type/Container/ColumnTest.php | 4 +- tests/Json/FromJsonTest.php | 41 + tests/Json/from.json | 1 + tests/Json/from.xml | 52 + tests/Parse/Edge/ContainerTest.php | 5 +- tests/Parse/Edge/SimpleTest.php | 21 +- tests/Parse/Option/CheckboxTest.php | 10 +- tests/Parse/Option/InputTest.php | 15 +- tests/Parse/Option/RadioboxTest.php | 8 +- tests/Parse/Option/SelectTest.php | 36 +- tests/Parse/Option/TextTest.php | 12 +- tests/Parse/Option/TextareaTest.php | 16 +- 54 files changed, 1903 insertions(+), 805 deletions(-) create mode 100755 bin/console create mode 100644 src/Command/Convert.php create mode 100644 src/ConsoleApplication.php create mode 100644 test.json create mode 100644 tests/Json/FromJsonTest.php create mode 100644 tests/Json/from.json create mode 100644 tests/Json/from.xml diff --git a/.phpunit.result.cache b/.phpunit.result.cache index e385e34..2ab45d3 100644 --- a/.phpunit.result.cache +++ b/.phpunit.result.cache @@ -1 +1 @@ -{"version":1,"defects":{"PSC\\Library\\Calc\\Tests\\Customer\\K\\CalcTest::testCalcPlan":4,"PSC\\Library\\Calc\\Tests\\testTest::testNotOk":3,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcReturnsPrice":4,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcCompletePrice":4,"PSC\\Library\\Calc\\Tests\\Calc\\PreisPauschaleTest::testPreisPauschaleCalc":4,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfParserGetMinPrice":4,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfCalcReturnsGrenzeWithFormular":4,"PSC\\Library\\Calc\\Tests\\CalcValue\\AddCalcValuesTest::testIfParseValue":4,"PSC\\Library\\Calc\\Tests\\CalcValue\\ComplexTest::testIfParseValue":4,"PSC\\Library\\Calc\\Tests\\CalcValue\\SimpleTest::testIfParseValue":4,"PSC\\Library\\Calc\\Tests\\Complex\\FirstTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Complex\\FiveTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Complex\\FourTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Complex\\PaperSavedTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Complex\\SecondTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfSelectedOptionsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfCalcCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\ThirdTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testVariant1":4,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testVariant2":4,"PSC\\Library\\Calc\\Tests\\Customer\\B\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\C\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\D\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\E\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\E\\CalcTest::testIfAnwender2PriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfOtherPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfOtherPrice2IsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfDisplayValues":4,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfAjaxValues":4,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfDisplayValues":4,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfAjaxValues":4,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIf6000PriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIfDruckfarbenPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\N\\CalcTest::testPreCalcOption":4,"PSC\\Library\\Calc\\Tests\\Customer\\O\\CalcTest::testPreCalcOption":4,"PSC\\Library\\Calc\\Tests\\Article\\papierDbWithFormelTest::testSelectWithGrenzen":4,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfWeightIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfSingleWeightIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetArticleByName":4,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetOptionById":4,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetPrintableValuesFromSavedParamsWithCleaning":4,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetOptionsForArticle":4,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfParserGetArticleCorrect":4,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcArticleCorrect":4,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcReturnsPriceWithEdge":4,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testGetArticleByName":4,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfParserGetArticleCorrect":4,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfOptionsNotValid":4,"PSC\\Library\\Calc\\Tests\\CalcValue\\ComplexTest::testIfPaperGrammaturValue":4,"PSC\\Library\\Calc\\Tests\\Customer\\J\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\L\\CalcTest::testCalcPlan":4,"PSC\\Library\\Calc\\Tests\\Customer\\L\\CalcTest::testCalcVarPlan":4,"PSC\\Library\\Calc\\Tests\\Customer\\M\\CalcTest::testDefaultOption":4,"PSC\\Library\\Calc\\Tests\\Customer\\M\\CalcTest::testCalcValues":4,"PSC\\Library\\Calc\\Tests\\General\\LoadTest::testWrongEval":4,"PSC\\Library\\Calc\\Tests\\Article\\selectWithGrenzenTest::testSelectWithGrenzen":4,"PSC\\Library\\Calc\\Tests\\Article\\selectWithGrenzenTest::testSelectWithGrenzenParams":4,"PSC\\Library\\Calc\\Tests\\Recursiv\\SecondTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testDefaultPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAuflage500":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAndereProduktArt2":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAndereProduktArt3":4,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testMaxBreite":4,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testMinBreite":4,"PSC\\Library\\Calc\\Tests\\Customer\\T\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testCalcPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testHelpTextAndLink":4,"PSC\\Library\\Calc\\Tests\\Type\\Text\\CalcTest::testTextGrenzen":4,"PSC\\Library\\Calc\\Tests\\Type\\Text\\CalcTest::testTextGrenzenChanges":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithPaperContainerModeReturnsCorrectOpt":4,"PSC\\Library\\Calc\\Tests\\Customer\\U\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\V\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\W\\CalcTest::testIfDefaultPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\W\\CalcTest::testMvWestpomPriceIsOk":4,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenze":4,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenzeVal":4,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenzeVal3":4,"PSC\\Library\\Calc\\Tests\\Customer\\Y\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\Z\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\Z\\CalcTest::testPriceProductArt":4,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testValidSelect":3,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100AndMaterial160":4,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100AndMaterial250":4,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat2":4,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testPlaceHolder":4,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testContainerSelectFalse":4,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testContainerSelectBinden":3,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectBinden":4,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectIgnoreDefaultBinden":4,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testContainerSelectFalse":3,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPricePaper":4,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPricePaper1":4,"PSC\\Library\\Calc\\Tests\\Customer\\EE\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\EE\\CalcTest::testPriceAuflage2":4,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPriceFlexo":4,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPriceExpress":4,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testIfPaperDbGrenze":3,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceCompany":4,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceAsso":4,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceWithout":4,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice":3,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceCompany":3,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceAsso":3,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceDefault":4,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice334":4,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice123":4,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice1":4,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceAccountNotExists":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithColorModeReturnsCorrectOpt":4,"PSC\\Library\\Calc\\Tests\\Calc\\ColorDBTest::testIfOptionsNotValid":4,"PSC\\Library\\Calc\\Tests\\Customer\\GG\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testIfArticleCountInXmlCorrect":4,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\FirstTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\FiveTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\FourTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\PaperSavedTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\SecondTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Complex\\ThirdTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100":4,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testPattern":4,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat1":4,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat3":4,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectFalse":4,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPriceDefaultChange":4,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPriceDefaultChangeSecound":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionAuswahl330":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionAuswahl331":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionCheckbox":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionDefaultCheckbox":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionCalcCheckbox":4,"PSC\\Library\\Calc\\Tests\\Customer\\S\\CalcTest::testCalcPrice":4,"PSC\\Library\\Calc\\Tests\\General\\DisplayGroupTest::testDisplayGroup":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfCorrectType":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfCorrectAttributes":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithColorModePantoneReturnsCorrectOpt":4,"PSC\\Library\\Calc\\Tests\\Recursiv\\FirstTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\Customer\\GG\\CalcTest::testColorSelect":4,"PSC\\Library\\Calc\\Tests\\Customer\\HH\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\HH\\CalcTest::testDefaultSelectValues":4,"PSC\\Library\\Calc\\Tests\\Customer\\II\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\JJ\\CalcTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\JJ\\CalcFasterTest::testPrice":4,"PSC\\Library\\Calc\\Tests\\Customer\\II\\CalcTest::testDefault":3,"PSC\\Library\\Calc\\Tests\\Customer\\II\\CalcTest::testChangeDefault":3,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testChangeDefault":3,"Warning":6,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testDefault":4,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testCalcValue":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CheckboxTest::testCalcDefault":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CheckboxTest::testCalcOnly2":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcDefault":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcZweiseitig":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcZweiseitig20":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxTest::testCalcDefault":4,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxTest::testCalcOnly2":4,"PSC\\Library\\Calc\\Tests\\Customer\\LL\\CalcTest::testChangeDefault":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\TextTest::testTextOption":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\TextTest::testText4Option":3,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testTextOption":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testInputOption":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testRowColumn":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\CheckboxTest::testIfCorrectType":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\InputTest::testIfCorrectType":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\InputTest::testIfCorrectAttributes":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\RadioboxTest::testIfCorrectType":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextTest::testIfCorrectType":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextTest::testIfCorrectAttributes":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextareaTest::testIfCorrectType":4,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextareaTest::testIfCorrectAttributes":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testSubRowsOption":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\HeadlineTest::testHeadLine1Option":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\HeadlineTest::testHeadLine5Option":4,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testIfArticleCountInXmlCorrect":4,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testIfArticleCountInXmlCorrectWith2Article":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\TextTest::testTextOption":4,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\TextTest::testText2Option":4,"PSC\\Library\\Calc\\Tests\\Calc\\PreisPauschaleTest::testIfArticleCountIsCorrect":4,"PSC\\Library\\Calc\\Tests\\General\\LoadTest::testSimpleLoadXmlFromString":4},"times":{"PSC\\Library\\Calc\\Tests\\testTest::testOk":0.001,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testIfArticleCountInXmlCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetArticleByName":0.007,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetOptionById":0.006,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetPrintableValuesFromSavedParamsWithCleaning":0.007,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetOptionsForArticle":0.006,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfParserGetArticleCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcArticleCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcReturnsPrice":0.006,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcReturnsPriceWithEdge":0.005,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcCompletePrice":0.005,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testIfArticleCountInXmlCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testIfArticleCountInXmlCorrectWith2Article":0.004,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testGetArticleByName":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfParserGetArticleCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfOptionsNotValid":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\PreisPauschaleTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Calc\\PreisPauschaleTest::testPreisPauschaleCalc":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfParserGetMinPrice":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfCalcReturnsGrenzeWithFormular":0.005,"PSC\\Library\\Calc\\Tests\\CalcValue\\AddCalcValuesTest::testIfParseValue":0.005,"PSC\\Library\\Calc\\Tests\\CalcValue\\ComplexTest::testIfParseValue":0.057,"PSC\\Library\\Calc\\Tests\\CalcValue\\ComplexTest::testIfPaperGrammaturValue":0.057,"PSC\\Library\\Calc\\Tests\\CalcValue\\SimpleTest::testIfParseValue":0.005,"PSC\\Library\\Calc\\Tests\\Complex\\FirstTest::testIfArticleCountIsCorrect":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\FirstTest::testIfDefaultPriceIsOk":0.122,"PSC\\Library\\Calc\\Tests\\Complex\\FiveTest::testIfArticleCountIsCorrect":0.007,"PSC\\Library\\Calc\\Tests\\Complex\\FiveTest::testIfDefaultPriceIsOk":0.042,"PSC\\Library\\Calc\\Tests\\Complex\\FourTest::testIfArticleCountIsCorrect":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\FourTest::testIfDefaultPriceIsOk":0.016,"PSC\\Library\\Calc\\Tests\\Complex\\PaperSavedTest::testIfArticleCountIsCorrect":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\PaperSavedTest::testIfDefaultPriceIsOk":0.123,"PSC\\Library\\Calc\\Tests\\Complex\\SecondTest::testIfArticleCountIsCorrect":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\SecondTest::testIfDefaultPriceIsOk":0.018,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfArticleCountIsCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfSelectedOptionsCorrect":0.007,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfCalcCorrect":0.007,"PSC\\Library\\Calc\\Tests\\Complex\\ThirdTest::testIfArticleCountIsCorrect":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\ThirdTest::testIfDefaultPriceIsOk":0.016,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testIfDefaultPriceIsOk":0.113,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testVariant1":0.113,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testVariant2":0.107,"PSC\\Library\\Calc\\Tests\\Customer\\B\\CalcTest::testIfDefaultPriceIsOk":0.049,"PSC\\Library\\Calc\\Tests\\Customer\\C\\CalcTest::testIfDefaultPriceIsOk":0.102,"PSC\\Library\\Calc\\Tests\\Customer\\D\\CalcTest::testIfDefaultPriceIsOk":0.016,"PSC\\Library\\Calc\\Tests\\Customer\\E\\CalcTest::testIfDefaultPriceIsOk":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\E\\CalcTest::testIfAnwender2PriceIsOk":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfDefaultPriceIsOk":0.025,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfOtherPriceIsOk":0.026,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfOtherPrice2IsOk":0.025,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfDefaultPriceIsOk":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfDisplayValues":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfAjaxValues":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfDefaultPriceIsOk":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfDisplayValues":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfAjaxValues":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIfDefaultPriceIsOk":0.109,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIf6000PriceIsOk":0.108,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIfDruckfarbenPriceIsOk":0.108,"PSC\\Library\\Calc\\Tests\\Customer\\J\\CalcTest::testIfDefaultPriceIsOk":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\K\\CalcTest::testCalcPlan":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\L\\CalcTest::testCalcPlan":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\L\\CalcTest::testCalcVarPlan":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\M\\CalcTest::testDefaultOption":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\M\\CalcTest::testCalcValues":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\N\\CalcTest::testPreCalcOption":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\O\\CalcTest::testPreCalcOption":0.005,"PSC\\Library\\Calc\\Tests\\General\\LoadTest::testSimpleLoadXmlFromString":0.004,"PSC\\Library\\Calc\\Tests\\General\\LoadTest::testWrongEval":0.005,"PSC\\Library\\Calc\\Tests\\Article\\papierDbWithFormelTest::testSelectWithGrenzen":0.006,"PSC\\Library\\Calc\\Tests\\Article\\selectWithGrenzenTest::testSelectWithGrenzen":0.006,"PSC\\Library\\Calc\\Tests\\Article\\selectWithGrenzenTest::testSelectWithGrenzenParams":0.006,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\ContainerTest::testIfLoadsCorrect":0.002,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfOneValue":0.002,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfRegionFrom":0.002,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfRegionFromTo":0.002,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfCommaSeperated":0.002,"PSC\\Library\\Calc\\Tests\\Option\\Type\\CheckboxTest::testIfCorrectType":0.003,"PSC\\Library\\Calc\\Tests\\Option\\Type\\InputTest::testIfCorrectType":0.003,"PSC\\Library\\Calc\\Tests\\Option\\Type\\InputTest::testIfCorrectAttributes":0.003,"PSC\\Library\\Calc\\Tests\\Option\\Type\\RadioboxTest::testIfCorrectType":0.003,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfCorrectType":0.004,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfCorrectAttributes":0.004,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfPaperContainerReturnsCorrectItems":0.002,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithPaperContainerModeReturnsCorrectOpt":0.004,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextTest::testIfCorrectType":0.003,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextTest::testIfCorrectAttributes":0.003,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextareaTest::testIfCorrectType":0.003,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextareaTest::testIfCorrectAttributes":0.003,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseGroupTest::testIfCorrectType":0.001,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseGroupTest::testIfCountCorrect":0.002,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseTest::testIfCorrectType":0.002,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseTest::testIfCountIsCorrect":0.002,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseVariantTest::testIfCorrectType":0.001,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseVariantTest::testIfNameIsCorrect":0.001,"PSC\\Library\\Calc\\Tests\\PreCalc\\ValueTest::testIfCorrectType":0.001,"PSC\\Library\\Calc\\Tests\\PreCalc\\ValueTest::testIfCorret":0.001,"PSC\\Library\\Calc\\Tests\\Recursiv\\SecondTest::testIfArticleCountIsCorrect":0.007,"PSC\\Library\\Calc\\Tests\\testTest::testNotOk":0.001,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfWeightIsCorrect":0.007,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfSingleWeightIsCorrect":0.008,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfDefaultPriceIsOk":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testCalcPrice":0.022,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testHelpTextAndLink":0.021,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testMaxBreite":0.035,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testMinBreite":0.033,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPrice":0.01,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPriceDefaultChange":0.01,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPriceDefaultChangeSecound":0.013,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testDefaultPrice":0.661,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAuflage500":0.48,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAndereProduktArt2":0.476,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAndereProduktArt3":0.483,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionAuswahl330":0.04,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionAuswahl331":0.054,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionCheckbox":0.04,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionDefaultCheckbox":0.07,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionCalcCheckbox":0.068,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CheckboxTest::testCalcDefault":0.016,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CheckboxTest::testCalcOnly2":0.014,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxTest::testCalcDefault":0.014,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxTest::testCalcOnly2":0.015,"PSC\\Library\\Calc\\Tests\\Customer\\S\\CalcTest::testCalcPrice":0.006,"PSC\\Library\\Calc\\Tests\\General\\DisplayGroupTest::testDisplayGroup":0.006,"PSC\\Library\\Calc\\Tests\\Recursiv\\FirstTest::testIfArticleCountIsCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\T\\CalcTest::testIfDefaultPriceIsOk":0.008,"PSC\\Library\\Calc\\Tests\\Type\\Text\\CalcTest::testIfDefaultPriceIsOk":0.003,"PSC\\Library\\Calc\\Tests\\Type\\Text\\CalcTest::testTextGrenzen":0.005,"PSC\\Library\\Calc\\Tests\\Type\\Text\\CalcTest::testTextGrenzenChanges":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\U\\CalcTest::testIfDefaultPriceIsOk":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\V\\CalcTest::testIfDefaultPriceIsOk":0.391,"PSC\\Library\\Calc\\Tests\\Customer\\W\\CalcTest::testIfDefaultPriceIsOk":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\W\\CalcTest::testMvWestpomPriceIsOk":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenze":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenzeVal":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenzeVal3":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\Y\\CalcTest::testPrice":0.7,"PSC\\Library\\Calc\\Tests\\Customer\\Z\\CalcTest::testPrice":0.843,"PSC\\Library\\Calc\\Tests\\Customer\\Z\\CalcTest::testPriceProductArt":0.849,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testValidSelect":0.014,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100AndMaterial160":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100AndMaterial250":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat1":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat2":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testPattern":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testPlaceHolder":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat3":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testContainerSelectFalse":0.017,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testContainerSelectBinden":0.019,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectFalse":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectBinden":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectIgnoreDefaultBinden":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testContainerSelectFalse":1.024,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPricePaper":0.851,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPricePaper1":0.838,"PSC\\Library\\Calc\\Tests\\Customer\\EE\\CalcTest::testPrice":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\EE\\CalcTest::testPriceAuflage2":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPrice":0.85,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcDefault":0.014,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcZweiseitig":0.014,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcZweiseitig20":0.014,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPrice":0.007,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPriceFlexo":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPriceExpress":0.007,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testIfPaperDbGrenze":0.014,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPrice":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceCompany":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceAsso":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceWithout":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceWithout":0.031,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice":0.015,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceCompany":0.016,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceAsso":0.016,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceDefault":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice334":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice123":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice1":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceAccountNotExists":0.005,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithColorModeReturnsCorrectOpt":0.004,"PSC\\Library\\Calc\\Tests\\Calc\\ColorDBTest::testIfOptionsNotValid":0.008,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithColorModePantoneReturnsCorrectOpt":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\GG\\CalcTest::testPrice":0.039,"PSC\\Library\\Calc\\Tests\\Customer\\GG\\CalcTest::testColorSelect":0.04,"PSC\\Library\\Calc\\Tests\\Customer\\HH\\CalcTest::testPrice":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\HH\\CalcTest::testDefaultSelectValues":0.006,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseTest::testText":0.002,"Color\\Tests\\CompareColorsTest::testCMYKtoRGBtoCMYK":0.002,"Color\\Tests\\CompareColorsTest::testCMYKtoHEXtoCMYK":0.002,"Color\\Tests\\HelperTest::testCanConvertPercentToHex with data set #0":0.001,"Color\\Tests\\HelperTest::testCanConvertPercentToHex with data set #1":0.001,"Color\\Tests\\HelperTest::testCanConvertPercentToHex with data set #2":0.001,"Color\\Tests\\HelperTest::testCanConvertPercentToHex with data set #3":0.001,"Color\\Tests\\HelperTest::testCanConvertHexToPercent with data set #0":0.001,"Color\\Tests\\HelperTest::testCanConvertHexToPercent with data set #1":0.001,"Color\\Tests\\HelperTest::testCanConvertHexToPercent with data set #2":0.002,"Color\\Tests\\HelperTest::testCanConvertHexToPercent with data set #3":0.001,"Color\\Tests\\System\\HKSTest::testHandlesMissingColor1":0.002,"Color\\Tests\\System\\HKSTest::testHandlesMissingColor2":0.003,"Color\\Tests\\System\\PANTONETest::testHandlesMissingColor1":0.006,"Color\\Tests\\System\\PANTONETest::testHandlesMissingColor2":0.006,"Color\\Tests\\System\\RALTest::testHandlesMissingColor1":0.003,"Color\\Tests\\System\\RALTest::testHandlesMissingColor2":0.003,"Color\\Tests\\Value\\CMYKTest::testCanThrowException":0.002,"Color\\Tests\\Value\\CMYKTest::testCanSerialize":0.002,"Color\\Tests\\Value\\ComplementaryTest::testCanFindComplementary":0.002,"Color\\Tests\\Value\\ConverterTest::testGetXYZFromRGB":0.002,"Color\\Tests\\Value\\ConverterTest::testGetRGBFromHEX":0.002,"Color\\Tests\\Value\\ConverterTest::testGetHEXFromRGB":0.005,"Color\\Tests\\Value\\ConverterTest::testGetRGBFromCMYK":0.002,"Color\\Tests\\Value\\ConverterTest::testGetCIELabFromXYZ":0.002,"Color\\Tests\\Value\\ConverterTest::testGetRGBFromXYZ":0.002,"Color\\Tests\\Value\\ConverterTest::testGetCMYFromCMYK":0.002,"Color\\Tests\\Value\\ConverterTest::testGetCMYFromRGB":0.002,"Color\\Tests\\Value\\ConverterTest::testGetXYZFromCIELab":0.002,"Color\\Tests\\Value\\ConverterTest::testGetRGBFromCMY":0.002,"Color\\Tests\\Value\\ConverterTest::testGetCMYKFromCMY":0.002,"Color\\Tests\\Value\\ConverterTest::testGetRGBAFromRGB":0.002,"Color\\Tests\\Value\\ConverterTest::testGetRGBFromRGBA":0.002,"Color\\Tests\\Value\\ConverterTest::testGetHSLFromRGB":0.002,"Color\\Tests\\Value\\ConverterTest::testGetRGBFromHSL":0.002,"Color\\Tests\\Value\\ConverterTest::testGetHSLAFromHSL":0.002,"Color\\Tests\\Value\\ConverterTest::testGetRGBAFromHSLA":0.002,"Color\\Tests\\Value\\HEXTest::testCanHandleShortColorNames":0.002,"Color\\Tests\\Value\\HEXTest::testThrowsExceptionOnInvalidInput":0.002,"Color\\Tests\\Value\\HEXTest::testCanHandle32bit":0.002,"Color\\Tests\\Value\\HKSTest::testColor":0.002,"Color\\Tests\\Value\\HKSTest::testCanSerialize":0.003,"Color\\Tests\\Value\\PANTONETest::testCanSerialize":0.026,"Color\\Tests\\Value\\RALTest::testColor":0.003,"Color\\Tests\\Value\\RGBATest::testCanHandleAlpha":0.002,"PSC\\Library\\Calc\\Tests\\Customer\\II\\CalcTest::testPrice":0.065,"PSC\\Library\\Calc\\Tests\\Customer\\JJ\\CalcTest::testPrice":0.129,"PSC\\Library\\Calc\\Tests\\Customer\\JJ\\CalcFasterTest::testPrice":0.128,"PSC\\Library\\Calc\\Tests\\Customer\\II\\CalcTest::testDefault":0.013,"PSC\\Library\\Calc\\Tests\\Customer\\II\\CalcTest::testChangeDefault":0.015,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testChangeDefault":0.083,"Warning":0.01,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testDefault":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testCalcValue":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\LL\\CalcTest::testChangeDefault":0.006,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\TextTest::testTextOption":0.022,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\TextTest::testText4Option":0.017,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\TextTest::testText2Option":0.023,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testTextOption":0.011,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testText2Option":0.009,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\TextTest::testTextOption":0.004,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\TextTest::testText2Option":0.004,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testInputOption":0.005,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testRowColumn":0.01,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testSubRowsOption":0.005,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\HeadlineTest::testHeadLine1Option":0.004,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\HeadlineTest::testHeadLine5Option":0.005}} \ No newline at end of file +{"version":1,"defects":[],"times":{"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testIfArticleCountInXmlCorrect":0.025,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetArticleByName":0.021,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetOptionById":0.022,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetPrintableValuesFromSavedParamsWithCleaning":0.019,"PSC\\Library\\Calc\\Tests\\Article\\CalendarXmlTest::testGetOptionsForArticle":0.015,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100AndMaterial160":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\AA\\CalcTest::testAuflageBelow100AndMaterial250":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPrice":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPriceExpress":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\FF\\CalcTest::testPriceFlexo":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\L\\CalcTest::testCalcPlan":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\L\\CalcTest::testCalcVarPlan":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionAuswahl330":0.095,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionAuswahl331":0.141,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionCheckbox":0.088,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionDefaultCheckbox":0.191,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcTest::testOptionCalcCheckbox":0.176,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfParserGetArticleCorrect":0.007,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcArticleCorrect":0.007,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcReturnsPrice":0.012,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcReturnsPriceWithEdge":0.006,"PSC\\Library\\Calc\\Tests\\Article\\Complete1Test::testIfCalcCompletePrice":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectFalse":0.007,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectBinden":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\CC\\CalcTest::testContainerSelectIgnoreDefaultBinden":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfDefaultPriceIsOk":0.01,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfDisplayValues":0.016,"PSC\\Library\\Calc\\Tests\\Customer\\H\\CalcTest::testIfAjaxValues":0.012,"PSC\\Library\\Calc\\Tests\\Customer\\LL\\CalcTest::testChangeDefault":0.007,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testCalcPrice":0.057,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testHelpTextAndLink":0.049,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testMaxBreite":0.083,"PSC\\Library\\Calc\\Tests\\Customer\\P\\CalcTest::testMinBreite":0.091,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\ContainerTest::testIfLoadsCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Option\\Type\\RadioboxTest::testIfCorrectType":0.006,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextTest::testIfCorrectType":0.005,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextTest::testIfCorrectAttributes":0.005,"PSC\\Library\\Calc\\Tests\\PreCalc\\ValueTest::testIfCorrectType":0.004,"PSC\\Library\\Calc\\Tests\\PreCalc\\ValueTest::testIfCorret":0.004,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testIfArticleCountInXmlCorrect":0.008,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testIfArticleCountInXmlCorrectWith2Article":0.008,"PSC\\Library\\Calc\\Tests\\Article\\SimpleXmlTest::testGetArticleByName":0.01,"PSC\\Library\\Calc\\Tests\\Complex\\PaperSavedTest::testIfArticleCountIsCorrect":0.003,"PSC\\Library\\Calc\\Tests\\Complex\\PaperSavedTest::testIfDefaultPriceIsOk":0.336,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfDefaultPriceIsOk":0.007,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfDisplayValues":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\G\\CalcTest::testIfAjaxValues":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testDefault":0.008,"PSC\\Library\\Calc\\Tests\\Customer\\KK\\CalcTest::testCalcValue":0.004,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPrice":0.012,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPriceDefaultChange":0.013,"PSC\\Library\\Calc\\Tests\\Customer\\Q\\CalcTest::testCalcPriceDefaultChangeSecound":0.021,"PSC\\Library\\Calc\\Tests\\Customer\\W\\CalcTest::testIfDefaultPriceIsOk":0.023,"PSC\\Library\\Calc\\Tests\\Customer\\W\\CalcTest::testMvWestpomPriceIsOk":0.015,"PSC\\Library\\Calc\\Tests\\Article\\papierDbWithFormelTest::testSelectWithGrenzen":0.006,"PSC\\Library\\Calc\\Tests\\Option\\Type\\InputTest::testIfCorrectType":0.005,"PSC\\Library\\Calc\\Tests\\Option\\Type\\InputTest::testIfCorrectAttributes":0.005,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseGroupTest::testIfCorrectType":0.004,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseGroupTest::testIfCountCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Type\\Text\\CalcTest::testTextGrenzen":0.005,"PSC\\Library\\Calc\\Tests\\Type\\Text\\CalcTest::testTextGrenzenChanges":0.006,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testRowColumn":0.007,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testTextOption":0.006,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testInputOption":0.006,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Container\\ColumnTest::testSubRowsOption":0.006,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceDefault":0.006,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice1":0.006,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPriceAccountNotExists":0.006,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice123":0.006,"PSC\\Library\\Calc\\Tests\\Contact\\Account\\CalcTest::testPrice334":0.004,"PSC\\Library\\Calc\\Tests\\Customer\\HH\\CalcTest::testPrice":0.004,"PSC\\Library\\Calc\\Tests\\Customer\\HH\\CalcTest::testDefaultSelectValues":0.007,"PSC\\Library\\Calc\\Tests\\Customer\\JJ\\CalcTest::testPrice":0.276,"PSC\\Library\\Calc\\Tests\\Customer\\U\\CalcTest::testIfDefaultPriceIsOk":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\Z\\CalcTest::testPrice":1.781,"PSC\\Library\\Calc\\Tests\\Customer\\Z\\CalcTest::testPriceProductArt":1.291,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\HeadlineTest::testHeadLine1Option":0.006,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\HeadlineTest::testHeadLine5Option":0.007,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfWeightIsCorrect":0.014,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfSingleWeightIsCorrect":0.024,"PSC\\Library\\Calc\\Tests\\Complex\\EightTest::testIfDefaultPriceIsOk":0.012,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceWithout":0.006,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPrice":0.006,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceCompany":0.005,"PSC\\Library\\Calc\\Tests\\Contact\\AccountType\\CalcTest::testPriceAsso":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\GG\\CalcTest::testPrice":0.063,"PSC\\Library\\Calc\\Tests\\Customer\\GG\\CalcTest::testColorSelect":0.061,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAuflage500":1.354,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAndereProduktArt2":0.785,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CalcComplexTest::testAndereProduktArt3":0.776,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\TextTest::testTextOption":0.007,"PSC\\Library\\Calc\\Tests\\CMS\\Type\\Text\\TextTest::testText2Option":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\FirstTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Complex\\FirstTest::testIfDefaultPriceIsOk":0.341,"PSC\\Library\\Calc\\Tests\\Customer\\E\\CalcTest::testIfDefaultPriceIsOk":0.015,"PSC\\Library\\Calc\\Tests\\Customer\\E\\CalcTest::testIfAnwender2PriceIsOk":0.015,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIfDefaultPriceIsOk":0.326,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIf6000PriceIsOk":0.31,"PSC\\Library\\Calc\\Tests\\Customer\\I\\CalcTest::testIfDruckfarbenPriceIsOk":0.314,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseTest::testIfCorrectType":0.005,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseTest::testIfCountIsCorrect":0.005,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseTest::testText":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\ColorDBTest::testIfOptionsNotValid":0.009,"PSC\\Library\\Calc\\Tests\\Complex\\ThirdTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Complex\\ThirdTest::testIfDefaultPriceIsOk":0.032,"PSC\\Library\\Calc\\Tests\\Customer\\D\\CalcTest::testIfDefaultPriceIsOk":0.036,"PSC\\Library\\Calc\\Tests\\Customer\\EE\\CalcTest::testPrice":0.012,"PSC\\Library\\Calc\\Tests\\Customer\\EE\\CalcTest::testPriceAuflage2":0.015,"PSC\\Library\\Calc\\Tests\\Customer\\II\\CalcTest::testPrice":0.123,"PSC\\Library\\Calc\\Tests\\Customer\\O\\CalcTest::testPreCalcOption":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcDefault":0.015,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcZweiseitig":0.012,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxCalcTest::testCalcZweiseitig20":0.013,"PSC\\Library\\Calc\\Tests\\General\\LoadTest::testSimpleLoadXmlFromString":0.008,"PSC\\Library\\Calc\\Tests\\General\\LoadTest::testWrongEval":0.009,"PSC\\Library\\Calc\\Tests\\Article\\selectWithGrenzenTest::testSelectWithGrenzen":0.007,"PSC\\Library\\Calc\\Tests\\Article\\selectWithGrenzenTest::testSelectWithGrenzenParams":0.007,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextareaTest::testIfCorrectType":0.004,"PSC\\Library\\Calc\\Tests\\Option\\Type\\TextareaTest::testIfCorrectAttributes":0.006,"PSC\\Library\\Calc\\Tests\\Recursiv\\FirstTest::testIfArticleCountIsCorrect":0.006,"PSC\\Library\\Calc\\Tests\\testTest::testNotOk":0.003,"PSC\\Library\\Calc\\Tests\\testTest::testOk":0.003,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfParserGetArticleCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\OptionsRemoveTest::testIfOptionsNotValid":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\SecondTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Complex\\SecondTest::testIfDefaultPriceIsOk":0.032,"PSC\\Library\\Calc\\Tests\\Customer\\B\\CalcTest::testIfDefaultPriceIsOk":0.121,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfDefaultPriceIsOk":0.056,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfOtherPriceIsOk":0.06,"PSC\\Library\\Calc\\Tests\\Customer\\F\\CalcTest::testIfOtherPrice2IsOk":0.067,"PSC\\Library\\Calc\\Tests\\Customer\\M\\CalcTest::testDefaultOption":0.004,"PSC\\Library\\Calc\\Tests\\Customer\\M\\CalcTest::testCalcValues":0.01,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxTest::testCalcDefault":0.013,"PSC\\Library\\Calc\\Tests\\Customer\\R\\RadioboxTest::testCalcOnly2":0.013,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenze":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenzeVal":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\X\\CalcTest::testIfPaperDbGrenzeVal3":0.006,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfOneValue":0.007,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfRegionFrom":0.004,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfRegionFromTo":0.005,"PSC\\Library\\Calc\\Tests\\Parse\\Edge\\SimpleTest::testIfCommaSeperated":0.005,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseVariantTest::testIfCorrectType":0.004,"PSC\\Library\\Calc\\Tests\\PreCalc\\ParseVariantTest::testIfNameIsCorrect":0.007,"PSC\\Library\\Calc\\Tests\\Calc\\PreisPauschaleTest::testIfArticleCountIsCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Calc\\PreisPauschaleTest::testPreisPauschaleCalc":0.006,"PSC\\Library\\Calc\\Tests\\Complex\\FiveTest::testIfArticleCountIsCorrect":0.005,"PSC\\Library\\Calc\\Tests\\Complex\\FiveTest::testIfDefaultPriceIsOk":0.118,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testPattern":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testPlaceHolder":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat1":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat2":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\BB\\CalcTest::testFormat3":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\JJ\\CalcFasterTest::testPrice":0.26,"PSC\\Library\\Calc\\Tests\\Customer\\S\\CalcTest::testCalcPrice":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\T\\CalcTest::testIfDefaultPriceIsOk":0.016,"PSC\\Library\\Calc\\Tests\\Customer\\Y\\CalcTest::testPrice":1.497,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfParserGetMinPrice":0.007,"PSC\\Library\\Calc\\Tests\\Calc\\PriceMinTest::testIfCalcReturnsGrenzeWithFormular":0.007,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfArticleCountIsCorrect":0.003,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfSelectedOptionsCorrect":0.008,"PSC\\Library\\Calc\\Tests\\Complex\\SixTest::testIfCalcCorrect":0.009,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPrice":2.289,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPricePaper":1.349,"PSC\\Library\\Calc\\Tests\\Customer\\DD\\CalcTest::testPricePaper1":1.198,"PSC\\Library\\Calc\\Tests\\CalcValue\\AddCalcValuesTest::testIfParseValue":0.007,"PSC\\Library\\Calc\\Tests\\CalcValue\\SimpleTest::testIfParseValue":0.011,"PSC\\Library\\Calc\\Tests\\Complex\\FourTest::testIfArticleCountIsCorrect":0.004,"PSC\\Library\\Calc\\Tests\\Complex\\FourTest::testIfDefaultPriceIsOk":0.032,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testIfDefaultPriceIsOk":0.316,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testVariant1":0.325,"PSC\\Library\\Calc\\Tests\\Customer\\A\\CalcTest::testVariant2":0.318,"PSC\\Library\\Calc\\Tests\\General\\DisplayGroupTest::testDisplayGroup":0.006,"PSC\\Library\\Calc\\Tests\\Json\\FromJsonTest::testFromJson":0.021,"PSC\\Library\\Calc\\Tests\\Option\\Type\\CheckboxTest::testIfCorrectType":0.007,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfCorrectType":0.012,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfCorrectAttributes":0.012,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfPaperContainerReturnsCorrectItems":0.004,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithPaperContainerModeReturnsCorrectOpt":0.013,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithColorModePantoneReturnsCorrectOpt":0.021,"PSC\\Library\\Calc\\Tests\\Option\\Type\\SelectTest::testIfSelectWithColorModeReturnsCorrectOpt":0.009,"PSC\\Library\\Calc\\Tests\\CalcValue\\ComplexTest::testIfParseValue":0.176,"PSC\\Library\\Calc\\Tests\\CalcValue\\ComplexTest::testIfPaperGrammaturValue":0.17,"PSC\\Library\\Calc\\Tests\\Customer\\C\\CalcTest::testIfDefaultPriceIsOk":0.294,"PSC\\Library\\Calc\\Tests\\Customer\\J\\CalcTest::testIfDefaultPriceIsOk":0.005,"PSC\\Library\\Calc\\Tests\\Customer\\K\\CalcTest::testCalcPlan":0.019,"PSC\\Library\\Calc\\Tests\\Customer\\N\\CalcTest::testPreCalcOption":0.006,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CheckboxTest::testCalcDefault":0.02,"PSC\\Library\\Calc\\Tests\\Customer\\R\\CheckboxTest::testCalcOnly2":0.014,"PSC\\Library\\Calc\\Tests\\Customer\\V\\CalcTest::testIfDefaultPriceIsOk":0.978}} \ No newline at end of file diff --git a/bin/console b/bin/console new file mode 100755 index 0000000..2d7b2ed --- /dev/null +++ b/bin/console @@ -0,0 +1,8 @@ +#!/usr/bin/env php +build(); +$application->run(); diff --git a/composer.json b/composer.json index 424cc93..f4cb58f 100644 --- a/composer.json +++ b/composer.json @@ -17,10 +17,13 @@ "doctrine/orm": "^2.5", "azuyalabs/yasumi": "^2.5", "bitandblack/colors": "2.13.0", - "symfony/cache": "^6.4" + "symfony/cache": "^6.4", + "spatie/array-to-xml": "^3.4", + "symfony/console": "^7.3" }, "require-dev": { - "phpunit/phpunit": "^9", - "phpunit/php-code-coverage": "^9" + "phpunit/phpunit": "^12", + "phpunit/php-code-coverage": "^12", + "brianium/paratest": "^7" } } diff --git a/composer.lock b/composer.lock index 5bc3144..c8aa643 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f5a6832aff7e5d6e13fdbe8761df9bb2", + "content-hash": "3d70599d75781bf44ad55cc7c374262d", "packages": [ { "name": "azuyalabs/yasumi", @@ -491,16 +491,16 @@ }, { "name": "doctrine/dbal", - "version": "3.9.4", + "version": "3.9.5", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "ec16c82f20be1a7224e65ac67144a29199f87959" + "reference": "4a4e2eed3134036ee36a147ee0dac037dfa17868" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/ec16c82f20be1a7224e65ac67144a29199f87959", - "reference": "ec16c82f20be1a7224e65ac67144a29199f87959", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/4a4e2eed3134036ee36a147ee0dac037dfa17868", + "reference": "4a4e2eed3134036ee36a147ee0dac037dfa17868", "shasum": "" }, "require": { @@ -513,14 +513,14 @@ "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "12.0.0", + "doctrine/coding-standard": "13.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.1", - "phpstan/phpstan": "2.1.1", + "phpstan/phpstan": "2.1.17", "phpstan/phpstan-strict-rules": "^2", - "phpunit/phpunit": "9.6.22", - "slevomat/coding-standard": "8.13.1", - "squizlabs/php_codesniffer": "3.10.2", + "phpunit/phpunit": "9.6.23", + "slevomat/coding-standard": "8.16.2", + "squizlabs/php_codesniffer": "3.13.1", "symfony/cache": "^5.4|^6.0|^7.0", "symfony/console": "^4.4|^5.4|^6.0|^7.0" }, @@ -582,7 +582,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.9.4" + "source": "https://github.com/doctrine/dbal/tree/3.9.5" }, "funding": [ { @@ -598,7 +598,7 @@ "type": "tidelift" } ], - "time": "2025-01-16T08:28:55+00:00" + "time": "2025-06-15T22:40:05+00:00" }, { "name": "doctrine/deprecations", @@ -979,16 +979,16 @@ }, { "name": "doctrine/orm", - "version": "2.20.2", + "version": "2.20.4", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "19912de9270fa6abb3d25a1a37784af6b818d534" + "reference": "71550106d491c3f888636b731c805473de3c8583" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/19912de9270fa6abb3d25a1a37784af6b818d534", - "reference": "19912de9270fa6abb3d25a1a37784af6b818d534", + "url": "https://api.github.com/repos/doctrine/orm/zipball/71550106d491c3f888636b731c805473de3c8583", + "reference": "71550106d491c3f888636b731c805473de3c8583", "shasum": "" }, "require": { @@ -1015,14 +1015,14 @@ }, "require-dev": { "doctrine/annotations": "^1.13 || ^2", - "doctrine/coding-standard": "^9.0.2 || ^12.0", + "doctrine/coding-standard": "^9.0.2 || ^13.0", "phpbench/phpbench": "^0.16.10 || ^1.0", "phpstan/extension-installer": "~1.1.0 || ^1.4", "phpstan/phpstan": "~1.4.10 || 2.0.3", "phpstan/phpstan-deprecation-rules": "^1 || ^2", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", "psr/log": "^1 || ^2 || ^3", - "squizlabs/php_codesniffer": "3.7.2", + "squizlabs/php_codesniffer": "3.12.0", "symfony/cache": "^4.4 || ^5.4 || ^6.4 || ^7.0", "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2 || ^7.0", "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0 || ^7.0" @@ -1075,9 +1075,9 @@ ], "support": { "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.20.2" + "source": "https://github.com/doctrine/orm/tree/2.20.4" }, - "time": "2025-02-04T19:17:01+00:00" + "time": "2025-06-09T20:24:12+00:00" }, { "name": "doctrine/persistence", @@ -1390,6 +1390,74 @@ }, "time": "2024-09-11T13:17:53+00:00" }, + { + "name": "spatie/array-to-xml", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/spatie/array-to-xml.git", + "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", + "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "pestphp/pest": "^1.21", + "spatie/pest-plugin-snapshots": "^1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spatie\\ArrayToXml\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://freek.dev", + "role": "Developer" + } + ], + "description": "Convert an array to xml", + "homepage": "https://github.com/spatie/array-to-xml", + "keywords": [ + "array", + "convert", + "xml" + ], + "support": { + "source": "https://github.com/spatie/array-to-xml/tree/3.4.0" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-12-16T12:45:15+00:00" + }, { "name": "symfony/cache", "version": "v6.4.21", @@ -1564,47 +1632,47 @@ }, { "name": "symfony/console", - "version": "v6.4.20", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2e4af9c952617cc3f9559ff706aee420a8464c36" + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2e4af9c952617cc3f9559ff706aee420a8464c36", - "reference": "2e4af9c952617cc3f9559ff706aee420a8464c36", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^5.4|^6.0|^7.0" + "symfony/string": "^7.2" }, "conflict": { - "symfony/dependency-injection": "<5.4", - "symfony/dotenv": "<5.4", - "symfony/event-dispatcher": "<5.4", - "symfony/lock": "<5.4", - "symfony/process": "<5.4" + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^5.4|^6.0|^7.0", - "symfony/dependency-injection": "^5.4|^6.0|^7.0", - "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", "symfony/http-foundation": "^6.4|^7.0", "symfony/http-kernel": "^6.4|^7.0", - "symfony/lock": "^5.4|^6.0|^7.0", - "symfony/messenger": "^5.4|^6.0|^7.0", - "symfony/process": "^5.4|^6.0|^7.0", - "symfony/stopwatch": "^5.4|^6.0|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -1638,7 +1706,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.20" + "source": "https://github.com/symfony/console/tree/v7.3.0" }, "funding": [ { @@ -1654,20 +1722,20 @@ "type": "tidelift" } ], - "time": "2025-03-03T17:16:38+00:00" + "time": "2025-05-24T10:34:04+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", "shasum": "" }, "require": { @@ -1680,7 +1748,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -1705,7 +1773,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" }, "funding": [ { @@ -1721,11 +1789,11 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2024-09-25T14:21:43+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -1784,7 +1852,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.32.0" }, "funding": [ { @@ -1804,7 +1872,7 @@ }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", @@ -1862,7 +1930,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.32.0" }, "funding": [ { @@ -1882,7 +1950,7 @@ }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", @@ -1943,7 +2011,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0" }, "funding": [ { @@ -1963,19 +2031,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", "shasum": "" }, "require": { + "ext-iconv": "*", "php": ">=7.2" }, "provide": { @@ -2023,7 +2092,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.32.0" }, "funding": [ { @@ -2039,7 +2108,7 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2024-12-23T08:48:59+00:00" }, { "name": "symfony/polyfill-php72", @@ -2108,16 +2177,16 @@ }, { "name": "symfony/polyfill-php80", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", "shasum": "" }, "require": { @@ -2168,7 +2237,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0" }, "funding": [ { @@ -2184,20 +2253,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2025-01-02T08:10:11+00:00" }, { "name": "symfony/polyfill-php84", - "version": "v1.31.0", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php84.git", - "reference": "e5493eb51311ab0b1cc2243416613f06ed8f18bd" + "reference": "000df7860439609837bbe28670b0be15783b7fbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/e5493eb51311ab0b1cc2243416613f06ed8f18bd", - "reference": "e5493eb51311ab0b1cc2243416613f06ed8f18bd", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/000df7860439609837bbe28670b0be15783b7fbf", + "reference": "000df7860439609837bbe28670b0be15783b7fbf", "shasum": "" }, "require": { @@ -2244,7 +2313,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php84/tree/v1.31.0" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.32.0" }, "funding": [ { @@ -2260,20 +2329,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T12:04:04+00:00" + "time": "2025-02-20T12:04:08+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.5.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0" + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/e53260aabf78fb3d63f8d79d69ece59f80d5eda0", - "reference": "e53260aabf78fb3d63f8d79d69ece59f80d5eda0", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f021b05a130d35510bd6b25fe9053c2a8a15d5d4", + "reference": "f021b05a130d35510bd6b25fe9053c2a8a15d5d4", "shasum": "" }, "require": { @@ -2291,7 +2360,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.5-dev" + "dev-main": "3.6-dev" } }, "autoload": { @@ -2327,7 +2396,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.5.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.6.0" }, "funding": [ { @@ -2343,24 +2412,24 @@ "type": "tidelift" } ], - "time": "2024-09-25T14:20:29+00:00" + "time": "2025-04-25T09:37:31+00:00" }, { "name": "symfony/string", - "version": "v6.4.15", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f" + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", - "reference": "73a5e66ea2e1677c98d4449177c5a9cf9d8b4c6f", + "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -2370,11 +2439,12 @@ "symfony/translation-contracts": "<2.5" }, "require-dev": { - "symfony/error-handler": "^5.4|^6.0|^7.0", - "symfony/http-client": "^5.4|^6.0|^7.0", - "symfony/intl": "^6.2|^7.0", + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", "symfony/translation-contracts": "^2.5|^3.0", - "symfony/var-exporter": "^5.4|^6.0|^7.0" + "symfony/var-exporter": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2413,7 +2483,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.15" + "source": "https://github.com/symfony/string/tree/v7.3.0" }, "funding": [ { @@ -2429,30 +2499,30 @@ "type": "tidelift" } ], - "time": "2024-11-13T13:31:12+00:00" + "time": "2025-04-20T20:19:01+00:00" }, { "name": "symfony/var-exporter", - "version": "v6.4.22", + "version": "v7.3.0", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "f28cf841f5654955c9f88ceaf4b9dc29571988a9" + "reference": "c9a1168891b5aaadfd6332ef44393330b3498c4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/f28cf841f5654955c9f88ceaf4b9dc29571988a9", - "reference": "f28cf841f5654955c9f88ceaf4b9dc29571988a9", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/c9a1168891b5aaadfd6332ef44393330b3498c4c", + "reference": "c9a1168891b5aaadfd6332ef44393330b3498c4c", "shasum": "" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { "symfony/property-access": "^6.4|^7.0", "symfony/serializer": "^6.4|^7.0", - "symfony/var-dumper": "^5.4|^6.0|^7.0" + "symfony/var-dumper": "^6.4|^7.0" }, "type": "library", "autoload": { @@ -2490,7 +2560,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.22" + "source": "https://github.com/symfony/var-exporter/tree/v7.3.0" }, "funding": [ { @@ -2506,22 +2576,237 @@ "type": "tidelift" } ], - "time": "2025-05-14T13:00:13+00:00" + "time": "2025-05-15T09:04:05+00:00" } ], "packages-dev": [ { - "name": "myclabs/deep-copy", - "version": "1.13.0", + "name": "brianium/paratest", + "version": "v7.10.2", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414" + "url": "https://github.com/paratestphp/paratest.git", + "reference": "cfcf4de3ec195967d9062e7aa32d17d7a040c91e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/024473a478be9df5fdaca2c793f2232fe788e414", - "reference": "024473a478be9df5fdaca2c793f2232fe788e414", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/cfcf4de3ec195967d9062e7aa32d17d7a040c91e", + "reference": "cfcf4de3ec195967d9062e7aa32d17d7a040c91e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-simplexml": "*", + "fidry/cpu-core-counter": "^1.2.0", + "jean85/pretty-package-versions": "^2.1.1", + "php": "~8.3.0 || ~8.4.0", + "phpunit/php-code-coverage": "^12.3.0", + "phpunit/php-file-iterator": "^6", + "phpunit/php-timer": "^8", + "phpunit/phpunit": "^12.2.1", + "sebastian/environment": "^8.0.2", + "symfony/console": "^6.4.20 || ^7.3.0", + "symfony/process": "^6.4.20 || ^7.3.0" + }, + "require-dev": { + "doctrine/coding-standard": "^13.0.1", + "ext-pcntl": "*", + "ext-pcov": "*", + "ext-posix": "*", + "phpstan/phpstan": "^2.1.17", + "phpstan/phpstan-deprecation-rules": "^2.0.3", + "phpstan/phpstan-phpunit": "^2.0.6", + "phpstan/phpstan-strict-rules": "^2.0.4", + "squizlabs/php_codesniffer": "^3.13.0", + "symfony/filesystem": "^6.4.13 || ^7.3.0" + }, + "bin": [ + "bin/paratest", + "bin/paratest_for_phpstorm" + ], + "type": "library", + "autoload": { + "psr-4": { + "ParaTest\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Scaturro", + "email": "scaturrob@gmail.com", + "role": "Developer" + }, + { + "name": "Filippo Tessarotto", + "email": "zoeslam@gmail.com", + "role": "Developer" + } + ], + "description": "Parallel testing for PHP", + "homepage": "https://github.com/paratestphp/paratest", + "keywords": [ + "concurrent", + "parallel", + "phpunit", + "testing" + ], + "support": { + "issues": "https://github.com/paratestphp/paratest/issues", + "source": "https://github.com/paratestphp/paratest/tree/v7.10.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/Slamdunk", + "type": "github" + }, + { + "url": "https://paypal.me/filippotessarotto", + "type": "paypal" + } + ], + "time": "2025-06-09T05:52:59+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "8520451a140d3f46ac33042715115e290cf5785f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/8520451a140d3f46ac33042715115e290cf5785f", + "reference": "8520451a140d3f46ac33042715115e290cf5785f", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.2.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2024-08-06T10:04:20+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a", + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.1.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^7.5|^8.5|^9.6", + "rector/rector": "^2.0", + "vimeo/psalm": "^4.3 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A library to get pretty versions strings of installed dependencies", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.1" + }, + "time": "2025-03-19T14:43:43+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/1720ddd719e16cf0db4eb1c6eca108031636d46c", + "reference": "1720ddd719e16cf0db4eb1c6eca108031636d46c", "shasum": "" }, "require": { @@ -2560,7 +2845,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.1" }, "funding": [ { @@ -2568,20 +2853,20 @@ "type": "tidelift" } ], - "time": "2025-02-12T12:17:51+00:00" + "time": "2025-04-29T12:36:36+00:00" }, { "name": "nikic/php-parser", - "version": "v5.4.0", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494" + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/447a020a1f875a434d62f2a401f53b82a396e494", - "reference": "447a020a1f875a434d62f2a401f53b82a396e494", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/ae59794362fe85e051a58ad36b289443f57be7a9", + "reference": "ae59794362fe85e051a58ad36b289443f57be7a9", "shasum": "" }, "require": { @@ -2624,9 +2909,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.4.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.5.0" }, - "time": "2024-12-30T11:07:19+00:00" + "time": "2025-05-31T08:24:38+00:00" }, { "name": "phar-io/manifest", @@ -2748,35 +3033,34 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.32", + "version": "12.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5" + "reference": "9075a8efc66e11bc55c319062e147bdb06777267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85402a822d1ecf1db1096959413d35e1c37cf1a5", - "reference": "85402a822d1ecf1db1096959413d35e1c37cf1a5", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9075a8efc66e11bc55c319062e147bdb06777267", + "reference": "9075a8efc66e11bc55c319062e147bdb06777267", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.19.1 || ^5.1.0", - "php": ">=7.3", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-text-template": "^2.0.4", - "sebastian/code-unit-reverse-lookup": "^2.0.3", - "sebastian/complexity": "^2.0.3", - "sebastian/environment": "^5.1.5", - "sebastian/lines-of-code": "^1.0.4", - "sebastian/version": "^3.0.2", + "nikic/php-parser": "^5.4.0", + "php": ">=8.3", + "phpunit/php-file-iterator": "^6.0", + "phpunit/php-text-template": "^5.0", + "sebastian/complexity": "^5.0", + "sebastian/environment": "^8.0", + "sebastian/lines-of-code": "^4.0", + "sebastian/version": "^6.0", "theseer/tokenizer": "^1.2.3" }, "require-dev": { - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^12.1" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -2785,7 +3069,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "9.2.x-dev" + "dev-main": "12.3.x-dev" } }, "autoload": { @@ -2814,40 +3098,52 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.32" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.3.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-code-coverage", + "type": "tidelift" } ], - "time": "2024-08-22T04:23:01+00:00" + "time": "2025-05-23T15:49:03+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.6", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + "reference": "961bc913d42fe24a257bfff826a5068079ac7782" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", - "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/961bc913d42fe24a257bfff826a5068079ac7782", + "reference": "961bc913d42fe24a257bfff826a5068079ac7782", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2874,7 +3170,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.0" }, "funding": [ { @@ -2882,28 +3179,28 @@ "type": "github" } ], - "time": "2021-12-02T12:48:52+00:00" + "time": "2025-02-07T04:58:37+00:00" }, { "name": "phpunit/php-invoker", - "version": "3.1.1", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-invoker.git", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", - "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/12b54e689b07a25a9b41e57736dfab6ec9ae5406", + "reference": "12b54e689b07a25a9b41e57736dfab6ec9ae5406", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { "ext-pcntl": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "suggest": { "ext-pcntl": "*" @@ -2911,7 +3208,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -2937,7 +3234,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-invoker/issues", - "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + "security": "https://github.com/sebastianbergmann/php-invoker/security/policy", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/6.0.0" }, "funding": [ { @@ -2945,32 +3243,32 @@ "type": "github" } ], - "time": "2020-09-28T05:58:55+00:00" + "time": "2025-02-07T04:58:58+00:00" }, { "name": "phpunit/php-text-template", - "version": "2.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", - "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53", + "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -2996,7 +3294,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.0" }, "funding": [ { @@ -3004,32 +3303,32 @@ "type": "github" } ], - "time": "2020-10-26T05:33:50+00:00" + "time": "2025-02-07T04:59:16+00:00" }, { "name": "phpunit/php-timer", - "version": "5.0.3", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", - "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", + "reference": "f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -3055,7 +3354,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + "security": "https://github.com/sebastianbergmann/php-timer/security/policy", + "source": "https://github.com/sebastianbergmann/php-timer/tree/8.0.0" }, "funding": [ { @@ -3063,54 +3363,48 @@ "type": "github" } ], - "time": "2020-10-26T13:16:10+00:00" + "time": "2025-02-07T04:59:38+00:00" }, { "name": "phpunit/phpunit", - "version": "9.6.22", + "version": "12.2.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c" + "reference": "19e25c2da3f8071a683ee1e445b0e24bba25de61" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/f80235cb4d3caa59ae09be3adf1ded27521d1a9c", - "reference": "f80235cb4d3caa59ae09be3adf1ded27521d1a9c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/19e25c2da3f8071a683ee1e445b0e24bba25de61", + "reference": "19e25c2da3f8071a683ee1e445b0e24bba25de61", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.5.0 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.12.1", + "myclabs/deep-copy": "^1.13.1", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", - "php": ">=7.3", - "phpunit/php-code-coverage": "^9.2.32", - "phpunit/php-file-iterator": "^3.0.6", - "phpunit/php-invoker": "^3.1.1", - "phpunit/php-text-template": "^2.0.4", - "phpunit/php-timer": "^5.0.3", - "sebastian/cli-parser": "^1.0.2", - "sebastian/code-unit": "^1.0.8", - "sebastian/comparator": "^4.0.8", - "sebastian/diff": "^4.0.6", - "sebastian/environment": "^5.1.5", - "sebastian/exporter": "^4.0.6", - "sebastian/global-state": "^5.0.7", - "sebastian/object-enumerator": "^4.0.4", - "sebastian/resource-operations": "^3.0.4", - "sebastian/type": "^3.2.1", - "sebastian/version": "^3.0.2" - }, - "suggest": { - "ext-soap": "To be able to generate mocks based on WSDL files", - "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + "php": ">=8.3", + "phpunit/php-code-coverage": "^12.3.0", + "phpunit/php-file-iterator": "^6.0.0", + "phpunit/php-invoker": "^6.0.0", + "phpunit/php-text-template": "^5.0.0", + "phpunit/php-timer": "^8.0.0", + "sebastian/cli-parser": "^4.0.0", + "sebastian/comparator": "^7.0.1", + "sebastian/diff": "^7.0.0", + "sebastian/environment": "^8.0.2", + "sebastian/exporter": "^7.0.0", + "sebastian/global-state": "^8.0.0", + "sebastian/object-enumerator": "^7.0.0", + "sebastian/type": "^6.0.2", + "sebastian/version": "^6.0.0", + "staabm/side-effects-detector": "^1.0.5" }, "bin": [ "phpunit" @@ -3118,7 +3412,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "9.6-dev" + "dev-main": "12.2-dev" } }, "autoload": { @@ -3150,7 +3444,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.22" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.2.2" }, "funding": [ { @@ -3161,37 +3455,45 @@ "url": "https://github.com/sebastianbergmann", "type": "github" }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, { "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", "type": "tidelift" } ], - "time": "2024-12-05T13:48:26+00:00" + "time": "2025-06-13T05:49:28+00:00" }, { "name": "sebastian/cli-parser", - "version": "1.0.2", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b" + "reference": "6d584c727d9114bcdc14c86711cd1cad51778e7c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b", - "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/6d584c727d9114bcdc14c86711cd1cad51778e7c", + "reference": "6d584c727d9114bcdc14c86711cd1cad51778e7c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3214,7 +3516,8 @@ "homepage": "https://github.com/sebastianbergmann/cli-parser", "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2" + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.0.0" }, "funding": [ { @@ -3222,145 +3525,39 @@ "type": "github" } ], - "time": "2024-03-02T06:27:43+00:00" - }, - { - "name": "sebastian/code-unit", - "version": "1.0.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", - "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the PHP code units", - "homepage": "https://github.com/sebastianbergmann/code-unit", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit/issues", - "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-10-26T13:08:54+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-09-28T05:30:19+00:00" + "time": "2025-02-07T04:53:50+00:00" }, { "name": "sebastian/comparator", - "version": "4.0.8", + "version": "7.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + "reference": "03d905327dccc0851c9a08d6a979dfc683826b6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", - "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/03d905327dccc0851c9a08d6a979dfc683826b6f", + "reference": "03d905327dccc0851c9a08d6a979dfc683826b6f", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/diff": "^4.0", - "sebastian/exporter": "^4.0" + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.3", + "sebastian/diff": "^7.0", + "sebastian/exporter": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.2" + }, + "suggest": { + "ext-bcmath": "For comparing BcMath\\Number objects" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "7.1-dev" } }, "autoload": { @@ -3399,41 +3596,54 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.0" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" } ], - "time": "2022-09-14T12:41:17+00:00" + "time": "2025-06-17T07:41:58+00:00" }, { "name": "sebastian/complexity", - "version": "2.0.3", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/complexity.git", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a" + "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a", - "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/bad4316aba5303d0221f43f8cee37eb58d384bbb", + "reference": "bad4316aba5303d0221f43f8cee37eb58d384bbb", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3456,7 +3666,8 @@ "homepage": "https://github.com/sebastianbergmann/complexity", "support": { "issues": "https://github.com/sebastianbergmann/complexity/issues", - "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3" + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/5.0.0" }, "funding": [ { @@ -3464,33 +3675,33 @@ "type": "github" } ], - "time": "2023-12-22T06:19:30+00:00" + "time": "2025-02-07T04:55:25+00:00" }, { "name": "sebastian/diff", - "version": "4.0.6", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc" + "reference": "7ab1ea946c012266ca32390913653d844ecd085f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc", - "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", + "reference": "7ab1ea946c012266ca32390913653d844ecd085f", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3", - "symfony/process": "^4.2 || ^5" + "phpunit/phpunit": "^12.0", + "symfony/process": "^7.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -3522,7 +3733,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" }, "funding": [ { @@ -3530,27 +3742,27 @@ "type": "github" } ], - "time": "2024-03-02T06:30:58+00:00" + "time": "2025-02-07T04:55:46+00:00" }, { "name": "sebastian/environment", - "version": "5.1.5", + "version": "8.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" + "reference": "d364b9e5d0d3b18a2573351a1786fbf96b7e0792" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", - "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d364b9e5d0d3b18a2573351a1786fbf96b7e0792", + "reference": "d364b9e5d0d3b18a2573351a1786fbf96b7e0792", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "suggest": { "ext-posix": "*" @@ -3558,7 +3770,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.1-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -3577,7 +3789,7 @@ } ], "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", + "homepage": "https://github.com/sebastianbergmann/environment", "keywords": [ "Xdebug", "environment", @@ -3585,42 +3797,55 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/8.0.2" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/environment", + "type": "tidelift" } ], - "time": "2023-02-03T06:03:51+00:00" + "time": "2025-05-21T15:05:44+00:00" }, { "name": "sebastian/exporter", - "version": "4.0.6", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72" + "reference": "76432aafc58d50691a00d86d0632f1217a47b688" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72", - "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/76432aafc58d50691a00d86d0632f1217a47b688", + "reference": "76432aafc58d50691a00d86d0632f1217a47b688", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/recursion-context": "^4.0" + "ext-mbstring": "*", + "php": ">=8.3", + "sebastian/recursion-context": "^7.0" }, "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -3662,7 +3887,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6" + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.0" }, "funding": [ { @@ -3670,38 +3896,35 @@ "type": "github" } ], - "time": "2024-03-02T06:33:00+00:00" + "time": "2025-02-07T04:56:42+00:00" }, { "name": "sebastian/global-state", - "version": "5.0.7", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9" + "reference": "570a2aeb26d40f057af686d63c4e99b075fb6cbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", - "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/570a2aeb26d40f057af686d63c4e99b075fb6cbc", + "reference": "570a2aeb26d40f057af686d63c4e99b075fb6cbc", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.3", + "sebastian/object-reflector": "^5.0", + "sebastian/recursion-context": "^7.0" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^9.3" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0-dev" + "dev-main": "8.0-dev" } }, "autoload": { @@ -3720,13 +3943,14 @@ } ], "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", "keywords": [ "global state" ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7" + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.0" }, "funding": [ { @@ -3734,33 +3958,33 @@ "type": "github" } ], - "time": "2024-03-02T06:35:11+00:00" + "time": "2025-02-07T04:56:59+00:00" }, { "name": "sebastian/lines-of-code", - "version": "1.0.4", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5" + "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5", - "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f", + "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f", "shasum": "" }, "require": { - "nikic/php-parser": "^4.18 || ^5.0", - "php": ">=7.3" + "nikic/php-parser": "^5.0", + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-main": "4.0-dev" } }, "autoload": { @@ -3783,7 +4007,8 @@ "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4" + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.0" }, "funding": [ { @@ -3791,34 +4016,34 @@ "type": "github" } ], - "time": "2023-12-22T06:20:34+00:00" + "time": "2025-02-07T04:57:28+00:00" }, { "name": "sebastian/object-enumerator", - "version": "4.0.4", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", - "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1effe8e9b8e068e9ae228e542d5d11b5d16db894", + "reference": "1effe8e9b8e068e9ae228e542d5d11b5d16db894", "shasum": "" }, "require": { - "php": ">=7.3", - "sebastian/object-reflector": "^2.0", - "sebastian/recursion-context": "^4.0" + "php": ">=8.3", + "sebastian/object-reflector": "^5.0", + "sebastian/recursion-context": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -3840,7 +4065,8 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + "security": "https://github.com/sebastianbergmann/object-enumerator/security/policy", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/7.0.0" }, "funding": [ { @@ -3848,32 +4074,32 @@ "type": "github" } ], - "time": "2020-10-26T13:12:34+00:00" + "time": "2025-02-07T04:57:48+00:00" }, { "name": "sebastian/object-reflector", - "version": "2.0.4", + "version": "5.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + "reference": "4bfa827c969c98be1e527abd576533293c634f6a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", - "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/4bfa827c969c98be1e527abd576533293c634f6a", + "reference": "4bfa827c969c98be1e527abd576533293c634f6a", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -3895,7 +4121,8 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + "security": "https://github.com/sebastianbergmann/object-reflector/security/policy", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/5.0.0" }, "funding": [ { @@ -3903,32 +4130,32 @@ "type": "github" } ], - "time": "2020-10-26T13:14:26+00:00" + "time": "2025-02-07T04:58:17+00:00" }, { "name": "sebastian/recursion-context", - "version": "4.0.5", + "version": "7.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" + "reference": "c405ae3a63e01b32eb71577f8ec1604e39858a7c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", - "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/c405ae3a63e01b32eb71577f8ec1604e39858a7c", + "reference": "c405ae3a63e01b32eb71577f8ec1604e39858a7c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.3" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "7.0-dev" } }, "autoload": { @@ -3958,7 +4185,8 @@ "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/7.0.0" }, "funding": [ { @@ -3966,86 +4194,32 @@ "type": "github" } ], - "time": "2023-02-03T06:07:39+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e", - "shasum": "" - }, - "require": { - "php": ">=7.3" - }, - "require-dev": { - "phpunit/phpunit": "^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2024-03-14T16:00:52+00:00" + "time": "2025-02-07T05:00:01+00:00" }, { "name": "sebastian/type", - "version": "3.2.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + "reference": "1d7cd6e514384c36d7a390347f57c385d4be6069" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", - "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/1d7cd6e514384c36d7a390347f57c385d4be6069", + "reference": "1d7cd6e514384c36d7a390347f57c385d4be6069", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^12.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -4068,7 +4242,8 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" + "security": "https://github.com/sebastianbergmann/type/security/policy", + "source": "https://github.com/sebastianbergmann/type/tree/6.0.2" }, "funding": [ { @@ -4076,29 +4251,29 @@ "type": "github" } ], - "time": "2023-02-03T06:13:03+00:00" + "time": "2025-03-18T13:37:31+00:00" }, { "name": "sebastian/version", - "version": "3.0.2", + "version": "6.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "c6c1022351a901512170118436c764e473f6de8c" + "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", - "reference": "c6c1022351a901512170118436c764e473f6de8c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c", + "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-main": "6.0-dev" } }, "autoload": { @@ -4121,7 +4296,8 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + "security": "https://github.com/sebastianbergmann/version/security/policy", + "source": "https://github.com/sebastianbergmann/version/tree/6.0.0" }, "funding": [ { @@ -4129,7 +4305,120 @@ "type": "github" } ], - "time": "2020-09-28T06:39:44+00:00" + "time": "2025-02-07T05:00:38+00:00" + }, + { + "name": "staabm/side-effects-detector", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/staabm/side-effects-detector.git", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163", + "reference": "d8334211a140ce329c13726d4a715adbddd0a163", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^1.12.6", + "phpunit/phpunit": "^9.6.21", + "symfony/var-dumper": "^5.4.43", + "tomasvotruba/type-coverage": "1.0.0", + "tomasvotruba/unused-public": "1.0.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A static analysis tool to detect side effects in PHP code", + "keywords": [ + "static analysis" + ], + "support": { + "issues": "https://github.com/staabm/side-effects-detector/issues", + "source": "https://github.com/staabm/side-effects-detector/tree/1.0.5" + }, + "funding": [ + { + "url": "https://github.com/staabm", + "type": "github" + } + ], + "time": "2024-10-20T05:08:20+00:00" + }, + { + "name": "symfony/process", + "version": "v7.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", + "reference": "40c295f2deb408d5e9d2d32b8ba1dd61e36f05af", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v7.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-17T09:11:12+00:00" }, { "name": "theseer/tokenizer", @@ -4184,12 +4473,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=8.1" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/src/Article.php b/src/Article.php index dffc7d4..f890dc6 100644 --- a/src/Article.php +++ b/src/Article.php @@ -9,8 +9,9 @@ use PSC\Library\Calc\PreCalc\PreCalc; class Article { - /** @var string $name */ - protected $name; + protected string $name; + + protected string $uuid; protected string $comment = ""; @@ -22,12 +23,13 @@ class Article protected PreCalc $preCalc; - public function __construct($name) + public function __construct($name, $uuid = "") { $this->options = new \ArrayIterator(); $this->displayGroups = new \ArrayIterator(); $this->preCalc = new PreCalc(); $this->setName($name); + $this->setUUID($uuid); } public function setPreCalc(PreCalc $preCalc) @@ -80,22 +82,26 @@ class Article return $this->comment; } - /** - * @return string - */ - public function getName() + public function getName(): string { return $this->name; } - /** - * @param string $name - */ - public function setName($name) + public function setName(string $name): void { $this->name = $name; } + public function getUUID(): ?string + { + return $this->uuid; + } + + public function setUUID(?string $uuid): void + { + $this->uuid = $uuid; + } + public function getOptionById($id): ?Base { if($id === false) { @@ -171,4 +177,28 @@ class Article } return $temp; } + + public function generateXML(): array + { + $options = $this->options; + $tmp = ['option' => function () use ($options) { + $xml_options = []; + foreach ($options as $option) { + $xml_options[] = $option->generateXML(); + } + + return $xml_options; + }]; + + return $tmp; + } + + public function generateJson(): array + { + $tmp = []; + foreach($this->options as $option) { + $tmp[] = $option->generateJson(); + } + return $tmp; + } } diff --git a/src/Command/Convert.php b/src/Command/Convert.php new file mode 100644 index 0000000..78d6753 --- /dev/null +++ b/src/Command/Convert.php @@ -0,0 +1,74 @@ +setDescription('Convert beetween formats.') + ->setHelp('converts between formats') + ->addArgument('from', InputArgument::REQUIRED, 'from file') + ->addArgument('to', InputArgument::REQUIRED, 'to file') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $io = new SymfonyStyle($input, $output); + $output->writeln([ + 'Convert', + '============', + '', + ]); + + $output->writeln('From: '.$input->getArgument('from')); + $output->writeln('To: '.$input->getArgument('to')); + + $from = $input->getArgument('from'); + $to = $input->getArgument('to'); + + if(!file_exists($from)) { + $io->error("from file not found"); + return Command::FAILURE; + } + + if(file_exists($to)) { + $helper = $this->getHelper('question'); + $question = new ConfirmationQuestion('To File exists continue?', false, '/^(y|j)/i'); + + if (!$helper->ask($input, $output, $question)) { + return Command::SUCCESS; + } + } + + $engine = new Engine(); + if(strpos($from, "xml") !== false) { + $engine->loadString(file_get_contents($from)); + }else{ + $engine->loadJson(file_get_contents($from)); + } + + if(strpos($to, "xml") !== false) { + file_put_contents($to, $engine->generateXML()); + }else{ + file_put_contents($to, $engine->generateJson()); + } + + return Command::SUCCESS; + } +} diff --git a/src/ConsoleApplication.php b/src/ConsoleApplication.php new file mode 100644 index 0000000..4e09afb --- /dev/null +++ b/src/ConsoleApplication.php @@ -0,0 +1,13 @@ +add(new Convert()); + } +} diff --git a/src/Engine.php b/src/Engine.php index c68124d..cf07b35 100644 --- a/src/Engine.php +++ b/src/Engine.php @@ -1,6 +1,7 @@ articles = new \ArrayIterator(); + $this->json = json_decode($string, true); + $this->activeArticle = false; + $this->calcVariables = []; + $this->variables = []; + return $this->parse(); + } + + public function loadString($string): bool { $this->articles = new \ArrayIterator(); $this->xml = simplexml_load_string($string); $this->activeArticle = false; $this->calcVariables = []; $this->variables = []; - $this->parse(); - return true; + return $this->parse(); } /** @@ -112,11 +115,19 @@ class Engine if($this->templates) { $parser->setTemplates($this->templates); } - foreach ($this->xml as $article) { - $this->articles->append($parser->parse($article)); + if($this->xml) { + foreach ($this->xml as $article) { + $this->articles->append($parser->parseXML($article)); + } + }elseif($this->json){ + foreach ($this->json as $article) { + $this->articles->append($parser->parseJson($article)); + } } + $this->dirty = true; + return true; } /** @@ -654,4 +665,27 @@ class Engine $calcFormel = new Calc($this, $this->article); $this->price = $calcFormel->calc(); } + + public function generateXML(): string + { + + $tmp = ['artikel' => array_merge([ + 'name' => $this->getArticle()->getName(), + 'uuid' => $this->getArticle()->getUUID(), + 'kommentar' => '' + ], $this->getArticle()->generateXML())]; + + return ArrayToXml::convert($tmp, 'kalkulation'); + } + + public function generateJson(): string + { + + $obj = new \stdClass(); + $obj->uuid = $this->getArticle()->getUUID(); + $obj->name = $this->getArticle()->getName(); + $obj->options = $this->getArticle()->generateJson(); + + return json_encode([$obj]); + } } diff --git a/src/General/Parser/Edge.php b/src/General/Parser/Edge.php index c02d240..e3a5e39 100644 --- a/src/General/Parser/Edge.php +++ b/src/General/Parser/Edge.php @@ -9,21 +9,48 @@ namespace PSC\Library\Calc\General\Parser; +use PSC\Library\Calc\General\Type\Edge as PSCEdge; + class Edge { - /** @var \SimpleXMLElement $node */ - protected $node; + protected \SimpleXMLElement $node; - public function __construct($node) + protected array $json; + + public function fromXML(\SimpleXMLElement $node): void { $this->node = $node; } - /** - * @return \PSC\Library\Calc\General\Type\Edge - */ - public function parse() + public function fromJson(array $json): void + { + $this->json = $json; + } + + public function parseJson(): PSCEdge + { + $edge = new \PSC\Library\Calc\General\Type\Edge(); + if (isset($this->json['formula'])) { + $edge->setFormel((string)$this->json['formula']); + } + if (isset($this->json['calcValue'])) { + $edge->setCalcValue((string)$this->json['calcValue']); + } + + $this->parseCondition($edge, trim($this->json['value'])); + if (isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromJson($this->json['dependencys']); + $edge->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); + } + + return $edge; + + + } + + public function parseXML(): PSCEdge { $edge = new \PSC\Library\Calc\General\Type\Edge(); if (isset($this->node->attributes()->formel)) { @@ -72,8 +99,9 @@ class Edge if (isset($this->node->attributes()->value) && $this->node->children()) { $this->parseCondition($edge, trim((string) $this->node->attributes()->value)); if ($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $edge->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $edge->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } } else { $this->parseCondition($edge, trim((string) $this->node)); diff --git a/src/General/Parser/EdgeCollection.php b/src/General/Parser/EdgeCollection.php index 9235e19..3d3787b 100644 --- a/src/General/Parser/EdgeCollection.php +++ b/src/General/Parser/EdgeCollection.php @@ -1,29 +1,51 @@ json = $json; + } + + + public function fromXML(\SimpleXMLElement $node) { $this->node = $node; } - /** - * - * @return \PSC\Library\Calc\General\Type\EdgeCollection - */ - public function parse() + public function parseJson(): PSCEdgeCollection + { + $collection = new \PSC\Library\Calc\General\Type\EdgeCollection(); + $collection->setName((string)$this->json['relation']); + + if(isset($this->json['formula'])) { + $collection->setFormel((string)$this->json['formula']); + } + + foreach($this->json['borders'] as $border) { + $edgeParser = new Edge(); + $edgeParser->fromJson($border); + $edge = $edgeParser->parseJson(); + + $collection->append($edge); + } + + return $collection; + } + + public function parseXML(): PSCEdgeCollection { $collection = new \PSC\Library\Calc\General\Type\EdgeCollection(); @@ -36,12 +58,13 @@ class EdgeCollection } foreach($this->node->grenze as $row) { - $edgeParser = new Edge($row); - $edge = $edgeParser->parse(); + $edgeParser = new Edge(); + $edgeParser->fromXML($row); + $edge = $edgeParser->parseXML(); $collection->append($edge); } return $collection; } -} \ No newline at end of file +} diff --git a/src/General/Parser/EdgeCollectionContainer.php b/src/General/Parser/EdgeCollectionContainer.php index 31597de..5fce6d6 100644 --- a/src/General/Parser/EdgeCollectionContainer.php +++ b/src/General/Parser/EdgeCollectionContainer.php @@ -10,22 +10,48 @@ namespace PSC\Library\Calc\General\Parser; class EdgeCollectionContainer { - /** @var \SimpleXMLElement $node */ - protected $node; + protected \SimpleXMLElement $node; - public function __construct($node) + protected array $json; + + public function __construct() { + } + + public function fromJson(array $json) { + $this->json = $json; + } + + public function fromXML(\SimpleXMLElement $node) { $this->node = $node; } - public function parse() + public function parseJson() + { + $container = new \PSC\Library\Calc\General\Type\EdgeCollectionContainer(); + + foreach($this->json as $row) { + $collectionParser = new EdgeCollection(); + $collectionParser->fromJson($row); + $collection = $collectionParser->parseJson(); + + $container->append($collection); + } + + return $container; + } + + public function parseXML() { $container = new \PSC\Library\Calc\General\Type\EdgeCollectionContainer(); foreach($this->node->children() as $key => $row) { - $collectionParser = new EdgeCollection($row); - - $collection = $collectionParser->parse(); + if($key == 'opt') { + continue; + } + $collectionParser = new EdgeCollection(); + $collectionParser->fromXML($row); + $collection = $collectionParser->parseXML(); $collection->setName($key); $container->append($collection); @@ -33,4 +59,4 @@ class EdgeCollectionContainer return $container; } -} \ No newline at end of file +} diff --git a/src/General/Type/Edge.php b/src/General/Type/Edge.php index f6d0695..c7e9280 100644 --- a/src/General/Type/Edge.php +++ b/src/General/Type/Edge.php @@ -383,5 +383,60 @@ class Edge { $this->edgesCollectionContainer = $edgesCollectionContainer; } -} + public function generateXML(): array + { + $tmp = []; + if($this->formel != "") { + $tmp['formel'] = $this->formel; + } + + if($this->pauschale != 0) { + $tmp['pauschale'] = $this->pauschale; + } + + if($this->calcValue != "") { + $tmp['calc_value'] = $this->calcValue; + } + + if($this->edgesCollectionContainer->count() > 0) { + $tmp = [ + '_attributes' => array_merge([ + 'value' => $this->from . '-' . ($this->to != 0 ? $this->to : '') + ], $tmp), + ]; + + foreach($this->edgesCollectionContainer as $col) { + $tmp[$col->getName()] = $col->generateXML(); + } + + return $tmp; + } + + return [ + '_attributes' => $tmp, + '_value' => $this->from . '-' . ($this->to != 0 ? $this->to : '') + + ]; + } + + public function generateJson(): object + { + $obj = new \stdClass(); + $obj->calcValue = $this->calcValue; + $obj->flatRate = $this->pauschale!=0 ? $this->pauschale : ""; + $obj->formula = $this->formel; + if($this->region) { + $obj->value = $this->from . '-' . ($this->to != 0 ? $this->to : ''); + }else{ + $obj->value = implode(array: $this->values, separator: ','); + } + + $obj->dependencys = []; + foreach($this->edgesCollectionContainer as $col) { + $obj->dependencys[] = $col->generateJson(); + } + + return $obj; + } +} diff --git a/src/General/Type/EdgeCollection.php b/src/General/Type/EdgeCollection.php index 61bfa43..7339a24 100644 --- a/src/General/Type/EdgeCollection.php +++ b/src/General/Type/EdgeCollection.php @@ -41,5 +41,31 @@ class EdgeCollection extends \ArrayIterator $this->default = $default; } + public function generateJson(): object + { + $obj = new \stdClass(); + $obj->relation = $this->getName(); + $obj->formula = $this->getFormel(); + $obj->borders = array_reduce((array)$this, function($result, $e) { + $result[] = $e->generateJson(); + return $result; + }, []); -} \ No newline at end of file + return $obj; + + } + public function generateXML(): array + { + $borders = (array)$this; + $tmp = ['grenze' => function () use ($borders) { + $xml_options = []; + foreach ($borders as $border) { + $xml_options[] = $border->generateXML(); + } + + return $xml_options; + }]; + + return $tmp; + } +} diff --git a/src/Option/Parser.php b/src/Option/Parser.php index 50519ae..32257a1 100644 --- a/src/Option/Parser.php +++ b/src/Option/Parser.php @@ -13,44 +13,73 @@ use PSC\Library\Calc\Option\Parser\Textarea; class Parser { - protected $node; - public function __construct() { } - public function getOptByType(\SimpleXMLElement $node) + public function getOptByJsonType(int $type, ?string $mode = null) { - $this->node = $node; - $obj = false; - switch(strtolower((string)$node['type'])) { + switch($type) { + case 1: + $obj = new Hidden(); + break; + case 2: + $obj = new Input(); + break; + case 3: + $obj = new Select(); + break; + case 4: + $obj = new Text(); + break; + case 5: + $obj = new Textarea(); + break; + case 6: + $obj = new Headline(); + break; + case 7: + $obj = new Checkbox(); + break; + case 8: + $obj = new Radio(); + break; + } + + return $obj; + } + + public function getOptByType(string $type, ?string $mode = null) + { + $obj = false; + switch(strtolower($type)) { case 'input': - $obj = new Input($node); + $obj = new Input(); break; case 'select': - $obj = new Select($node); + $obj = new Select($mode); break; case 'radio': - $obj = new Radio($node); + $obj = new Radio(); break; case 'checkbox': - $obj = new Checkbox($node); + $obj = new Checkbox(); break; case 'headline': - $obj = new Headline($node); + $obj = new Headline(); break; case 'text': - $obj = new Text($node); + $obj = new Text(); break; case 'textarea': - $obj = new Textarea($node); + $obj = new Textarea(); break; case 'hidden': - $obj = new Hidden($node); + $obj = new Hidden(); break; case 'template': - $obj = new Template($node); + $obj = new Template(); break; } diff --git a/src/Option/Parser/Base.php b/src/Option/Parser/Base.php index cb0b158..7eaff45 100644 --- a/src/Option/Parser/Base.php +++ b/src/Option/Parser/Base.php @@ -1,6 +1,8 @@ node = $node; $this->cache = new FilesystemAdapter(); } - protected function parse() + public function fromXML(\SimpleXMLElement $node) { + $this->node = $node; + } + + public function fromJson(array $json) { + $this->json = $json; + } + + public function toJson(): array { + + } + + public function toXML(): \SimpleXMLElement { + + } + + public function parseJson(): PSCBase + { + $this->element->setId((string)$this->json['id']); + $this->element->setName((string)$this->json['name']); + + if(isset($this->json['default'])) { + $this->element->setDefault((string)$this->json['default']); + } + if(isset($this->json['required'])) { + $this->element->setRequire($this->json['required']); + } + + return $this->element; + } + + + + public function parseXML(): PSCBase { $this->element->setId((string)$this->node['id']); $this->element->setName((string)$this->node['name']); @@ -55,6 +90,7 @@ class Base $this->element->setDisplayGroup((string)$this->node['display_group']); } + return $this->element; } private function getBoolean($value) diff --git a/src/Option/Parser/Checkbox.php b/src/Option/Parser/Checkbox.php index 9732f45..1c2c76b 100644 --- a/src/Option/Parser/Checkbox.php +++ b/src/Option/Parser/Checkbox.php @@ -3,6 +3,7 @@ namespace PSC\Library\Calc\Option\Parser; use PSC\Library\Calc\General\Parser\EdgeCollectionContainer; use PSC\Library\Calc\Option\Parser\Checkbox\Opt; +use PSC\Library\Calc\Option\Type\Checkbox as PSCCheckbox; use PSC\Library\Calc\PaperContainer; use PSC\Library\Calc\Tests\Mock\Paper; @@ -11,24 +12,19 @@ class Checkbox extends Base protected $element; - /** @var \SimpleXMLElement $node */ - protected $node; - - public function __construct(\SimpleXMLElement $node) + public function __construct() { - $this->element = new \PSC\Library\Calc\Option\Type\Checkbox(); - - parent::__construct($node); } - public function parse() + public function parseXML(): PSCCheckbox { - parent::parse(); + parent::parseXML(); if(isset($this->node->grenzen) && $this->node->grenzen->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node->grenzen); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->parseXML($this->node->grenzen); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } $this->parseModeNormal(); @@ -44,4 +40,4 @@ class Checkbox extends Base } } -} \ No newline at end of file +} diff --git a/src/Option/Parser/Checkbox/Opt.php b/src/Option/Parser/Checkbox/Opt.php index 1da65bf..f641df1 100644 --- a/src/Option/Parser/Checkbox/Opt.php +++ b/src/Option/Parser/Checkbox/Opt.php @@ -21,11 +21,12 @@ class Opt $this->element->setLabel((string)$this->node['name']); if($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; } -} \ No newline at end of file +} diff --git a/src/Option/Parser/Headline.php b/src/Option/Parser/Headline.php index b8f6bb2..624d62c 100644 --- a/src/Option/Parser/Headline.php +++ b/src/Option/Parser/Headline.php @@ -2,21 +2,21 @@ namespace PSC\Library\Calc\Option\Parser; use PSC\Library\Calc\General\Parser\EdgeCollectionContainer; +use PSC\Library\Calc\Option\Type\Headline as PSCHeadline; class Headline extends Base { protected $element; - public function __construct(\SimpleXMLElement $node) + public function __construct() { $this->element = new \PSC\Library\Calc\Option\Type\Headline(); - parent::__construct($node); } - public function parse() + public function parseXML(): PSCHeadline { - parent::parse(); + parent::parseXML(); if($this->node->data) { $this->element->setValue((string)$this->node->data); @@ -32,8 +32,9 @@ class Headline extends Base } if($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; diff --git a/src/Option/Parser/Hidden.php b/src/Option/Parser/Hidden.php index 1e48601..de6674c 100644 --- a/src/Option/Parser/Hidden.php +++ b/src/Option/Parser/Hidden.php @@ -2,28 +2,43 @@ namespace PSC\Library\Calc\Option\Parser; use PSC\Library\Calc\General\Parser\EdgeCollectionContainer; +use PSC\Library\Calc\Option\Type\Hidden as PSCHidden; class Hidden extends Base { protected $element; - public function __construct(\SimpleXMLElement $node) + public function __construct() { $this->element = new \PSC\Library\Calc\Option\Type\Hidden(); - parent::__construct($node); } - public function parse() + public function parseJSON(): PSCHidden { - parent::parse(); + parent::parseJson(); - if($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromJson($this->json['dependencys']); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); } return $this->element; } -} \ No newline at end of file + + public function parseXML(): PSCHidden + { + parent::parseXML(); + + if($this->node->children()) { + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); + } + + return $this->element; + } + +} diff --git a/src/Option/Parser/Input.php b/src/Option/Parser/Input.php index 04fd107..08efcf1 100644 --- a/src/Option/Parser/Input.php +++ b/src/Option/Parser/Input.php @@ -3,20 +3,36 @@ namespace PSC\Library\Calc\Option\Parser; use PSC\Library\Calc\General\Parser\EdgeCollectionContainer; use PSC\Library\Calc\Option\Type\Input as PSCInput; -use SimpleXMLElement; class Input extends Base { - public function __construct(\SimpleXMLElement $node) + public function __construct() { $this->element = new \PSC\Library\Calc\Option\Type\Input(); - parent::__construct($node); } - public function parse(): PSCInput + public function parseJson(): PSCInput { - parent::parse(); + parent::parseJson(); + + if(isset($this->json['placeHolder'])) { + $this->element->setPlaceHolder((string)$this->json['placeHolder']); + } + + + if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromJson($this->json['dependencys']); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); + } + + return $this->element; + } + + public function parseXML(): PSCInput + { + parent::parseXML(); if(isset($this->node['min'])) { $this->element->setMinValue((int)$this->node['min']); @@ -34,8 +50,9 @@ class Input extends Base } if($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; diff --git a/src/Option/Parser/Radio.php b/src/Option/Parser/Radio.php index 267ef85..2871c5d 100644 --- a/src/Option/Parser/Radio.php +++ b/src/Option/Parser/Radio.php @@ -4,6 +4,7 @@ namespace PSC\Library\Calc\Option\Parser; use Doctrine\Persistence\ObjectRepository; use PSC\Library\Calc\General\Parser\EdgeCollectionContainer; use PSC\Library\Calc\Option\Parser\Radio\Opt; +use PSC\Library\Calc\Option\Type\Radio as PSCRadio; use PSC\Library\Calc\PaperContainer; use PSC\Library\Calc\Tests\Mock\Paper; @@ -12,20 +13,14 @@ class Radio extends Base protected $element; - /** @var \SimpleXMLElement $node */ - protected $node; - - public function __construct(\SimpleXMLElement $node) + public function __construct() { - $this->element = new \PSC\Library\Calc\Option\Type\Radio(); - - parent::__construct($node); } - public function parse() + public function parseXML(): PSCRadio { - parent::parse(); + parent::parseXML(); if(isset($this->node->grenzen) && $this->node->grenzen->children()) { $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node->grenzen); @@ -44,5 +39,4 @@ class Radio extends Base $this->element->addOption($optParser->parse()); } } - } diff --git a/src/Option/Parser/Radio/Opt.php b/src/Option/Parser/Radio/Opt.php index 590d5b8..1ca2115 100644 --- a/src/Option/Parser/Radio/Opt.php +++ b/src/Option/Parser/Radio/Opt.php @@ -22,8 +22,9 @@ class Opt $this->element->setLabel((string)$this->node['name']); if($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; diff --git a/src/Option/Parser/Row.php b/src/Option/Parser/Row.php index 93ae683..3ecf82c 100644 --- a/src/Option/Parser/Row.php +++ b/src/Option/Parser/Row.php @@ -11,19 +11,19 @@ class Row extends Base protected $element; - public function __construct(\SimpleXMLElement $node, private $paperContainer, private $paperRepository, private $templates) + public function __construct(private $paperContainer, private $paperRepository, private $templates) { $this->element = new \PSC\Library\Calc\Option\Type\Row(); - parent::__construct($node); } - public function parse(): PSCBase + public function parseXML(): PSCBase { - parent::parse(); + parent::parseXML(); foreach($this->node->children() as $key => $node) { - $p = new Column($node, $this->paperContainer, $this->paperRepository, $this->templates); - $element = $p->parse(); + $p = new Column($this->paperContainer, $this->paperRepository, $this->templates); + $p->fromXML($node); + $element = $p->parseXML(); $this->element->addColumn($element); } diff --git a/src/Option/Parser/Row/Column.php b/src/Option/Parser/Row/Column.php index bddca3c..1abf03c 100644 --- a/src/Option/Parser/Row/Column.php +++ b/src/Option/Parser/Row/Column.php @@ -4,6 +4,7 @@ namespace PSC\Library\Calc\Option\Parser\Row; use PSC\Library\Calc\Option\Parser; use PSC\Library\Calc\Option\Parser\Base; use PSC\Library\Calc\Option\Parser\Row; +use PSC\Library\Calc\Option\Type\Row\Column as PSCColumn; use PSC\Library\Calc\Option\Type\Select; use PSC\Library\Calc\Option\Type\Template; @@ -11,45 +12,46 @@ class Column extends Base { private Parser $optionParser; - public function __construct(\SimpleXMLElement $node, private $paperContainer, private $paperRepository, private $templates) + public function __construct(private $paperContainer, private $paperRepository, private $templates) { $this->element = new \PSC\Library\Calc\Option\Type\Row\Column(); - $this->node = $node; $this->optionParser = new \PSC\Library\Calc\Option\Parser($paperContainer, $paperRepository, $templates); } - public function parse() + public function parseXML(): PSCColumn { - parent::parse(); + parent::parseXML(); foreach ($this->node->children() as $key => $option) { if($key == 'option') { - $obj = $this->optionParser->getOptByType($option); + $obj = $this->optionParser->getOptByType($option['type'], $option['mode']?? null); if($obj) { - + $obj->fromXML($option); if($obj instanceof Select) { $obj->setPaperContainer($this->paperContainer); $obj->setPaperRepository($this->paperRepository); } if($obj instanceof Template) { - $element = $obj->parse(); + $element = $obj->parseXML(); $default = $element->getDefault(); $node = $this->templates->xpath('//option[@id="' . $element->getSelect() . '"]'); - $obj = $this->optionParser->getOptByType($node[0]); - $element = $obj->parse(); + $obj = $this->optionParser->getOptByType($node[0]['type'], $node[0]['mode']?? null); + $obj->fromXML($node[0]); + $element = $obj->parseXML(); if($default != "") { $element->setDefault($default); } }else{ - $element = $obj->parse(); + $element = $obj->parseXML(); } $this->element->addOption($element); } }elseif($key == 'row') { - $obj = new Row($option, $this->paperContainer, $this->paperRepository, $this->templates); - $element = $obj->parse(); + $obj = new Row($this->paperContainer, $this->paperRepository, $this->templates); + $obj->fromXML($option); + $element = $obj->parseXML(); $this->element->addOption($element); } } diff --git a/src/Option/Parser/Select.php b/src/Option/Parser/Select.php index fd3b8c3..d7abf45 100644 --- a/src/Option/Parser/Select.php +++ b/src/Option/Parser/Select.php @@ -7,97 +7,135 @@ use Doctrine\Persistence\ObjectRepository; use PSC\Library\Calc\General\Parser\EdgeCollectionContainer; use PSC\Library\Calc\Option\Parser\Select\Opt; use PSC\Library\Calc\Option\Parser\Select\DeliveryOpt; +use PSC\Library\Calc\Option\Type\Select as PSCSelect; use PSC\Library\Calc\PaperContainer; use PSC\Library\Calc\Tests\Mock\Paper; use Symfony\Contracts\Cache\ItemInterface; class Select extends Base { - protected $element; - /** @var \SimpleXMLElement $node */ - protected $node; - /** @var PaperContainer */ protected $paperContainer; /** @var ObjectRepository */ protected $paperRepository; - public function __construct(\SimpleXMLElement $node) + public function __construct(?string $mode = null) { - if(isset($node['mode']) && (string)$node['mode'] == \PSC\Library\Calc\Option\Type\Select::$modePaperDb) { + parent::__construct(); + + if($mode != null && $mode == \PSC\Library\Calc\Option\Type\Select::$modePaperDb) { $this->element = new \PSC\Library\Calc\Option\Type\PaperDbSelect(); - }elseif(isset($node['mode']) && (string)$node['mode'] == \PSC\Library\Calc\Option\Type\Select::$modeDelivery) { + }elseif($mode != null && $mode == \PSC\Library\Calc\Option\Type\Select::$modeDelivery) { $this->element = new \PSC\Library\Calc\Option\Type\DeliverySelect(); - }elseif(isset($node['mode']) && (string)$node['mode'] == \PSC\Library\Calc\Option\Type\Select::$modeColorDb) { + }elseif($mode != null && $mode == \PSC\Library\Calc\Option\Type\Select::$modeColorDb) { $this->element = new \PSC\Library\Calc\Option\Type\ColorDBSelect(); }else{ $this->element = new \PSC\Library\Calc\Option\Type\Select(); } - parent::__construct($node); + } + public function parseJson(): PSCSelect + { + parent::parseJson(); + + if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromJson($this->json['dependencys']); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); + } + + if(isset($this->json['mode']) && (string)$this->json['mode'] == \PSC\Library\Calc\Option\Type\Select::$modePaperDb) { + $this->parseModePapierDbJson(); + }elseif(isset($this->json['mode']) && (string)$this->json['mode'] == \PSC\Library\Calc\Option\Type\Select::$modeDelivery) { + $this->parseModeDeliveryJson(); + }elseif(isset($this->json['mode']) && (string)$this->json['mode'] == \PSC\Library\Calc\Option\Type\Select::$modeColorDb) { + $this->parseModeColorDbJson(); + }else{ + $this->parseModeNormalJson(); + } + + + return $this->element; } - public function parse() + public function parseXML(): PSCSelect { - parent::parse(); + parent::parseXML(); if(isset($this->node->grenzen) && $this->node->grenzen->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node->grenzen); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node->grenzen); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } if(isset($this->node['mode']) && (string)$this->node['mode'] == \PSC\Library\Calc\Option\Type\Select::$modePaperDb) { - $this->parseModePapierDb(); + $this->parseModePapierDbXML(); }elseif(isset($this->node['mode']) && (string)$this->node['mode'] == \PSC\Library\Calc\Option\Type\Select::$modeDelivery) { - $this->parseModeDelivery(); + $this->parseModeDeliveryXML(); }elseif(isset($this->node['mode']) && (string)$this->node['mode'] == \PSC\Library\Calc\Option\Type\Select::$modeColorDb) { - $this->parseModeColorDb(); + $this->parseModeColorDbXML(); }else{ - $this->parseModeNormal(); + $this->parseModeNormalXML(); } return $this->element; } - private function parseModeDelivery() + private function parseModeDeliveryXML() { foreach ($this->node->opt as $opt) { - $optParser = new DeliveryOpt($opt); - $this->element->addOption($optParser->parse()); + $optParser = new DeliveryOpt(); + $optParser->fromXML($opt); + $this->element->addOption($optParser->parseXML()); } } - private function parseModePapierDb() + private function parseModeDeliveryJson() { - $this->element->setNewPaperObject($this->getPaperRepository()->getNewObject()); - /** @var PaperContainer\Container $container */ - $container = $this->getPaperContainer()->getContainerById((string)$this->node['container']); + foreach ($this->json['options'] as $opt) { + $optParser = new DeliveryOpt(); + $optParser->fromJson($opt); + $this->element->addOption($optParser->parseJson()); + } - if($container) { - /** @var PaperContainer\Item $papier */ - - foreach ($container->getItems() as $papier) { - /** @var Paper $paper */ - $paper = $this->getPaperRepository()->findOneBy(array('artNr' => $papier->getId())); + } - if($paper) { - $optPapier = new \PSC\Library\Calc\Option\Type\Select\PaperOpt(); - $optPapier->setId($paper->getArtNr()); - $optPapier->setLabel($paper->getDescription1()); - $optPapier->setPaper($paper); - $optPapier->setValue($papier->getValue()); - $optPapier->setEdgesCollectionContainer($papier->getEdgesCollectionContainer()); - $this->element->addOption($optPapier); + + private function parseModePapierDbXML() + { + if($this->getPaperRepository()) { + $this->element->setNewPaperObject($this->getPaperRepository()->getNewObject()); + /** @var PaperContainer\Container $container */ + $container = $this->getPaperContainer()->getContainerById((string)$this->node['container']); + + if($container) { + /** @var PaperContainer\Item $papier */ + + foreach ($container->getItems() as $papier) { + /** @var Paper $paper */ + $paper = $this->getPaperRepository()->findOneBy(array('artNr' => $papier->getId())); + + if($paper) { + $optPapier = new \PSC\Library\Calc\Option\Type\Select\PaperOpt(); + $optPapier->setId($paper->getArtNr()); + $optPapier->setLabel($paper->getDescription1()); + $optPapier->setPaper($paper); + $optPapier->setValue($papier->getValue()); + $optPapier->setEdgesCollectionContainer($papier->getEdgesCollectionContainer()); + $this->element->addOption($optPapier); + } } } + }else{ + $this->element->setContainer((string)$this->node['container']); } } - private function parseModeColorDb(): void + private function parseModeColorDbXML(): void { $colorSystem = (string)$this->node['container']; @@ -137,14 +175,26 @@ class Select extends Base $this->element->addOptions($value); } - private function parseModeNormal() + private function parseModeNormalXML() { foreach ($this->node->opt as $opt) { - $optParser = new Opt($opt); - $this->element->addOption($optParser->parse()); + $optParser = new Opt(); + $optParser->fromXML($opt); + $this->element->addOption($optParser->parseXML()); } } + private function parseModeNormalJson() + { + foreach ($this->json['options'] as $opt) { + $optParser = new Opt(); + $optParser->fromJson($opt); + $this->element->addOption($optParser->parseJson()); + } + + } + + /** * @return PaperContainer */ diff --git a/src/Option/Parser/Select/DeliveryOpt.php b/src/Option/Parser/Select/DeliveryOpt.php index e3e4e57..6f872be 100644 --- a/src/Option/Parser/Select/DeliveryOpt.php +++ b/src/Option/Parser/Select/DeliveryOpt.php @@ -7,15 +7,37 @@ use PSC\Library\Calc\Option\Parser\Base; class DeliveryOpt extends Opt { - public function __construct(\SimpleXMLElement $node) + public function __construct() { $this->element = new \PSC\Library\Calc\Option\Type\Select\DeliveryOpt(); - $this->node = $node; } - public function parse() + public function parseJson() { - parent::parse(); + parent::parseJson(); + + if(isset($this->json['info'])) { + $this->element->setInfo((string)$this->json['info']); + } + if(isset($this->json['country'])) { + $this->element->setCountry((string)$this->json['country']); + } + if(isset($this->json['dateFormat'])) { + $this->element->setDateFormat((string)$this->json['dateFormat']); + } + if(isset($this->json['maxTime'])) { + $this->element->setMaxTime((int)$this->json['maxTime']); + } + if(isset($this->json['workDays'])) { + $this->element->setWorkDays((int)$this->json['workDays']); + } + + return $this->element; + } + + public function parseXML() + { + parent::parseXML(); if(isset($this->node['info'])) { $this->element->setInfo((string)$this->node['info']); @@ -33,9 +55,7 @@ class DeliveryOpt extends Opt $this->element->setWorkDays((int)$this->node['workDays']); } - $this->element->setLabel((string)$this->node['name']); - return $this->element; } -} \ No newline at end of file +} diff --git a/src/Option/Parser/Select/Opt.php b/src/Option/Parser/Select/Opt.php index 0081e79..28a7cd3 100644 --- a/src/Option/Parser/Select/Opt.php +++ b/src/Option/Parser/Select/Opt.php @@ -9,24 +9,49 @@ class Opt protected $element; protected \SimpleXMLElement $node; + protected array $json; - public function __construct(\SimpleXMLElement $node) + public function __construct() { $this->element = new \PSC\Library\Calc\Option\Type\Select\Opt(); + } + + public function fromJson(array $json): void + { + $this->json = $json; + } + + public function fromXML(\SimpleXMLElement $node): void + { $this->node = $node; } - public function parse() + public function parseJson() + { + $this->element->setId((string)$this->json['id']); + $this->element->setLabel((string)$this->json['name']); + + if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromJson($this->json['dependencys']); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); + } + + return $this->element; + } + + public function parseXML() { $this->element->setId((string)$this->node['id']); $this->element->setLabel((string)$this->node['name']); if($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; } -} \ No newline at end of file +} diff --git a/src/Option/Parser/Template.php b/src/Option/Parser/Template.php index c4d1226..e4e0f94 100644 --- a/src/Option/Parser/Template.php +++ b/src/Option/Parser/Template.php @@ -1,20 +1,21 @@ element = new \PSC\Library\Calc\Option\Type\Template(); - parent::__construct($node); } - public function parse() + public function parseXML(): PSCTemplate { - parent::parse(); + parent::parseXML(); if($this->node['select']) { $this->element->setSelect((string)$this->node['select']); @@ -22,4 +23,4 @@ class Template extends Base return $this->element; } -} \ No newline at end of file +} diff --git a/src/Option/Parser/Text.php b/src/Option/Parser/Text.php index 7cfe017..85dcb5f 100644 --- a/src/Option/Parser/Text.php +++ b/src/Option/Parser/Text.php @@ -2,21 +2,35 @@ namespace PSC\Library\Calc\Option\Parser; use PSC\Library\Calc\General\Parser\EdgeCollectionContainer; +use PSC\Library\Calc\Option\Type\Text as PSCText; class Text extends Base { protected $element; - public function __construct(\SimpleXMLElement $node) + public function __construct() { $this->element = new \PSC\Library\Calc\Option\Type\Text(); - parent::__construct($node); } - public function parse() + public function parseJSON(): PSCText { - parent::parse(); + parent::parseJson(); + + if(isset($this->json['dependencys']) && count($this->json['dependencys']) > 0) { + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromJson($this->json['dependencys']); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseJson()); + } + + return $this->element; + } + + + public function parseXML(): PSCText + { + parent::parseXML(); if($this->node->data) { $this->element->setValue((string)$this->node->data); @@ -27,8 +41,9 @@ class Text extends Base } if($this->node->children()) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($this->node); - $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($this->node); + $this->element->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } return $this->element; diff --git a/src/Option/Parser/Textarea.php b/src/Option/Parser/Textarea.php index df1640c..aafb6bd 100644 --- a/src/Option/Parser/Textarea.php +++ b/src/Option/Parser/Textarea.php @@ -1,22 +1,23 @@ element = new \PSC\Library\Calc\Option\Type\Textarea(); - parent::__construct($node); } - public function parse() + public function parseXML(): PSCTextarea { - parent::parse(); + parent::parseXML(); return $this->element; } -} \ No newline at end of file +} diff --git a/src/Option/Type/Base.php b/src/Option/Type/Base.php index 30e54fa..3e5e9d6 100644 --- a/src/Option/Type/Base.php +++ b/src/Option/Type/Base.php @@ -339,4 +339,36 @@ class Base 'valid' => $this->isValid() ]; } + + public function generateJson(): \stdClass + { + $obj = new \stdClass(); + $obj->id = $this->getId(); + $obj->name = $this->getName(); + $obj->default = $this->getDefault()?? ""; + $obj->dependencys = []; + + foreach($this->edgesCollectionContainer as $col) { + $obj->dependencys[] = $col->generateJson(); + } + + return $obj; + } + + public function generateXML(): array + { + $tmp = [ + '_attributes' => [ + 'id' => $this->getId(), + 'name' => $this->getName(), + 'type' => ucfirst($this->getType()), + ] + ]; + + foreach($this->edgesCollectionContainer as $col) { + $tmp[$col->getName()] = $col->generateXML(); + } + + return $tmp; + } } diff --git a/src/Option/Type/ColorDBSelect.php b/src/Option/Type/ColorDBSelect.php index 0c1ae7c..431c18c 100644 --- a/src/Option/Type/ColorDBSelect.php +++ b/src/Option/Type/ColorDBSelect.php @@ -19,4 +19,14 @@ class ColorDBSelect extends Select $this->colorSystem = $colorSystem; } + public function generateJson(): \stdClass + { + $obj = parent::generateJson(); + $obj->mode = 'colordb'; + $obj->container = $this->container; + + return $obj; + } + + } diff --git a/src/Option/Type/DeliverySelect.php b/src/Option/Type/DeliverySelect.php index d1d4e89..ed50de8 100644 --- a/src/Option/Type/DeliverySelect.php +++ b/src/Option/Type/DeliverySelect.php @@ -3,5 +3,14 @@ namespace PSC\Library\Calc\Option\Type; class DeliverySelect extends Select { + public function generateJson(): \stdClass + { + $obj = parent::generateJson(); + $obj->mode = 'delivery'; + $obj->container = $this->container; + + return $obj; + } + } diff --git a/src/Option/Type/Hidden.php b/src/Option/Type/Hidden.php index b348a6e..0e32f80 100644 --- a/src/Option/Type/Hidden.php +++ b/src/Option/Type/Hidden.php @@ -3,7 +3,12 @@ namespace PSC\Library\Calc\Option\Type; class Hidden extends Base { - public $type = 'hidden'; -} \ No newline at end of file + public function generateJson(): \stdClass + { + $obj = parent::generateJson(); + $obj->type = 1; + return $obj; + } +} diff --git a/src/Option/Type/Input.php b/src/Option/Type/Input.php index 5eded46..419468b 100644 --- a/src/Option/Type/Input.php +++ b/src/Option/Type/Input.php @@ -52,4 +52,25 @@ class Input extends Base { $this->placeHolder = $placeHolder; } + + public function generateXML(): array + { + return array_merge_recursive([ + '_attributes' => [ + 'placeholder' => $this->getPlaceHolder(), + 'default' => $this->getDefault(), + 'require' => $this->isRequire()?'true':'false', + ] + ] + , parent::generateXML()); + } + + public function generateJson(): \stdClass + { + $obj = parent::generateJson(); + $obj->placeHolder = $this->placeHolder; + $obj->required = $this->isRequire(); + $obj->type = 2; + return $obj; + } } diff --git a/src/Option/Type/PaperDbSelect.php b/src/Option/Type/PaperDbSelect.php index 6176261..dc731a8 100644 --- a/src/Option/Type/PaperDbSelect.php +++ b/src/Option/Type/PaperDbSelect.php @@ -174,4 +174,13 @@ class PaperDbSelect extends Select $this->newPaperObject = $newPaperObject; } + public function generateJson(): \stdClass + { + $obj = parent::generateJson(); + $obj->mode = 'paperdb'; + $obj->container = $this->container; + + return $obj; + } + } diff --git a/src/Option/Type/Select.php b/src/Option/Type/Select.php index 02f8184..dcb8937 100644 --- a/src/Option/Type/Select.php +++ b/src/Option/Type/Select.php @@ -137,4 +137,46 @@ class Select extends Base return $tmp; } + public function generateXML(): array + { + $options = $this->options; + $tmp = ['opt' => function () use ($options) { + $xml_options = []; + foreach ($options as $option) { + $xml_options[] = $option->generateXML(); + } + + return $xml_options; + }]; + + if($this->isRequire()) { + $tmp['_attributes'] = [ + 'require' => $this->isRequire()?'true':'false' + ]; + } + + return array_merge_recursive([ + '_attributes' => [ + 'default' => $this->getDefault(), + ] + ] + , parent::generateXML(), $tmp); + } + + public function generateJson(): \stdClass + { + $obj = parent::generateJson(); + if($this->isRequire()) { + $obj->required = $this->isRequire(); + } + $obj->type = 3; + $obj->options = []; + $obj->mode = 'normal'; + + foreach($this->options as $opt) { + $obj->options[] = $opt->generateJson(); + } + + return $obj; + } } diff --git a/src/Option/Type/Select/Opt.php b/src/Option/Type/Select/Opt.php index 6b302f7..75b2ce7 100644 --- a/src/Option/Type/Select/Opt.php +++ b/src/Option/Type/Select/Opt.php @@ -95,4 +95,35 @@ class Opt { $this->edgesCollectionContainer = new EdgeCollectionContainer(); } -} + + public function generateXML(): array + { + $tmp = [ + '_attributes' => [ + 'id' => $this->id, + 'name' => $this->label, + ] + ]; + + foreach($this->edgesCollectionContainer as $col) { + $tmp[$col->getName()] = $col->generateXML(); + } + + return $tmp; + } + + public function generateJson(): \stdClass + { + $obj = new \stdClass(); + $obj->id = $this->id; + $obj->name = $this->label; + + $obj->dependencys = []; + + foreach($this->edgesCollectionContainer as $col) { + $obj->dependencys[] = $col->generateJson(); + } + + + return $obj; + }} diff --git a/src/Option/Type/Text.php b/src/Option/Type/Text.php index 4d0e6b8..3507623 100644 --- a/src/Option/Type/Text.php +++ b/src/Option/Type/Text.php @@ -6,4 +6,11 @@ class Text extends Base public $type = 'text'; -} \ No newline at end of file + public function generateJson(): \stdClass + { + $obj = parent::generateJson(); + $obj->type = 4; + return $obj; + } + +} diff --git a/src/PaperContainer.php b/src/PaperContainer.php index bfcbbc5..ebea69b 100644 --- a/src/PaperContainer.php +++ b/src/PaperContainer.php @@ -28,8 +28,9 @@ class PaperContainer $item->setValue((float)$paper['value']); } if(isset($paper->grenzen)) { - $edgeCollectionContainerParser = new EdgeCollectionContainer($paper->grenzen); - $item->setEdgesCollectionContainer($edgeCollectionContainerParser->parse()); + $edgeCollectionContainerParser = new EdgeCollectionContainer(); + $edgeCollectionContainerParser->fromXML($paper->grenzen); + $item->setEdgesCollectionContainer($edgeCollectionContainerParser->parseXML()); } $container->addItem($item); @@ -57,4 +58,4 @@ class PaperContainer } } -} \ No newline at end of file +} diff --git a/src/Parser.php b/src/Parser.php index 6cd92ff..7936b79 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -25,11 +25,45 @@ class Parser { } - public function parse(\SimpleXMLElement $node): Article + public function parseJson(array $json): Article + { + $optionParser = new \PSC\Library\Calc\Option\Parser($this->paperContainer, $this->paperRepository, $this->templates); + $this->article = new Article($json['name'], $json['uuid']?? null); + + foreach ($json['options'] as $option) { + $obj = $optionParser->getOptByJsonType($option['type'], $option['mode']?? null); + if($obj) { + $obj->fromJson($option); + if($obj instanceof Select) { + $obj->setPaperContainer($this->getPaperContainer()); + $obj->setPaperRepository($this->getPaperRepository()); + } + if($obj instanceof Template) { + $element = $obj->parseJson(); + + $default = $element->getDefault(); + $node = $this->templates->xpath('//option[@id="' . $element->getSelect() . '"]'); + $obj = $optionParser->getOptByType($node[0]); + $element = $obj->parseJson(); + if($default != "") { + $element->setDefault($default); + } + }else{ + $element = $obj->parseJson(); + } + $this->article->addOption($element); + } + } + + + return $this->article; + } + + public function parseXML(\SimpleXMLElement $node): Article { $optionParser = new \PSC\Library\Calc\Option\Parser($this->paperContainer, $this->paperRepository, $this->templates); - $this->article = new Article((string)$node->name); + $this->article = new Article((string)$node->name, (string)$node->uuid?? null); if(isset($node->kommentar)) { $this->article->setComment((string)$node->kommentar); @@ -56,31 +90,33 @@ class Parser foreach ($node->children() as $key => $option) { if($key == 'option') { - $obj = $optionParser->getOptByType($option); + $obj = $optionParser->getOptByType($option['type'], $option['mode']?? null); if($obj) { - + $obj->fromXML($option); if($obj instanceof Select) { $obj->setPaperContainer($this->getPaperContainer()); $obj->setPaperRepository($this->getPaperRepository()); } if($obj instanceof Template) { - $element = $obj->parse(); + $element = $obj->parseXML(); $default = $element->getDefault(); $node = $this->templates->xpath('//option[@id="' . $element->getSelect() . '"]'); - $obj = $optionParser->getOptByType($node[0]); - $element = $obj->parse(); + $obj = $optionParser->getOptByType($node[0]['type']); + $obj->fromXML($node[0]); + $element = $obj->parseXML(); if($default != "") { $element->setDefault($default); } }else{ - $element = $obj->parse(); + $element = $obj->parseXML(); } $this->article->addOption($element); } }elseif($key == 'row') { - $obj = new Row($option, $this->paperContainer, $this->paperRepository, $this->templates); - $element = $obj->parse(); + $obj = new Row($this->paperContainer, $this->paperRepository, $this->templates); + $obj->fromXML($option); + $element = $obj->parseXML(); $this->article->addOption($element); } } diff --git a/test.json b/test.json new file mode 100644 index 0000000..91a7cf7 --- /dev/null +++ b/test.json @@ -0,0 +1 @@ +[{"uuid":"","name":"Plakate","options":[{"id":"ecoprint","name":"","default":"","dependencys":[],"type":4},{"id":"auflage","name":"Auflage","default":"100","dependencys":[],"type":3,"options":[{"id":"5","name":"5 Exemplare","dependencys":[]},{"id":"10","name":"10 Exemplare","dependencys":[]},{"id":"25","name":"25 Exemplare","dependencys":[]},{"id":"50","name":"50 Exemplare","dependencys":[]},{"id":"100","name":"100 Exemplare","dependencys":[]},{"id":"200","name":"200 Exemplare","dependencys":[]},{"id":"300","name":"300 Exemplare","dependencys":[]},{"id":"400","name":"400 Exemplare","dependencys":[]},{"id":"500","name":"500 Exemplare","dependencys":[]},{"id":"750","name":"750 Exemplare","dependencys":[]},{"id":"1000","name":"1.000 Exemplare","dependencys":[]},{"id":"1500","name":"1.500 Exemplare","dependencys":[]},{"id":"2000","name":"2.000 Exemplare","dependencys":[]},{"id":"3000","name":"3.000 Exemplare","dependencys":[]},{"id":"5000","name":"5.000 Exemplare","dependencys":[]},{"id":"7500","name":"7.500 Exemplare","dependencys":[]},{"id":"10000","name":"10.000 Exemplare","dependencys":[]},{"id":"12500","name":"12.500 Exemplare","dependencys":[]},{"id":"15000","name":"15.000 Exemplare","dependencys":[]},{"id":"20000","name":"20.000 Exemplare","dependencys":[]},{"id":"30000","name":"30.000 Exemplare","dependencys":[]},{"id":"40000","name":"40.000 Exemplare","dependencys":[]},{"id":"50000","name":"50.000 Exemplare","dependencys":[]},{"id":"100000","name":"100.000 Exemplare","dependencys":[]}],"mode":"normal"},{"id":"format1","name":"Format","default":"11","dependencys":[],"type":3,"options":[{"id":"9","name":"DIN A3 Hochformat (297 x 420 mm)","dependencys":[]},{"id":"10","name":"DIN A3 Querformat (420 x 297 mm)","dependencys":[]},{"id":"11","name":"DIN A2 Hochformat (420 x 594 mm)","dependencys":[]},{"id":"12","name":"DIN A2 Querformat (594 x 420 mm)","dependencys":[]},{"id":"13","name":"DIN A1 Hochformat (594 x 840 mm)","dependencys":[]},{"id":"14","name":"DIN A1 Querformat (840 x 594 mm)","dependencys":[]},{"id":"15","name":"Hochformat 700 x 1000 mm","dependencys":[]},{"id":"16","name":"Querformat 1000 x 700 mm)","dependencys":[]}],"mode":"normal"},{"id":"seitenzahl","name":"Seitenzahl","default":"2","dependencys":[],"type":1},{"id":"druckfarben_inhalt","name":"Farbigkeit","default":"1","dependencys":[],"type":3,"options":[{"id":"1","name":"4\/0 Euroskala (einseitig)","dependencys":[]},{"id":"2","name":"4\/4 Euroskala (beidseitig)","dependencys":[]}],"mode":"normal"},{"id":"papier","name":"Papiersorte","default":"grasnatur85","dependencys":[],"type":3,"options":[],"mode":"paperdb","container":"grasbriefbogen"},{"id":"dateiformat_geliefert","name":"Druckdaten","default":"1","dependencys":[],"type":3,"options":[{"id":"1","name":"PDF-Datei (Standard)","dependencys":[]}],"mode":"normal"},{"id":"korrekturabzug","name":"Korrekturabzug","default":"1","dependencys":[],"type":3,"options":[{"id":"1","name":"per PDF (Standard)","dependencys":[]},{"id":"2","name":"per Laserproof","dependencys":[]},{"id":"3","name":"kein Korrekturabzug","dependencys":[]}],"mode":"normal"},{"id":"absender","name":"Absenderadresse","default":"1","dependencys":[],"type":3,"options":[{"id":"1","name":"Die Grasdruckerei","dependencys":[]},{"id":"2","name":"Neutralversand","dependencys":[]}],"mode":"normal"},{"id":"belegexemplar","name":"Belegexemplar","default":"1","dependencys":[],"type":3,"options":[{"id":"1","name":"Nein","dependencys":[]},{"id":"2","name":"Ja","dependencys":[]}],"mode":"normal"},{"id":"produktionszeit","name":"Produktionszeit","default":"2","dependencys":[],"type":3,"options":[{"id":"1","name":"Green (14 Tage)","dependencys":[]},{"id":"2","name":"Normal (7 Tage)","dependencys":[]},{"id":"3","name":"Express nach R\u00fccksprache","dependencys":[]}],"mode":"normal"},{"id":"breite","name":"Seitenbreite Einzelseite","default":"1","dependencys":[{"relation":"format1","formula":"","borders":[{"calcValue":"105","flatRate":"","formula":"","value":"1,3","dependencys":[]},{"calcValue":"148","flatRate":"","formula":"","value":"4,5","dependencys":[]},{"calcValue":"210","flatRate":"","formula":"","value":"2,6,7","dependencys":[]},{"calcValue":"297","flatRate":"","formula":"","value":"8,9","dependencys":[]},{"calcValue":"420","flatRate":"","formula":"","value":"10,11,12","dependencys":[]},{"calcValue":"594","flatRate":"","formula":"","value":"13","dependencys":[]},{"calcValue":"840","flatRate":"","formula":"","value":"14","dependencys":[]},{"calcValue":"700","flatRate":"","formula":"","value":"15,16","dependencys":[]}]}],"type":1},{"id":"breite_offen","name":"Breite offenes Format","default":"1","dependencys":[{"relation":"format1","formula":"","borders":[{"calcValue":"105","flatRate":"","formula":"","value":"1,3","dependencys":[]},{"calcValue":"148","flatRate":"","formula":"","value":"4,5","dependencys":[]},{"calcValue":"210","flatRate":"","formula":"","value":"2,6,7","dependencys":[]},{"calcValue":"297","flatRate":"","formula":"","value":"8,9","dependencys":[]},{"calcValue":"420","flatRate":"","formula":"","value":"10","dependencys":[]},{"calcValue":"594","flatRate":"","formula":"","value":"11,12,13","dependencys":[]},{"calcValue":"840","flatRate":"","formula":"","value":"14","dependencys":[]},{"calcValue":"700","flatRate":"","formula":"","value":"15,16","dependencys":[]}]}],"type":1},{"id":"hoehe_offen","name":"seitenhoehe","default":"1","dependencys":[{"relation":"format1","formula":"","borders":[{"calcValue":"105","flatRate":"","formula":"","value":"2,4","dependencys":[]},{"calcValue":"148","flatRate":"","formula":"","value":"3,6","dependencys":[]},{"calcValue":"210","flatRate":"","formula":"","value":"1,5,8","dependencys":[]},{"calcValue":"297","flatRate":"","formula":"","value":"7,10","dependencys":[]},{"calcValue":"420","flatRate":"","formula":"","value":"9,11,12","dependencys":[]},{"calcValue":"594","flatRate":"","formula":"","value":"14","dependencys":[]},{"calcValue":"840","flatRate":"","formula":"","value":"13","dependencys":[]},{"calcValue":"1000","flatRate":"","formula":"","value":"15,16","dependencys":[]}]}],"type":1},{"id":"nutzen_sm52","name":"Nutzen SM52","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"(max((floor(320\/($CVbreite_offen_format1$CV)))*(floor(470\/$CVhoehe_offen_format1$CV)),(floor(470\/($CVbreite_offen_format1$CV)))*(floor(320\/$CVhoehe_offen_format1$CV))))","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"nutzen_sm102","name":"Nutzen SM102","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"(max((floor(720\/($CVbreite_offen_format1$CV)))*(floor(1020\/$CVhoehe_offen_format1$CV)),(floor(1020\/($CVbreite_offen_format1$CV)))*(floor(720\/$CVhoehe_offen_format1$CV))))","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"nutzen_final","name":"Nutzen final","default":"1","dependencys":[{"relation":"auflage","formula":"$CVnutzen_sm52_auflage$CV","borders":[{"calcValue":"$CVnutzen_sm102_auflage$CV","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"$CVnutzen_sm52_auflage$CV","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_av","name":"Arbeitsvorbereitung","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"$Pav_stundensatz$P*$Pav_flyer_zeit$P","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_dtp","name":"DTP","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"$Pdtp_stundensatz$P*$Pdtp_flyer_zeit$P","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_farbe","name":"farbe","default":"1","dependencys":[{"relation":"format1","formula":"","borders":[{"calcValue":"$Ffarbe_a4$F","flatRate":"","formula":"","value":"7,8","dependencys":[]},{"calcValue":"$Ffarbe_a5$F","flatRate":"","formula":"","value":"5,6","dependencys":[]},{"calcValue":"$Ffarbe_a6$F","flatRate":"","formula":"","value":"3,4","dependencys":[]},{"calcValue":"$Ffarbe_dl$F","flatRate":"","formula":"","value":"1,2","dependencys":[]},{"calcValue":"$Ffarbe_a3$F","flatRate":"","formula":"","value":"9,10","dependencys":[]},{"calcValue":"$Ffarbe_a2$F","flatRate":"","formula":"","value":"11,12","dependencys":[]},{"calcValue":"$Ffarbe_a1$F","flatRate":"","formula":"","value":"13,14","dependencys":[]},{"calcValue":"$Ffarbe_3b$F","flatRate":"","formula":"","value":"15,16","dependencys":[]}]}],"type":1},{"id":"fixkosten_falzen","name":"Fixkosten Falzen","default":"1","dependencys":[{"relation":"seitenzahl","formula":"","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"2","dependencys":[]},{"calcValue":"($Pfalzen_ruesten$P*$Pfalzen_horizon$P\/60)","flatRate":"","formula":"","value":"4","dependencys":[]},{"calcValue":"($Pfalzen_ruesten$P*$Pfalzen_horizon$P\/60)+($Pzus_falzbrueche$P)","flatRate":"","formula":"","value":"6","dependencys":[]},{"calcValue":"($Pfalzen_ruesten$P*$Pfalzen_horizon$P\/60)+(2*$Pzus_falzbrueche$P)","flatRate":"","formula":"","value":"8","dependencys":[]},{"calcValue":"($Pfalzen_ruesten$P*$Pfalzen_horizon$P\/60)+(3*$Pzus_falzbrueche$P)","flatRate":"","formula":"","value":"10","dependencys":[]}]}],"type":1},{"id":"fortlaufgeschwindigkeit_falzen","name":"fortlaufgeschwindigkeit_falzen","default":"1","dependencys":[{"relation":"papier_grammatur","formula":"","borders":[{"calcValue":"$Pfalzen_speed$P","flatRate":"","formula":"","value":"1-169","dependencys":[]},{"calcValue":"$Pfalzen_speed_mit_nuten$P","flatRate":"","formula":"","value":"170-500","dependencys":[]}]}],"type":1},{"id":"kosten_fortlauf_falzen","name":"kosten_fortlauf_falzen","default":"1","dependencys":[{"relation":"auflage","formula":"$Vseitenzahl$V > 2","borders":[{"calcValue":"($Pfalzen_horizon$P\/60)*(60\/$CVfortlaufgeschwindigkeit_falzen_papier_grammatur$CV*$Vauflage$V)","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"($Pfalzen_horizon$P\/60)*(60\/$CVfortlaufgeschwindigkeit_falzen_papier_grammatur$CV*$Vauflage$V)","flatRate":"","formula":"","value":"1","dependencys":[]}]}],"type":1},{"id":"fixkosten_nuten_seitenzahl","name":"Fixkosten Nuten \u00fcber Seitenzahl","default":"1","dependencys":[{"relation":"seitenzahl","formula":"","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"2","dependencys":[]},{"calcValue":"($Pnuten_ruesten$P*$Pfalzen_horizon$P\/60)","flatRate":"","formula":"","value":"4","dependencys":[]},{"calcValue":"($Pnuten_ruesten$P*$Pfalzen_horizon$P\/60)+($Pzus_nutlinien$P)","flatRate":"","formula":"","value":"6","dependencys":[]},{"calcValue":"($Pnuten_ruesten$P*$Pfalzen_horizon$P\/60)+(2*$Pzus_nutlinien$P)","flatRate":"","formula":"","value":"8","dependencys":[]},{"calcValue":"($Pnuten_ruesten$P*$Pfalzen_horizon$P\/60)+(3*$Pzus_nutlinien$P)","flatRate":"","formula":"","value":"10","dependencys":[]}]}],"type":1},{"id":"fixkosten_nuten","name":"Fixkosten Nuten","default":"1","dependencys":[{"relation":"papier_grammatur","formula":"","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"1-169","dependencys":[]},{"calcValue":"($CVfixkosten_nuten_seitenzahl_seitenzahl$CV)","flatRate":"","formula":"","value":"170-","dependencys":[]}]}],"type":1},{"id":"kosten_ruesten_schneiden","name":"kosten_ruesten_schneiden","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"$Pschneidemaschine$P\/60*$Pschneiden_ruesten$P","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"stapelhoehe","name":"stapelhoehe","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"$CVanzahl_druckbogen_auflage$CV*$Vpapier_grammatur$V*$Vpapier_volume$V\/1000","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"anzahl_huebe","name":"Anzahl H\u00fcbe","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"(ceil($CVstapelhoehe_auflage$CV\/$Phubhoehe$P))","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"schndeiden_fortlauf_a3","name":"Anzahl Schnitte","default":"1","dependencys":[{"relation":"nutzen_final","formula":"$CVnutzen_sm52_auflage$CV","borders":[{"calcValue":"round(($Pschneidemaschine$P\/$Pschnitte_pro_stunde$P)*($CVnutzen_final_auflage$CV+4),2)","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"round(($Pschneidemaschine$P\/$Pschnitte_pro_stunde$P)*($CVnutzen_final_auflage$CV+5),2)","flatRate":"","formula":"","value":"1","dependencys":[]},{"calcValue":"round(($Pschneidemaschine$P\/$Pschnitte_pro_stunde$P)*($CVnutzen_final_auflage$CV+4),2)","flatRate":"","formula":"","value":"2-","dependencys":[]}]}],"type":1},{"id":"anzahl_druckbogen","name":"anzahl_druckbogen","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"($Vauflage$V\/$CVnutzen_final_auflage$CV)","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_papier","name":"kosten_papier","default":"1","dependencys":[{"relation":"breite_offen","formula":"($CVbreite_offen_format1$CV > 465)","borders":[{"calcValue":"round((($Ppapierbreite_a3$P*$Ppapierhoehe_a3$P*($CVanzahl_druckbogen_auflage$CV+$Pzuschuss_a3$P)*$Vpapier_grammatur$V)\/1000000000)*($Vpapier_value$V+$Pzuschlag_vorschneiden$P)\/100,2)","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"round((($Ppapierbreite_a2$P*$Ppapierhoehe_a2$P*($CVanzahl_druckbogen_auflage$CV+$Pzuschuss_a2$P)*$Vpapier_grammatur$V)\/1000000000)*($Vpapier_value$V)\/100,2)","flatRate":"","formula":"","value":"1","dependencys":[]}]}],"type":1},{"id":"anzahl_platten","name":"Anzahl Platten","default":"1","dependencys":[{"relation":"druckfarben_inhalt","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"","value":"1","dependencys":[{"relation":"format1","formula":"","borders":[{"calcValue":"4","flatRate":"","formula":"","value":"9-16","dependencys":[]}]}]},{"calcValue":"","flatRate":"","formula":"","value":"2","dependencys":[{"relation":"format1","formula":"","borders":[{"calcValue":"8","flatRate":"","formula":"","value":"9,10","dependencys":[]},{"calcValue":"4","flatRate":"","formula":"","value":"11,12","dependencys":[]},{"calcValue":"8","flatRate":"","formula":"","value":"13,14","dependencys":[]},{"calcValue":"8","flatRate":"","formula":"","value":"15,16","dependencys":[]}]}]}]}],"type":1},{"id":"kosten_platten_sm52","name":"Kosten Druckplatten 52","default":"1","dependencys":[{"relation":"auflage","formula":"$CVanzahl_druckbogen_auflage$CV > 500 && $CVbreite_offen_format1$CV < 465","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"$CVanzahl_platten_druckfarben_inhalt$CV*($Pplatten_sm52$P+$Pruesten_sm52$P)","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_platten_sm102","name":"Kosten Druckplatten 102","default":"1","dependencys":[{"relation":"auflage","formula":"$CVbreite_offen_format1$CV > 465","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"($CVanzahl_platten_druckfarben_inhalt$CV*($Pplatten_sm102$P+$Pruesten_sm102$P))","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_fortdruck_sm52","name":"kosten_fortdruck_sm52","default":"1","dependencys":[{"relation":"auflage","formula":"$CVanzahl_druckbogen_auflage$CV > 500 && $CVbreite_offen_format1$CV < 465","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"$Pstundensatz_sm52$P\/60*(60\/$Psm52_speed$P*(($CVanzahl_druckbogen_auflage$CV+$Pzuschuss_a3$P)*$Vdruckfarben_inhalt$V))","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_fortdruck_sm102","name":"kosten_fortdruck_sm102","default":"1","dependencys":[{"relation":"auflage","formula":"$CVbreite_offen_format1$CV > 465","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"$Pstundensatz_sm102_extern$P\/60*(60\/$Psm102_fremd_speed$P*(($CVanzahl_druckbogen_auflage$CV+$Pzuschuss_a2$P)*$Vdruckfarben_inhalt$V))","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"klickkosten_digitaldruck","name":"Kosten Druckplatten","default":"1","dependencys":[{"relation":"auflage","formula":"$CVanzahl_druckbogen_auflage$CV < 501 && $CVbreite_offen_format1$CV < 465","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"$Pklickkosten_4c$P*($CVanzahl_druckbogen_auflage$CV+$Pzuschuss_digital$P)*$Vdruckfarben_inhalt$V","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_trockenzeit_auflage","name":"kosten_trockenzeit_auflage","default":"1","dependencys":[{"relation":"druckverfahren","formula":"$CVanzahl_druckbogen_auflage$CV > 500 && $CVanzahl_druckbogen_auflage$CV < 1001","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"$Pstundensatz_sm52$P*$Ptrockenzeit_flyer$P\/60","flatRate":"","formula":"","value":"1","dependencys":[]}]}],"type":1},{"id":"kosten_trockenzeit_format","name":"kosten_trockenzeit_format","default":"1","dependencys":[{"relation":"druckverfahren","formula":"$CVbreite_offen_format1$CV > 465 && $CVanzahl_druckbogen_auflage$CV < 1001","borders":[{"calcValue":"0","flatRate":"","formula":"","value":"0","dependencys":[]},{"calcValue":"$Pstundensatz_sm102_extern$P*$Ptrockenzeit_flyer$P\/60","flatRate":"","formula":"","value":"1","dependencys":[]}]}],"type":1},{"id":"kosten_korrekturabzug","name":"kosten_korrekturabzug","default":"1","dependencys":[{"relation":"korrekturabzug","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"0","value":"1,3","dependencys":[]},{"calcValue":"","flatRate":"","formula":"$Plaserproof$P","value":"2","dependencys":[]}]}],"type":1},{"id":"kosten_belegexemplar","name":"kosten_belegexemplar","default":"1","dependencys":[{"relation":"belegexemplar","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"0","value":"1","dependencys":[]},{"calcValue":"","flatRate":"","formula":"$Pbelegexemplar$P","value":"2","dependencys":[]}]}],"type":1},{"id":"produktionszeit_faktor","name":"produktionszeit_faktor","default":"1","dependencys":[{"relation":"produktionszeit","formula":"","borders":[{"calcValue":"$Poeko_faktor$P","flatRate":"","formula":"","value":"1","dependencys":[]},{"calcValue":"1","flatRate":"","formula":"","value":"2","dependencys":[]},{"calcValue":"$Pexpress_faktor$P","flatRate":"","formula":"","value":"3","dependencys":[]}]}],"type":1},{"id":"kosten_produktion_material","name":"kosten_produktion_material","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"($CVkosten_farbe_format1$CV)+($CVkosten_papier_breite_offen$CV)+($CVkosten_platten_sm52_auflage$CV)+($CVkosten_platten_sm102_auflage$CV)+($CVklickkosten_digitaldruck_auflage$CV)","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_produktion_wertschoepfung","name":"kosten_produktion_wertschoepfung","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"(($CVfixkosten_falzen_seitenzahl$CV)+($CVkosten_fortlauf_falzen_auflage$CV)+($CVfixkosten_nuten_papier_grammatur$CV)+($CVkosten_ruesten_schneiden_auflage$CV)+($CVschndeiden_fortlauf_a3_nutzen_final$CV)+($CVkosten_fortdruck_sm52_auflage$CV)+($CVkosten_fortdruck_sm102_auflage$CV)+($CVkosten_trockenzeit_auflage_druckverfahren$CV)+($CVkosten_trockenzeit_format_druckverfahren$CV))*($CVproduktionszeit_faktor_produktionszeit$CV)","value":"1-","dependencys":[]}]}],"type":1},{"id":"weight_produkte","name":"weight","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"$CVbreite_format1$CV*$CVhoehe_offen_format1$CV\/1000000*$Vauflage$V*$Vpapier_grammatur$V","flatRate":"","formula":"","value":"1-","dependencys":[]}]}],"type":1},{"id":"kosten_und_anzahl_verpackungen","name":"kosten_und_anzahl_verpackungen","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"(ceil($CVweight_produkte_auflage$CV\/$Pverpackungsgewichtsbasis$P\/1000))*$Pverpackungsmaterial$P","value":"1-","dependencys":[]}]}],"type":1},{"id":"weight","name":"weight","default":"1","dependencys":[{"relation":"auflage","formula":"","borders":[{"calcValue":"","flatRate":"","formula":"$CVbreite_offen_format1$CV*$CVhoehe_offen_format1$CV\/$Vdruckfarben_inhalt$V\/1000000*$Vauflage$V*$Vpapier_grammatur$V","value":"1-","dependencys":[]}]}],"type":1}]}] \ No newline at end of file diff --git a/tests/CMS/Type/Container/ColumnTest.php b/tests/CMS/Type/Container/ColumnTest.php index 2b1ce4a..f229518 100644 --- a/tests/CMS/Type/Container/ColumnTest.php +++ b/tests/CMS/Type/Container/ColumnTest.php @@ -24,7 +24,7 @@ class ColumnTest extends TestCase $this->engine = null; } - public function tesRowColumn() + public function testRowColumn() { $row1 = $this->engine->getArticle()->getOptionById('row1'); $col2 = $this->engine->getArticle()->getOptionById('row1')->getColumnById('col2'); @@ -34,7 +34,7 @@ class ColumnTest extends TestCase } - public function tesTextOption() + public function testTextOption() { $textOption = $this->engine->getArticle()->getOptionById('text3'); self::assertInstanceOf(Text::class, $textOption); diff --git a/tests/Json/FromJsonTest.php b/tests/Json/FromJsonTest.php new file mode 100644 index 0000000..45ce4bd --- /dev/null +++ b/tests/Json/FromJsonTest.php @@ -0,0 +1,41 @@ +loadJson(file_get_contents(__DIR__ .'/from.json'))); + self::assertCount(1, $engine1->getArticles()); + self::assertInstanceOf(Input::class, $engine1->getArticle()->getOptionById('auflage')); + + $engine2 = new Engine(); + self::assertTrue($engine2->loadString(file_get_contents(__DIR__ .'/from.xml'))); + self::assertCount(1, $engine2->getArticles()); + self::assertInstanceOf(Input::class, $engine2->getArticle()->getOptionById('auflage')); + self::assertSame(1011.42, $engine1->getPrice()); + + self::assertSame($engine1->getPrice(), $engine2->getPrice()); + + self::assertEqualsCanonicalizing($engine1->getArticle(), $engine2->getArticle()); + $tempXML = tempnam(sys_get_temp_dir(), 'calc'); + $tempJson = tempnam(sys_get_temp_dir(), 'calc'); + file_put_contents($tempXML, $engine1->generateXML()); + file_put_contents($tempJson, $engine2->generateJson()); + + self::assertJsonFileEqualsJsonFile(__DIR__.'/from.json', $tempJson); + self::assertXmlFileEqualsXmlFile(__DIR__.'/from.xml', $tempXML); + + self::assertCount(5, $engine1->getArticle()->getOptionById('farbigkeit')->getOptions()); + self::assertCount(5, $engine2->getArticle()->getOptionById('farbigkeit')->getOptions()); + + @unlink($tempXML); + @unlink($tempJson); + } +} diff --git a/tests/Json/from.json b/tests/Json/from.json new file mode 100644 index 0000000..61edaaa --- /dev/null +++ b/tests/Json/from.json @@ -0,0 +1 @@ +[{"uuid":"df2df718-b28e-482d-bf0c-67d246f05d32","name":"Test Artikel","options":[{"id":"auflage","type":2,"dependencys":[],"placeHolder":"Placeholder","default":"100","name":"Auflage","required":false},{"id":"seiten_umschlag","type":2,"dependencys":[],"placeHolder":"Placeholder","default":"2","name":"Seiten Umschlag","required":false},{"id":"seiten_anzahl_inhalt","type":2,"dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"$Vauflage$V*0.12","calcValue":"","flatRate":"","value":"1-10","dependencys":[{"formula":"","relation":"seiten_umschlag","borders":[{"formula":"$Vseiten_umschlag$V*0.24","calcValue":"","flatRate":"","value":"1-2","dependencys":[]},{"formula":"$Vseiten_umschlag$V*0.23","calcValue":"","flatRate":"","value":"3-","dependencys":[]}]}]},{"formula":"$Vauflage$V*0.11","calcValue":"","flatRate":"","value":"11-","dependencys":[{"formula":"","relation":"seiten_umschlag","borders":[{"formula":"$Vseiten_umschlag$V*0.21","calcValue":"","flatRate":"","value":"1-2","dependencys":[]},{"formula":"$Vseiten_umschlag$V*0.20","calcValue":"","flatRate":"","value":"3-","dependencys":[]}]}]}]}],"placeHolder":"Placeholder","default":"10","name":"Seiten Anzahl Inhalt","required":true},{"id":"farbigkeit","mode":"normal","type":3,"dependencys":[],"default":"10","options":[{"id":"10","name":"1/0 farbig","dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"","calcValue":"","flatRate":"","value":"1-101","dependencys":[]}]}]},{"id":"11","name":"1/1 farbig","dependencys":[]},{"id":"20","name":"2/0 farbig","dependencys":[]},{"id":"21","name":"2/1 farbig","dependencys":[]},{"id":"22","name":"2/2 farbig","dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"","calcValue":"","flatRate":"","value":"11-50","dependencys":[]}]}]}],"name":"Farbigkeit"},{"id":"calc","type":1,"dependencys":[{"formula":"","relation":"auflage","borders":[{"formula":"$Vauflage$V*$Vseiten_anzahl_inhalt$V","calcValue":"","flatRate":"","value":"1-","dependencys":[]}]}],"default":"","name":"calc"}]}] diff --git a/tests/Json/from.xml b/tests/Json/from.xml new file mode 100644 index 0000000..953289d --- /dev/null +++ b/tests/Json/from.xml @@ -0,0 +1,52 @@ + + + + Test Artikel + df2df718-b28e-482d-bf0c-67d246f05d32 + + + + + + + + + + + + + + diff --git a/tests/Parse/Edge/ContainerTest.php b/tests/Parse/Edge/ContainerTest.php index 7ae0e7d..d82ab59 100644 --- a/tests/Parse/Edge/ContainerTest.php +++ b/tests/Parse/Edge/ContainerTest.php @@ -10,9 +10,10 @@ class ContainerTest extends TestCase { $node = simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Edges/collections.xml')); - $containerParser = new EdgeCollectionContainer($node); + $containerParser = new EdgeCollectionContainer(); + $containerParser->fromXML($node); /** @var \PSC\Library\Calc\General\Type\EdgeCollectionContainer $container */ - $container = $containerParser->parse(); + $container = $containerParser->parseXML(); $this->assertCount(2, $container); diff --git a/tests/Parse/Edge/SimpleTest.php b/tests/Parse/Edge/SimpleTest.php index f180d3f..cab78b9 100644 --- a/tests/Parse/Edge/SimpleTest.php +++ b/tests/Parse/Edge/SimpleTest.php @@ -10,10 +10,10 @@ class SimpleTest extends TestCase { $node = simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Edges/simple.xml')); - $edgeParser = new Edge($node->grenze[2]); - + $edgeParser = new Edge(); + $edgeParser->fromXML($node->grenze[2]); /** @var \PSC\Library\Calc\General\Type\Edge $edge */ - $edge = $edgeParser->parse(); + $edge = $edgeParser->parseXML(); $this->assertEquals(12, $edge->getPreis()); $this->assertEquals(10, $edge->getPauschale()); $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); @@ -27,10 +27,11 @@ class SimpleTest extends TestCase { $node = simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Edges/simple.xml')); - $edgeParser = new Edge($node->grenze[1]); + $edgeParser = new Edge(); + $edgeParser->fromXML($node->grenze[1]); /** @var \PSC\Library\Calc\General\Type\Edge $edge */ - $edge = $edgeParser->parse(); + $edge = $edgeParser->parseXML(); $this->assertEquals(12, $edge->getPreis()); $this->assertEquals(10, $edge->getPauschale()); $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); @@ -44,10 +45,11 @@ class SimpleTest extends TestCase { $node = simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Edges/simple.xml')); - $edgeParser = new Edge($node->grenze[0]); + $edgeParser = new Edge(); + $edgeParser->fromXML($node->grenze[0]); /** @var \PSC\Library\Calc\General\Type\Edge $edge */ - $edge = $edgeParser->parse(); + $edge = $edgeParser->parseXML(); $this->assertEquals(12, $edge->getPreis()); $this->assertEquals(10, $edge->getPauschale()); $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); @@ -62,10 +64,11 @@ class SimpleTest extends TestCase { $node = simplexml_load_string(file_get_contents(__DIR__ .'/../../TestFiles/Edges/simple.xml')); - $edgeParser = new Edge($node->grenze[3]); + $edgeParser = new Edge(); + $edgeParser->fromXML($node->grenze[3]); /** @var \PSC\Library\Calc\General\Type\Edge $edge */ - $edge = $edgeParser->parse(); + $edge = $edgeParser->parseXML(); $this->assertEquals(12, $edge->getPreis()); $this->assertEquals(10, $edge->getPauschale()); $this->assertEquals('$Vmaschwertjuengerfuenf$V/1000*0.900', $edge->getFormel()); diff --git a/tests/Parse/Option/CheckboxTest.php b/tests/Parse/Option/CheckboxTest.php index 34786a2..3e3f3e7 100644 --- a/tests/Parse/Option/CheckboxTest.php +++ b/tests/Parse/Option/CheckboxTest.php @@ -3,20 +3,16 @@ namespace PSC\Library\Calc\Tests\Option\Type; use PHPUnit\Framework\TestCase; use PSC\Library\Calc\Option\Parser; -use PSC\Library\Calc\Option\Type\Checkbox; -use PSC\Library\Calc\Option\Type\Input; -use PSC\Library\Calc\PaperContainer\Container; class CheckboxTest extends TestCase { public function testIfCorrectType() { $parser = new Parser(); - /** @var Parser\Checkbox $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/checkbox.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/checkbox.xml'))['type']); - /** @var Checkbox $element */ - $element = $obj->parse(); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/checkbox.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Checkbox', $element); } diff --git a/tests/Parse/Option/InputTest.php b/tests/Parse/Option/InputTest.php index 4d6301d..ff1e29d 100644 --- a/tests/Parse/Option/InputTest.php +++ b/tests/Parse/Option/InputTest.php @@ -12,10 +12,9 @@ class InputTest extends TestCase { $parser = new Parser(); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); - - /** @var Input $element */ - $element = $obj->parse(); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))['type']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Input', $element); } @@ -24,10 +23,10 @@ class InputTest extends TestCase { $parser = new Parser(); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); - - /** @var Input $element */ - $element = $obj->parse(); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))['type']); + + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Input', $element); $this->assertTrue($element->isRequire()); diff --git a/tests/Parse/Option/RadioboxTest.php b/tests/Parse/Option/RadioboxTest.php index daa3cd0..02c02d5 100644 --- a/tests/Parse/Option/RadioboxTest.php +++ b/tests/Parse/Option/RadioboxTest.php @@ -12,11 +12,9 @@ class RadioboxTest extends TestCase public function testIfCorrectType() { $parser = new Parser(); - /** @var Parser\Checkbox $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/radiobox.xml'))); - - /** @var Checkbox $element */ - $element = $obj->parse(); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/radiobox.xml'))['type']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/radiobox.xml'))['type']); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Radio', $element); } diff --git a/tests/Parse/Option/SelectTest.php b/tests/Parse/Option/SelectTest.php index 110fa95..6a52c51 100644 --- a/tests/Parse/Option/SelectTest.php +++ b/tests/Parse/Option/SelectTest.php @@ -13,12 +13,10 @@ class SelectTest extends TestCase public function testIfCorrectType() { $parser = new Parser(); - /** @var Parser\Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['mode']); $obj->setPaperContainer(new PaperContainer()); - - /** @var Select $element */ - $element = $obj->parse(); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $element); } @@ -26,12 +24,10 @@ class SelectTest extends TestCase public function testIfCorrectAttributes() { $parser = new Parser(); - /** @var Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['type']); $obj->setPaperContainer(new PaperContainer()); - - /** @var Select $element */ - $element = $obj->parse(); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $element); $this->assertTrue($element->isRequire()); @@ -71,12 +67,13 @@ class SelectTest extends TestCase $parser = new Parser(); /** @var Parser\Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))['mode']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))); $obj->setPaperContainer($paperContainer); $obj->setPaperRepository($repository); /** @var Select $element */ - $element = $obj->parse(); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $element); @@ -86,11 +83,9 @@ class SelectTest extends TestCase public function testIfSelectWithColorModePantoneReturnsCorrectOpt() { $parser = new Parser(); - /** @var Parser\Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))); - - /** @var Select $element */ - $element = $obj->parse(); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))['mode']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $element); $this->assertEquals(1354, $element->getOptions()->count()); @@ -99,11 +94,10 @@ class SelectTest extends TestCase public function testIfSelectWithColorModeReturnsCorrectOpt() { $parser = new Parser(); - /** @var Parser\Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))['mode']); - /** @var Select $element */ - $element = $obj->parse(); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $element); $this->assertEquals(86, $element->getOptions()->count()); diff --git a/tests/Parse/Option/TextTest.php b/tests/Parse/Option/TextTest.php index b017d19..b56685b 100644 --- a/tests/Parse/Option/TextTest.php +++ b/tests/Parse/Option/TextTest.php @@ -12,10 +12,10 @@ class TextTest extends TestCase { $parser = new Parser(); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); - + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))['type']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); /** @var Input $element */ - $element = $obj->parse(); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Text', $element); } @@ -24,10 +24,10 @@ class TextTest extends TestCase { $parser = new Parser(); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); - + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))['type']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); /** @var Input $element */ - $element = $obj->parse(); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Text', $element); $this->assertEquals('testtext', $element->getDefault()); diff --git a/tests/Parse/Option/TextareaTest.php b/tests/Parse/Option/TextareaTest.php index 01fd50d..a448955 100644 --- a/tests/Parse/Option/TextareaTest.php +++ b/tests/Parse/Option/TextareaTest.php @@ -11,11 +11,9 @@ class TextareaTest extends TestCase public function testIfCorrectType() { $parser = new Parser(); - /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); - - /** @var Input $element */ - $element = $obj->parse(); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Textarea', $element); } @@ -23,11 +21,9 @@ class TextareaTest extends TestCase public function testIfCorrectAttributes() { $parser = new Parser(); - /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); - - /** @var Input $element */ - $element = $obj->parse(); + $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type']); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); + $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Textarea', $element); $this->assertEquals('testtext', $element->getDefault());