Update composer dependencies
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 10 Jan 2022 09:51:21 +0000 (10:51 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 10 Jan 2022 09:51:21 +0000 (10:51 +0100)
42 files changed:
wcfsetup/install/files/lib/system/api/composer.lock
wcfsetup/install/files/lib/system/api/composer/autoload_classmap.php
wcfsetup/install/files/lib/system/api/composer/autoload_static.php
wcfsetup/install/files/lib/system/api/composer/installed.json
wcfsetup/install/files/lib/system/api/composer/installed.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/bin/pscss
wcfsetup/install/files/lib/system/api/scssphp/scssphp/composer.json
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Base/Range.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/AtRootBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/CallableBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ContentBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/DirectiveBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/EachBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseifBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ForBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/IfBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/MediaBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/NestedPropertyBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/WhileBlock.php [new file with mode: 0644]
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Colors.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Compiler/Environment.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Compressed.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/Nested.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Formatter/OutputBlock.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Node/Number.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Parser.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/Base64VLQ.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/SourceMap/SourceMapGenerator.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Type.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Util.php
wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Version.php
wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/Mbstring.php
wcfsetup/install/files/lib/system/api/symfony/polyfill-mbstring/composer.json
wcfsetup/install/files/lib/system/api/symfony/polyfill-php73/Resources/stubs/JsonException.php
wcfsetup/install/files/lib/system/api/symfony/polyfill-php80/Resources/stubs/UnhandledMatchError.php
wcfsetup/install/files/lib/system/api/symfony/polyfill-php80/Resources/stubs/ValueError.php

index 9a530479eec6bac4e33927c39d2c9369c863166a..1379737bcf819580948c0beee70faefa6422b27f 100644 (file)
         },
         {
             "name": "scssphp/scssphp",
-            "version": "v1.9.0",
+            "version": "v1.10.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/scssphp/scssphp.git",
-                "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd"
+                "reference": "9699a52a862da4efb43985943afa17150155dd3d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd",
-                "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd",
+                "url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d",
+                "reference": "9699a52a862da4efb43985943afa17150155dd3d",
                 "shasum": ""
             },
             "require": {
                 "symfony/phpunit-bridge": "^5.1",
                 "thoughtbot/bourbon": "^7.0",
                 "twbs/bootstrap": "~5.0",
-                "twbs/bootstrap4": "4.6.0",
+                "twbs/bootstrap4": "4.6.1",
                 "zurb/foundation": "~6.5"
             },
             "suggest": {
             ],
             "support": {
                 "issues": "https://github.com/scssphp/scssphp/issues",
-                "source": "https://github.com/scssphp/scssphp/tree/v1.9.0"
+                "source": "https://github.com/scssphp/scssphp/tree/v1.10.0"
             },
-            "time": "2021-12-13T11:55:16+00:00"
+            "time": "2022-01-06T18:16:18+00:00"
         },
         {
             "name": "symfony/css-selector",
         },
         {
             "name": "symfony/polyfill-mbstring",
-            "version": "v1.23.1",
+            "version": "v1.24.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
+                "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
-                "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
+                "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
                 "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
             },
+            "provide": {
+                "ext-mbstring": "*"
+            },
             "suggest": {
                 "ext-mbstring": "For best performance"
             },
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
+                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-05-27T12:26:48+00:00"
+            "time": "2021-11-30T18:21:41+00:00"
         },
         {
             "name": "symfony/polyfill-php73",
-            "version": "v1.23.0",
+            "version": "v1.24.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
+                "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
-                "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
+                "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
                 "shasum": ""
             },
             "require": {
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0"
+                "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-02-19T12:13:01+00:00"
+            "time": "2021-06-05T21:20:04+00:00"
         },
         {
             "name": "symfony/polyfill-php74",
-            "version": "v1.23.0",
+            "version": "v1.24.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php74.git",
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php74/tree/v1.23.0"
+                "source": "https://github.com/symfony/polyfill-php74/tree/v1.24.0"
             },
             "funding": [
                 {
         },
         {
             "name": "symfony/polyfill-php80",
-            "version": "v1.23.1",
+            "version": "v1.24.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
+                "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
-                "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
+                "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
                 "shasum": ""
             },
             "require": {
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
+                "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
             },
             "funding": [
                 {
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-07-28T13:41:28+00:00"
+            "time": "2021-09-13T13:58:33+00:00"
         },
         {
             "name": "true/punycode",
index 7c0e65e17dc285eed476bec7fc7b9f2f72257d2f..355cc9f427bfc4a27569f5327ccece8c096dfc4f 100644 (file)
@@ -535,6 +535,18 @@ return array(
     'Sabberworm\\CSS\\Value\\ValueList' => $vendorDir . '/sabberworm/php-css-parser/src/Value/ValueList.php',
     'ScssPhp\\ScssPhp\\Base\\Range' => $vendorDir . '/scssphp/scssphp/src/Base/Range.php',
     'ScssPhp\\ScssPhp\\Block' => $vendorDir . '/scssphp/scssphp/src/Block.php',
+    'ScssPhp\\ScssPhp\\Block\\AtRootBlock' => $vendorDir . '/scssphp/scssphp/src/Block/AtRootBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\CallableBlock' => $vendorDir . '/scssphp/scssphp/src/Block/CallableBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\ContentBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ContentBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\DirectiveBlock' => $vendorDir . '/scssphp/scssphp/src/Block/DirectiveBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\EachBlock' => $vendorDir . '/scssphp/scssphp/src/Block/EachBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\ElseBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ElseBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\ElseifBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ElseifBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\ForBlock' => $vendorDir . '/scssphp/scssphp/src/Block/ForBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\IfBlock' => $vendorDir . '/scssphp/scssphp/src/Block/IfBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\MediaBlock' => $vendorDir . '/scssphp/scssphp/src/Block/MediaBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\NestedPropertyBlock' => $vendorDir . '/scssphp/scssphp/src/Block/NestedPropertyBlock.php',
+    'ScssPhp\\ScssPhp\\Block\\WhileBlock' => $vendorDir . '/scssphp/scssphp/src/Block/WhileBlock.php',
     'ScssPhp\\ScssPhp\\Cache' => $vendorDir . '/scssphp/scssphp/src/Cache.php',
     'ScssPhp\\ScssPhp\\Colors' => $vendorDir . '/scssphp/scssphp/src/Colors.php',
     'ScssPhp\\ScssPhp\\CompilationResult' => $vendorDir . '/scssphp/scssphp/src/CompilationResult.php',
index 7e2f5c6eefe27296e87020b320f8a09ace2bbde8..712f49f3a982938da56d805bdafa06e9d0fbecb3 100644 (file)
@@ -716,6 +716,18 @@ class ComposerStaticInita1f5f7c74275d47a45049a2936db1d0d
         'Sabberworm\\CSS\\Value\\ValueList' => __DIR__ . '/..' . '/sabberworm/php-css-parser/src/Value/ValueList.php',
         'ScssPhp\\ScssPhp\\Base\\Range' => __DIR__ . '/..' . '/scssphp/scssphp/src/Base/Range.php',
         'ScssPhp\\ScssPhp\\Block' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block.php',
+        'ScssPhp\\ScssPhp\\Block\\AtRootBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/AtRootBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\CallableBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/CallableBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\ContentBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ContentBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\DirectiveBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/DirectiveBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\EachBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/EachBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\ElseBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ElseBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\ElseifBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ElseifBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\ForBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/ForBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\IfBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/IfBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\MediaBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/MediaBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\NestedPropertyBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/NestedPropertyBlock.php',
+        'ScssPhp\\ScssPhp\\Block\\WhileBlock' => __DIR__ . '/..' . '/scssphp/scssphp/src/Block/WhileBlock.php',
         'ScssPhp\\ScssPhp\\Cache' => __DIR__ . '/..' . '/scssphp/scssphp/src/Cache.php',
         'ScssPhp\\ScssPhp\\Colors' => __DIR__ . '/..' . '/scssphp/scssphp/src/Colors.php',
         'ScssPhp\\ScssPhp\\CompilationResult' => __DIR__ . '/..' . '/scssphp/scssphp/src/CompilationResult.php',
index 03182fc2c4280b1684c8253de7bea4103df29397..d61ac062debb32dd1b1a122adf4bc2617700434a 100644 (file)
         },
         {
             "name": "scssphp/scssphp",
-            "version": "v1.9.0",
-            "version_normalized": "1.9.0.0",
+            "version": "v1.10.0",
+            "version_normalized": "1.10.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/scssphp/scssphp.git",
-                "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd"
+                "reference": "9699a52a862da4efb43985943afa17150155dd3d"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd",
-                "reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd",
+                "url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d",
+                "reference": "9699a52a862da4efb43985943afa17150155dd3d",
                 "shasum": ""
             },
             "require": {
                 "symfony/phpunit-bridge": "^5.1",
                 "thoughtbot/bourbon": "^7.0",
                 "twbs/bootstrap": "~5.0",
-                "twbs/bootstrap4": "4.6.0",
+                "twbs/bootstrap4": "4.6.1",
                 "zurb/foundation": "~6.5"
             },
             "suggest": {
                 "ext-iconv": "Can be used as fallback when ext-mbstring is not available",
                 "ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
             },
-            "time": "2021-12-13T11:55:16+00:00",
+            "time": "2022-01-06T18:16:18+00:00",
             "bin": [
                 "bin/pscss"
             ],
             ],
             "support": {
                 "issues": "https://github.com/scssphp/scssphp/issues",
-                "source": "https://github.com/scssphp/scssphp/tree/v1.9.0"
+                "source": "https://github.com/scssphp/scssphp/tree/v1.10.0"
             },
             "install-path": "../scssphp/scssphp"
         },
         },
         {
             "name": "symfony/polyfill-mbstring",
-            "version": "v1.23.1",
-            "version_normalized": "1.23.1.0",
+            "version": "v1.24.0",
+            "version_normalized": "1.24.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-mbstring.git",
-                "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
+                "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
-                "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
+                "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
+                "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
                 "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
             },
+            "provide": {
+                "ext-mbstring": "*"
+            },
             "suggest": {
                 "ext-mbstring": "For best performance"
             },
