Updated SCSS compiler to v1.10, composer update

This commit is contained in:
Matias Griese
2022-02-07 10:22:51 +02:00
parent 9317a497fb
commit 9f9198b329
43 changed files with 1402 additions and 452 deletions

View File

@@ -3,6 +3,7 @@
1. [](#new) 1. [](#new)
* Require **Grav 1.7.30** * Require **Grav 1.7.30**
* Updated SCSS compiler to v1.10
* PageMedia can now be collapsed and thumbnails previewed smaller, in order to save room on the page. Selection will be remembered. * PageMedia can now be collapsed and thumbnails previewed smaller, in order to save room on the page. Selection will be remembered.
* DEPRECATED: Admin field `pages_list_display_field` is no longer available as an option [#2191](https://github.com/getgrav/grav-plugin-admin/issues/2191) * DEPRECATED: Admin field `pages_list_display_field` is no longer available as an option [#2191](https://github.com/getgrav/grav-plugin-admin/issues/2191)
* When listing installable themes/plugins, it is now possible to sort them by [Premium](https://getgrav.org/premium) * When listing installable themes/plugins, it is now possible to sort them by [Premium](https://getgrav.org/premium)

221
composer.lock generated
View File

@@ -190,16 +190,16 @@
}, },
{ {
"name": "scssphp/scssphp", "name": "scssphp/scssphp",
"version": "v1.9.0", "version": "v1.10.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/scssphp/scssphp.git", "url": "https://github.com/scssphp/scssphp.git",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd" "reference": "9699a52a862da4efb43985943afa17150155dd3d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd", "url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd", "reference": "9699a52a862da4efb43985943afa17150155dd3d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -215,7 +215,7 @@
"symfony/phpunit-bridge": "^5.1", "symfony/phpunit-bridge": "^5.1",
"thoughtbot/bourbon": "^7.0", "thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0", "twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0", "twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5" "zurb/foundation": "~6.5"
}, },
"suggest": { "suggest": {
@@ -258,9 +258,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/scssphp/scssphp/issues", "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"
} }
], ],
"packages-dev": [ "packages-dev": [
@@ -885,12 +885,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [ "files": [
"src/functions_include.php" "src/functions_include.php"
] ],
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@@ -976,9 +976,6 @@
"require": { "require": {
"php": "^7.1 || ^8.0" "php": "^7.1 || ^8.0"
}, },
"replace": {
"myclabs/deep-copy": "self.version"
},
"require-dev": { "require-dev": {
"doctrine/collections": "^1.0", "doctrine/collections": "^1.0",
"doctrine/common": "^2.6", "doctrine/common": "^2.6",
@@ -986,12 +983,12 @@
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [ "files": [
"src/DeepCopy/deep_copy.php" "src/DeepCopy/deep_copy.php"
] ],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@@ -1239,16 +1236,16 @@
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
"version": "1.5.1", "version": "1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git", "url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -1283,9 +1280,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": { "support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues", "issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
}, },
"time": "2021-10-02T14:08:47+00:00" "time": "2022-01-04T19:58:01+00:00"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
@@ -2544,16 +2541,16 @@
}, },
{ {
"name": "symfony/browser-kit", "name": "symfony/browser-kit",
"version": "v4.4.27", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/browser-kit.git", "url": "https://github.com/symfony/browser-kit.git",
"reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b" "reference": "6e81008cac62369871cb6b8de64576ed138e3998"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/9629d1524d8ced5a4ec3e94abdbd638b4ec8319b", "url": "https://api.github.com/repos/symfony/browser-kit/zipball/6e81008cac62369871cb6b8de64576ed138e3998",
"reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b", "reference": "6e81008cac62369871cb6b8de64576ed138e3998",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2596,7 +2593,7 @@
"description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/browser-kit/tree/v4.4.27" "source": "https://github.com/symfony/browser-kit/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -2612,20 +2609,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-21T12:19:41+00:00" "time": "2022-01-02T09:41:36+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v4.4.36", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/console.git", "url": "https://github.com/symfony/console.git",
"reference": "621379b62bb19af213b569b60013200b11dd576f" "reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/621379b62bb19af213b569b60013200b11dd576f", "url": "https://api.github.com/repos/symfony/console/zipball/0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
"reference": "621379b62bb19af213b569b60013200b11dd576f", "reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2686,7 +2683,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces", "description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/console/tree/v4.4.36" "source": "https://github.com/symfony/console/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -2702,20 +2699,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-15T10:33:10+00:00" "time": "2022-01-26T16:15:26+00:00"
}, },
{ {
"name": "symfony/css-selector", "name": "symfony/css-selector",
"version": "v4.4.27", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/css-selector.git", "url": "https://github.com/symfony/css-selector.git",
"reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6" "reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", "url": "https://api.github.com/repos/symfony/css-selector/zipball/0628e6c6d7c92f1a7bae543959bdc17347be2436",
"reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6", "reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2752,7 +2749,7 @@
"description": "Converts CSS selectors to XPath expressions", "description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/css-selector/tree/v4.4.27" "source": "https://github.com/symfony/css-selector/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -2768,7 +2765,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-21T12:19:41+00:00" "time": "2022-01-02T09:41:36+00:00"
}, },
{ {
"name": "symfony/deprecation-contracts", "name": "symfony/deprecation-contracts",
@@ -2839,16 +2836,16 @@
}, },
{ {
"name": "symfony/dom-crawler", "name": "symfony/dom-crawler",
"version": "v4.4.36", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/dom-crawler.git", "url": "https://github.com/symfony/dom-crawler.git",
"reference": "42de12bee3b5e594977209bcdf58ec4fef8dde39" "reference": "60d36408a3a48500bcc6e30d9f831e51d04d7fa4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/42de12bee3b5e594977209bcdf58ec4fef8dde39", "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/60d36408a3a48500bcc6e30d9f831e51d04d7fa4",
"reference": "42de12bee3b5e594977209bcdf58ec4fef8dde39", "reference": "60d36408a3a48500bcc6e30d9f831e51d04d7fa4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2893,7 +2890,7 @@
"description": "Eases DOM navigation for HTML and XML documents", "description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/dom-crawler/tree/v4.4.36" "source": "https://github.com/symfony/dom-crawler/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -2909,20 +2906,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-28T14:48:02+00:00" "time": "2022-01-02T09:41:36+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v4.4.34", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
"reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8" "reference": "3ccfcfb96ecce1217d7b0875a0736976bc6e63dc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8", "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3ccfcfb96ecce1217d7b0875a0736976bc6e63dc",
"reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8", "reference": "3ccfcfb96ecce1217d7b0875a0736976bc6e63dc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -2977,7 +2974,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.34" "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -2993,7 +2990,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-11-15T14:42:25+00:00" "time": "2022-01-02T09:41:36+00:00"
}, },
{ {
"name": "symfony/event-dispatcher-contracts", "name": "symfony/event-dispatcher-contracts",
@@ -3076,16 +3073,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v4.4.36", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "1fef05633cd61b629e963e5d8200fb6b67ecf42c" "reference": "b17d76d7ed179f017aad646e858c90a2771af15d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/1fef05633cd61b629e963e5d8200fb6b67ecf42c", "url": "https://api.github.com/repos/symfony/finder/zipball/b17d76d7ed179f017aad646e858c90a2771af15d",
"reference": "1fef05633cd61b629e963e5d8200fb6b67ecf42c", "reference": "b17d76d7ed179f017aad646e858c90a2771af15d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3118,7 +3115,7 @@
"description": "Finds files and directories via an intuitive fluent interface", "description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/finder/tree/v4.4.36" "source": "https://github.com/symfony/finder/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -3134,25 +3131,28 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-15T10:33:10+00:00" "time": "2022-01-02T09:41:36+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.23.0", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" "reference": "30885182c981ab175d4d034db0f6f469898070ab"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "reference": "30885182c981ab175d4d034db0f6f469898070ab",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"provide": {
"ext-ctype": "*"
},
"suggest": { "suggest": {
"ext-ctype": "For best performance" "ext-ctype": "For best performance"
}, },
@@ -3197,7 +3197,7 @@
"portable" "portable"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" "source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@@ -3213,20 +3213,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-02-19T12:13:01+00:00" "time": "2021-10-20T20:35:02+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-idn", "name": "symfony/polyfill-intl-idn",
"version": "v1.23.0", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git", "url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" "reference": "749045c69efb97c70d25d7463abba812e91f3a44"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", "reference": "749045c69efb97c70d25d7463abba812e91f3a44",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3248,12 +3248,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
] ],
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
}
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
@@ -3284,7 +3284,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@@ -3300,11 +3300,11 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-05-27T09:27:20+00:00" "time": "2021-09-14T14:02:44+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-normalizer", "name": "symfony/polyfill-intl-normalizer",
"version": "v1.23.0", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
@@ -3333,12 +3333,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
], ],
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"classmap": [ "classmap": [
"Resources/stubs" "Resources/stubs"
] ]
@@ -3368,7 +3368,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@@ -3388,21 +3388,24 @@
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.23.1", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"provide": {
"ext-mbstring": "*"
},
"suggest": { "suggest": {
"ext-mbstring": "For best performance" "ext-mbstring": "For best performance"
}, },
@@ -3448,7 +3451,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@@ -3464,20 +3467,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-05-27T12:26:48+00:00" "time": "2021-11-30T18:21:41+00:00"
}, },
{ {
"name": "symfony/polyfill-php80", "name": "symfony/polyfill-php80",
"version": "v1.23.1", "version": "v1.24.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3494,12 +3497,12 @@
} }
}, },
"autoload": { "autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [ "files": [
"bootstrap.php" "bootstrap.php"
], ],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [ "classmap": [
"Resources/stubs" "Resources/stubs"
] ]
@@ -3531,7 +3534,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
}, },
"funding": [ "funding": [
{ {
@@ -3547,20 +3550,20 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-28T13:41:28+00:00" "time": "2021-09-13T13:58:33+00:00"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v4.4.36", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "a35d6b8f82e2272504f23a267de49b8717ca0028" "reference": "b2d924e5a4cb284f293d5092b1dbf0d364cb8b67"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/a35d6b8f82e2272504f23a267de49b8717ca0028", "url": "https://api.github.com/repos/symfony/process/zipball/b2d924e5a4cb284f293d5092b1dbf0d364cb8b67",
"reference": "a35d6b8f82e2272504f23a267de49b8717ca0028", "reference": "b2d924e5a4cb284f293d5092b1dbf0d364cb8b67",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3593,7 +3596,7 @@
"description": "Executes commands in sub-processes", "description": "Executes commands in sub-processes",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/process/tree/v4.4.36" "source": "https://github.com/symfony/process/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -3609,7 +3612,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-12-19T16:27:15+00:00" "time": "2022-01-27T17:14:04+00:00"
}, },
{ {
"name": "symfony/service-contracts", "name": "symfony/service-contracts",
@@ -3696,16 +3699,16 @@
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v4.4.36", "version": "v4.4.37",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "a19f7c44ba665fa9d9d415cc4493361381b93f9b" "reference": "d7f637cc0f0cc14beb0984f2bb50da560b271311"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/a19f7c44ba665fa9d9d415cc4493361381b93f9b", "url": "https://api.github.com/repos/symfony/yaml/zipball/d7f637cc0f0cc14beb0984f2bb50da560b271311",
"reference": "a19f7c44ba665fa9d9d415cc4493361381b93f9b", "reference": "d7f637cc0f0cc14beb0984f2bb50da560b271311",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -3747,7 +3750,7 @@
"description": "Loads and dumps YAML files", "description": "Loads and dumps YAML files",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"support": { "support": {
"source": "https://github.com/symfony/yaml/tree/v4.4.36" "source": "https://github.com/symfony/yaml/tree/v4.4.37"
}, },
"funding": [ "funding": [
{ {
@@ -3763,7 +3766,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-11-25T16:40:00+00:00" "time": "2022-01-24T20:11:01+00:00"
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
@@ -3889,5 +3892,5 @@
"platform-overrides": { "platform-overrides": {
"php": "7.3.6" "php": "7.3.6"
}, },
"plugin-api-version": "2.1.0" "plugin-api-version": "2.2.0"
} }

2
vendor/autoload.php vendored
View File

@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23::getLoader(); return ComposerAutoloaderInit38a448a612c5797456d245c809d4a914::getLoader();

1
vendor/bin/picofeed vendored
View File

@@ -1 +0,0 @@
../p3k/picofeed/picofeed

107
vendor/bin/picofeed vendored Executable file
View File

@@ -0,0 +1,107 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../p3k/picofeed/picofeed)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/p3k/picofeed/picofeed');
exit(0);
}
}
include __DIR__ . '/..'.'/p3k/picofeed/picofeed';

1
vendor/bin/pscss vendored
View File

@@ -1 +0,0 @@
../scssphp/scssphp/bin/pscss

107
vendor/bin/pscss vendored Executable file
View File

@@ -0,0 +1,107 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../scssphp/scssphp/bin/pscss)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
exit(0);
}
}
include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss';

