diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b2b06ec..1e54cc5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: coverage: none - name: PHP Lint - run: find lib tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l + run: find src tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l unit-tests: name: Unit tests diff --git a/composer.json b/composer.json index 7913a9cd..2d515072 100644 --- a/composer.json +++ b/composer.json @@ -16,13 +16,13 @@ "codacy/coverage": "^1.4" }, "autoload": { - "psr-4": { "Sabberworm\\CSS\\": "lib/Sabberworm/CSS/" } + "psr-4": { "Sabberworm\\CSS\\": "src/" } }, "scripts": { "ci": [ "@ci:static" ], - "ci:php:sniff": "@php ./.phive/phpcs.phar lib tests", + "ci:php:sniff": "@php ./.phive/phpcs.phar src tests", "ci:php:stan": "@php ./.phive/phpstan.phar", "ci:static": [ "@ci:php:sniff", @@ -31,7 +31,7 @@ "fix:php": [ "@fix:php:sniff" ], - "fix:php:sniff": "@php ./.phive/phpcbf.phar lib tests", + "fix:php:sniff": "@php ./.phive/phpcbf.phar src tests", "phpstan:baseline": "@php ./.phive/phpstan.phar --generate-baseline" } } diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b0bdb0a4..f28b1ab6 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -3,5 +3,5 @@ parameters: - message: "#^Access to an undefined property Sabberworm\\\\CSS\\\\Parsing\\\\ParserState\\:\\:\\$oParserHelper\\.$#" count: 1 - path: lib/Sabberworm/CSS/Parsing/ParserState.php + path: src/Parsing/ParserState.php diff --git a/phpstan.neon.dist b/phpstan.neon.dist index e50e3f9e..765eb58f 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -9,8 +9,8 @@ parameters: level: 0 scanDirectories: - - %currentWorkingDirectory%/lib/ + - %currentWorkingDirectory%/src/ - %currentWorkingDirectory%/tests/ paths: - - %currentWorkingDirectory%/lib/ + - %currentWorkingDirectory%/src/ - %currentWorkingDirectory%/tests/ diff --git a/phpunit.xml b/phpunit.xml index 6afca719..5f3dd458 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -9,7 +9,7 @@ - lib/Sabberworm/CSS + src diff --git a/lib/Sabberworm/CSS/CSSList/AtRuleBlockList.php b/src/CSSList/AtRuleBlockList.php similarity index 100% rename from lib/Sabberworm/CSS/CSSList/AtRuleBlockList.php rename to src/CSSList/AtRuleBlockList.php diff --git a/lib/Sabberworm/CSS/CSSList/CSSBlockList.php b/src/CSSList/CSSBlockList.php similarity index 100% rename from lib/Sabberworm/CSS/CSSList/CSSBlockList.php rename to src/CSSList/CSSBlockList.php diff --git a/lib/Sabberworm/CSS/CSSList/CSSList.php b/src/CSSList/CSSList.php similarity index 100% rename from lib/Sabberworm/CSS/CSSList/CSSList.php rename to src/CSSList/CSSList.php diff --git a/lib/Sabberworm/CSS/CSSList/Document.php b/src/CSSList/Document.php similarity index 100% rename from lib/Sabberworm/CSS/CSSList/Document.php rename to src/CSSList/Document.php diff --git a/lib/Sabberworm/CSS/CSSList/KeyFrame.php b/src/CSSList/KeyFrame.php similarity index 100% rename from lib/Sabberworm/CSS/CSSList/KeyFrame.php rename to src/CSSList/KeyFrame.php diff --git a/lib/Sabberworm/CSS/Comment/Comment.php b/src/Comment/Comment.php similarity index 100% rename from lib/Sabberworm/CSS/Comment/Comment.php rename to src/Comment/Comment.php diff --git a/lib/Sabberworm/CSS/Comment/Commentable.php b/src/Comment/Commentable.php similarity index 100% rename from lib/Sabberworm/CSS/Comment/Commentable.php rename to src/Comment/Commentable.php diff --git a/lib/Sabberworm/CSS/OutputFormat.php b/src/OutputFormat.php similarity index 100% rename from lib/Sabberworm/CSS/OutputFormat.php rename to src/OutputFormat.php diff --git a/lib/Sabberworm/CSS/Parser.php b/src/Parser.php similarity index 100% rename from lib/Sabberworm/CSS/Parser.php rename to src/Parser.php diff --git a/lib/Sabberworm/CSS/Parsing/OutputException.php b/src/Parsing/OutputException.php similarity index 100% rename from lib/Sabberworm/CSS/Parsing/OutputException.php rename to src/Parsing/OutputException.php diff --git a/lib/Sabberworm/CSS/Parsing/ParserState.php b/src/Parsing/ParserState.php similarity index 100% rename from lib/Sabberworm/CSS/Parsing/ParserState.php rename to src/Parsing/ParserState.php diff --git a/lib/Sabberworm/CSS/Parsing/SourceException.php b/src/Parsing/SourceException.php similarity index 100% rename from lib/Sabberworm/CSS/Parsing/SourceException.php rename to src/Parsing/SourceException.php diff --git a/lib/Sabberworm/CSS/Parsing/UnexpectedEOFException.php b/src/Parsing/UnexpectedEOFException.php similarity index 100% rename from lib/Sabberworm/CSS/Parsing/UnexpectedEOFException.php rename to src/Parsing/UnexpectedEOFException.php diff --git a/lib/Sabberworm/CSS/Parsing/UnexpectedTokenException.php b/src/Parsing/UnexpectedTokenException.php similarity index 100% rename from lib/Sabberworm/CSS/Parsing/UnexpectedTokenException.php rename to src/Parsing/UnexpectedTokenException.php diff --git a/lib/Sabberworm/CSS/Property/AtRule.php b/src/Property/AtRule.php similarity index 100% rename from lib/Sabberworm/CSS/Property/AtRule.php rename to src/Property/AtRule.php diff --git a/lib/Sabberworm/CSS/Property/CSSNamespace.php b/src/Property/CSSNamespace.php similarity index 100% rename from lib/Sabberworm/CSS/Property/CSSNamespace.php rename to src/Property/CSSNamespace.php diff --git a/lib/Sabberworm/CSS/Property/Charset.php b/src/Property/Charset.php similarity index 100% rename from lib/Sabberworm/CSS/Property/Charset.php rename to src/Property/Charset.php diff --git a/lib/Sabberworm/CSS/Property/Import.php b/src/Property/Import.php similarity index 100% rename from lib/Sabberworm/CSS/Property/Import.php rename to src/Property/Import.php diff --git a/lib/Sabberworm/CSS/Property/KeyframeSelector.php b/src/Property/KeyframeSelector.php similarity index 100% rename from lib/Sabberworm/CSS/Property/KeyframeSelector.php rename to src/Property/KeyframeSelector.php diff --git a/lib/Sabberworm/CSS/Property/Selector.php b/src/Property/Selector.php similarity index 100% rename from lib/Sabberworm/CSS/Property/Selector.php rename to src/Property/Selector.php diff --git a/lib/Sabberworm/CSS/Renderable.php b/src/Renderable.php similarity index 100% rename from lib/Sabberworm/CSS/Renderable.php rename to src/Renderable.php diff --git a/lib/Sabberworm/CSS/Rule/Rule.php b/src/Rule/Rule.php similarity index 100% rename from lib/Sabberworm/CSS/Rule/Rule.php rename to src/Rule/Rule.php diff --git a/lib/Sabberworm/CSS/RuleSet/AtRuleSet.php b/src/RuleSet/AtRuleSet.php similarity index 100% rename from lib/Sabberworm/CSS/RuleSet/AtRuleSet.php rename to src/RuleSet/AtRuleSet.php diff --git a/lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php b/src/RuleSet/DeclarationBlock.php similarity index 100% rename from lib/Sabberworm/CSS/RuleSet/DeclarationBlock.php rename to src/RuleSet/DeclarationBlock.php diff --git a/lib/Sabberworm/CSS/RuleSet/RuleSet.php b/src/RuleSet/RuleSet.php similarity index 100% rename from lib/Sabberworm/CSS/RuleSet/RuleSet.php rename to src/RuleSet/RuleSet.php diff --git a/lib/Sabberworm/CSS/Settings.php b/src/Settings.php similarity index 100% rename from lib/Sabberworm/CSS/Settings.php rename to src/Settings.php diff --git a/lib/Sabberworm/CSS/Value/CSSFunction.php b/src/Value/CSSFunction.php similarity index 100% rename from lib/Sabberworm/CSS/Value/CSSFunction.php rename to src/Value/CSSFunction.php diff --git a/lib/Sabberworm/CSS/Value/CSSString.php b/src/Value/CSSString.php similarity index 100% rename from lib/Sabberworm/CSS/Value/CSSString.php rename to src/Value/CSSString.php diff --git a/lib/Sabberworm/CSS/Value/CalcFunction.php b/src/Value/CalcFunction.php similarity index 100% rename from lib/Sabberworm/CSS/Value/CalcFunction.php rename to src/Value/CalcFunction.php diff --git a/lib/Sabberworm/CSS/Value/CalcRuleValueList.php b/src/Value/CalcRuleValueList.php similarity index 100% rename from lib/Sabberworm/CSS/Value/CalcRuleValueList.php rename to src/Value/CalcRuleValueList.php diff --git a/lib/Sabberworm/CSS/Value/Color.php b/src/Value/Color.php similarity index 100% rename from lib/Sabberworm/CSS/Value/Color.php rename to src/Value/Color.php diff --git a/lib/Sabberworm/CSS/Value/LineName.php b/src/Value/LineName.php similarity index 100% rename from lib/Sabberworm/CSS/Value/LineName.php rename to src/Value/LineName.php diff --git a/lib/Sabberworm/CSS/Value/PrimitiveValue.php b/src/Value/PrimitiveValue.php similarity index 100% rename from lib/Sabberworm/CSS/Value/PrimitiveValue.php rename to src/Value/PrimitiveValue.php diff --git a/lib/Sabberworm/CSS/Value/RuleValueList.php b/src/Value/RuleValueList.php similarity index 100% rename from lib/Sabberworm/CSS/Value/RuleValueList.php rename to src/Value/RuleValueList.php diff --git a/lib/Sabberworm/CSS/Value/Size.php b/src/Value/Size.php similarity index 100% rename from lib/Sabberworm/CSS/Value/Size.php rename to src/Value/Size.php diff --git a/lib/Sabberworm/CSS/Value/URL.php b/src/Value/URL.php similarity index 100% rename from lib/Sabberworm/CSS/Value/URL.php rename to src/Value/URL.php diff --git a/lib/Sabberworm/CSS/Value/Value.php b/src/Value/Value.php similarity index 100% rename from lib/Sabberworm/CSS/Value/Value.php rename to src/Value/Value.php diff --git a/lib/Sabberworm/CSS/Value/ValueList.php b/src/Value/ValueList.php similarity index 100% rename from lib/Sabberworm/CSS/Value/ValueList.php rename to src/Value/ValueList.php