-            "time": "2021-05-27T12:26:48+00:00",
+            "time": "2021-11-30T18:21:41+00:00",
             "type": "library",
             "extra": {
                 "branch-alias": {
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
+                "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
             },
             "funding": [
                 {
         },
         {
             "name": "symfony/polyfill-php73",
-            "version": "v1.23.0",
-            "version_normalized": "1.23.0.0",
+            "version": "v1.24.0",
+            "version_normalized": "1.24.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php73.git",
-                "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010"
+                "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
-                "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
+                "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
+                "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
                 "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
             },
-            "time": "2021-02-19T12:13:01+00:00",
+            "time": "2021-06-05T21:20:04+00:00",
             "type": "library",
             "extra": {
                 "branch-alias": {
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0"
+                "source": "https://github.com/symfony/polyfill-php73/tree/v1.24.0"
             },
             "funding": [
                 {
         },
         {
             "name": "symfony/polyfill-php74",
-            "version": "v1.23.0",
-            "version_normalized": "1.23.0.0",
+            "version": "v1.24.0",
+            "version_normalized": "1.24.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php74.git",
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php74/tree/v1.23.0"
+                "source": "https://github.com/symfony/polyfill-php74/tree/v1.24.0"
             },
             "funding": [
                 {
         },
         {
             "name": "symfony/polyfill-php80",
-            "version": "v1.23.1",
-            "version_normalized": "1.23.1.0",
+            "version": "v1.24.0",
+            "version_normalized": "1.24.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/polyfill-php80.git",
-                "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
+                "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
-                "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
+                "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
+                "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
                 "shasum": ""
             },
             "require": {
                 "php": ">=7.1"
             },
-            "time": "2021-07-28T13:41:28+00:00",
+            "time": "2021-09-13T13:58:33+00:00",
             "type": "library",
             "extra": {
                 "branch-alias": {
                 "shim"
             ],
             "support": {
-                "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
+                "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
             },
             "funding": [
                 {
index 34372049675e277ac5bc91664a8b879466496a32..7357598f680edfc25df5459f6f1560837c125c13 100644 (file)
             'dev_requirement' => false,
         ),
         'scssphp/scssphp' => array(
-            'pretty_version' => 'v1.9.0',
-            'version' => '1.9.0.0',
+            'pretty_version' => 'v1.10.0',
+            'version' => '1.10.0.0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../scssphp/scssphp',
             'aliases' => array(),
-            'reference' => 'bc8bece4e5e176973a832f3763049ddbba16e6fd',
+            'reference' => '9699a52a862da4efb43985943afa17150155dd3d',
             'dev_requirement' => false,
         ),
         'symfony/css-selector' => array(
             'dev_requirement' => false,
         ),
         'symfony/polyfill-mbstring' => array(
-            'pretty_version' => 'v1.23.1',
-            'version' => '1.23.1.0',
+            'pretty_version' => 'v1.24.0',
+            'version' => '1.24.0.0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
             'aliases' => array(),
-            'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
+            'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-php73' => array(
-            'pretty_version' => 'v1.23.0',
-            'version' => '1.23.0.0',
+            'pretty_version' => 'v1.24.0',
+            'version' => '1.24.0.0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-php73',
             'aliases' => array(),
-            'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010',
+            'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5',
             'dev_requirement' => false,
         ),
         'symfony/polyfill-php74' => array(
-            'pretty_version' => 'v1.23.0',
-            'version' => '1.23.0.0',
+            'pretty_version' => 'v1.24.0',
+            'version' => '1.24.0.0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-php74',
             'aliases' => array(),
             'dev_requirement' => false,
         ),
         'symfony/polyfill-php80' => array(
-            'pretty_version' => 'v1.23.1',
-            'version' => '1.23.1.0',
+            'pretty_version' => 'v1.24.0',
+            'version' => '1.24.0.0',
             'type' => 'library',
             'install_path' => __DIR__ . '/../symfony/polyfill-php80',
             'aliases' => array(),
-            'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
+            'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
             'dev_requirement' => false,
         ),
         'true/punycode' => array(
index e62239830f3df22b02838a2f163fea080c78984b..0f009d6bdbe4c66730d92e9d9d1b89485f59f95c 100644 (file)
@@ -38,8 +38,8 @@ $embedSourceMap = false;
 /**
  * Parse argument
  *
- * @param integer $i
- * @param array $options
+ * @param int      $i
+ * @param string[] $options
  *
  * @return string|null
  */
index 86cd396bf76fc2f5cc4424719ece4f7d2f711d07..a8cb2d4f6138a732c3ade55f18704c245e8f27fa 100644 (file)
@@ -42,7 +42,7 @@
         "symfony/phpunit-bridge": "^5.1",
         "thoughtbot/bourbon": "^7.0",
         "twbs/bootstrap": "~5.0",
-        "twbs/bootstrap4": "4.6.0",
+        "twbs/bootstrap4": "4.6.1",
         "zurb/foundation": "~6.5"
     },
     "repositories": [
             "type": "package",
             "package": {
                 "name": "sass/sass-spec",
-                "version": "2021.09.15",
+                "version": "2021.11.30",
                 "source": {
                     "type": "git",
                     "url": "https://github.com/sass/sass-spec.git",
-                    "reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955"
+                    "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a"
                 },
                 "dist": {
                     "type": "zip",
-                    "url": "https://api.github.com/repos/sass/sass-spec/zipball/eb2d7a0865c1faf0b55a39ff962b24aca9b4c955",
-                    "reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955",
+                    "url": "https://api.github.com/repos/sass/sass-spec/zipball/ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
+                    "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
                     "shasum": ""
                 }
             }
             "type": "package",
             "package": {
                 "name": "twbs/bootstrap4",
-                "version": "v4.6.0",
+                "version": "v4.6.1",
                 "source": {
                     "type": "git",
                     "url": "https://github.com/twbs/bootstrap.git",
-                    "reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2"
+                    "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10"
                 },
                 "dist": {
                     "type": "zip",
-                    "url": "https://api.github.com/repos/twbs/bootstrap/zipball/6ffb0b48e455430f8a5359ed689ad64c1143fac2",
-                    "reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2",
+                    "url": "https://api.github.com/repos/twbs/bootstrap/zipball/043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
+                    "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
                     "shasum": ""
                 }
             }
     ],
     "bin": ["bin/pscss"],
     "config": {
-        "sort-packages": true
+        "sort-packages": true,
+        "allow-plugins": {
+            "bamarni/composer-bin-plugin": true
+        }
     }
 }
index 0c5f5840961ec54a50b58f956ab61af84cc19dab..31d5ec565d63ffb7cd83f603260f10aad113beee 100644 (file)
@@ -34,8 +34,8 @@ class Range
     /**
      * Initialize range
      *
-     * @param integer|float $first
-     * @param integer|float $last
+     * @param int|float $first
+     * @param int|float $last
      */
     public function __construct($first, $last)
     {
@@ -46,9 +46,9 @@ class Range
     /**
      * Test for inclusion in range
      *
-     * @param integer|float $value
+     * @param int|float $value
      *
-     * @return boolean
+     * @return bool
      */
     public function includes($value)
     {
index 3ae49d00c9516b445e85987f0d22aba546eb1cc8..96668dc66892104c5e7aeac0808191096661fa4d 100644 (file)
@@ -22,12 +22,12 @@ namespace ScssPhp\ScssPhp;
 class Block
 {
     /**
-     * @var string
+     * @var string|null
      */
     public $type;
 
     /**
-     * @var \ScssPhp\ScssPhp\Block
+     * @var Block|null
      */
     public $parent;
 
@@ -37,17 +37,17 @@ class Block
     public $sourceName;
 
     /**
-     * @var integer
+     * @var int
      */
     public $sourceIndex;
 
     /**
-     * @var integer
+     * @var int
      */
     public $sourceLine;
 
     /**
-     * @var integer
+     * @var int
      */
     public $sourceColumn;
 
@@ -67,7 +67,7 @@ class Block
     public $children;
 
     /**
-     * @var \ScssPhp\ScssPhp\Block|null
+     * @var Block|null
      */
     public $selfParent;
 }
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/AtRootBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/AtRootBlock.php
new file mode 100644 (file)
index 0000000..41842c2
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class AtRootBlock extends Block
+{
+    /**
+     * @var array|null
+     */
+    public $selector;
+
+    /**
+     * @var array|null
+     */
+    public $with;
+
+    public function __construct()
+    {
+        $this->type = Type::T_AT_ROOT;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/CallableBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/CallableBlock.php
new file mode 100644 (file)
index 0000000..a18a87c
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Compiler\Environment;
+
+/**
+ * @internal
+ */
+class CallableBlock extends Block
+{
+    /**
+     * @var string
+     */
+    public $name;
+
+    /**
+     * @var array|null
+     */
+    public $args;
+
+    /**
+     * @var Environment|null
+     */
+    public $parentEnv;
+
+    /**
+     * @param string $type
+     */
+    public function __construct($type)
+    {
+        $this->type = $type;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ContentBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ContentBlock.php
new file mode 100644 (file)
index 0000000..8708498
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Compiler\Environment;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class ContentBlock extends Block
+{
+    /**
+     * @var array|null
+     */
+    public $child;
+
+    /**
+     * @var Environment|null
+     */
+    public $scope;
+
+    public function __construct()
+    {
+        $this->type = Type::T_INCLUDE;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/DirectiveBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/DirectiveBlock.php
new file mode 100644 (file)
index 0000000..b1d3d1a
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class DirectiveBlock extends Block
+{
+    /**
+     * @var string|array
+     */
+    public $name;
+
+    /**
+     * @var string|array|null
+     */
+    public $value;
+
+    public function __construct()
+    {
+        $this->type = Type::T_DIRECTIVE;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/EachBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/EachBlock.php
new file mode 100644 (file)
index 0000000..b328957
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class EachBlock extends Block
+{
+    /**
+     * @var string[]
+     */
+    public $vars = [];
+
+    /**
+     * @var array
+     */
+    public $list;
+
+    public function __construct()
+    {
+        $this->type = Type::T_EACH;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseBlock.php
new file mode 100644 (file)
index 0000000..6abb4d7
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class ElseBlock extends Block
+{
+    public function __construct()
+    {
+        $this->type = Type::T_ELSE;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseifBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ElseifBlock.php
new file mode 100644 (file)
index 0000000..4622bca
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class ElseifBlock extends Block
+{
+    /**
+     * @var array
+     */
+    public $cond;
+
+    public function __construct()
+    {
+        $this->type = Type::T_ELSEIF;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ForBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/ForBlock.php
new file mode 100644 (file)
index 0000000..a9cf673
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class ForBlock extends Block
+{
+    /**
+     * @var string
+     */
+    public $var;
+
+    /**
+     * @var array
+     */
+    public $start;
+
+    /**
+     * @var array
+     */
+    public $end;
+
+    /**
+     * @var bool
+     */
+    public $until;
+
+    public function __construct()
+    {
+        $this->type = Type::T_FOR;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/IfBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/IfBlock.php
new file mode 100644 (file)
index 0000000..9f21bf8
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class IfBlock extends Block
+{
+    /**
+     * @var array
+     */
+    public $cond;
+
+    /**
+     * @var array<ElseifBlock|ElseBlock>
+     */
+    public $cases = [];
+
+    public function __construct()
+    {
+        $this->type = Type::T_IF;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/MediaBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/MediaBlock.php
new file mode 100644 (file)
index 0000000..c49ee1b
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class MediaBlock extends Block
+{
+    /**
+     * @var string|array|null
+     */
+    public $value;
+
+    /**
+     * @var array|null
+     */
+    public $queryList;
+
+    public function __construct()
+    {
+        $this->type = Type::T_MEDIA;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/NestedPropertyBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/NestedPropertyBlock.php
new file mode 100644 (file)
index 0000000..1ea4a6c
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class NestedPropertyBlock extends Block
+{
+    /**
+     * @var bool
+     */
+    public $hasValue;
+
+    /**
+     * @var array
+     */
+    public $prefix;
+
+    public function __construct()
+    {
+        $this->type = Type::T_NESTED_PROPERTY;
+    }
+}
diff --git a/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/WhileBlock.php b/wcfsetup/install/files/lib/system/api/scssphp/scssphp/src/Block/WhileBlock.php
new file mode 100644 (file)
index 0000000..ac18d4e
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * SCSSPHP
+ *
+ * @copyright 2012-2020 Leaf Corcoran
+ *
+ * @license http://opensource.org/licenses/MIT MIT
+ *
+ * @link http://scssphp.github.io/scssphp
+ */
+
+namespace ScssPhp\ScssPhp\Block;
+
+use ScssPhp\ScssPhp\Block;
+use ScssPhp\ScssPhp\Type;
+
+/**
+ * @internal
+ */
+class WhileBlock extends Block
+{
+    /**
+     * @var array
+     */
+    public $cond;
+
+    public function __construct()
+    {
+        $this->type = Type::T_WHILE;
+    }
+}
index e836e3f4e4d617bc0b158c23b42ff9560907f8b6..2df39992bb754f95ffef0d94449c46795e84d257 100644 (file)
@@ -204,10 +204,10 @@ class Colors
     /**
      * Reverse conversion : from RGBA to a color name if possible
      *
-     * @param integer $r
-     * @param integer $g
-     * @param integer $b
-     * @param integer|float $a
+     * @param int       $r
+     * @param int       $g
+     * @param int       $b
+     * @param int|float $a
      *
      * @return string|null
      */
index d17d9f261ed0e13ea3a1d0b31da85da5de87a7c0..b6ef02727a81c7f9368e4a4b7aa3de0dd23ecdd8 100644 (file)
 namespace ScssPhp\ScssPhp;
 
 use ScssPhp\ScssPhp\Base\Range;
+use ScssPhp\ScssPhp\Block\AtRootBlock;
+use ScssPhp\ScssPhp\Block\CallableBlock;
+use ScssPhp\ScssPhp\Block\DirectiveBlock;
+use ScssPhp\ScssPhp\Block\EachBlock;
+use ScssPhp\ScssPhp\Block\ElseBlock;
+use ScssPhp\ScssPhp\Block\ElseifBlock;
+use ScssPhp\ScssPhp\Block\ForBlock;
+use ScssPhp\ScssPhp\Block\IfBlock;
+use ScssPhp\ScssPhp\Block\MediaBlock;
+use ScssPhp\ScssPhp\Block\NestedPropertyBlock;
+use ScssPhp\ScssPhp\Block\WhileBlock;
 use ScssPhp\ScssPhp\Compiler\CachedResult;
 use ScssPhp\ScssPhp\Compiler\Environment;
 use ScssPhp\ScssPhp\Exception\CompilerException;
@@ -644,7 +655,7 @@ class Compiler
      * @param array $target
      * @param array $origin
      *
-     * @return boolean
+     * @return bool
      */
     protected function isSelfExtend($target, $origin)
     {
@@ -853,10 +864,10 @@ class Compiler
     /**
      * Match extends
      *
-     * @param array   $selector
-     * @param array   $out
-     * @param integer $from
-     * @param boolean $initial
+     * @param array $selector
+     * @param array $out
+     * @param int   $from
+     * @param bool  $initial
      *
      * @return void
      */
@@ -989,7 +1000,7 @@ class Compiler
      * @param string $part
      * @param array  $matches
      *
-     * @return boolean
+     * @return bool
      */
     protected function isPseudoSelector($part, &$matches)
     {
@@ -1051,11 +1062,11 @@ class Compiler
     /**
      * Match extends single
      *
-     * @param array   $rawSingle
-     * @param array   $outOrigin
-     * @param boolean $initial
+     * @param array $rawSingle
+     * @param array $outOrigin
+     * @param bool  $initial
      *
-     * @return boolean
+     * @return bool
      */
     protected function matchExtendsSingle($rawSingle, &$outOrigin, $initial = true)
     {
@@ -1270,6 +1281,7 @@ class Compiler
      */
     protected function compileMedia(Block $media)
     {
+        assert($media instanceof MediaBlock);
         $this->pushEnv($media);
 
         $mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env));
@@ -1347,7 +1359,7 @@ class Compiler
     /**
      * Compile directive
      *
-     * @param \ScssPhp\ScssPhp\Block|array $directive
+     * @param DirectiveBlock|array                   $directive
      * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
      *
      * @return void
@@ -1413,6 +1425,7 @@ class Compiler
      */
     protected function compileAtRoot(Block $block)
     {
+        assert($block instanceof AtRootBlock);
         $env     = $this->pushEnv($block);
         $envs    = $this->compactEnv($env);
         list($with, $without) = $this->compileWith(isset($block->with) ? $block->with : null);
@@ -1461,7 +1474,7 @@ class Compiler
     }
 
     /**
-     * Filter at-root scope depending of with/without option
+     * Filter at-root scope depending on with/without option
      *
      * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope
      * @param array                                  $with
@@ -1561,7 +1574,7 @@ class Compiler
      * Find a selector by the depth node in the scope
      *
      * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope
-     * @param integer                                $depth
+     * @param int                                    $depth
      *
      * @return array
      */
@@ -1585,7 +1598,7 @@ class Compiler
     /**
      * Compile @at-root's with: inclusion / without: exclusion into 2 lists uses to filter scope/env later
      *
-     * @param array $withCondition
+     * @param array|null $withCondition
      *
      * @return array
      *
@@ -1674,7 +1687,7 @@ class Compiler
      * @param array                                                         $with
      * @param array                                                         $without
      *
-     * @return boolean
+     * @return bool
      */
     protected function isWith($block, $with, $without)
     {
@@ -1684,6 +1697,7 @@ class Compiler
             }
 
             if ($block->type === Type::T_DIRECTIVE) {
+                assert($block instanceof DirectiveBlock || $block instanceof OutputBlock);
                 if (isset($block->name)) {
                     return $this->testWithWithout($this->compileDirectiveName($block->name), $with, $without);
                 } elseif (isset($block->selectors) && preg_match(',@(\w+),ims', json_encode($block->selectors), $m)) {
@@ -1719,7 +1733,7 @@ class Compiler
      * @param array  $with
      * @param array  $without
      *
-     * @return boolean
+     * @return bool
      *   true if the block should be kept, false to reject
      */
     protected function testWithWithout($what, $with, $without)
@@ -1774,6 +1788,7 @@ class Compiler
      */
     protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out)
     {
+        assert($block instanceof NestedPropertyBlock);
         $prefix = $this->compileValue($block->prefix) . '-';
 
         $nested = $this->makeOutputBlock($block->type);
@@ -1792,6 +1807,7 @@ class Compiler
                     break;
 
                 case Type::T_NESTED_PROPERTY:
+                    assert($child[1] instanceof NestedPropertyBlock);
                     array_unshift($child[1]->prefix[2], $prefix);
                     break;
             }
@@ -1817,7 +1833,7 @@ class Compiler
 
         // wrap assign children in a block
         // except for @font-face
-        if ($block->type !== Type::T_DIRECTIVE || $this->compileDirectiveName($block->name) !== 'font-face') {
+        if (!$block instanceof DirectiveBlock || $this->compileDirectiveName($block->name) !== 'font-face') {
             // need wrapping?
             $needWrapping = false;
 
@@ -1906,8 +1922,8 @@ class Compiler
     /**
      * Compile the value of a comment that can have interpolation
      *
-     * @param array   $value
-     * @param boolean $pushEnv
+     * @param array $value
+     * @param bool  $pushEnv
      *
      * @return string
      */
@@ -2224,7 +2240,7 @@ class Compiler
      *
      * @param array $selector
      *
-     * @return boolean
+     * @return bool
      */
     protected function hasSelectorPlaceholder($selector)
     {
@@ -2641,9 +2657,9 @@ class Compiler
      *
      * @param array                                  $rawPath
      * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
-     * @param boolean                                $once
+     * @param bool                                   $once
      *
-     * @return boolean
+     * @return bool
      */
     protected function compileImport($rawPath, OutputBlock $out, $once = false)
     {
@@ -2778,7 +2794,7 @@ class Compiler
         // insert the directive as a comment
         $child = $this->makeOutputBlock(Type::T_COMMENT);
         $child->lines[]      = $line;
-        $child->sourceName   = $this->sourceNames[$this->sourceIndex];
+        $child->sourceName   = $this->sourceNames[$this->sourceIndex] ?: '(stdin)';
         $child->sourceLine   = $this->sourceLine;
         $child->sourceColumn = $this->sourceColumn;
 
@@ -3049,6 +3065,7 @@ class Compiler
             case Type::T_MIXIN:
             case Type::T_FUNCTION:
                 list(, $block) = $child;
+                assert($block instanceof CallableBlock);
                 // the block need to be able to go up to it's parent env to resolve vars
                 $block->parentEnv = $this->getStoreEnv();
                 $this->set(static::$namespaces[$block->type] . $block->name, $block, true);
@@ -3099,6 +3116,7 @@ EOL;
 
             case Type::T_IF:
                 list(, $if) = $child;
+                assert($if instanceof IfBlock);
 
                 if ($this->isTruthy($this->reduce($if->cond, true))) {
                     return $this->compileChildren($if->children, $out);
@@ -3106,8 +3124,8 @@ EOL;
 
                 foreach ($if->cases as $case) {
                     if (
-                        $case->type === Type::T_ELSE ||
-                        $case->type === Type::T_ELSEIF && $this->isTruthy($this->reduce($case->cond))
+                        $case instanceof ElseBlock ||
+                        $case instanceof ElseifBlock && $this->isTruthy($this->reduce($case->cond))
                     ) {
                         return $this->compileChildren($case->children, $out);
                     }
@@ -3116,6 +3134,7 @@ EOL;
 
             case Type::T_EACH:
                 list(, $each) = $child;
+                assert($each instanceof EachBlock);
 
                 $list = $this->coerceList($this->reduce($each->list), ',', true);
 
@@ -3150,6 +3169,7 @@ EOL;
 
             case Type::T_WHILE:
                 list(, $while) = $child;
+                assert($while instanceof WhileBlock);
 
                 while ($this->isTruthy($this->reduce($while->cond, true))) {
                     $ret = $this->compileChildren($while->children, $out);
@@ -3162,6 +3182,7 @@ EOL;
 
             case Type::T_FOR:
                 list(, $for) = $child;
+                assert($for instanceof ForBlock);
 
                 $startNumber = $this->assertNumber($this->reduce($for->start, true));
                 $endNumber = $this->assertNumber($this->reduce($for->end, true));
@@ -3222,6 +3243,8 @@ EOL;
                     throw $this->error("Undefined mixin $name");
                 }
 
+                assert($mixin instanceof CallableBlock);
+
                 $callingScope = $this->getStoreEnv();
 
                 // push scope, apply args
@@ -3394,7 +3417,7 @@ EOL;
      *
      * @param array|Number $value
      *
-     * @return boolean
+     * @return bool
      */
     public function isTruthy($value)
     {
@@ -3406,7 +3429,7 @@ EOL;
      *
      * @param string $value
      *
-     * @return boolean
+     * @return bool
      */
     protected function isImmediateRelationshipCombinator($value)
     {
@@ -3418,7 +3441,7 @@ EOL;
      *
      * @param array $value
      *
-     * @return boolean
+     * @return bool
      */
     protected function shouldEval($value)
     {
@@ -3441,7 +3464,7 @@ EOL;
      * Reduce value
      *
      * @param array|Number $value
-     * @param boolean $inExp
+     * @param bool         $inExp
      *
      * @return array|Number
      */
@@ -3946,6 +3969,10 @@ EOL;
                     unset($value['enclosing']);
                 }
 
+                if ($value[1] === '' && count($value[2]) > 1) {
+                    $value[1] = ' ';
+                }
+
                 return $value;
 
             case Type::T_STRING:
@@ -4061,8 +4088,8 @@ EOL;
      * Boolean and
      *
      * @param array|Number $left
-     * @param array|Number  $right
-     * @param boolean $shouldEval
+     * @param array|Number $right
+     * @param bool         $shouldEval
      *
      * @return array|Number|null
      */
@@ -4090,7 +4117,7 @@ EOL;
      *
      * @param array|Number $left
      * @param array|Number $right
-     * @param boolean $shouldEval
+     * @param bool         $shouldEval
      *
      * @return array|Number|null
      */
@@ -4516,8 +4543,7 @@ EOL;
                     // force double quote as string quote for the output in certain cases
                     if (
                         $value[1] === "'" &&
-                        (strpos($content, '"') === false or strpos($content, "'") !== false) &&
-                        strpbrk($content, '{}\\\'') !== false
+                        (strpos($content, '"') === false or strpos($content, "'") !== false)
                     ) {
                         $value[1] = '"';
                     } elseif (
@@ -4570,6 +4596,8 @@ EOL;
                     }
                 }
 
+                $separator = $delim === '/' ? ' /' : $delim;
+
                 $prefix_value = '';
 
                 if ($delim !== ' ') {
@@ -4608,7 +4636,7 @@ EOL;
                     $filtered[] = $compiled;
                 }
 
-                return $pre . substr(implode("$delim", $filtered), \strlen($prefix_value)) . $post;
+                return $pre . substr(implode($separator, $filtered), \strlen($prefix_value)) . $post;
 
             case Type::T_MAP:
                 $keys     = $value[1];
@@ -4880,10 +4908,10 @@ EOL;
     /**
      * Join selectors; looks for & to replace, or append parent before child
      *
-     * @param array   $parent
-     * @param array   $child
-     * @param boolean $stillHasSelf
-     * @param array   $selfParentSelectors
+     * @param array $parent
+     * @param array $child
+     * @param bool  $stillHasSelf
+     * @param array $selfParentSelectors
 
      * @return array
      */
@@ -4961,6 +4989,8 @@ EOL;
             return $this->multiplyMedia($env->parent, $childQueries);
         }
 
+        assert($env->block instanceof MediaBlock);
+
         $parentQueries = isset($env->block->queryList)
             ? $env->block->queryList
             : [[[Type::T_MEDIA_VALUE, $env->block->value]]];
@@ -5095,7 +5125,7 @@ EOL;
      *
      * @param string                                $name
      * @param mixed                                 $value
-     * @param boolean                               $shadow
+     * @param bool                                  $shadow
      * @param \ScssPhp\ScssPhp\Compiler\Environment $env
      * @param mixed                                 $valueUnreduced
      *
@@ -5201,9 +5231,9 @@ EOL;
      * @internal
      *
      * @param string                                $name
-     * @param boolean                               $shouldThrow
+     * @param bool                                  $shouldThrow
      * @param \ScssPhp\ScssPhp\Compiler\Environment $env
-     * @param boolean                               $unreduced
+     * @param bool                                  $unreduced
      *
      * @return mixed|null
      */
@@ -5270,7 +5300,7 @@ EOL;
      * @param string                                $name
      * @param \ScssPhp\ScssPhp\Compiler\Environment $env
      *
-     * @return boolean
+     * @return bool
      */
     protected function has($name, Environment $env = null)
     {
@@ -5460,7 +5490,7 @@ EOL;
      *
      * @api
      *
-     * @param integer $numberPrecision
+     * @param int $numberPrecision
      *
      * @return void
      *
@@ -5561,7 +5591,7 @@ EOL;
      *
      * @api
      *
-     * @param integer $sourceMap
+     * @param int $sourceMap
      *
      * @return void
      *
@@ -5963,7 +5993,7 @@ EOL;
      *
      * @api
      *
-     * @param boolean $ignoreErrors
+     * @param bool $ignoreErrors
      *
      * @return \ScssPhp\ScssPhp\Compiler
      *
@@ -6102,7 +6132,7 @@ EOL;
     /**
      * Beautify call stack for output
      *
-     * @param boolean  $all
+     * @param bool     $all
      * @param int|null $limit
      *
      * @return string
@@ -6162,8 +6192,8 @@ EOL;
     /**
      * Call SCSS @function
      *
-     * @param Object $func
-     * @param array  $argValues
+     * @param CallableBlock|null $func
+     * @param array              $argValues
      *
      * @return array|Number
      */
@@ -6737,9 +6767,8 @@ EOL;
      *
      * @param array[]    $argDef
      * @param array|null $argValues
-     * @param boolean $storeInEnv
-     * @param boolean $reduce
-     *   only used if $storeInEnv = false
+     * @param bool       $storeInEnv
+     * @param bool       $reduce     only used if $storeInEnv = false
      *
      * @return array<string, array|Number>
      *
@@ -6983,14 +7012,14 @@ EOL;
      *
      * @param array|Number $item
      * @param string       $delim
-     * @param boolean      $removeTrailingNull
+     * @param bool         $removeTrailingNull
      *
      * @return array
      */
     protected function coerceList($item, $delim = ',', $removeTrailingNull = false)
     {
         if ($item instanceof Number) {
-            return [Type::T_LIST, $delim, [$item]];
+            return [Type::T_LIST, '', [$item]];
         }
 
         if ($item[0] === Type::T_LIST) {
@@ -7013,15 +7042,15 @@ EOL;
 
                 $list[] = [
                     Type::T_LIST,
-                    '',
+                    ' ',
                     [$key, $value]
                 ];
             }
 
-            return [Type::T_LIST, ',', $list];
+            return [Type::T_LIST, $list ? ',' : '', $list];
         }
 
-        return [Type::T_LIST, $delim, [$item]];
+        return [Type::T_LIST, '', [$item]];
     }
 
     /**
@@ -7162,10 +7191,10 @@ EOL;
     }
 
     /**
-     * @param integer|Number $value
-     * @param boolean        $isAlpha
+     * @param int|Number $value
+     * @param bool       $isAlpha
      *
-     * @return integer|mixed
+     * @return int|mixed
      */
     protected function compileRGBAValue($value, $isAlpha = false)
     {
@@ -7177,12 +7206,12 @@ EOL;
     }
 
     /**
-     * @param mixed         $value
-     * @param integer|float $min
-     * @param integer|float $max
-     * @param boolean       $isInt
+     * @param mixed     $value
+     * @param int|float $min
+     * @param int|float $max
+     * @param bool      $isInt
      *
-     * @return integer|mixed
+     * @return int|mixed
      */
     protected function compileColorPartValue($value, $min, $max, $isInt = true)
     {
@@ -7276,7 +7305,7 @@ EOL;
      *
      * @param array|Number $value
      *
-     * @return integer|float
+     * @return int|float
      *
      * @deprecated
      */
@@ -7414,7 +7443,7 @@ EOL;
      * @param array|Number $value
      * @param string|null  $varName
      *
-     * @return integer
+     * @return int
      *
      * @throws SassScriptException
      */
@@ -7478,9 +7507,9 @@ EOL;
      *
      * @internal
      *
-     * @param integer $red
-     * @param integer $green
-     * @param integer $blue
+     * @param int $red
+     * @param int $green
+     * @param int $blue
      *
      * @return array
      */
@@ -7584,9 +7613,9 @@ EOL;
      *
      * @api
      *
-     * @param integer $hue        H from 0 to 360
-     * @param integer $whiteness  W from 0 to 100
-     * @param integer $blackness  B from 0 to 100
+     * @param int $hue        H from 0 to 360
+     * @param int $whiteness  W from 0 to 100
+     * @param int $blackness  B from 0 to 100
      *
      * @return array
      */
@@ -7616,9 +7645,9 @@ EOL;
      *
      * @api
      *
-     * @param integer $red
-     * @param integer $green
-     * @param integer $blue
+     * @param int $red
+     * @param int $green
+     * @param int $blue
      *
      * @return array
      */
@@ -7746,7 +7775,6 @@ EOL;
 
         $values = [];
 
-
         foreach ($list[2] as $item) {
             $values[] = $this->normalizeValue($item);
         }
@@ -8375,6 +8403,13 @@ EOL;
     }
     */
 
+    /**
+     * @param array     $color
+     * @param int       $idx
+     * @param int|float $amount
+     *
+     * @return array
+     */
     protected function adjustHsl($color, $idx, $amount)
     {
         $hsl = $this->toHSL($color[1], $color[2], $color[3]);
@@ -8664,7 +8699,7 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
 
         $list = $this->coerceList($args[0]);
 
-        if (\count($list[2]) <= 1 && empty($list['enclosing'])) {
+        if ($list[1] === '' && \count($list[2]) <= 1 && empty($list['enclosing'])) {
             return [Type::T_KEYWORD, 'space'];
         }
 
@@ -8672,6 +8707,10 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
             return [Type::T_KEYWORD, 'comma'];
         }
 
+        if ($list[1] === '/') {
+            return [Type::T_KEYWORD, 'slash'];
+        }
+
         return [Type::T_KEYWORD, 'space'];
     }
 
@@ -9038,9 +9077,13 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
      *
      * @return string
      * @throws CompilerException
+     *
+     * @deprecated
      */
     protected function listSeparatorForJoin($list1, $sep)
     {
+        @trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED);
+
         if (! isset($sep)) {
             return $list1[1];
         }
@@ -9057,14 +9100,40 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
         }
     }
 
-    protected static $libJoin = ['list1', 'list2', 'separator:null', 'bracketed:auto'];
+    protected static $libJoin = ['list1', 'list2', 'separator:auto', 'bracketed:auto'];
     protected function libJoin($args)
     {
         list($list1, $list2, $sep, $bracketed) = $args;
 
         $list1 = $this->coerceList($list1, ' ', true);
         $list2 = $this->coerceList($list2, ' ', true);
-        $sep   = $this->listSeparatorForJoin($list1, $sep);
+
+        switch ($this->compileStringContent($this->assertString($sep, 'separator'))) {
+            case 'comma':
+                $separator = ',';
+                break;
+
+            case 'space':
+                $separator = ' ';
+                break;
+
+            case 'slash':
+                $separator = '/';
+                break;
+
+            case 'auto':
+                if ($list1[1] !== '' || count($list1[2]) > 1 || !empty($list1['enclosing']) && $list1['enclosing'] !== 'parent') {
+                    $separator = $list1[1] ?: ' ';
+                } elseif ($list2[1] !== '' || count($list2[2]) > 1 || !empty($list2['enclosing']) && $list2['enclosing'] !== 'parent') {
+                    $separator = $list2[1] ?: ' ';
+                } else {
+                    $separator = ' ';
+                }
+                break;
+
+            default:
+                throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator');
+        }
 
         if ($bracketed === static::$true) {
             $bracketed = true;
@@ -9091,11 +9160,7 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
             }
         }
 
-        $res = [Type::T_LIST, $sep, array_merge($list1[2], $list2[2])];
-
-        if (isset($list1['enclosing'])) {
-            $res['enlcosing'] = $list1['enclosing'];
-        }
+        $res = [Type::T_LIST, $separator, array_merge($list1[2], $list2[2])];
 
         if ($bracketed) {
             $res['enclosing'] = 'bracket';
@@ -9104,14 +9169,35 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
         return $res;
     }
 
-    protected static $libAppend = ['list', 'val', 'separator:null'];
+    protected static $libAppend = ['list', 'val', 'separator:auto'];
     protected function libAppend($args)
     {
         list($list1, $value, $sep) = $args;
 
         $list1 = $this->coerceList($list1, ' ', true);
-        $sep   = $this->listSeparatorForJoin($list1, $sep);
-        $res   = [Type::T_LIST, $sep, array_merge($list1[2], [$value])];
+
+        switch ($this->compileStringContent($this->assertString($sep, 'separator'))) {
+            case 'comma':
+                $separator = ',';
+                break;
+
+            case 'space':
+                $separator = ' ';
+                break;
+
+            case 'slash':
+                $separator = '/';
+                break;
+
+            case 'auto':
+                $separator = $list1[1] === '' && \count($list1[2]) <= 1 && (empty($list1['enclosing']) || $list1['enclosing'] === 'parent') ? ' ' : $list1[1];
+                break;
+
+            default:
+                throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator');
+        }
+
+        $res = [Type::T_LIST, $separator, array_merge($list1[2], [$value])];
 
         if (isset($list1['enclosing'])) {
             $res['enclosing'] = $list1['enclosing'];
@@ -9134,7 +9220,7 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
         $result = [Type::T_LIST, ',', $lists];
         if (! \is_null($firstList)) {
             foreach ($firstList[2] as $key => $item) {
-                $list = [Type::T_LIST, '', [$item]];
+                $list = [Type::T_LIST, ' ', [$item]];
 
                 foreach ($argLists as $arg) {
                     if (isset($arg[2][$key])) {
@@ -9514,6 +9600,8 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
             ) {
                 $value['enclosing'] = 'forced_' . $value['enclosing'];
                 $force_enclosing_display = true;
+            } elseif (! \count($value[2])) {
+                $value['enclosing'] = 'forced_parent';
             }
 
             foreach ($value[2] as $k => $listelement) {
@@ -9637,7 +9725,7 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
      * @param array $super
      * @param array $sub
      *
-     * @return boolean
+     * @return bool
      */
     protected function isSuperSelector($super, $sub)
     {
@@ -9718,7 +9806,7 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
      * @param array $superParts
      * @param array $subParts
      *
-     * @return boolean
+     * @return bool
      */
     protected function isSuperPart($superParts, $subParts)
     {
@@ -9785,21 +9873,18 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
             // do the trick, happening $lastSelector to $previousSelector
             $appended = [];
 
-            foreach ($lastSelectors as $lastSelector) {
-                $previous = $previousSelectors;
-
-                foreach ($lastSelector as $lastSelectorParts) {
-                    foreach ($lastSelectorParts as $lastSelectorPart) {
-                        foreach ($previous as $i => $previousSelector) {
-                            foreach ($previousSelector as $j => $previousSelectorParts) {
-                                $previous[$i][$j][] = $lastSelectorPart;
+            foreach ($previousSelectors as $previousSelector) {
+                foreach ($lastSelectors as $lastSelector) {
+                    $previous = $previousSelector;
+                    foreach ($previousSelector as $j => $previousSelectorParts) {
+                        foreach ($lastSelector as $lastSelectorParts) {
+                            foreach ($lastSelectorParts as $lastSelectorPart) {
+                                $previous[$j][] = $lastSelectorPart;
                             }
                         }
                     }
-                }
 
-                foreach ($previous as $ps) {
-                    $appended[] = $ps;
+                    $appended[] = $previous;
                 }
             }
 
@@ -9855,10 +9940,10 @@ will be an error in future versions of Sass.\n         on line $line of $fname";
      * Extend/replace in selectors
      * used by selector-extend and selector-replace that use the same logic
      *
-     * @param array   $selectors
-     * @param array   $extendee
-     * @param array   $extender
-     * @param boolean $replace
+     * @param array $selectors
+     * @param array $extendee
+     * @param array $extender
+     * @param bool  $replace
      *
      * @return array
      */
index 306b15a67351f54e3a84ba425d40d6d6ba78c077..b205a077f2204aee21abd2d487461c7ace5584fc 100644 (file)
@@ -31,6 +31,26 @@ class Environment
      */
     public $parent;
 
+    /**
+     * @var Environment|null
+     */
+    public $declarationScopeParent;
+
+    /**
+     * @var Environment|null
+     */
+    public $parentStore;
+
+    /**
+     * @var array|null
+     */
+    public $selectors;
+
+    /**
+     * @var string|null
+     */
+    public $marker;
+
     /**
      * @var array
      */
@@ -42,7 +62,7 @@ class Environment
     public $storeUnreduced;
 
     /**
-     * @var integer
+     * @var int
      */
     public $depth;
 }
index cc42ae80568dfc178d307d8dbaa82c41d99caf60..c88ddba9db7809662744559f45401b23d734f4d9 100644 (file)
@@ -25,7 +25,7 @@ use ScssPhp\ScssPhp\SourceMap\SourceMapGenerator;
 abstract class Formatter
 {
     /**
-     * @var integer
+     * @var int
      */
     public $indentLevel;
 
@@ -60,7 +60,7 @@ abstract class Formatter
     public $assignSeparator;
 
     /**
-     * @var boolean
+     * @var bool
      */
     public $keepSemicolons;
 
@@ -70,12 +70,12 @@ abstract class Formatter
     protected $currentBlock;
 
     /**
-     * @var integer
+     * @var int
      */
     protected $currentLine;
 
     /**
-     * @var integer
+     * @var int
      */
     protected $currentColumn;
 
@@ -239,7 +239,7 @@ abstract class Formatter
      *
      * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block
      *
-     * @return boolean
+     * @return bool
      */
     protected function testEmptyChildren($block)
     {
index de13c188add93fa77b98f2a2c554d0f7e25d272d..58ebe3f11345f9a59d07ba279cfc1fd7a0312af4 100644 (file)
@@ -50,8 +50,6 @@ class Compressed extends Formatter
         foreach ($block->lines as $index => $line) {
             if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') {
                 unset($block->lines[$index]);
-            } elseif (substr($line, 0, 3) === '/*!') {
-                $block->lines[$index] = '/*' . substr($line, 3);
             }
         }
 
index 9e7295684989b6b07e1427041f75c6df6c728e10..c11ea8adfdeff4d8e5319276468830b0319c7203 100644 (file)
@@ -27,7 +27,7 @@ use ScssPhp\ScssPhp\Type;
 class Nested extends Formatter
 {
     /**
-     * @var integer
+     * @var int
      */
     private $depth;
 
@@ -221,7 +221,7 @@ class Nested extends Formatter
      *
      * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block
      *
-     * @return boolean
+     * @return bool
      */
     private function hasFlatChild($block)
     {
index 88deb2d377a43c9beeb76c98a765c46c37bcadac..5cc91a080ab276828db1cd7a64fd52f4832edad2 100644 (file)
@@ -27,7 +27,7 @@ class OutputBlock
     public $type;
 
     /**
-     * @var integer
+     * @var int
      */
     public $depth;
 
@@ -57,12 +57,12 @@ class OutputBlock
     public $sourceName;
 
     /**
-     * @var integer|null
+     * @var int|null
      */
     public $sourceLine;
 
     /**
-     * @var integer|null
+     * @var int|null
      */
     public $sourceColumn;
 }
index 53019375af6d59696c88d0ee2dfb02f6667b8e5d..fcaf8a95f3f396a16f16e4d6156e7d54a9f21a5b 100644 (file)
@@ -27,7 +27,7 @@ abstract class Node
     public $type;
 
     /**
-     * @var integer
+     * @var int
      */
     public $sourceIndex;
 
index b326906b5c1f5ec95ac64e5e3254b31a04dfb4de..ca9b5b652d4c6a1c1d63e829bdc2faa00a5e36c1 100644 (file)
@@ -38,7 +38,7 @@ class Number extends Node implements \ArrayAccess
     const PRECISION = 10;
 
     /**
-     * @var integer
+     * @var int
      * @deprecated use {Number::PRECISION} instead to read the precision. Configuring it is not supported anymore.
      */
     public static $precision = self::PRECISION;
@@ -81,7 +81,7 @@ class Number extends Node implements \ArrayAccess
     ];
 
     /**
-     * @var integer|float
+     * @var int|float
      */
     private $dimension;
 
@@ -100,7 +100,7 @@ class Number extends Node implements \ArrayAccess
     /**
      * Initialize number
      *
-     * @param integer|float   $dimension
+     * @param int|float       $dimension
      * @param string[]|string $numeratorUnits
      * @param string[]        $denominatorUnits
      *
@@ -147,7 +147,7 @@ class Number extends Node implements \ArrayAccess
     }
 
     /**
-     * {@inheritdoc}
+     * @return bool
      */
     #[\ReturnTypeWillChange]
     public function offsetExists($offset)
@@ -173,7 +173,7 @@ class Number extends Node implements \ArrayAccess
     }
 
     /**
-     * {@inheritdoc}
+     * @return mixed
      */
     #[\ReturnTypeWillChange]
     public function offsetGet($offset)
@@ -200,7 +200,7 @@ class Number extends Node implements \ArrayAccess
     }
 
     /**
-     * {@inheritdoc}
+     * @return void
      */
     #[\ReturnTypeWillChange]
     public function offsetSet($offset, $value)
@@ -209,7 +209,7 @@ class Number extends Node implements \ArrayAccess
     }
 
     /**
-     * {@inheritdoc}
+     * @return void
      */
     #[\ReturnTypeWillChange]
     public function offsetUnset($offset)
@@ -220,7 +220,7 @@ class Number extends Node implements \ArrayAccess
     /**
      * Returns true if the number is unitless
      *
-     * @return boolean
+     * @return bool
      */
     public function unitless()
     {
index 3ba2f67f9d5e20f4f9312472f07cbbd39a40e2ba..36e7ac036151cfa6343f73eb9eb88f8a45459667 100644 (file)
 
 namespace ScssPhp\ScssPhp;
 
+use ScssPhp\ScssPhp\Block\AtRootBlock;
+use ScssPhp\ScssPhp\Block\CallableBlock;
+use ScssPhp\ScssPhp\Block\ContentBlock;
+use ScssPhp\ScssPhp\Block\DirectiveBlock;
+use ScssPhp\ScssPhp\Block\EachBlock;
+use ScssPhp\ScssPhp\Block\ElseBlock;
+use ScssPhp\ScssPhp\Block\ElseifBlock;
+use ScssPhp\ScssPhp\Block\ForBlock;
+use ScssPhp\ScssPhp\Block\IfBlock;
+use ScssPhp\ScssPhp\Block\MediaBlock;
+use ScssPhp\ScssPhp\Block\NestedPropertyBlock;
+use ScssPhp\ScssPhp\Block\WhileBlock;
 use ScssPhp\ScssPhp\Exception\ParserException;
 use ScssPhp\ScssPhp\Logger\LoggerInterface;
 use ScssPhp\ScssPhp\Logger\QuietLogger;
@@ -125,7 +137,7 @@ class Parser
      * @api
      *
      * @param string|null          $sourceName
-     * @param integer              $sourceIndex
+     * @param int                  $sourceIndex
      * @param string|null          $encoding
      * @param Cache|null           $cache
      * @param bool                 $cssOnly
@@ -305,7 +317,7 @@ class Parser
      * @param string       $buffer
      * @param string|array $out
      *
-     * @return boolean
+     * @return bool
      */
     public function parseValue($buffer, &$out)
     {
@@ -334,7 +346,7 @@ class Parser
      * @param string|array $out
      * @param bool         $shouldValidate
      *
-     * @return boolean
+     * @return bool
      */
     public function parseSelector($buffer, &$out, $shouldValidate = true)
     {
@@ -371,7 +383,7 @@ class Parser
      * @param string       $buffer
      * @param string|array $out
      *
-     * @return boolean
+     * @return bool
      */
     public function parseMediaQueryList($buffer, &$out)
     {
@@ -428,7 +440,7 @@ class Parser
      * position into $s. Then if a chain fails, use $this->seek($s) to
      * go back where we started.
      *
-     * @return boolean
+     * @return bool
      */
     protected function parseChunk()
     {
@@ -447,7 +459,8 @@ class Parser
             ) {
                 ! $this->cssOnly || $this->assertPlainCssValid(false, $s);
 
-                $atRoot = $this->pushSpecialBlock(Type::T_AT_ROOT, $s);
+                $atRoot = new AtRootBlock();
+                $this->registerPushedBlock($atRoot, $s);
                 $atRoot->selector = $selector;
                 $atRoot->with     = $with;
 
@@ -461,7 +474,8 @@ class Parser
                 $this->mediaQueryList($mediaQueryList) &&
                 $this->matchChar('{', false)
             ) {
-                $media = $this->pushSpecialBlock(Type::T_MEDIA, $s);
+                $media = new MediaBlock();
+                $this->registerPushedBlock($media, $s);
                 $media->queryList = $mediaQueryList[2];
 
                 return true;
@@ -477,7 +491,8 @@ class Parser
             ) {
                 ! $this->cssOnly || $this->assertPlainCssValid(false, $s);
 
-                $mixin = $this->pushSpecialBlock(Type::T_MIXIN, $s);
+                $mixin = new CallableBlock(Type::T_MIXIN);
+                $this->registerPushedBlock($mixin, $s);
                 $mixin->name = $mixinName;
                 $mixin->args = $args;
 
@@ -509,7 +524,8 @@ class Parser
                 ];
 
                 if (! empty($hasBlock)) {
-                    $include = $this->pushSpecialBlock(Type::T_INCLUDE, $s);
+                    $include = new ContentBlock();
+                    $this->registerPushedBlock($include, $s);
                     $include->child = $child;
                 } else {
                     $this->append($child, $s);
@@ -599,7 +615,8 @@ class Parser
             ) {
                 ! $this->cssOnly || $this->assertPlainCssValid(false, $s);
 
-                $func = $this->pushSpecialBlock(Type::T_FUNCTION, $s);
+                $func = new CallableBlock(Type::T_FUNCTION);
+                $this->registerPushedBlock($func, $s);
                 $func->name = $fnName;
                 $func->args = $args;
 
@@ -631,7 +648,8 @@ class Parser
             ) {
                 ! $this->cssOnly || $this->assertPlainCssValid(false, $s);
 
-                $each = $this->pushSpecialBlock(Type::T_EACH, $s);
+                $each = new EachBlock();
+                $this->registerPushedBlock($each, $s);
 
                 foreach ($varNames[2] as $varName) {
                     $each->vars[] = $varName[1];
@@ -660,7 +678,8 @@ class Parser
                     $cond = reset($cond[2]);
                 }
 
-                $while = $this->pushSpecialBlock(Type::T_WHILE, $s);
+                $while = new WhileBlock();
+                $this->registerPushedBlock($while, $s);
                 $while->cond = $cond;
 
                 return true;
@@ -680,7 +699,8 @@ class Parser
             ) {
                 ! $this->cssOnly || $this->assertPlainCssValid(false, $s);
 
-                $for = $this->pushSpecialBlock(Type::T_FOR, $s);
+                $for = new ForBlock();
+                $this->registerPushedBlock($for, $s);
                 $for->var   = $varName[1];
                 $for->start = $start;
                 $for->end   = $end;
@@ -697,7 +717,8 @@ class Parser
             ) {
                 ! $this->cssOnly || $this->assertPlainCssValid(false, $s);
 
-                $if = $this->pushSpecialBlock(Type::T_IF, $s);
+                $if = new IfBlock();
+                $this->registerPushedBlock($if, $s);
 
                 while (
                     $cond[0] === Type::T_LIST &&
@@ -776,20 +797,21 @@ class Parser
 
             if (isset($last) && $last[0] === Type::T_IF) {
                 list(, $if) = $last;
+                assert($if instanceof IfBlock);
 
                 if ($this->literal('@else', 5)) {
                     if ($this->matchChar('{', false)) {
-                        $else = $this->pushSpecialBlock(Type::T_ELSE, $s);
+                        $else = new ElseBlock();
                     } elseif (
                         $this->literal('if', 2) &&
                         $this->functionCallArgumentsList($cond, false, '{', false)
                     ) {
-                        $else = $this->pushSpecialBlock(Type::T_ELSEIF, $s);
+                        $else = new ElseifBlock();
                         $else->cond = $cond;
                     }
 
                     if (isset($else)) {
-                        $else->dontAppend = true;
+                        $this->registerPushedBlock($else, $s);
                         $if->cases[] = $else;
 
                         return true;
@@ -827,7 +849,8 @@ class Parser
                 ($t1 = $this->supportsQuery($supportQuery)) &&
                 ($t2 = $this->matchChar('{', false))
             ) {
-                $directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s);
+                $directive = new DirectiveBlock();
+                $this->registerPushedBlock($directive, $s);
                 $directive->name  = 'supports';
                 $directive->value = $supportQuery;
 
@@ -848,11 +871,12 @@ class Parser
                     $dirName = [Type::T_STRING, '', $dirName];
                 }
                 if ($dirName === 'media') {
-                    $directive = $this->pushSpecialBlock(Type::T_MEDIA, $s);
+                    $directive = new MediaBlock();
                 } else {
-                    $directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s);
+                    $directive = new DirectiveBlock();
                     $directive->name = $dirName;
                 }
+                $this->registerPushedBlock($directive, $s);
 
                 if (isset($dirValue)) {
                     ! $this->cssOnly || ($dirValue = $this->assertPlainCssValid($dirValue));
@@ -1028,7 +1052,8 @@ class Parser
             if ($this->matchChar('{', false)) {
                 ! $this->cssOnly || $this->assertPlainCssValid(false);
 
-                $propBlock = $this->pushSpecialBlock(Type::T_NESTED_PROPERTY, $s);
+                $propBlock = new NestedPropertyBlock();
+                $this->registerPushedBlock($propBlock, $s);
                 $propBlock->prefix = $name;
                 $propBlock->hasValue = $foundSomething;
 
@@ -1054,12 +1079,13 @@ class Parser
                 }
             }
 
-            if (isset($block->type) && $block->type === Type::T_INCLUDE) {
+            if ($block instanceof ContentBlock) {
                 $include = $block->child;
+                assert(\is_array($include));
                 unset($block->child);
                 $include[3] = $block;
                 $this->append($include, $s);
-            } elseif (empty($block->dontAppend)) {
+            } elseif (!$block instanceof ElseBlock && !$block instanceof ElseifBlock) {
                 $type = isset($block->type) ? $block->type : Type::T_BLOCK;
                 $this->append([$type, $block], $s);
             }
@@ -1088,20 +1114,34 @@ class Parser
      * Push block onto parse tree
      *
      * @param array|null $selectors
-     * @param integer $pos
+     * @param int        $pos
      *
      * @return Block
      */
     protected function pushBlock($selectors, $pos = 0)
+    {
+        $b = new Block();
+        $b->selectors = $selectors;
+
+        $this->registerPushedBlock($b, $pos);
+
+        return $b;
+    }
+
+    /**
+     * @param Block $b
+     * @param int   $pos
+     *
+     * @return void
+     */
+    private function registerPushedBlock(Block $b, $pos)
     {
         list($line, $column) = $this->getSourcePosition($pos);
 
-        $b = new Block();
         $b->sourceName   = $this->sourceName;
         $b->sourceLine   = $line;
         $b->sourceColumn = $column;
         $b->sourceIndex  = $this->sourceIndex;
-        $b->selectors    = $selectors;
         $b->comments     = [];
         $b->parent       = $this->env;
 
@@ -1126,15 +1166,15 @@ class Parser
                 $this->append(null);
             }
         }
-
-        return $b;
     }
 
     /**
      * Push special (named) block onto parse tree
      *
+     * @deprecated
+     *
      * @param string  $type
-     * @param integer $pos
+     * @param int     $pos
      *
      * @return Block
      */
@@ -1183,11 +1223,11 @@ class Parser
     /**
      * Peek input stream
      *
-     * @param string  $regex
-     * @param array   $out
-     * @param integer $from
+     * @param string $regex
+     * @param array  $out
+     * @param int    $from
      *
-     * @return integer
+     * @return int
      */
     protected function peek($regex, &$out, $from = null)
     {
@@ -1204,7 +1244,7 @@ class Parser
     /**
      * Seek to position in input stream (or return current position in input stream)
      *
-     * @param integer $where
+     * @param int $where
      */
     protected function seek($where)
     {
@@ -1215,7 +1255,8 @@ class Parser
      * Assert a parsed part is plain CSS Valid
      *
      * @param array|false $parsed
-     * @param int $startPos
+     * @param int         $startPos
+     *
      * @throws ParserException
      */
     protected function assertPlainCssValid($parsed, $startPos = null)
@@ -1243,7 +1284,10 @@ class Parser
 
     /**
      * Check a parsed element is plain CSS Valid
+     *
      * @param array $parsed
+     * @param bool  $allowExpression
+     *
      * @return bool|array
      */
     protected function isPlainCssValidElement($parsed, $allowExpression = false)
@@ -1423,7 +1467,7 @@ class Parser
      * @param array  $m     Matches (passed by reference)
      * @param string $delim Delimiter
      *
-     * @return boolean True if match; false otherwise
+     * @return bool True if match; false otherwise
      */
     protected function matchString(&$m, $delim)
     {
@@ -1459,11 +1503,11 @@ class Parser
     /**
      * Try to match something on head of buffer
      *
-     * @param string  $regex
-     * @param array   $out
-     * @param boolean $eatWhitespace
+     * @param string $regex
+     * @param array  $out
+     * @param bool   $eatWhitespace
      *
-     * @return boolean
+     * @return bool
      */
     protected function match($regex, &$out, $eatWhitespace = null)
     {
@@ -1489,10 +1533,10 @@ class Parser
     /**
      * Match a single string
      *
-     * @param string  $char
-     * @param boolean $eatWhitespace
+     * @param string $char
+     * @param bool   $eatWhitespace
      *
-     * @return boolean
+     * @return bool
      */
     protected function matchChar($char, $eatWhitespace = null)
     {
@@ -1516,11 +1560,11 @@ class Parser
     /**
      * Match literal string
      *
-     * @param string  $what
-     * @param integer $len
-     * @param boolean $eatWhitespace
+     * @param string $what
+     * @param int    $len
+     * @param bool   $eatWhitespace
      *
-     * @return boolean
+     * @return bool
      */
     protected function literal($what, $len, $eatWhitespace = null)
     {
@@ -1544,7 +1588,7 @@ class Parser
     /**
      * Match some whitespace
      *
-     * @return boolean
+     * @return bool
      */
     protected function whitespace()
     {
@@ -1643,7 +1687,7 @@ class Parser
      * Append statement to current block
      *
      * @param array|null $statement
-     * @param integer $pos
+     * @param int        $pos
      */
     protected function append($statement, $pos = null)
     {
@@ -1688,7 +1732,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function mediaQueryList(&$out)
     {
@@ -1700,7 +1744,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function mediaQuery(&$out)
     {
@@ -1754,7 +1798,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function supportsQuery(&$out)
     {
@@ -1887,7 +1931,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function mediaExpression(&$out)
     {
@@ -1920,7 +1964,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function argValues(&$out)
     {
@@ -1945,7 +1989,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function argValue(&$out)
     {
@@ -2025,10 +2069,10 @@ class Parser
     /**
      * Parse directive value list that considers $vars as keyword
      *
-     * @param array          $out
-     * @param boolean|string $endChar
+     * @param array       $out
+     * @param bool|string $endChar
      *
-     * @return boolean
+     * @return bool
      */
     protected function directiveValue(&$out, $endChar = false)
     {
@@ -2089,7 +2133,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function valueList(&$out)
     {
@@ -2105,10 +2149,11 @@ class Parser
      * Parse a function call, where externals () are part of the call
      * and not of the value list
      *
-     * @param $out
-     * @param bool $mandatoryEnclos
+     * @param array       $out
+     * @param bool        $mandatoryEnclos
      * @param null|string $charAfter
-     * @param null|bool $eatWhiteSp
+     * @param null|bool   $eatWhiteSp
+     *
      * @return bool
      */
     protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $charAfter = null, $eatWhiteSp = null)
@@ -2145,7 +2190,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function spaceList(&$out)
     {
@@ -2155,12 +2200,12 @@ class Parser
     /**
      * Parse generic list
      *
-     * @param array   $out
-     * @param string  $parseItem The name of the method used to parse items
-     * @param string  $delim
-     * @param boolean $flatten
+     * @param array  $out
+     * @param string $parseItem The name of the method used to parse items
+     * @param string $delim
+     * @param bool   $flatten
      *
-     * @return boolean
+     * @return bool
      */
     protected function genericList(&$out, $parseItem, $delim = '', $flatten = true)
     {
@@ -2256,11 +2301,11 @@ class Parser
     /**
      * Parse expression
      *
-     * @param array   $out
-     * @param boolean $listOnly
-     * @param boolean $lookForExp
+     * @param array $out
+     * @param bool  $listOnly
+     * @param bool  $lookForExp
      *
-     * @return boolean
+     * @return bool
      */
     protected function expression(&$out, $listOnly = false, $lookForExp = true)
     {
@@ -2322,11 +2367,11 @@ class Parser
      * Parse expression specifically checking for lists in parenthesis or brackets
      *
      * @param array   $out
-     * @param integer $s
+     * @param int     $s
      * @param string  $closingParen
      * @param array   $allowedTypes
      *
-     * @return boolean
+     * @return bool
      */
     protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP])
     {
@@ -2381,8 +2426,8 @@ class Parser
     /**
      * Parse left-hand side of subexpression
      *
-     * @param array   $lhs
-     * @param integer $minP
+     * @param array $lhs
+     * @param int   $minP
      *
      * @return array
      */
@@ -2437,7 +2482,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function value(&$out)
     {
@@ -2645,7 +2690,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function parenValue(&$out)
     {
@@ -2684,7 +2729,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function progid(&$out)
     {
@@ -2717,7 +2762,7 @@ class Parser
      * @param string $name
      * @param array  $func
      *
-     * @return boolean
+     * @return bool
      */
     protected function func($name, &$func)
     {
@@ -2771,7 +2816,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function argumentList(&$out)
     {
@@ -2816,7 +2861,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function argumentDef(&$out)
     {
@@ -2878,7 +2923,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function map(&$out)
     {
@@ -2920,7 +2965,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function color(&$out)
     {
@@ -2946,7 +2991,7 @@ class Parser
      *
      * @param array $unit
      *
-     * @return boolean
+     * @return bool
      */
     protected function unit(&$unit)
     {
@@ -2971,8 +3016,9 @@ class Parser
      * Parse string
      *
      * @param array $out
+     * @param bool  $keepDelimWithInterpolation
      *
-     * @return boolean
+     * @return bool
      */
     protected function string(&$out, $keepDelimWithInterpolation = false)
     {
@@ -3053,7 +3099,8 @@ class Parser
 
     /**
      * @param string $out
-     * @param bool $inKeywords
+     * @param bool   $inKeywords
+     *
      * @return bool
      */
     protected function matchEscapeCharacter(&$out, $inKeywords = false)
@@ -3103,10 +3150,10 @@ class Parser
     /**
      * Parse keyword or interpolation
      *
-     * @param array   $out
-     * @param boolean $restricted
+     * @param array $out
+     * @param bool  $restricted
      *
-     * @return boolean
+     * @return bool
      */
     protected function mixedKeyword(&$out, $restricted = false)
     {
@@ -3147,14 +3194,14 @@ class Parser
     /**
      * Parse an unbounded string stopped by $end
      *
-     * @param string  $end
-     * @param array   $out
-     * @param string  $nestOpen
-     * @param string  $nestClose
-     * @param boolean $rtrim
+     * @param string $end
+     * @param array  $out
+     * @param string $nestOpen
+     * @param string $nestClose
+     * @param bool   $rtrim
      * @param string $disallow
      *
-     * @return boolean
+     * @return bool
      */
     protected function openString($end, &$out, $nestOpen = null, $nestClose = null, $rtrim = true, $disallow = null)
     {
@@ -3230,9 +3277,9 @@ class Parser
      * Parser interpolation
      *
      * @param string|array $out
-     * @param boolean      $lookWhite save information about whitespace before and after
+     * @param bool         $lookWhite save information about whitespace before and after
      *
-     * @return boolean
+     * @return bool
      */
     protected function interpolation(&$out, $lookWhite = true)
     {
@@ -3287,7 +3334,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function propertyName(&$out)
     {
@@ -3342,7 +3389,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function customProperty(&$out)
     {
@@ -3400,9 +3447,9 @@ class Parser
      * Parse comma separated selector list
      *
      * @param array $out
-     * @param string|boolean $subSelector
+     * @param string|bool $subSelector
      *
-     * @return boolean
+     * @return bool
      */
     protected function selectors(&$out, $subSelector = false)
     {
@@ -3436,9 +3483,9 @@ class Parser
      * Parse whitespace separated selector list
      *
      * @param array          $out
-     * @param string|boolean $subSelector
+     * @param string|bool $subSelector
      *
-     * @return boolean
+     * @return bool
      */
     protected function selector(&$out, $subSelector = false)
     {
@@ -3494,7 +3541,8 @@ class Parser
      * - but this require a better formal selector representation instead of the array we have now
      *
      * @param string $out
-     * @param bool $keepEscapedNumber
+     * @param bool   $keepEscapedNumber
+     *
      * @return bool
      */
     protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = false)
@@ -3539,9 +3587,9 @@ class Parser
      * }}
      *
      * @param array          $out
-     * @param string|boolean $subSelector
+     * @param string|bool $subSelector
      *
-     * @return boolean
+     * @return bool
      */
     protected function selectorSingle(&$out, $subSelector = false)
     {
@@ -3765,7 +3813,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function variable(&$out)
     {
@@ -3792,11 +3840,11 @@ class Parser
     /**
      * Parse a keyword
      *
-     * @param string  $word
-     * @param boolean $eatWhitespace
-     * @param boolean $inSelector
+     * @param string $word
+     * @param bool   $eatWhitespace
+     * @param bool   $inSelector
      *
-     * @return boolean
+     * @return bool
      */
     protected function keyword(&$word, $eatWhitespace = null, $inSelector = false)
     {
@@ -3859,11 +3907,11 @@ class Parser
     /**
      * Parse a keyword that should not start with a number
      *
-     * @param string  $word
-     * @param boolean $eatWhitespace
-     * @param boolean $inSelector
+     * @param string $word
+     * @param bool   $eatWhitespace
+     * @param bool   $inSelector
      *
-     * @return boolean
+     * @return bool
      */
     protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector = false)
     {
@@ -3883,7 +3931,7 @@ class Parser
      *
      * @param string|array $placeholder
      *
-     * @return boolean
+     * @return bool
      */
     protected function placeholder(&$placeholder)
     {
@@ -3912,7 +3960,7 @@ class Parser
      *
      * @param array $out
      *
-     * @return boolean
+     * @return bool
      */
     protected function url(&$out)
     {
@@ -3947,7 +3995,7 @@ class Parser
      * Consume an end of statement delimiter
      * @param bool $eatWhitespace
      *
-     * @return boolean
+     * @return bool
      */
     protected function end($eatWhitespace = null)
     {
@@ -4065,7 +4113,7 @@ class Parser
     /**
      * Get source line number and column (given character position in the buffer)
      *
-     * @param integer $pos
+     * @param int $pos
      *
      * @return array
      */
index 4a5ed8bb0937982d74af5bd736ae372d68604ae7..00b6b45456cdd14a560a53526a11517c8c16e3a5 100644 (file)
@@ -164,7 +164,7 @@ class Base64
     /**
      * Convert to base64
      *
-     * @param integer $value
+     * @param int $value
      *
      * @return string
      */
@@ -178,7 +178,7 @@ class Base64
      *
      * @param string $value
      *
-     * @return integer
+     * @return int
      */
     public static function decode($value)
     {
index d47b96a1ca0dcc25b442f19f93159ad716978e8a..2a5210c68a792cc8129bb67534784f83f0813a44 100644 (file)
@@ -51,7 +51,7 @@ class Base64VLQ
     /**
      * Returns the VLQ encoded value.
      *
-     * @param integer $value
+     * @param int $value
      *
      * @return string
      */
@@ -80,9 +80,9 @@ class Base64VLQ
      * Decodes VLQValue.
      *
      * @param string $str
-     * @param integer $index
+     * @param int    $index
      *
-     * @return integer
+     * @return int
      */
     public static function decode($str, &$index)
     {
@@ -107,9 +107,9 @@ class Base64VLQ
      *   1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
      *   2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
      *
-     * @param integer $value
+     * @param int $value
      *
-     * @return integer
+     * @return int
      */
     private static function toVLQSigned($value)
     {
@@ -126,9 +126,9 @@ class Base64VLQ
      *   2 (10 binary) becomes 1, 3 (11 binary) becomes -1
      *   4 (100 binary) becomes 2, 5 (101 binary) becomes -2
      *
-     * @param integer $value
+     * @param int $value
      *
-     * @return integer
+     * @return int
      */
     private static function fromVLQSigned($value)
     {
index 4f14bdcef0668755465af1bfd47e1f5e0f05ec51..65dc24da0d7f4edc1525bb45b01c97b8cb81bc2d 100644 (file)
@@ -114,11 +114,11 @@ class SourceMapGenerator
     /**
      * Adds a mapping
      *
-     * @param integer $generatedLine   The line number in generated file
-     * @param integer $generatedColumn The column number in generated file
-     * @param integer $originalLine    The line number in original file
-     * @param integer $originalColumn  The column number in original file
-     * @param string  $sourceFile      The original source file
+     * @param int    $generatedLine   The line number in generated file
+     * @param int    $generatedColumn The column number in generated file
+     * @param int    $originalLine    The line number in original file
+     * @param int    $originalColumn  The column number in original file
+     * @param string $sourceFile      The original source file
      *
      * @return void
      */
@@ -326,7 +326,7 @@ class SourceMapGenerator
      *
      * @param string $filename
      *
-     * @return integer|false
+     * @return int|false
      */
     protected function findFileIndex($filename)
     {
@@ -362,8 +362,8 @@ class SourceMapGenerator
     /**
      * Fix windows paths
      *
-     * @param string  $path
-     * @param boolean $addEndSlash
+     * @param string $path
+     * @param bool   $addEndSlash
      *
      * @return string
      */
index fb2a1d7fea535366868c6071d5a8ea4c2a2178bb..d4308878580281d9be73c69ba9a2d2c749edd82b 100644 (file)
@@ -19,58 +19,190 @@ namespace ScssPhp\ScssPhp;
  */
 class Type
 {
+    /**
+     * @internal
+     */
     const T_ASSIGN = 'assign';
+    /**
+     * @internal
+     */
     const T_AT_ROOT = 'at-root';
+    /**
+     * @internal
+     */
     const T_BLOCK = 'block';
-    /** @deprecated */
+    /**
+     * @deprecated
+     * @internal
+     */
     const T_BREAK = 'break';
+    /**
+     * @internal
+     */
     const T_CHARSET = 'charset';
     const T_COLOR = 'color';
+    /**
+     * @internal
+     */
     const T_COMMENT = 'comment';
-    /** @deprecated */
+    /**
+     * @deprecated
+     * @internal
+     */
     const T_CONTINUE = 'continue';
-    /** @deprecated */
+    /**
+     * @deprecated
+     * @internal
+     */
     const T_CONTROL = 'control';
+    /**
+     * @internal
+     */
     const T_CUSTOM_PROPERTY = 'custom';
+    /**
+     * @internal
+     */
     const T_DEBUG = 'debug';
+    /**
+     * @internal
+     */
     const T_DIRECTIVE = 'directive';
+    /**
+     * @internal
+     */
     const T_EACH = 'each';
+    /**
+     * @internal
+     */
     const T_ELSE = 'else';
+    /**
+     * @internal
+     */
     const T_ELSEIF = 'elseif';
+    /**
+     * @internal
+     */
     const T_ERROR = 'error';
+    /**
+     * @internal
+     */
     const T_EXPRESSION = 'exp';
+    /**
+     * @internal
+     */
     const T_EXTEND = 'extend';
+    /**
+     * @internal
+     */
     const T_FOR = 'for';
     const T_FUNCTION = 'function';
+    /**
+     * @internal
+     */
     const T_FUNCTION_REFERENCE = 'function-reference';
+    /**
+     * @internal
+     */
     const T_FUNCTION_CALL = 'fncall';
+    /**
+     * @internal
+     */
     const T_HSL = 'hsl';
+    /**
+     * @internal
+     */
     const T_HWB = 'hwb';
+    /**
+     * @internal
+     */
     const T_IF = 'if';
+    /**
+     * @internal
+     */
     const T_IMPORT = 'import';
+    /**
+     * @internal
+     */
     const T_INCLUDE = 'include';
+    /**
+     * @internal
+     */
     const T_INTERPOLATE = 'interpolate';
+    /**
+     * @internal
+     */
     const T_INTERPOLATED = 'interpolated';
+    /**
+     * @internal
+     */
     const T_KEYWORD = 'keyword';
     const T_LIST = 'list';
     const T_MAP = 'map';
+    /**
+     * @internal
+     */
     const T_MEDIA = 'media';
+    /**
+     * @internal
+     */
     const T_MEDIA_EXPRESSION = 'mediaExp';
+    /**
+     * @internal
+     */
     const T_MEDIA_TYPE = 'mediaType';
+    /**
+     * @internal
+     */
     const T_MEDIA_VALUE = 'mediaValue';
+    /**
+     * @internal
+     */
     const T_MIXIN = 'mixin';
+    /**
+     * @internal
+     */
     const T_MIXIN_CONTENT = 'mixin_content';
+    /**
+     * @internal
+     */
     const T_NESTED_PROPERTY = 'nestedprop';
+    /**
+     * @internal
+     */
     const T_NOT = 'not';
     const T_NULL = 'null';
     const T_NUMBER = 'number';
+    /**
+     * @internal
+     */
     const T_RETURN = 'return';
+    /**
+     * @internal
+     */
     const T_ROOT = 'root';
+    /**
+     * @internal
+     */
     const T_SCSSPHP_IMPORT_ONCE = 'scssphp-import-once';
+    /**
+     * @internal
+     */
     const T_SELF = 'self';
     const T_STRING = 'string';
+    /**
+     * @internal
+     */
     const T_UNARY = 'unary';
+    /**
+     * @internal
+     */
     const T_VARIABLE = 'var';
+    /**
+     * @internal
+     */
     const T_WARN = 'warn';
+    /**
+     * @internal
+     */
     const T_WHILE = 'while';
 }
index 62cd2a20c516a5f532cedea9c01e5aad5c2d3d32..ad608ceb3ab571a0502e43e4d384fc6307d9df1f 100644 (file)
@@ -79,7 +79,7 @@ class Util
     /**
      * mb_chr() wrapper
      *
-     * @param integer $code
+     * @param int $code
      *
      * @return string
      */
index be6a31037af7029ec7157ce4ff35160ad115d85c..f8d728475b499329f80b2b5be1b1a14a57698368 100644 (file)
@@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp;
  */
 class Version
 {
-    const VERSION = '1.9.0';
+    const VERSION = '1.10.0';
 }
index b59909563fd06aaf4f600669eefa8e4f57e1123e..b65c54a6b56f7d02f81c1facee91b4c5887b8779 100644 (file)
@@ -80,7 +80,7 @@ final class Mbstring
 
     public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
     {
-        if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) {
+        if (\is_array($fromEncoding) || ($fromEncoding !== null && false !== strpos($fromEncoding, ','))) {
             $fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
         } else {
             $fromEncoding = self::getEncoding($fromEncoding);
@@ -602,6 +602,9 @@ final class Mbstring
         if (80000 > \PHP_VERSION_ID) {
             return false;
         }
+        if (\is_int($c) || 'long' === $c || 'entity' === $c) {
+            return false;
+        }
 
         throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
     }
index 2ed7a74353ed302772cc11e2f6c8dbeb543de8b7..1fa21ca16cf60605a49315992ccae1c3d5d40433 100644 (file)
@@ -18,6 +18,9 @@
     "require": {
         "php": ">=7.1"
     },
+    "provide": {
+        "ext-mbstring": "*"
+    },
     "autoload": {
         "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
         "files": [ "bootstrap.php" ]
index 673d100224854a8d9c0dc429cf4dfd5b3bef0726..f06d6c2694c34e11dfa95b242c6be61de599197a 100644 (file)
@@ -9,6 +9,8 @@
  * file that was distributed with this source code.
  */
 
-class JsonException extends Exception
-{
+if (\PHP_VERSION_ID < 70300) {
+    class JsonException extends Exception
+    {
+    }
 }
index 7fb2000e9e164de1e909cd366e9640a5a413eee8..37937cbfae105a4f357acf202a923cf23589ef17 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
-class UnhandledMatchError extends Error
-{
+if (\PHP_VERSION_ID < 80000) {
+    class UnhandledMatchError extends Error
+    {
+    }
 }
index 99843cad3353ce7e3e295fb452ed8307e86a1b57..a3a9b88b09657f6d263f956ca918144d8716cb43 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
-class ValueError extends Error
-{
+if (\PHP_VERSION_ID < 80000) {
+    class ValueError extends Error
+    {
+    }
 }