View File

@@ -149,7 +149,7 @@ class ClassLoader
/** /**
* @return string[] Array of classname => path * @return string[] Array of classname => path
* @psalm-var array<string, string> * @psalm-return array<string, string>
*/ */
public function getClassMap() public function getClassMap()
{ {

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23 class ComposerAutoloaderInit38a448a612c5797456d245c809d4a914
{ {
private static $loader; private static $loader;
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit38a448a612c5797456d245c809d4a914', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit38a448a612c5797456d245c809d4a914', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) { if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit38a448a612c5797456d245c809d4a914::getInitializer($loader));
} else { } else {
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
@@ -53,23 +53,28 @@ class ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$files; $includeFiles = Composer\Autoload\ComposerStaticInit38a448a612c5797456d245c809d4a914::$files;
} else { } else {
$includeFiles = require __DIR__ . '/autoload_files.php'; $includeFiles = require __DIR__ . '/autoload_files.php';
} }
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire21cdc8503e0b8e5d43533c2109133c23($fileIdentifier, $file); composerRequire38a448a612c5797456d245c809d4a914($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequire21cdc8503e0b8e5d43533c2109133c23($fileIdentifier, $file) /**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire38a448a612c5797456d245c809d4a914($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
} }
} }

View File

@@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23 class ComposerStaticInit38a448a612c5797456d245c809d4a914
{ {
public static $files = array ( public static $files = array (
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php', '7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
@@ -63,10 +63,10 @@ class ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixesPsr0; $loader->prefixesPsr0 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixesPsr0;
$loader->classMap = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$classMap; $loader->classMap = ComposerStaticInit38a448a612c5797456d245c809d4a914::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@@ -193,17 +193,17 @@
}, },
{ {
"name": "scssphp/scssphp", "name": "scssphp/scssphp",
"version": "v1.9.0", "version": "v1.10.0",
"version_normalized": "1.9.0.0", "version_normalized": "1.10.0.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/scssphp/scssphp.git", "url": "https://github.com/scssphp/scssphp.git",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd" "reference": "9699a52a862da4efb43985943afa17150155dd3d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd", "url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd", "reference": "9699a52a862da4efb43985943afa17150155dd3d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -219,14 +219,14 @@
"symfony/phpunit-bridge": "^5.1", "symfony/phpunit-bridge": "^5.1",
"thoughtbot/bourbon": "^7.0", "thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0", "twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0", "twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5" "zurb/foundation": "~6.5"
}, },
"suggest": { "suggest": {
"ext-iconv": "Can be used as fallback when ext-mbstring is not available", "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" "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": [
"bin/pscss" "bin/pscss"
], ],
@@ -264,7 +264,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/scssphp/scssphp/issues", "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" "install-path": "../scssphp/scssphp"
} }

View File

@@ -5,7 +5,7 @@
'type' => 'grav-plugin', 'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '07027f34e0bbf92b2cce3f3ac73ee74940d5b33a', 'reference' => '9317a497fbe62505ab8159be67cc6d365d21201f',
'name' => 'getgrav/grav-plugin-admin', 'name' => 'getgrav/grav-plugin-admin',
'dev' => false, 'dev' => false,
), ),
@@ -16,7 +16,7 @@
'type' => 'grav-plugin', 'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../', 'install_path' => __DIR__ . '/../../',
'aliases' => array(), 'aliases' => array(),
'reference' => '07027f34e0bbf92b2cce3f3ac73ee74940d5b33a', 'reference' => '9317a497fbe62505ab8159be67cc6d365d21201f',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'laminas/laminas-xml' => array( 'laminas/laminas-xml' => array(
@@ -53,12 +53,12 @@
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'scssphp/scssphp' => array( 'scssphp/scssphp' => array(
'pretty_version' => 'v1.9.0', 'pretty_version' => 'v1.10.0',
'version' => '1.9.0.0', 'version' => '1.10.0.0',
'type' => 'library', 'type' => 'library',
'install_path' => __DIR__ . '/../scssphp/scssphp', 'install_path' => __DIR__ . '/../scssphp/scssphp',
'aliases' => array(), 'aliases' => array(),
'reference' => 'bc8bece4e5e176973a832f3763049ddbba16e6fd', 'reference' => '9699a52a862da4efb43985943afa17150155dd3d',
'dev_requirement' => false, 'dev_requirement' => false,
), ),
'symfony/polyfill-php72' => array( 'symfony/polyfill-php72' => array(

View File

@@ -38,8 +38,8 @@ $embedSourceMap = false;
/** /**
* Parse argument * Parse argument
* *
* @param integer $i * @param int $i
* @param array $options * @param string[] $options
* *
* @return string|null * @return string|null
*/ */

View File

@@ -42,7 +42,7 @@
"symfony/phpunit-bridge": "^5.1", "symfony/phpunit-bridge": "^5.1",
"thoughtbot/bourbon": "^7.0", "thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0", "twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0", "twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5" "zurb/foundation": "~6.5"
}, },
"repositories": [ "repositories": [
@@ -50,16 +50,16 @@
"type": "package", "type": "package",
"package": { "package": {
"name": "sass/sass-spec", "name": "sass/sass-spec",
"version": "2021.09.15", "version": "2021.11.30",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sass/sass-spec.git", "url": "https://github.com/sass/sass-spec.git",
"reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955" "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sass/sass-spec/zipball/eb2d7a0865c1faf0b55a39ff962b24aca9b4c955", "url": "https://api.github.com/repos/sass/sass-spec/zipball/ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
"reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955", "reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
"shasum": "" "shasum": ""
} }
} }
@@ -86,16 +86,16 @@
"type": "package", "type": "package",
"package": { "package": {
"name": "twbs/bootstrap4", "name": "twbs/bootstrap4",
"version": "v4.6.0", "version": "v4.6.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twbs/bootstrap.git", "url": "https://github.com/twbs/bootstrap.git",
"reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2" "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/6ffb0b48e455430f8a5359ed689ad64c1143fac2", "url": "https://api.github.com/repos/twbs/bootstrap/zipball/043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
"reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2", "reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
"shasum": "" "shasum": ""
} }
} }
@@ -103,6 +103,9 @@
], ],
"bin": ["bin/pscss"], "bin": ["bin/pscss"],
"config": { "config": {
"sort-packages": true "sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
} }
} }

View File

@@ -34,8 +34,8 @@ class Range
/** /**
* Initialize range * Initialize range
* *
* @param integer|float $first * @param int|float $first
* @param integer|float $last * @param int|float $last
*/ */
public function __construct($first, $last) public function __construct($first, $last)
{ {
@@ -46,9 +46,9 @@ class Range
/** /**
* Test for inclusion in range * Test for inclusion in range
* *
* @param integer|float $value * @param int|float $value
* *
* @return boolean * @return bool
*/ */
public function includes($value) public function includes($value)
{ {

View File

@@ -22,12 +22,12 @@ namespace ScssPhp\ScssPhp;
class Block class Block
{ {
/** /**
* @var string * @var string|null
*/ */
public $type; public $type;
/** /**
* @var \ScssPhp\ScssPhp\Block * @var Block|null
*/ */
public $parent; public $parent;
@@ -37,17 +37,17 @@ class Block
public $sourceName; public $sourceName;
/** /**
* @var integer * @var int
*/ */
public $sourceIndex; public $sourceIndex;
/** /**
* @var integer * @var int
*/ */
public $sourceLine; public $sourceLine;
/** /**
* @var integer * @var int
*/ */
public $sourceColumn; public $sourceColumn;
@@ -67,7 +67,7 @@ class Block
public $children; public $children;
/** /**
* @var \ScssPhp\ScssPhp\Block|null * @var Block|null
*/ */
public $selfParent; public $selfParent;
} }

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -204,10 +204,10 @@ class Colors
/** /**
* Reverse conversion : from RGBA to a color name if possible * Reverse conversion : from RGBA to a color name if possible
* *
* @param integer $r * @param int $r
* @param integer $g * @param int $g
* @param integer $b * @param int $b
* @param integer|float $a * @param int|float $a
* *
* @return string|null * @return string|null
*/ */

View File

@@ -13,6 +13,17 @@
namespace ScssPhp\ScssPhp; namespace ScssPhp\ScssPhp;
use ScssPhp\ScssPhp\Base\Range; 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\CachedResult;
use ScssPhp\ScssPhp\Compiler\Environment; use ScssPhp\ScssPhp\Compiler\Environment;
use ScssPhp\ScssPhp\Exception\CompilerException; use ScssPhp\ScssPhp\Exception\CompilerException;
@@ -644,7 +655,7 @@ class Compiler
* @param array $target * @param array $target
* @param array $origin * @param array $origin
* *
* @return boolean * @return bool
*/ */
protected function isSelfExtend($target, $origin) protected function isSelfExtend($target, $origin)
{ {
@@ -855,8 +866,8 @@ class Compiler
* *
* @param array $selector * @param array $selector
* @param array $out * @param array $out
* @param integer $from * @param int $from
* @param boolean $initial * @param bool $initial
* *
* @return void * @return void
*/ */
@@ -989,7 +1000,7 @@ class Compiler
* @param string $part * @param string $part
* @param array $matches * @param array $matches
* *
* @return boolean * @return bool
*/ */
protected function isPseudoSelector($part, &$matches) protected function isPseudoSelector($part, &$matches)
{ {
@@ -1053,9 +1064,9 @@ class Compiler
* *
* @param array $rawSingle * @param array $rawSingle
* @param array $outOrigin * @param array $outOrigin
* @param boolean $initial * @param bool $initial
* *
* @return boolean * @return bool
*/ */
protected function matchExtendsSingle($rawSingle, &$outOrigin, $initial = true) protected function matchExtendsSingle($rawSingle, &$outOrigin, $initial = true)
{ {
@@ -1270,6 +1281,7 @@ class Compiler
*/ */
protected function compileMedia(Block $media) protected function compileMedia(Block $media)
{ {
assert($media instanceof MediaBlock);
$this->pushEnv($media); $this->pushEnv($media);
$mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env)); $mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env));
@@ -1347,7 +1359,7 @@ class Compiler
/** /**
* Compile directive * Compile directive
* *
* @param \ScssPhp\ScssPhp\Block|array $directive * @param DirectiveBlock|array $directive
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
* *
* @return void * @return void
@@ -1413,6 +1425,7 @@ class Compiler
*/ */
protected function compileAtRoot(Block $block) protected function compileAtRoot(Block $block)
{ {
assert($block instanceof AtRootBlock);
$env = $this->pushEnv($block); $env = $this->pushEnv($block);
$envs = $this->compactEnv($env); $envs = $this->compactEnv($env);
list($with, $without) = $this->compileWith(isset($block->with) ? $block->with : null); 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 \ScssPhp\ScssPhp\Formatter\OutputBlock $scope
* @param array $with * @param array $with
@@ -1561,7 +1574,7 @@ class Compiler
* Find a selector by the depth node in the scope * Find a selector by the depth node in the scope
* *
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope
* @param integer $depth * @param int $depth
* *
* @return array * @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 * 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 * @return array
* *
@@ -1674,7 +1687,7 @@ class Compiler
* @param array $with * @param array $with
* @param array $without * @param array $without
* *
* @return boolean * @return bool
*/ */
protected function isWith($block, $with, $without) protected function isWith($block, $with, $without)
{ {
@@ -1684,6 +1697,7 @@ class Compiler
} }
if ($block->type === Type::T_DIRECTIVE) { if ($block->type === Type::T_DIRECTIVE) {
assert($block instanceof DirectiveBlock || $block instanceof OutputBlock);
if (isset($block->name)) { if (isset($block->name)) {
return $this->testWithWithout($this->compileDirectiveName($block->name), $with, $without); return $this->testWithWithout($this->compileDirectiveName($block->name), $with, $without);
} elseif (isset($block->selectors) && preg_match(',@(\w+),ims', json_encode($block->selectors), $m)) { } elseif (isset($block->selectors) && preg_match(',@(\w+),ims', json_encode($block->selectors), $m)) {
@@ -1719,7 +1733,7 @@ class Compiler
* @param array $with * @param array $with
* @param array $without * @param array $without
* *
* @return boolean * @return bool
* true if the block should be kept, false to reject * true if the block should be kept, false to reject
*/ */
protected function testWithWithout($what, $with, $without) protected function testWithWithout($what, $with, $without)
@@ -1774,6 +1788,7 @@ class Compiler
*/ */
protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out) protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out)
{ {
assert($block instanceof NestedPropertyBlock);
$prefix = $this->compileValue($block->prefix) . '-'; $prefix = $this->compileValue($block->prefix) . '-';
$nested = $this->makeOutputBlock($block->type); $nested = $this->makeOutputBlock($block->type);
@@ -1792,6 +1807,7 @@ class Compiler
break; break;
case Type::T_NESTED_PROPERTY: case Type::T_NESTED_PROPERTY:
assert($child[1] instanceof NestedPropertyBlock);
array_unshift($child[1]->prefix[2], $prefix); array_unshift($child[1]->prefix[2], $prefix);
break; break;
} }
@@ -1817,7 +1833,7 @@ class Compiler
// wrap assign children in a block // wrap assign children in a block
// except for @font-face // 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? // need wrapping?
$needWrapping = false; $needWrapping = false;
@@ -1907,7 +1923,7 @@ class Compiler
* Compile the value of a comment that can have interpolation * Compile the value of a comment that can have interpolation
* *
* @param array $value * @param array $value
* @param boolean $pushEnv * @param bool $pushEnv
* *
* @return string * @return string
*/ */
@@ -2224,7 +2240,7 @@ class Compiler
* *
* @param array $selector * @param array $selector
* *
* @return boolean * @return bool
*/ */
protected function hasSelectorPlaceholder($selector) protected function hasSelectorPlaceholder($selector)
{ {
@@ -2641,9 +2657,9 @@ class Compiler
* *
* @param array $rawPath * @param array $rawPath
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
* @param boolean $once * @param bool $once
* *
* @return boolean * @return bool
*/ */
protected function compileImport($rawPath, OutputBlock $out, $once = false) protected function compileImport($rawPath, OutputBlock $out, $once = false)
{ {
@@ -2778,7 +2794,7 @@ class Compiler
// insert the directive as a comment // insert the directive as a comment
$child = $this->makeOutputBlock(Type::T_COMMENT); $child = $this->makeOutputBlock(Type::T_COMMENT);
$child->lines[] = $line; $child->lines[] = $line;
$child->sourceName = $this->sourceNames[$this->sourceIndex]; $child->sourceName = $this->sourceNames[$this->sourceIndex] ?: '(stdin)';
$child->sourceLine = $this->sourceLine; $child->sourceLine = $this->sourceLine;
$child->sourceColumn = $this->sourceColumn; $child->sourceColumn = $this->sourceColumn;
@@ -3049,6 +3065,7 @@ class Compiler
case Type::T_MIXIN: case Type::T_MIXIN:
case Type::T_FUNCTION: case Type::T_FUNCTION:
list(, $block) = $child; list(, $block) = $child;
assert($block instanceof CallableBlock);
// the block need to be able to go up to it's parent env to resolve vars // the block need to be able to go up to it's parent env to resolve vars
$block->parentEnv = $this->getStoreEnv(); $block->parentEnv = $this->getStoreEnv();
$this->set(static::$namespaces[$block->type] . $block->name, $block, true); $this->set(static::$namespaces[$block->type] . $block->name, $block, true);
@@ -3099,6 +3116,7 @@ EOL;
case Type::T_IF: case Type::T_IF:
list(, $if) = $child; list(, $if) = $child;
assert($if instanceof IfBlock);
if ($this->isTruthy($this->reduce($if->cond, true))) { if ($this->isTruthy($this->reduce($if->cond, true))) {
return $this->compileChildren($if->children, $out); return $this->compileChildren($if->children, $out);
@@ -3106,8 +3124,8 @@ EOL;
foreach ($if->cases as $case) { foreach ($if->cases as $case) {
if ( if (
$case->type === Type::T_ELSE || $case instanceof ElseBlock ||
$case->type === Type::T_ELSEIF && $this->isTruthy($this->reduce($case->cond)) $case instanceof ElseifBlock && $this->isTruthy($this->reduce($case->cond))
) { ) {
return $this->compileChildren($case->children, $out); return $this->compileChildren($case->children, $out);
} }
@@ -3116,6 +3134,7 @@ EOL;
case Type::T_EACH: case Type::T_EACH:
list(, $each) = $child; list(, $each) = $child;
assert($each instanceof EachBlock);
$list = $this->coerceList($this->reduce($each->list), ',', true); $list = $this->coerceList($this->reduce($each->list), ',', true);
@@ -3150,6 +3169,7 @@ EOL;
case Type::T_WHILE: case Type::T_WHILE:
list(, $while) = $child; list(, $while) = $child;
assert($while instanceof WhileBlock);
while ($this->isTruthy($this->reduce($while->cond, true))) { while ($this->isTruthy($this->reduce($while->cond, true))) {
$ret = $this->compileChildren($while->children, $out); $ret = $this->compileChildren($while->children, $out);
@@ -3162,6 +3182,7 @@ EOL;
case Type::T_FOR: case Type::T_FOR:
list(, $for) = $child; list(, $for) = $child;
assert($for instanceof ForBlock);
$startNumber = $this->assertNumber($this->reduce($for->start, true)); $startNumber = $this->assertNumber($this->reduce($for->start, true));
$endNumber = $this->assertNumber($this->reduce($for->end, true)); $endNumber = $this->assertNumber($this->reduce($for->end, true));
@@ -3222,6 +3243,8 @@ EOL;
throw $this->error("Undefined mixin $name"); throw $this->error("Undefined mixin $name");
} }
assert($mixin instanceof CallableBlock);
$callingScope = $this->getStoreEnv(); $callingScope = $this->getStoreEnv();
// push scope, apply args // push scope, apply args
@@ -3394,7 +3417,7 @@ EOL;
* *
* @param array|Number $value * @param array|Number $value
* *
* @return boolean * @return bool
*/ */
public function isTruthy($value) public function isTruthy($value)
{ {
@@ -3406,7 +3429,7 @@ EOL;
* *
* @param string $value * @param string $value
* *
* @return boolean * @return bool
*/ */
protected function isImmediateRelationshipCombinator($value) protected function isImmediateRelationshipCombinator($value)
{ {
@@ -3418,7 +3441,7 @@ EOL;
* *
* @param array $value * @param array $value
* *
* @return boolean * @return bool
*/ */
protected function shouldEval($value) protected function shouldEval($value)
{ {
@@ -3441,7 +3464,7 @@ EOL;
* Reduce value * Reduce value
* *
* @param array|Number $value * @param array|Number $value
* @param boolean $inExp * @param bool $inExp
* *
* @return array|Number * @return array|Number
*/ */
@@ -3946,6 +3969,10 @@ EOL;
unset($value['enclosing']); unset($value['enclosing']);
} }
if ($value[1] === '' && count($value[2]) > 1) {
$value[1] = ' ';
}
return $value; return $value;
case Type::T_STRING: case Type::T_STRING:
@@ -4062,7 +4089,7 @@ EOL;
* *
* @param array|Number $left * @param array|Number $left
* @param array|Number $right * @param array|Number $right
* @param boolean $shouldEval * @param bool $shouldEval
* *
* @return array|Number|null * @return array|Number|null
*/ */
@@ -4090,7 +4117,7 @@ EOL;
* *
* @param array|Number $left * @param array|Number $left
* @param array|Number $right * @param array|Number $right
* @param boolean $shouldEval * @param bool $shouldEval
* *
* @return array|Number|null * @return array|Number|null
*/ */
@@ -4516,8 +4543,7 @@ EOL;
// force double quote as string quote for the output in certain cases // force double quote as string quote for the output in certain cases
if ( if (
$value[1] === "'" && $value[1] === "'" &&
(strpos($content, '"') === false or strpos($content, "'") !== false) && (strpos($content, '"') === false or strpos($content, "'") !== false)
strpbrk($content, '{}\\\'') !== false
) { ) {
$value[1] = '"'; $value[1] = '"';
} elseif ( } elseif (
@@ -4570,6 +4596,8 @@ EOL;
} }
} }
$separator = $delim === '/' ? ' /' : $delim;
$prefix_value = ''; $prefix_value = '';
if ($delim !== ' ') { if ($delim !== ' ') {
@@ -4608,7 +4636,7 @@ EOL;
$filtered[] = $compiled; $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: case Type::T_MAP:
$keys = $value[1]; $keys = $value[1];
@@ -4882,7 +4910,7 @@ EOL;
* *
* @param array $parent * @param array $parent
* @param array $child * @param array $child
* @param boolean $stillHasSelf * @param bool $stillHasSelf
* @param array $selfParentSelectors * @param array $selfParentSelectors
* @return array * @return array
@@ -4961,6 +4989,8 @@ EOL;
return $this->multiplyMedia($env->parent, $childQueries); return $this->multiplyMedia($env->parent, $childQueries);
} }
assert($env->block instanceof MediaBlock);
$parentQueries = isset($env->block->queryList) $parentQueries = isset($env->block->queryList)
? $env->block->queryList ? $env->block->queryList
: [[[Type::T_MEDIA_VALUE, $env->block->value]]]; : [[[Type::T_MEDIA_VALUE, $env->block->value]]];
@@ -5095,7 +5125,7 @@ EOL;
* *
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @param boolean $shadow * @param bool $shadow
* @param \ScssPhp\ScssPhp\Compiler\Environment $env * @param \ScssPhp\ScssPhp\Compiler\Environment $env
* @param mixed $valueUnreduced * @param mixed $valueUnreduced
* *
@@ -5201,9 +5231,9 @@ EOL;
* @internal * @internal
* *
* @param string $name * @param string $name
* @param boolean $shouldThrow * @param bool $shouldThrow
* @param \ScssPhp\ScssPhp\Compiler\Environment $env * @param \ScssPhp\ScssPhp\Compiler\Environment $env
* @param boolean $unreduced * @param bool $unreduced
* *
* @return mixed|null * @return mixed|null
*/ */
@@ -5270,7 +5300,7 @@ EOL;
* @param string $name * @param string $name
* @param \ScssPhp\ScssPhp\Compiler\Environment $env * @param \ScssPhp\ScssPhp\Compiler\Environment $env
* *
* @return boolean * @return bool
*/ */
protected function has($name, Environment $env = null) protected function has($name, Environment $env = null)
{ {
@@ -5460,7 +5490,7 @@ EOL;
* *
* @api * @api
* *
* @param integer $numberPrecision * @param int $numberPrecision
* *
* @return void * @return void
* *
@@ -5561,7 +5591,7 @@ EOL;
* *
* @api * @api
* *
* @param integer $sourceMap * @param int $sourceMap
* *
* @return void * @return void
* *
@@ -5963,7 +5993,7 @@ EOL;
* *
* @api * @api
* *
* @param boolean $ignoreErrors * @param bool $ignoreErrors
* *
* @return \ScssPhp\ScssPhp\Compiler * @return \ScssPhp\ScssPhp\Compiler
* *
@@ -6102,7 +6132,7 @@ EOL;
/** /**
* Beautify call stack for output * Beautify call stack for output
* *
* @param boolean $all * @param bool $all
* @param int|null $limit * @param int|null $limit
* *
* @return string * @return string
@@ -6162,7 +6192,7 @@ EOL;
/** /**
* Call SCSS @function * Call SCSS @function
* *
* @param Object $func * @param CallableBlock|null $func
* @param array $argValues * @param array $argValues
* *
* @return array|Number * @return array|Number
@@ -6737,9 +6767,8 @@ EOL;
* *
* @param array[] $argDef * @param array[] $argDef
* @param array|null $argValues * @param array|null $argValues
* @param boolean $storeInEnv * @param bool $storeInEnv
* @param boolean $reduce * @param bool $reduce only used if $storeInEnv = false
* only used if $storeInEnv = false
* *
* @return array<string, array|Number> * @return array<string, array|Number>
* *
@@ -6983,14 +7012,14 @@ EOL;
* *
* @param array|Number $item * @param array|Number $item
* @param string $delim * @param string $delim
* @param boolean $removeTrailingNull * @param bool $removeTrailingNull
* *
* @return array * @return array
*/ */
protected function coerceList($item, $delim = ',', $removeTrailingNull = false) protected function coerceList($item, $delim = ',', $removeTrailingNull = false)
{ {
if ($item instanceof Number) { if ($item instanceof Number) {
return [Type::T_LIST, $delim, [$item]]; return [Type::T_LIST, '', [$item]];
} }
if ($item[0] === Type::T_LIST) { if ($item[0] === Type::T_LIST) {
@@ -7018,10 +7047,10 @@ EOL;
]; ];
} }
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 int|Number $value
* @param boolean $isAlpha * @param bool $isAlpha
* *
* @return integer|mixed * @return int|mixed
*/ */
protected function compileRGBAValue($value, $isAlpha = false) protected function compileRGBAValue($value, $isAlpha = false)
{ {
@@ -7178,11 +7207,11 @@ EOL;
/** /**
* @param mixed $value * @param mixed $value
* @param integer|float $min * @param int|float $min
* @param integer|float $max * @param int|float $max
* @param boolean $isInt * @param bool $isInt
* *
* @return integer|mixed * @return int|mixed
*/ */
protected function compileColorPartValue($value, $min, $max, $isInt = true) protected function compileColorPartValue($value, $min, $max, $isInt = true)
{ {
@@ -7276,7 +7305,7 @@ EOL;
* *
* @param array|Number $value * @param array|Number $value
* *
* @return integer|float * @return int|float
* *
* @deprecated * @deprecated
*/ */
@@ -7414,7 +7443,7 @@ EOL;
* @param array|Number $value * @param array|Number $value
* @param string|null $varName * @param string|null $varName
* *
* @return integer * @return int
* *
* @throws SassScriptException * @throws SassScriptException
*/ */
@@ -7478,9 +7507,9 @@ EOL;
* *
* @internal * @internal
* *
* @param integer $red * @param int $red
* @param integer $green * @param int $green
* @param integer $blue * @param int $blue
* *
* @return array * @return array
*/ */
@@ -7584,9 +7613,9 @@ EOL;
* *
* @api * @api
* *
* @param integer $hue H from 0 to 360 * @param int $hue H from 0 to 360
* @param integer $whiteness W from 0 to 100 * @param int $whiteness W from 0 to 100
* @param integer $blackness B from 0 to 100 * @param int $blackness B from 0 to 100
* *
* @return array * @return array
*/ */
@@ -7616,9 +7645,9 @@ EOL;
* *
* @api * @api
* *
* @param integer $red * @param int $red
* @param integer $green * @param int $green
* @param integer $blue * @param int $blue
* *
* @return array * @return array
*/ */
@@ -7746,7 +7775,6 @@ EOL;
$values = []; $values = [];
foreach ($list[2] as $item) { foreach ($list[2] as $item) {
$values[] = $this->normalizeValue($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) protected function adjustHsl($color, $idx, $amount)
{ {
$hsl = $this->toHSL($color[1], $color[2], $color[3]); $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]); $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']; 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']; return [Type::T_KEYWORD, 'comma'];
} }
if ($list[1] === '/') {
return [Type::T_KEYWORD, 'slash'];
}
return [Type::T_KEYWORD, 'space']; 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 * @return string
* @throws CompilerException * @throws CompilerException
*
* @deprecated
*/ */
protected function listSeparatorForJoin($list1, $sep) protected function listSeparatorForJoin($list1, $sep)
{ {
@trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED);
if (! isset($sep)) { if (! isset($sep)) {
return $list1[1]; 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) protected function libJoin($args)
{ {
list($list1, $list2, $sep, $bracketed) = $args; list($list1, $list2, $sep, $bracketed) = $args;
$list1 = $this->coerceList($list1, ' ', true); $list1 = $this->coerceList($list1, ' ', true);
$list2 = $this->coerceList($list2, ' ', 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) { if ($bracketed === static::$true) {
$bracketed = 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])]; $res = [Type::T_LIST, $separator, array_merge($list1[2], $list2[2])];
if (isset($list1['enclosing'])) {
$res['enlcosing'] = $list1['enclosing'];
}
if ($bracketed) { if ($bracketed) {
$res['enclosing'] = 'bracket'; $res['enclosing'] = 'bracket';
@@ -9104,14 +9169,35 @@ will be an error in future versions of Sass.\n on line $line of $fname";
return $res; return $res;
} }
protected static $libAppend = ['list', 'val', 'separator:null']; protected static $libAppend = ['list', 'val', 'separator:auto'];
protected function libAppend($args) protected function libAppend($args)
{ {
list($list1, $value, $sep) = $args; list($list1, $value, $sep) = $args;
$list1 = $this->coerceList($list1, ' ', true); $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'])) { if (isset($list1['enclosing'])) {
$res['enclosing'] = $list1['enclosing']; $res['enclosing'] = $list1['enclosing'];
@@ -9514,6 +9600,8 @@ will be an error in future versions of Sass.\n on line $line of $fname";
) { ) {
$value['enclosing'] = 'forced_' . $value['enclosing']; $value['enclosing'] = 'forced_' . $value['enclosing'];
$force_enclosing_display = true; $force_enclosing_display = true;
} elseif (! \count($value[2])) {
$value['enclosing'] = 'forced_parent';
} }
foreach ($value[2] as $k => $listelement) { 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 $super
* @param array $sub * @param array $sub
* *
* @return boolean * @return bool
*/ */
protected function isSuperSelector($super, $sub) 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 $superParts
* @param array $subParts * @param array $subParts
* *
* @return boolean * @return bool
*/ */
protected function isSuperPart($superParts, $subParts) 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 // do the trick, happening $lastSelector to $previousSelector
$appended = []; $appended = [];
foreach ($previousSelectors as $previousSelector) {
foreach ($lastSelectors as $lastSelector) { foreach ($lastSelectors as $lastSelector) {
$previous = $previousSelectors; $previous = $previousSelector;
foreach ($previousSelector as $j => $previousSelectorParts) {
foreach ($lastSelector as $lastSelectorParts) { foreach ($lastSelector as $lastSelectorParts) {
foreach ($lastSelectorParts as $lastSelectorPart) { foreach ($lastSelectorParts as $lastSelectorPart) {
foreach ($previous as $i => $previousSelector) { $previous[$j][] = $lastSelectorPart;
foreach ($previousSelector as $j => $previousSelectorParts) {
$previous[$i][$j][] = $lastSelectorPart;
}
} }
} }
} }
foreach ($previous as $ps) { $appended[] = $previous;
$appended[] = $ps;
} }
} }
@@ -9858,7 +9943,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
* @param array $selectors * @param array $selectors
* @param array $extendee * @param array $extendee
* @param array $extender * @param array $extender
* @param boolean $replace * @param bool $replace
* *
* @return array * @return array
*/ */

View File

@@ -31,6 +31,26 @@ class Environment
*/ */
public $parent; public $parent;
/**
* @var Environment|null
*/
public $declarationScopeParent;
/**
* @var Environment|null
*/
public $parentStore;
/**
* @var array|null
*/
public $selectors;
/**
* @var string|null
*/
public $marker;
/** /**
* @var array * @var array
*/ */
@@ -42,7 +62,7 @@ class Environment
public $storeUnreduced; public $storeUnreduced;
/** /**
* @var integer * @var int
*/ */
public $depth; public $depth;
} }

View File

@@ -25,7 +25,7 @@ use ScssPhp\ScssPhp\SourceMap\SourceMapGenerator;
abstract class Formatter abstract class Formatter
{ {
/** /**
* @var integer * @var int
*/ */
public $indentLevel; public $indentLevel;
@@ -60,7 +60,7 @@ abstract class Formatter
public $assignSeparator; public $assignSeparator;
/** /**
* @var boolean * @var bool
*/ */
public $keepSemicolons; public $keepSemicolons;
@@ -70,12 +70,12 @@ abstract class Formatter
protected $currentBlock; protected $currentBlock;
/** /**
* @var integer * @var int
*/ */
protected $currentLine; protected $currentLine;
/** /**
* @var integer * @var int
*/ */
protected $currentColumn; protected $currentColumn;
@@ -239,7 +239,7 @@ abstract class Formatter
* *
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block
* *
* @return boolean * @return bool
*/ */
protected function testEmptyChildren($block) protected function testEmptyChildren($block)
{ {

View File

@@ -50,8 +50,6 @@ class Compressed extends Formatter
foreach ($block->lines as $index => $line) { foreach ($block->lines as $index => $line) {
if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') { if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') {
unset($block->lines[$index]); unset($block->lines[$index]);
} elseif (substr($line, 0, 3) === '/*!') {
$block->lines[$index] = '/*' . substr($line, 3);
} }
} }

View File

@@ -27,7 +27,7 @@ use ScssPhp\ScssPhp\Type;
class Nested extends Formatter class Nested extends Formatter
{ {
/** /**
* @var integer * @var int
*/ */
private $depth; private $depth;
@@ -221,7 +221,7 @@ class Nested extends Formatter
* *
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block * @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block
* *
* @return boolean * @return bool
*/ */
private function hasFlatChild($block) private function hasFlatChild($block)
{ {

View File

@@ -27,7 +27,7 @@ class OutputBlock
public $type; public $type;
/** /**
* @var integer * @var int
*/ */
public $depth; public $depth;
@@ -57,12 +57,12 @@ class OutputBlock
public $sourceName; public $sourceName;
/** /**
* @var integer|null * @var int|null
*/ */
public $sourceLine; public $sourceLine;
/** /**
* @var integer|null * @var int|null
*/ */
public $sourceColumn; public $sourceColumn;
} }

View File

@@ -27,7 +27,7 @@ abstract class Node
public $type; public $type;
/** /**
* @var integer * @var int
*/ */
public $sourceIndex; public $sourceIndex;

View File

@@ -38,7 +38,7 @@ class Number extends Node implements \ArrayAccess
const PRECISION = 10; const PRECISION = 10;
/** /**
* @var integer * @var int
* @deprecated use {Number::PRECISION} instead to read the precision. Configuring it is not supported anymore. * @deprecated use {Number::PRECISION} instead to read the precision. Configuring it is not supported anymore.
*/ */
public static $precision = self::PRECISION; public static $precision = self::PRECISION;
@@ -81,7 +81,7 @@ class Number extends Node implements \ArrayAccess
]; ];
/** /**
* @var integer|float * @var int|float
*/ */
private $dimension; private $dimension;
@@ -100,7 +100,7 @@ class Number extends Node implements \ArrayAccess
/** /**
* Initialize number * Initialize number
* *
* @param integer|float $dimension * @param int|float $dimension
* @param string[]|string $numeratorUnits * @param string[]|string $numeratorUnits
* @param string[] $denominatorUnits * @param string[] $denominatorUnits
* *
@@ -147,7 +147,7 @@ class Number extends Node implements \ArrayAccess
} }
/** /**
* {@inheritdoc} * @return bool
*/ */
#[\ReturnTypeWillChange] #[\ReturnTypeWillChange]
public function offsetExists($offset) public function offsetExists($offset)
@@ -173,7 +173,7 @@ class Number extends Node implements \ArrayAccess
} }
/** /**
* {@inheritdoc} * @return mixed
*/ */
#[\ReturnTypeWillChange] #[\ReturnTypeWillChange]
public function offsetGet($offset) public function offsetGet($offset)
@@ -200,7 +200,7 @@ class Number extends Node implements \ArrayAccess
} }
/** /**
* {@inheritdoc} * @return void
*/ */
#[\ReturnTypeWillChange] #[\ReturnTypeWillChange]
public function offsetSet($offset, $value) public function offsetSet($offset, $value)
@@ -209,7 +209,7 @@ class Number extends Node implements \ArrayAccess
} }
/** /**
* {@inheritdoc} * @return void
*/ */
#[\ReturnTypeWillChange] #[\ReturnTypeWillChange]
public function offsetUnset($offset) public function offsetUnset($offset)
@@ -220,7 +220,7 @@ class Number extends Node implements \ArrayAccess
/** /**
* Returns true if the number is unitless * Returns true if the number is unitless
* *
* @return boolean * @return bool
*/ */
public function unitless() public function unitless()
{ {

View File

@@ -12,6 +12,18 @@
namespace ScssPhp\ScssPhp; 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\Exception\ParserException;
use ScssPhp\ScssPhp\Logger\LoggerInterface; use ScssPhp\ScssPhp\Logger\LoggerInterface;
use ScssPhp\ScssPhp\Logger\QuietLogger; use ScssPhp\ScssPhp\Logger\QuietLogger;
@@ -125,7 +137,7 @@ class Parser
* @api * @api
* *
* @param string|null $sourceName * @param string|null $sourceName
* @param integer $sourceIndex * @param int $sourceIndex
* @param string|null $encoding * @param string|null $encoding
* @param Cache|null $cache * @param Cache|null $cache
* @param bool $cssOnly * @param bool $cssOnly
@@ -305,7 +317,7 @@ class Parser
* @param string $buffer * @param string $buffer
* @param string|array $out * @param string|array $out
* *
* @return boolean * @return bool
*/ */
public function parseValue($buffer, &$out) public function parseValue($buffer, &$out)
{ {
@@ -334,7 +346,7 @@ class Parser
* @param string|array $out * @param string|array $out
* @param bool $shouldValidate * @param bool $shouldValidate
* *
* @return boolean * @return bool
*/ */
public function parseSelector($buffer, &$out, $shouldValidate = true) public function parseSelector($buffer, &$out, $shouldValidate = true)
{ {
@@ -371,7 +383,7 @@ class Parser
* @param string $buffer * @param string $buffer
* @param string|array $out * @param string|array $out
* *
* @return boolean * @return bool
*/ */
public function parseMediaQueryList($buffer, &$out) public function parseMediaQueryList($buffer, &$out)
{ {
@@ -428,7 +440,7 @@ class Parser
* position into $s. Then if a chain fails, use $this->seek($s) to * position into $s. Then if a chain fails, use $this->seek($s) to
* go back where we started. * go back where we started.
* *
* @return boolean * @return bool
*/ */
protected function parseChunk() protected function parseChunk()
{ {
@@ -447,7 +459,8 @@ class Parser
) { ) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s); ! $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->selector = $selector;
$atRoot->with = $with; $atRoot->with = $with;
@@ -461,7 +474,8 @@ class Parser
$this->mediaQueryList($mediaQueryList) && $this->mediaQueryList($mediaQueryList) &&
$this->matchChar('{', false) $this->matchChar('{', false)
) { ) {
$media = $this->pushSpecialBlock(Type::T_MEDIA, $s); $media = new MediaBlock();
$this->registerPushedBlock($media, $s);
$media->queryList = $mediaQueryList[2]; $media->queryList = $mediaQueryList[2];
return true; return true;
@@ -477,7 +491,8 @@ class Parser
) { ) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s); ! $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->name = $mixinName;
$mixin->args = $args; $mixin->args = $args;
@@ -509,7 +524,8 @@ class Parser
]; ];
if (! empty($hasBlock)) { if (! empty($hasBlock)) {
$include = $this->pushSpecialBlock(Type::T_INCLUDE, $s); $include = new ContentBlock();
$this->registerPushedBlock($include, $s);
$include->child = $child; $include->child = $child;
} else { } else {
$this->append($child, $s); $this->append($child, $s);
@@ -599,7 +615,8 @@ class Parser
) { ) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s); ! $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->name = $fnName;
$func->args = $args; $func->args = $args;
@@ -631,7 +648,8 @@ class Parser
) { ) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s); ! $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) { foreach ($varNames[2] as $varName) {
$each->vars[] = $varName[1]; $each->vars[] = $varName[1];
@@ -660,7 +678,8 @@ class Parser
$cond = reset($cond[2]); $cond = reset($cond[2]);
} }
$while = $this->pushSpecialBlock(Type::T_WHILE, $s); $while = new WhileBlock();
$this->registerPushedBlock($while, $s);
$while->cond = $cond; $while->cond = $cond;
return true; return true;
@@ -680,7 +699,8 @@ class Parser
) { ) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s); ! $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->var = $varName[1];
$for->start = $start; $for->start = $start;
$for->end = $end; $for->end = $end;
@@ -697,7 +717,8 @@ class Parser
) { ) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s); ! $this->cssOnly || $this->assertPlainCssValid(false, $s);
$if = $this->pushSpecialBlock(Type::T_IF, $s); $if = new IfBlock();
$this->registerPushedBlock($if, $s);
while ( while (
$cond[0] === Type::T_LIST && $cond[0] === Type::T_LIST &&
@@ -776,20 +797,21 @@ class Parser
if (isset($last) && $last[0] === Type::T_IF) { if (isset($last) && $last[0] === Type::T_IF) {
list(, $if) = $last; list(, $if) = $last;
assert($if instanceof IfBlock);
if ($this->literal('@else', 5)) { if ($this->literal('@else', 5)) {
if ($this->matchChar('{', false)) { if ($this->matchChar('{', false)) {
$else = $this->pushSpecialBlock(Type::T_ELSE, $s); $else = new ElseBlock();
} elseif ( } elseif (
$this->literal('if', 2) && $this->literal('if', 2) &&
$this->functionCallArgumentsList($cond, false, '{', false) $this->functionCallArgumentsList($cond, false, '{', false)
) { ) {
$else = $this->pushSpecialBlock(Type::T_ELSEIF, $s); $else = new ElseifBlock();
$else->cond = $cond; $else->cond = $cond;
} }
if (isset($else)) { if (isset($else)) {
$else->dontAppend = true; $this->registerPushedBlock($else, $s);
$if->cases[] = $else; $if->cases[] = $else;
return true; return true;
@@ -827,7 +849,8 @@ class Parser
($t1 = $this->supportsQuery($supportQuery)) && ($t1 = $this->supportsQuery($supportQuery)) &&
($t2 = $this->matchChar('{', false)) ($t2 = $this->matchChar('{', false))
) { ) {
$directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s); $directive = new DirectiveBlock();
$this->registerPushedBlock($directive, $s);
$directive->name = 'supports'; $directive->name = 'supports';
$directive->value = $supportQuery; $directive->value = $supportQuery;
@@ -848,11 +871,12 @@ class Parser
$dirName = [Type::T_STRING, '', $dirName]; $dirName = [Type::T_STRING, '', $dirName];
} }
if ($dirName === 'media') { if ($dirName === 'media') {
$directive = $this->pushSpecialBlock(Type::T_MEDIA, $s); $directive = new MediaBlock();
} else { } else {
$directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s); $directive = new DirectiveBlock();
$directive->name = $dirName; $directive->name = $dirName;
} }
$this->registerPushedBlock($directive, $s);
if (isset($dirValue)) { if (isset($dirValue)) {
! $this->cssOnly || ($dirValue = $this->assertPlainCssValid($dirValue)); ! $this->cssOnly || ($dirValue = $this->assertPlainCssValid($dirValue));
@@ -1028,7 +1052,8 @@ class Parser
if ($this->matchChar('{', false)) { if ($this->matchChar('{', false)) {
! $this->cssOnly || $this->assertPlainCssValid(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->prefix = $name;
$propBlock->hasValue = $foundSomething; $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; $include = $block->child;
assert(\is_array($include));
unset($block->child); unset($block->child);
$include[3] = $block; $include[3] = $block;
$this->append($include, $s); $this->append($include, $s);
} elseif (empty($block->dontAppend)) { } elseif (!$block instanceof ElseBlock && !$block instanceof ElseifBlock) {
$type = isset($block->type) ? $block->type : Type::T_BLOCK; $type = isset($block->type) ? $block->type : Type::T_BLOCK;
$this->append([$type, $block], $s); $this->append([$type, $block], $s);
} }
@@ -1088,20 +1114,34 @@ class Parser
* Push block onto parse tree * Push block onto parse tree
* *
* @param array|null $selectors * @param array|null $selectors
* @param integer $pos * @param int $pos
* *
* @return Block * @return Block
*/ */
protected function pushBlock($selectors, $pos = 0) 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); list($line, $column) = $this->getSourcePosition($pos);
$b = new Block();
$b->sourceName = $this->sourceName; $b->sourceName = $this->sourceName;
$b->sourceLine = $line; $b->sourceLine = $line;
$b->sourceColumn = $column; $b->sourceColumn = $column;
$b->sourceIndex = $this->sourceIndex; $b->sourceIndex = $this->sourceIndex;
$b->selectors = $selectors;
$b->comments = []; $b->comments = [];
$b->parent = $this->env; $b->parent = $this->env;
@@ -1126,15 +1166,15 @@ class Parser
$this->append(null); $this->append(null);
} }
} }
return $b;
} }
/** /**
* Push special (named) block onto parse tree * Push special (named) block onto parse tree
* *
* @deprecated
*
* @param string $type * @param string $type
* @param integer $pos * @param int $pos
* *
* @return Block * @return Block
*/ */
@@ -1185,9 +1225,9 @@ class Parser
* *
* @param string $regex * @param string $regex
* @param array $out * @param array $out
* @param integer $from * @param int $from
* *
* @return integer * @return int
*/ */
protected function peek($regex, &$out, $from = null) 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) * Seek to position in input stream (or return current position in input stream)
* *
* @param integer $where * @param int $where
*/ */
protected function seek($where) protected function seek($where)
{ {
@@ -1216,6 +1256,7 @@ class Parser
* *
* @param array|false $parsed * @param array|false $parsed
* @param int $startPos * @param int $startPos
*
* @throws ParserException * @throws ParserException
*/ */
protected function assertPlainCssValid($parsed, $startPos = null) protected function assertPlainCssValid($parsed, $startPos = null)
@@ -1243,7 +1284,10 @@ class Parser
/** /**
* Check a parsed element is plain CSS Valid * Check a parsed element is plain CSS Valid
*
* @param array $parsed * @param array $parsed
* @param bool $allowExpression
*
* @return bool|array * @return bool|array
*/ */
protected function isPlainCssValidElement($parsed, $allowExpression = false) protected function isPlainCssValidElement($parsed, $allowExpression = false)
@@ -1423,7 +1467,7 @@ class Parser
* @param array $m Matches (passed by reference) * @param array $m Matches (passed by reference)
* @param string $delim Delimiter * @param string $delim Delimiter
* *
* @return boolean True if match; false otherwise * @return bool True if match; false otherwise
*/ */
protected function matchString(&$m, $delim) protected function matchString(&$m, $delim)
{ {
@@ -1461,9 +1505,9 @@ class Parser
* *
* @param string $regex * @param string $regex
* @param array $out * @param array $out
* @param boolean $eatWhitespace * @param bool $eatWhitespace
* *
* @return boolean * @return bool
*/ */
protected function match($regex, &$out, $eatWhitespace = null) protected function match($regex, &$out, $eatWhitespace = null)
{ {
@@ -1490,9 +1534,9 @@ class Parser
* Match a single string * Match a single string
* *
* @param string $char * @param string $char
* @param boolean $eatWhitespace * @param bool $eatWhitespace
* *
* @return boolean * @return bool
*/ */
protected function matchChar($char, $eatWhitespace = null) protected function matchChar($char, $eatWhitespace = null)
{ {
@@ -1517,10 +1561,10 @@ class Parser
* Match literal string * Match literal string
* *
* @param string $what * @param string $what
* @param integer $len * @param int $len
* @param boolean $eatWhitespace * @param bool $eatWhitespace
* *
* @return boolean * @return bool
*/ */
protected function literal($what, $len, $eatWhitespace = null) protected function literal($what, $len, $eatWhitespace = null)
{ {
@@ -1544,7 +1588,7 @@ class Parser
/** /**
* Match some whitespace * Match some whitespace
* *
* @return boolean * @return bool
*/ */
protected function whitespace() protected function whitespace()
{ {
@@ -1643,7 +1687,7 @@ class Parser
* Append statement to current block * Append statement to current block
* *
* @param array|null $statement * @param array|null $statement
* @param integer $pos * @param int $pos
*/ */
protected function append($statement, $pos = null) protected function append($statement, $pos = null)
{ {
@@ -1688,7 +1732,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function mediaQueryList(&$out) protected function mediaQueryList(&$out)
{ {
@@ -1700,7 +1744,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function mediaQuery(&$out) protected function mediaQuery(&$out)
{ {
@@ -1754,7 +1798,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function supportsQuery(&$out) protected function supportsQuery(&$out)
{ {
@@ -1887,7 +1931,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function mediaExpression(&$out) protected function mediaExpression(&$out)
{ {
@@ -1920,7 +1964,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function argValues(&$out) protected function argValues(&$out)
{ {
@@ -1945,7 +1989,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function argValue(&$out) protected function argValue(&$out)
{ {
@@ -2026,9 +2070,9 @@ class Parser
* Parse directive value list that considers $vars as keyword * Parse directive value list that considers $vars as keyword
* *
* @param array $out * @param array $out
* @param boolean|string $endChar * @param bool|string $endChar
* *
* @return boolean * @return bool
*/ */
protected function directiveValue(&$out, $endChar = false) protected function directiveValue(&$out, $endChar = false)
{ {
@@ -2089,7 +2133,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function valueList(&$out) protected function valueList(&$out)
{ {
@@ -2105,10 +2149,11 @@ class Parser
* Parse a function call, where externals () are part of the call * Parse a function call, where externals () are part of the call
* and not of the value list * and not of the value list
* *
* @param $out * @param array $out
* @param bool $mandatoryEnclos * @param bool $mandatoryEnclos
* @param null|string $charAfter * @param null|string $charAfter
* @param null|bool $eatWhiteSp * @param null|bool $eatWhiteSp
*
* @return bool * @return bool
*/ */
protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $charAfter = null, $eatWhiteSp = null) protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $charAfter = null, $eatWhiteSp = null)
@@ -2145,7 +2190,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function spaceList(&$out) protected function spaceList(&$out)
{ {
@@ -2158,9 +2203,9 @@ class Parser
* @param array $out * @param array $out
* @param string $parseItem The name of the method used to parse items * @param string $parseItem The name of the method used to parse items
* @param string $delim * @param string $delim
* @param boolean $flatten * @param bool $flatten
* *
* @return boolean * @return bool
*/ */
protected function genericList(&$out, $parseItem, $delim = '', $flatten = true) protected function genericList(&$out, $parseItem, $delim = '', $flatten = true)
{ {
@@ -2257,10 +2302,10 @@ class Parser
* Parse expression * Parse expression
* *
* @param array $out * @param array $out
* @param boolean $listOnly * @param bool $listOnly
* @param boolean $lookForExp * @param bool $lookForExp
* *
* @return boolean * @return bool
*/ */
protected function expression(&$out, $listOnly = false, $lookForExp = true) protected function expression(&$out, $listOnly = false, $lookForExp = true)
{ {
@@ -2322,11 +2367,11 @@ class Parser
* Parse expression specifically checking for lists in parenthesis or brackets * Parse expression specifically checking for lists in parenthesis or brackets
* *
* @param array $out * @param array $out
* @param integer $s * @param int $s
* @param string $closingParen * @param string $closingParen
* @param array $allowedTypes * @param array $allowedTypes
* *
* @return boolean * @return bool
*/ */
protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP]) protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP])
{ {
@@ -2382,7 +2427,7 @@ class Parser
* Parse left-hand side of subexpression * Parse left-hand side of subexpression
* *
* @param array $lhs * @param array $lhs
* @param integer $minP * @param int $minP
* *
* @return array * @return array
*/ */
@@ -2437,7 +2482,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function value(&$out) protected function value(&$out)
{ {
@@ -2645,7 +2690,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function parenValue(&$out) protected function parenValue(&$out)
{ {
@@ -2684,7 +2729,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function progid(&$out) protected function progid(&$out)
{ {
@@ -2717,7 +2762,7 @@ class Parser
* @param string $name * @param string $name
* @param array $func * @param array $func
* *
* @return boolean * @return bool
*/ */
protected function func($name, &$func) protected function func($name, &$func)
{ {
@@ -2771,7 +2816,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function argumentList(&$out) protected function argumentList(&$out)
{ {
@@ -2816,7 +2861,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function argumentDef(&$out) protected function argumentDef(&$out)
{ {
@@ -2878,7 +2923,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function map(&$out) protected function map(&$out)
{ {
@@ -2920,7 +2965,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function color(&$out) protected function color(&$out)
{ {
@@ -2946,7 +2991,7 @@ class Parser
* *
* @param array $unit * @param array $unit
* *
* @return boolean * @return bool
*/ */
protected function unit(&$unit) protected function unit(&$unit)
{ {
@@ -2971,8 +3016,9 @@ class Parser
* Parse string * Parse string
* *
* @param array $out * @param array $out
* @param bool $keepDelimWithInterpolation
* *
* @return boolean * @return bool
*/ */
protected function string(&$out, $keepDelimWithInterpolation = false) protected function string(&$out, $keepDelimWithInterpolation = false)
{ {
@@ -3054,6 +3100,7 @@ class Parser
/** /**
* @param string $out * @param string $out
* @param bool $inKeywords * @param bool $inKeywords
*
* @return bool * @return bool
*/ */
protected function matchEscapeCharacter(&$out, $inKeywords = false) protected function matchEscapeCharacter(&$out, $inKeywords = false)
@@ -3104,9 +3151,9 @@ class Parser
* Parse keyword or interpolation * Parse keyword or interpolation
* *
* @param array $out * @param array $out
* @param boolean $restricted * @param bool $restricted
* *
* @return boolean * @return bool
*/ */
protected function mixedKeyword(&$out, $restricted = false) protected function mixedKeyword(&$out, $restricted = false)
{ {
@@ -3151,10 +3198,10 @@ class Parser
* @param array $out * @param array $out
* @param string $nestOpen * @param string $nestOpen
* @param string $nestClose * @param string $nestClose
* @param boolean $rtrim * @param bool $rtrim
* @param string $disallow * @param string $disallow
* *
* @return boolean * @return bool
*/ */
protected function openString($end, &$out, $nestOpen = null, $nestClose = null, $rtrim = true, $disallow = null) protected function openString($end, &$out, $nestOpen = null, $nestClose = null, $rtrim = true, $disallow = null)
{ {
@@ -3230,9 +3277,9 @@ class Parser
* Parser interpolation * Parser interpolation
* *
* @param string|array $out * @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) protected function interpolation(&$out, $lookWhite = true)
{ {
@@ -3287,7 +3334,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function propertyName(&$out) protected function propertyName(&$out)
{ {
@@ -3342,7 +3389,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function customProperty(&$out) protected function customProperty(&$out)
{ {
@@ -3400,9 +3447,9 @@ class Parser
* Parse comma separated selector list * Parse comma separated selector list
* *
* @param array $out * @param array $out
* @param string|boolean $subSelector * @param string|bool $subSelector
* *
* @return boolean * @return bool
*/ */
protected function selectors(&$out, $subSelector = false) protected function selectors(&$out, $subSelector = false)
{ {
@@ -3436,9 +3483,9 @@ class Parser
* Parse whitespace separated selector list * Parse whitespace separated selector list
* *
* @param array $out * @param array $out
* @param string|boolean $subSelector * @param string|bool $subSelector
* *
* @return boolean * @return bool
*/ */
protected function selector(&$out, $subSelector = false) protected function selector(&$out, $subSelector = false)
{ {
@@ -3495,6 +3542,7 @@ class Parser
* *
* @param string $out * @param string $out
* @param bool $keepEscapedNumber * @param bool $keepEscapedNumber
*
* @return bool * @return bool
*/ */
protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = false) protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = false)
@@ -3539,9 +3587,9 @@ class Parser
* }} * }}
* *
* @param array $out * @param array $out
* @param string|boolean $subSelector * @param string|bool $subSelector
* *
* @return boolean * @return bool
*/ */
protected function selectorSingle(&$out, $subSelector = false) protected function selectorSingle(&$out, $subSelector = false)
{ {
@@ -3765,7 +3813,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function variable(&$out) protected function variable(&$out)
{ {
@@ -3793,10 +3841,10 @@ class Parser
* Parse a keyword * Parse a keyword
* *
* @param string $word * @param string $word
* @param boolean $eatWhitespace * @param bool $eatWhitespace
* @param boolean $inSelector * @param bool $inSelector
* *
* @return boolean * @return bool
*/ */
protected function keyword(&$word, $eatWhitespace = null, $inSelector = false) protected function keyword(&$word, $eatWhitespace = null, $inSelector = false)
{ {
@@ -3860,10 +3908,10 @@ class Parser
* Parse a keyword that should not start with a number * Parse a keyword that should not start with a number
* *
* @param string $word * @param string $word
* @param boolean $eatWhitespace * @param bool $eatWhitespace
* @param boolean $inSelector * @param bool $inSelector
* *
* @return boolean * @return bool
*/ */
protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector = false) protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector = false)
{ {
@@ -3883,7 +3931,7 @@ class Parser
* *
* @param string|array $placeholder * @param string|array $placeholder
* *
* @return boolean * @return bool
*/ */
protected function placeholder(&$placeholder) protected function placeholder(&$placeholder)
{ {
@@ -3912,7 +3960,7 @@ class Parser
* *
* @param array $out * @param array $out
* *
* @return boolean * @return bool
*/ */
protected function url(&$out) protected function url(&$out)
{ {
@@ -3947,7 +3995,7 @@ class Parser
* Consume an end of statement delimiter * Consume an end of statement delimiter
* @param bool $eatWhitespace * @param bool $eatWhitespace
* *
* @return boolean * @return bool
*/ */
protected function end($eatWhitespace = null) protected function end($eatWhitespace = null)
{ {
@@ -4065,7 +4113,7 @@ class Parser
/** /**
* Get source line number and column (given character position in the buffer) * Get source line number and column (given character position in the buffer)
* *
* @param integer $pos * @param int $pos
* *
* @return array * @return array
*/ */

View File

@@ -164,7 +164,7 @@ class Base64
/** /**
* Convert to base64 * Convert to base64
* *
* @param integer $value * @param int $value
* *
* @return string * @return string
*/ */
@@ -178,7 +178,7 @@ class Base64
* *
* @param string $value * @param string $value
* *
* @return integer * @return int
*/ */
public static function decode($value) public static function decode($value)
{ {

View File

@@ -51,7 +51,7 @@ class Base64VLQ
/** /**
* Returns the VLQ encoded value. * Returns the VLQ encoded value.
* *
* @param integer $value * @param int $value
* *
* @return string * @return string
*/ */
@@ -80,9 +80,9 @@ class Base64VLQ
* Decodes VLQValue. * Decodes VLQValue.
* *
* @param string $str * @param string $str
* @param integer $index * @param int $index
* *
* @return integer * @return int
*/ */
public static function decode($str, &$index) public static function decode($str, &$index)
{ {
@@ -107,9 +107,9 @@ class Base64VLQ
* 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
* 2 becomes 4 (100 binary), -2 becomes 5 (101 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) private static function toVLQSigned($value)
{ {
@@ -126,9 +126,9 @@ class Base64VLQ
* 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
* 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 * 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) private static function fromVLQSigned($value)
{ {

View File

@@ -114,10 +114,10 @@ class SourceMapGenerator
/** /**
* Adds a mapping * Adds a mapping
* *
* @param integer $generatedLine The line number in generated file * @param int $generatedLine The line number in generated file
* @param integer $generatedColumn The column number in generated file * @param int $generatedColumn The column number in generated file
* @param integer $originalLine The line number in original file * @param int $originalLine The line number in original file
* @param integer $originalColumn The column number in original file * @param int $originalColumn The column number in original file
* @param string $sourceFile The original source file * @param string $sourceFile The original source file
* *
* @return void * @return void
@@ -326,7 +326,7 @@ class SourceMapGenerator
* *
* @param string $filename * @param string $filename
* *
* @return integer|false * @return int|false
*/ */
protected function findFileIndex($filename) protected function findFileIndex($filename)
{ {
@@ -363,7 +363,7 @@ class SourceMapGenerator
* Fix windows paths * Fix windows paths
* *
* @param string $path * @param string $path
* @param boolean $addEndSlash * @param bool $addEndSlash
* *
* @return string * @return string
*/ */

View File

@@ -19,58 +19,190 @@ namespace ScssPhp\ScssPhp;
*/ */
class Type class Type
{ {
/**
* @internal
*/
const T_ASSIGN = 'assign'; const T_ASSIGN = 'assign';
/**
* @internal
*/
const T_AT_ROOT = 'at-root'; const T_AT_ROOT = 'at-root';
/**
* @internal
*/
const T_BLOCK = 'block'; const T_BLOCK = 'block';
/** @deprecated */ /**
* @deprecated
* @internal
*/
const T_BREAK = 'break'; const T_BREAK = 'break';
/**
* @internal
*/
const T_CHARSET = 'charset'; const T_CHARSET = 'charset';
const T_COLOR = 'color'; const T_COLOR = 'color';
/**
* @internal
*/
const T_COMMENT = 'comment'; const T_COMMENT = 'comment';
/** @deprecated */ /**
* @deprecated
* @internal
*/
const T_CONTINUE = 'continue'; const T_CONTINUE = 'continue';
/** @deprecated */ /**
* @deprecated
* @internal
*/
const T_CONTROL = 'control'; const T_CONTROL = 'control';
/**
* @internal
*/
const T_CUSTOM_PROPERTY = 'custom'; const T_CUSTOM_PROPERTY = 'custom';
/**
* @internal
*/
const T_DEBUG = 'debug'; const T_DEBUG = 'debug';
/**
* @internal
*/
const T_DIRECTIVE = 'directive'; const T_DIRECTIVE = 'directive';
/**
* @internal
*/
const T_EACH = 'each'; const T_EACH = 'each';
/**
* @internal
*/
const T_ELSE = 'else'; const T_ELSE = 'else';
/**
* @internal
*/
const T_ELSEIF = 'elseif'; const T_ELSEIF = 'elseif';
/**
* @internal
*/
const T_ERROR = 'error'; const T_ERROR = 'error';
/**
* @internal
*/
const T_EXPRESSION = 'exp'; const T_EXPRESSION = 'exp';
/**
* @internal
*/
const T_EXTEND = 'extend'; const T_EXTEND = 'extend';
/**
* @internal
*/
const T_FOR = 'for'; const T_FOR = 'for';
const T_FUNCTION = 'function'; const T_FUNCTION = 'function';
/**
* @internal
*/
const T_FUNCTION_REFERENCE = 'function-reference'; const T_FUNCTION_REFERENCE = 'function-reference';
/**
* @internal
*/
const T_FUNCTION_CALL = 'fncall'; const T_FUNCTION_CALL = 'fncall';
/**
* @internal
*/
const T_HSL = 'hsl'; const T_HSL = 'hsl';
/**
* @internal
*/
const T_HWB = 'hwb'; const T_HWB = 'hwb';
/**
* @internal
*/
const T_IF = 'if'; const T_IF = 'if';
/**
* @internal
*/
const T_IMPORT = 'import'; const T_IMPORT = 'import';
/**
* @internal
*/
const T_INCLUDE = 'include'; const T_INCLUDE = 'include';
/**
* @internal
*/
const T_INTERPOLATE = 'interpolate'; const T_INTERPOLATE = 'interpolate';
/**
* @internal
*/
const T_INTERPOLATED = 'interpolated'; const T_INTERPOLATED = 'interpolated';
/**
* @internal
*/
const T_KEYWORD = 'keyword'; const T_KEYWORD = 'keyword';
const T_LIST = 'list'; const T_LIST = 'list';
const T_MAP = 'map'; const T_MAP = 'map';
/**
* @internal
*/
const T_MEDIA = 'media'; const T_MEDIA = 'media';
/**
* @internal
*/
const T_MEDIA_EXPRESSION = 'mediaExp'; const T_MEDIA_EXPRESSION = 'mediaExp';
/**
* @internal
*/
const T_MEDIA_TYPE = 'mediaType'; const T_MEDIA_TYPE = 'mediaType';
/**
* @internal
*/
const T_MEDIA_VALUE = 'mediaValue'; const T_MEDIA_VALUE = 'mediaValue';
/**
* @internal
*/
const T_MIXIN = 'mixin'; const T_MIXIN = 'mixin';
/**
* @internal
*/
const T_MIXIN_CONTENT = 'mixin_content'; const T_MIXIN_CONTENT = 'mixin_content';
/**
* @internal
*/
const T_NESTED_PROPERTY = 'nestedprop'; const T_NESTED_PROPERTY = 'nestedprop';
/**
* @internal
*/
const T_NOT = 'not'; const T_NOT = 'not';
const T_NULL = 'null'; const T_NULL = 'null';
const T_NUMBER = 'number'; const T_NUMBER = 'number';
/**
* @internal
*/
const T_RETURN = 'return'; const T_RETURN = 'return';
/**
* @internal
*/
const T_ROOT = 'root'; const T_ROOT = 'root';
/**
* @internal
*/
const T_SCSSPHP_IMPORT_ONCE = 'scssphp-import-once'; const T_SCSSPHP_IMPORT_ONCE = 'scssphp-import-once';
/**
* @internal
*/
const T_SELF = 'self'; const T_SELF = 'self';
const T_STRING = 'string'; const T_STRING = 'string';
/**
* @internal
*/
const T_UNARY = 'unary'; const T_UNARY = 'unary';
/**
* @internal
*/
const T_VARIABLE = 'var'; const T_VARIABLE = 'var';
/**
* @internal
*/
const T_WARN = 'warn'; const T_WARN = 'warn';
/**
* @internal
*/
const T_WHILE = 'while'; const T_WHILE = 'while';
} }

View File

@@ -79,7 +79,7 @@ class Util
/** /**
* mb_chr() wrapper * mb_chr() wrapper
* *
* @param integer $code * @param int $code
* *
* @return string * @return string
*/ */

View File

@@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp;
*/ */
class Version class Version
{ {
const VERSION = '1.9.0'; const VERSION = '1.10.0';
} }