From b66a61addb6c8e66cb26fcf74b532d68891267e4 Mon Sep 17 00:00:00 2001
From: Marvin Borner
Date: Wed, 23 May 2018 22:23:28 +0200
Subject: Refactored code, many fixes and improvements in chat backend+frontend
---
main/app/sprinkles/core/asset-bundles.json | 274 +-
.../sprinkles/core/assets/SiteAssets/css/main.css | 1 -
.../sprinkles/core/assets/SiteAssets/js/chat.js | 18 +-
.../core/assets/SiteAssets/js/language.js | 36 -
.../sprinkles/core/assets/SiteAssets/js/main.js | 18 +-
.../core/assets/SiteAssets/js/openpgp.worker.js | 1 -
.../php/Chatserver/src/ChatProcessor.php | 27 +-
.../core/assets/SiteAssets/php/composer.json | 16 +-
.../core/assets/SiteAssets/php/scripts.php | 2 +
.../core/assets/SiteAssets/php/stylesheet.php | 2 +
.../php/vendor/cboden/ratchet/composer.json | 70 +-
.../php/vendor/cboden/ratchet/phpunit.xml.dist | 16 +-
.../src/Ratchet/AbstractConnectionDecorator.php | 4 +-
.../php/vendor/cboden/ratchet/src/Ratchet/App.php | 37 +-
.../ratchet/src/Ratchet/ComponentInterface.php | 6 +-
.../ratchet/src/Ratchet/ConnectionInterface.php | 4 +-
.../src/Ratchet/Http/CloseResponseTrait.php | 7 +-
.../ratchet/src/Ratchet/Http/HttpRequestParser.php | 9 +-
.../cboden/ratchet/src/Ratchet/Http/HttpServer.php | 15 +-
.../src/Ratchet/Http/HttpServerInterface.php | 11 +-
.../src/Ratchet/Http/NoOpHttpServerController.php | 7 +-
.../ratchet/src/Ratchet/Http/OriginCheck.php | 9 +-
.../cboden/ratchet/src/Ratchet/Http/Router.php | 11 +-
.../src/Ratchet/MessageComponentInterface.php | 4 +-
.../ratchet/src/Ratchet/MessageInterface.php | 6 +-
.../ratchet/src/Ratchet/Server/EchoServer.php | 5 +-
.../ratchet/src/Ratchet/Server/FlashPolicy.php | 33 +-
.../ratchet/src/Ratchet/Server/IoConnection.php | 5 +-
.../cboden/ratchet/src/Ratchet/Server/IoServer.php | 33 +-
.../ratchet/src/Ratchet/Server/IpBlackList.php | 7 +-
.../Ratchet/Session/Serialize/HandlerInterface.php | 4 +-
.../Ratchet/Session/Serialize/PhpBinaryHandler.php | 10 +-
.../src/Ratchet/Session/Serialize/PhpHandler.php | 12 +-
.../src/Ratchet/Session/SessionProvider.php | 71 +-
.../Ratchet/Session/Storage/Proxy/VirtualProxy.php | 7 +-
.../Session/Storage/VirtualSessionStorage.php | 27 +-
.../cboden/ratchet/src/Ratchet/Wamp/Exception.php | 4 +-
.../ratchet/src/Ratchet/Wamp/JsonException.php | 16 +-
.../ratchet/src/Ratchet/Wamp/ServerProtocol.php | 39 +-
.../cboden/ratchet/src/Ratchet/Wamp/Topic.php | 5 +-
.../ratchet/src/Ratchet/Wamp/TopicManager.php | 5 +-
.../ratchet/src/Ratchet/Wamp/WampConnection.php | 33 +-
.../cboden/ratchet/src/Ratchet/Wamp/WampServer.php | 5 +-
.../src/Ratchet/Wamp/WampServerInterface.php | 23 +-
.../ratchet/src/Ratchet/WebSocket/ConnContext.php | 5 +-
.../Ratchet/WebSocket/MessageCallableInterface.php | 5 +-
.../WebSocket/MessageComponentInterface.php | 5 +-
.../ratchet/src/Ratchet/WebSocket/WsConnection.php | 9 +-
.../ratchet/src/Ratchet/WebSocket/WsServer.php | 52 +-
.../src/Ratchet/WebSocket/WsServerInterface.php | 4 +-
.../ratchet/tests/autobahn/bin/fuzzingserver.php | 30 +-
.../ratchet/tests/autobahn/fuzzingclient-all.json | 52 +-
.../tests/autobahn/fuzzingclient-profile.json | 37 +-
.../tests/autobahn/fuzzingclient-quick.json | 28 +-
.../php/vendor/cboden/ratchet/tests/bootstrap.php | 4 +-
.../Ratchet/AbstractMessageComponentTestCase.php | 10 +-
.../tests/helpers/Ratchet/Mock/Component.php | 7 +-
.../tests/helpers/Ratchet/Mock/Connection.php | 11 +-
.../helpers/Ratchet/Mock/ConnectionDecorator.php | 9 +-
.../tests/helpers/Ratchet/Mock/WampComponent.php | 5 +-
.../tests/helpers/Ratchet/NullComponent.php | 29 +-
.../Ratchet/Wamp/Stub/WsWampServerInterface.php | 5 +-
.../WebSocket/Stub/WsMessageComponentInterface.php | 5 +-
.../tests/unit/AbstractConnectionDecoratorTest.php | 17 +-
.../tests/unit/Http/HttpRequestParserTest.php | 16 +-
.../ratchet/tests/unit/Http/HttpServerTest.php | 17 +-
.../ratchet/tests/unit/Http/OriginCheckTest.php | 5 +-
.../cboden/ratchet/tests/unit/Http/RouterTest.php | 25 +-
.../ratchet/tests/unit/Server/EchoServerTest.php | 5 +-
.../tests/unit/Server/FlashPolicyComponentTest.php | 87 +-
.../ratchet/tests/unit/Server/IoConnectionTest.php | 5 +-
.../ratchet/tests/unit/Server/IoServerTest.php | 13 +-
.../tests/unit/Server/IpBlackListComponentTest.php | 20 +-
.../unit/Session/Serialize/PhpHandlerTest.php | 17 +-
.../tests/unit/Session/SessionComponentTest.php | 23 +-
.../Storage/VirtualSessionStoragePDOTest.php | 7 +-
.../ratchet/tests/unit/Wamp/ServerProtocolTest.php | 67 +-
.../ratchet/tests/unit/Wamp/TopicManagerTest.php | 52 +-
.../cboden/ratchet/tests/unit/Wamp/TopicTest.php | 48 +-
.../ratchet/tests/unit/Wamp/WampConnectionTest.php | 18 +-
.../ratchet/tests/unit/Wamp/WampServerTest.php | 13 +-
.../SiteAssets/php/vendor/composer/ClassLoader.php | 154 +-
.../php/vendor/composer/autoload_real.php | 17 +-
.../php/vendor/composer/autoload_static.php | 261 +-
.../SiteAssets/php/vendor/composer/installed.json | 2246 +++---
.../php/vendor/evenement/evenement/composer.json | 57 +-
.../examples/benchmark-emit-no-arguments.php | 9 +-
.../evenement/examples/benchmark-emit-once.php | 9 +-
.../examples/benchmark-emit-one-argument.php | 9 +-
.../evenement/examples/benchmark-emit.php | 9 +-
.../examples/benchmark-remove-listener-once.php | 13 +-
.../src/Evenement/EventEmitterInterface.php | 9 +-
.../evenement/src/Evenement/EventEmitterTrait.php | 40 +-
.../tests/Evenement/Tests/EventEmitterTest.php | 168 +-
.../evenement/tests/Evenement/Tests/Listener.php | 18 +-
.../evenement/tests/Evenement/Tests/functions.php | 3 +-
.../php/vendor/guzzlehttp/psr7/composer.json | 78 +-
.../vendor/guzzlehttp/psr7/src/AppendStream.php | 82 +-
.../vendor/guzzlehttp/psr7/src/BufferStream.php | 59 +-
.../vendor/guzzlehttp/psr7/src/CachingStream.php | 33 +-
.../vendor/guzzlehttp/psr7/src/DroppingStream.php | 11 +-
.../php/vendor/guzzlehttp/psr7/src/FnStream.php | 62 +-
.../vendor/guzzlehttp/psr7/src/InflateStream.php | 7 +-
.../vendor/guzzlehttp/psr7/src/LazyOpenStream.php | 9 +-
.../php/vendor/guzzlehttp/psr7/src/LimitStream.php | 38 +-
.../vendor/guzzlehttp/psr7/src/MessageTrait.php | 42 +-
.../vendor/guzzlehttp/psr7/src/MultipartStream.php | 37 +-
.../vendor/guzzlehttp/psr7/src/NoSeekStream.php | 9 +-
.../php/vendor/guzzlehttp/psr7/src/PumpStream.php | 72 +-
.../php/vendor/guzzlehttp/psr7/src/Request.php | 40 +-
.../php/vendor/guzzlehttp/psr7/src/Response.php | 32 +-
.../vendor/guzzlehttp/psr7/src/ServerRequest.php | 97 +-
.../php/vendor/guzzlehttp/psr7/src/Stream.php | 113 +-
.../guzzlehttp/psr7/src/StreamDecoratorTrait.php | 62 +-
.../vendor/guzzlehttp/psr7/src/StreamWrapper.php | 68 +-
.../vendor/guzzlehttp/psr7/src/UploadedFile.php | 79 +-
.../php/vendor/guzzlehttp/psr7/src/Uri.php | 161 +-
.../vendor/guzzlehttp/psr7/src/UriNormalizer.php | 32 +-
.../php/vendor/guzzlehttp/psr7/src/UriResolver.php | 34 +-
.../php/vendor/guzzlehttp/psr7/src/functions.php | 150 +-
.../php/vendor/kriswallsmith/assetic/composer.json | 112 +-
.../assetic/src/Assetic/Asset/AssetCache.php | 62 +-
.../assetic/src/Assetic/Asset/AssetCollection.php | 99 +-
.../src/Assetic/Asset/AssetCollectionInterface.php | 12 +-
.../assetic/src/Assetic/Asset/AssetInterface.php | 4 +-
.../assetic/src/Assetic/Asset/AssetReference.php | 67 +-
.../assetic/src/Assetic/Asset/BaseAsset.php | 67 +-
.../assetic/src/Assetic/Asset/FileAsset.php | 21 +-
.../assetic/src/Assetic/Asset/GlobAsset.php | 44 +-
.../assetic/src/Assetic/Asset/HttpAsset.php | 25 +-
.../Iterator/AssetCollectionFilterIterator.php | 25 +-
.../Asset/Iterator/AssetCollectionIterator.php | 45 +-
.../assetic/src/Assetic/Asset/StringAsset.php | 16 +-
.../assetic/src/Assetic/AssetManager.php | 17 +-
.../assetic/src/Assetic/AssetWriter.php | 29 +-
.../assetic/src/Assetic/Cache/ApcCache.php | 16 +-
.../assetic/src/Assetic/Cache/ArrayCache.php | 14 +-
.../assetic/src/Assetic/Cache/CacheInterface.php | 2 +-
.../assetic/src/Assetic/Cache/ConfigCache.php | 38 +-
.../assetic/src/Assetic/Cache/ExpiringCache.php | 27 +-
.../assetic/src/Assetic/Cache/FilesystemCache.php | 37 +-
.../src/Assetic/Exception/FilterException.php | 21 +-
.../Assetic/Extension/Twig/AsseticExtension.php | 22 +-
.../Extension/Twig/AsseticFilterFunction.php | 9 +-
.../Extension/Twig/AsseticFilterInvoker.php | 21 +-
.../Assetic/Extension/Twig/AsseticFilterNode.php | 3 +-
.../src/Assetic/Extension/Twig/AsseticNode.php | 76 +-
.../Assetic/Extension/Twig/AsseticTokenParser.php | 90 +-
.../Assetic/Extension/Twig/TwigFormulaLoader.php | 27 +-
.../src/Assetic/Extension/Twig/TwigResource.php | 14 +-
.../src/Assetic/Extension/Twig/ValueContainer.php | 26 +-
.../assetic/src/Assetic/Factory/AssetFactory.php | 118 +-
.../src/Assetic/Factory/LazyAssetManager.php | 65 +-
.../Factory/Loader/BasePhpFormulaLoader.php | 44 +-
.../Assetic/Factory/Loader/CachedFormulaLoader.php | 14 +-
.../Factory/Loader/FunctionCallsFormulaLoader.php | 8 +-
.../Resource/CoalescingDirectoryResource.php | 34 +-
.../Assetic/Factory/Resource/DirectoryResource.php | 40 +-
.../src/Assetic/Factory/Resource/FileResource.php | 12 +-
.../Assetic/Factory/Worker/CacheBustingWorker.php | 15 +-
.../Assetic/Factory/Worker/EnsureFilterWorker.php | 14 +-
.../src/Assetic/Factory/Worker/WorkerInterface.php | 4 +-
.../src/Assetic/Filter/AutoprefixerFilter.php | 15 +-
.../assetic/src/Assetic/Filter/BaseCssFilter.php | 12 +-
.../assetic/src/Assetic/Filter/BaseNodeFilter.php | 12 +-
.../src/Assetic/Filter/BaseProcessFilter.php | 11 +-
.../assetic/src/Assetic/Filter/CallablesFilter.php | 18 +-
.../assetic/src/Assetic/Filter/CleanCssFilter.php | 84 +-
.../src/Assetic/Filter/CoffeeScriptFilter.php | 15 +-
.../assetic/src/Assetic/Filter/CompassFilter.php | 109 +-
.../src/Assetic/Filter/CssCacheBustingFilter.php | 12 +-
.../assetic/src/Assetic/Filter/CssEmbedFilter.php | 43 +-
.../assetic/src/Assetic/Filter/CssImportFilter.php | 36 +-
.../assetic/src/Assetic/Filter/CssMinFilter.php | 23 +-
.../src/Assetic/Filter/CssRewriteFilter.php | 30 +-
.../assetic/src/Assetic/Filter/DartFilter.php | 21 +-
.../Filter/DependencyExtractorInterface.php | 8 +-
.../src/Assetic/Filter/EmberPrecompileFilter.php | 11 +-
.../src/Assetic/Filter/FilterCollection.php | 26 +-
.../Filter/GoogleClosure/BaseCompilerFilter.php | 30 +-
.../Filter/GoogleClosure/CompilerApiFilter.php | 53 +-
.../Filter/GoogleClosure/CompilerJarFilter.php | 29 +-
.../assetic/src/Assetic/Filter/GssFilter.php | 49 +-
.../src/Assetic/Filter/HandlebarsFilter.php | 21 +-
.../assetic/src/Assetic/Filter/JSMinFilter.php | 6 +-
.../assetic/src/Assetic/Filter/JSMinPlusFilter.php | 6 +-
.../assetic/src/Assetic/Filter/JSqueezeFilter.php | 30 +-
.../assetic/src/Assetic/Filter/JpegoptimFilter.php | 19 +-
.../assetic/src/Assetic/Filter/JpegtranFilter.php | 23 +-
.../assetic/src/Assetic/Filter/LessFilter.php | 35 +-
.../assetic/src/Assetic/Filter/LessphpFilter.php | 46 +-
.../Assetic/Filter/MinifyCssCompressorFilter.php | 6 +-
.../assetic/src/Assetic/Filter/OptiPngFilter.php | 14 +-
.../assetic/src/Assetic/Filter/PackagerFilter.php | 26 +-
.../assetic/src/Assetic/Filter/PackerFilter.php | 23 +-
.../src/Assetic/Filter/PhpCssEmbedFilter.php | 12 +-
.../assetic/src/Assetic/Filter/PngoutFilter.php | 61 +-
.../assetic/src/Assetic/Filter/ReactJsxFilter.php | 16 +-
.../assetic/src/Assetic/Filter/RooleFilter.php | 16 +-
.../src/Assetic/Filter/Sass/BaseSassFilter.php | 28 +-
.../assetic/src/Assetic/Filter/Sass/SassFilter.php | 52 +-
.../assetic/src/Assetic/Filter/Sass/ScssFilter.php | 5 +-
.../assetic/src/Assetic/Filter/SassphpFilter.php | 23 +-
.../assetic/src/Assetic/Filter/ScssphpFilter.php | 39 +-
.../assetic/src/Assetic/Filter/SeparatorFilter.php | 9 +-
.../assetic/src/Assetic/Filter/SprocketsFilter.php | 35 +-
.../assetic/src/Assetic/Filter/StylusFilter.php | 24 +-
.../src/Assetic/Filter/TypeScriptFilter.php | 11 +-
.../assetic/src/Assetic/Filter/UglifyCssFilter.php | 20 +-
.../assetic/src/Assetic/Filter/UglifyJs2Filter.php | 38 +-
.../assetic/src/Assetic/Filter/UglifyJsFilter.php | 34 +-
.../Assetic/Filter/Yui/BaseCompressorFilter.php | 30 +-
.../src/Assetic/Filter/Yui/CssCompressorFilter.php | 3 +-
.../src/Assetic/Filter/Yui/JsCompressorFilter.php | 12 +-
.../assetic/src/Assetic/FilterManager.php | 15 +-
.../assetic/src/Assetic/Util/CssUtils.php | 45 +-
.../assetic/src/Assetic/Util/FilesystemUtils.php | 16 +-
.../assetic/src/Assetic/Util/LessUtils.php | 4 +-
.../assetic/src/Assetic/Util/TraversableString.php | 14 +-
.../assetic/src/Assetic/Util/VarUtils.php | 19 +-
.../vendor/kriswallsmith/assetic/src/functions.php | 31 +-
.../vendor/lmammino/jsmin4assetic/composer.json | 50 +-
.../vendor/lmammino/jsmin4assetic/src/JSMin.php | 604 +-
.../src/JSMinUnterminatedCommentException.php | 3 +-
.../src/JSMinUnterminatedRegExpException.php | 3 +-
.../src/JSMinUnterminatedStringException.php | 3 +-
.../php/vendor/matthiasmullie/minify/bin/minifycss | 3 +-
.../php/vendor/matthiasmullie/minify/bin/minifyjs | 3 +-
.../php/vendor/matthiasmullie/minify/composer.json | 78 +-
.../php/vendor/matthiasmullie/minify/src/CSS.php | 103 +-
.../vendor/matthiasmullie/minify/src/Exception.php | 1 +
.../minify/src/Exceptions/BasicException.php | 1 +
.../minify/src/Exceptions/FileImportException.php | 1 +
.../minify/src/Exceptions/IOException.php | 1 +
.../php/vendor/matthiasmullie/minify/src/JS.php | 94 +-
.../vendor/matthiasmullie/minify/src/Minify.php | 88 +-
.../matthiasmullie/path-converter/composer.json | 55 +-
.../path-converter/src/Converter.php | 25 +-
.../path-converter/src/NoConverter.php | 3 +-
.../php/vendor/natxet/CssMin/composer.json | 53 +-
.../php/vendor/natxet/CssMin/src/CssMin.php | 8377 ++++++++++----------
.../vendor/nubs/random-name-generator/build.php | 2 +-
.../nubs/random-name-generator/composer.json | 59 +-
.../src/AbstractGenerator.php | 4 +-
.../vendor/nubs/random-name-generator/src/All.php | 13 +-
.../random-name-generator/src/Alliteration.php | 12 +-
.../nubs/random-name-generator/src/Generator.php | 1 +
.../vendor/nubs/random-name-generator/src/Vgng.php | 27 +-
.../nubs/random-name-generator/tests/AllTest.php | 10 +-
.../tests/AlliterationTest.php | 10 +-
.../nubs/random-name-generator/tests/VgngTest.php | 10 +-
.../vendor/paragonie/random_compat/composer.json | 18 +-
.../random_compat/lib/byte_safe_strings.php | 28 +-
.../paragonie/random_compat/lib/cast_to_int.php | 25 +-
.../paragonie/random_compat/lib/error_polyfill.php | 20 +-
.../vendor/paragonie/random_compat/lib/random.php | 29 +-
.../random_compat/lib/random_bytes_com_dotnet.php | 15 +-
.../random_compat/lib/random_bytes_dev_urandom.php | 21 +-
.../random_compat/lib/random_bytes_libsodium.php | 15 +-
.../lib/random_bytes_libsodium_legacy.php | 17 +-
.../random_compat/lib/random_bytes_mcrypt.php | 15 +-
.../paragonie/random_compat/lib/random_int.php | 7 +-
.../paragonie/random_compat/other/build_phar.php | 30 +-
.../php/vendor/paragonie/random_compat/psalm.xml | 20 +-
.../php/vendor/psr/http-message/composer.json | 53 +-
.../psr/http-message/src/RequestInterface.php | 2 +-
.../http-message/src/ServerRequestInterface.php | 2 +-
.../psr/http-message/src/StreamInterface.php | 2 +-
.../psr/http-message/src/UploadedFileInterface.php | 8 +-
.../vendor/psr/http-message/src/UriInterface.php | 3 +-
.../php/vendor/ratchet/rfc6455/composer.json | 64 +-
.../php/vendor/ratchet/rfc6455/phpunit.xml.dist | 2 +-
.../rfc6455/src/Handshake/ClientNegotiator.php | 17 +-
.../rfc6455/src/Handshake/NegotiatorInterface.php | 5 +-
.../rfc6455/src/Handshake/RequestVerifier.php | 17 +-
.../rfc6455/src/Handshake/ResponseVerifier.php | 11 +-
.../rfc6455/src/Handshake/ServerNegotiator.php | 57 +-
.../rfc6455/src/Messaging/CloseFrameChecker.php | 4 +-
.../rfc6455/src/Messaging/DataInterface.php | 4 +-
.../vendor/ratchet/rfc6455/src/Messaging/Frame.php | 102 +-
.../rfc6455/src/Messaging/FrameInterface.php | 4 +-
.../ratchet/rfc6455/src/Messaging/Message.php | 6 +-
.../rfc6455/src/Messaging/MessageBuffer.php | 39 +-
.../rfc6455/src/Messaging/MessageInterface.php | 4 +-
.../vendor/ratchet/rfc6455/tests/AbResultsTest.php | 4 +-
.../ratchet/rfc6455/tests/ab/clientRunner.php | 39 +-
.../ratchet/rfc6455/tests/ab/fuzzingclient.json | 32 +-
.../ratchet/rfc6455/tests/ab/fuzzingserver.json | 22 +-
.../ratchet/rfc6455/tests/ab/startServer.php | 11 +-
.../tests/unit/Handshake/RequestVerifierTest.php | 134 +-
.../tests/unit/Handshake/ResponseVerifierTest.php | 15 +-
.../tests/unit/Handshake/ServerNegotiatorTest.php | 4 +-
.../rfc6455/tests/unit/Messaging/FrameTest.php | 101 +-
.../tests/unit/Messaging/MessageBufferTest.php | 6 +-
.../rfc6455/tests/unit/Messaging/MessageTest.php | 23 +-
.../php/vendor/react/cache/composer.json | 41 +-
.../php/vendor/react/cache/src/ArrayCache.php | 9 +-
.../vendor/react/cache/tests/ArrayCacheTest.php | 12 +-
.../php/vendor/react/cache/tests/CallableStub.php | 3 +-
.../php/vendor/react/cache/tests/TestCase.php | 12 +-
.../SiteAssets/php/vendor/react/dns/composer.json | 51 +-
.../php/vendor/react/dns/examples/03-cached.php | 6 +-
.../react/dns/examples/04-query-a-and-aaaa.php | 2 +-
.../php/vendor/react/dns/src/Config/Config.php | 15 +-
.../react/dns/src/Config/FilesystemFactory.php | 12 +-
.../php/vendor/react/dns/src/Config/HostsFile.php | 33 +-
.../php/vendor/react/dns/src/Model/HeaderBag.php | 44 +-
.../php/vendor/react/dns/src/Model/Message.php | 21 +-
.../php/vendor/react/dns/src/Model/Record.php | 13 +-
.../vendor/react/dns/src/Protocol/BinaryDumper.php | 11 +-
.../php/vendor/react/dns/src/Protocol/Parser.php | 50 +-
.../vendor/react/dns/src/Query/CachedExecutor.php | 12 +-
.../php/vendor/react/dns/src/Query/Executor.php | 30 +-
.../react/dns/src/Query/HostsFileExecutor.php | 27 +-
.../php/vendor/react/dns/src/Query/Query.php | 3 +-
.../php/vendor/react/dns/src/Query/RecordBag.php | 6 +-
.../php/vendor/react/dns/src/Query/RecordCache.php | 23 +-
.../vendor/react/dns/src/Query/RetryExecutor.php | 13 +-
.../vendor/react/dns/src/Query/TimeoutExecutor.php | 8 +-
.../php/vendor/react/dns/src/Resolver/Factory.php | 27 +-
.../php/vendor/react/dns/src/Resolver/Resolver.php | 24 +-
.../php/vendor/react/dns/tests/CallableStub.php | 3 +-
.../vendor/react/dns/tests/Config/ConfigTest.php | 45 +-
.../dns/tests/Config/FilesystemFactoryTest.php | 14 +-
.../react/dns/tests/Config/HostsFileTest.php | 65 +-
.../react/dns/tests/FunctionalResolverTest.php | 22 +-
.../vendor/react/dns/tests/Model/MessageTest.php | 6 +-
.../react/dns/tests/Protocol/BinaryDumperTest.php | 13 +-
.../vendor/react/dns/tests/Protocol/ParserTest.php | 49 +-
.../react/dns/tests/Query/CachedExecutorTest.php | 23 +-
.../vendor/react/dns/tests/Query/ExecutorTest.php | 63 +-
.../dns/tests/Query/HostsFileExecutorTest.php | 42 +-
.../vendor/react/dns/tests/Query/RecordBagTest.php | 27 +-
.../react/dns/tests/Query/RecordCacheTest.php | 50 +-
.../react/dns/tests/Query/RetryExecutorTest.php | 53 +-
.../react/dns/tests/Query/TimeoutExecutorTest.php | 15 +-
.../react/dns/tests/Resolver/FactoryTest.php | 48 +-
.../dns/tests/Resolver/ResolveAliasesTest.php | 11 +-
.../react/dns/tests/Resolver/ResolverTest.php | 18 +-
.../php/vendor/react/dns/tests/TestCase.php | 43 +-
.../php/vendor/react/event-loop/composer.json | 39 +-
.../react/event-loop/examples/11-consume-stdin.php | 4 +-
.../react/event-loop/examples/12-generate-yes.php | 4 +-
.../examples/13-http-client-blocking.php | 2 +-
.../event-loop/examples/14-http-client-async.php | 8 +-
.../react/event-loop/examples/21-http-server.php | 4 +-
.../event-loop/examples/91-benchmark-ticks.php | 3 +-
.../event-loop/examples/92-benchmark-timers.php | 3 +-
.../event-loop/examples/95-benchmark-memory.php | 4 +-
.../php/vendor/react/event-loop/src/ExtEvLoop.php | 57 +-
.../vendor/react/event-loop/src/ExtEventLoop.php | 70 +-
.../vendor/react/event-loop/src/ExtLibevLoop.php | 63 +-
.../react/event-loop/src/ExtLibeventLoop.php | 70 +-
.../php/vendor/react/event-loop/src/Factory.php | 11 +-
.../vendor/react/event-loop/src/LoopInterface.php | 8 +-
.../vendor/react/event-loop/src/SignalsHandler.php | 17 +-
.../react/event-loop/src/StreamSelectLoop.php | 93 +-
.../react/event-loop/src/Tick/FutureTickQueue.php | 12 +-
.../vendor/react/event-loop/src/Timer/Timer.php | 22 +-
.../vendor/react/event-loop/src/Timer/Timers.php | 33 +-
.../react/event-loop/tests/AbstractLoopTest.php | 176 +-
.../vendor/react/event-loop/tests/CallableStub.php | 3 +-
.../react/event-loop/tests/ExtEvLoopTest.php | 3 +-
.../react/event-loop/tests/ExtEventLoopTest.php | 26 +-
.../react/event-loop/tests/ExtLibevLoopTest.php | 6 +-
.../react/event-loop/tests/ExtLibeventLoopTest.php | 12 +-
.../react/event-loop/tests/SignalsHandlerTest.php | 3 +-
.../event-loop/tests/StreamSelectLoopTest.php | 46 +-
.../php/vendor/react/event-loop/tests/TestCase.php | 15 +-
.../event-loop/tests/Timer/AbstractTimerTest.php | 32 +-
.../event-loop/tests/Timer/ExtEvTimerTest.php | 3 +-
.../event-loop/tests/Timer/ExtEventTimerTest.php | 3 +-
.../event-loop/tests/Timer/ExtLibevTimerTest.php | 3 +-
.../tests/Timer/ExtLibeventTimerTest.php | 3 +-
.../tests/Timer/StreamSelectTimerTest.php | 3 +-
.../react/event-loop/tests/Timer/TimersTest.php | 5 +-
.../php/vendor/react/promise-timer/composer.json | 61 +-
.../react/promise-timer/src/TimeoutException.php | 6 +-
.../vendor/react/promise-timer/src/functions.php | 19 +-
.../react/promise-timer/tests/CallableStub.php | 3 +-
.../promise-timer/tests/FunctionRejectTest.php | 15 +-
.../promise-timer/tests/FunctionResolveTest.php | 21 +-
.../promise-timer/tests/FunctionTimeoutTest.php | 75 +-
.../vendor/react/promise-timer/tests/TestCase.php | 21 +-
.../promise-timer/tests/TimeoutExceptionTest.php | 3 +-
.../php/vendor/react/promise/composer.json | 55 +-
.../vendor/react/promise/src/CancellationQueue.php | 15 +-
.../php/vendor/react/promise/src/Deferred.php | 24 +-
.../react/promise/src/ExtendedPromiseInterface.php | 2 +-
.../vendor/react/promise/src/FulfilledPromise.php | 25 +-
.../php/vendor/react/promise/src/LazyPromise.php | 26 +-
.../php/vendor/react/promise/src/Promise.php | 73 +-
.../vendor/react/promise/src/PromiseInterface.php | 2 +-
.../vendor/react/promise/src/RejectedPromise.php | 29 +-
.../promise/src/UnhandledRejectionException.php | 9 +-
.../php/vendor/react/promise/src/functions.php | 47 +-
.../vendor/react/promise/src/functions_include.php | 2 +-
.../react/promise/tests/CancellationQueueTest.php | 21 +-
.../vendor/react/promise/tests/DeferredTest.php | 12 +-
.../react/promise/tests/FulfilledPromiseTest.php | 12 +-
.../vendor/react/promise/tests/FunctionAllTest.php | 28 +-
.../vendor/react/promise/tests/FunctionAnyTest.php | 51 +-
.../promise/tests/FunctionCheckTypehintTest.php | 58 +-
.../vendor/react/promise/tests/FunctionMapTest.php | 41 +-
.../react/promise/tests/FunctionRaceTest.php | 46 +-
.../react/promise/tests/FunctionReduceTest.php | 71 +-
.../react/promise/tests/FunctionRejectTest.php | 9 +-
.../react/promise/tests/FunctionResolveTest.php | 36 +-
.../react/promise/tests/FunctionSomeTest.php | 61 +-
.../vendor/react/promise/tests/LazyPromiseTest.php | 28 +-
.../PromiseAdapter/CallbackPromiseAdapter.php | 18 +-
.../PromiseAdapter/PromiseAdapterInterface.php | 4 +
.../php/vendor/react/promise/tests/PromiseTest.php | 24 +-
.../promise/tests/PromiseTest/CancelTestTrait.php | 50 +-
.../promise/tests/PromiseTest/NotifyTestTrait.php | 45 +-
.../PromiseTest/PromiseFulfilledTestTrait.php | 65 +-
.../tests/PromiseTest/PromisePendingTestTrait.php | 30 +-
.../tests/PromiseTest/PromiseRejectedTestTrait.php | 111 +-
.../tests/PromiseTest/PromiseSettledTestTrait.php | 37 +-
.../promise/tests/PromiseTest/RejectTestTrait.php | 92 +-
.../promise/tests/PromiseTest/ResolveTestTrait.php | 56 +-
.../react/promise/tests/RejectedPromiseTest.php | 12 +-
.../react/promise/tests/Stub/CallableStub.php | 3 +-
.../php/vendor/react/promise/tests/TestCase.php | 12 +-
.../php/vendor/react/promise/tests/bootstrap.php | 4 +-
.../tests/fixtures/SimpleFulfilledTestPromise.php | 3 +-
.../tests/fixtures/SimpleFulfilledTestThenable.php | 3 +-
.../tests/fixtures/SimpleRejectedTestPromise.php | 3 +-
.../tests/fixtures/SimpleTestCancellable.php | 7 +-
.../fixtures/SimpleTestCancellableThenable.php | 10 +-
.../php/vendor/react/socket/composer.json | 58 +-
.../react/socket/examples/02-chat-server.php | 2 +-
.../react/socket/examples/11-http-client.php | 2 +-
.../react/socket/examples/22-http-client.php | 2 +-
.../react/socket/examples/91-benchmark-server.php | 4 +-
.../socket/examples/99-generate-self-signed.php | 4 +-
.../php/vendor/react/socket/src/Connection.php | 63 +-
.../php/vendor/react/socket/src/Connector.php | 34 +-
.../php/vendor/react/socket/src/DnsConnector.php | 15 +-
.../vendor/react/socket/src/FixedUriConnector.php | 6 +-
.../php/vendor/react/socket/src/LimitingServer.php | 49 +-
.../vendor/react/socket/src/SecureConnector.php | 12 +-
.../php/vendor/react/socket/src/SecureServer.php | 24 +-
.../php/vendor/react/socket/src/Server.php | 17 +-
.../vendor/react/socket/src/StreamEncryption.php | 30 +-
.../php/vendor/react/socket/src/TcpConnector.php | 19 +-
.../php/vendor/react/socket/src/TcpServer.php | 42 +-
.../vendor/react/socket/src/TimeoutConnector.php | 6 +-
.../php/vendor/react/socket/src/UnixConnector.php | 12 +-
.../php/vendor/react/socket/src/UnixServer.php | 42 +-
.../vendor/react/socket/tests/ConnectionTest.php | 10 +-
.../vendor/react/socket/tests/ConnectorTest.php | 63 +-
.../vendor/react/socket/tests/DnsConnectorTest.php | 41 +-
.../react/socket/tests/FixedUriConnectorTest.php | 3 +-
.../react/socket/tests/FunctionalConnectorTest.php | 3 +-
.../socket/tests/FunctionalSecureServerTest.php | 90 +-
.../react/socket/tests/FunctionalTcpServerTest.php | 69 +-
.../vendor/react/socket/tests/IntegrationTest.php | 30 +-
.../react/socket/tests/LimitingServerTest.php | 45 +-
.../react/socket/tests/SecureConnectorTest.php | 31 +-
.../react/socket/tests/SecureIntegrationTest.php | 41 +-
.../vendor/react/socket/tests/SecureServerTest.php | 26 +-
.../php/vendor/react/socket/tests/ServerTest.php | 37 +-
.../react/socket/tests/Stub/CallableStub.php | 3 +-
.../react/socket/tests/Stub/ConnectionStub.php | 36 +-
.../vendor/react/socket/tests/Stub/ServerStub.php | 6 +-
.../vendor/react/socket/tests/TcpConnectorTest.php | 54 +-
.../vendor/react/socket/tests/TcpServerTest.php | 94 +-
.../php/vendor/react/socket/tests/TestCase.php | 23 +-
.../react/socket/tests/TimeoutConnectorTest.php | 26 +-
.../react/socket/tests/UnixConnectorTest.php | 22 +-
.../vendor/react/socket/tests/UnixServerTest.php | 80 +-
.../php/vendor/react/stream/composer.json | 53 +-
.../stream/examples/91-benchmark-throughput.php | 10 +-
.../vendor/react/stream/src/CompositeStream.php | 31 +-
.../react/stream/src/DuplexResourceStream.php | 79 +-
.../react/stream/src/ReadableResourceStream.php | 50 +-
.../php/vendor/react/stream/src/ThroughStream.php | 79 +-
.../php/vendor/react/stream/src/Util.php | 10 +-
.../react/stream/src/WritableResourceStream.php | 56 +-
.../react/stream/src/WritableStreamInterface.php | 2 +-
.../php/vendor/react/stream/tests/CallableStub.php | 3 +-
.../react/stream/tests/CompositeStreamTest.php | 70 +-
.../tests/DuplexResourceStreamIntegrationTest.php | 64 +-
.../stream/tests/DuplexResourceStreamTest.php | 106 +-
.../react/stream/tests/EnforceBlockingWrapper.php | 22 +-
.../react/stream/tests/FunctionalInternetTest.php | 19 +-
.../stream/tests/ReadableResourceStreamTest.php | 78 +-
.../react/stream/tests/Stub/ReadableStreamStub.php | 36 +-
.../php/vendor/react/stream/tests/TestCase.php | 15 +-
.../react/stream/tests/ThroughStreamTest.php | 74 +-
.../php/vendor/react/stream/tests/UtilTest.php | 74 +-
.../stream/tests/WritableStreamResourceTest.php | 108 +-
.../symfony/http-foundation/AcceptHeader.php | 40 +-
.../symfony/http-foundation/AcceptHeaderItem.php | 61 +-
.../symfony/http-foundation/ApacheRequest.php | 8 +-
.../symfony/http-foundation/BinaryFileResponse.php | 126 +-
.../php/vendor/symfony/http-foundation/Cookie.php | 114 +-
.../http-foundation/ExpressionRequestMatcher.php | 20 +-
.../File/Exception/AccessDeniedException.php | 3 +-
.../File/Exception/FileNotFoundException.php | 3 +-
.../File/Exception/UnexpectedTypeException.php | 3 +-
.../vendor/symfony/http-foundation/File/File.php | 34 +-
.../File/MimeType/ExtensionGuesser.php | 18 +-
.../File/MimeType/FileBinaryMimeTypeGuesser.php | 9 +-
.../File/MimeType/FileinfoMimeTypeGuesser.php | 9 +-
.../File/MimeType/MimeTypeExtensionGuesser.php | 5 +-
.../File/MimeType/MimeTypeGuesser.php | 23 +-
.../vendor/symfony/http-foundation/File/Stream.php | 5 +-
.../symfony/http-foundation/File/UploadedFile.php | 67 +-
.../php/vendor/symfony/http-foundation/FileBag.php | 20 +-
.../vendor/symfony/http-foundation/HeaderBag.php | 102 +-
.../php/vendor/symfony/http-foundation/IpUtils.php | 50 +-
.../symfony/http-foundation/JsonResponse.php | 57 +-
.../symfony/http-foundation/ParameterBag.php | 83 +-
.../symfony/http-foundation/RedirectResponse.php | 24 +-
.../php/vendor/symfony/http-foundation/Request.php | 581 +-
.../symfony/http-foundation/RequestMatcher.php | 63 +-
.../symfony/http-foundation/RequestStack.php | 17 +-
.../vendor/symfony/http-foundation/Response.php | 279 +-
.../symfony/http-foundation/ResponseHeaderBag.php | 76 +-
.../vendor/symfony/http-foundation/ServerBag.php | 24 +-
.../Session/Attribute/AttributeBag.php | 44 +-
.../Session/Attribute/AttributeBagInterface.php | 8 +-
.../Session/Attribute/NamespacedAttributeBag.php | 45 +-
.../Session/Flash/AutoExpireFlashBag.php | 49 +-
.../http-foundation/Session/Flash/FlashBag.php | 47 +-
.../Session/Flash/FlashBagInterface.php | 8 +-
.../symfony/http-foundation/Session/Session.php | 90 +-
.../http-foundation/Session/SessionBagProxy.php | 23 +-
.../http-foundation/Session/SessionInterface.php | 16 +-
.../Storage/Handler/AbstractSessionHandler.php | 41 +-
.../Storage/Handler/MemcacheSessionHandler.php | 42 +-
.../Storage/Handler/MemcachedSessionHandler.php | 42 +-
.../Storage/Handler/MongoDbSessionHandler.php | 60 +-
.../Storage/Handler/NativeFileSessionHandler.php | 7 +-
.../Storage/Handler/NativeSessionHandler.php | 5 +-
.../Session/Storage/Handler/NullSessionHandler.php | 33 +-
.../Session/Storage/Handler/PdoSessionHandler.php | 165 +-
.../Storage/Handler/StrictSessionHandler.php | 31 +-
.../Storage/Handler/WriteCheckSessionHandler.php | 23 +-
.../Session/Storage/MetadataBag.php | 39 +-
.../Session/Storage/MockArraySessionStorage.php | 75 +-
.../Session/Storage/MockFileSessionStorage.php | 41 +-
.../Session/Storage/NativeSessionStorage.php | 102 +-
.../Session/Storage/PhpBridgeSessionStorage.php | 15 +-
.../Session/Storage/Proxy/AbstractProxy.php | 26 +-
.../Session/Storage/Proxy/NativeProxy.php | 10 +-
.../Session/Storage/Proxy/SessionHandlerProxy.php | 36 +-
.../Session/Storage/SessionStorageInterface.php | 6 +-
.../symfony/http-foundation/StreamedResponse.php | 47 +-
.../http-foundation/Tests/AcceptHeaderItemTest.php | 23 +-
.../http-foundation/Tests/AcceptHeaderTest.php | 35 +-
.../http-foundation/Tests/ApacheRequestTest.php | 6 +-
.../Tests/BinaryFileResponseTest.php | 126 +-
.../symfony/http-foundation/Tests/CookieTest.php | 100 +-
.../Tests/ExpressionRequestMatcherTest.php | 28 +-
.../http-foundation/Tests/File/FakeFile.php | 19 +-
.../http-foundation/Tests/File/FileTest.php | 78 +-
.../Tests/File/MimeType/MimeTypeTest.php | 40 +-
.../Tests/File/UploadedFileTest.php | 160 +-
.../symfony/http-foundation/Tests/FileBagTest.php | 43 +-
.../http-foundation/Tests/HeaderBagTest.php | 69 +-
.../symfony/http-foundation/Tests/IpUtilsTest.php | 69 +-
.../http-foundation/Tests/JsonResponseTest.php | 98 +-
.../http-foundation/Tests/ParameterBagTest.php | 58 +-
.../http-foundation/Tests/RedirectResponseTest.php | 31 +-
.../http-foundation/Tests/RequestMatcherTest.php | 59 +-
.../http-foundation/Tests/RequestStackTest.php | 9 +-
.../symfony/http-foundation/Tests/RequestTest.php | 545 +-
.../Tests/ResponseHeaderBagTest.php | 99 +-
.../symfony/http-foundation/Tests/ResponseTest.php | 269 +-
.../http-foundation/Tests/ResponseTestCase.php | 11 +-
.../http-foundation/Tests/ServerBagTest.php | 60 +-
.../Tests/Session/Attribute/AttributeBagTest.php | 68 +-
.../Attribute/NamespacedAttributeBagTest.php | 79 +-
.../Tests/Session/Flash/AutoExpireFlashBagTest.php | 59 +-
.../Tests/Session/Flash/FlashBagTest.php | 44 +-
.../http-foundation/Tests/Session/SessionTest.php | 80 +-
.../Storage/Handler/AbstractSessionHandlerTest.php | 20 +-
.../Session/Storage/Handler/Fixtures/common.inc | 54 +-
.../Storage/Handler/Fixtures/empty_destroys.php | 4 +-
.../Session/Storage/Handler/Fixtures/read_only.php | 4 +-
.../Storage/Handler/Fixtures/regenerate.php | 10 +-
.../Session/Storage/Handler/Fixtures/storage.php | 6 +-
.../Storage/Handler/Fixtures/with_cookie.php | 4 +-
.../Handler/Fixtures/with_cookie_and_session.php | 4 +-
.../Storage/Handler/MemcacheSessionHandlerTest.php | 60 +-
.../Handler/MemcachedSessionHandlerTest.php | 60 +-
.../Storage/Handler/MongoDbSessionHandlerTest.php | 59 +-
.../Handler/NativeFileSessionHandlerTest.php | 15 +-
.../Storage/Handler/NativeSessionHandlerTest.php | 3 +-
.../Storage/Handler/NullSessionHandlerTest.php | 12 +-
.../Storage/Handler/PdoSessionHandlerTest.php | 96 +-
.../Storage/Handler/StrictSessionHandlerTest.php | 67 +-
.../Handler/WriteCheckSessionHandlerTest.php | 30 +-
.../Tests/Session/Storage/MetadataBagTest.php | 35 +-
.../Storage/MockArraySessionStorageTest.php | 39 +-
.../Session/Storage/MockFileSessionStorageTest.php | 37 +-
.../Session/Storage/NativeSessionStorageTest.php | 79 +-
.../Storage/PhpBridgeSessionStorageTest.php | 21 +-
.../Session/Storage/Proxy/AbstractProxyTest.php | 32 +-
.../Session/Storage/Proxy/NativeProxyTest.php | 6 +-
.../Storage/Proxy/SessionHandlerProxyTest.php | 42 +-
.../http-foundation/Tests/StreamedResponseTest.php | 76 +-
.../Tests/schema/http-status-codes.rng | 58 +-
.../http-foundation/Tests/schema/iana-registry.rng | 478 +-
.../vendor/symfony/http-foundation/composer.json | 68 +-
.../symfony/http-foundation/phpunit.xml.dist | 2 +-
.../vendor/symfony/polyfill-mbstring/Mbstring.php | 303 +-
.../Resources/unidata/lowerCase.php | 2186 ++---
.../Resources/unidata/upperCase.php | 2202 ++---
.../vendor/symfony/polyfill-mbstring/bootstrap.php | 184 +-
.../vendor/symfony/polyfill-mbstring/composer.json | 68 +-
.../php/vendor/symfony/polyfill-php70/Php70.php | 20 +-
.../vendor/symfony/polyfill-php70/bootstrap.php | 12 +-
.../vendor/symfony/polyfill-php70/composer.json | 67 +-
.../process/Exception/ProcessFailedException.php | 8 +-
.../process/Exception/ProcessTimedOutException.php | 15 +-
.../vendor/symfony/process/ExecutableFinder.php | 17 +-
.../php/vendor/symfony/process/InputStream.php | 27 +-
.../vendor/symfony/process/PhpExecutableFinder.php | 25 +-
.../php/vendor/symfony/process/PhpProcess.php | 31 +-
.../vendor/symfony/process/Pipes/AbstractPipes.php | 47 +-
.../symfony/process/Pipes/PipesInterface.php | 4 +-
.../php/vendor/symfony/process/Pipes/UnixPipes.php | 33 +-
.../vendor/symfony/process/Pipes/WindowsPipes.php | 41 +-
.../php/vendor/symfony/process/Process.php | 481 +-
.../php/vendor/symfony/process/ProcessBuilder.php | 63 +-
.../php/vendor/symfony/process/ProcessUtils.php | 32 +-
.../symfony/process/Tests/ExecutableFinderTest.php | 39 +-
.../symfony/process/Tests/NonStopableProcess.php | 11 +-
.../process/Tests/PhpExecutableFinderTest.php | 19 +-
.../symfony/process/Tests/PhpProcessTest.php | 8 +-
.../Tests/PipeStdinInStdoutStdErrStreamSelect.php | 28 +-
.../symfony/process/Tests/ProcessBuilderTest.php | 57 +-
.../process/Tests/ProcessFailedExceptionTest.php | 19 +-
.../vendor/symfony/process/Tests/ProcessTest.php | 476 +-
.../symfony/process/Tests/ProcessUtilsTest.php | 6 +-
.../symfony/process/Tests/SignalListener.php | 5 +-
.../php/vendor/symfony/process/composer.json | 58 +-
.../php/vendor/symfony/process/phpunit.xml.dist | 2 +-
.../vendor/symfony/routing/Annotation/Route.php | 59 +-
.../php/vendor/symfony/routing/CompiledRoute.php | 53 +-
.../DependencyInjection/RoutingResolverPass.php | 8 +-
.../Exception/MethodNotAllowedException.php | 6 +-
.../routing/Generator/Dumper/GeneratorDumper.php | 6 +-
.../Generator/Dumper/PhpGeneratorDumper.php | 11 +-
.../symfony/routing/Generator/UrlGenerator.php | 78 +-
.../routing/Generator/UrlGeneratorInterface.php | 6 +-
.../routing/Loader/AnnotationClassLoader.php | 70 +-
.../routing/Loader/AnnotationDirectoryLoader.php | 16 +-
.../routing/Loader/AnnotationFileLoader.php | 36 +-
.../symfony/routing/Loader/ClosureLoader.php | 10 +-
.../Loader/Configurator/CollectionConfigurator.php | 19 +-
.../Loader/Configurator/ImportConfigurator.php | 9 +-
.../Loader/Configurator/RouteConfigurator.php | 3 +-
.../Loader/Configurator/RoutingConfigurator.php | 9 +-
.../Loader/Configurator/Traits/AddTrait.php | 10 +-
.../Loader/Configurator/Traits/RouteTrait.php | 24 +-
.../DependencyInjection/ServiceRouterLoader.php | 6 +-
.../symfony/routing/Loader/DirectoryLoader.php | 12 +-
.../symfony/routing/Loader/GlobFileLoader.php | 8 +-
.../symfony/routing/Loader/ObjectRouteLoader.php | 13 +-
.../symfony/routing/Loader/PhpFileLoader.php | 10 +-
.../symfony/routing/Loader/XmlFileLoader.php | 82 +-
.../symfony/routing/Loader/YamlFileLoader.php | 67 +-
.../routing/Loader/schema/routing/routing-1.0.xsd | 274 +-
.../routing/Matcher/Dumper/DumperCollection.php | 43 +-
.../symfony/routing/Matcher/Dumper/DumperRoute.php | 13 +-
.../routing/Matcher/Dumper/MatcherDumper.php | 6 +-
.../routing/Matcher/Dumper/PhpMatcherDumper.php | 103 +-
.../Matcher/Dumper/StaticPrefixCollection.php | 46 +-
.../routing/Matcher/RedirectableUrlMatcher.php | 14 +-
.../Matcher/RedirectableUrlMatcherInterface.php | 6 +-
.../routing/Matcher/TraceableUrlMatcher.php | 20 +-
.../vendor/symfony/routing/Matcher/UrlMatcher.php | 66 +-
.../php/vendor/symfony/routing/RequestContext.php | 95 +-
.../php/vendor/symfony/routing/Route.php | 174 +-
.../php/vendor/symfony/routing/RouteCollection.php | 78 +-
.../symfony/routing/RouteCollectionBuilder.php | 99 +-
.../php/vendor/symfony/routing/RouteCompiler.php | 55 +-
.../php/vendor/symfony/routing/Router.php | 97 +-
.../symfony/routing/Tests/Annotation/RouteTest.php | 9 +-
.../symfony/routing/Tests/CompiledRouteTest.php | 5 +-
.../RoutingResolverPassTest.php | 3 +-
.../Tests/Fixtures/AnnotatedClasses/BarClass.php | 3 +-
.../Tests/Fixtures/AnnotatedClasses/BazClass.php | 3 +-
.../Tests/Fixtures/AnnotatedClasses/FooTrait.php | 5 +-
.../routing/Tests/Fixtures/CustomRouteCompiler.php | 3 +-
.../routing/Tests/Fixtures/CustomXmlFileLoader.php | 7 +-
.../AnonymousClassInTrait.php | 9 +-
.../OtherAnnotatedClasses/VariadicClass.php | 3 +-
.../Tests/Fixtures/RedirectableUrlMatcher.php | 3 +-
.../Fixtures/controller/import__controller.xml | 4 +-
.../Fixtures/controller/import_controller.xml | 6 +-
.../controller/import_override_defaults.xml | 4 +-
.../Fixtures/controller/override_defaults.xml | 4 +-
.../routing/Tests/Fixtures/controller/routing.xml | 8 +-
.../routing/Tests/Fixtures/dumper/url_matcher0.php | 6 +-
.../routing/Tests/Fixtures/dumper/url_matcher1.php | 68 +-
.../routing/Tests/Fixtures/dumper/url_matcher2.php | 84 +-
.../routing/Tests/Fixtures/dumper/url_matcher3.php | 8 +-
.../routing/Tests/Fixtures/dumper/url_matcher4.php | 6 +-
.../routing/Tests/Fixtures/dumper/url_matcher5.php | 50 +-
.../routing/Tests/Fixtures/dumper/url_matcher6.php | 34 +-
.../routing/Tests/Fixtures/dumper/url_matcher7.php | 50 +-
.../symfony/routing/Tests/Fixtures/glob/bar.xml | 2 +-
.../symfony/routing/Tests/Fixtures/glob/baz.xml | 2 +-
.../Tests/Fixtures/glob/import_multiple.xml | 2 +-
.../routing/Tests/Fixtures/glob/import_single.xml | 2 +-
.../routing/Tests/Fixtures/list_defaults.xml | 4 +-
.../Tests/Fixtures/list_in_list_defaults.xml | 4 +-
.../Tests/Fixtures/list_in_map_defaults.xml | 4 +-
.../routing/Tests/Fixtures/list_null_values.xml | 16 +-
.../routing/Tests/Fixtures/map_defaults.xml | 4 +-
.../Tests/Fixtures/map_in_list_defaults.xml | 4 +-
.../routing/Tests/Fixtures/map_in_map_defaults.xml | 4 +-
.../routing/Tests/Fixtures/map_null_values.xml | 12 +-
.../symfony/routing/Tests/Fixtures/missing_id.xml | 4 +-
.../routing/Tests/Fixtures/missing_path.xml | 4 +-
.../routing/Tests/Fixtures/namespaceprefix.xml | 4 +-
.../symfony/routing/Tests/Fixtures/nonvalid.xml | 6 +-
.../routing/Tests/Fixtures/nonvalidnode.xml | 4 +-
.../routing/Tests/Fixtures/nonvalidroute.xml | 4 +-
.../symfony/routing/Tests/Fixtures/null_values.xml | 8 +-
.../symfony/routing/Tests/Fixtures/php_dsl.php | 6 +-
.../routing/Tests/Fixtures/scalar_defaults.xml | 10 +-
.../routing/Tests/Fixtures/validpattern.xml | 9 +-
.../routing/Tests/Fixtures/validresource.xml | 4 +-
.../Generator/Dumper/PhpGeneratorDumperTest.php | 38 +-
.../routing/Tests/Generator/UrlGeneratorTest.php | 220 +-
.../Tests/Loader/AbstractAnnotationLoaderTest.php | 12 +-
.../Tests/Loader/AnnotationClassLoaderTest.php | 79 +-
.../Tests/Loader/AnnotationDirectoryLoaderTest.php | 40 +-
.../Tests/Loader/AnnotationFileLoaderTest.php | 33 +-
.../routing/Tests/Loader/ClosureLoaderTest.php | 9 +-
.../routing/Tests/Loader/DirectoryLoaderTest.php | 23 +-
.../routing/Tests/Loader/GlobFileLoaderTest.php | 13 +-
.../routing/Tests/Loader/ObjectRouteLoaderTest.php | 29 +-
.../routing/Tests/Loader/PhpFileLoaderTest.php | 36 +-
.../routing/Tests/Loader/XmlFileLoaderTest.php | 169 +-
.../routing/Tests/Loader/YamlFileLoaderTest.php | 76 +-
.../Matcher/DumpedRedirectableUrlMatcherTest.php | 10 +-
.../routing/Tests/Matcher/DumpedUrlMatcherTest.php | 13 +-
.../Tests/Matcher/Dumper/DumperCollectionTest.php | 3 +-
.../Tests/Matcher/Dumper/PhpMatcherDumperTest.php | 60 +-
.../Matcher/Dumper/StaticPrefixCollectionTest.php | 15 +-
.../Tests/Matcher/RedirectableUrlMatcherTest.php | 38 +-
.../Tests/Matcher/TraceableUrlMatcherTest.php | 12 +-
.../routing/Tests/Matcher/UrlMatcherTest.php | 118 +-
.../symfony/routing/Tests/RequestContextTest.php | 38 +-
.../routing/Tests/RouteCollectionBuilderTest.php | 54 +-
.../symfony/routing/Tests/RouteCollectionTest.php | 69 +-
.../symfony/routing/Tests/RouteCompilerTest.php | 255 +-
.../php/vendor/symfony/routing/Tests/RouteTest.php | 70 +-
.../vendor/symfony/routing/Tests/RouterTest.php | 63 +-
.../php/vendor/symfony/routing/composer.json | 109 +-
.../php/vendor/symfony/routing/phpunit.xml.dist | 2 +-
.../assets/font-starcraft/css/font-starcraft.css | 71 +-
.../assets/font-starcraft/fonts/font-starcraft.svg | 60 +-
.../assets/userfrosting/css/AdminLTE-skins-all.css | 1996 +++--
.../assets/userfrosting/css/tablesorter-reflow.css | 112 +-
.../core/assets/userfrosting/css/uf-alerts.css | 6 +-
.../core/assets/userfrosting/css/uf-collection.css | 2 +-
.../core/assets/userfrosting/css/userfrosting.css | 48 +-
.../core/assets/userfrosting/favicons/ieconfig.xml | 18 +-
.../assets/userfrosting/favicons/manifest.json | 98 +-
.../userfrosting/favicons/safari-pinned-tab.svg | 40 +-
.../core/assets/userfrosting/js/AdminLTE-custom.js | 98 +-
.../core/assets/userfrosting/js/AdminLTE.js | 1290 +--
.../core/assets/userfrosting/js/attrchange.js | 218 +-
.../js/fortress-jqueryvalidation-methods.js | 28 +-
.../assets/userfrosting/js/handlebars-helpers.js | 34 +-
.../core/assets/userfrosting/js/query-string.js | 22 +-
.../js/tablesorter/widget-sort2Hash.js | 504 +-
.../core/assets/userfrosting/js/uf-captcha.js | 6 +-
.../core/assets/userfrosting/js/uf-collection.js | 102 +-
.../core/assets/userfrosting/js/uf-copy.js | 16 +-
.../core/assets/userfrosting/js/uf-form.js | 70 +-
.../core/assets/userfrosting/js/uf-init.js | 9 +-
.../userfrosting/js/uf-jqueryvalidation-config.js | 10 +-
.../core/assets/userfrosting/js/uf-modal.js | 162 +-
.../core/assets/userfrosting/js/uf-table.js | 246 +-
.../userfrosting/js/uf-tablesorter-parsers.js | 44 +-
main/app/sprinkles/core/bower.json | 88 +-
main/app/sprinkles/core/composer.json | 86 +-
main/app/sprinkles/core/config/default.php | 332 +-
main/app/sprinkles/core/config/dev.php | 50 +-
main/app/sprinkles/core/config/production.php | 68 +-
main/app/sprinkles/core/config/testing.php | 38 +-
main/app/sprinkles/core/locale/ar/messages.php | 12 +-
main/app/sprinkles/core/locale/ar/validate.php | 2 +-
main/app/sprinkles/core/locale/de_DE/errors.php | 38 +-
main/app/sprinkles/core/locale/de_DE/validate.php | 22 +-
main/app/sprinkles/core/locale/en_US/errors.php | 2 +-
main/app/sprinkles/core/locale/en_US/messages.php | 10 +-
main/app/sprinkles/core/locale/en_US/validate.php | 2 +-
main/app/sprinkles/core/locale/es_ES/errors.php | 4 +-
main/app/sprinkles/core/locale/es_ES/messages.php | 10 +-
main/app/sprinkles/core/locale/fa/errors.php | 2 +-
main/app/sprinkles/core/locale/fa/messages.php | 10 +-
main/app/sprinkles/core/locale/fa/validate.php | 2 +-
main/app/sprinkles/core/locale/fr_FR/messages.php | 10 +-
main/app/sprinkles/core/locale/fr_FR/validate.php | 2 +-
main/app/sprinkles/core/locale/it_IT/messages.php | 70 +-
main/app/sprinkles/core/locale/it_IT/validate.php | 2 +-
main/app/sprinkles/core/locale/pt_PT/messages.php | 10 +-
main/app/sprinkles/core/locale/pt_PT/validate.php | 2 +-
main/app/sprinkles/core/locale/ru_RU/errors.php | 2 +-
main/app/sprinkles/core/locale/ru_RU/messages.php | 10 +-
main/app/sprinkles/core/locale/ru_RU/validate.php | 2 +-
main/app/sprinkles/core/locale/th_TH/messages.php | 10 +-
main/app/sprinkles/core/locale/th_TH/validate.php | 2 +-
main/app/sprinkles/core/locale/tlh/errors.php | 38 +-
main/app/sprinkles/core/locale/tlh/validate.php | 22 +-
main/app/sprinkles/core/locale/valitron/ar.php | 48 +-
main/app/sprinkles/core/locale/valitron/de.php | 56 +-
main/app/sprinkles/core/locale/valitron/el.php | 58 +-
main/app/sprinkles/core/locale/valitron/en.php | 58 +-
main/app/sprinkles/core/locale/valitron/es.php | 58 +-
main/app/sprinkles/core/locale/valitron/fr.php | 58 +-
main/app/sprinkles/core/locale/valitron/id.php | 56 +-
main/app/sprinkles/core/locale/valitron/it.php | 52 +-
main/app/sprinkles/core/locale/valitron/ja.php | 56 +-
main/app/sprinkles/core/locale/valitron/lv.php | 52 +-
main/app/sprinkles/core/locale/valitron/pt-br.php | 48 +-
main/app/sprinkles/core/locale/valitron/ro.php | 58 +-
main/app/sprinkles/core/locale/valitron/ru.php | 56 +-
main/app/sprinkles/core/locale/valitron/th.php | 58 +-
main/app/sprinkles/core/locale/valitron/zh-cn.php | 48 +-
main/app/sprinkles/core/locale/valitron/zh-tw.php | 48 +-
main/app/sprinkles/core/locale/zh_CN/messages.php | 10 +-
main/app/sprinkles/core/locale/zh_CN/validate.php | 2 +-
main/app/sprinkles/core/routes/routes.php | 2 +-
main/app/sprinkles/core/src/Alert/AlertStream.php | 28 +-
.../sprinkles/core/src/Alert/CacheAlertStream.php | 43 +-
.../core/src/Alert/SessionAlertStream.php | 31 +-
.../core/src/Controller/SimpleController.php | 4 +-
main/app/sprinkles/core/src/Core.php | 23 +-
main/app/sprinkles/core/src/Database/Builder.php | 42 +-
.../core/src/Database/DatabaseInvalidException.php | 1 +
.../src/Database/Migrations/v400/SessionsTable.php | 7 +-
.../Database/Migrations/v400/ThrottlesTable.php | 7 +-
.../Database/Models/Concerns/HasRelationships.php | 80 +-
.../sprinkles/core/src/Database/Models/Model.php | 35 +-
.../core/src/Database/Models/Throttle.php | 9 +-
.../Relations/BelongsToManyConstrained.php | 38 +-
.../Database/Relations/BelongsToManyThrough.php | 65 +-
.../src/Database/Relations/BelongsToManyUnique.php | 1 +
.../src/Database/Relations/Concerns/Syncable.php | 40 +-
.../src/Database/Relations/Concerns/Unique.php | 140 +-
.../src/Database/Relations/HasManySyncable.php | 1 +
.../src/Database/Relations/MorphManySyncable.php | 1 +
.../src/Database/Relations/MorphToManyUnique.php | 1 +
.../core/src/Error/ExceptionHandlerManager.php | 18 +-
.../core/src/Error/Handler/ExceptionHandler.php | 44 +-
.../Error/Handler/ExceptionHandlerInterface.php | 3 +-
.../src/Error/Handler/HttpExceptionHandler.php | 12 +-
.../src/Error/Handler/NotFoundExceptionHandler.php | 4 +-
.../Error/Handler/PhpMailerExceptionHandler.php | 4 +-
.../core/src/Error/Renderer/ErrorRenderer.php | 15 +-
.../src/Error/Renderer/ErrorRendererInterface.php | 11 +-
.../core/src/Error/Renderer/HtmlRenderer.php | 18 +-
.../core/src/Error/Renderer/JsonRenderer.php | 10 +-
.../core/src/Error/Renderer/PlainTextRenderer.php | 10 +-
.../core/src/Error/Renderer/WhoopsRenderer.php | 220 +-
.../core/src/Error/Renderer/XmlRenderer.php | 7 +-
main/app/sprinkles/core/src/Facades/Debug.php | 4 +-
main/app/sprinkles/core/src/Facades/Translator.php | 4 +-
.../src/Http/Concerns/DeterminesContentType.php | 4 +-
.../app/sprinkles/core/src/Log/DatabaseHandler.php | 9 +-
main/app/sprinkles/core/src/Log/MixedFormatter.php | 15 +-
.../app/sprinkles/core/src/Mail/EmailRecipient.php | 25 +-
main/app/sprinkles/core/src/Mail/MailMessage.php | 49 +-
main/app/sprinkles/core/src/Mail/Mailer.php | 58 +-
.../sprinkles/core/src/Mail/StaticMailMessage.php | 16 +-
.../sprinkles/core/src/Mail/TwigMailMessage.php | 18 +-
main/app/sprinkles/core/src/Model/UFModel.php | 4 +-
main/app/sprinkles/core/src/Router.php | 11 +-
main/app/sprinkles/core/src/Sprunje/Sprunje.php | 91 +-
.../sprinkles/core/src/Throttle/ThrottleRule.php | 25 +-
main/app/sprinkles/core/src/Throttle/Throttler.php | 28 +-
.../core/src/Throttle/ThrottlerException.php | 1 +
main/app/sprinkles/core/src/Twig/CacheHelper.php | 13 +-
main/app/sprinkles/core/src/Twig/CoreExtension.php | 28 +-
.../core/src/Util/BadClassNameException.php | 1 +
main/app/sprinkles/core/src/Util/Captcha.php | 53 +-
.../sprinkles/core/src/Util/CheckEnvironment.php | 123 +-
main/app/sprinkles/core/src/Util/ClassMapper.php | 14 +-
.../sprinkles/core/src/Util/EnvironmentInfo.php | 11 +-
.../sprinkles/core/src/Util/ShutdownHandler.php | 25 +-
main/app/sprinkles/core/src/Util/Util.php | 47 +-
.../sprinkles/core/templates/forms/csrf.html.twig | 4 +-
.../core/templates/navigation/breadcrumb.html.twig | 2 +-
.../core/templates/navigation/main-nav.html.twig | 53 +-
.../sprinkles/core/templates/pages/about.html.twig | 32 +-
.../core/templates/pages/abstract/base.html.twig | 5 +-
.../templates/pages/abstract/default.html.twig | 7 +-
.../core/templates/pages/abstract/error.html.twig | 35 +-
.../templates/pages/error/config-errors.html.twig | 16 +-
.../sprinkles/core/templates/pages/index.html.twig | 22 +-
.../sprinkles/core/templates/pages/legal.html.twig | 4 +-
.../templates/pages/partials/analytics.html.twig | 17 +-
.../core/templates/pages/partials/config.js.twig | 20 +-
.../templates/pages/partials/favicons.html.twig | 36 +-
.../core/templates/pages/partials/footer.html.twig | 9 +-
.../core/templates/pages/partials/legal.html.twig | 104 +-
.../core/templates/pages/partials/page.js.twig | 4 +-
.../templates/pages/partials/privacy.html.twig | 58 +-
.../core/templates/pages/privacy.html.twig | 4 +-
.../sprinkles/core/templates/pages/test.html.twig | 12 +-
.../templates/tables/table-paginated.html.twig | 33 +-
.../templates/tables/table-tool-menu.html.twig | 10 +-
.../core/tests/Integration/DatabaseTests.php | 214 +-
.../core/tests/Unit/BelongsToManyThroughTest.php | 14 +-
.../core/tests/Unit/DatabaseSyncableTest.php | 23 +-
main/app/sprinkles/core/tests/Unit/SprunjeTest.php | 26 +-
918 files changed, 24534 insertions(+), 28379 deletions(-)
delete mode 100644 main/app/sprinkles/core/assets/SiteAssets/js/language.js
(limited to 'main/app/sprinkles/core')
diff --git a/main/app/sprinkles/core/asset-bundles.json b/main/app/sprinkles/core/asset-bundles.json
index b47b73d..e3dbdc1 100644
--- a/main/app/sprinkles/core/asset-bundles.json
+++ b/main/app/sprinkles/core/asset-bundles.json
@@ -1,141 +1,141 @@
{
- "bundle": {
- "js/main": {
- "scripts": [
- "SiteAssets/js/jquery.js",
- "vendor/bootstrap/dist/js/bootstrap.js",
- "vendor/handlebars/handlebars.js",
- "vendor/jquery-validation/dist/jquery.validate.js",
- "vendor/jquery-validation/dist/additional-methods.js",
- "vendor/jquery-slimscroll/jquery.slimscroll.js",
- "vendor/icheck/icheck.min.js",
- "vendor/fastclick/lib/fastclick.js",
- "vendor/select2/dist/js/select2.full.js",
- "vendor/clipboard/dist/clipboard.js",
- "userfrosting/js/attrchange.js",
- "userfrosting/js/AdminLTE.js",
- "userfrosting/js/AdminLTE-custom.js",
- "userfrosting/js/fortress-jqueryvalidation-methods.js",
- "userfrosting/js/uf-jqueryvalidation-config.js",
- "userfrosting/js/uf-alerts.js",
- "userfrosting/js/uf-form.js",
- "userfrosting/js/uf-modal.js",
- "userfrosting/js/uf-copy.js",
- "userfrosting/js/uf-init.js"
- ],
- "options": {
- "result": {
- "type": {
- "scripts": "plain"
- }
- }
- }
- },
- "js/form-widgets": {
- "scripts": [
- "vendor/speakingurl/speakingurl.min.js",
- "userfrosting/js/uf-collection.js"
- ],
- "options": {
- "result": {
- "type": {
- "scripts": "plain"
- }
- }
- }
- },
- "js/main-site": {
- "scripts": [
- "SiteAssets/js/fontawesome.js",
- "SiteAssets/js/linkify.js",
- "SiteAssets/js/encryption.js",
- "SiteAssets/js/swiper.js",
- "SiteAssets/js/console.image.js",
- "SiteAssets/js/imageCaching.js",
- "SiteAssets/js/popups.js",
- "SiteAssets/js/push.js",
- "SiteAssets/js/chat.js",
- "SiteAssets/js/main.js"
- ],
- "options": {
- "result": {
- "type": {
- "scripts": "plain"
- }
- }
- }
- },
- "css/main": {
- "styles": [
- "vendor/font-awesome/css/font-awesome.css",
- "vendor/bootstrap/dist/css/bootstrap.css",
- "vendor/select2/dist/css/select2.css",
- "vendor/icheck/skins/square/_all.css",
- "vendor/ionicons/css/ionicons.css",
- "userfrosting/css/uf-jqueryvalidation.css",
- "userfrosting/css/uf-alerts.css",
- "userfrosting/css/AdminLTE.css",
- "userfrosting/css/AdminLTE-skins-all.css",
- "userfrosting/css/userfrosting.css"
- ],
- "options": {
- "result": {
- "type": {
- "styles": "plain"
- }
- }
- }
- },
- "css/form-widgets": {
- "styles": [
- "userfrosting/css/uf-collection.css"
- ],
- "options": {
- "result": {
- "type": {
- "styles": "plain"
- }
- }
- }
- },
- "css/main-site": {
- "styles": [
- "SiteAssets/css/normalize.css",
- "SiteAssets/css/swiper.css",
- "SiteAssets/css/animate.css",
- "SiteAssets/css/main.css"
- ],
- "options": {
- "result": {
- "type": {
- "styles": "plain"
- }
- }
- }
- },
- "css/DarkTheme": {
- "styles": [
- "SiteAssets/css/DarkTheme.css"
- ],
- "options": {
- "result": {
- "type": {
- "styles": "plain"
- }
- }
- }
- },
- "css/LightTheme": {
- "styles": [
- "SiteAssets/css/LightTheme.css"
- ],
- "options": {
- "result": {
- "type": {
- "styles": "plain"
- }
- }
- }
+ "bundle": {
+ "js/main": {
+ "scripts": [
+ "SiteAssets/js/jquery.js",
+ "vendor/bootstrap/dist/js/bootstrap.js",
+ "vendor/handlebars/handlebars.js",
+ "vendor/jquery-validation/dist/jquery.validate.js",
+ "vendor/jquery-validation/dist/additional-methods.js",
+ "vendor/jquery-slimscroll/jquery.slimscroll.js",
+ "vendor/icheck/icheck.min.js",
+ "vendor/fastclick/lib/fastclick.js",
+ "vendor/select2/dist/js/select2.full.js",
+ "vendor/clipboard/dist/clipboard.js",
+ "userfrosting/js/attrchange.js",
+ "userfrosting/js/AdminLTE.js",
+ "userfrosting/js/AdminLTE-custom.js",
+ "userfrosting/js/fortress-jqueryvalidation-methods.js",
+ "userfrosting/js/uf-jqueryvalidation-config.js",
+ "userfrosting/js/uf-alerts.js",
+ "userfrosting/js/uf-form.js",
+ "userfrosting/js/uf-modal.js",
+ "userfrosting/js/uf-copy.js",
+ "userfrosting/js/uf-init.js"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "scripts": "plain"
+ }
}
+ }
+ },
+ "js/form-widgets": {
+ "scripts": [
+ "vendor/speakingurl/speakingurl.min.js",
+ "userfrosting/js/uf-collection.js"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "scripts": "plain"
+ }
+ }
+ }
+ },
+ "js/main-site": {
+ "scripts": [
+ "SiteAssets/js/fontawesome.js",
+ "SiteAssets/js/linkify.js",
+ "SiteAssets/js/encryption.js",
+ "SiteAssets/js/swiper.js",
+ "SiteAssets/js/console.image.js",
+ "SiteAssets/js/imageCaching.js",
+ "SiteAssets/js/popups.js",
+ "SiteAssets/js/push.js",
+ "SiteAssets/js/chat.js",
+ "SiteAssets/js/main.js"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "scripts": "plain"
+ }
+ }
+ }
+ },
+ "css/main": {
+ "styles": [
+ "vendor/font-awesome/css/font-awesome.css",
+ "vendor/bootstrap/dist/css/bootstrap.css",
+ "vendor/select2/dist/css/select2.css",
+ "vendor/icheck/skins/square/_all.css",
+ "vendor/ionicons/css/ionicons.css",
+ "userfrosting/css/uf-jqueryvalidation.css",
+ "userfrosting/css/uf-alerts.css",
+ "userfrosting/css/AdminLTE.css",
+ "userfrosting/css/AdminLTE-skins-all.css",
+ "userfrosting/css/userfrosting.css"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "styles": "plain"
+ }
+ }
+ }
+ },
+ "css/form-widgets": {
+ "styles": [
+ "userfrosting/css/uf-collection.css"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "styles": "plain"
+ }
+ }
+ }
+ },
+ "css/main-site": {
+ "styles": [
+ "SiteAssets/css/normalize.css",
+ "SiteAssets/css/swiper.css",
+ "SiteAssets/css/animate.css",
+ "SiteAssets/css/main.css"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "styles": "plain"
+ }
+ }
+ }
+ },
+ "css/DarkTheme": {
+ "styles": [
+ "SiteAssets/css/DarkTheme.css"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "styles": "plain"
+ }
+ }
+ }
+ },
+ "css/LightTheme": {
+ "styles": [
+ "SiteAssets/css/LightTheme.css"
+ ],
+ "options": {
+ "result": {
+ "type": {
+ "styles": "plain"
+ }
+ }
+ }
}
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/css/main.css b/main/app/sprinkles/core/assets/SiteAssets/css/main.css
index 880d33c..da6243e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/css/main.css
+++ b/main/app/sprinkles/core/assets/SiteAssets/css/main.css
@@ -220,7 +220,6 @@ hr.ChatHeaderDivider {
align-self: center;
}
-
/* main chat */
.SelectedReceiver {
display: none;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/chat.js b/main/app/sprinkles/core/assets/SiteAssets/js/chat.js
index ee30c04..d54cbe6 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/js/chat.js
+++ b/main/app/sprinkles/core/assets/SiteAssets/js/chat.js
@@ -24,6 +24,7 @@ function InitializeChatServer() {
var ChatMessages = $("#ChatMessages");
var TypingIndicatorAnimationElement = "
";
+ var WebSocketConnectTimerStart = performance.now(); // START CONNECTION EXECUTION TIMER
const ChatSocket = new WebSocket('wss://marvinborner.ddnss.de:1337');
ChatSocket.onerror = function () {
setTimeout(function () {
@@ -33,14 +34,15 @@ function InitializeChatServer() {
};
ChatSocket.onopen = function () {
// CONNECTION SUCCESSFUL!
- console.log("%c[CHATSOCKET LOGGER] Chat connection established!", "color: darkorange");
+ var WebSocketConnectTimerEnd = performance.now(); // END CONNECTION EXECUTION TIMER
+ console.log("%c[CHATSOCKET LOGGER] Chat connection established! (Took " + +(WebSocketConnectTimerEnd - WebSocketConnectTimerStart) + " milliseconds)", "color: darkorange");
// START VERIFICATION
ChatSocket.send(JSON.stringify({
ClientMessageType: "Verify",
Cookie: document.cookie,
UserID: current_user_id
}));
- console.log("%c[CHATSOCKET LOGGER] Started chat verification process...", "color: grey");
+ console.log("%c[CHATSOCKET LOGGER] Started chat verification process...", "color: gray");
// GOT MESSAGE
ChatSocket.onmessage = function (e) {
// DECLARATIONS
@@ -61,7 +63,6 @@ function InitializeChatServer() {
LastMessage = $(".MessageWrapper.Normal:last .ChatMessage");
Username = MessageObject.Username;
-
// GET OWN PUBLIC KEY FIRST
if (!(current_username in PublicKey)) {
$.ajax({
@@ -91,7 +92,7 @@ function InitializeChatServer() {
if (!ServerMessage) { // NO SERVER MESSAGE -> SENT BY USER
// DECRYPT MESSAGE
options = {
- message: openpgp.message.readArmored("-----BEGIN PGP MESSAGE-----\r\nVersion: OpenPGP.js v3.0.9\r\nComment: https://openpgpjs.org\r\n\r\n" + Message + "\r\n\-----END PGP MESSAGE-----\r\n"),
+ message: openpgp.message.readArmored("-----BEGIN PGP MESSAGE-----\r\nVersion: OpenPGP.js v3.0.9\r\nComment: https://openpgpjs.org\r\n\r\n" + Message + "\r\n\-----END PGP MESSAGE-----\r\n"), // FORMAT MESSAGE
publicKeys: openpgp.key.readArmored(PublicKey[Username]).keys, // FOR VERIFICATION
privateKeys: [privKeyObj]
};
@@ -150,24 +151,25 @@ function InitializeChatServer() {
} else if (ServerMessageType === "TypingState") { // TYPE: SOMEBODY'S TYPING STATE CHANGED!
if (State) { // IF 'SOMEBODY' STARTED TYPING
if (WasHimself) { // IDENTIFY 'SOMEBODY' -> WAS HIMSELF -> NOT THAT IMPORTANT (USER KNOWS WHEN HE STARTS TYPING?)
- console.log("%c[CHAT TYPING LOGGER] You started typing!", "color: grey");
+ console.log("%c[CHAT TYPING LOGGER] You started typing!", "color: gray");
} else if (!WasHimself) { // IDENTIFY 'SOMEBODY' -> WAS OTHER USER -> SHOW TYPING ANIMATION ON RECEIVER'S SIDE
ChatMessages.append("" + TypingIndicatorAnimationElement + "
");
- console.log("%c[CHAT TYPING LOGGER] " + Username + " started typing!", "color: grey");
+ console.log("%c[CHAT TYPING LOGGER] " + Username + " started typing!", "color: gray");
}
} else if (!State) { // IF 'SOMEBODY' STOPPED TYPING
if (WasHimself) { // IDENTIFY 'SOMEBODY' -> WAS HIMSELF -> NOT THAT IMPORTANT (USER KNOWS WHEN HE STOPS TYPING?)
- console.log("%c[CHAT TYPING LOGGER] You stopped typing!", "color: grey");
+ console.log("%c[CHAT TYPING LOGGER] You stopped typing!", "color: gray");
} else if (!WasHimself) { // IDENTIFY 'SOMEBODY' -> WAS OTHER USER -> REMOVE TYPING ANIMATION
//TypingIndicatorMessage.fadeOut("fast");
TypingIndicatorMessage.remove();
- console.log("%c[CHAT TYPING LOGGER] " + Username + " stopped typing!", "color: grey");
+ console.log("%c[CHAT TYPING LOGGER] " + Username + " stopped typing!", "color: gray");
}
}
} else if (ServerMessageType === "Verify") { // TYPE: SERVER CHECKED ACCESS -- MOSTLY HANDLED IN BACKEND
if (Granted) {
console.log("%c[CHATSOCKET LOGGER] Chat access granted!", "color: green");
} else if (!Granted) {
+ triggerErrorPopup("ChatNotAllowed");
console.log("%c[CHATSOCKET LOGGER] Chat access denied!", "color: red");
}
} else if (ServerMessageType === "SetReceiver") { // TYPE: SERVER CHECKED ACCESS -- MOSTLY HANDLED IN BACKEND
diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/language.js b/main/app/sprinkles/core/assets/SiteAssets/js/language.js
deleted file mode 100644
index ca1d41c..0000000
--- a/main/app/sprinkles/core/assets/SiteAssets/js/language.js
+++ /dev/null
@@ -1,36 +0,0 @@
-function Translate() {
- //initialization
- this.init = function (lng) {
- this.attribute = 'data-lang';
- this.lng = lng;
- };
- //translate
- this.process = function () {
- var _self = this;
- var xrhFile = new XMLHttpRequest();
- //load content data
- xrhFile.open("GET", "assets/languages/json/Translations.json", true);
- xrhFile.onreadystatechange = function () {
- if (xrhFile.readyState === 4) {
- if (xrhFile.status === 200 || xrhFile.status === 0) {
- var LngObject = JSON.parse(xrhFile.responseText);
- var allDom = document.getElementsByTagName("*");
- for (var i = 0; i < allDom.length; i++) {
- var elem = allDom[i];
- var key = elem.getAttribute(_self.attribute);
-
- if (key != null) {
- //console.log("Language initialized with language pack: " + _self.lng);
- elem.innerHTML = LngObject[_self.lng][key];
- }
- }
- }
- }
- };
- xrhFile.send();
- }
-}
-
-$(document).ready(function () {
- initiateLanguage();
-});
diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/main.js b/main/app/sprinkles/core/assets/SiteAssets/js/main.js
index ccb80d4..33716b5 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/js/main.js
+++ b/main/app/sprinkles/core/assets/SiteAssets/js/main.js
@@ -20,14 +20,20 @@ var ExploreData = $("#ExploreData");
/**
* POPUPS
*/
-function triggerErrorPopup() {
+function triggerErrorPopup(ErrorCode) {
+ var ErrorMessage = "Unknown Error occurred!", ErrorInformationSite = "", AlsoLogInConsole = true; // WILL BE REWRITTEN (EXCEPT SOMETHING CRAZY HAPPENS)
+ switch (ErrorCode) {
+ case "ChatNotAllowed":
+ AlsoLogInConsole = false;
+ ErrorMessage = "Sorry, it seems like your account is not allowed to use our chat feature.";
+ break;
+ }
+ if (AlsoLogInConsole) console.error("Error: " + ErrorMessage);
swal({
title: 'Error!',
- text: 'Do you want to continue?',
- footer: 'Why do I have this problem?',
- type: 'error',
- confirmButtonText: 'Yes',
- cancelButtonText: 'No'
+ text: ErrorMessage,
+ footer: 'Why do I have this problem?',
+ type: 'error'
});
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/js/openpgp.worker.js b/main/app/sprinkles/core/assets/SiteAssets/js/openpgp.worker.js
index 1d0040f..e29f01a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/js/openpgp.worker.js
+++ b/main/app/sprinkles/core/assets/SiteAssets/js/openpgp.worker.js
@@ -1,4 +1,3 @@
-
/*! OpenPGP.js v3.0.9 - 2018-04-30 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
!function e(n, r, t) {
function o(a, f) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php b/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php
index 5463aec..30944c6 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/Chatserver/src/ChatProcessor.php
@@ -113,15 +113,15 @@ class ChatProcessor implements MessageComponentInterface
break;
case "ChatMessage": // MESSAGE RECEIVED
$ReceiversId = $this->ReceiversId[$conn->resourceId];
- if (isset($this->ResourceId[$ReceiversId])) {
- $ReceiversResourceId = $this->ResourceId[$ReceiversId];
- $MessageObject = new \stdClass();
- $MessageObject->ServerMessage = FALSE;
- $MessageObject->Username = $this->userInfo[$conn->resourceId]->user_name;
- $MessageObject->Fullname = $this->userInfo[$conn->resourceId]->full_name;
- $MessageObject->Avatar = $this->userInfo[$conn->resourceId]->avatar;
- $MessageObject->Message = htmlspecialchars($data->Message);
+ $MessageObject = new \stdClass();
+ $MessageObject->ServerMessage = FALSE;
+ $MessageObject->Username = $this->userInfo[$conn->resourceId]->user_name;
+ $MessageObject->Fullname = $this->userInfo[$conn->resourceId]->full_name;
+ $MessageObject->Avatar = $this->userInfo[$conn->resourceId]->avatar;
+ $MessageObject->Message = htmlspecialchars($data->Message);
+ if (isset($this->ResourceId[$ReceiversId])) { // USER IS ONLINE
+ $ReceiversResourceId = $this->ResourceId[$ReceiversId];
if ($data->EncryptedWithKeyOfUsername === $this->userInfo[$ReceiversResourceId]->user_name) {
$MessageObject->WasHimself = FALSE;
$MessageJson = json_encode($MessageObject, TRUE);
@@ -147,7 +147,8 @@ class ChatProcessor implements MessageComponentInterface
$MessageJson = json_encode($MessageObject, TRUE);
$this->users[$conn->resourceId]->send($MessageJson); // SEND TO SENDER (FOR VERIFICATION)
}
- } else { // USER ISN'T ONLINE -> ONLY STORE IN DATABASE
+ } else { // USER ISN'T ONLINE -> ONLY STORE IN DATABASE AND SEND TO SENDER
+ // STORE IN DB
$url = "https://beam-messenger.de/wormhole/" . file("/AccessToken.txt", FILE_IGNORE_NEW_LINES)["0"] . "/new/message/" . $this->userInfo[$conn->resourceId]->id . "/" . $this->ReceiversId[$conn->resourceId] . "/";
$data = array('message' => $data->Message);
$options = array(
@@ -161,6 +162,11 @@ class ChatProcessor implements MessageComponentInterface
$result = file_get_contents($url, FALSE, $context);
if ($result === FALSE) { /* Handle error */
}
+
+ // SEND BACK FOR VERIFICATION
+ $MessageObject->WasHimself = TRUE;
+ $MessageJson = json_encode($MessageObject, TRUE);
+ $this->users[$conn->resourceId]->send($MessageJson); // SEND TO SENDER (FOR VERIFICATION)
}
break;
case "GroupMessage": // GROUP MESSAGE RECEIVED -- RESERVED FOR LATER USE (CHANNEL BASED RIGHT NOW)
@@ -227,7 +233,10 @@ class ChatProcessor implements MessageComponentInterface
unset($this->verifiedUsers[$conn->resourceId]);
unset($this->users[$conn->resourceId]);
unset($this->channels[$conn->resourceId]);
+ unset($this->ResourceId[$conn->resourceId]);
unset($this->userInfo[$conn->resourceId]);
+ unset($this->userID[$conn->resourceId]);
+ unset($this->ReceiversId[$conn->resourceId]);
}
public function onError(ConnectionInterface $conn, \Exception $e) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/composer.json
index 8406940..edc9dea 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/composer.json
@@ -1,11 +1,11 @@
{
- "autoload": {
- "psr-4": {
- "Websocket\\": "Chatserver/src"
- }
- },
- "require": {
- "cboden/ratchet": "^0.4.1",
- "nubs/random-name-generator": "^2.1"
+ "autoload": {
+ "psr-4": {
+ "Websocket\\": "Chatserver/src"
}
+ },
+ "require": {
+ "cboden/ratchet": "^0.4.1",
+ "nubs/random-name-generator": "^2.1"
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/scripts.php b/main/app/sprinkles/core/assets/SiteAssets/php/scripts.php
index 178940b..465f448 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/scripts.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/scripts.php
@@ -1,6 +1,8 @@
add('assets/js/fontawesome.js');
$minifier->add('assets/js/modernizr.js');
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/stylesheet.php b/main/app/sprinkles/core/assets/SiteAssets/php/stylesheet.php
index 69a2636..d979f13 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/stylesheet.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/stylesheet.php
@@ -1,6 +1,8 @@
add('assets/css/main.css');
echo $minifier->minify();
\ No newline at end of file
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/composer.json
index 9529618..6570fbb 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/composer.json
@@ -1,36 +1,42 @@
{
- "name": "cboden/ratchet"
- , "type": "library"
- , "description": "PHP WebSocket library"
- , "keywords": ["WebSockets", "Server", "Ratchet", "Sockets", "WebSocket"]
- , "homepage": "http://socketo.me"
- , "license": "MIT"
- , "authors": [
- {
- "name": "Chris Boden"
- , "email": "cboden@gmail.com"
- , "role": "Developer"
- }
- ]
- , "support": {
- "forum": "https://groups.google.com/forum/#!forum/ratchet-php"
- , "issues": "https://github.com/ratchetphp/Ratchet/issues"
- , "irc": "irc://irc.freenode.org/reactphp"
+ "name": "cboden/ratchet",
+ "type": "library",
+ "description": "PHP WebSocket library",
+ "keywords": [
+ "WebSockets",
+ "Server",
+ "Ratchet",
+ "Sockets",
+ "WebSocket"
+ ],
+ "homepage": "http://socketo.me",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Chris Boden",
+ "email": "cboden@gmail.com",
+ "role": "Developer"
}
- , "autoload": {
- "psr-4": {
- "Ratchet\\": "src/Ratchet"
- }
- }
- , "require": {
- "php": ">=5.4.2"
- , "ratchet/rfc6455": "^0.2"
- , "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5"
- , "guzzlehttp/psr7": "^1.0"
- , "symfony/http-foundation": "^2.6|^3.0|^4.0"
- , "symfony/routing": "^2.6|^3.0|^4.0"
- }
- , "require-dev": {
- "phpunit/phpunit": "~4.8"
+ ],
+ "support": {
+ "forum": "https://groups.google.com/forum/#!forum/ratchet-php",
+ "issues": "https://github.com/ratchetphp/Ratchet/issues",
+ "irc": "irc://irc.freenode.org/reactphp"
+ },
+ "autoload": {
+ "psr-4": {
+ "Ratchet\\": "src/Ratchet"
}
+ },
+ "require": {
+ "php": ">=5.4.2",
+ "ratchet/rfc6455": "^0.2",
+ "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5",
+ "guzzlehttp/psr7": "^1.0",
+ "symfony/http-foundation": "^2.6|^3.0|^4.0",
+ "symfony/routing": "^2.6|^3.0|^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8"
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/phpunit.xml.dist b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/phpunit.xml.dist
index 0cc5451..187b1f0 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/phpunit.xml.dist
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/phpunit.xml.dist
@@ -1,13 +1,13 @@
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/AbstractConnectionDecorator.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/AbstractConnectionDecorator.php
index 9707951..ddb7c7b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/AbstractConnectionDecorator.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/AbstractConnectionDecorator.php
@@ -1,4 +1,5 @@
routes = new RouteCollection;
+ $this->routes = new RouteCollection;
$this->_server = new IoServer(new HttpServer(new Router(new UrlMatcher($this->routes, new RequestContext))), $socket, $loop);
$policy = new FlashPolicy;
@@ -93,26 +96,26 @@ class App {
/**
* Add an endpoint/application to the server
- * @param string $path The URI the client will connect to
+ * @param string $path The URI the client will connect to
* @param ComponentInterface $controller Your application to server for the route. If not specified, assumed to be for a WebSocket
- * @param array $allowedOrigins An array of hosts allowed to connect (same host by default), ['*'] for any
- * @param string $httpHost Override the $httpHost variable provided in the __construct
+ * @param array $allowedOrigins An array of hosts allowed to connect (same host by default), ['*'] for any
+ * @param string $httpHost Override the $httpHost variable provided in the __construct
* @return ComponentInterface|WsServer
*/
- public function route($path, ComponentInterface $controller, array $allowedOrigins = array(), $httpHost = null) {
+ public function route($path, ComponentInterface $controller, array $allowedOrigins = array(), $httpHost = NULL) {
if ($controller instanceof HttpServerInterface || $controller instanceof WsServer) {
$decorated = $controller;
- } elseif ($controller instanceof WampServerInterface) {
+ } else if ($controller instanceof WampServerInterface) {
$decorated = new WsServer(new WampServer($controller));
$decorated->enableKeepAlive($this->_server->loop);
- } elseif ($controller instanceof MessageComponentInterface) {
+ } else if ($controller instanceof MessageComponentInterface) {
$decorated = new WsServer($controller);
$decorated->enableKeepAlive($this->_server->loop);
} else {
$decorated = $controller;
}
- if ($httpHost === null) {
+ if ($httpHost === NULL) {
$httpHost = $this->httpHost;
}
@@ -125,8 +128,8 @@ class App {
}
//allow origins in flash policy server
- if(empty($this->flashServer) === false) {
- foreach($allowedOrigins as $allowedOrgin) {
+ if (empty($this->flashServer) === FALSE) {
+ foreach ($allowedOrigins as $allowedOrgin) {
$this->flashServer->app->addAllowedAccess($allowedOrgin, $this->port);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/ComponentInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/ComponentInterface.php
index 37e41b1..31324c9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/ComponentInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/ComponentInterface.php
@@ -1,11 +1,13 @@
_httpServer = $component;
- $this->_reqParser = new HttpRequestParser;
+ $this->_reqParser = new HttpRequestParser;
}
/**
* {@inheritdoc}
*/
public function onOpen(ConnectionInterface $conn) {
- $conn->httpHeadersReceived = false;
+ $conn->httpHeadersReceived = FALSE;
}
/**
* {@inheritdoc}
*/
public function onMessage(ConnectionInterface $from, $msg) {
- if (true !== $from->httpHeadersReceived) {
+ if (TRUE !== $from->httpHeadersReceived) {
try {
- if (null === ($request = $this->_reqParser->onMessage($from, $msg))) {
+ if (NULL === ($request = $this->_reqParser->onMessage($from, $msg))) {
return;
}
} catch (\OverflowException $oe) {
return $this->close($from, 413);
}
- $from->httpHeadersReceived = true;
+ $from->httpHeadersReceived = TRUE;
return $this->_httpServer->onOpen($from, $request);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/HttpServerInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/HttpServerInterface.php
index 2c37c49..baacdb5 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/HttpServerInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/HttpServerInterface.php
@@ -1,14 +1,17 @@
_component = $component;
@@ -31,7 +34,7 @@ class OriginCheck implements HttpServerInterface {
/**
* {@inheritdoc}
*/
- public function onOpen(ConnectionInterface $conn, RequestInterface $request = null) {
+ public function onOpen(ConnectionInterface $conn, RequestInterface $request = NULL) {
$header = (string)$request->getHeader('Origin')[0];
$origin = parse_url($header, PHP_URL_HOST) ?: $header;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/Router.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/Router.php
index df7fe82..3d0dc3e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/Router.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Http/Router.php
@@ -1,5 +1,7 @@
$value) {
+ foreach ($route as $key => $value) {
if ((is_string($key)) && ('_' !== substr($key, 0, 1))) {
$parameters[$key] = $value;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/MessageComponentInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/MessageComponentInterface.php
index b4a92e2..90096c3 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/MessageComponentInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/MessageComponentInterface.php
@@ -1,5 +1,7 @@
validateDomain($domain)) {
- throw new \UnexpectedValueException('Invalid domain');
+ throw new \UnexpectedValueException('Invalid domain');
}
if (!$this->validatePorts($ports)) {
- throw new \UnexpectedValueException('Invalid Port');
+ throw new \UnexpectedValueException('Invalid Port');
}
- $this->_access[] = array($domain, $ports, (boolean)$secure);
- $this->_cacheValid = false;
+ $this->_access[] = array($domain, $ports, (boolean)$secure);
+ $this->_cacheValid = FALSE;
return $this;
}
-
+
/**
* Removes all domains from the allowed access list.
- *
+ *
* @return \Ratchet\Server\FlashPolicy
*/
public function clearAllowedAccess() {
- $this->_access = array();
- $this->_cacheValid = false;
+ $this->_access = array();
+ $this->_cacheValid = FALSE;
return $this;
}
@@ -99,7 +102,7 @@ class FlashPolicy implements MessageComponentInterface {
}
$this->_siteControl = $permittedCrossDomainPolicies;
- $this->_cacheValid = false;
+ $this->_cacheValid = FALSE;
return $this;
}
@@ -115,8 +118,8 @@ class FlashPolicy implements MessageComponentInterface {
*/
public function onMessage(ConnectionInterface $from, $msg) {
if (!$this->_cacheValid) {
- $this->_cache = $this->renderPolicy()->asXML();
- $this->_cacheValid = true;
+ $this->_cache = $this->renderPolicy()->asXML();
+ $this->_cacheValid = TRUE;
}
$from->send($this->_cache . "\0");
@@ -161,7 +164,7 @@ class FlashPolicy implements MessageComponentInterface {
$tmp = $policy->addChild('allow-access-from');
$tmp->addAttribute('domain', $access[0]);
$tmp->addAttribute('to-ports', $access[1]);
- $tmp->addAttribute('secure', ($access[2] === true) ? 'true' : 'false');
+ $tmp->addAttribute('secure', ($access[2] === TRUE) ? 'true' : 'false');
}
return $policy;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IoConnection.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IoConnection.php
index 9f864bb..92d5b50 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IoConnection.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IoConnection.php
@@ -1,12 +1,15 @@
loop = $loop;
- $this->app = $app;
+ $this->app = $app;
$this->socket = $socket;
$socket->on('connection', array($this, 'handleConnect'));
}
/**
- * @param \Ratchet\MessageComponentInterface $component The application that I/O will call when events are received
- * @param int $port The port to server sockets on
- * @param string $address The address to receive sockets on (0.0.0.0 means receive connections from any)
+ * @param \Ratchet\MessageComponentInterface $component The application that I/O will call when events are received
+ * @param int $port The port to server sockets on
+ * @param string $address The address to receive sockets on (0.0.0.0 means receive connections from any)
* @return IoServer
*/
public static function factory(MessageComponentInterface $component, $port = 80, $address = '0.0.0.0') {
- $loop = LoopFactory::create();
+ $loop = LoopFactory::create();
$socket = new Reactor($address . ':' . $port, $loop);
return new static($component, $socket, $loop);
@@ -66,7 +69,7 @@ class IoServer {
* @throws \RuntimeException If a loop was not previously specified
*/
public function run() {
- if (null === $this->loop) {
+ if (NULL === $this->loop) {
throw new \RuntimeException("A React Loop was not provided during instantiation");
}
@@ -85,7 +88,7 @@ class IoServer {
$uri = $conn->getRemoteAddress();
$conn->decor->remoteAddress = trim(
- parse_url((strpos($uri, '://') === false ? 'tcp://' : '') . $uri, PHP_URL_HOST),
+ parse_url((strpos($uri, '://') === FALSE ? 'tcp://' : '') . $uri, PHP_URL_HOST),
'[]'
);
@@ -104,7 +107,7 @@ class IoServer {
/**
* Data has been received from React
- * @param string $data
+ * @param string $data
* @param \React\Socket\ConnectionInterface $conn
*/
public function handleData($data, $conn) {
@@ -131,7 +134,7 @@ class IoServer {
/**
* An error has occurred, let the listening application know
- * @param \Exception $e
+ * @param \Exception $e
* @param \React\Socket\ConnectionInterface $conn
*/
public function handleError(\Exception $e, $conn) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IpBlackList.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IpBlackList.php
index 9342254..4ddf88b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IpBlackList.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Server/IpBlackList.php
@@ -1,9 +1,12 @@
_blacklist[$ip] = true;
+ $this->_blacklist[$ip] = TRUE;
return $this;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Serialize/HandlerInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Serialize/HandlerInterface.php
index b83635f..42e4bed 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Serialize/HandlerInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Serialize/HandlerInterface.php
@@ -1,7 +1,9 @@
_app = $app;
+ public function __construct(HttpServerInterface $app, \SessionHandlerInterface $handler, array $options = array(), HandlerInterface $serializer = NULL) {
+ $this->_app = $app;
$this->_handler = $handler;
- $this->_null = new NullSessionHandler;
+ $this->_null = new NullSessionHandler;
ini_set('session.auto_start', 0);
ini_set('session.cache_limiter', '');
@@ -55,7 +58,7 @@ class SessionProvider implements HttpServerInterface {
$this->setOptions($options);
- if (null === $serializer) {
+ if (NULL === $serializer) {
$serialClass = __NAMESPACE__ . "\\Serialize\\{$this->toClassCase(ini_get('session.serialize_handler'))}Handler"; // awesome/terrible hack, eh?
if (!class_exists($serialClass)) {
throw new \RuntimeException('Unable to parse session serialize handler');
@@ -70,20 +73,20 @@ class SessionProvider implements HttpServerInterface {
/**
* {@inheritdoc}
*/
- public function onOpen(ConnectionInterface $conn, RequestInterface $request = null) {
+ public function onOpen(ConnectionInterface $conn, RequestInterface $request = NULL) {
$sessionName = ini_get('session.name');
- $id = array_reduce($request->getHeader('Cookie'), function($accumulator, $cookie) use ($sessionName) {
+ $id = array_reduce($request->getHeader('Cookie'), function ($accumulator, $cookie) use ($sessionName) {
if ($accumulator) {
return $accumulator;
}
$crumbs = $this->parseCookie($cookie);
- return isset($crumbs['cookies'][$sessionName]) ? $crumbs['cookies'][$sessionName] : false;
- }, false);
+ return isset($crumbs['cookies'][$sessionName]) ? $crumbs['cookies'][$sessionName] : FALSE;
+ }, FALSE);
- if (null === $request || false === $id) {
+ if (NULL === $request || FALSE === $id) {
$saveHandler = $this->_null;
$id = '';
} else {
@@ -164,39 +167,39 @@ class SessionProvider implements HttpServerInterface {
* Taken from Guzzle3
*/
private static $cookieParts = array(
- 'domain' => 'Domain',
- 'path' => 'Path',
- 'max_age' => 'Max-Age',
- 'expires' => 'Expires',
- 'version' => 'Version',
- 'secure' => 'Secure',
- 'port' => 'Port',
- 'discard' => 'Discard',
- 'comment' => 'Comment',
+ 'domain' => 'Domain',
+ 'path' => 'Path',
+ 'max_age' => 'Max-Age',
+ 'expires' => 'Expires',
+ 'version' => 'Version',
+ 'secure' => 'Secure',
+ 'port' => 'Port',
+ 'discard' => 'Discard',
+ 'comment' => 'Comment',
'comment_url' => 'Comment-Url',
- 'http_only' => 'HttpOnly'
+ 'http_only' => 'HttpOnly'
);
/**
* Taken from Guzzle3
*/
- private function parseCookie($cookie, $host = null, $path = null, $decode = false) {
+ private function parseCookie($cookie, $host = NULL, $path = NULL, $decode = FALSE) {
// Explode the cookie string using a series of semicolons
$pieces = array_filter(array_map('trim', explode(';', $cookie)));
// The name of the cookie (first kvp) must include an equal sign.
if (empty($pieces) || !strpos($pieces[0], '=')) {
- return false;
+ return FALSE;
}
// Create the default return array
- $data = array_merge(array_fill_keys(array_keys(self::$cookieParts), null), array(
- 'cookies' => array(),
- 'data' => array(),
- 'path' => $path ?: '/',
- 'http_only' => false,
- 'discard' => false,
- 'domain' => $host
+ $data = array_merge(array_fill_keys(array_keys(self::$cookieParts), NULL), array(
+ 'cookies' => array(),
+ 'data' => array(),
+ 'path' => $path ?: '/',
+ 'http_only' => FALSE,
+ 'discard' => FALSE,
+ 'domain' => $host
));
$foundNonCookies = 0;
@@ -208,7 +211,7 @@ class SessionProvider implements HttpServerInterface {
if (count($cookieParts) == 1) {
// Can be a single value (e.g. secure, httpOnly)
- $value = true;
+ $value = TRUE;
} else {
// Be sure to strip wrapping quotes
$value = trim($cookieParts[1], " \n\r\t\0\x0B\"");
@@ -235,7 +238,7 @@ class SessionProvider implements HttpServerInterface {
// Calculate the expires date
if (!$data['expires'] && $data['max_age']) {
- $data['expires'] = time() + (int) $data['max_age'];
+ $data['expires'] = time() + (int)$data['max_age'];
}
return $data;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/Proxy/VirtualProxy.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/Proxy/VirtualProxy.php
index b478d03..cd86d6f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/Proxy/VirtualProxy.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/Proxy/VirtualProxy.php
@@ -1,8 +1,11 @@
saveHandlerName = 'user';
- $this->_sessionName = ini_get('session.name');
+ $this->_sessionName = ini_get('session.name');
}
/**
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/VirtualSessionStorage.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/VirtualSessionStorage.php
index daa10bb..72e0c5a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/VirtualSessionStorage.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Session/Storage/VirtualSessionStorage.php
@@ -1,25 +1,28 @@
setSaveHandler($handler);
$this->saveHandler->setId($sessionId);
$this->_serializer = $serializer;
- $this->setMetadataBag(null);
+ $this->setMetadataBag(NULL);
}
/**
@@ -27,7 +30,7 @@ class VirtualSessionStorage extends NativeSessionStorage {
*/
public function start() {
if ($this->started && !$this->closed) {
- return true;
+ return TRUE;
}
// You have to call Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::open() to use
@@ -36,22 +39,22 @@ class VirtualSessionStorage extends NativeSessionStorage {
// framework in this case. This must not be the best choice, but it works.
$this->saveHandler->open(session_save_path(), session_name());
- $rawData = $this->saveHandler->read($this->saveHandler->getId());
+ $rawData = $this->saveHandler->read($this->saveHandler->getId());
$sessionData = $this->_serializer->unserialize($rawData);
$this->loadSession($sessionData);
if (!$this->saveHandler->isWrapper() && !$this->saveHandler->isSessionHandlerInterface()) {
- $this->saveHandler->setActive(false);
+ $this->saveHandler->setActive(FALSE);
}
- return true;
+ return TRUE;
}
/**
* {@inheritdoc}
*/
- public function regenerate($destroy = false, $lifetime = null) {
+ public function regenerate($destroy = FALSE, $lifetime = NULL) {
// .. ?
}
@@ -65,16 +68,16 @@ class VirtualSessionStorage extends NativeSessionStorage {
// $this->saveHandler->write($this->saveHandler->getId(),
if (!$this->saveHandler->isWrapper() && !$this->getSaveHandler()->isSessionHandlerInterface()) {
- $this->saveHandler->setActive(false);
+ $this->saveHandler->setActive(FALSE);
}
- $this->closed = true;
+ $this->closed = TRUE;
}
/**
* {@inheritdoc}
*/
- public function setSaveHandler($saveHandler = null) {
+ public function setSaveHandler($saveHandler = NULL) {
if (!($saveHandler instanceof \SessionHandlerInterface)) {
throw new \InvalidArgumentException('Handler must be instance of SessionHandlerInterface');
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Exception.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Exception.php
index 6c824da..e4cd25c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Exception.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Exception.php
@@ -1,5 +1,7 @@
_decorating instanceof WsServerInterface) {
- $subs = $this->_decorating->getSubProtocols();
+ $subs = $this->_decorating->getSubProtocols();
$subs[] = 'wamp';
return $subs;
@@ -85,7 +88,7 @@ class ServerProtocol implements MessageComponentInterface, WsServerInterface {
public function onMessage(ConnectionInterface $from, $msg) {
$from = $this->connections[$from];
- if (null === ($json = @json_decode($msg, true))) {
+ if (NULL === ($json = @json_decode($msg, TRUE))) {
throw new JsonException;
}
@@ -100,11 +103,11 @@ class ServerProtocol implements MessageComponentInterface, WsServerInterface {
switch ($json[0]) {
case static::MSG_PREFIX:
$from->WAMP->prefixes[$json[1]] = $json[2];
- break;
+ break;
case static::MSG_CALL:
array_shift($json);
- $callID = array_shift($json);
+ $callID = array_shift($json);
$procURI = array_shift($json);
if (count($json) == 1 && is_array($json[0])) {
@@ -112,20 +115,20 @@ class ServerProtocol implements MessageComponentInterface, WsServerInterface {
}
$this->_decorating->onCall($from, $callID, $from->getUri($procURI), $json);
- break;
+ break;
case static::MSG_SUBSCRIBE:
$this->_decorating->onSubscribe($from, $from->getUri($json[1]));
- break;
+ break;
case static::MSG_UNSUBSCRIBE:
$this->_decorating->onUnSubscribe($from, $from->getUri($json[1]));
- break;
+ break;
case static::MSG_PUBLISH:
- $exclude = (array_key_exists(3, $json) ? $json[3] : null);
+ $exclude = (array_key_exists(3, $json) ? $json[3] : NULL);
if (!is_array($exclude)) {
- if (true === (boolean)$exclude) {
+ if (TRUE === (boolean)$exclude) {
$exclude = [$from->WAMP->sessionId];
} else {
$exclude = [];
@@ -135,7 +138,7 @@ class ServerProtocol implements MessageComponentInterface, WsServerInterface {
$eligible = (array_key_exists(4, $json) ? $json[4] : []);
$this->_decorating->onPublish($from, $from->getUri($json[1]), $json[2], $exclude, $eligible);
- break;
+ break;
default:
throw new Exception('Invalid WAMP message type');
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Topic.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Topic.php
index bca8f67..23ad561 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Topic.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/Topic.php
@@ -1,11 +1,14 @@
WAMP = new \StdClass;
- $this->WAMP->sessionId = str_replace('.', '', uniqid(mt_rand(), true));
- $this->WAMP->prefixes = array();
+ $this->WAMP = new \StdClass;
+ $this->WAMP->sessionId = str_replace('.', '', uniqid(mt_rand(), TRUE));
+ $this->WAMP->prefixes = array();
$this->send(json_encode(array(WAMP::MSG_WELCOME, $this->WAMP->sessionId, 1, \Ratchet\VERSION)));
}
/**
* Successfully respond to a call made by the client
- * @param string $id The unique ID given by the client to respond to
+ * @param string $id The unique ID given by the client to respond to
* @param array $data an object or array
* @return WampConnection
*/
@@ -37,18 +40,18 @@ class WampConnection extends AbstractConnectionDecorator {
* Respond with an error to a client call
* @param string $id The unique ID given by the client to respond to
* @param string $errorUri The URI given to identify the specific error
- * @param string $desc A developer-oriented description of the error
+ * @param string $desc A developer-oriented description of the error
* @param string $details An optional human readable detail message to send back
* @return WampConnection
*/
- public function callError($id, $errorUri, $desc = '', $details = null) {
+ public function callError($id, $errorUri, $desc = '', $details = NULL) {
if ($errorUri instanceof Topic) {
$errorUri = (string)$errorUri;
}
$data = array(WAMP::MSG_CALL_ERROR, $id, $errorUri, $desc);
- if (null !== $details) {
+ if (NULL !== $details) {
$data[] = $details;
}
@@ -57,7 +60,7 @@ class WampConnection extends AbstractConnectionDecorator {
/**
* @param string $topic The topic to broadcast to
- * @param mixed $msg Data to send with the event. Anything that is json'able
+ * @param mixed $msg Data to send with the event. Anything that is json'able
* @return WampConnection
*/
public function event($topic, $msg) {
@@ -83,12 +86,12 @@ class WampConnection extends AbstractConnectionDecorator {
public function getUri($uri) {
$curieSeperator = ':';
- if (preg_match('/http(s*)\:\/\//', $uri) == false) {
- if (strpos($uri, $curieSeperator) !== false) {
+ if (preg_match('/http(s*)\:\/\//', $uri) == FALSE) {
+ if (strpos($uri, $curieSeperator) !== FALSE) {
list($prefix, $action) = explode($curieSeperator, $uri);
-
- if(isset($this->WAMP->prefixes[$prefix]) === true){
- return $this->WAMP->prefixes[$prefix] . '#' . $action;
+
+ if (isset($this->WAMP->prefixes[$prefix]) === TRUE) {
+ return $this->WAMP->prefixes[$prefix] . '#' . $action;
}
}
}
@@ -108,7 +111,7 @@ class WampConnection extends AbstractConnectionDecorator {
/**
* {@inheritdoc}
*/
- public function close($opt = null) {
+ public function close($opt = NULL) {
$this->getConnection()->close($opt);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/WampServer.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/WampServer.php
index 5d710aa..81bee9c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/WampServer.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/Wamp/WampServer.php
@@ -1,5 +1,7 @@
send($code);
} else {
- $this->send(new Frame(pack('n', $code), true, Frame::OP_CLOSE));
+ $this->send(new Frame(pack('n', $code), TRUE, Frame::OP_CLOSE));
}
$this->getConnection()->close();
- $this->WebSocket->closing = true;
+ $this->WebSocket->closing = TRUE;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServer.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServer.php
index 8030604..6cb9e44 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServer.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServer.php
@@ -1,5 +1,7 @@
msgCb = function(ConnectionInterface $conn, MessageInterface $msg) {
+ $this->msgCb = function (ConnectionInterface $conn, MessageInterface $msg) {
$this->delegate->onMessage($conn, $msg);
};
- } elseif ($component instanceof DataComponentInterface) {
- $this->msgCb = function(ConnectionInterface $conn, MessageInterface $msg) {
+ } else if ($component instanceof DataComponentInterface) {
+ $this->msgCb = function (ConnectionInterface $conn, MessageInterface $msg) {
$this->delegate->onMessage($conn, $msg->getPayload());
};
} else {
@@ -82,21 +85,22 @@ class WsServer implements HttpServerInterface {
throw new \DomainException('Bad encoding, unicode character ✓ did not match expected value. Ensure charset UTF-8 and check ini val mbstring.func_autoload');
}
- $this->delegate = $component;
+ $this->delegate = $component;
$this->connections = new \SplObjectStorage;
- $this->closeFrameChecker = new CloseFrameChecker;
+ $this->closeFrameChecker = new CloseFrameChecker;
$this->handshakeNegotiator = new ServerNegotiator(new RequestVerifier);
- $this->handshakeNegotiator->setStrictSubProtocolCheck(true);
+ $this->handshakeNegotiator->setStrictSubProtocolCheck(TRUE);
if ($component instanceof WsServerInterface) {
$this->handshakeNegotiator->setSupportedSubProtocols($component->getSubProtocols());
}
- $this->pongReceiver = function() {};
+ $this->pongReceiver = function () {
+ };
$reusableUnderflowException = new \UnderflowException;
- $this->ueFlowFactory = function() use ($reusableUnderflowException) {
+ $this->ueFlowFactory = function () use ($reusableUnderflowException) {
return $reusableUnderflowException;
};
}
@@ -104,15 +108,15 @@ class WsServer implements HttpServerInterface {
/**
* {@inheritdoc}
*/
- public function onOpen(ConnectionInterface $conn, RequestInterface $request = null) {
- if (null === $request) {
+ public function onOpen(ConnectionInterface $conn, RequestInterface $request = NULL) {
+ if (NULL === $request) {
throw new \UnexpectedValueException('$request can not be null');
}
$conn->httpRequest = $request;
- $conn->WebSocket = new \StdClass;
- $conn->WebSocket->closing = false;
+ $conn->WebSocket = new \StdClass;
+ $conn->WebSocket->closing = FALSE;
$response = $this->handshakeNegotiator->handshake($request)->withHeader('X-Powered-By', \Ratchet\VERSION);
@@ -126,14 +130,14 @@ class WsServer implements HttpServerInterface {
$streamer = new MessageBuffer(
$this->closeFrameChecker,
- function(MessageInterface $msg) use ($wsConn) {
+ function (MessageInterface $msg) use ($wsConn) {
$cb = $this->msgCb;
$cb($wsConn, $msg);
},
- function(FrameInterface $frame) use ($wsConn) {
+ function (FrameInterface $frame) use ($wsConn) {
$this->onControlFrame($frame, $wsConn);
},
- true,
+ TRUE,
$this->ueFlowFactory
);
@@ -182,12 +186,12 @@ class WsServer implements HttpServerInterface {
$conn->close($frame);
break;
case Frame::OP_PING:
- $conn->send(new Frame($frame->getPayload(), true, Frame::OP_PONG));
+ $conn->send(new Frame($frame->getPayload(), TRUE, Frame::OP_PONG));
break;
case Frame::OP_PONG:
$pongReceiver = $this->pongReceiver;
$pongReceiver($frame, $conn);
- break;
+ break;
}
}
@@ -196,30 +200,30 @@ class WsServer implements HttpServerInterface {
}
public function enableKeepAlive(LoopInterface $loop, $interval = 30) {
- $lastPing = new Frame(uniqid(), true, Frame::OP_PING);
+ $lastPing = new Frame(uniqid(), TRUE, Frame::OP_PING);
$pingedConnections = new \SplObjectStorage;
$splClearer = new \SplObjectStorage;
- $this->pongReceiver = function(FrameInterface $frame, $wsConn) use ($pingedConnections, &$lastPing) {
+ $this->pongReceiver = function (FrameInterface $frame, $wsConn) use ($pingedConnections, &$lastPing) {
if ($frame->getPayload() === $lastPing->getPayload()) {
$pingedConnections->detach($wsConn);
}
};
- $loop->addPeriodicTimer((int)$interval, function() use ($pingedConnections, &$lastPing, $splClearer) {
+ $loop->addPeriodicTimer((int)$interval, function () use ($pingedConnections, &$lastPing, $splClearer) {
foreach ($pingedConnections as $wsConn) {
$wsConn->close();
}
$pingedConnections->removeAllExcept($splClearer);
- $lastPing = new Frame(uniqid(), true, Frame::OP_PING);
+ $lastPing = new Frame(uniqid(), TRUE, Frame::OP_PING);
foreach ($this->connections as $key => $conn) {
- $wsConn = $this->connections[$conn]->connection;
+ $wsConn = $this->connections[$conn]->connection;
$wsConn->send($lastPing);
$pingedConnections->attach($wsConn);
}
});
- }
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServerInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServerInterface.php
index 15d1f7b..f83b273 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServerInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/src/Ratchet/WebSocket/WsServerInterface.php
@@ -1,10 +1,12 @@
send($msg);
}
@@ -18,19 +20,19 @@ class BinaryEcho implements \Ratchet\WebSocket\MessageComponentInterface {
}
}
- $port = $argc > 1 ? $argv[1] : 8000;
- $impl = sprintf('React\EventLoop\%sLoop', $argc > 2 ? $argv[2] : 'StreamSelect');
+$port = $argc > 1 ? $argv[1] : 8000;
+$impl = sprintf('React\EventLoop\%sLoop', $argc > 2 ? $argv[2] : 'StreamSelect');
- $loop = new $impl;
- $sock = new React\Socket\Server('0.0.0.0:' . $port, $loop);
+$loop = new $impl;
+$sock = new React\Socket\Server('0.0.0.0:' . $port, $loop);
- $wsServer = new Ratchet\WebSocket\WsServer(new BinaryEcho);
- // This is enabled to test https://github.com/ratchetphp/Ratchet/issues/430
- // The time is left at 10 minutes so that it will not try to every ping anything
- // This causes the Ratchet server to crash on test 2.7
- $wsServer->enableKeepAlive($loop, 600);
+$wsServer = new Ratchet\WebSocket\WsServer(new BinaryEcho);
+// This is enabled to test https://github.com/ratchetphp/Ratchet/issues/430
+// The time is left at 10 minutes so that it will not try to every ping anything
+// This causes the Ratchet server to crash on test 2.7
+$wsServer->enableKeepAlive($loop, 600);
- $app = new Ratchet\Http\HttpServer($wsServer);
+$app = new Ratchet\Http\HttpServer($wsServer);
- $server = new Ratchet\Server\IoServer($app, $sock, $loop);
- $server->run();
+$server = new Ratchet\Server\IoServer($app, $sock, $loop);
+$server->run();
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-all.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-all.json
index 0494cf3..6a6c3c0 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-all.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-all.json
@@ -1,15 +1,41 @@
{
- "options": {"failByDrop": false}
- , "outdir": "reports/ab"
-
- , "servers": [
- {"agent": "Ratchet/0.4 libevent", "url": "ws://localhost:8001", "options": {"version": 18}}
- , {"agent": "Ratchet/0.4 libev", "url": "ws://localhost:8004", "options": {"version": 18}}
- , {"agent": "Ratchet/0.4 streams", "url": "ws://localhost:8002", "options": {"version": 18}}
- , {"agent": "AutobahnTestSuite/0.5.9", "url": "ws://localhost:8000", "options": {"version": 18}}
- ]
-
- , "cases": ["*"]
- , "exclude-cases": []
- , "exclude-agent-cases": {}
+ "options": {
+ "failByDrop": false
+ },
+ "outdir": "reports/ab",
+ "servers": [
+ {
+ "agent": "Ratchet/0.4 libevent",
+ "url": "ws://localhost:8001",
+ "options": {
+ "version": 18
+ }
+ },
+ {
+ "agent": "Ratchet/0.4 libev",
+ "url": "ws://localhost:8004",
+ "options": {
+ "version": 18
+ }
+ },
+ {
+ "agent": "Ratchet/0.4 streams",
+ "url": "ws://localhost:8002",
+ "options": {
+ "version": 18
+ }
+ },
+ {
+ "agent": "AutobahnTestSuite/0.5.9",
+ "url": "ws://localhost:8000",
+ "options": {
+ "version": 18
+ }
+ }
+ ],
+ "cases": [
+ "*"
+ ],
+ "exclude-cases": [],
+ "exclude-agent-cases": {}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-profile.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-profile.json
index e81a9fd..294762c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-profile.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-profile.json
@@ -1,12 +1,29 @@
{
- "options": {"failByDrop": false}
- , "outdir": "reports/profile"
-
- , "servers": [
- {"agent": "Ratchet", "url": "ws://localhost:8000", "options": {"version": 18}}
- ]
-
- , "cases": ["9.7.4"]
- , "exclude-cases": ["1.2.*", "2.3", "2.4", "2.6", "9.2.*", "9.4.*", "9.6.*", "9.8.*"]
- , "exclude-agent-cases": {}
+ "options": {
+ "failByDrop": false
+ },
+ "outdir": "reports/profile",
+ "servers": [
+ {
+ "agent": "Ratchet",
+ "url": "ws://localhost:8000",
+ "options": {
+ "version": 18
+ }
+ }
+ ],
+ "cases": [
+ "9.7.4"
+ ],
+ "exclude-cases": [
+ "1.2.*",
+ "2.3",
+ "2.4",
+ "2.6",
+ "9.2.*",
+ "9.4.*",
+ "9.6.*",
+ "9.8.*"
+ ],
+ "exclude-agent-cases": {}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-quick.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-quick.json
index c92e805..79af1db 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-quick.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/autobahn/fuzzingclient-quick.json
@@ -1,12 +1,20 @@
{
- "options": {"failByDrop": false}
- , "outdir": "reports/rfc"
-
- , "servers": [
- {"agent": "Ratchet", "url": "ws://localhost:8000", "options": {"version": 18}}
- ]
-
- , "cases": ["*"]
- , "exclude-cases": []
- , "exclude-agent-cases": {}
+ "options": {
+ "failByDrop": false
+ },
+ "outdir": "reports/rfc",
+ "servers": [
+ {
+ "agent": "Ratchet",
+ "url": "ws://localhost:8000",
+ "options": {
+ "version": 18
+ }
+ }
+ ],
+ "cases": [
+ "*"
+ ],
+ "exclude-cases": [],
+ "exclude-agent-cases": {}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/bootstrap.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/bootstrap.php
index 40791ba..681beba 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/bootstrap.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/bootstrap.php
@@ -1,4 +1,4 @@
addPsr4('Ratchet\\', __DIR__ . '/helpers/Ratchet');
+$loader = require __DIR__ . '/../vendor/autoload.php';
+$loader->addPsr4('Ratchet\\', __DIR__ . '/helpers/Ratchet');
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php
index 8c298e5..f66e465 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/AbstractMessageComponentTestCase.php
@@ -1,18 +1,22 @@
_app = $this->getMock($this->getComponentClassString());
- $decorator = $this->getDecoratorClassString();
+ $this->_app = $this->getMock($this->getComponentClassString());
+ $decorator = $this->getDecoratorClassString();
$this->_serv = new $decorator($this->_app);
$this->_conn = $this->getMock('\Ratchet\ConnectionInterface');
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Component.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Component.php
index e152988..2475c63 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Component.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Component.php
@@ -1,15 +1,18 @@
last[__FUNCTION__] = func_get_args();
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Connection.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Connection.php
index 5918296..590c8ac 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Connection.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/Connection.php
@@ -1,11 +1,14 @@
''
- , 'close' => false
+ 'send' => ''
+ , 'close' => FALSE
);
public $remoteAddress = '127.0.0.1';
@@ -15,6 +18,6 @@ class Connection implements ConnectionInterface {
}
public function close() {
- $this->last[__FUNCTION__] = true;
+ $this->last[__FUNCTION__] = TRUE;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/ConnectionDecorator.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/ConnectionDecorator.php
index 5570c07..9cbcc7a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/ConnectionDecorator.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/ConnectionDecorator.php
@@ -1,11 +1,14 @@
''
- , 'end' => false
+ , 'end' => FALSE
);
public function send($data) {
@@ -15,7 +18,7 @@ class ConnectionDecorator extends AbstractConnectionDecorator {
}
public function close() {
- $this->last[__FUNCTION__] = true;
+ $this->last[__FUNCTION__] = TRUE;
$this->getConnection()->close();
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/WampComponent.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/WampComponent.php
index cd526cb..c65044e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/WampComponent.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/helpers/Ratchet/Mock/WampComponent.php
@@ -1,10 +1,13 @@
mock = $this->getMock('\Ratchet\ConnectionInterface');
- $this->l1 = new ConnectionDecorator($this->mock);
- $this->l2 = new ConnectionDecorator($this->l1);
+ $this->l1 = new ConnectionDecorator($this->mock);
+ $this->l2 = new ConnectionDecorator($this->l1);
}
public function testGet() {
@@ -84,9 +87,9 @@ class AbstractConnectionDecoratorTest extends \PHPUnit_Framework_TestCase {
}
public function testGetConnection() {
- $class = new \ReflectionClass('\\Ratchet\\AbstractConnectionDecorator');
+ $class = new \ReflectionClass('\\Ratchet\\AbstractConnectionDecorator');
$method = $class->getMethod('getConnection');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$conn = $method->invokeArgs($this->l1, array());
@@ -94,9 +97,9 @@ class AbstractConnectionDecoratorTest extends \PHPUnit_Framework_TestCase {
}
public function testGetConnectionLevel2() {
- $class = new \ReflectionClass('\\Ratchet\\AbstractConnectionDecorator');
+ $class = new \ReflectionClass('\\Ratchet\\AbstractConnectionDecorator');
$method = $class->getMethod('getConnection');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$conn = $method->invokeArgs($this->l2, array());
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/HttpRequestParserTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/HttpRequestParserTest.php
index 6af8402..c200940 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/HttpRequestParserTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/HttpRequestParserTest.php
@@ -1,10 +1,12 @@
_conn->httpHeadersReceived = true;
+ $this->_conn->httpHeadersReceived = TRUE;
}
public function getConnectionClassString() {
@@ -26,14 +29,14 @@ class HttpServerTest extends AbstractMessageComponentTestCase {
public function testOpen() {
$headers = "GET / HTTP/1.1\r\nHost: socketo.me\r\n\r\n";
- $this->_conn->httpHeadersReceived = false;
+ $this->_conn->httpHeadersReceived = FALSE;
$this->_app->expects($this->once())->method('onOpen')->with($this->isExpectedConnection());
$this->_serv->onMessage($this->_conn, $headers);
}
public function testOnMessageAfterHeaders() {
$headers = "GET / HTTP/1.1\r\nHost: socketo.me\r\n\r\n";
- $this->_conn->httpHeadersReceived = false;
+ $this->_conn->httpHeadersReceived = FALSE;
$this->_serv->onMessage($this->_conn, $headers);
$message = "Hello World!";
@@ -43,19 +46,19 @@ class HttpServerTest extends AbstractMessageComponentTestCase {
public function testBufferOverflow() {
$this->_conn->expects($this->once())->method('close');
- $this->_conn->httpHeadersReceived = false;
+ $this->_conn->httpHeadersReceived = FALSE;
$this->_serv->onMessage($this->_conn, str_repeat('a', 5000));
}
public function testCloseIfNotEstablished() {
- $this->_conn->httpHeadersReceived = false;
+ $this->_conn->httpHeadersReceived = FALSE;
$this->_conn->expects($this->once())->method('close');
$this->_serv->onError($this->_conn, new \Exception('Whoops!'));
}
public function testBufferHeaders() {
- $this->_conn->httpHeadersReceived = false;
+ $this->_conn->httpHeadersReceived = FALSE;
$this->_app->expects($this->never())->method('onOpen');
$this->_app->expects($this->never())->method('onMessage');
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/OriginCheckTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/OriginCheckTest.php
index c1c4012..4694b91 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/OriginCheckTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Http/OriginCheckTest.php
@@ -1,11 +1,14 @@
_conn = $this->getMock('\Ratchet\ConnectionInterface');
- $this->_uri = $this->getMock('Psr\Http\Message\UriInterface');
- $this->_req = $this->getMock('\Psr\Http\Message\RequestInterface');
+ $this->_uri = $this->getMock('Psr\Http\Message\UriInterface');
+ $this->_req = $this->getMock('\Psr\Http\Message\RequestInterface');
$this->_req
->expects($this->any())
->method('getUri')
@@ -31,13 +34,13 @@ class RouterTest extends \PHPUnit_Framework_TestCase {
->expects($this->any())
->method('getContext')
->will($this->returnValue($this->getMock('Symfony\Component\Routing\RequestContext')));
- $this->_router = new Router($this->_matcher);
+ $this->_router = new Router($this->_matcher);
$this->_uri->expects($this->any())->method('getPath')->will($this->returnValue('ws://doesnt.matter/'));
- $this->_uri->expects($this->any())->method('withQuery')->with($this->callback(function($val) {
+ $this->_uri->expects($this->any())->method('withQuery')->with($this->callback(function ($val) {
$this->setResult($val);
- return true;
+ return TRUE;
}))->will($this->returnSelf());
$this->_uri->expects($this->any())->method('getQuery')->will($this->returnCallback([$this, 'getResult']));
$this->_req->expects($this->any())->method('withUri')->will($this->returnSelf());
@@ -95,7 +98,7 @@ class RouterTest extends \PHPUnit_Framework_TestCase {
}
public function testControllerOnErrorBubbles() {
- $e= new \Exception('One cannot be betrayed if one has no exceptions');
+ $e = new \Exception('One cannot be betrayed if one has no exceptions');
$controller = $this->getMockBuilder('\Ratchet\WebSocket\WsServer')->disableOriginalConstructor()->getMock();
$controller->expects($this->once())->method('onError')->with($this->_conn, $e);
@@ -126,17 +129,17 @@ class RouterTest extends \PHPUnit_Framework_TestCase {
$this->returnValue(['_controller' => $controller, 'foo' => 'bar', 'baz' => 'qux'])
);
- $conn = $this->getMock('Ratchet\Mock\Connection');
+ $conn = $this->getMock('Ratchet\Mock\Connection');
$request = $this->getMock('Psr\Http\Message\RequestInterface');
$uri = new \GuzzleHttp\Psr7\Uri('ws://doesnt.matter/endpoint?hello=world&foo=nope');
- $request->expects($this->any())->method('getUri')->will($this->returnCallback(function() use (&$uri) {
+ $request->expects($this->any())->method('getUri')->will($this->returnCallback(function () use (&$uri) {
return $uri;
}));
- $request->expects($this->any())->method('withUri')->with($this->callback(function($url) use (&$uri) {
+ $request->expects($this->any())->method('withUri')->with($this->callback(function ($url) use (&$uri) {
$uri = $url;
- return true;
+ return TRUE;
}))->will($this->returnSelf());
$router = new Router($this->_matcher);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/EchoServerTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/EchoServerTest.php
index 47fb0e2..2e754bc 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/EchoServerTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/EchoServerTest.php
@@ -1,8 +1,11 @@
reactor = new Server(0, $loop);
$uri = $this->reactor->getAddress();
- $this->port = parse_url((strpos($uri, '://') === false ? 'tcp://' : '') . $uri, PHP_URL_PORT);
+ $this->port = parse_url((strpos($uri, '://') === FALSE ? 'tcp://' : '') . $uri, PHP_URL_PORT);
$this->server = new IoServer($this->app, $this->reactor, $loop);
}
@@ -43,7 +46,7 @@ class IoServerTest extends \PHPUnit_Framework_TestCase {
$this->app->expects($this->once())->method('onMessage')->with(
$this->isInstanceOf('\\Ratchet\\ConnectionInterface')
- , $msg
+ , $msg
);
$client = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
@@ -89,14 +92,14 @@ class IoServerTest extends \PHPUnit_Framework_TestCase {
public function testNoLoopProvidedError() {
$this->setExpectedException('RuntimeException');
- $io = new IoServer($this->app, $this->reactor);
+ $io = new IoServer($this->app, $this->reactor);
$io->run();
}
public function testOnErrorPassesException() {
$conn = $this->getMock('\\React\\Socket\\ConnectionInterface');
$conn->decor = $this->getMock('\\Ratchet\\ConnectionInterface');
- $err = new \Exception("Nope");
+ $err = new \Exception("Nope");
$this->app->expects($this->once())->method('onError')->with($conn->decor, $err);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/IpBlackListComponentTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/IpBlackListComponentTest.php
index 90f4185..79533d0 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/IpBlackListComponentTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Server/IpBlackListComponentTest.php
@@ -1,11 +1,14 @@
newConn();
- $msg = 'Hello not being blocked';
+ $msg = 'Hello not being blocked';
$this->mock->expects($this->once())->method('onMessage')->with($conn, $msg);
@@ -75,21 +78,20 @@ class IpBlackListTest extends \PHPUnit_Framework_TestCase {
public function testAddAndRemoveWithFluentInterfaces() {
$blockOne = '127.0.0.1';
$blockTwo = '192.168.1.1';
- $unblock = '75.119.207.140';
+ $unblock = '75.119.207.140';
$this->blocker
->blockAddress($unblock)
->blockAddress($blockOne)
->unblockAddress($unblock)
- ->blockAddress($blockTwo)
- ;
+ ->blockAddress($blockTwo);
$this->assertEquals(array($blockOne, $blockTwo), $this->blocker->getBlockedAddresses());
}
public function testDecoratorPassesErrors() {
$conn = $this->newConn();
- $e = new \Exception('I threw an error');
+ $e = new \Exception('I threw an error');
$this->mock->expects($this->once())->method('onError')->with($conn, $e);
@@ -99,9 +101,9 @@ class IpBlackListTest extends \PHPUnit_Framework_TestCase {
public function addressProvider() {
return array(
array('127.0.0.1', '127.0.0.1')
- , array('localhost', 'localhost')
- , array('fe80::1%lo0', 'fe80::1%lo0')
- , array('127.0.0.1', '127.0.0.1:6392')
+ , array('localhost', 'localhost')
+ , array('fe80::1%lo0', 'fe80::1%lo0')
+ , array('127.0.0.1', '127.0.0.1:6392')
);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Serialize/PhpHandlerTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Serialize/PhpHandlerTest.php
index 4acf5bc..a9e1211 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Serialize/PhpHandlerTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Serialize/PhpHandlerTest.php
@@ -1,11 +1,14 @@
array(
- 'hello' => 'world'
- , 'last' => 1332872102
- )
- , '_sf2_flashes' => array()
+ , array(
+ '_sf2_attributes' => array(
+ 'hello' => 'world'
+ , 'last' => 1332872102
)
+ , '_sf2_flashes' => array()
+ )
)
);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/SessionComponentTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/SessionComponentTest.php
index ebfdde4..09a10f8 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/SessionComponentTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/SessionComponentTest.php
@@ -1,5 +1,7 @@
markTestSkipped('Dependency of Symfony HttpFoundation failed');
@@ -38,7 +41,7 @@ class SessionProviderTest extends AbstractMessageComponentTestCase {
public function classCaseProvider() {
return array(
array('php', 'Php')
- , array('php_binary', 'PhpBinary')
+ , array('php_binary', 'PhpBinary')
);
}
@@ -48,7 +51,7 @@ class SessionProviderTest extends AbstractMessageComponentTestCase {
public function testToClassCase($in, $out) {
$ref = new \ReflectionClass('\\Ratchet\\Session\\SessionProvider');
$method = $ref->getMethod('toClassCase');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$component = new SessionProvider($this->getMock($this->getComponentClassString()), $this->getMock('\SessionHandlerInterface'));
$this->assertEquals($out, $method->invokeArgs($component, array($in)));
@@ -65,11 +68,11 @@ class SessionProviderTest extends AbstractMessageComponentTestCase {
$sessionId = md5('testSession');
$dbOptions = array(
- 'db_table' => 'sessions'
- , 'db_id_col' => 'sess_id'
- , 'db_data_col' => 'sess_data'
- , 'db_time_col' => 'sess_time'
- , 'db_lifetime_col' => 'sess_lifetime'
+ 'db_table' => 'sessions'
+ , 'db_id_col' => 'sess_id'
+ , 'db_data_col' => 'sess_data'
+ , 'db_time_col' => 'sess_time'
+ , 'db_lifetime_col' => 'sess_lifetime'
);
$pdo = new \PDO("sqlite::memory:");
@@ -79,7 +82,7 @@ class SessionProviderTest extends AbstractMessageComponentTestCase {
$pdoHandler = new PdoSessionHandler($pdo, $dbOptions);
$pdoHandler->write($sessionId, '_sf2_attributes|a:2:{s:5:"hello";s:5:"world";s:4:"last";i:1332872102;}_sf2_flashes|a:0:{}');
- $component = new SessionProvider($this->getMock($this->getComponentClassString()), $pdoHandler, array('auto_start' => 1));
+ $component = new SessionProvider($this->getMock($this->getComponentClassString()), $pdoHandler, array('auto_start' => 1));
$connection = $this->getMock('Ratchet\\ConnectionInterface');
$headers = $this->getMock('Psr\Http\Message\RequestInterface');
@@ -94,7 +97,7 @@ class SessionProviderTest extends AbstractMessageComponentTestCase {
$conn = $this->getMock('Ratchet\ConnectionInterface');
$headers = $this->getMock('Psr\Http\Message\Request', array('getCookie'), array('POST', '/', array()));
- $headers->expects($this->once())->method('getCookie', array(ini_get('session.name')))->will($this->returnValue(null));
+ $headers->expects($this->once())->method('getCookie', array(ini_get('session.name')))->will($this->returnValue(NULL));
return $conn;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php
index 2727484..c9711e9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Session/Storage/VirtualSessionStoragePDOTest.php
@@ -1,11 +1,14 @@
setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
$pdo->exec($schema);
- $pdo = null;
+ $pdo = NULL;
$sessionHandler = new PdoSessionHandler($dsn);
$serializer = new PhpHandler();
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/ServerProtocolTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/ServerProtocolTest.php
index 8ff68c2..99f7a38 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/ServerProtocolTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/ServerProtocolTest.php
@@ -1,5 +1,7 @@
_app = new TestComponent;
+ $this->_app = new TestComponent;
$this->_comp = new ServerProtocol($this->_app);
}
@@ -25,10 +28,10 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
public function invalidMessageProvider() {
return [
[0]
- , [3]
- , [4]
- , [8]
- , [9]
+ , [3]
+ , [4]
+ , [8]
+ , [9]
];
}
@@ -49,7 +52,7 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
$this->_comp->onOpen($conn);
$message = $conn->last['send'];
- $json = json_decode($message);
+ $json = json_decode($message);
$this->assertEquals(4, count($json));
$this->assertEquals(0, $json[0]);
@@ -84,13 +87,13 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
public function callProvider() {
return [
[2, 'a', 'b']
- , [2, ['a', 'b']]
- , [1, 'one']
- , [3, 'one', 'two', 'three']
- , [3, ['un', 'deux', 'trois']]
- , [2, 'hi', ['hello', 'world']]
- , [2, ['hello', 'world'], 'hi']
- , [2, ['hello' => 'world', 'herp' => 'derp']]
+ , [2, ['a', 'b']]
+ , [1, 'one']
+ , [3, 'one', 'two', 'three']
+ , [3, ['un', 'deux', 'trois']]
+ , [2, 'hi', ['hello', 'world']]
+ , [2, ['hello', 'world'], 'hi']
+ , [2, ['hello' => 'world', 'herp' => 'derp']]
];
}
@@ -98,11 +101,11 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
* @dataProvider callProvider
*/
public function testCall() {
- $args = func_get_args();
+ $args = func_get_args();
$paramNum = array_shift($args);
$uri = 'http://example.com/endpoint/' . rand(1, 100);
- $id = uniqid('', false);
+ $id = uniqid('', FALSE);
$clientMessage = array_merge(array(2, $id, $uri), $args);
$conn = $this->newConn();
@@ -110,7 +113,7 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
$this->_comp->onOpen($conn);
$this->_comp->onMessage($conn, json_encode($clientMessage));
- $this->assertEquals($id, $this->_app->last['onCall'][1]);
+ $this->assertEquals($id, $this->_app->last['onCall'][1]);
$this->assertEquals($uri, $this->_app->last['onCall'][2]);
$this->assertEquals($paramNum, count($this->_app->last['onCall'][3]));
@@ -137,7 +140,7 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
$conn = $this->newConn();
$this->_comp->onOpen($conn);
- $this->_comp->onMessage($conn, json_encode(array(7, 'topic', 'event', true)));
+ $this->_comp->onMessage($conn, json_encode(array(7, 'topic', 'event', TRUE)));
$this->assertEquals($conn->WAMP->sessionId, $this->_app->last['onPublish'][3][0]);
}
@@ -145,11 +148,11 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
public function testPublishAndEligible() {
$conn = $this->newConn();
- $buddy = uniqid('', false);
- $friend = uniqid('', false);
+ $buddy = uniqid('', FALSE);
+ $friend = uniqid('', FALSE);
$this->_comp->onOpen($conn);
- $this->_comp->onMessage($conn, json_encode(array(7, 'topic', 'event', false, array($buddy, $friend))));
+ $this->_comp->onMessage($conn, json_encode(array(7, 'topic', 'event', FALSE, array($buddy, $friend))));
$this->assertEquals(array(), $this->_app->last['onPublish'][3]);
$this->assertEquals(2, count($this->_app->last['onPublish'][4]));
@@ -158,7 +161,7 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
public function eventProvider() {
return array(
array('http://example.com', array('one', 'two'))
- , array('curie', array(array('hello' => 'world', 'herp' => 'derp')))
+ , array('curie', array(array('hello' => 'world', 'herp' => 'derp')))
);
}
@@ -171,7 +174,7 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
$eventString = $conn->last['send'];
- $this->assertSame(array(8, $topic, $payload), json_decode($eventString, true));
+ $this->assertSame(array(8, $topic, $payload), json_decode($eventString, TRUE));
}
public function testOnClosePropagation() {
@@ -180,9 +183,9 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
$this->_comp->onOpen($conn);
$this->_comp->onClose($conn);
- $class = new \ReflectionClass('\\Ratchet\\Wamp\\WampConnection');
+ $class = new \ReflectionClass('\\Ratchet\\Wamp\\WampConnection');
$method = $class->getMethod('getConnection');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$check = $method->invokeArgs($this->_app->last['onClose'][0], array());
@@ -197,9 +200,9 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
$this->_comp->onOpen($conn);
$this->_comp->onError($conn, $e);
- $class = new \ReflectionClass('\\Ratchet\\Wamp\\WampConnection');
+ $class = new \ReflectionClass('\\Ratchet\\Wamp\\WampConnection');
$method = $class->getMethod('getConnection');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$check = $method->invokeArgs($this->_app->last['onError'][0], array());
@@ -211,8 +214,8 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
$conn = new WampConnection($this->newConn());
$this->_comp->onOpen($conn);
- $prefix = 'incoming';
- $fullURI = "http://example.com/$prefix";
+ $prefix = 'incoming';
+ $fullURI = "http://example.com/$prefix";
$method = 'call';
$this->_comp->onMessage($conn, json_encode(array(1, $prefix, $fullURI)));
@@ -249,9 +252,9 @@ class ServerProtocolTest extends \PHPUnit_Framework_TestCase {
public function badFormatProvider() {
return array(
- array(json_encode(true))
- , array('{"valid":"json", "invalid": "message"}')
- , array('{"0": "fail", "hello": "world"}')
+ array(json_encode(TRUE))
+ , array('{"valid":"json", "invalid": "message"}')
+ , array('{"0": "fail", "hello": "world"}')
);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicManagerTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicManagerTest.php
index b21b6bc..51aaf15 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicManagerTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicManagerTest.php
@@ -1,10 +1,12 @@
getMethod('getTopic');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$topic = $method->invokeArgs($this->mngr, array('The Topic'));
@@ -39,9 +41,9 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
public function testGetTopicCreatesTopicWithSameName() {
$name = 'The Topic';
- $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
+ $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
$method = $class->getMethod('getTopic');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$topic = $method->invokeArgs($this->mngr, array($name));
@@ -49,9 +51,9 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
}
public function testGetTopicReturnsSameObject() {
- $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
+ $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
$method = $class->getMethod('getTopic');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$topic = $method->invokeArgs($this->mngr, array('No copy'));
$again = $method->invokeArgs($this->mngr, array('No copy'));
@@ -69,9 +71,9 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
$this->mock->expects($this->once())->method('onCall')->with(
$this->conn
- , $id
- , $this->isInstanceOf('Ratchet\Wamp\Topic')
- , array()
+ , $id
+ , $this->isInstanceOf('Ratchet\Wamp\Topic')
+ , array()
);
$this->mngr->onCall($this->conn, $id, 'new topic', array());
@@ -88,9 +90,9 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
public function testTopicIsInConnectionOnSubscribe() {
$name = 'New Topic';
- $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
+ $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
$method = $class->getMethod('getTopic');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$topic = $method->invokeArgs($this->mngr, array($name));
@@ -120,7 +122,7 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
$name = 'getting sleepy';
$this->mock->expects($this->exactly(1))->method('onUnsubscribe');
- $this->mngr->onSubscribe($this->conn, $name);
+ $this->mngr->onSubscribe($this->conn, $name);
$this->mngr->onUnsubscribe($this->conn, $name);
$this->mngr->onUnsubscribe($this->conn, $name);
}
@@ -128,9 +130,9 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
public function testUnsubscribeRemovesTopicFromConnection() {
$name = 'Bye Bye Topic';
- $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
+ $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
$method = $class->getMethod('getTopic');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$topic = $method->invokeArgs($this->mngr, array($name));
@@ -145,10 +147,10 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
$this->mock->expects($this->once())->method('onPublish')->with(
$this->conn
- , $this->isInstanceOf('Ratchet\Wamp\Topic')
- , $msg
- , $this->isType('array')
- , $this->isType('array')
+ , $this->isInstanceOf('Ratchet\Wamp\Topic')
+ , $msg
+ , $this->isType('array')
+ , $this->isType('array')
);
$this->mngr->onPublish($this->conn, 'topic coverage', $msg, array(), array());
@@ -160,12 +162,12 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
}
protected function topicProvider($name) {
- $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
+ $class = new \ReflectionClass('Ratchet\Wamp\TopicManager');
$method = $class->getMethod('getTopic');
- $method->setAccessible(true);
+ $method->setAccessible(TRUE);
$attribute = $class->getProperty('topicLookup');
- $attribute->setAccessible(true);
+ $attribute->setAccessible(TRUE);
$topic = $method->invokeArgs($this->mngr, array($name));
@@ -186,8 +188,8 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
public static function topicConnExpectationProvider() {
return [
- [ 'onClose', 0]
- , ['onUnsubscribe', 0]
+ ['onClose', 0]
+ , ['onUnsubscribe', 0]
];
}
@@ -217,7 +219,7 @@ class TopicManagerTest extends \PHPUnit_Framework_TestCase {
public function testGetSubProtocolsBubbles() {
$subs = array('hello', 'world');
- $app = $this->getMock('Ratchet\Wamp\Stub\WsWampServerInterface');
+ $app = $this->getMock('Ratchet\Wamp\Stub\WsWampServerInterface');
$app->expects($this->once())->method('getSubProtocols')->will($this->returnValue($subs));
$mngr = new TopicManager($app);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicTest.php
index b8685b7..531c2de 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/TopicTest.php
@@ -1,12 +1,14 @@
assertEquals($id, $topic->getId());
@@ -23,7 +25,7 @@ class TopicTest extends \PHPUnit_Framework_TestCase {
}
public function testRemove() {
- $topic = new Topic('boop');
+ $topic = new Topic('boop');
$tracked = $this->newConn();
$topic->add($this->newConn());
@@ -36,20 +38,20 @@ class TopicTest extends \PHPUnit_Framework_TestCase {
}
public function testBroadcast() {
- $msg = 'Hello World!';
+ $msg = 'Hello World!';
$name = 'Batman';
$protocol = json_encode(array(8, $name, $msg));
- $first = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
+ $first = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
$second = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
$first->expects($this->once())
- ->method('send')
- ->with($this->equalTo($protocol));
+ ->method('send')
+ ->with($this->equalTo($protocol));
$second->expects($this->once())
- ->method('send')
- ->with($this->equalTo($protocol));
+ ->method('send')
+ ->with($this->equalTo($protocol));
$topic = new Topic($name);
$topic->add($first);
@@ -59,13 +61,13 @@ class TopicTest extends \PHPUnit_Framework_TestCase {
}
public function testBroadcastWithExclude() {
- $msg = 'Hello odd numbers';
+ $msg = 'Hello odd numbers';
$name = 'Excluding';
$protocol = json_encode(array(8, $name, $msg));
- $first = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
+ $first = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
$second = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
- $third = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
+ $third = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
$first->expects($this->once())
->method('send')
@@ -86,13 +88,13 @@ class TopicTest extends \PHPUnit_Framework_TestCase {
}
public function testBroadcastWithEligible() {
- $msg = 'Hello white list';
+ $msg = 'Hello white list';
$name = 'Eligible';
$protocol = json_encode(array(8, $name, $msg));
- $first = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
+ $first = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
$second = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
- $third = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
+ $third = $this->getMock('Ratchet\\Wamp\\WampConnection', array('send'), array($this->getMock('\\Ratchet\\ConnectionInterface')));
$first->expects($this->once())
->method('send')
@@ -113,29 +115,29 @@ class TopicTest extends \PHPUnit_Framework_TestCase {
}
public function testIterator() {
- $first = $this->newConn();
+ $first = $this->newConn();
$second = $this->newConn();
- $third = $this->newConn();
+ $third = $this->newConn();
- $topic = new Topic('Joker');
+ $topic = new Topic('Joker');
$topic->add($first)->add($second)->add($third);
$check = array($first, $second, $third);
foreach ($topic as $mock) {
- $this->assertNotSame(false, array_search($mock, $check));
+ $this->assertNotSame(FALSE, array_search($mock, $check));
}
}
public function testToString() {
- $name = 'Bane';
+ $name = 'Bane';
$topic = new Topic($name);
$this->assertEquals($name, (string)$topic);
}
public function testDoesHave() {
- $conn = $this->newConn();
+ $conn = $this->newConn();
$topic = new Topic('Two Face');
$topic->add($conn);
@@ -143,14 +145,14 @@ class TopicTest extends \PHPUnit_Framework_TestCase {
}
public function testDoesNotHave() {
- $conn = $this->newConn();
+ $conn = $this->newConn();
$topic = new Topic('Alfred');
$this->assertFalse($topic->has($conn));
}
public function testDoesNotHaveAfterRemove() {
- $conn = $this->newConn();
+ $conn = $this->newConn();
$topic = new Topic('Ras');
$topic->add($conn)->remove($conn);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampConnectionTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampConnectionTest.php
index adf59d5..5167449 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampConnectionTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampConnectionTest.php
@@ -1,10 +1,12 @@
'world', 'herp' => 'derp');
+ $data = array('hello' => 'world', 'herp' => 'derp');
$this->mock->expects($this->once())->method('send')->with(json_encode(array(3, $callId, $data)));
@@ -24,7 +26,7 @@ class WampConnectionTest extends \PHPUnit_Framework_TestCase {
public function testCallError() {
$callId = uniqid();
- $uri = 'http://example.com/end/point';
+ $uri = 'http://example.com/end/point';
$this->mock->expects($this->once())->method('send')->with(json_encode(array(4, $callId, $uri, '')));
@@ -33,7 +35,7 @@ class WampConnectionTest extends \PHPUnit_Framework_TestCase {
public function testCallErrorWithTopic() {
$callId = uniqid();
- $uri = 'http://example.com/end/point';
+ $uri = 'http://example.com/end/point';
$this->mock->expects($this->once())->method('send')->with(json_encode(array(4, $callId, $uri, '')));
@@ -42,8 +44,8 @@ class WampConnectionTest extends \PHPUnit_Framework_TestCase {
public function testDetailedCallError() {
$callId = uniqid();
- $uri = 'http://example.com/end/point';
- $desc = 'beep boop beep';
+ $uri = 'http://example.com/end/point';
+ $desc = 'beep boop beep';
$detail = 'Error: Too much awesome';
$this->mock->expects($this->once())->method('send')->with(json_encode(array(4, $callId, $uri, $desc, $detail)));
@@ -53,7 +55,7 @@ class WampConnectionTest extends \PHPUnit_Framework_TestCase {
public function testPrefix() {
$shortOut = 'outgoing';
- $longOut = 'http://example.com/outgoing';
+ $longOut = 'http://example.com/outgoing';
$this->mock->expects($this->once())->method('send')->with(json_encode(array(1, $shortOut, $longOut)));
@@ -61,7 +63,7 @@ class WampConnectionTest extends \PHPUnit_Framework_TestCase {
}
public function testGetUriWhenNoCurieGiven() {
- $uri = 'http://example.com/noshort';
+ $uri = 'http://example.com/noshort';
$this->assertEquals($uri, $this->conn->getUri($uri));
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampServerTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampServerTest.php
index 626b1ce..0f427fe 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampServerTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/cboden/ratchet/tests/unit/Wamp/WampServerTest.php
@@ -1,11 +1,14 @@
_app->expects($this->once())->method('onPublish')->with(
$this->isExpectedConnection()
- , new \PHPUnit_Framework_Constraint_IsInstanceOf('\Ratchet\Wamp\Topic')
- , $published
- , array()
- , array()
+ , new \PHPUnit_Framework_Constraint_IsInstanceOf('\Ratchet\Wamp\Topic')
+ , $published
+ , array()
+ , array()
);
$this->_serv->onMessage($this->_conn, json_encode(array(7, 'topic', $published)));
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/ClassLoader.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/ClassLoader.php
index dc02dfb..f80a8ef 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/ClassLoader.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/ClassLoader.php
@@ -51,14 +51,13 @@ class ClassLoader
private $prefixesPsr0 = array();
private $fallbackDirsPsr0 = array();
- private $useIncludePath = false;
+ private $useIncludePath = FALSE;
private $classMap = array();
- private $classMapAuthoritative = false;
+ private $classMapAuthoritative = FALSE;
private $missingClasses = array();
private $apcuPrefix;
- public function getPrefixes()
- {
+ public function getPrefixes() {
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
}
@@ -66,31 +65,26 @@ class ClassLoader
return array();
}
- public function getPrefixesPsr4()
- {
+ public function getPrefixesPsr4() {
return $this->prefixDirsPsr4;
}
- public function getFallbackDirs()
- {
+ public function getFallbackDirs() {
return $this->fallbackDirsPsr0;
}
- public function getFallbackDirsPsr4()
- {
+ public function getFallbackDirsPsr4() {
return $this->fallbackDirsPsr4;
}
- public function getClassMap()
- {
+ public function getClassMap() {
return $this->classMap;
}
/**
* @param array $classMap Class to filename map
*/
- public function addClassMap(array $classMap)
- {
+ public function addClassMap(array $classMap) {
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
@@ -102,22 +96,21 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
*/
- public function add($prefix, $paths, $prepend = false)
- {
+ public function add($prefix, $paths, $prepend = FALSE) {
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
- (array) $paths,
+ (array)$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
- (array) $paths
+ (array)$paths
);
}
@@ -126,19 +119,19 @@ class ClassLoader
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = (array) $paths;
+ $this->prefixesPsr0[$first][$prefix] = (array)$paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
- (array) $paths,
+ (array)$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
- (array) $paths
+ (array)$paths
);
}
}
@@ -147,46 +140,45 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*/
- public function addPsr4($prefix, $paths, $prepend = false)
- {
+ public function addPsr4($prefix, $paths, $prepend = FALSE) {
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
- (array) $paths,
+ (array)$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
- (array) $paths
+ (array)$paths
);
}
- } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
+ } else if (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
- } elseif ($prepend) {
+ $this->prefixDirsPsr4[$prefix] = (array)$paths;
+ } else if ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
- (array) $paths,
+ (array)$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
- (array) $paths
+ (array)$paths
);
}
}
@@ -195,15 +187,14 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param array|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param array|string $paths The PSR-0 base directories
*/
- public function set($prefix, $paths)
- {
+ public function set($prefix, $paths) {
if (!$prefix) {
- $this->fallbackDirsPsr0 = (array) $paths;
+ $this->fallbackDirsPsr0 = (array)$paths;
} else {
- $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array)$paths;
}
}
@@ -211,22 +202,21 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param array|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param array|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*/
- public function setPsr4($prefix, $paths)
- {
+ public function setPsr4($prefix, $paths) {
if (!$prefix) {
- $this->fallbackDirsPsr4 = (array) $paths;
+ $this->fallbackDirsPsr4 = (array)$paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = (array) $paths;
+ $this->prefixDirsPsr4[$prefix] = (array)$paths;
}
}
@@ -235,8 +225,7 @@ class ClassLoader
*
* @param bool $useIncludePath
*/
- public function setUseIncludePath($useIncludePath)
- {
+ public function setUseIncludePath($useIncludePath) {
$this->useIncludePath = $useIncludePath;
}
@@ -246,8 +235,7 @@ class ClassLoader
*
* @return bool
*/
- public function getUseIncludePath()
- {
+ public function getUseIncludePath() {
return $this->useIncludePath;
}
@@ -257,8 +245,7 @@ class ClassLoader
*
* @param bool $classMapAuthoritative
*/
- public function setClassMapAuthoritative($classMapAuthoritative)
- {
+ public function setClassMapAuthoritative($classMapAuthoritative) {
$this->classMapAuthoritative = $classMapAuthoritative;
}
@@ -267,8 +254,7 @@ class ClassLoader
*
* @return bool
*/
- public function isClassMapAuthoritative()
- {
+ public function isClassMapAuthoritative() {
return $this->classMapAuthoritative;
}
@@ -277,9 +263,8 @@ class ClassLoader
*
* @param string|null $apcuPrefix
*/
- public function setApcuPrefix($apcuPrefix)
- {
- $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
+ public function setApcuPrefix($apcuPrefix) {
+ $this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : NULL;
}
/**
@@ -287,8 +272,7 @@ class ClassLoader
*
* @return string|null
*/
- public function getApcuPrefix()
- {
+ public function getApcuPrefix() {
return $this->apcuPrefix;
}
@@ -297,31 +281,28 @@ class ClassLoader
*
* @param bool $prepend Whether to prepend the autoloader or not
*/
- public function register($prepend = false)
- {
- spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+ public function register($prepend = FALSE) {
+ spl_autoload_register(array($this, 'loadClass'), TRUE, $prepend);
}
/**
* Unregisters this instance as an autoloader.
*/
- public function unregister()
- {
+ public function unregister() {
spl_autoload_unregister(array($this, 'loadClass'));
}
/**
* Loads the given class or interface.
*
- * @param string $class The name of the class
+ * @param string $class The name of the class
* @return bool|null True if loaded, null otherwise
*/
- public function loadClass($class)
- {
+ public function loadClass($class) {
if ($file = $this->findFile($class)) {
includeFile($file);
- return true;
+ return TRUE;
}
}
@@ -332,17 +313,16 @@ class ClassLoader
*
* @return string|false The path if found, false otherwise
*/
- public function findFile($class)
- {
+ public function findFile($class) {
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
- return false;
+ return FALSE;
}
- if (null !== $this->apcuPrefix) {
- $file = apcu_fetch($this->apcuPrefix.$class, $hit);
+ if (NULL !== $this->apcuPrefix) {
+ $file = apcu_fetch($this->apcuPrefix . $class, $hit);
if ($hit) {
return $file;
}
@@ -351,33 +331,32 @@ class ClassLoader
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
- if (false === $file && defined('HHVM_VERSION')) {
+ if (FALSE === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
- if (null !== $this->apcuPrefix) {
- apcu_add($this->apcuPrefix.$class, $file);
+ if (NULL !== $this->apcuPrefix) {
+ apcu_add($this->apcuPrefix . $class, $file);
}
- if (false === $file) {
+ if (FALSE === $file) {
// Remember that this class does not exist.
- $this->missingClasses[$class] = true;
+ $this->missingClasses[$class] = TRUE;
}
return $file;
}
- private function findFileWithExtension($class, $ext)
- {
+ private function findFileWithExtension($class, $ext) {
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
- while (false !== $lastPos = strrpos($subPath, '\\')) {
+ while (FALSE !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
- $search = $subPath.'\\';
+ $search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
@@ -397,7 +376,7 @@ class ClassLoader
}
// PSR-0 lookup
- if (false !== $pos = strrpos($class, '\\')) {
+ if (FALSE !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
@@ -430,7 +409,7 @@ class ClassLoader
return $file;
}
- return false;
+ return FALSE;
}
}
@@ -439,7 +418,6 @@ class ClassLoader
*
* Prevents access to $this/self from included files.
*/
-function includeFile($file)
-{
+function includeFile($file) {
include $file;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_real.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_real.php
index 8fc42a0..9f21621 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_real.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_real.php
@@ -6,20 +6,18 @@ class ComposerAutoloaderInit3c5661e077098f105cbab5a541fd4883
{
private static $loader;
- public static function loadClassLoader($class)
- {
+ public static function loadClassLoader($class) {
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
- public static function getLoader()
- {
- if (null !== self::$loader) {
+ public static function getLoader() {
+ if (NULL !== self::$loader) {
return self::$loader;
}
- spl_autoload_register(array('ComposerAutoloaderInit3c5661e077098f105cbab5a541fd4883', 'loadClassLoader'), true, true);
+ spl_autoload_register(array('ComposerAutoloaderInit3c5661e077098f105cbab5a541fd4883', 'loadClassLoader'), TRUE, TRUE);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit3c5661e077098f105cbab5a541fd4883', 'loadClassLoader'));
@@ -45,7 +43,7 @@ class ComposerAutoloaderInit3c5661e077098f105cbab5a541fd4883
}
}
- $loader->register(true);
+ $loader->register(TRUE);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit3c5661e077098f105cbab5a541fd4883::$files;
@@ -60,11 +58,10 @@ class ComposerAutoloaderInit3c5661e077098f105cbab5a541fd4883
}
}
-function composerRequire3c5661e077098f105cbab5a541fd4883($fileIdentifier, $file)
-{
+function composerRequire3c5661e077098f105cbab5a541fd4883($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
- $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
+ $GLOBALS['__composer_autoload_files'][$fileIdentifier] = TRUE;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_static.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_static.php
index b5b4c27..7358687 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_static.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/autoload_static.php
@@ -6,7 +6,7 @@ namespace Composer\Autoload;
class ComposerStaticInit3c5661e077098f105cbab5a541fd4883
{
- public static $files = array (
+ public static $files = array(
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
'5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
'6b06ce8ccf69c43a60a1e48495a034c9' => __DIR__ . '/..' . '/react/promise-timer/src/functions.php',
@@ -15,139 +15,139 @@ class ComposerStaticInit3c5661e077098f105cbab5a541fd4883
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
);
- public static $prefixLengthsPsr4 = array (
- 'W' =>
- array (
- 'Websocket\\' => 10,
- ),
- 'S' =>
- array (
- 'Symfony\\Polyfill\\Php70\\' => 23,
- 'Symfony\\Polyfill\\Mbstring\\' => 26,
- 'Symfony\\Component\\Routing\\' => 26,
- 'Symfony\\Component\\HttpFoundation\\' => 33,
- ),
- 'R' =>
- array (
- 'React\\Stream\\' => 13,
- 'React\\Socket\\' => 13,
- 'React\\Promise\\Timer\\' => 20,
- 'React\\Promise\\' => 14,
- 'React\\EventLoop\\' => 16,
- 'React\\Dns\\' => 10,
- 'React\\Cache\\' => 12,
- 'Ratchet\\RFC6455\\' => 16,
- 'Ratchet\\' => 8,
- ),
- 'P' =>
- array (
- 'Psr\\Http\\Message\\' => 17,
- ),
- 'N' =>
- array (
- 'Nubs\\RandomNameGenerator\\' => 25,
- ),
- 'M' =>
- array (
- 'MatthiasMullie\\PathConverter\\' => 29,
- 'MatthiasMullie\\Minify\\' => 22,
- ),
- 'G' =>
- array (
- 'GuzzleHttp\\Psr7\\' => 16,
- ),
+ public static $prefixLengthsPsr4 = array(
+ 'W' =>
+ array(
+ 'Websocket\\' => 10,
+ ),
+ 'S' =>
+ array(
+ 'Symfony\\Polyfill\\Php70\\' => 23,
+ 'Symfony\\Polyfill\\Mbstring\\' => 26,
+ 'Symfony\\Component\\Routing\\' => 26,
+ 'Symfony\\Component\\HttpFoundation\\' => 33,
+ ),
+ 'R' =>
+ array(
+ 'React\\Stream\\' => 13,
+ 'React\\Socket\\' => 13,
+ 'React\\Promise\\Timer\\' => 20,
+ 'React\\Promise\\' => 14,
+ 'React\\EventLoop\\' => 16,
+ 'React\\Dns\\' => 10,
+ 'React\\Cache\\' => 12,
+ 'Ratchet\\RFC6455\\' => 16,
+ 'Ratchet\\' => 8,
+ ),
+ 'P' =>
+ array(
+ 'Psr\\Http\\Message\\' => 17,
+ ),
+ 'N' =>
+ array(
+ 'Nubs\\RandomNameGenerator\\' => 25,
+ ),
+ 'M' =>
+ array(
+ 'MatthiasMullie\\PathConverter\\' => 29,
+ 'MatthiasMullie\\Minify\\' => 22,
+ ),
+ 'G' =>
+ array(
+ 'GuzzleHttp\\Psr7\\' => 16,
+ ),
);
- public static $prefixDirsPsr4 = array (
- 'Websocket\\' =>
- array (
- 0 => __DIR__ . '/../..' . '/Chatserver/src',
- ),
- 'Symfony\\Polyfill\\Php70\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-php70',
- ),
- 'Symfony\\Polyfill\\Mbstring\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
- ),
- 'Symfony\\Component\\Routing\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/routing',
- ),
- 'Symfony\\Component\\HttpFoundation\\' =>
- array (
- 0 => __DIR__ . '/..' . '/symfony/http-foundation',
- ),
- 'React\\Stream\\' =>
- array (
- 0 => __DIR__ . '/..' . '/react/stream/src',
- ),
- 'React\\Socket\\' =>
- array (
- 0 => __DIR__ . '/..' . '/react/socket/src',
- ),
- 'React\\Promise\\Timer\\' =>
- array (
- 0 => __DIR__ . '/..' . '/react/promise-timer/src',
- ),
- 'React\\Promise\\' =>
- array (
- 0 => __DIR__ . '/..' . '/react/promise/src',
- ),
- 'React\\EventLoop\\' =>
- array (
- 0 => __DIR__ . '/..' . '/react/event-loop/src',
- ),
- 'React\\Dns\\' =>
- array (
- 0 => __DIR__ . '/..' . '/react/dns/src',
- ),
- 'React\\Cache\\' =>
- array (
- 0 => __DIR__ . '/..' . '/react/cache/src',
- ),
- 'Ratchet\\RFC6455\\' =>
- array (
- 0 => __DIR__ . '/..' . '/ratchet/rfc6455/src',
- ),
- 'Ratchet\\' =>
- array (
- 0 => __DIR__ . '/..' . '/cboden/ratchet/src/Ratchet',
- ),
- 'Psr\\Http\\Message\\' =>
- array (
- 0 => __DIR__ . '/..' . '/psr/http-message/src',
- ),
- 'Nubs\\RandomNameGenerator\\' =>
- array (
- 0 => __DIR__ . '/..' . '/nubs/random-name-generator/src',
- ),
- 'MatthiasMullie\\PathConverter\\' =>
- array (
- 0 => __DIR__ . '/..' . '/matthiasmullie/path-converter/src',
- ),
- 'MatthiasMullie\\Minify\\' =>
- array (
- 0 => __DIR__ . '/..' . '/matthiasmullie/minify/src',
- ),
- 'GuzzleHttp\\Psr7\\' =>
- array (
- 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
- ),
+ public static $prefixDirsPsr4 = array(
+ 'Websocket\\' =>
+ array(
+ 0 => __DIR__ . '/../..' . '/Chatserver/src',
+ ),
+ 'Symfony\\Polyfill\\Php70\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-php70',
+ ),
+ 'Symfony\\Polyfill\\Mbstring\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
+ ),
+ 'Symfony\\Component\\Routing\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/symfony/routing',
+ ),
+ 'Symfony\\Component\\HttpFoundation\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/symfony/http-foundation',
+ ),
+ 'React\\Stream\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/react/stream/src',
+ ),
+ 'React\\Socket\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/react/socket/src',
+ ),
+ 'React\\Promise\\Timer\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/react/promise-timer/src',
+ ),
+ 'React\\Promise\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/react/promise/src',
+ ),
+ 'React\\EventLoop\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/react/event-loop/src',
+ ),
+ 'React\\Dns\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/react/dns/src',
+ ),
+ 'React\\Cache\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/react/cache/src',
+ ),
+ 'Ratchet\\RFC6455\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/ratchet/rfc6455/src',
+ ),
+ 'Ratchet\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/cboden/ratchet/src/Ratchet',
+ ),
+ 'Psr\\Http\\Message\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/psr/http-message/src',
+ ),
+ 'Nubs\\RandomNameGenerator\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/nubs/random-name-generator/src',
+ ),
+ 'MatthiasMullie\\PathConverter\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/matthiasmullie/path-converter/src',
+ ),
+ 'MatthiasMullie\\Minify\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/matthiasmullie/minify/src',
+ ),
+ 'GuzzleHttp\\Psr7\\' =>
+ array(
+ 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src',
+ ),
);
- public static $prefixesPsr0 = array (
- 'E' =>
- array (
- 'Evenement' =>
- array (
- 0 => __DIR__ . '/..' . '/evenement/evenement/src',
- ),
- ),
+ public static $prefixesPsr0 = array(
+ 'E' =>
+ array(
+ 'Evenement' =>
+ array(
+ 0 => __DIR__ . '/..' . '/evenement/evenement/src',
+ ),
+ ),
);
- public static $classMap = array (
+ public static $classMap = array(
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
'CssAtCharsetParserPlugin' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php',
@@ -225,14 +225,13 @@ class ComposerStaticInit3c5661e077098f105cbab5a541fd4883
'aCssToken' => __DIR__ . '/..' . '/natxet/CssMin/src/CssMin.php',
);
- public static function getInitializer(ClassLoader $loader)
- {
+ public static function getInitializer(ClassLoader $loader) {
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit3c5661e077098f105cbab5a541fd4883::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit3c5661e077098f105cbab5a541fd4883::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit3c5661e077098f105cbab5a541fd4883::$prefixesPsr0;
$loader->classMap = ComposerStaticInit3c5661e077098f105cbab5a541fd4883::$classMap;
- }, null, ClassLoader::class);
+ }, NULL, ClassLoader::class);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/installed.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/installed.json
index c8ca472..cf395d9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/installed.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/composer/installed.json
@@ -1,1125 +1,1125 @@
[
- {
- "name": "cboden/ratchet",
- "version": "v0.4.1",
- "version_normalized": "0.4.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ratchetphp/Ratchet.git",
- "reference": "0d31f3a8ad4795fd48397712709e55cd07f51360"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ratchetphp/Ratchet/zipball/0d31f3a8ad4795fd48397712709e55cd07f51360",
- "reference": "0d31f3a8ad4795fd48397712709e55cd07f51360",
- "shasum": ""
- },
- "require": {
- "guzzlehttp/psr7": "^1.0",
- "php": ">=5.4.2",
- "ratchet/rfc6455": "^0.2",
- "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5",
- "symfony/http-foundation": "^2.6|^3.0|^4.0",
- "symfony/routing": "^2.6|^3.0|^4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.8"
- },
- "time": "2017-12-12T00:49:31+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Ratchet\\": "src/Ratchet"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Chris Boden",
- "email": "cboden@gmail.com",
- "role": "Developer"
- }
- ],
- "description": "PHP WebSocket library",
- "homepage": "http://socketo.me",
- "keywords": [
- "Ratchet",
- "WebSockets",
- "server",
- "sockets",
- "websocket"
- ]
- },
- {
- "name": "evenement/evenement",
- "version": "v3.0.1",
- "version_normalized": "3.0.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/igorw/evenement.git",
- "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7",
- "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7",
- "shasum": ""
- },
- "require": {
- "php": ">=7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "time": "2017-07-23T21:35:13+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-0": {
- "Evenement": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Igor Wiedler",
- "email": "igor@wiedler.ch"
- }
- ],
- "description": "Événement is a very simple event dispatching library for PHP",
- "keywords": [
- "event-dispatcher",
- "event-emitter"
- ]
- },
- {
- "name": "guzzlehttp/psr7",
- "version": "1.4.2",
- "version_normalized": "1.4.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/guzzle/psr7.git",
- "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
- "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4.0",
- "psr/http-message": "~1.0"
- },
- "provide": {
- "psr/http-message-implementation": "1.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "time": "2017-03-20T17:10:46+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.4-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Tobias Schultze",
- "homepage": "https://github.com/Tobion"
- }
- ],
- "description": "PSR-7 message implementation that also provides common utility methods",
- "keywords": [
- "http",
- "message",
- "request",
- "response",
- "stream",
- "uri",
- "url"
- ]
- },
- {
- "name": "matthiasmullie/minify",
- "version": "1.3.59",
- "version_normalized": "1.3.59.0",
- "source": {
- "type": "git",
- "url": "https://github.com/matthiasmullie/minify.git",
- "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/62dac3bce06de66f0d71fe6490cf1c508d3c3ff7",
- "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7",
- "shasum": ""
- },
- "require": {
- "ext-pcre": "*",
- "matthiasmullie/path-converter": "~1.1",
- "php": ">=5.3.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "~2.0",
- "matthiasmullie/scrapbook": "~1.0",
- "phpunit/phpunit": "~4.8"
- },
- "suggest": {
- "psr/cache-implementation": "Cache implementation to use with Minify::cache"
- },
- "time": "2018-02-02T12:44:18+00:00",
- "bin": [
- "bin/minifycss",
- "bin/minifyjs"
- ],
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "MatthiasMullie\\Minify\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Matthias Mullie",
- "email": "minify@mullie.eu",
- "homepage": "http://www.mullie.eu",
- "role": "Developer"
- }
- ],
- "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.",
- "homepage": "http://www.minifier.org",
- "keywords": [
- "JS",
- "css",
- "javascript",
- "minifier",
- "minify"
- ]
- },
- {
- "name": "matthiasmullie/path-converter",
- "version": "1.1.1",
- "version_normalized": "1.1.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/matthiasmullie/path-converter.git",
- "reference": "3082a6838be02b930239a97d38b5c9da4d693aca"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/3082a6838be02b930239a97d38b5c9da4d693aca",
- "reference": "3082a6838be02b930239a97d38b5c9da4d693aca",
- "shasum": ""
- },
- "require": {
- "ext-pcre": "*",
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.8"
- },
- "time": "2018-02-02T11:30:10+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "MatthiasMullie\\PathConverter\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Matthias Mullie",
- "email": "pathconverter@mullie.eu",
- "homepage": "http://www.mullie.eu",
- "role": "Developer"
- }
- ],
- "description": "Relative path converter",
- "homepage": "http://github.com/matthiasmullie/path-converter",
- "keywords": [
- "converter",
- "path",
- "paths",
- "relative"
- ]
- },
- {
- "name": "natxet/CssMin",
- "version": "v3.0.6",
- "version_normalized": "3.0.6.0",
- "source": {
- "type": "git",
- "url": "https://github.com/natxet/CssMin.git",
- "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/natxet/CssMin/zipball/d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd",
- "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd",
- "shasum": ""
- },
- "require": {
- "php": ">=5.0"
- },
- "time": "2018-01-09T11:15:01+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Joe Scylla",
- "email": "joe.scylla@gmail.com",
- "homepage": "https://profiles.google.com/joe.scylla"
- }
- ],
- "description": "Minifying CSS",
- "homepage": "http://code.google.com/p/cssmin/",
- "keywords": [
- "css",
- "minify"
- ]
- },
- {
- "name": "nubs/random-name-generator",
- "version": "v2.1.0",
- "version_normalized": "2.1.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/nubs/random-name-generator.git",
- "reference": "7004eb1724e1c4a154553e44312b7045fe412b77"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/nubs/random-name-generator/zipball/7004eb1724e1c4a154553e44312b7045fe412b77",
- "reference": "7004eb1724e1c4a154553e44312b7045fe412b77",
- "shasum": ""
- },
- "require": {
- "php": "~5.6 || ~7.0"
- },
- "require-dev": {
- "cinam/randomizer": ">=1.1.1,<2.0",
- "phpunit/phpunit": "~5.0",
- "satooshi/php-coveralls": "~1.0",
- "squizlabs/php_codesniffer": "~2.3"
- },
- "time": "2016-12-04T01:57:19+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Nubs\\RandomNameGenerator\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Spencer Rinehart",
- "email": "anubis@overthemonkey.com",
- "role": "Developer"
- }
- ],
- "description": "A library to create interesting, sometimes entertaining, random names.",
- "keywords": [
- "alliteration",
- "generator",
- "random",
- "video game"
- ]
- },
- {
- "name": "paragonie/random_compat",
- "version": "v2.0.12",
- "version_normalized": "2.0.12.0",
- "source": {
- "type": "git",
- "url": "https://github.com/paragonie/random_compat.git",
- "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb",
- "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb",
- "shasum": ""
- },
- "require": {
- "php": ">=5.2.0"
- },
- "require-dev": {
- "phpunit/phpunit": "4.*|5.*"
- },
- "suggest": {
- "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
- },
- "time": "2018-04-04T21:24:14+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "files": [
- "lib/random.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Paragon Initiative Enterprises",
- "email": "security@paragonie.com",
- "homepage": "https://paragonie.com"
- }
- ],
- "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
- "keywords": [
- "csprng",
- "pseudorandom",
- "random"
- ]
- },
- {
- "name": "psr/http-message",
- "version": "1.0.1",
- "version_normalized": "1.0.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/php-fig/http-message.git",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
- "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "time": "2016-08-06T14:39:51+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Psr\\Http\\Message\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "PHP-FIG",
- "homepage": "http://www.php-fig.org/"
- }
- ],
- "description": "Common interface for HTTP messages",
- "homepage": "https://github.com/php-fig/http-message",
- "keywords": [
- "http",
- "http-message",
- "psr",
- "psr-7",
- "request",
- "response"
- ]
- },
- {
- "name": "ratchet/rfc6455",
- "version": "v0.2.3",
- "version_normalized": "0.2.3.0",
- "source": {
- "type": "git",
- "url": "https://github.com/ratchetphp/RFC6455.git",
- "reference": "cc8a1a46a703ce01de10fdb5fab387381b66edc8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/ratchetphp/RFC6455/zipball/cc8a1a46a703ce01de10fdb5fab387381b66edc8",
- "reference": "cc8a1a46a703ce01de10fdb5fab387381b66edc8",
- "shasum": ""
- },
- "require": {
- "guzzlehttp/psr7": "^1.0",
- "php": ">=5.4.2"
- },
- "require-dev": {
- "phpunit/phpunit": "4.8.*",
- "react/http": "^0.4.1",
- "react/socket-client": "^0.4.3"
- },
- "time": "2017-09-13T13:49:42+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Ratchet\\RFC6455\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Chris Boden",
- "email": "cboden@gmail.com",
- "role": "Developer"
- }
- ],
- "description": "RFC6455 WebSocket protocol handler",
- "homepage": "http://socketo.me",
- "keywords": [
- "WebSockets",
- "rfc6455",
- "websocket"
- ]
- },
- {
- "name": "react/cache",
- "version": "v0.4.2",
- "version_normalized": "0.4.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/reactphp/cache.git",
- "reference": "75494f26b4ef089db9bf8c90b63c296246e099e8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/reactphp/cache/zipball/75494f26b4ef089db9bf8c90b63c296246e099e8",
- "reference": "75494f26b4ef089db9bf8c90b63c296246e099e8",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0",
- "react/promise": "~2.0|~1.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
- },
- "time": "2017-12-20T16:47:13+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "React\\Cache\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Async, Promise-based cache interface for ReactPHP",
- "keywords": [
- "cache",
- "caching",
- "promise",
- "reactphp"
- ]
- },
- {
- "name": "react/dns",
- "version": "v0.4.13",
- "version_normalized": "0.4.13.0",
- "source": {
- "type": "git",
- "url": "https://github.com/reactphp/dns.git",
- "reference": "7d1e08c300fd7de600810883386ee5e2a64898f4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/reactphp/dns/zipball/7d1e08c300fd7de600810883386ee5e2a64898f4",
- "reference": "7d1e08c300fd7de600810883386ee5e2a64898f4",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0",
- "react/cache": "~0.4.0|~0.3.0",
- "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
- "react/promise": "^2.1 || ^1.2.1",
- "react/promise-timer": "^1.2",
- "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.5"
- },
- "require-dev": {
- "clue/block-react": "^1.2",
- "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
- },
- "time": "2018-02-27T12:51:22+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "React\\Dns\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Async DNS resolver for ReactPHP",
- "keywords": [
- "async",
- "dns",
- "dns-resolver",
- "reactphp"
- ]
- },
- {
- "name": "react/event-loop",
- "version": "v0.5.1",
- "version_normalized": "0.5.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/reactphp/event-loop.git",
- "reference": "e1e0647a5c6e2c86013a24e9c8252113df86105a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/reactphp/event-loop/zipball/e1e0647a5c6e2c86013a24e9c8252113df86105a",
- "reference": "e1e0647a5c6e2c86013a24e9c8252113df86105a",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.8.35 || ^5.7 || ^6.4"
- },
- "suggest": {
- "ext-event": "~1.0 for ExtEventLoop",
- "ext-pcntl": "For signal handling support when using the StreamSelectLoop"
- },
- "time": "2018-04-09T11:59:21+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "React\\EventLoop\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.",
- "keywords": [
- "asynchronous",
- "event-loop"
- ]
- },
- {
- "name": "react/promise",
- "version": "v2.5.1",
- "version_normalized": "2.5.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/reactphp/promise.git",
- "reference": "62785ae604c8d69725d693eb370e1d67e94c4053"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053",
- "reference": "62785ae604c8d69725d693eb370e1d67e94c4053",
- "shasum": ""
- },
- "require": {
- "php": ">=5.4.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.8"
- },
- "time": "2017-03-25T12:08:31+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "React\\Promise\\": "src/"
- },
- "files": [
- "src/functions_include.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jan Sorgalla",
- "email": "jsorgalla@gmail.com"
- }
- ],
- "description": "A lightweight implementation of CommonJS Promises/A for PHP",
- "keywords": [
- "promise",
- "promises"
- ]
- },
- {
- "name": "react/promise-timer",
- "version": "v1.2.1",
- "version_normalized": "1.2.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/reactphp/promise-timer.git",
- "reference": "9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd",
- "reference": "9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3",
- "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
- "react/promise": "~2.1|~1.2"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
- },
- "time": "2017-12-22T15:41:41+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "React\\Promise\\Timer\\": "src/"
- },
- "files": [
- "src/functions.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Christian Lück",
- "email": "christian@lueck.tv"
- }
- ],
- "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.",
- "homepage": "https://github.com/react/promise-timer",
- "keywords": [
- "async",
- "event-loop",
- "promise",
- "reactphp",
- "timeout",
- "timer"
- ]
- },
- {
- "name": "react/socket",
- "version": "v0.8.10",
- "version_normalized": "0.8.10.0",
- "source": {
- "type": "git",
- "url": "https://github.com/reactphp/socket.git",
- "reference": "d3957313c92b539537fccc80170c05a27ec25796"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/reactphp/socket/zipball/d3957313c92b539537fccc80170c05a27ec25796",
- "reference": "d3957313c92b539537fccc80170c05a27ec25796",
- "shasum": ""
- },
- "require": {
- "evenement/evenement": "^3.0 || ^2.0 || ^1.0",
- "php": ">=5.3.0",
- "react/dns": "^0.4.13",
- "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
- "react/promise": "^2.1 || ^1.2",
- "react/promise-timer": "~1.0",
- "react/stream": "^1.0 || ^0.7.1"
- },
- "require-dev": {
- "clue/block-react": "^1.2",
- "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
- },
- "time": "2018-02-28T09:32:38+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "React\\Socket\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP",
- "keywords": [
- "Connection",
- "Socket",
- "async",
- "reactphp",
- "stream"
- ]
- },
- {
- "name": "react/stream",
- "version": "v0.7.7",
- "version_normalized": "0.7.7.0",
- "source": {
- "type": "git",
- "url": "https://github.com/reactphp/stream.git",
- "reference": "10100896018fd847a257cd81143b8e1b7be08e40"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/reactphp/stream/zipball/10100896018fd847a257cd81143b8e1b7be08e40",
- "reference": "10100896018fd847a257cd81143b8e1b7be08e40",
- "shasum": ""
- },
- "require": {
- "evenement/evenement": "^3.0 || ^2.0 || ^1.0",
- "php": ">=5.3.8",
- "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5"
- },
- "require-dev": {
- "clue/stream-filter": "~1.2",
- "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
- },
- "time": "2018-01-19T15:04:38+00:00",
- "type": "library",
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "React\\Stream\\": "src"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP",
- "keywords": [
- "event-driven",
- "io",
- "non-blocking",
- "pipe",
- "reactphp",
- "readable",
- "stream",
- "writable"
- ]
- },
- {
- "name": "symfony/http-foundation",
- "version": "v3.4.8",
- "version_normalized": "3.4.8.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/http-foundation.git",
- "reference": "b11e6d165ff4cbf5685d185ab19a90f2f3bb7d1e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b11e6d165ff4cbf5685d185ab19a90f2f3bb7d1e",
- "reference": "b11e6d165ff4cbf5685d185ab19a90f2f3bb7d1e",
- "shasum": ""
- },
- "require": {
- "php": "^5.5.9|>=7.0.8",
- "symfony/polyfill-mbstring": "~1.1",
- "symfony/polyfill-php70": "~1.6"
- },
- "require-dev": {
- "symfony/expression-language": "~2.8|~3.0|~4.0"
- },
- "time": "2018-04-03T05:22:50+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\HttpFoundation\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony HttpFoundation Component",
- "homepage": "https://symfony.com"
- },
- {
- "name": "symfony/polyfill-mbstring",
- "version": "v1.7.0",
- "version_normalized": "1.7.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
- "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
- "shasum": ""
- },
- "require": {
- "php": ">=5.3.3"
- },
- "suggest": {
- "ext-mbstring": "For best performance"
- },
- "time": "2018-01-30T19:27:44+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.7-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
- },
- "files": [
- "bootstrap.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill for the Mbstring extension",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "mbstring",
- "polyfill",
- "portable",
- "shim"
- ]
- },
- {
- "name": "symfony/polyfill-php70",
- "version": "v1.7.0",
- "version_normalized": "1.7.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/polyfill-php70.git",
- "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f",
- "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f",
- "shasum": ""
- },
- "require": {
- "paragonie/random_compat": "~1.0|~2.0",
- "php": ">=5.3.3"
- },
- "time": "2018-01-30T19:27:44+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.7-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Polyfill\\Php70\\": ""
- },
- "files": [
- "bootstrap.php"
- ],
- "classmap": [
- "Resources/stubs"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Nicolas Grekas",
- "email": "p@tchwork.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
- "homepage": "https://symfony.com",
- "keywords": [
- "compatibility",
- "polyfill",
- "portable",
- "shim"
- ]
- },
- {
- "name": "symfony/routing",
- "version": "v3.4.8",
- "version_normalized": "3.4.8.0",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/routing.git",
- "reference": "50f333b707bef9f6972ad04e6df3ec8875c9a67c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/50f333b707bef9f6972ad04e6df3ec8875c9a67c",
- "reference": "50f333b707bef9f6972ad04e6df3ec8875c9a67c",
- "shasum": ""
- },
- "require": {
- "php": "^5.5.9|>=7.0.8"
- },
- "conflict": {
- "symfony/config": "<3.3.1",
- "symfony/dependency-injection": "<3.3",
- "symfony/yaml": "<3.4"
- },
- "require-dev": {
- "doctrine/annotations": "~1.0",
- "doctrine/common": "~2.2",
- "psr/log": "~1.0",
- "symfony/config": "^3.3.1|~4.0",
- "symfony/dependency-injection": "~3.3|~4.0",
- "symfony/expression-language": "~2.8|~3.0|~4.0",
- "symfony/http-foundation": "~2.8|~3.0|~4.0",
- "symfony/yaml": "~3.4|~4.0"
- },
- "suggest": {
- "doctrine/annotations": "For using the annotation loader",
- "symfony/config": "For using the all-in-one router or any loader",
- "symfony/dependency-injection": "For loading routes from a service",
- "symfony/expression-language": "For using expression matching",
- "symfony/http-foundation": "For using a Symfony Request object",
- "symfony/yaml": "For using the YAML loader"
- },
- "time": "2018-04-04T13:22:16+00:00",
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.4-dev"
- }
- },
- "installation-source": "dist",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Routing\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Symfony Routing Component",
- "homepage": "https://symfony.com",
- "keywords": [
- "router",
- "routing",
- "uri",
- "url"
- ]
- }
+ {
+ "name": "cboden/ratchet",
+ "version": "v0.4.1",
+ "version_normalized": "0.4.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ratchetphp/Ratchet.git",
+ "reference": "0d31f3a8ad4795fd48397712709e55cd07f51360"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ratchetphp/Ratchet/zipball/0d31f3a8ad4795fd48397712709e55cd07f51360",
+ "reference": "0d31f3a8ad4795fd48397712709e55cd07f51360",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/psr7": "^1.0",
+ "php": ">=5.4.2",
+ "ratchet/rfc6455": "^0.2",
+ "react/socket": "^1.0 || ^0.8 || ^0.7 || ^0.6 || ^0.5",
+ "symfony/http-foundation": "^2.6|^3.0|^4.0",
+ "symfony/routing": "^2.6|^3.0|^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8"
+ },
+ "time": "2017-12-12T00:49:31+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Ratchet\\": "src/Ratchet"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Chris Boden",
+ "email": "cboden@gmail.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "PHP WebSocket library",
+ "homepage": "http://socketo.me",
+ "keywords": [
+ "Ratchet",
+ "WebSockets",
+ "server",
+ "sockets",
+ "websocket"
+ ]
+ },
+ {
+ "name": "evenement/evenement",
+ "version": "v3.0.1",
+ "version_normalized": "3.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/igorw/evenement.git",
+ "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/igorw/evenement/zipball/531bfb9d15f8aa57454f5f0285b18bec903b8fb7",
+ "reference": "531bfb9d15f8aa57454f5f0285b18bec903b8fb7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "time": "2017-07-23T21:35:13+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-0": {
+ "Evenement": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Igor Wiedler",
+ "email": "igor@wiedler.ch"
+ }
+ ],
+ "description": "Événement is a very simple event dispatching library for PHP",
+ "keywords": [
+ "event-dispatcher",
+ "event-emitter"
+ ]
+ },
+ {
+ "name": "guzzlehttp/psr7",
+ "version": "1.4.2",
+ "version_normalized": "1.4.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/guzzle/psr7.git",
+ "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
+ "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "time": "2017-03-20T17:10:46+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
+ },
+ {
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": [
+ "http",
+ "message",
+ "request",
+ "response",
+ "stream",
+ "uri",
+ "url"
+ ]
+ },
+ {
+ "name": "matthiasmullie/minify",
+ "version": "1.3.59",
+ "version_normalized": "1.3.59.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/matthiasmullie/minify.git",
+ "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/62dac3bce06de66f0d71fe6490cf1c508d3c3ff7",
+ "reference": "62dac3bce06de66f0d71fe6490cf1c508d3c3ff7",
+ "shasum": ""
+ },
+ "require": {
+ "ext-pcre": "*",
+ "matthiasmullie/path-converter": "~1.1",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "friendsofphp/php-cs-fixer": "~2.0",
+ "matthiasmullie/scrapbook": "~1.0",
+ "phpunit/phpunit": "~4.8"
+ },
+ "suggest": {
+ "psr/cache-implementation": "Cache implementation to use with Minify::cache"
+ },
+ "time": "2018-02-02T12:44:18+00:00",
+ "bin": [
+ "bin/minifycss",
+ "bin/minifyjs"
+ ],
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "MatthiasMullie\\Minify\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matthias Mullie",
+ "email": "minify@mullie.eu",
+ "homepage": "http://www.mullie.eu",
+ "role": "Developer"
+ }
+ ],
+ "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.",
+ "homepage": "http://www.minifier.org",
+ "keywords": [
+ "JS",
+ "css",
+ "javascript",
+ "minifier",
+ "minify"
+ ]
+ },
+ {
+ "name": "matthiasmullie/path-converter",
+ "version": "1.1.1",
+ "version_normalized": "1.1.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/matthiasmullie/path-converter.git",
+ "reference": "3082a6838be02b930239a97d38b5c9da4d693aca"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/3082a6838be02b930239a97d38b5c9da4d693aca",
+ "reference": "3082a6838be02b930239a97d38b5c9da4d693aca",
+ "shasum": ""
+ },
+ "require": {
+ "ext-pcre": "*",
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8"
+ },
+ "time": "2018-02-02T11:30:10+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "MatthiasMullie\\PathConverter\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Matthias Mullie",
+ "email": "pathconverter@mullie.eu",
+ "homepage": "http://www.mullie.eu",
+ "role": "Developer"
+ }
+ ],
+ "description": "Relative path converter",
+ "homepage": "http://github.com/matthiasmullie/path-converter",
+ "keywords": [
+ "converter",
+ "path",
+ "paths",
+ "relative"
+ ]
+ },
+ {
+ "name": "natxet/CssMin",
+ "version": "v3.0.6",
+ "version_normalized": "3.0.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/natxet/CssMin.git",
+ "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/natxet/CssMin/zipball/d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd",
+ "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.0"
+ },
+ "time": "2018-01-09T11:15:01+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Joe Scylla",
+ "email": "joe.scylla@gmail.com",
+ "homepage": "https://profiles.google.com/joe.scylla"
+ }
+ ],
+ "description": "Minifying CSS",
+ "homepage": "http://code.google.com/p/cssmin/",
+ "keywords": [
+ "css",
+ "minify"
+ ]
+ },
+ {
+ "name": "nubs/random-name-generator",
+ "version": "v2.1.0",
+ "version_normalized": "2.1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nubs/random-name-generator.git",
+ "reference": "7004eb1724e1c4a154553e44312b7045fe412b77"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nubs/random-name-generator/zipball/7004eb1724e1c4a154553e44312b7045fe412b77",
+ "reference": "7004eb1724e1c4a154553e44312b7045fe412b77",
+ "shasum": ""
+ },
+ "require": {
+ "php": "~5.6 || ~7.0"
+ },
+ "require-dev": {
+ "cinam/randomizer": ">=1.1.1,<2.0",
+ "phpunit/phpunit": "~5.0",
+ "satooshi/php-coveralls": "~1.0",
+ "squizlabs/php_codesniffer": "~2.3"
+ },
+ "time": "2016-12-04T01:57:19+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Nubs\\RandomNameGenerator\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Spencer Rinehart",
+ "email": "anubis@overthemonkey.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "A library to create interesting, sometimes entertaining, random names.",
+ "keywords": [
+ "alliteration",
+ "generator",
+ "random",
+ "video game"
+ ]
+ },
+ {
+ "name": "paragonie/random_compat",
+ "version": "v2.0.12",
+ "version_normalized": "2.0.12.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/paragonie/random_compat.git",
+ "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/258c89a6b97de7dfaf5b8c7607d0478e236b04fb",
+ "reference": "258c89a6b97de7dfaf5b8c7607d0478e236b04fb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*|5.*"
+ },
+ "suggest": {
+ "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
+ },
+ "time": "2018-04-04T21:24:14+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "files": [
+ "lib/random.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Paragon Initiative Enterprises",
+ "email": "security@paragonie.com",
+ "homepage": "https://paragonie.com"
+ }
+ ],
+ "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
+ "keywords": [
+ "csprng",
+ "pseudorandom",
+ "random"
+ ]
+ },
+ {
+ "name": "psr/http-message",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/http-message.git",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "time": "2016-08-06T14:39:51+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Http\\Message\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interface for HTTP messages",
+ "homepage": "https://github.com/php-fig/http-message",
+ "keywords": [
+ "http",
+ "http-message",
+ "psr",
+ "psr-7",
+ "request",
+ "response"
+ ]
+ },
+ {
+ "name": "ratchet/rfc6455",
+ "version": "v0.2.3",
+ "version_normalized": "0.2.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/ratchetphp/RFC6455.git",
+ "reference": "cc8a1a46a703ce01de10fdb5fab387381b66edc8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/ratchetphp/RFC6455/zipball/cc8a1a46a703ce01de10fdb5fab387381b66edc8",
+ "reference": "cc8a1a46a703ce01de10fdb5fab387381b66edc8",
+ "shasum": ""
+ },
+ "require": {
+ "guzzlehttp/psr7": "^1.0",
+ "php": ">=5.4.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.8.*",
+ "react/http": "^0.4.1",
+ "react/socket-client": "^0.4.3"
+ },
+ "time": "2017-09-13T13:49:42+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Ratchet\\RFC6455\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Chris Boden",
+ "email": "cboden@gmail.com",
+ "role": "Developer"
+ }
+ ],
+ "description": "RFC6455 WebSocket protocol handler",
+ "homepage": "http://socketo.me",
+ "keywords": [
+ "WebSockets",
+ "rfc6455",
+ "websocket"
+ ]
+ },
+ {
+ "name": "react/cache",
+ "version": "v0.4.2",
+ "version_normalized": "0.4.2.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/cache.git",
+ "reference": "75494f26b4ef089db9bf8c90b63c296246e099e8"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/cache/zipball/75494f26b4ef089db9bf8c90b63c296246e099e8",
+ "reference": "75494f26b4ef089db9bf8c90b63c296246e099e8",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "react/promise": "~2.0|~1.1"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
+ },
+ "time": "2017-12-20T16:47:13+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "React\\Cache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Async, Promise-based cache interface for ReactPHP",
+ "keywords": [
+ "cache",
+ "caching",
+ "promise",
+ "reactphp"
+ ]
+ },
+ {
+ "name": "react/dns",
+ "version": "v0.4.13",
+ "version_normalized": "0.4.13.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/dns.git",
+ "reference": "7d1e08c300fd7de600810883386ee5e2a64898f4"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/dns/zipball/7d1e08c300fd7de600810883386ee5e2a64898f4",
+ "reference": "7d1e08c300fd7de600810883386ee5e2a64898f4",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "react/cache": "~0.4.0|~0.3.0",
+ "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
+ "react/promise": "^2.1 || ^1.2.1",
+ "react/promise-timer": "^1.2",
+ "react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4.5"
+ },
+ "require-dev": {
+ "clue/block-react": "^1.2",
+ "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
+ },
+ "time": "2018-02-27T12:51:22+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "React\\Dns\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Async DNS resolver for ReactPHP",
+ "keywords": [
+ "async",
+ "dns",
+ "dns-resolver",
+ "reactphp"
+ ]
+ },
+ {
+ "name": "react/event-loop",
+ "version": "v0.5.1",
+ "version_normalized": "0.5.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/event-loop.git",
+ "reference": "e1e0647a5c6e2c86013a24e9c8252113df86105a"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/event-loop/zipball/e1e0647a5c6e2c86013a24e9c8252113df86105a",
+ "reference": "e1e0647a5c6e2c86013a24e9c8252113df86105a",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8.35 || ^5.7 || ^6.4"
+ },
+ "suggest": {
+ "ext-event": "~1.0 for ExtEventLoop",
+ "ext-pcntl": "For signal handling support when using the StreamSelectLoop"
+ },
+ "time": "2018-04-09T11:59:21+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "React\\EventLoop\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "ReactPHP's core reactor event loop that libraries can use for evented I/O.",
+ "keywords": [
+ "asynchronous",
+ "event-loop"
+ ]
+ },
+ {
+ "name": "react/promise",
+ "version": "v2.5.1",
+ "version_normalized": "2.5.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/promise.git",
+ "reference": "62785ae604c8d69725d693eb370e1d67e94c4053"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/promise/zipball/62785ae604c8d69725d693eb370e1d67e94c4053",
+ "reference": "62785ae604c8d69725d693eb370e1d67e94c4053",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8"
+ },
+ "time": "2017-03-25T12:08:31+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "React\\Promise\\": "src/"
+ },
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jan Sorgalla",
+ "email": "jsorgalla@gmail.com"
+ }
+ ],
+ "description": "A lightweight implementation of CommonJS Promises/A for PHP",
+ "keywords": [
+ "promise",
+ "promises"
+ ]
+ },
+ {
+ "name": "react/promise-timer",
+ "version": "v1.2.1",
+ "version_normalized": "1.2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/promise-timer.git",
+ "reference": "9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/promise-timer/zipball/9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd",
+ "reference": "9b4cd9cbe7457e0d87fe8aa7ccceab8a2c830fbd",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3",
+ "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
+ "react/promise": "~2.1|~1.2"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
+ },
+ "time": "2017-12-22T15:41:41+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "React\\Promise\\Timer\\": "src/"
+ },
+ "files": [
+ "src/functions.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Christian Lück",
+ "email": "christian@lueck.tv"
+ }
+ ],
+ "description": "A trivial implementation of timeouts for Promises, built on top of ReactPHP.",
+ "homepage": "https://github.com/react/promise-timer",
+ "keywords": [
+ "async",
+ "event-loop",
+ "promise",
+ "reactphp",
+ "timeout",
+ "timer"
+ ]
+ },
+ {
+ "name": "react/socket",
+ "version": "v0.8.10",
+ "version_normalized": "0.8.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/socket.git",
+ "reference": "d3957313c92b539537fccc80170c05a27ec25796"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/socket/zipball/d3957313c92b539537fccc80170c05a27ec25796",
+ "reference": "d3957313c92b539537fccc80170c05a27ec25796",
+ "shasum": ""
+ },
+ "require": {
+ "evenement/evenement": "^3.0 || ^2.0 || ^1.0",
+ "php": ">=5.3.0",
+ "react/dns": "^0.4.13",
+ "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
+ "react/promise": "^2.1 || ^1.2",
+ "react/promise-timer": "~1.0",
+ "react/stream": "^1.0 || ^0.7.1"
+ },
+ "require-dev": {
+ "clue/block-react": "^1.2",
+ "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
+ },
+ "time": "2018-02-28T09:32:38+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "React\\Socket\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Async, streaming plaintext TCP/IP and secure TLS socket server and client connections for ReactPHP",
+ "keywords": [
+ "Connection",
+ "Socket",
+ "async",
+ "reactphp",
+ "stream"
+ ]
+ },
+ {
+ "name": "react/stream",
+ "version": "v0.7.7",
+ "version_normalized": "0.7.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/reactphp/stream.git",
+ "reference": "10100896018fd847a257cd81143b8e1b7be08e40"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/reactphp/stream/zipball/10100896018fd847a257cd81143b8e1b7be08e40",
+ "reference": "10100896018fd847a257cd81143b8e1b7be08e40",
+ "shasum": ""
+ },
+ "require": {
+ "evenement/evenement": "^3.0 || ^2.0 || ^1.0",
+ "php": ">=5.3.8",
+ "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5"
+ },
+ "require-dev": {
+ "clue/stream-filter": "~1.2",
+ "phpunit/phpunit": "^6.4 || ^5.7 || ^4.8.35"
+ },
+ "time": "2018-01-19T15:04:38+00:00",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "React\\Stream\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "Event-driven readable and writable streams for non-blocking I/O in ReactPHP",
+ "keywords": [
+ "event-driven",
+ "io",
+ "non-blocking",
+ "pipe",
+ "reactphp",
+ "readable",
+ "stream",
+ "writable"
+ ]
+ },
+ {
+ "name": "symfony/http-foundation",
+ "version": "v3.4.8",
+ "version_normalized": "3.4.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/http-foundation.git",
+ "reference": "b11e6d165ff4cbf5685d185ab19a90f2f3bb7d1e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b11e6d165ff4cbf5685d185ab19a90f2f3bb7d1e",
+ "reference": "b11e6d165ff4cbf5685d185ab19a90f2f3bb7d1e",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/polyfill-mbstring": "~1.1",
+ "symfony/polyfill-php70": "~1.6"
+ },
+ "require-dev": {
+ "symfony/expression-language": "~2.8|~3.0|~4.0"
+ },
+ "time": "2018-04-03T05:22:50+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.4-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\HttpFoundation\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony HttpFoundation Component",
+ "homepage": "https://symfony.com"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.7.0",
+ "version_normalized": "1.7.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b",
+ "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "time": "2018-01-30T19:27:44+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ]
+ },
+ {
+ "name": "symfony/polyfill-php70",
+ "version": "v1.7.0",
+ "version_normalized": "1.7.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php70.git",
+ "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/3532bfcd8f933a7816f3a0a59682fc404776600f",
+ "reference": "3532bfcd8f933a7816f3a0a59682fc404776600f",
+ "shasum": ""
+ },
+ "require": {
+ "paragonie/random_compat": "~1.0|~2.0",
+ "php": ">=5.3.3"
+ },
+ "time": "2018-01-30T19:27:44+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.7-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php70\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ]
+ },
+ {
+ "name": "symfony/routing",
+ "version": "v3.4.8",
+ "version_normalized": "3.4.8.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/routing.git",
+ "reference": "50f333b707bef9f6972ad04e6df3ec8875c9a67c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/50f333b707bef9f6972ad04e6df3ec8875c9a67c",
+ "reference": "50f333b707bef9f6972ad04e6df3ec8875c9a67c",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9|>=7.0.8"
+ },
+ "conflict": {
+ "symfony/config": "<3.3.1",
+ "symfony/dependency-injection": "<3.3",
+ "symfony/yaml": "<3.4"
+ },
+ "require-dev": {
+ "doctrine/annotations": "~1.0",
+ "doctrine/common": "~2.2",
+ "psr/log": "~1.0",
+ "symfony/config": "^3.3.1|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/http-foundation": "~2.8|~3.0|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
+ },
+ "suggest": {
+ "doctrine/annotations": "For using the annotation loader",
+ "symfony/config": "For using the all-in-one router or any loader",
+ "symfony/dependency-injection": "For loading routes from a service",
+ "symfony/expression-language": "For using expression matching",
+ "symfony/http-foundation": "For using a Symfony Request object",
+ "symfony/yaml": "For using the YAML loader"
+ },
+ "time": "2018-04-04T13:22:16+00:00",
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.4-dev"
+ }
+ },
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Routing\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Routing Component",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "router",
+ "routing",
+ "uri",
+ "url"
+ ]
+ }
]
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/composer.json
index cbb4827..d0a986a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/composer.json
@@ -1,29 +1,34 @@
{
- "name": "evenement/evenement",
- "description": "Événement is a very simple event dispatching library for PHP",
- "keywords": ["event-dispatcher", "event-emitter"],
- "license": "MIT",
- "authors": [
- {
- "name": "Igor Wiedler",
- "email": "igor@wiedler.ch"
- }
- ],
- "require": {
- "php": ">=7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "autoload": {
- "psr-0": {
- "Evenement": "src"
- }
- },
- "autoload-dev": {
- "psr-0": {
- "Evenement": "tests"
- },
- "files": ["tests/Evenement/Tests/functions.php"]
+ "name": "evenement/evenement",
+ "description": "Événement is a very simple event dispatching library for PHP",
+ "keywords": [
+ "event-dispatcher",
+ "event-emitter"
+ ],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Igor Wiedler",
+ "email": "igor@wiedler.ch"
}
+ ],
+ "require": {
+ "php": ">=7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "autoload": {
+ "psr-0": {
+ "Evenement": "src"
+ }
+ },
+ "autoload-dev": {
+ "psr-0": {
+ "Evenement": "tests"
+ },
+ "files": [
+ "tests/Evenement/Tests/functions.php"
+ ]
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-no-arguments.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-no-arguments.php
index 53d7f4b..535ae7b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-no-arguments.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-no-arguments.php
@@ -13,16 +13,17 @@ const ITERATIONS = 10000000;
use Evenement\EventEmitter;
-require __DIR__.'/../vendor/autoload.php';
+require __DIR__ . '/../vendor/autoload.php';
$emitter = new EventEmitter();
-$emitter->on('event', function () {});
+$emitter->on('event', function () {
+});
-$start = microtime(true);
+$start = microtime(TRUE);
for ($i = 0; $i < ITERATIONS; $i++) {
$emitter->emit('event');
}
-$time = microtime(true) - $start;
+$time = microtime(TRUE) - $start;
echo 'Emitting ', number_format(ITERATIONS), ' events took: ', number_format($time, 2), 's', PHP_EOL;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-once.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-once.php
index 74f4d17..d0c74ec 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-once.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-once.php
@@ -15,16 +15,17 @@ const ITERATIONS = 100000;
use Evenement\EventEmitter;
-require __DIR__.'/../vendor/autoload.php';
+require __DIR__ . '/../vendor/autoload.php';
$emitter = new EventEmitter();
for ($i = 0; $i < ITERATIONS; $i++) {
- $emitter->once('event', function ($a, $b, $c) {});
+ $emitter->once('event', function ($a, $b, $c) {
+ });
}
-$start = microtime(true);
+$start = microtime(TRUE);
$emitter->emit('event', [1, 2, 3]);
-$time = microtime(true) - $start;
+$time = microtime(TRUE) - $start;
echo 'Emitting one event to ', number_format(ITERATIONS), ' once listeners took: ', number_format($time, 2), 's', PHP_EOL;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-one-argument.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-one-argument.php
index 39fc4ba..0bb1890 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-one-argument.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit-one-argument.php
@@ -13,16 +13,17 @@ const ITERATIONS = 10000000;
use Evenement\EventEmitter;
-require __DIR__.'/../vendor/autoload.php';
+require __DIR__ . '/../vendor/autoload.php';
$emitter = new EventEmitter();
-$emitter->on('event', function ($a) {});
+$emitter->on('event', function ($a) {
+});
-$start = microtime(true);
+$start = microtime(TRUE);
for ($i = 0; $i < ITERATIONS; $i++) {
$emitter->emit('event', [1]);
}
-$time = microtime(true) - $start;
+$time = microtime(TRUE) - $start;
echo 'Emitting ', number_format(ITERATIONS), ' events took: ', number_format($time, 2), 's', PHP_EOL;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit.php
index 3ab639e..3ac6c55 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-emit.php
@@ -13,16 +13,17 @@ const ITERATIONS = 10000000;
use Evenement\EventEmitter;
-require __DIR__.'/../vendor/autoload.php';
+require __DIR__ . '/../vendor/autoload.php';
$emitter = new EventEmitter();
-$emitter->on('event', function ($a, $b, $c) {});
+$emitter->on('event', function ($a, $b, $c) {
+});
-$start = microtime(true);
+$start = microtime(TRUE);
for ($i = 0; $i < ITERATIONS; $i++) {
$emitter->emit('event', [1, 2, 3]);
}
-$time = microtime(true) - $start;
+$time = microtime(TRUE) - $start;
echo 'Emitting ', number_format(ITERATIONS), ' events took: ', number_format($time, 2), 's', PHP_EOL;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-remove-listener-once.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-remove-listener-once.php
index 414be3b..e0f8a7d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-remove-listener-once.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/examples/benchmark-remove-listener-once.php
@@ -15,25 +15,26 @@ const ITERATIONS = 100000;
use Evenement\EventEmitter;
-require __DIR__.'/../vendor/autoload.php';
+require __DIR__ . '/../vendor/autoload.php';
$emitter = new EventEmitter();
$listeners = [];
for ($i = 0; $i < ITERATIONS; $i++) {
- $listeners[] = function ($a, $b, $c) {};
+ $listeners[] = function ($a, $b, $c) {
+ };
}
-$start = microtime(true);
+$start = microtime(TRUE);
foreach ($listeners as $listener) {
$emitter->once('event', $listener);
}
-$time = microtime(true) - $start;
+$time = microtime(TRUE) - $start;
echo 'Adding ', number_format(ITERATIONS), ' once listeners took: ', number_format($time, 2), 's', PHP_EOL;
-$start = microtime(true);
+$start = microtime(TRUE);
foreach ($listeners as $listener) {
$emitter->removeListener('event', $listener);
}
-$time = microtime(true) - $start;
+$time = microtime(TRUE) - $start;
echo 'Removing ', number_format(ITERATIONS), ' once listeners took: ', number_format($time, 2), 's', PHP_EOL;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterInterface.php
index 310631a..65c83b3 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterInterface.php
@@ -14,9 +14,14 @@ namespace Evenement;
interface EventEmitterInterface
{
public function on($event, callable $listener);
+
public function once($event, callable $listener);
+
public function removeListener($event, callable $listener);
- public function removeAllListeners($event = null);
- public function listeners($event = null);
+
+ public function removeAllListeners($event = NULL);
+
+ public function listeners($event = NULL);
+
public function emit($event, array $arguments = []);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php
index a78e65c..f186835 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php
@@ -18,9 +18,8 @@ trait EventEmitterTrait
protected $listeners = [];
protected $onceListeners = [];
- public function on($event, callable $listener)
- {
- if ($event === null) {
+ public function on($event, callable $listener) {
+ if ($event === NULL) {
throw new InvalidArgumentException('event name must not be null');
}
@@ -33,9 +32,8 @@ trait EventEmitterTrait
return $this;
}
- public function once($event, callable $listener)
- {
- if ($event === null) {
+ public function once($event, callable $listener) {
+ if ($event === NULL) {
throw new InvalidArgumentException('event name must not be null');
}
@@ -48,15 +46,14 @@ trait EventEmitterTrait
return $this;
}
- public function removeListener($event, callable $listener)
- {
- if ($event === null) {
+ public function removeListener($event, callable $listener) {
+ if ($event === NULL) {
throw new InvalidArgumentException('event name must not be null');
}
if (isset($this->listeners[$event])) {
- $index = \array_search($listener, $this->listeners[$event], true);
- if (false !== $index) {
+ $index = \array_search($listener, $this->listeners[$event], TRUE);
+ if (FALSE !== $index) {
unset($this->listeners[$event][$index]);
if (\count($this->listeners[$event]) === 0) {
unset($this->listeners[$event]);
@@ -65,8 +62,8 @@ trait EventEmitterTrait
}
if (isset($this->onceListeners[$event])) {
- $index = \array_search($listener, $this->onceListeners[$event], true);
- if (false !== $index) {
+ $index = \array_search($listener, $this->onceListeners[$event], TRUE);
+ if (FALSE !== $index) {
unset($this->onceListeners[$event][$index]);
if (\count($this->onceListeners[$event]) === 0) {
unset($this->onceListeners[$event]);
@@ -75,24 +72,22 @@ trait EventEmitterTrait
}
}
- public function removeAllListeners($event = null)
- {
- if ($event !== null) {
+ public function removeAllListeners($event = NULL) {
+ if ($event !== NULL) {
unset($this->listeners[$event]);
} else {
$this->listeners = [];
}
- if ($event !== null) {
+ if ($event !== NULL) {
unset($this->onceListeners[$event]);
} else {
$this->onceListeners = [];
}
}
- public function listeners($event = null): array
- {
- if ($event === null) {
+ public function listeners($event = NULL): array {
+ if ($event === NULL) {
$events = [];
$eventNames = \array_unique(
\array_merge(\array_keys($this->listeners), \array_keys($this->onceListeners))
@@ -112,9 +107,8 @@ trait EventEmitterTrait
);
}
- public function emit($event, array $arguments = [])
- {
- if ($event === null) {
+ public function emit($event, array $arguments = []) {
+ if ($event === NULL) {
throw new InvalidArgumentException('event name must not be null');
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/EventEmitterTest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/EventEmitterTest.php
index 28f3011..89ea145 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/EventEmitterTest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/EventEmitterTest.php
@@ -19,29 +19,25 @@ class EventEmitterTest extends TestCase
{
private $emitter;
- public function setUp()
- {
+ public function setUp() {
$this->emitter = new EventEmitter();
}
- public function testAddListenerWithLambda()
- {
- $this->emitter->on('foo', function () {});
+ public function testAddListenerWithLambda() {
+ $this->emitter->on('foo', function () {
+ });
}
- public function testAddListenerWithMethod()
- {
+ public function testAddListenerWithMethod() {
$listener = new Listener();
$this->emitter->on('foo', [$listener, 'onFoo']);
}
- public function testAddListenerWithStaticMethod()
- {
+ public function testAddListenerWithStaticMethod() {
$this->emitter->on('bar', ['Evenement\Tests\Listener', 'onBar']);
}
- public function testAddListenerWithInvalidListener()
- {
+ public function testAddListenerWithInvalidListener() {
try {
$this->emitter->on('foo', 'not a callable');
$this->fail();
@@ -50,8 +46,7 @@ class EventEmitterTest extends TestCase
}
}
- public function testOnce()
- {
+ public function testOnce() {
$listenerCalled = 0;
$this->emitter->once('foo', function () use (&$listenerCalled) {
@@ -69,8 +64,7 @@ class EventEmitterTest extends TestCase
$this->assertSame(1, $listenerCalled);
}
- public function testOnceWithArguments()
- {
+ public function testOnceWithArguments() {
$capturedArgs = [];
$this->emitter->once('foo', function ($a, $b) use (&$capturedArgs) {
@@ -82,63 +76,58 @@ class EventEmitterTest extends TestCase
$this->assertSame(array('a', 'b'), $capturedArgs);
}
- public function testEmitWithoutArguments()
- {
- $listenerCalled = false;
+ public function testEmitWithoutArguments() {
+ $listenerCalled = FALSE;
$this->emitter->on('foo', function () use (&$listenerCalled) {
- $listenerCalled = true;
+ $listenerCalled = TRUE;
});
- $this->assertSame(false, $listenerCalled);
+ $this->assertSame(FALSE, $listenerCalled);
$this->emitter->emit('foo');
- $this->assertSame(true, $listenerCalled);
+ $this->assertSame(TRUE, $listenerCalled);
}
- public function testEmitWithOneArgument()
- {
+ public function testEmitWithOneArgument() {
$test = $this;
- $listenerCalled = false;
+ $listenerCalled = FALSE;
$this->emitter->on('foo', function ($value) use (&$listenerCalled, $test) {
- $listenerCalled = true;
+ $listenerCalled = TRUE;
$test->assertSame('bar', $value);
});
- $this->assertSame(false, $listenerCalled);
+ $this->assertSame(FALSE, $listenerCalled);
$this->emitter->emit('foo', ['bar']);
- $this->assertSame(true, $listenerCalled);
+ $this->assertSame(TRUE, $listenerCalled);
}
- public function testEmitWithTwoArguments()
- {
+ public function testEmitWithTwoArguments() {
$test = $this;
- $listenerCalled = false;
+ $listenerCalled = FALSE;
$this->emitter->on('foo', function ($arg1, $arg2) use (&$listenerCalled, $test) {
- $listenerCalled = true;
+ $listenerCalled = TRUE;
$test->assertSame('bar', $arg1);
$test->assertSame('baz', $arg2);
});
- $this->assertSame(false, $listenerCalled);
+ $this->assertSame(FALSE, $listenerCalled);
$this->emitter->emit('foo', ['bar', 'baz']);
- $this->assertSame(true, $listenerCalled);
+ $this->assertSame(TRUE, $listenerCalled);
}
- public function testEmitWithNoListeners()
- {
+ public function testEmitWithNoListeners() {
$this->emitter->emit('foo');
$this->emitter->emit('foo', ['bar']);
$this->emitter->emit('foo', ['bar', 'baz']);
}
- public function testEmitWithTwoListeners()
- {
+ public function testEmitWithTwoListeners() {
$listenersCalled = 0;
$this->emitter->on('foo', function () use (&$listenersCalled) {
@@ -154,8 +143,7 @@ class EventEmitterTest extends TestCase
$this->assertSame(2, $listenersCalled);
}
- public function testRemoveListenerMatching()
- {
+ public function testRemoveListenerMatching() {
$listenersCalled = 0;
$listener = function () use (&$listenersCalled) {
@@ -170,8 +158,7 @@ class EventEmitterTest extends TestCase
$this->assertSame(0, $listenersCalled);
}
- public function testRemoveListenerNotMatching()
- {
+ public function testRemoveListenerNotMatching() {
$listenersCalled = 0;
$listener = function () use (&$listenersCalled) {
@@ -186,8 +173,7 @@ class EventEmitterTest extends TestCase
$this->assertSame(1, $listenersCalled);
}
- public function testRemoveAllListenersMatching()
- {
+ public function testRemoveAllListenersMatching() {
$listenersCalled = 0;
$this->emitter->on('foo', function () use (&$listenersCalled) {
@@ -201,8 +187,7 @@ class EventEmitterTest extends TestCase
$this->assertSame(0, $listenersCalled);
}
- public function testRemoveAllListenersNotMatching()
- {
+ public function testRemoveAllListenersNotMatching() {
$listenersCalled = 0;
$this->emitter->on('foo', function () use (&$listenersCalled) {
@@ -216,8 +201,7 @@ class EventEmitterTest extends TestCase
$this->assertSame(1, $listenersCalled);
}
- public function testRemoveAllListenersWithoutArguments()
- {
+ public function testRemoveAllListenersWithoutArguments() {
$listenersCalled = 0;
$this->emitter->on('foo', function () use (&$listenersCalled) {
@@ -236,9 +220,8 @@ class EventEmitterTest extends TestCase
$this->assertSame(0, $listenersCalled);
}
- public function testCallablesClosure()
- {
- $calledWith = null;
+ public function testCallablesClosure() {
+ $calledWith = NULL;
$this->emitter->on('foo', function ($data) use (&$calledWith) {
$calledWith = $data;
@@ -249,8 +232,7 @@ class EventEmitterTest extends TestCase
self::assertSame('bar', $calledWith);
}
- public function testCallablesClass()
- {
+ public function testCallablesClass() {
$listener = new Listener();
$this->emitter->on('foo', [$listener, 'onFoo']);
@@ -260,8 +242,7 @@ class EventEmitterTest extends TestCase
}
- public function testCallablesClassInvoke()
- {
+ public function testCallablesClassInvoke() {
$listener = new Listener();
$this->emitter->on('foo', $listener);
@@ -270,8 +251,7 @@ class EventEmitterTest extends TestCase
self::assertSame(['bar'], $listener->getMagicData());
}
- public function testCallablesStaticClass()
- {
+ public function testCallablesStaticClass() {
$this->emitter->on('foo', '\Evenement\Tests\Listener::onBar');
$this->emitter->emit('foo', ['bar']);
@@ -279,8 +259,7 @@ class EventEmitterTest extends TestCase
self::assertSame(['bar'], Listener::getStaticData());
}
- public function testCallablesFunction()
- {
+ public function testCallablesFunction() {
$this->emitter->on('foo', '\Evenement\Tests\setGlobalTestData');
$this->emitter->emit('foo', ['bar']);
@@ -290,14 +269,19 @@ class EventEmitterTest extends TestCase
unset($GLOBALS['evenement-evenement-test-data']);
}
- public function testListeners()
- {
- $onA = function () {};
- $onB = function () {};
- $onC = function () {};
- $onceA = function () {};
- $onceB = function () {};
- $onceC = function () {};
+ public function testListeners() {
+ $onA = function () {
+ };
+ $onB = function () {
+ };
+ $onC = function () {
+ };
+ $onceA = function () {
+ };
+ $onceB = function () {
+ };
+ $onceC = function () {
+ };
self::assertCount(0, $this->emitter->listeners('event'));
$this->emitter->on('event', $onA);
@@ -332,15 +316,14 @@ class EventEmitterTest extends TestCase
self::assertSame([$onA, $onC], $this->emitter->listeners('event'));
}
- public function testOnceCallIsNotRemovedWhenWorkingOverOnceListeners()
- {
- $aCalled = false;
+ public function testOnceCallIsNotRemovedWhenWorkingOverOnceListeners() {
+ $aCalled = FALSE;
$aCallable = function () use (&$aCalled) {
- $aCalled = true;
+ $aCalled = TRUE;
};
- $bCalled = false;
+ $bCalled = FALSE;
$bCallable = function () use (&$bCalled, $aCallable) {
- $bCalled = true;
+ $bCalled = TRUE;
$this->emitter->once('event', $aCallable);
};
$this->emitter->once('event', $bCallable);
@@ -357,44 +340,46 @@ class EventEmitterTest extends TestCase
self::assertTrue($bCalled);
}
- public function testEventNameMustBeStringOn()
- {
+ public function testEventNameMustBeStringOn() {
self::expectException(InvalidArgumentException::class);
self::expectExceptionMessage('event name must not be null');
- $this->emitter->on(null, function () {});
+ $this->emitter->on(NULL, function () {
+ });
}
- public function testEventNameMustBeStringOnce()
- {
+ public function testEventNameMustBeStringOnce() {
self::expectException(InvalidArgumentException::class);
self::expectExceptionMessage('event name must not be null');
- $this->emitter->once(null, function () {});
+ $this->emitter->once(NULL, function () {
+ });
}
- public function testEventNameMustBeStringRemoveListener()
- {
+ public function testEventNameMustBeStringRemoveListener() {
self::expectException(InvalidArgumentException::class);
self::expectExceptionMessage('event name must not be null');
- $this->emitter->removeListener(null, function () {});
+ $this->emitter->removeListener(NULL, function () {
+ });
}
- public function testEventNameMustBeStringEmit()
- {
+ public function testEventNameMustBeStringEmit() {
self::expectException(InvalidArgumentException::class);
self::expectExceptionMessage('event name must not be null');
- $this->emitter->emit(null);
+ $this->emitter->emit(NULL);
}
- public function testListenersGetAll()
- {
- $a = function () {};
- $b = function () {};
- $c = function () {};
- $d = function () {};
+ public function testListenersGetAll() {
+ $a = function () {
+ };
+ $b = function () {
+ };
+ $c = function () {
+ };
+ $d = function () {
+ };
$this->emitter->once('event2', $c);
$this->emitter->on('event', $a);
@@ -418,8 +403,7 @@ class EventEmitterTest extends TestCase
);
}
- public function testOnceNestedCallRegression()
- {
+ public function testOnceNestedCallRegression() {
$first = 0;
$second = 0;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/Listener.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/Listener.php
index df17424..eee0aac 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/Listener.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/Listener.php
@@ -19,33 +19,27 @@ class Listener
private static $staticData = [];
- public function onFoo($data)
- {
+ public function onFoo($data) {
$this->data[] = $data;
}
- public function __invoke($data)
- {
+ public function __invoke($data) {
$this->magicData[] = $data;
}
- public static function onBar($data)
- {
+ public static function onBar($data) {
self::$staticData[] = $data;
}
- public function getData()
- {
+ public function getData() {
return $this->data;
}
- public function getMagicData()
- {
+ public function getMagicData() {
return $this->magicData;
}
- public static function getStaticData()
- {
+ public static function getStaticData() {
return self::$staticData;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/functions.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/functions.php
index 7f11f5b..7928621 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/functions.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/evenement/evenement/tests/Evenement/Tests/functions.php
@@ -11,7 +11,6 @@
namespace Evenement\Tests;
-function setGlobalTestData($data)
-{
+function setGlobalTestData($data) {
$GLOBALS['evenement-evenement-test-data'] = $data;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/composer.json
index b1c5a90..906d94d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/composer.json
@@ -1,39 +1,49 @@
{
- "name": "guzzlehttp/psr7",
- "type": "library",
- "description": "PSR-7 message implementation that also provides common utility methods",
- "keywords": ["request", "response", "message", "stream", "http", "uri", "url"],
- "license": "MIT",
- "authors": [
- {
- "name": "Michael Dowling",
- "email": "mtdowling@gmail.com",
- "homepage": "https://github.com/mtdowling"
- },
- {
- "name": "Tobias Schultze",
- "homepage": "https://github.com/Tobion"
- }
- ],
- "require": {
- "php": ">=5.4.0",
- "psr/http-message": "~1.0"
+ "name": "guzzlehttp/psr7",
+ "type": "library",
+ "description": "PSR-7 message implementation that also provides common utility methods",
+ "keywords": [
+ "request",
+ "response",
+ "message",
+ "stream",
+ "http",
+ "uri",
+ "url"
+ ],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Michael Dowling",
+ "email": "mtdowling@gmail.com",
+ "homepage": "https://github.com/mtdowling"
},
- "require-dev": {
- "phpunit/phpunit": "~4.0"
- },
- "provide": {
- "psr/http-message-implementation": "1.0"
- },
- "autoload": {
- "psr-4": {
- "GuzzleHttp\\Psr7\\": "src/"
- },
- "files": ["src/functions_include.php"]
+ {
+ "name": "Tobias Schultze",
+ "homepage": "https://github.com/Tobion"
+ }
+ ],
+ "require": {
+ "php": ">=5.4.0",
+ "psr/http-message": "~1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.0"
+ },
+ "provide": {
+ "psr/http-message-implementation": "1.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "GuzzleHttp\\Psr7\\": "src/"
},
- "extra": {
- "branch-alias": {
- "dev-master": "1.4-dev"
- }
+ "files": [
+ "src/functions_include.php"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
}
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/AppendStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/AppendStream.php
index 23039fd..c9a1977 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/AppendStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/AppendStream.php
@@ -1,4 +1,5 @@
addStream($stream);
}
}
- public function __toString()
- {
+ public function __toString() {
try {
$this->rewind();
return $this->getContents();
@@ -46,22 +45,20 @@ class AppendStream implements StreamInterface
*
* @throws \InvalidArgumentException if the stream is not readable
*/
- public function addStream(StreamInterface $stream)
- {
+ public function addStream(StreamInterface $stream) {
if (!$stream->isReadable()) {
throw new \InvalidArgumentException('Each stream must be readable');
}
// The stream is only seekable if all streams are seekable
if (!$stream->isSeekable()) {
- $this->seekable = false;
+ $this->seekable = FALSE;
}
$this->streams[] = $stream;
}
- public function getContents()
- {
+ public function getContents() {
return copy_to_string($this);
}
@@ -70,8 +67,7 @@ class AppendStream implements StreamInterface
*
* {@inheritdoc}
*/
- public function close()
- {
+ public function close() {
$this->pos = $this->current = 0;
foreach ($this->streams as $stream) {
@@ -86,14 +82,12 @@ class AppendStream implements StreamInterface
*
* {@inheritdoc}
*/
- public function detach()
- {
+ public function detach() {
$this->close();
- $this->detached = true;
+ $this->detached = TRUE;
}
- public function tell()
- {
+ public function tell() {
return $this->pos;
}
@@ -105,14 +99,13 @@ class AppendStream implements StreamInterface
*
* {@inheritdoc}
*/
- public function getSize()
- {
+ public function getSize() {
$size = 0;
foreach ($this->streams as $stream) {
$s = $stream->getSize();
- if ($s === null) {
- return null;
+ if ($s === NULL) {
+ return NULL;
}
$size += $s;
}
@@ -120,15 +113,13 @@ class AppendStream implements StreamInterface
return $size;
}
- public function eof()
- {
+ public function eof() {
return !$this->streams ||
($this->current >= count($this->streams) - 1 &&
- $this->streams[$this->current]->eof());
+ $this->streams[$this->current]->eof());
}
- public function rewind()
- {
+ public function rewind() {
$this->seek(0);
}
@@ -137,11 +128,10 @@ class AppendStream implements StreamInterface
*
* {@inheritdoc}
*/
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
if (!$this->seekable) {
throw new \RuntimeException('This AppendStream is not seekable');
- } elseif ($whence !== SEEK_SET) {
+ } else if ($whence !== SEEK_SET) {
throw new \RuntimeException('The AppendStream can only seek with SEEK_SET');
}
@@ -171,18 +161,17 @@ class AppendStream implements StreamInterface
*
* {@inheritdoc}
*/
- public function read($length)
- {
+ public function read($length) {
$buffer = '';
$total = count($this->streams) - 1;
$remaining = $length;
- $progressToNext = false;
+ $progressToNext = FALSE;
while ($remaining > 0) {
// Progress to the next stream if needed.
if ($progressToNext || $this->streams[$this->current]->eof()) {
- $progressToNext = false;
+ $progressToNext = FALSE;
if ($this->current === $total) {
break;
}
@@ -192,8 +181,8 @@ class AppendStream implements StreamInterface
$result = $this->streams[$this->current]->read($remaining);
// Using a loose comparison here to match on '', false, and null
- if ($result == null) {
- $progressToNext = true;
+ if ($result == NULL) {
+ $progressToNext = TRUE;
continue;
}
@@ -206,28 +195,23 @@ class AppendStream implements StreamInterface
return $buffer;
}
- public function isReadable()
- {
- return true;
+ public function isReadable() {
+ return TRUE;
}
- public function isWritable()
- {
- return false;
+ public function isWritable() {
+ return FALSE;
}
- public function isSeekable()
- {
+ public function isSeekable() {
return $this->seekable;
}
- public function write($string)
- {
+ public function write($string) {
throw new \RuntimeException('Cannot write to an AppendStream');
}
- public function getMetadata($key = null)
- {
- return $key ? null : [];
+ public function getMetadata($key = NULL) {
+ return $key ? NULL : [];
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/BufferStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/BufferStream.php
index af4d4c2..ab21e27 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/BufferStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/BufferStream.php
@@ -1,4 +1,5 @@
hwm = $hwm;
}
- public function __toString()
- {
+ public function __toString() {
return $this->getContents();
}
- public function getContents()
- {
+ public function getContents() {
$buffer = $this->buffer;
$this->buffer = '';
return $buffer;
}
- public function close()
- {
+ public function close() {
$this->buffer = '';
}
- public function detach()
- {
+ public function detach() {
$this->close();
}
- public function getSize()
- {
+ public function getSize() {
return strlen($this->buffer);
}
- public function isReadable()
- {
- return true;
+ public function isReadable() {
+ return TRUE;
}
- public function isWritable()
- {
- return true;
+ public function isWritable() {
+ return TRUE;
}
- public function isSeekable()
- {
- return false;
+ public function isSeekable() {
+ return FALSE;
}
- public function rewind()
- {
+ public function rewind() {
$this->seek(0);
}
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
throw new \RuntimeException('Cannot seek a BufferStream');
}
- public function eof()
- {
+ public function eof() {
return strlen($this->buffer) === 0;
}
- public function tell()
- {
+ public function tell() {
throw new \RuntimeException('Cannot determine the position of a BufferStream');
}
/**
* Reads data from the buffer.
*/
- public function read($length)
- {
+ public function read($length) {
$currentLength = strlen($this->buffer);
if ($length >= $currentLength) {
@@ -114,24 +101,22 @@ class BufferStream implements StreamInterface
/**
* Writes data to the buffer.
*/
- public function write($string)
- {
+ public function write($string) {
$this->buffer .= $string;
// TODO: What should happen here?
if (strlen($this->buffer) >= $this->hwm) {
- return false;
+ return FALSE;
}
return strlen($string);
}
- public function getMetadata($key = null)
- {
+ public function getMetadata($key = NULL) {
if ($key == 'hwm') {
return $this->hwm;
}
- return $key ? null : [];
+ return $key ? NULL : [];
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/CachingStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/CachingStream.php
index ed68f08..4bd0846 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/CachingStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/CachingStream.php
@@ -1,4 +1,5 @@
remoteStream = $stream;
$this->stream = $target ?: new Stream(fopen('php://temp', 'r+'));
}
- public function getSize()
- {
+ public function getSize() {
return max($this->stream->getSize(), $this->remoteStream->getSize());
}
- public function rewind()
- {
+ public function rewind() {
$this->seek(0);
}
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
if ($whence == SEEK_SET) {
$byte = $offset;
- } elseif ($whence == SEEK_CUR) {
+ } else if ($whence == SEEK_CUR) {
$byte = $offset + $this->tell();
- } elseif ($whence == SEEK_END) {
+ } else if ($whence == SEEK_END) {
$size = $this->remoteStream->getSize();
- if ($size === null) {
+ if ($size === NULL) {
$size = $this->cacheEntireStream();
}
$byte = $size + $offset;
@@ -72,8 +70,7 @@ class CachingStream implements StreamInterface
}
}
- public function read($length)
- {
+ public function read($length) {
// Perform a regular read on any previously read data from the buffer
$data = $this->stream->read($length);
$remaining = $length - strlen($data);
@@ -101,8 +98,7 @@ class CachingStream implements StreamInterface
return $data;
}
- public function write($string)
- {
+ public function write($string) {
// When appending to the end of the currently read stream, you'll want
// to skip bytes from being read from the remote stream to emulate
// other stream wrappers. Basically replacing bytes of data of a fixed
@@ -115,21 +111,18 @@ class CachingStream implements StreamInterface
return $this->stream->write($string);
}
- public function eof()
- {
+ public function eof() {
return $this->stream->eof() && $this->remoteStream->eof();
}
/**
* Close both the remote stream and buffer stream
*/
- public function close()
- {
+ public function close() {
$this->remoteStream->close() && $this->stream->close();
}
- private function cacheEntireStream()
- {
+ private function cacheEntireStream() {
$target = new FnStream(['write' => 'strlen']);
copy_to_stream($this, $target);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/DroppingStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/DroppingStream.php
index 8935c80..52dea6f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/DroppingStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/DroppingStream.php
@@ -1,4 +1,5 @@
stream = $stream;
$this->maxLength = $maxLength;
}
- public function write($string)
- {
+ public function write($string) {
$diff = $this->maxLength - $this->stream->getSize();
// Begin returning 0 when the underlying stream is too large.
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/FnStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/FnStream.php
index cc9b445..1b6a898 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/FnStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/FnStream.php
@@ -1,4 +1,5 @@
methods = $methods;
// Create the functions on the class
@@ -36,8 +36,7 @@ class FnStream implements StreamInterface
* Lazily determine which methods are not implemented.
* @throws \BadMethodCallException
*/
- public function __get($name)
- {
+ public function __get($name) {
throw new \BadMethodCallException(str_replace('_fn_', '', $name)
. '() is not implemented in the FnStream');
}
@@ -45,8 +44,7 @@ class FnStream implements StreamInterface
/**
* The close method is called on the underlying stream only if possible.
*/
- public function __destruct()
- {
+ public function __destruct() {
if (isset($this->_fn_close)) {
call_user_func($this->_fn_close);
}
@@ -56,13 +54,12 @@ class FnStream implements StreamInterface
* Adds custom functionality to an underlying stream by intercepting
* specific method calls.
*
- * @param StreamInterface $stream Stream to decorate
- * @param array $methods Hash of method name to a closure
+ * @param StreamInterface $stream Stream to decorate
+ * @param array $methods Hash of method name to a closure
*
* @return FnStream
*/
- public static function decorate(StreamInterface $stream, array $methods)
- {
+ public static function decorate(StreamInterface $stream, array $methods) {
// If any of the required methods were not provided, then simply
// proxy to the decorated stream.
foreach (array_diff(self::$slots, array_keys($methods)) as $diff) {
@@ -72,78 +69,63 @@ class FnStream implements StreamInterface
return new self($methods);
}
- public function __toString()
- {
+ public function __toString() {
return call_user_func($this->_fn___toString);
}
- public function close()
- {
+ public function close() {
return call_user_func($this->_fn_close);
}
- public function detach()
- {
+ public function detach() {
return call_user_func($this->_fn_detach);
}
- public function getSize()
- {
+ public function getSize() {
return call_user_func($this->_fn_getSize);
}
- public function tell()
- {
+ public function tell() {
return call_user_func($this->_fn_tell);
}
- public function eof()
- {
+ public function eof() {
return call_user_func($this->_fn_eof);
}
- public function isSeekable()
- {
+ public function isSeekable() {
return call_user_func($this->_fn_isSeekable);
}
- public function rewind()
- {
+ public function rewind() {
call_user_func($this->_fn_rewind);
}
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
call_user_func($this->_fn_seek, $offset, $whence);
}
- public function isWritable()
- {
+ public function isWritable() {
return call_user_func($this->_fn_isWritable);
}
- public function write($string)
- {
+ public function write($string) {
return call_user_func($this->_fn_write, $string);
}
- public function isReadable()
- {
+ public function isReadable() {
return call_user_func($this->_fn_isReadable);
}
- public function read($length)
- {
+ public function read($length) {
return call_user_func($this->_fn_read, $length);
}
- public function getContents()
- {
+ public function getContents() {
return call_user_func($this->_fn_getContents);
}
- public function getMetadata($key = null)
- {
+ public function getMetadata($key = NULL) {
return call_user_func($this->_fn_getMetadata, $key);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/InflateStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/InflateStream.php
index 0051d3f..a3e9731 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/InflateStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/InflateStream.php
@@ -1,4 +1,5 @@
read(10);
$filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header);
@@ -35,8 +35,7 @@ class InflateStream implements StreamInterface
* @param $header
* @return int
*/
- private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header)
- {
+ private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) {
$filename_header_length = 0;
if (substr(bin2hex($header), 6, 2) === '08') {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
index 02cec3a..487f7a3 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LazyOpenStream.php
@@ -1,4 +1,5 @@
filename = $filename;
$this->mode = $mode;
}
@@ -32,8 +32,7 @@ class LazyOpenStream implements StreamInterface
*
* @return StreamInterface
*/
- protected function createStream()
- {
+ protected function createStream() {
return stream_for(try_fopen($this->filename, $this->mode));
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LimitStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LimitStream.php
index 3c13d4f..f5332d1 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LimitStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/LimitStream.php
@@ -1,4 +1,5 @@
setOffset($offset);
}
- public function eof()
- {
+ public function eof() {
// Always return true if the underlying stream is EOF
if ($this->stream->eof()) {
- return true;
+ return TRUE;
}
// No limit and the underlying stream is not at EOF
if ($this->limit == -1) {
- return false;
+ return FALSE;
}
return $this->stream->tell() >= $this->offset + $this->limit;
@@ -53,11 +53,10 @@ class LimitStream implements StreamInterface
* Returns the size of the limited subset of data
* {@inheritdoc}
*/
- public function getSize()
- {
- if (null === ($length = $this->stream->getSize())) {
- return null;
- } elseif ($this->limit == -1) {
+ public function getSize() {
+ if (NULL === ($length = $this->stream->getSize())) {
+ return NULL;
+ } else if ($this->limit == -1) {
return $length - $this->offset;
} else {
return min($this->limit, $length - $this->offset);
@@ -68,8 +67,7 @@ class LimitStream implements StreamInterface
* Allow for a bounded seek on the read limited stream
* {@inheritdoc}
*/
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
if ($whence !== SEEK_SET || $offset < 0) {
throw new \RuntimeException(sprintf(
'Cannot seek to offset % with whence %s',
@@ -93,8 +91,7 @@ class LimitStream implements StreamInterface
* Give a relative tell()
* {@inheritdoc}
*/
- public function tell()
- {
+ public function tell() {
return $this->stream->tell() - $this->offset;
}
@@ -105,15 +102,14 @@ class LimitStream implements StreamInterface
*
* @throws \RuntimeException if the stream cannot be seeked.
*/
- public function setOffset($offset)
- {
+ public function setOffset($offset) {
$current = $this->stream->tell();
if ($current !== $offset) {
// If the stream cannot seek to the offset position, then read to it
if ($this->stream->isSeekable()) {
$this->stream->seek($offset);
- } elseif ($current > $offset) {
+ } else if ($current > $offset) {
throw new \RuntimeException("Could not seek to stream offset $offset");
} else {
$this->stream->read($offset - $current);
@@ -130,13 +126,11 @@ class LimitStream implements StreamInterface
* @param int $limit Number of bytes to allow to be read from the stream.
* Use -1 for no limit.
*/
- public function setLimit($limit)
- {
+ public function setLimit($limit) {
$this->limit = $limit;
}
- public function read($length)
- {
+ public function read($length) {
if ($this->limit == -1) {
return $this->stream->read($length);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MessageTrait.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MessageTrait.php
index 1e4da64..01b61c4 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MessageTrait.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MessageTrait.php
@@ -1,4 +1,5 @@
original name at registration */
- private $headerNames = [];
+ private $headerNames = [];
/** @var string */
private $protocol = '1.1';
@@ -20,13 +21,11 @@ trait MessageTrait
/** @var StreamInterface */
private $stream;
- public function getProtocolVersion()
- {
+ public function getProtocolVersion() {
return $this->protocol;
}
- public function withProtocolVersion($version)
- {
+ public function withProtocolVersion($version) {
if ($this->protocol === $version) {
return $this;
}
@@ -36,18 +35,15 @@ trait MessageTrait
return $new;
}
- public function getHeaders()
- {
+ public function getHeaders() {
return $this->headers;
}
- public function hasHeader($header)
- {
+ public function hasHeader($header) {
return isset($this->headerNames[strtolower($header)]);
}
- public function getHeader($header)
- {
+ public function getHeader($header) {
$header = strtolower($header);
if (!isset($this->headerNames[$header])) {
@@ -59,13 +55,11 @@ trait MessageTrait
return $this->headers[$header];
}
- public function getHeaderLine($header)
- {
+ public function getHeaderLine($header) {
return implode(', ', $this->getHeader($header));
}
- public function withHeader($header, $value)
- {
+ public function withHeader($header, $value) {
if (!is_array($value)) {
$value = [$value];
}
@@ -83,8 +77,7 @@ trait MessageTrait
return $new;
}
- public function withAddedHeader($header, $value)
- {
+ public function withAddedHeader($header, $value) {
if (!is_array($value)) {
$value = [$value];
}
@@ -104,8 +97,7 @@ trait MessageTrait
return $new;
}
- public function withoutHeader($header)
- {
+ public function withoutHeader($header) {
$normalized = strtolower($header);
if (!isset($this->headerNames[$normalized])) {
@@ -120,8 +112,7 @@ trait MessageTrait
return $new;
}
- public function getBody()
- {
+ public function getBody() {
if (!$this->stream) {
$this->stream = stream_for('');
}
@@ -129,8 +120,7 @@ trait MessageTrait
return $this->stream;
}
- public function withBody(StreamInterface $body)
- {
+ public function withBody(StreamInterface $body) {
if ($body === $this->stream) {
return $this;
}
@@ -140,8 +130,7 @@ trait MessageTrait
return $new;
}
- private function setHeaders(array $headers)
- {
+ private function setHeaders(array $headers) {
$this->headerNames = $this->headers = [];
foreach ($headers as $header => $value) {
if (!is_array($value)) {
@@ -174,8 +163,7 @@ trait MessageTrait
*
* @see https://tools.ietf.org/html/rfc7230#section-3.2.4
*/
- private function trimHeaderValues(array $values)
- {
+ private function trimHeaderValues(array $values) {
return array_map(function ($value) {
return trim($value, " \t");
}, $values);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MultipartStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MultipartStream.php
index c0fd584..1e6ddc6 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MultipartStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -1,4 +1,5 @@
boundary = $boundary ?: sha1(uniqid('', true));
+ public function __construct(array $elements = [], $boundary = NULL) {
+ $this->boundary = $boundary ?: sha1(uniqid('', TRUE));
$this->stream = $this->createStream($elements);
}
@@ -36,21 +36,18 @@ class MultipartStream implements StreamInterface
*
* @return string
*/
- public function getBoundary()
- {
+ public function getBoundary() {
return $this->boundary;
}
- public function isWritable()
- {
- return false;
+ public function isWritable() {
+ return FALSE;
}
/**
* Get the headers needed before transferring the content of a POST file
*/
- private function getHeaders(array $headers)
- {
+ private function getHeaders(array $headers) {
$str = '';
foreach ($headers as $key => $value) {
$str .= "{$key}: {$value}\r\n";
@@ -62,8 +59,7 @@ class MultipartStream implements StreamInterface
/**
* Create the aggregate stream that will be used to upload the POST data
*/
- protected function createStream(array $elements)
- {
+ protected function createStream(array $elements) {
$stream = new AppendStream();
foreach ($elements as $element) {
@@ -76,8 +72,7 @@ class MultipartStream implements StreamInterface
return $stream;
}
- private function addElement(AppendStream $stream, array $element)
- {
+ private function addElement(AppendStream $stream, array $element) {
foreach (['contents', 'name'] as $key) {
if (!array_key_exists($key, $element)) {
throw new \InvalidArgumentException("A '{$key}' key is required");
@@ -96,7 +91,7 @@ class MultipartStream implements StreamInterface
list($body, $headers) = $this->createElement(
$element['name'],
$element['contents'],
- isset($element['filename']) ? $element['filename'] : null,
+ isset($element['filename']) ? $element['filename'] : NULL,
isset($element['headers']) ? $element['headers'] : []
);
@@ -108,8 +103,7 @@ class MultipartStream implements StreamInterface
/**
* @return array
*/
- private function createElement($name, StreamInterface $stream, $filename, array $headers)
- {
+ private function createElement($name, StreamInterface $stream, $filename, array $headers) {
// Set a default content-disposition header if one was no provided
$disposition = $this->getHeader($headers, 'content-disposition');
if (!$disposition) {
@@ -124,7 +118,7 @@ class MultipartStream implements StreamInterface
$length = $this->getHeader($headers, 'content-length');
if (!$length) {
if ($length = $stream->getSize()) {
- $headers['Content-Length'] = (string) $length;
+ $headers['Content-Length'] = (string)$length;
}
}
@@ -139,8 +133,7 @@ class MultipartStream implements StreamInterface
return [$stream, $headers];
}
- private function getHeader(array $headers, $key)
- {
+ private function getHeader(array $headers, $key) {
$lowercaseHeader = strtolower($key);
foreach ($headers as $k => $v) {
if (strtolower($k) === $lowercaseHeader) {
@@ -148,6 +141,6 @@ class MultipartStream implements StreamInterface
}
}
- return null;
+ return NULL;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/NoSeekStream.php
index 2332218..ebe6994 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/NoSeekStream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/NoSeekStream.php
@@ -1,4 +1,5 @@
source = $source;
- $this->size = isset($options['size']) ? $options['size'] : null;
+ $this->size = isset($options['size']) ? $options['size'] : NULL;
$this->metadata = isset($options['metadata']) ? $options['metadata'] : [];
$this->buffer = new BufferStream();
}
- public function __toString()
- {
+ public function __toString() {
try {
return copy_to_string($this);
} catch (\Exception $e) {
@@ -57,64 +56,52 @@ class PumpStream implements StreamInterface
}
}
- public function close()
- {
+ public function close() {
$this->detach();
}
- public function detach()
- {
- $this->tellPos = false;
- $this->source = null;
+ public function detach() {
+ $this->tellPos = FALSE;
+ $this->source = NULL;
}
- public function getSize()
- {
+ public function getSize() {
return $this->size;
}
- public function tell()
- {
+ public function tell() {
return $this->tellPos;
}
- public function eof()
- {
+ public function eof() {
return !$this->source;
}
- public function isSeekable()
- {
- return false;
+ public function isSeekable() {
+ return FALSE;
}
- public function rewind()
- {
+ public function rewind() {
$this->seek(0);
}
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
throw new \RuntimeException('Cannot seek a PumpStream');
}
- public function isWritable()
- {
- return false;
+ public function isWritable() {
+ return FALSE;
}
- public function write($string)
- {
+ public function write($string) {
throw new \RuntimeException('Cannot write to a PumpStream');
}
- public function isReadable()
- {
- return true;
+ public function isReadable() {
+ return TRUE;
}
- public function read($length)
- {
+ public function read($length) {
$data = $this->buffer->read($length);
$readLen = strlen($data);
$this->tellPos += $readLen;
@@ -129,8 +116,7 @@ class PumpStream implements StreamInterface
return $data;
}
- public function getContents()
- {
+ public function getContents() {
$result = '';
while (!$this->eof()) {
$result .= $this->read(1000000);
@@ -139,22 +125,20 @@ class PumpStream implements StreamInterface
return $result;
}
- public function getMetadata($key = null)
- {
+ public function getMetadata($key = NULL) {
if (!$key) {
return $this->metadata;
}
- return isset($this->metadata[$key]) ? $this->metadata[$key] : null;
+ return isset($this->metadata[$key]) ? $this->metadata[$key] : NULL;
}
- private function pump($length)
- {
+ private function pump($length) {
if ($this->source) {
do {
$data = call_user_func($this->source, $length);
- if ($data === false || $data === null) {
- $this->source = null;
+ if ($data === FALSE || $data === NULL) {
+ $this->source = NULL;
return;
}
$this->buffer->write($data);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Request.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Request.php
index 0828548..00fa21e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Request.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Request.php
@@ -1,4 +1,5 @@
updateHostFromUri();
}
- if ($body !== '' && $body !== null) {
+ if ($body !== '' && $body !== NULL) {
$this->stream = stream_for($body);
}
}
- public function getRequestTarget()
- {
- if ($this->requestTarget !== null) {
+ public function getRequestTarget() {
+ if ($this->requestTarget !== NULL) {
return $this->requestTarget;
}
@@ -71,8 +71,7 @@ class Request implements RequestInterface
return $target;
}
- public function withRequestTarget($requestTarget)
- {
+ public function withRequestTarget($requestTarget) {
if (preg_match('#\s#', $requestTarget)) {
throw new InvalidArgumentException(
'Invalid request target provided; cannot contain whitespace'
@@ -84,25 +83,21 @@ class Request implements RequestInterface
return $new;
}
- public function getMethod()
- {
+ public function getMethod() {
return $this->method;
}
- public function withMethod($method)
- {
+ public function withMethod($method) {
$new = clone $this;
$new->method = strtoupper($method);
return $new;
}
- public function getUri()
- {
+ public function getUri() {
return $this->uri;
}
- public function withUri(UriInterface $uri, $preserveHost = false)
- {
+ public function withUri(UriInterface $uri, $preserveHost = FALSE) {
if ($uri === $this->uri) {
return $this;
}
@@ -117,15 +112,14 @@ class Request implements RequestInterface
return $new;
}
- private function updateHostFromUri()
- {
+ private function updateHostFromUri() {
$host = $this->uri->getHost();
if ($host == '') {
return;
}
- if (($port = $this->uri->getPort()) !== null) {
+ if (($port = $this->uri->getPort()) !== NULL) {
$host .= ':' . $port;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Response.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Response.php
index 2830c6c..cbec573 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Response.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Response.php
@@ -1,4 +1,5 @@
statusCode = (int) $status;
+ $this->statusCode = (int)$status;
- if ($body !== '' && $body !== null) {
+ if ($body !== '' && $body !== NULL) {
$this->stream = stream_for($body);
}
@@ -103,26 +104,23 @@ class Response implements ResponseInterface
if ($reason == '' && isset(self::$phrases[$this->statusCode])) {
$this->reasonPhrase = self::$phrases[$this->statusCode];
} else {
- $this->reasonPhrase = (string) $reason;
+ $this->reasonPhrase = (string)$reason;
}
$this->protocol = $version;
}
- public function getStatusCode()
- {
+ public function getStatusCode() {
return $this->statusCode;
}
- public function getReasonPhrase()
- {
+ public function getReasonPhrase() {
return $this->reasonPhrase;
}
- public function withStatus($code, $reasonPhrase = '')
- {
+ public function withStatus($code, $reasonPhrase = '') {
$new = clone $this;
- $new->statusCode = (int) $code;
+ $new->statusCode = (int)$code;
if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
$reasonPhrase = self::$phrases[$new->statusCode];
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/ServerRequest.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/ServerRequest.php
index 575aab8..66a3fbf 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/ServerRequest.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/ServerRequest.php
@@ -55,18 +55,18 @@ class ServerRequest extends Request implements ServerRequestInterface
private $uploadedFiles = [];
/**
- * @param string $method HTTP method
- * @param string|UriInterface $uri URI
- * @param array $headers Request headers
- * @param string|null|resource|StreamInterface $body Request body
- * @param string $version Protocol version
- * @param array $serverParams Typically the $_SERVER superglobal
+ * @param string $method HTTP method
+ * @param string|UriInterface $uri URI
+ * @param array $headers Request headers
+ * @param string|null|resource|StreamInterface $body Request body
+ * @param string $version Protocol version
+ * @param array $serverParams Typically the $_SERVER superglobal
*/
public function __construct(
$method,
$uri,
array $headers = [],
- $body = null,
+ $body = NULL,
$version = '1.1',
array $serverParams = []
) {
@@ -82,16 +82,15 @@ class ServerRequest extends Request implements ServerRequestInterface
* @throws InvalidArgumentException for unrecognized values
* @return array
*/
- public static function normalizeFiles(array $files)
- {
+ public static function normalizeFiles(array $files) {
$normalized = [];
foreach ($files as $key => $value) {
if ($value instanceof UploadedFileInterface) {
$normalized[$key] = $value;
- } elseif (is_array($value) && isset($value['tmp_name'])) {
+ } else if (is_array($value) && isset($value['tmp_name'])) {
$normalized[$key] = self::createUploadedFileFromSpec($value);
- } elseif (is_array($value)) {
+ } else if (is_array($value)) {
$normalized[$key] = self::normalizeFiles($value);
continue;
} else {
@@ -111,16 +110,15 @@ class ServerRequest extends Request implements ServerRequestInterface
* @param array $value $_FILES struct
* @return array|UploadedFileInterface
*/
- private static function createUploadedFileFromSpec(array $value)
- {
+ private static function createUploadedFileFromSpec(array $value) {
if (is_array($value['tmp_name'])) {
return self::normalizeNestedFileSpec($value);
}
return new UploadedFile(
$value['tmp_name'],
- (int) $value['size'],
- (int) $value['error'],
+ (int)$value['size'],
+ (int)$value['error'],
$value['name'],
$value['type']
);
@@ -135,17 +133,16 @@ class ServerRequest extends Request implements ServerRequestInterface
* @param array $files
* @return UploadedFileInterface[]
*/
- private static function normalizeNestedFileSpec(array $files = [])
- {
+ private static function normalizeNestedFileSpec(array $files = []) {
$normalizedFiles = [];
foreach (array_keys($files['tmp_name']) as $key) {
$spec = [
'tmp_name' => $files['tmp_name'][$key],
- 'size' => $files['size'][$key],
- 'error' => $files['error'][$key],
- 'name' => $files['name'][$key],
- 'type' => $files['type'][$key],
+ 'size' => $files['size'][$key],
+ 'error' => $files['error'][$key],
+ 'name' => $files['name'][$key],
+ 'type' => $files['type'][$key],
];
$normalizedFiles[$key] = self::createUploadedFileFromSpec($spec);
}
@@ -163,8 +160,7 @@ class ServerRequest extends Request implements ServerRequestInterface
*
* @return ServerRequestInterface
*/
- public static function fromGlobals()
- {
+ public static function fromGlobals() {
$method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
$headers = function_exists('getallheaders') ? getallheaders() : [];
$uri = self::getUriFromGlobals();
@@ -190,17 +186,17 @@ class ServerRequest extends Request implements ServerRequestInterface
$uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http');
- $hasPort = false;
+ $hasPort = FALSE;
if (isset($_SERVER['HTTP_HOST'])) {
$hostHeaderParts = explode(':', $_SERVER['HTTP_HOST']);
$uri = $uri->withHost($hostHeaderParts[0]);
if (isset($hostHeaderParts[1])) {
- $hasPort = true;
+ $hasPort = TRUE;
$uri = $uri->withPort($hostHeaderParts[1]);
}
- } elseif (isset($_SERVER['SERVER_NAME'])) {
+ } else if (isset($_SERVER['SERVER_NAME'])) {
$uri = $uri->withHost($_SERVER['SERVER_NAME']);
- } elseif (isset($_SERVER['SERVER_ADDR'])) {
+ } else if (isset($_SERVER['SERVER_ADDR'])) {
$uri = $uri->withHost($_SERVER['SERVER_ADDR']);
}
@@ -208,12 +204,12 @@ class ServerRequest extends Request implements ServerRequestInterface
$uri = $uri->withPort($_SERVER['SERVER_PORT']);
}
- $hasQuery = false;
+ $hasQuery = FALSE;
if (isset($_SERVER['REQUEST_URI'])) {
$requestUriParts = explode('?', $_SERVER['REQUEST_URI']);
$uri = $uri->withPath($requestUriParts[0]);
if (isset($requestUriParts[1])) {
- $hasQuery = true;
+ $hasQuery = TRUE;
$uri = $uri->withQuery($requestUriParts[1]);
}
}
@@ -229,24 +225,21 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* {@inheritdoc}
*/
- public function getServerParams()
- {
+ public function getServerParams() {
return $this->serverParams;
}
/**
* {@inheritdoc}
*/
- public function getUploadedFiles()
- {
+ public function getUploadedFiles() {
return $this->uploadedFiles;
}
/**
* {@inheritdoc}
*/
- public function withUploadedFiles(array $uploadedFiles)
- {
+ public function withUploadedFiles(array $uploadedFiles) {
$new = clone $this;
$new->uploadedFiles = $uploadedFiles;
@@ -256,16 +249,14 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* {@inheritdoc}
*/
- public function getCookieParams()
- {
+ public function getCookieParams() {
return $this->cookieParams;
}
/**
* {@inheritdoc}
*/
- public function withCookieParams(array $cookies)
- {
+ public function withCookieParams(array $cookies) {
$new = clone $this;
$new->cookieParams = $cookies;
@@ -275,16 +266,14 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* {@inheritdoc}
*/
- public function getQueryParams()
- {
+ public function getQueryParams() {
return $this->queryParams;
}
/**
* {@inheritdoc}
*/
- public function withQueryParams(array $query)
- {
+ public function withQueryParams(array $query) {
$new = clone $this;
$new->queryParams = $query;
@@ -294,16 +283,14 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* {@inheritdoc}
*/
- public function getParsedBody()
- {
+ public function getParsedBody() {
return $this->parsedBody;
}
/**
* {@inheritdoc}
*/
- public function withParsedBody($data)
- {
+ public function withParsedBody($data) {
$new = clone $this;
$new->parsedBody = $data;
@@ -313,17 +300,15 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* {@inheritdoc}
*/
- public function getAttributes()
- {
+ public function getAttributes() {
return $this->attributes;
}
/**
* {@inheritdoc}
*/
- public function getAttribute($attribute, $default = null)
- {
- if (false === array_key_exists($attribute, $this->attributes)) {
+ public function getAttribute($attribute, $default = NULL) {
+ if (FALSE === array_key_exists($attribute, $this->attributes)) {
return $default;
}
@@ -333,8 +318,7 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* {@inheritdoc}
*/
- public function withAttribute($attribute, $value)
- {
+ public function withAttribute($attribute, $value) {
$new = clone $this;
$new->attributes[$attribute] = $value;
@@ -344,9 +328,8 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* {@inheritdoc}
*/
- public function withoutAttribute($attribute)
- {
- if (false === array_key_exists($attribute, $this->attributes)) {
+ public function withoutAttribute($attribute) {
+ if (FALSE === array_key_exists($attribute, $this->attributes)) {
return $this;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Stream.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Stream.php
index e336628..212c3d5 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Stream.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Stream.php
@@ -1,4 +1,5 @@
[
- 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true,
- 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true,
- 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true,
- 'x+t' => true, 'c+t' => true, 'a+' => true
+ 'r' => TRUE, 'w+' => TRUE, 'r+' => TRUE, 'x+' => TRUE, 'c+' => TRUE,
+ 'rb' => TRUE, 'w+b' => TRUE, 'r+b' => TRUE, 'x+b' => TRUE,
+ 'c+b' => TRUE, 'rt' => TRUE, 'w+t' => TRUE, 'r+t' => TRUE,
+ 'x+t' => TRUE, 'c+t' => TRUE, 'a+' => TRUE
],
'write' => [
- 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true,
- 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true,
- 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true,
- 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true
+ 'w' => TRUE, 'w+' => TRUE, 'rw' => TRUE, 'r+' => TRUE, 'x+' => TRUE,
+ 'c+' => TRUE, 'wb' => TRUE, 'w+b' => TRUE, 'r+b' => TRUE,
+ 'x+b' => TRUE, 'c+b' => TRUE, 'w+t' => TRUE, 'r+t' => TRUE,
+ 'x+t' => TRUE, 'c+t' => TRUE, 'a' => TRUE, 'a+' => TRUE
]
];
@@ -43,13 +44,12 @@ class Stream implements StreamInterface
* - metadata: (array) Any additional metadata to return when the metadata
* of the stream is accessed.
*
- * @param resource $stream Stream resource to wrap.
- * @param array $options Associative array of options.
+ * @param resource $stream Stream resource to wrap.
+ * @param array $options Associative array of options.
*
* @throws \InvalidArgumentException if the stream is not a stream resource
*/
- public function __construct($stream, $options = [])
- {
+ public function __construct($stream, $options = []) {
if (!is_resource($stream)) {
throw new \InvalidArgumentException('Stream must be a resource');
}
@@ -70,8 +70,7 @@ class Stream implements StreamInterface
$this->uri = $this->getMetadata('uri');
}
- public function __get($name)
- {
+ public function __get($name) {
if ($name == 'stream') {
throw new \RuntimeException('The stream is detached');
}
@@ -82,34 +81,30 @@ class Stream implements StreamInterface
/**
* Closes the stream when the destructed
*/
- public function __destruct()
- {
+ public function __destruct() {
$this->close();
}
- public function __toString()
- {
+ public function __toString() {
try {
$this->seek(0);
- return (string) stream_get_contents($this->stream);
+ return (string)stream_get_contents($this->stream);
} catch (\Exception $e) {
return '';
}
}
- public function getContents()
- {
+ public function getContents() {
$contents = stream_get_contents($this->stream);
- if ($contents === false) {
+ if ($contents === FALSE) {
throw new \RuntimeException('Unable to read stream contents');
}
return $contents;
}
- public function close()
- {
+ public function close() {
if (isset($this->stream)) {
if (is_resource($this->stream)) {
fclose($this->stream);
@@ -118,33 +113,31 @@ class Stream implements StreamInterface
}
}
- public function detach()
- {
+ public function detach() {
if (!isset($this->stream)) {
- return null;
+ return NULL;
}
$result = $this->stream;
unset($this->stream);
- $this->size = $this->uri = null;
- $this->readable = $this->writable = $this->seekable = false;
+ $this->size = $this->uri = NULL;
+ $this->readable = $this->writable = $this->seekable = FALSE;
return $result;
}
- public function getSize()
- {
- if ($this->size !== null) {
+ public function getSize() {
+ if ($this->size !== NULL) {
return $this->size;
}
if (!isset($this->stream)) {
- return null;
+ return NULL;
}
// Clear the stat cache if the stream has a URI
if ($this->uri) {
- clearstatcache(true, $this->uri);
+ clearstatcache(TRUE, $this->uri);
}
$stats = fstat($this->stream);
@@ -153,57 +146,49 @@ class Stream implements StreamInterface
return $this->size;
}
- return null;
+ return NULL;
}
- public function isReadable()
- {
+ public function isReadable() {
return $this->readable;
}
- public function isWritable()
- {
+ public function isWritable() {
return $this->writable;
}
- public function isSeekable()
- {
+ public function isSeekable() {
return $this->seekable;
}
- public function eof()
- {
+ public function eof() {
return !$this->stream || feof($this->stream);
}
- public function tell()
- {
+ public function tell() {
$result = ftell($this->stream);
- if ($result === false) {
+ if ($result === FALSE) {
throw new \RuntimeException('Unable to determine stream position');
}
return $result;
}
- public function rewind()
- {
+ public function rewind() {
$this->seek(0);
}
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
if (!$this->seekable) {
throw new \RuntimeException('Stream is not seekable');
- } elseif (fseek($this->stream, $offset, $whence) === -1) {
+ } else if (fseek($this->stream, $offset, $whence) === -1) {
throw new \RuntimeException('Unable to seek to stream position '
- . $offset . ' with whence ' . var_export($whence, true));
+ . $offset . ' with whence ' . var_export($whence, TRUE));
}
}
- public function read($length)
- {
+ public function read($length) {
if (!$this->readable) {
throw new \RuntimeException('Cannot read from non-readable stream');
}
@@ -216,42 +201,40 @@ class Stream implements StreamInterface
}
$string = fread($this->stream, $length);
- if (false === $string) {
+ if (FALSE === $string) {
throw new \RuntimeException('Unable to read from stream');
}
return $string;
}
- public function write($string)
- {
+ public function write($string) {
if (!$this->writable) {
throw new \RuntimeException('Cannot write to a non-writable stream');
}
// We can't know the size after writing anything
- $this->size = null;
+ $this->size = NULL;
$result = fwrite($this->stream, $string);
- if ($result === false) {
+ if ($result === FALSE) {
throw new \RuntimeException('Unable to write to stream');
}
return $result;
}
- public function getMetadata($key = null)
- {
+ public function getMetadata($key = NULL) {
if (!isset($this->stream)) {
- return $key ? null : [];
- } elseif (!$key) {
+ return $key ? NULL : [];
+ } else if (!$key) {
return $this->customMetadata + stream_get_meta_data($this->stream);
- } elseif (isset($this->customMetadata[$key])) {
+ } else if (isset($this->customMetadata[$key])) {
return $this->customMetadata[$key];
}
$meta = stream_get_meta_data($this->stream);
- return isset($meta[$key]) ? $meta[$key] : null;
+ return isset($meta[$key]) ? $meta[$key] : NULL;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
index daec6f5..e0eb00e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
@@ -1,4 +1,5 @@
stream = $stream;
}
@@ -25,8 +25,7 @@ trait StreamDecoratorTrait
*
* @return StreamInterface
*/
- public function __get($name)
- {
+ public function __get($name) {
if ($name == 'stream') {
$this->stream = $this->createStream();
return $this->stream;
@@ -35,8 +34,7 @@ trait StreamDecoratorTrait
throw new \UnexpectedValueException("$name not found on class");
}
- public function __toString()
- {
+ public function __toString() {
try {
if ($this->isSeekable()) {
$this->seek(0);
@@ -45,13 +43,12 @@ trait StreamDecoratorTrait
} catch (\Exception $e) {
// Really, PHP? https://bugs.php.net/bug.php?id=53648
trigger_error('StreamDecorator::__toString exception: '
- . (string) $e, E_USER_ERROR);
+ . (string)$e, E_USER_ERROR);
return '';
}
}
- public function getContents()
- {
+ public function getContents() {
return copy_to_string($this);
}
@@ -59,80 +56,66 @@ trait StreamDecoratorTrait
* Allow decorators to implement custom methods
*
* @param string $method Missing method name
- * @param array $args Method arguments
+ * @param array $args Method arguments
*
* @return mixed
*/
- public function __call($method, array $args)
- {
+ public function __call($method, array $args) {
$result = call_user_func_array([$this->stream, $method], $args);
// Always return the wrapped object if the result is a return $this
return $result === $this->stream ? $this : $result;
}
- public function close()
- {
+ public function close() {
$this->stream->close();
}
- public function getMetadata($key = null)
- {
+ public function getMetadata($key = NULL) {
return $this->stream->getMetadata($key);
}
- public function detach()
- {
+ public function detach() {
return $this->stream->detach();
}
- public function getSize()
- {
+ public function getSize() {
return $this->stream->getSize();
}
- public function eof()
- {
+ public function eof() {
return $this->stream->eof();
}
- public function tell()
- {
+ public function tell() {
return $this->stream->tell();
}
- public function isReadable()
- {
+ public function isReadable() {
return $this->stream->isReadable();
}
- public function isWritable()
- {
+ public function isWritable() {
return $this->stream->isWritable();
}
- public function isSeekable()
- {
+ public function isSeekable() {
return $this->stream->isSeekable();
}
- public function rewind()
- {
+ public function rewind() {
$this->seek(0);
}
- public function seek($offset, $whence = SEEK_SET)
- {
+ public function seek($offset, $whence = SEEK_SET) {
$this->stream->seek($offset, $whence);
}
- public function read($length)
- {
+ public function read($length) {
return $this->stream->read($length);
}
- public function write($string)
- {
+ public function write($string) {
return $this->stream->write($string);
}
@@ -142,8 +125,7 @@ trait StreamDecoratorTrait
* @return StreamInterface
* @throws \BadMethodCallException
*/
- protected function createStream()
- {
+ protected function createStream() {
throw new \BadMethodCallException('Not implemented');
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamWrapper.php
index cf7b223..20e3458 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamWrapper.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/StreamWrapper.php
@@ -1,4 +1,5 @@
isReadable()) {
$mode = $stream->isWritable() ? 'r+' : 'r';
- } elseif ($stream->isWritable()) {
+ } else if ($stream->isWritable()) {
$mode = 'w';
} else {
throw new \InvalidArgumentException('The stream must be readable, '
. 'writable, or both.');
}
- return fopen('guzzle://stream', $mode, null, stream_context_create([
+ return fopen('guzzle://stream', $mode, NULL, stream_context_create([
'guzzle' => ['stream' => $stream]
]));
}
@@ -46,76 +46,68 @@ class StreamWrapper
/**
* Registers the stream wrapper if needed
*/
- public static function register()
- {
+ public static function register() {
if (!in_array('guzzle', stream_get_wrappers())) {
stream_wrapper_register('guzzle', __CLASS__);
}
}
- public function stream_open($path, $mode, $options, &$opened_path)
- {
+ public function stream_open($path, $mode, $options, &$opened_path) {
$options = stream_context_get_options($this->context);
if (!isset($options['guzzle']['stream'])) {
- return false;
+ return FALSE;
}
$this->mode = $mode;
$this->stream = $options['guzzle']['stream'];
- return true;
+ return TRUE;
}
- public function stream_read($count)
- {
+ public function stream_read($count) {
return $this->stream->read($count);
}
- public function stream_write($data)
- {
- return (int) $this->stream->write($data);
+ public function stream_write($data) {
+ return (int)$this->stream->write($data);
}
- public function stream_tell()
- {
+ public function stream_tell() {
return $this->stream->tell();
}
- public function stream_eof()
- {
+ public function stream_eof() {
return $this->stream->eof();
}
- public function stream_seek($offset, $whence)
- {
+ public function stream_seek($offset, $whence) {
$this->stream->seek($offset, $whence);
- return true;
+ return TRUE;
}
- public function stream_stat()
- {
+ public function stream_stat() {
static $modeMap = [
- 'r' => 33060,
+ 'r' => 33060,
'r+' => 33206,
- 'w' => 33188
+ 'w' => 33188
];
return [
- 'dev' => 0,
- 'ino' => 0,
- 'mode' => $modeMap[$this->mode],
- 'nlink' => 0,
- 'uid' => 0,
- 'gid' => 0,
- 'rdev' => 0,
- 'size' => $this->stream->getSize() ?: 0,
- 'atime' => 0,
- 'mtime' => 0,
- 'ctime' => 0,
+ 'dev' => 0,
+ 'ino' => 0,
+ 'mode' => $modeMap[$this->mode],
+ 'nlink' => 0,
+ 'uid' => 0,
+ 'gid' => 0,
+ 'rdev' => 0,
+ 'size' => $this->stream->getSize() ?: 0,
+ 'atime' => 0,
+ 'mtime' => 0,
+ 'ctime' => 0,
'blksize' => 0,
- 'blocks' => 0
+ 'blocks' => 0
];
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UploadedFile.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UploadedFile.php
index e62bd5c..7f67c34 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UploadedFile.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UploadedFile.php
@@ -1,4 +1,5 @@
setError($errorStatus);
$this->setSize($size);
@@ -87,13 +88,12 @@ class UploadedFile implements UploadedFileInterface
* @param mixed $streamOrFile
* @throws InvalidArgumentException
*/
- private function setStreamOrFile($streamOrFile)
- {
+ private function setStreamOrFile($streamOrFile) {
if (is_string($streamOrFile)) {
$this->file = $streamOrFile;
- } elseif (is_resource($streamOrFile)) {
+ } else if (is_resource($streamOrFile)) {
$this->stream = new Stream($streamOrFile);
- } elseif ($streamOrFile instanceof StreamInterface) {
+ } else if ($streamOrFile instanceof StreamInterface) {
$this->stream = $streamOrFile;
} else {
throw new InvalidArgumentException(
@@ -106,15 +106,14 @@ class UploadedFile implements UploadedFileInterface
* @param int $error
* @throws InvalidArgumentException
*/
- private function setError($error)
- {
- if (false === is_int($error)) {
+ private function setError($error) {
+ if (FALSE === is_int($error)) {
throw new InvalidArgumentException(
'Upload file error status must be an integer'
);
}
- if (false === in_array($error, UploadedFile::$errors)) {
+ if (FALSE === in_array($error, UploadedFile::$errors)) {
throw new InvalidArgumentException(
'Invalid error status for UploadedFile'
);
@@ -127,9 +126,8 @@ class UploadedFile implements UploadedFileInterface
* @param int $size
* @throws InvalidArgumentException
*/
- private function setSize($size)
- {
- if (false === is_int($size)) {
+ private function setSize($size) {
+ if (FALSE === is_int($size)) {
throw new InvalidArgumentException(
'Upload file size must be an integer'
);
@@ -142,8 +140,7 @@ class UploadedFile implements UploadedFileInterface
* @param mixed $param
* @return boolean
*/
- private function isStringOrNull($param)
- {
+ private function isStringOrNull($param) {
return in_array(gettype($param), ['string', 'NULL']);
}
@@ -151,18 +148,16 @@ class UploadedFile implements UploadedFileInterface
* @param mixed $param
* @return boolean
*/
- private function isStringNotEmpty($param)
- {
- return is_string($param) && false === empty($param);
+ private function isStringNotEmpty($param) {
+ return is_string($param) && FALSE === empty($param);
}
/**
* @param string|null $clientFilename
* @throws InvalidArgumentException
*/
- private function setClientFilename($clientFilename)
- {
- if (false === $this->isStringOrNull($clientFilename)) {
+ private function setClientFilename($clientFilename) {
+ if (FALSE === $this->isStringOrNull($clientFilename)) {
throw new InvalidArgumentException(
'Upload file client filename must be a string or null'
);
@@ -175,9 +170,8 @@ class UploadedFile implements UploadedFileInterface
* @param string|null $clientMediaType
* @throws InvalidArgumentException
*/
- private function setClientMediaType($clientMediaType)
- {
- if (false === $this->isStringOrNull($clientMediaType)) {
+ private function setClientMediaType($clientMediaType) {
+ if (FALSE === $this->isStringOrNull($clientMediaType)) {
throw new InvalidArgumentException(
'Upload file client media type must be a string or null'
);
@@ -191,25 +185,22 @@ class UploadedFile implements UploadedFileInterface
*
* @return boolean
*/
- private function isOk()
- {
+ private function isOk() {
return $this->error === UPLOAD_ERR_OK;
}
/**
* @return boolean
*/
- public function isMoved()
- {
+ public function isMoved() {
return $this->moved;
}
/**
* @throws RuntimeException if is moved or not ok
*/
- private function validateActive()
- {
- if (false === $this->isOk()) {
+ private function validateActive() {
+ if (FALSE === $this->isOk()) {
throw new RuntimeException('Cannot retrieve stream due to upload error');
}
@@ -222,8 +213,7 @@ class UploadedFile implements UploadedFileInterface
* {@inheritdoc}
* @throws RuntimeException if the upload was not successful.
*/
- public function getStream()
- {
+ public function getStream() {
$this->validateActive();
if ($this->stream instanceof StreamInterface) {
@@ -244,11 +234,10 @@ class UploadedFile implements UploadedFileInterface
* @throws RuntimeException on any error during the move operation, or on
* the second or subsequent call to the method.
*/
- public function moveTo($targetPath)
- {
+ public function moveTo($targetPath) {
$this->validateActive();
- if (false === $this->isStringNotEmpty($targetPath)) {
+ if (FALSE === $this->isStringNotEmpty($targetPath)) {
throw new InvalidArgumentException(
'Invalid path provided for move operation; must be a non-empty string'
);
@@ -264,10 +253,10 @@ class UploadedFile implements UploadedFileInterface
new LazyOpenStream($targetPath, 'w')
);
- $this->moved = true;
+ $this->moved = TRUE;
}
- if (false === $this->moved) {
+ if (FALSE === $this->moved) {
throw new RuntimeException(
sprintf('Uploaded file could not be moved to %s', $targetPath)
);
@@ -279,8 +268,7 @@ class UploadedFile implements UploadedFileInterface
*
* @return int|null The file size in bytes or null if unknown.
*/
- public function getSize()
- {
+ public function getSize() {
return $this->size;
}
@@ -290,8 +278,7 @@ class UploadedFile implements UploadedFileInterface
* @see http://php.net/manual/en/features.file-upload.errors.php
* @return int One of PHP's UPLOAD_ERR_XXX constants.
*/
- public function getError()
- {
+ public function getError() {
return $this->error;
}
@@ -301,16 +288,14 @@ class UploadedFile implements UploadedFileInterface
* @return string|null The filename sent by the client or null if none
* was provided.
*/
- public function getClientFilename()
- {
+ public function getClientFilename() {
return $this->clientFilename;
}
/**
* {@inheritdoc}
*/
- public function getClientMediaType()
- {
+ public function getClientMediaType() {
return $this->clientMediaType;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Uri.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Uri.php
index f46c1db..2869b36 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Uri.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/Uri.php
@@ -1,4 +1,5 @@
80,
+ 'http' => 80,
'https' => 443,
'ftp' => 21,
'gopher' => 70,
@@ -62,20 +63,18 @@ class Uri implements UriInterface
/**
* @param string $uri URI to parse
*/
- public function __construct($uri = '')
- {
+ public function __construct($uri = '') {
// weak type check to also accept null until we can add scalar type hints
if ($uri != '') {
$parts = parse_url($uri);
- if ($parts === false) {
+ if ($parts === FALSE) {
throw new \InvalidArgumentException("Unable to parse URI: $uri");
}
$this->applyParts($parts);
}
}
- public function __toString()
- {
+ public function __toString() {
return self::composeComponents(
$this->scheme,
$this->getAuthority(),
@@ -111,8 +110,7 @@ class Uri implements UriInterface
*
* @link https://tools.ietf.org/html/rfc3986#section-5.3
*/
- public static function composeComponents($scheme, $authority, $path, $query, $fragment)
- {
+ public static function composeComponents($scheme, $authority, $path, $query, $fragment) {
$uri = '';
// weak type checks to also accept null until we can add scalar type hints
@@ -120,7 +118,7 @@ class Uri implements UriInterface
$uri .= $scheme . ':';
}
- if ($authority != ''|| $scheme === 'file') {
+ if ($authority != '' || $scheme === 'file') {
$uri .= '//' . $authority;
}
@@ -147,9 +145,8 @@ class Uri implements UriInterface
*
* @return bool
*/
- public static function isDefaultPort(UriInterface $uri)
- {
- return $uri->getPort() === null
+ public static function isDefaultPort(UriInterface $uri) {
+ return $uri->getPort() === NULL
|| (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]);
}
@@ -171,8 +168,7 @@ class Uri implements UriInterface
* @see Uri::isRelativePathReference
* @link https://tools.ietf.org/html/rfc3986#section-4
*/
- public static function isAbsolute(UriInterface $uri)
- {
+ public static function isAbsolute(UriInterface $uri) {
return $uri->getScheme() !== '';
}
@@ -186,8 +182,7 @@ class Uri implements UriInterface
* @return bool
* @link https://tools.ietf.org/html/rfc3986#section-4.2
*/
- public static function isNetworkPathReference(UriInterface $uri)
- {
+ public static function isNetworkPathReference(UriInterface $uri) {
return $uri->getScheme() === '' && $uri->getAuthority() !== '';
}
@@ -201,8 +196,7 @@ class Uri implements UriInterface
* @return bool
* @link https://tools.ietf.org/html/rfc3986#section-4.2
*/
- public static function isAbsolutePathReference(UriInterface $uri)
- {
+ public static function isAbsolutePathReference(UriInterface $uri) {
return $uri->getScheme() === ''
&& $uri->getAuthority() === ''
&& isset($uri->getPath()[0])
@@ -219,8 +213,7 @@ class Uri implements UriInterface
* @return bool
* @link https://tools.ietf.org/html/rfc3986#section-4.2
*/
- public static function isRelativePathReference(UriInterface $uri)
- {
+ public static function isRelativePathReference(UriInterface $uri) {
return $uri->getScheme() === ''
&& $uri->getAuthority() === ''
&& (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/');
@@ -233,15 +226,14 @@ class Uri implements UriInterface
* component, identical to the base URI. When no base URI is given, only an empty
* URI reference (apart from its fragment) is considered a same-document reference.
*
- * @param UriInterface $uri The URI to check
+ * @param UriInterface $uri The URI to check
* @param UriInterface|null $base An optional base URI to compare against
*
* @return bool
* @link https://tools.ietf.org/html/rfc3986#section-4.4
*/
- public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null)
- {
- if ($base !== null) {
+ public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = NULL) {
+ if ($base !== NULL) {
$uri = UriResolver::resolve($base, $uri);
return ($uri->getScheme() === $base->getScheme())
@@ -263,24 +255,22 @@ class Uri implements UriInterface
* @deprecated since version 1.4. Use UriResolver::removeDotSegments instead.
* @see UriResolver::removeDotSegments
*/
- public static function removeDotSegments($path)
- {
+ public static function removeDotSegments($path) {
return UriResolver::removeDotSegments($path);
}
/**
* Converts the relative URI into a new URI that is resolved against the base URI.
*
- * @param UriInterface $base Base URI
- * @param string|UriInterface $rel Relative URI
+ * @param UriInterface $base Base URI
+ * @param string|UriInterface $rel Relative URI
*
* @return UriInterface
*
* @deprecated since version 1.4. Use UriResolver::resolve instead.
* @see UriResolver::resolve
*/
- public static function resolve(UriInterface $base, $rel)
- {
+ public static function resolve(UriInterface $base, $rel) {
if (!($rel instanceof UriInterface)) {
$rel = new self($rel);
}
@@ -295,12 +285,11 @@ class Uri implements UriInterface
* removed.
*
* @param UriInterface $uri URI to use as a base.
- * @param string $key Query string key to remove.
+ * @param string $key Query string key to remove.
*
* @return UriInterface
*/
- public static function withoutQueryValue(UriInterface $uri, $key)
- {
+ public static function withoutQueryValue(UriInterface $uri, $key) {
$current = $uri->getQuery();
if ($current === '') {
return $uri;
@@ -323,14 +312,13 @@ class Uri implements UriInterface
* A value of null will set the query string key without a value, e.g. "key"
* instead of "key=value".
*
- * @param UriInterface $uri URI to use as a base.
- * @param string $key Key to set.
- * @param string|null $value Value to set
+ * @param UriInterface $uri URI to use as a base.
+ * @param string $key Key to set.
+ * @param string|null $value Value to set
*
* @return UriInterface
*/
- public static function withQueryValue(UriInterface $uri, $key, $value)
- {
+ public static function withQueryValue(UriInterface $uri, $key, $value) {
$current = $uri->getQuery();
if ($current === '') {
@@ -347,7 +335,7 @@ class Uri implements UriInterface
// chars that need percent-encoding will be encoded by withQuery().
$key = strtr($key, self::$replaceQuery);
- if ($value !== null) {
+ if ($value !== NULL) {
$result[] = $key . '=' . strtr($value, self::$replaceQuery);
} else {
$result[] = $key;
@@ -366,8 +354,7 @@ class Uri implements UriInterface
*
* @throws \InvalidArgumentException If the components do not form a valid URI.
*/
- public static function fromParts(array $parts)
- {
+ public static function fromParts(array $parts) {
$uri = new self();
$uri->applyParts($parts);
$uri->validateState();
@@ -375,57 +362,48 @@ class Uri implements UriInterface
return $uri;
}
- public function getScheme()
- {
+ public function getScheme() {
return $this->scheme;
}
- public function getAuthority()
- {
+ public function getAuthority() {
$authority = $this->host;
if ($this->userInfo !== '') {
$authority = $this->userInfo . '@' . $authority;
}
- if ($this->port !== null) {
+ if ($this->port !== NULL) {
$authority .= ':' . $this->port;
}
return $authority;
}
- public function getUserInfo()
- {
+ public function getUserInfo() {
return $this->userInfo;
}
- public function getHost()
- {
+ public function getHost() {
return $this->host;
}
- public function getPort()
- {
+ public function getPort() {
return $this->port;
}
- public function getPath()
- {
+ public function getPath() {
return $this->path;
}
- public function getQuery()
- {
+ public function getQuery() {
return $this->query;
}
- public function getFragment()
- {
+ public function getFragment() {
return $this->fragment;
}
- public function withScheme($scheme)
- {
+ public function withScheme($scheme) {
$scheme = $this->filterScheme($scheme);
if ($this->scheme === $scheme) {
@@ -440,8 +418,7 @@ class Uri implements UriInterface
return $new;
}
- public function withUserInfo($user, $password = null)
- {
+ public function withUserInfo($user, $password = NULL) {
$info = $user;
if ($password != '') {
$info .= ':' . $password;
@@ -458,8 +435,7 @@ class Uri implements UriInterface
return $new;
}
- public function withHost($host)
- {
+ public function withHost($host) {
$host = $this->filterHost($host);
if ($this->host === $host) {
@@ -473,8 +449,7 @@ class Uri implements UriInterface
return $new;
}
- public function withPort($port)
- {
+ public function withPort($port) {
$port = $this->filterPort($port);
if ($this->port === $port) {
@@ -489,8 +464,7 @@ class Uri implements UriInterface
return $new;
}
- public function withPath($path)
- {
+ public function withPath($path) {
$path = $this->filterPath($path);
if ($this->path === $path) {
@@ -504,8 +478,7 @@ class Uri implements UriInterface
return $new;
}
- public function withQuery($query)
- {
+ public function withQuery($query) {
$query = $this->filterQueryAndFragment($query);
if ($this->query === $query) {
@@ -518,8 +491,7 @@ class Uri implements UriInterface
return $new;
}
- public function withFragment($fragment)
- {
+ public function withFragment($fragment) {
$fragment = $this->filterQueryAndFragment($fragment);
if ($this->fragment === $fragment) {
@@ -537,8 +509,7 @@ class Uri implements UriInterface
*
* @param array $parts Array of parse_url parts to apply.
*/
- private function applyParts(array $parts)
- {
+ private function applyParts(array $parts) {
$this->scheme = isset($parts['scheme'])
? $this->filterScheme($parts['scheme'])
: '';
@@ -548,7 +519,7 @@ class Uri implements UriInterface
: '';
$this->port = isset($parts['port'])
? $this->filterPort($parts['port'])
- : null;
+ : NULL;
$this->path = isset($parts['path'])
? $this->filterPath($parts['path'])
: '';
@@ -572,8 +543,7 @@ class Uri implements UriInterface
*
* @throws \InvalidArgumentException If the scheme is invalid.
*/
- private function filterScheme($scheme)
- {
+ private function filterScheme($scheme) {
if (!is_string($scheme)) {
throw new \InvalidArgumentException('Scheme must be a string');
}
@@ -588,8 +558,7 @@ class Uri implements UriInterface
*
* @throws \InvalidArgumentException If the host is invalid.
*/
- private function filterHost($host)
- {
+ private function filterHost($host) {
if (!is_string($host)) {
throw new \InvalidArgumentException('Host must be a string');
}
@@ -604,13 +573,12 @@ class Uri implements UriInterface
*
* @throws \InvalidArgumentException If the port is invalid.
*/
- private function filterPort($port)
- {
- if ($port === null) {
- return null;
+ private function filterPort($port) {
+ if ($port === NULL) {
+ return NULL;
}
- $port = (int) $port;
+ $port = (int)$port;
if (1 > $port || 0xffff < $port) {
throw new \InvalidArgumentException(
sprintf('Invalid port: %d. Must be between 1 and 65535', $port)
@@ -620,10 +588,9 @@ class Uri implements UriInterface
return $port;
}
- private function removeDefaultPort()
- {
- if ($this->port !== null && self::isDefaultPort($this)) {
- $this->port = null;
+ private function removeDefaultPort() {
+ if ($this->port !== NULL && self::isDefaultPort($this)) {
+ $this->port = NULL;
}
}
@@ -636,8 +603,7 @@ class Uri implements UriInterface
*
* @throws \InvalidArgumentException If the path is invalid.
*/
- private function filterPath($path)
- {
+ private function filterPath($path) {
if (!is_string($path)) {
throw new \InvalidArgumentException('Path must be a string');
}
@@ -658,8 +624,7 @@ class Uri implements UriInterface
*
* @throws \InvalidArgumentException If the query or fragment is invalid.
*/
- private function filterQueryAndFragment($str)
- {
+ private function filterQueryAndFragment($str) {
if (!is_string($str)) {
throw new \InvalidArgumentException('Query and fragment must be a string');
}
@@ -671,13 +636,11 @@ class Uri implements UriInterface
);
}
- private function rawurlencodeMatchZero(array $match)
- {
+ private function rawurlencodeMatchZero(array $match) {
return rawurlencode($match[0]);
}
- private function validateState()
- {
+ private function validateState() {
if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) {
$this->host = self::HTTP_DEFAULT_HOST;
}
@@ -686,16 +649,16 @@ class Uri implements UriInterface
if (0 === strpos($this->path, '//')) {
throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"');
}
- if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) {
+ if ($this->scheme === '' && FALSE !== strpos(explode('/', $this->path, 2)[0], ':')) {
throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon');
}
- } elseif (isset($this->path[0]) && $this->path[0] !== '/') {
+ } else if (isset($this->path[0]) && $this->path[0] !== '/') {
@trigger_error(
'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' .
'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
E_USER_DEPRECATED
);
- $this->path = '/'. $this->path;
+ $this->path = '/' . $this->path;
//throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty');
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriNormalizer.php
index 384c29e..28bf06c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriNormalizer.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriNormalizer.php
@@ -1,4 +1,5 @@
withHost('');
}
- if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) {
- $uri = $uri->withPort(null);
+ if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== NULL && Uri::isDefaultPort($uri)) {
+ $uri = $uri->withPort(NULL);
}
if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) {
@@ -165,20 +165,18 @@ final class UriNormalizer
* resolved against the same base URI. If this is not the case, determination of equivalence or difference of
* relative references does not mean anything.
*
- * @param UriInterface $uri1 An URI to compare
- * @param UriInterface $uri2 An URI to compare
- * @param int $normalizations A bitmask of normalizations to apply, see constants
+ * @param UriInterface $uri1 An URI to compare
+ * @param UriInterface $uri2 An URI to compare
+ * @param int $normalizations A bitmask of normalizations to apply, see constants
*
* @return bool
* @link https://tools.ietf.org/html/rfc3986#section-6.1
*/
- public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS)
- {
- return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations);
+ public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) {
+ return (string)self::normalize($uri1, $normalizations) === (string)self::normalize($uri2, $normalizations);
}
- private static function capitalizePercentEncoding(UriInterface $uri)
- {
+ private static function capitalizePercentEncoding(UriInterface $uri) {
$regex = '/(?:%[A-Fa-f0-9]{2})++/';
$callback = function (array $match) {
@@ -193,8 +191,7 @@ final class UriNormalizer
);
}
- private static function decodeUnreservedCharacters(UriInterface $uri)
- {
+ private static function decodeUnreservedCharacters(UriInterface $uri) {
$regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i';
$callback = function (array $match) {
@@ -209,8 +206,7 @@ final class UriNormalizer
);
}
- private function __construct()
- {
+ private function __construct() {
// cannot be instantiated
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriResolver.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriResolver.php
index c1cb8a2..0a9b169 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriResolver.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/UriResolver.php
@@ -1,4 +1,5 @@
getPath();
} else {
$lastSlashPos = strrpos($base->getPath(), '/');
- if ($lastSlashPos === false) {
+ if ($lastSlashPos === FALSE) {
$targetPath = $rel->getPath();
} else {
$targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath();
@@ -129,13 +128,12 @@ final class UriResolver
*
* echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well
*
- * @param UriInterface $base Base URI
+ * @param UriInterface $base Base URI
* @param UriInterface $target Target URI
*
* @return UriInterface The relative URI reference
*/
- public static function relativize(UriInterface $base, UriInterface $target)
- {
+ public static function relativize(UriInterface $base, UriInterface $target) {
if ($target->getScheme() !== '' &&
($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '')
) {
@@ -156,7 +154,7 @@ final class UriResolver
// We must remove the path before removing the authority because if the path starts with two slashes, the URI
// would turn invalid. And we also cannot set a relative path before removing the authority, as that is also
// invalid.
- $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost('');
+ $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(NULL)->withHost('');
if ($base->getPath() !== $target->getPath()) {
return $emptyPathUri->withPath(self::getRelativePath($base, $target));
@@ -179,8 +177,7 @@ final class UriResolver
return $emptyPathUri;
}
- private static function getRelativePath(UriInterface $base, UriInterface $target)
- {
+ private static function getRelativePath(UriInterface $base, UriInterface $target) {
$sourceSegments = explode('/', $base->getPath());
$targetSegments = explode('/', $target->getPath());
array_pop($sourceSegments);
@@ -198,9 +195,9 @@ final class UriResolver
// A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".
// This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
// as the first segment of a relative-path reference, as it would be mistaken for a scheme name.
- if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) {
+ if ('' === $relativePath || FALSE !== strpos(explode('/', $relativePath, 2)[0], ':')) {
$relativePath = "./$relativePath";
- } elseif ('/' === $relativePath[0]) {
+ } else if ('/' === $relativePath[0]) {
if ($base->getAuthority() != '' && $base->getPath() === '') {
// In this case an extra slash is added by resolve() automatically. So we must not add one here.
$relativePath = ".$relativePath";
@@ -212,8 +209,7 @@ final class UriResolver
return $relativePath;
}
- private function __construct()
- {
+ private function __construct() {
// cannot be instantiated
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/functions.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/functions.php
index e40348d..47f6fdb 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/functions.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/guzzlehttp/psr7/src/functions.php
@@ -1,4 +1,5 @@
getMethod() . ' '
. $message->getRequestTarget())
@@ -24,7 +24,7 @@ function str(MessageInterface $message)
if (!$message->hasHeader('host')) {
$msg .= "\r\nHost: " . $message->getUri()->getHost();
}
- } elseif ($message instanceof ResponseInterface) {
+ } else if ($message instanceof ResponseInterface) {
$msg = 'HTTP/' . $message->getProtocolVersion() . ' '
. $message->getStatusCode() . ' '
. $message->getReasonPhrase();
@@ -51,11 +51,10 @@ function str(MessageInterface $message)
* @return UriInterface
* @throws \InvalidArgumentException
*/
-function uri_for($uri)
-{
+function uri_for($uri) {
if ($uri instanceof UriInterface) {
return $uri;
- } elseif (is_string($uri)) {
+ } else if (is_string($uri)) {
return new Uri($uri);
}
@@ -70,13 +69,12 @@ function uri_for($uri)
* - size: Size of the stream.
*
* @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data
- * @param array $options Additional options
+ * @param array $options Additional options
*
* @return Stream
* @throws \InvalidArgumentException if the $resource arg is not valid.
*/
-function stream_for($resource = '', array $options = [])
-{
+function stream_for($resource = '', array $options = []) {
if (is_scalar($resource)) {
$stream = fopen('php://temp', 'r+');
if ($resource !== '') {
@@ -92,17 +90,17 @@ function stream_for($resource = '', array $options = [])
case 'object':
if ($resource instanceof StreamInterface) {
return $resource;
- } elseif ($resource instanceof \Iterator) {
+ } else if ($resource instanceof \Iterator) {
return new PumpStream(function () use ($resource) {
if (!$resource->valid()) {
- return false;
+ return FALSE;
}
$result = $resource->current();
$resource->next();
return $result;
}, $options);
- } elseif (method_exists($resource, '__toString')) {
- return stream_for((string) $resource, $options);
+ } else if (method_exists($resource, '__toString')) {
+ return stream_for((string)$resource, $options);
}
break;
case 'NULL':
@@ -126,8 +124,7 @@ function stream_for($resource = '', array $options = [])
*
* @return array Returns the parsed header values.
*/
-function parse_header($header)
-{
+function parse_header($header) {
static $trimmed = "\"' \n\t\r";
$params = $matches = [];
@@ -159,16 +156,15 @@ function parse_header($header)
*
* @return array Returns the normalized header field values.
*/
-function normalize_header($header)
-{
+function normalize_header($header) {
if (!is_array($header)) {
return array_map('trim', explode(',', $header));
}
$result = [];
foreach ($header as $value) {
- foreach ((array) $value as $v) {
- if (strpos($v, ',') === false) {
+ foreach ((array)$value as $v) {
+ if (strpos($v, ',') === FALSE) {
$result[] = $v;
continue;
}
@@ -194,12 +190,11 @@ function normalize_header($header)
* - version: (string) Set the protocol version.
*
* @param RequestInterface $request Request to clone and modify.
- * @param array $changes Changes to apply.
+ * @param array $changes Changes to apply.
*
* @return RequestInterface
*/
-function modify_request(RequestInterface $request, array $changes)
-{
+function modify_request(RequestInterface $request, array $changes) {
if (!$changes) {
return $request;
}
@@ -217,7 +212,7 @@ function modify_request(RequestInterface $request, array $changes)
$standardPorts = ['http' => 80, 'https' => 443];
$scheme = $changes['uri']->getScheme();
if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) {
- $changes['set_headers']['Host'] .= ':'.$port;
+ $changes['set_headers']['Host'] .= ':' . $port;
}
}
}
@@ -271,8 +266,7 @@ function modify_request(RequestInterface $request, array $changes)
*
* @throws \RuntimeException
*/
-function rewind_body(MessageInterface $message)
-{
+function rewind_body(MessageInterface $message) {
$body = $message->getBody();
if ($body->tell()) {
@@ -287,14 +281,13 @@ function rewind_body(MessageInterface $message)
* error handler that checks for errors and throws an exception instead.
*
* @param string $filename File to open
- * @param string $mode Mode used to open the file
+ * @param string $mode Mode used to open the file
*
* @return resource
* @throws \RuntimeException if the file cannot be opened
*/
-function try_fopen($filename, $mode)
-{
- $ex = null;
+function try_fopen($filename, $mode) {
+ $ex = NULL;
set_error_handler(function () use ($filename, $mode, &$ex) {
$ex = new \RuntimeException(sprintf(
'Unable to open %s using mode %s: %s',
@@ -320,20 +313,19 @@ function try_fopen($filename, $mode)
* bytes have been read.
*
* @param StreamInterface $stream Stream to read
- * @param int $maxLen Maximum number of bytes to read. Pass -1
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
* to read the entire stream.
* @return string
* @throws \RuntimeException on error.
*/
-function copy_to_string(StreamInterface $stream, $maxLen = -1)
-{
+function copy_to_string(StreamInterface $stream, $maxLen = -1) {
$buffer = '';
if ($maxLen === -1) {
while (!$stream->eof()) {
$buf = $stream->read(1048576);
// Using a loose equality here to match on '' and false.
- if ($buf == null) {
+ if ($buf == NULL) {
break;
}
$buffer .= $buf;
@@ -345,7 +337,7 @@ function copy_to_string(StreamInterface $stream, $maxLen = -1)
while (!$stream->eof() && $len < $maxLen) {
$buf = $stream->read($maxLen - $len);
// Using a loose equality here to match on '' and false.
- if ($buf == null) {
+ if ($buf == NULL) {
break;
}
$buffer .= $buf;
@@ -360,8 +352,8 @@ function copy_to_string(StreamInterface $stream, $maxLen = -1)
* of bytes have been read.
*
* @param StreamInterface $source Stream to read from
- * @param StreamInterface $dest Stream to write to
- * @param int $maxLen Maximum number of bytes to read. Pass -1
+ * @param StreamInterface $dest Stream to write to
+ * @param int $maxLen Maximum number of bytes to read. Pass -1
* to read the entire stream.
*
* @throws \RuntimeException on error.
@@ -396,9 +388,9 @@ function copy_to_stream(
/**
* Calculate a hash of a Stream
*
- * @param StreamInterface $stream Stream to calculate the hash for
- * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
- * @param bool $rawOutput Whether or not to use raw output
+ * @param StreamInterface $stream Stream to calculate the hash for
+ * @param string $algo Hash algorithm (e.g. md5, crc32, etc)
+ * @param bool $rawOutput Whether or not to use raw output
*
* @return string Returns the hash of the stream
* @throws \RuntimeException on error.
@@ -406,7 +398,7 @@ function copy_to_stream(
function hash(
StreamInterface $stream,
$algo,
- $rawOutput = false
+ $rawOutput = FALSE
) {
$pos = $stream->tell();
@@ -419,7 +411,7 @@ function hash(
hash_update($ctx, $stream->read(1048576));
}
- $out = hash_final($ctx, (bool) $rawOutput);
+ $out = hash_final($ctx, (bool)$rawOutput);
$stream->seek($pos);
return $out;
@@ -428,19 +420,18 @@ function hash(
/**
* Read a line from the stream up to the maximum allowed buffer length
*
- * @param StreamInterface $stream Stream to read from
- * @param int $maxLength Maximum buffer length
+ * @param StreamInterface $stream Stream to read from
+ * @param int $maxLength Maximum buffer length
*
* @return string|bool
*/
-function readline(StreamInterface $stream, $maxLength = null)
-{
+function readline(StreamInterface $stream, $maxLength = NULL) {
$buffer = '';
$size = 0;
while (!$stream->eof()) {
// Using a loose equality here to match on '' and false.
- if (null == ($byte = $stream->read(1))) {
+ if (NULL == ($byte = $stream->read(1))) {
return $buffer;
}
$buffer .= $byte;
@@ -460,8 +451,7 @@ function readline(StreamInterface $stream, $maxLength = null)
*
* @return Request
*/
-function parse_request($message)
-{
+function parse_request($message) {
$data = _parse_message($message);
$matches = [];
if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) {
@@ -488,8 +478,7 @@ function parse_request($message)
*
* @return Response
*/
-function parse_response($message)
-{
+function parse_response($message) {
$data = _parse_message($message);
// According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
// between status-code and reason-phrase is required. But browsers accept
@@ -504,7 +493,7 @@ function parse_response($message)
$data['headers'],
$data['body'],
explode('/', $parts[0])[1],
- isset($parts[2]) ? $parts[2] : null
+ isset($parts[2]) ? $parts[2] : NULL
);
}
@@ -516,35 +505,36 @@ function parse_response($message)
* PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will
* be parsed into ['foo[a]' => '1', 'foo[b]' => '2']).
*
- * @param string $str Query string to parse
+ * @param string $str Query string to parse
* @param bool|string $urlEncoding How the query string is encoded
*
* @return array
*/
-function parse_query($str, $urlEncoding = true)
-{
+function parse_query($str, $urlEncoding = TRUE) {
$result = [];
if ($str === '') {
return $result;
}
- if ($urlEncoding === true) {
+ if ($urlEncoding === TRUE) {
$decoder = function ($value) {
return rawurldecode(str_replace('+', ' ', $value));
};
- } elseif ($urlEncoding == PHP_QUERY_RFC3986) {
+ } else if ($urlEncoding == PHP_QUERY_RFC3986) {
$decoder = 'rawurldecode';
- } elseif ($urlEncoding == PHP_QUERY_RFC1738) {
+ } else if ($urlEncoding == PHP_QUERY_RFC1738) {
$decoder = 'urldecode';
} else {
- $decoder = function ($str) { return $str; };
+ $decoder = function ($str) {
+ return $str;
+ };
}
foreach (explode('&', $str) as $kvp) {
$parts = explode('=', $kvp, 2);
$key = $decoder($parts[0]);
- $value = isset($parts[1]) ? $decoder($parts[1]) : null;
+ $value = isset($parts[1]) ? $decoder($parts[1]) : NULL;
if (!isset($result[$key])) {
$result[$key] = $value;
} else {
@@ -565,23 +555,24 @@ function parse_query($str, $urlEncoding = true)
* string. This function does not modify the provided keys when an array is
* encountered (like http_build_query would).
*
- * @param array $params Query string parameters.
+ * @param array $params Query string parameters.
* @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
* to encode using RFC3986, or PHP_QUERY_RFC1738
* to encode using RFC1738.
* @return string
*/
-function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
-{
+function build_query(array $params, $encoding = PHP_QUERY_RFC3986) {
if (!$params) {
return '';
}
- if ($encoding === false) {
- $encoder = function ($str) { return $str; };
- } elseif ($encoding === PHP_QUERY_RFC3986) {
+ if ($encoding === FALSE) {
+ $encoder = function ($str) {
+ return $str;
+ };
+ } else if ($encoding === PHP_QUERY_RFC3986) {
$encoder = 'rawurlencode';
- } elseif ($encoding === PHP_QUERY_RFC1738) {
+ } else if ($encoding === PHP_QUERY_RFC1738) {
$encoder = 'urlencode';
} else {
throw new \InvalidArgumentException('Invalid type');
@@ -592,14 +583,14 @@ function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
$k = $encoder($k);
if (!is_array($v)) {
$qs .= $k;
- if ($v !== null) {
+ if ($v !== NULL) {
$qs .= '=' . $encoder($v);
}
$qs .= '&';
} else {
foreach ($v as $vv) {
$qs .= $k;
- if ($vv !== null) {
+ if ($vv !== NULL) {
$qs .= '=' . $encoder($vv);
}
$qs .= '&';
@@ -607,7 +598,7 @@ function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
}
}
- return $qs ? (string) substr($qs, 0, -1) : '';
+ return $qs ? (string)substr($qs, 0, -1) : '';
}
/**
@@ -617,8 +608,7 @@ function build_query(array $params, $encoding = PHP_QUERY_RFC3986)
*
* @return null|string
*/
-function mimetype_from_filename($filename)
-{
+function mimetype_from_filename($filename) {
return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION));
}
@@ -630,8 +620,7 @@ function mimetype_from_filename($filename)
* @return string|null
* @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types
*/
-function mimetype_from_extension($extension)
-{
+function mimetype_from_extension($extension) {
static $mimetypes = [
'7z' => 'application/x-7z-compressed',
'aac' => 'audio/x-aac',
@@ -737,7 +726,7 @@ function mimetype_from_extension($extension)
return isset($mimetypes[$extension])
? $mimetypes[$extension]
- : null;
+ : NULL;
}
/**
@@ -752,8 +741,7 @@ function mimetype_from_extension($extension)
* @return array
* @internal
*/
-function _parse_message($message)
-{
+function _parse_message($message) {
if (!$message) {
throw new \InvalidArgumentException('Invalid message');
}
@@ -786,14 +774,13 @@ function _parse_message($message)
/**
* Constructs a URI for an HTTP request message.
*
- * @param string $path Path from the start-line
- * @param array $headers Array of headers (each value an array).
+ * @param string $path Path from the start-line
+ * @param array $headers Array of headers (each value an array).
*
* @return string
* @internal
*/
-function _parse_request_uri($path, array $headers)
-{
+function _parse_request_uri($path, array $headers) {
$hostKey = array_filter(array_keys($headers), function ($k) {
return strtolower($k) === 'host';
});
@@ -810,8 +797,7 @@ function _parse_request_uri($path, array $headers)
}
/** @internal */
-function _caseless_remove($keys, array $data)
-{
+function _caseless_remove($keys, array $data) {
$result = [];
foreach ($keys as &$key) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/composer.json
index 80755d7..9469529 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/composer.json
@@ -1,56 +1,64 @@
{
- "name": "kriswallsmith/assetic",
- "description": "Asset Management for PHP",
- "keywords": [ "assets", "compression", "minification" ],
- "homepage": "https://github.com/kriswallsmith/assetic",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Kris Wallsmith",
- "email": "kris.wallsmith@gmail.com",
- "homepage": "http://kriswallsmith.net/"
- }
- ],
- "require": {
- "php": ">=5.3.1",
- "symfony/process": "~2.1|~3.0"
- },
- "conflict": {
- "twig/twig": "<1.27"
- },
- "require-dev": {
- "leafo/lessphp": "^0.3.7",
- "leafo/scssphp": "~0.1",
- "meenie/javascript-packer": "^1.1",
- "mrclay/minify": "<2.3",
- "natxet/cssmin": "3.0.4",
- "patchwork/jsqueeze": "~1.0|~2.0",
- "phpunit/phpunit": "~4.8 || ^5.6",
- "psr/log": "~1.0",
- "ptachoire/cssembed": "~1.0",
- "symfony/phpunit-bridge": "~2.7|~3.0",
- "twig/twig": "~1.23|~2.0",
- "yfix/packager": "dev-master"
- },
- "suggest": {
- "twig/twig": "Assetic provides the integration with the Twig templating engine",
- "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
- "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler",
- "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris",
- "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin",
- "patchwork/jsqueeze": "Assetic provides the integration with the JSqueeze JavaScript compressor"
- },
- "autoload": {
- "psr-0": { "Assetic": "src/" },
- "files": [ "src/functions.php" ]
- },
- "config": {
- "bin-dir": "bin"
+ "name": "kriswallsmith/assetic",
+ "description": "Asset Management for PHP",
+ "keywords": [
+ "assets",
+ "compression",
+ "minification"
+ ],
+ "homepage": "https://github.com/kriswallsmith/assetic",
+ "type": "library",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.1",
+ "symfony/process": "~2.1|~3.0"
+ },
+ "conflict": {
+ "twig/twig": "<1.27"
+ },
+ "require-dev": {
+ "leafo/lessphp": "^0.3.7",
+ "leafo/scssphp": "~0.1",
+ "meenie/javascript-packer": "^1.1",
+ "mrclay/minify": "<2.3",
+ "natxet/cssmin": "3.0.4",
+ "patchwork/jsqueeze": "~1.0|~2.0",
+ "phpunit/phpunit": "~4.8 || ^5.6",
+ "psr/log": "~1.0",
+ "ptachoire/cssembed": "~1.0",
+ "symfony/phpunit-bridge": "~2.7|~3.0",
+ "twig/twig": "~1.23|~2.0",
+ "yfix/packager": "dev-master"
+ },
+ "suggest": {
+ "twig/twig": "Assetic provides the integration with the Twig templating engine",
+ "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler",
+ "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler",
+ "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris",
+ "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin",
+ "patchwork/jsqueeze": "Assetic provides the integration with the JSqueeze JavaScript compressor"
+ },
+ "autoload": {
+ "psr-0": {
+ "Assetic": "src/"
},
- "extra": {
- "branch-alias": {
- "dev-master": "1.4-dev"
- }
+ "files": [
+ "src/functions.php"
+ ]
+ },
+ "config": {
+ "bin-dir": "bin"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.4-dev"
}
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php
index 7ce62b5..63c8e94 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCache.php
@@ -25,29 +25,24 @@ class AssetCache implements AssetInterface
private $asset;
private $cache;
- public function __construct(AssetInterface $asset, CacheInterface $cache)
- {
+ public function __construct(AssetInterface $asset, CacheInterface $cache) {
$this->asset = $asset;
$this->cache = $cache;
}
- public function ensureFilter(FilterInterface $filter)
- {
+ public function ensureFilter(FilterInterface $filter) {
$this->asset->ensureFilter($filter);
}
- public function getFilters()
- {
+ public function getFilters() {
return $this->asset->getFilters();
}
- public function clearFilters()
- {
+ public function clearFilters() {
$this->asset->clearFilters();
}
- public function load(FilterInterface $additionalFilter = null)
- {
+ public function load(FilterInterface $additionalFilter = NULL) {
$cacheKey = self::getCacheKey($this->asset, $additionalFilter, 'load');
if ($this->cache->has($cacheKey)) {
$this->asset->setContent($this->cache->get($cacheKey));
@@ -59,8 +54,7 @@ class AssetCache implements AssetInterface
$this->cache->set($cacheKey, $this->asset->getContent());
}
- public function dump(FilterInterface $additionalFilter = null)
- {
+ public function dump(FilterInterface $additionalFilter = NULL) {
$cacheKey = self::getCacheKey($this->asset, $additionalFilter, 'dump');
if ($this->cache->has($cacheKey)) {
return $this->cache->get($cacheKey);
@@ -72,58 +66,47 @@ class AssetCache implements AssetInterface
return $content;
}
- public function getContent()
- {
+ public function getContent() {
return $this->asset->getContent();
}
- public function setContent($content)
- {
+ public function setContent($content) {
$this->asset->setContent($content);
}
- public function getSourceRoot()
- {
+ public function getSourceRoot() {
return $this->asset->getSourceRoot();
}
- public function getSourcePath()
- {
+ public function getSourcePath() {
return $this->asset->getSourcePath();
}
- public function getSourceDirectory()
- {
+ public function getSourceDirectory() {
return $this->asset->getSourceDirectory();
}
- public function getTargetPath()
- {
+ public function getTargetPath() {
return $this->asset->getTargetPath();
}
- public function setTargetPath($targetPath)
- {
+ public function setTargetPath($targetPath) {
$this->asset->setTargetPath($targetPath);
}
- public function getLastModified()
- {
+ public function getLastModified() {
return $this->asset->getLastModified();
}
- public function getVars()
- {
+ public function getVars() {
return $this->asset->getVars();
}
- public function setValues(array $values)
- {
+ public function setValues(array $values) {
$this->asset->setValues($values);
}
- public function getValues()
- {
+ public function getValues() {
return $this->asset->getValues();
}
@@ -138,20 +121,19 @@ class AssetCache implements AssetInterface
* * last modified
* * filters
*
- * @param AssetInterface $asset The asset
+ * @param AssetInterface $asset The asset
* @param FilterInterface $additionalFilter Any additional filter being applied
- * @param string $salt Salt for the key
+ * @param string $salt Salt for the key
*
* @return string A key for identifying the current asset
*/
- private static function getCacheKey(AssetInterface $asset, FilterInterface $additionalFilter = null, $salt = '')
- {
+ private static function getCacheKey(AssetInterface $asset, FilterInterface $additionalFilter = NULL, $salt = '') {
if ($additionalFilter) {
$asset = clone $asset;
$asset->ensureFilter($additionalFilter);
}
- $cacheKey = $asset->getSourceRoot();
+ $cacheKey = $asset->getSourceRoot();
$cacheKey .= $asset->getSourcePath();
$cacheKey .= $asset->getTargetPath();
$cacheKey .= $asset->getLastModified();
@@ -169,6 +151,6 @@ class AssetCache implements AssetInterface
$cacheKey .= serialize($values);
}
- return md5($cacheKey.$salt);
+ return md5($cacheKey . $salt);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php
index 3141af5..5efe43c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollection.php
@@ -35,13 +35,12 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
/**
* Constructor.
*
- * @param array $assets Assets for the current collection
- * @param array $filters Filters for the current collection
+ * @param array $assets Assets for the current collection
+ * @param array $filters Filters for the current collection
* @param string $sourceRoot The root directory
- * @param array $vars
+ * @param array $vars
*/
- public function __construct($assets = array(), $filters = array(), $sourceRoot = null, array $vars = array())
- {
+ public function __construct($assets = array(), $filters = array(), $sourceRoot = NULL, array $vars = array()) {
$this->assets = array();
foreach ($assets as $asset) {
$this->add($asset);
@@ -54,85 +53,76 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
$this->values = array();
}
- public function __clone()
- {
+ public function __clone() {
$this->filters = clone $this->filters;
$this->clones = new \SplObjectStorage();
}
- public function all()
- {
+ public function all() {
return $this->assets;
}
- public function add(AssetInterface $asset)
- {
+ public function add(AssetInterface $asset) {
$this->assets[] = $asset;
}
- public function removeLeaf(AssetInterface $needle, $graceful = false)
- {
+ public function removeLeaf(AssetInterface $needle, $graceful = FALSE) {
foreach ($this->assets as $i => $asset) {
- $clone = isset($this->clones[$asset]) ? $this->clones[$asset] : null;
- if (in_array($needle, array($asset, $clone), true)) {
+ $clone = isset($this->clones[$asset]) ? $this->clones[$asset] : NULL;
+ if (in_array($needle, array($asset, $clone), TRUE)) {
unset($this->clones[$asset], $this->assets[$i]);
- return true;
+ return TRUE;
}
- if ($asset instanceof AssetCollectionInterface && $asset->removeLeaf($needle, true)) {
- return true;
+ if ($asset instanceof AssetCollectionInterface && $asset->removeLeaf($needle, TRUE)) {
+ return TRUE;
}
}
if ($graceful) {
- return false;
+ return FALSE;
}
throw new \InvalidArgumentException('Leaf not found.');
}
- public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = false)
- {
+ public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = FALSE) {
foreach ($this->assets as $i => $asset) {
- $clone = isset($this->clones[$asset]) ? $this->clones[$asset] : null;
- if (in_array($needle, array($asset, $clone), true)) {
+ $clone = isset($this->clones[$asset]) ? $this->clones[$asset] : NULL;
+ if (in_array($needle, array($asset, $clone), TRUE)) {
unset($this->clones[$asset]);
$this->assets[$i] = $replacement;
- return true;
+ return TRUE;
}
- if ($asset instanceof AssetCollectionInterface && $asset->replaceLeaf($needle, $replacement, true)) {
- return true;
+ if ($asset instanceof AssetCollectionInterface && $asset->replaceLeaf($needle, $replacement, TRUE)) {
+ return TRUE;
}
}
if ($graceful) {
- return false;
+ return FALSE;
}
throw new \InvalidArgumentException('Leaf not found.');
}
- public function ensureFilter(FilterInterface $filter)
- {
+ public function ensureFilter(FilterInterface $filter) {
$this->filters->ensure($filter);
}
- public function getFilters()
- {
+ public function getFilters() {
return $this->filters->all();
}
- public function clearFilters()
- {
+ public function clearFilters() {
$this->filters->clear();
$this->clones = new \SplObjectStorage();
}
- public function load(FilterInterface $additionalFilter = null)
- {
+ public function load(FilterInterface $additionalFilter = NULL) {
// loop through leaves and load each asset
$parts = array();
foreach ($this as $asset) {
@@ -143,8 +133,7 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
$this->content = implode("\n", $parts);
}
- public function dump(FilterInterface $additionalFilter = null)
- {
+ public function dump(FilterInterface $additionalFilter = NULL) {
// loop through leaves and dump each asset
$parts = array();
foreach ($this as $asset) {
@@ -154,36 +143,29 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
return implode("\n", $parts);
}
- public function getContent()
- {
+ public function getContent() {
return $this->content;
}
- public function setContent($content)
- {
+ public function setContent($content) {
$this->content = $content;
}
- public function getSourceRoot()
- {
+ public function getSourceRoot() {
return $this->sourceRoot;
}
- public function getSourcePath()
- {
+ public function getSourcePath() {
}
- public function getSourceDirectory()
- {
+ public function getSourceDirectory() {
}
- public function getTargetPath()
- {
+ public function getTargetPath() {
return $this->targetPath;
}
- public function setTargetPath($targetPath)
- {
+ public function setTargetPath($targetPath) {
$this->targetPath = $targetPath;
}
@@ -192,8 +174,7 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
*
* @return integer|null A UNIX timestamp
*/
- public function getLastModified()
- {
+ public function getLastModified() {
if (!count($this->assets)) {
return;
}
@@ -212,18 +193,15 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
/**
* Returns an iterator for looping recursively over unique leaves.
*/
- public function getIterator()
- {
+ public function getIterator() {
return new \RecursiveIteratorIterator(new AssetCollectionFilterIterator(new AssetCollectionIterator($this, $this->clones)));
}
- public function getVars()
- {
+ public function getVars() {
return $this->vars;
}
- public function setValues(array $values)
- {
+ public function setValues(array $values) {
$this->values = $values;
foreach ($this as $asset) {
@@ -231,8 +209,7 @@ class AssetCollection implements \IteratorAggregate, AssetCollectionInterface
}
}
- public function getValues()
- {
+ public function getValues() {
return $this->values;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php
index f029d1b..656eaa5 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetCollectionInterface.php
@@ -35,25 +35,25 @@ interface AssetCollectionInterface extends AssetInterface, \Traversable
/**
* Removes a leaf.
*
- * @param AssetInterface $leaf The leaf to remove
- * @param Boolean $graceful Whether the failure should return false or throw an exception
+ * @param AssetInterface $leaf The leaf to remove
+ * @param Boolean $graceful Whether the failure should return false or throw an exception
*
* @return Boolean Whether the asset has been found
*
* @throws \InvalidArgumentException If the asset cannot be found
*/
- public function removeLeaf(AssetInterface $leaf, $graceful = false);
+ public function removeLeaf(AssetInterface $leaf, $graceful = FALSE);
/**
* Replaces an existing leaf with a new one.
*
- * @param AssetInterface $needle The current asset to replace
+ * @param AssetInterface $needle The current asset to replace
* @param AssetInterface $replacement The new asset
- * @param Boolean $graceful Whether the failure should return false or throw an exception
+ * @param Boolean $graceful Whether the failure should return false or throw an exception
*
* @return Boolean Whether the asset has been found
*
* @throws \InvalidArgumentException If the asset cannot be found
*/
- public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = false);
+ public function replaceLeaf(AssetInterface $needle, AssetInterface $replacement, $graceful = FALSE);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php
index b1d655c..2894576 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetInterface.php
@@ -46,7 +46,7 @@ interface AssetInterface
*
* @param FilterInterface $additionalFilter An additional filter
*/
- public function load(FilterInterface $additionalFilter = null);
+ public function load(FilterInterface $additionalFilter = NULL);
/**
* Applies dump filters and returns the asset as a string.
@@ -62,7 +62,7 @@ interface AssetInterface
*
* @return string The filtered content of the current asset
*/
- public function dump(FilterInterface $additionalFilter = null);
+ public function dump(FilterInterface $additionalFilter = NULL);
/**
* Returns the loaded content of the current asset.
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php
index f66b769..1243efc 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/AssetReference.php
@@ -24,122 +24,102 @@ class AssetReference implements AssetInterface
private $am;
private $name;
private $filters = array();
- private $clone = false;
+ private $clone = FALSE;
private $asset;
- public function __construct(AssetManager $am, $name)
- {
+ public function __construct(AssetManager $am, $name) {
$this->am = $am;
$this->name = $name;
}
- public function __clone()
- {
- $this->clone = true;
+ public function __clone() {
+ $this->clone = TRUE;
if ($this->asset) {
$this->asset = clone $this->asset;
}
}
- public function ensureFilter(FilterInterface $filter)
- {
+ public function ensureFilter(FilterInterface $filter) {
$this->filters[] = $filter;
}
- public function getFilters()
- {
+ public function getFilters() {
$this->flushFilters();
return $this->callAsset(__FUNCTION__);
}
- public function clearFilters()
- {
+ public function clearFilters() {
$this->filters = array();
$this->callAsset(__FUNCTION__);
}
- public function load(FilterInterface $additionalFilter = null)
- {
+ public function load(FilterInterface $additionalFilter = NULL) {
$this->flushFilters();
return $this->callAsset(__FUNCTION__, array($additionalFilter));
}
- public function dump(FilterInterface $additionalFilter = null)
- {
+ public function dump(FilterInterface $additionalFilter = NULL) {
$this->flushFilters();
return $this->callAsset(__FUNCTION__, array($additionalFilter));
}
- public function getContent()
- {
+ public function getContent() {
return $this->callAsset(__FUNCTION__);
}
- public function setContent($content)
- {
+ public function setContent($content) {
$this->callAsset(__FUNCTION__, array($content));
}
- public function getSourceRoot()
- {
+ public function getSourceRoot() {
return $this->callAsset(__FUNCTION__);
}
- public function getSourcePath()
- {
+ public function getSourcePath() {
return $this->callAsset(__FUNCTION__);
}
- public function getSourceDirectory()
- {
+ public function getSourceDirectory() {
return $this->callAsset(__FUNCTION__);
}
- public function getTargetPath()
- {
+ public function getTargetPath() {
return $this->callAsset(__FUNCTION__);
}
- public function setTargetPath($targetPath)
- {
+ public function setTargetPath($targetPath) {
$this->callAsset(__FUNCTION__, array($targetPath));
}
- public function getLastModified()
- {
+ public function getLastModified() {
return $this->callAsset(__FUNCTION__);
}
- public function getVars()
- {
+ public function getVars() {
return $this->callAsset(__FUNCTION__);
}
- public function getValues()
- {
+ public function getValues() {
return $this->callAsset(__FUNCTION__);
}
- public function setValues(array $values)
- {
+ public function setValues(array $values) {
$this->callAsset(__FUNCTION__, array($values));
}
// private
- private function callAsset($method, $arguments = array())
- {
+ private function callAsset($method, $arguments = array()) {
$asset = $this->resolve();
return call_user_func_array(array($asset, $method), $arguments);
}
- private function flushFilters()
- {
+ private function flushFilters() {
$asset = $this->resolve();
while ($filter = array_shift($this->filters)) {
@@ -147,8 +127,7 @@ class AssetReference implements AssetInterface
}
}
- private function resolve()
- {
+ private function resolve() {
if ($this->asset) {
return $this->asset;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php
index 093b92a..322ba92 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/BaseAsset.php
@@ -37,13 +37,12 @@ abstract class BaseAsset implements AssetInterface
/**
* Constructor.
*
- * @param array $filters Filters for the asset
+ * @param array $filters Filters for the asset
* @param string $sourceRoot The root directory
* @param string $sourcePath The asset path
- * @param array $vars
+ * @param array $vars
*/
- public function __construct($filters = array(), $sourceRoot = null, $sourcePath = null, array $vars = array())
- {
+ public function __construct($filters = array(), $sourceRoot = NULL, $sourcePath = NULL, array $vars = array()) {
$this->filters = new FilterCollection($filters);
$this->sourceRoot = $sourceRoot;
$this->sourcePath = $sourcePath;
@@ -52,37 +51,32 @@ abstract class BaseAsset implements AssetInterface
}
$this->vars = $vars;
$this->values = array();
- $this->loaded = false;
+ $this->loaded = FALSE;
}
- public function __clone()
- {
+ public function __clone() {
$this->filters = clone $this->filters;
}
- public function ensureFilter(FilterInterface $filter)
- {
+ public function ensureFilter(FilterInterface $filter) {
$this->filters->ensure($filter);
}
- public function getFilters()
- {
+ public function getFilters() {
return $this->filters->all();
}
- public function clearFilters()
- {
+ public function clearFilters() {
$this->filters->clear();
}
/**
* Encapsulates asset loading logic.
*
- * @param string $content The asset content
+ * @param string $content The asset content
* @param FilterInterface $additionalFilter An additional filter
*/
- protected function doLoad($content, FilterInterface $additionalFilter = null)
- {
+ protected function doLoad($content, FilterInterface $additionalFilter = NULL) {
$filter = clone $this->filters;
if ($additionalFilter) {
$filter->ensure($additionalFilter);
@@ -94,11 +88,10 @@ abstract class BaseAsset implements AssetInterface
$filter->filterLoad($asset);
$this->content = $asset->getContent();
- $this->loaded = true;
+ $this->loaded = TRUE;
}
- public function dump(FilterInterface $additionalFilter = null)
- {
+ public function dump(FilterInterface $additionalFilter = NULL) {
if (!$this->loaded) {
$this->load();
}
@@ -114,41 +107,34 @@ abstract class BaseAsset implements AssetInterface
return $asset->getContent();
}
- public function getContent()
- {
+ public function getContent() {
return $this->content;
}
- public function setContent($content)
- {
+ public function setContent($content) {
$this->content = $content;
}
- public function getSourceRoot()
- {
+ public function getSourceRoot() {
return $this->sourceRoot;
}
- public function getSourcePath()
- {
+ public function getSourcePath() {
return $this->sourcePath;
}
- public function getSourceDirectory()
- {
+ public function getSourceDirectory() {
return $this->sourceDir;
}
- public function getTargetPath()
- {
+ public function getTargetPath() {
return $this->targetPath;
}
- public function setTargetPath($targetPath)
- {
+ public function setTargetPath($targetPath) {
if ($this->vars) {
foreach ($this->vars as $var) {
- if (false === strpos($targetPath, $var)) {
+ if (FALSE === strpos($targetPath, $var)) {
throw new \RuntimeException(sprintf('The asset target path "%s" must contain the variable "{%s}".', $targetPath, $var));
}
}
@@ -157,25 +143,22 @@ abstract class BaseAsset implements AssetInterface
$this->targetPath = $targetPath;
}
- public function getVars()
- {
+ public function getVars() {
return $this->vars;
}
- public function setValues(array $values)
- {
+ public function setValues(array $values) {
foreach ($values as $var => $v) {
- if (!in_array($var, $this->vars, true)) {
+ if (!in_array($var, $this->vars, TRUE)) {
throw new \InvalidArgumentException(sprintf('The asset with source path "%s" has no variable named "%s".', $this->sourcePath, $var));
}
}
$this->values = $values;
- $this->loaded = false;
+ $this->loaded = FALSE;
}
- public function getValues()
- {
+ public function getValues() {
return $this->values;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php
index 2a33e08..74bee1a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/FileAsset.php
@@ -26,22 +26,21 @@ class FileAsset extends BaseAsset
/**
* Constructor.
*
- * @param string $source An absolute path
- * @param array $filters An array of filters
+ * @param string $source An absolute path
+ * @param array $filters An array of filters
* @param string $sourceRoot The source asset root directory
* @param string $sourcePath The source asset path
- * @param array $vars
+ * @param array $vars
*
* @throws \InvalidArgumentException If the supplied root doesn't match the source when guessing the path
*/
- public function __construct($source, $filters = array(), $sourceRoot = null, $sourcePath = null, array $vars = array())
- {
- if (null === $sourceRoot) {
+ public function __construct($source, $filters = array(), $sourceRoot = NULL, $sourcePath = NULL, array $vars = array()) {
+ if (NULL === $sourceRoot) {
$sourceRoot = dirname($source);
- if (null === $sourcePath) {
+ if (NULL === $sourcePath) {
$sourcePath = basename($source);
}
- } elseif (null === $sourcePath) {
+ } else if (NULL === $sourcePath) {
if (0 !== strpos($source, $sourceRoot)) {
throw new \InvalidArgumentException(sprintf('The source "%s" is not in the root directory "%s"', $source, $sourceRoot));
}
@@ -54,8 +53,7 @@ class FileAsset extends BaseAsset
parent::__construct($filters, $sourceRoot, $sourcePath, $vars);
}
- public function load(FilterInterface $additionalFilter = null)
- {
+ public function load(FilterInterface $additionalFilter = NULL) {
$source = VarUtils::resolve($this->source, $this->getVars(), $this->getValues());
if (!is_file($source)) {
@@ -65,8 +63,7 @@ class FileAsset extends BaseAsset
$this->doLoad(file_get_contents($source), $additionalFilter);
}
- public function getLastModified()
- {
+ public function getLastModified() {
$source = VarUtils::resolve($this->source, $this->getVars(), $this->getValues());
if (!is_file($source)) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
index 6444e61..13fa9a0 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/GlobAsset.php
@@ -27,21 +27,19 @@ class GlobAsset extends AssetCollection
/**
* Constructor.
*
- * @param string|array $globs A single glob path or array of paths
- * @param array $filters An array of filters
- * @param string $root The root directory
- * @param array $vars
+ * @param string|array $globs A single glob path or array of paths
+ * @param array $filters An array of filters
+ * @param string $root The root directory
+ * @param array $vars
*/
- public function __construct($globs, $filters = array(), $root = null, array $vars = array())
- {
- $this->globs = (array) $globs;
- $this->initialized = false;
+ public function __construct($globs, $filters = array(), $root = NULL, array $vars = array()) {
+ $this->globs = (array)$globs;
+ $this->initialized = FALSE;
parent::__construct(array(), $filters, $root, $vars);
}
- public function all()
- {
+ public function all() {
if (!$this->initialized) {
$this->initialize();
}
@@ -49,8 +47,7 @@ class GlobAsset extends AssetCollection
return parent::all();
}
- public function load(FilterInterface $additionalFilter = null)
- {
+ public function load(FilterInterface $additionalFilter = NULL) {
if (!$this->initialized) {
$this->initialize();
}
@@ -58,8 +55,7 @@ class GlobAsset extends AssetCollection
parent::load($additionalFilter);
}
- public function dump(FilterInterface $additionalFilter = null)
- {
+ public function dump(FilterInterface $additionalFilter = NULL) {
if (!$this->initialized) {
$this->initialize();
}
@@ -67,8 +63,7 @@ class GlobAsset extends AssetCollection
return parent::dump($additionalFilter);
}
- public function getLastModified()
- {
+ public function getLastModified() {
if (!$this->initialized) {
$this->initialize();
}
@@ -76,8 +71,7 @@ class GlobAsset extends AssetCollection
return parent::getLastModified();
}
- public function getIterator()
- {
+ public function getIterator() {
if (!$this->initialized) {
$this->initialize();
}
@@ -85,24 +79,22 @@ class GlobAsset extends AssetCollection
return parent::getIterator();
}
- public function setValues(array $values)
- {
+ public function setValues(array $values) {
parent::setValues($values);
- $this->initialized = false;
+ $this->initialized = FALSE;
}
/**
* Initializes the collection based on the glob(s) passed in.
*/
- private function initialize()
- {
+ private function initialize() {
foreach ($this->globs as $glob) {
$glob = VarUtils::resolve($glob, $this->getVars(), $this->getValues());
- if (false !== $paths = glob($glob)) {
+ if (FALSE !== $paths = glob($glob)) {
foreach ($paths as $path) {
if (is_file($path)) {
- $asset = new FileAsset($path, array(), $this->getSourceRoot(), null, $this->getVars());
+ $asset = new FileAsset($path, array(), $this->getSourceRoot(), NULL, $this->getVars());
$asset->setValues($this->getValues());
$this->add($asset);
}
@@ -110,6 +102,6 @@ class GlobAsset extends AssetCollection
}
}
- $this->initialized = true;
+ $this->initialized = TRUE;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php
index cd56761..a188416 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/HttpAsset.php
@@ -27,18 +27,17 @@ class HttpAsset extends BaseAsset
/**
* Constructor.
*
- * @param string $sourceUrl The source URL
- * @param array $filters An array of filters
+ * @param string $sourceUrl The source URL
+ * @param array $filters An array of filters
* @param Boolean $ignoreErrors
- * @param array $vars
+ * @param array $vars
*
* @throws \InvalidArgumentException If the first argument is not an URL
*/
- public function __construct($sourceUrl, $filters = array(), $ignoreErrors = false, array $vars = array())
- {
+ public function __construct($sourceUrl, $filters = array(), $ignoreErrors = FALSE, array $vars = array()) {
if (0 === strpos($sourceUrl, '//')) {
- $sourceUrl = 'http:'.$sourceUrl;
- } elseif (false === strpos($sourceUrl, '://')) {
+ $sourceUrl = 'http:' . $sourceUrl;
+ } else if (FALSE === strpos($sourceUrl, '://')) {
throw new \InvalidArgumentException(sprintf('"%s" is not a valid URL.', $sourceUrl));
}
@@ -48,25 +47,23 @@ class HttpAsset extends BaseAsset
list($scheme, $url) = explode('://', $sourceUrl, 2);
list($host, $path) = explode('/', $url, 2);
- parent::__construct($filters, $scheme.'://'.$host, $path, $vars);
+ parent::__construct($filters, $scheme . '://' . $host, $path, $vars);
}
- public function load(FilterInterface $additionalFilter = null)
- {
+ public function load(FilterInterface $additionalFilter = NULL) {
$content = @file_get_contents(
VarUtils::resolve($this->sourceUrl, $this->getVars(), $this->getValues())
);
- if (false === $content && !$this->ignoreErrors) {
+ if (FALSE === $content && !$this->ignoreErrors) {
throw new \RuntimeException(sprintf('Unable to load asset from URL "%s"', $this->sourceUrl));
}
$this->doLoad($content, $additionalFilter);
}
- public function getLastModified()
- {
- if (false !== @file_get_contents($this->sourceUrl, false, stream_context_create(array('http' => array('method' => 'HEAD'))))) {
+ public function getLastModified() {
+ if (FALSE !== @file_get_contents($this->sourceUrl, FALSE, stream_context_create(array('http' => array('method' => 'HEAD'))))) {
foreach ($http_response_header as $header) {
if (0 === stripos($header, 'Last-Modified: ')) {
list(, $mtime) = explode(':', $header, 2);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php
index fae5d13..fb4722f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionFilterIterator.php
@@ -28,11 +28,10 @@ class AssetCollectionFilterIterator extends \RecursiveFilterIterator
* Constructor.
*
* @param AssetCollectionIterator $iterator The inner iterator
- * @param array $visited An array of visited asset objects
- * @param array $sources An array of visited source strings
+ * @param array $visited An array of visited asset objects
+ * @param array $sources An array of visited source strings
*/
- public function __construct(AssetCollectionIterator $iterator, array $visited = array(), array $sources = array())
- {
+ public function __construct(AssetCollectionIterator $iterator, array $visited = array(), array $sources = array()) {
parent::__construct($iterator);
$this->visited = $visited;
@@ -47,14 +46,13 @@ class AssetCollectionFilterIterator extends \RecursiveFilterIterator
*
* @return Boolean Returns true if we have not seen this asset yet
*/
- public function accept()
- {
- $asset = $this->getInnerIterator()->current(true);
- $duplicate = false;
+ public function accept() {
+ $asset = $this->getInnerIterator()->current(TRUE);
+ $duplicate = FALSE;
// check strict equality
- if (in_array($asset, $this->visited, true)) {
- $duplicate = true;
+ if (in_array($asset, $this->visited, TRUE)) {
+ $duplicate = TRUE;
} else {
$this->visited[] = $asset;
}
@@ -63,9 +61,9 @@ class AssetCollectionFilterIterator extends \RecursiveFilterIterator
$sourceRoot = $asset->getSourceRoot();
$sourcePath = $asset->getSourcePath();
if ($sourceRoot && $sourcePath) {
- $source = $sourceRoot.'/'.$sourcePath;
+ $source = $sourceRoot . '/' . $sourcePath;
if (in_array($source, $this->sources)) {
- $duplicate = true;
+ $duplicate = TRUE;
} else {
$this->sources[] = $source;
}
@@ -77,8 +75,7 @@ class AssetCollectionFilterIterator extends \RecursiveFilterIterator
/**
* Passes visited objects and source URLs to the child iterator.
*/
- public function getChildren()
- {
+ public function getChildren() {
return new self($this->getInnerIterator()->getChildren(), $this->visited, $this->sources);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php
index e4cf128..c5f9bcd 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/Iterator/AssetCollectionIterator.php
@@ -29,18 +29,17 @@ class AssetCollectionIterator implements \RecursiveIterator
private $output;
private $clones;
- public function __construct(AssetCollectionInterface $coll, \SplObjectStorage $clones)
- {
- $this->assets = $coll->all();
+ public function __construct(AssetCollectionInterface $coll, \SplObjectStorage $clones) {
+ $this->assets = $coll->all();
$this->filters = $coll->getFilters();
- $this->vars = $coll->getVars();
- $this->output = $coll->getTargetPath();
- $this->clones = $clones;
+ $this->vars = $coll->getVars();
+ $this->output = $coll->getTargetPath();
+ $this->clones = $clones;
- if (false === $pos = strrpos($this->output, '.')) {
+ if (FALSE === $pos = strrpos($this->output, '.')) {
$this->output .= '_*';
} else {
- $this->output = substr($this->output, 0, $pos).'_*'.substr($this->output, $pos);
+ $this->output = substr($this->output, 0, $pos) . '_*' . substr($this->output, $pos);
}
}
@@ -51,8 +50,7 @@ class AssetCollectionIterator implements \RecursiveIterator
*
* @return \Assetic\Asset\AssetInterface
*/
- public function current($raw = false)
- {
+ public function current($raw = FALSE) {
$asset = current($this->assets);
if ($raw) {
@@ -81,44 +79,37 @@ class AssetCollectionIterator implements \RecursiveIterator
return $clone;
}
- public function key()
- {
+ public function key() {
return key($this->assets);
}
- public function next()
- {
+ public function next() {
return next($this->assets);
}
- public function rewind()
- {
+ public function rewind() {
return reset($this->assets);
}
- public function valid()
- {
- return false !== current($this->assets);
+ public function valid() {
+ return FALSE !== current($this->assets);
}
- public function hasChildren()
- {
+ public function hasChildren() {
return current($this->assets) instanceof AssetCollectionInterface;
}
/**
* @uses current()
*/
- public function getChildren()
- {
+ public function getChildren() {
return new self($this->current(), $this->clones);
}
- private function removeDuplicateVar($name)
- {
+ private function removeDuplicateVar($name) {
foreach ($this->vars as $var) {
- $var = '{'.$var.'}';
- if (false !== strpos($name, $var) && false !== strpos($this->output, $var)) {
+ $var = '{' . $var . '}';
+ if (FALSE !== strpos($name, $var) && FALSE !== strpos($this->output, $var)) {
$name = str_replace($var, '', $name);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php
index d9b9a88..1f1e60d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Asset/StringAsset.php
@@ -26,30 +26,26 @@ class StringAsset extends BaseAsset
/**
* Constructor.
*
- * @param string $content The content of the asset
- * @param array $filters Filters for the asset
+ * @param string $content The content of the asset
+ * @param array $filters Filters for the asset
* @param string $sourceRoot The source asset root directory
* @param string $sourcePath The source asset path
*/
- public function __construct($content, $filters = array(), $sourceRoot = null, $sourcePath = null)
- {
+ public function __construct($content, $filters = array(), $sourceRoot = NULL, $sourcePath = NULL) {
$this->string = $content;
parent::__construct($filters, $sourceRoot, $sourcePath);
}
- public function load(FilterInterface $additionalFilter = null)
- {
+ public function load(FilterInterface $additionalFilter = NULL) {
$this->doLoad($this->string, $additionalFilter);
}
- public function setLastModified($lastModified)
- {
+ public function setLastModified($lastModified) {
$this->lastModified = $lastModified;
}
- public function getLastModified()
- {
+ public function getLastModified() {
return $this->lastModified;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetManager.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetManager.php
index 9b8ee12..631ec8b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetManager.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetManager.php
@@ -31,8 +31,7 @@ class AssetManager
*
* @throws \InvalidArgumentException If there is no asset by that name
*/
- public function get($name)
- {
+ public function get($name) {
if (!isset($this->assets[$name])) {
throw new \InvalidArgumentException(sprintf('There is no "%s" asset.', $name));
}
@@ -47,21 +46,19 @@ class AssetManager
*
* @return Boolean True if the asset has been set, false if not
*/
- public function has($name)
- {
+ public function has($name) {
return isset($this->assets[$name]);
}
/**
* Registers an asset to the current asset manager.
*
- * @param string $name The asset name
+ * @param string $name The asset name
* @param AssetInterface $asset The asset
*
* @throws \InvalidArgumentException If the asset name is invalid
*/
- public function set($name, AssetInterface $asset)
- {
+ public function set($name, AssetInterface $asset) {
if (!ctype_alnum(str_replace('_', '', $name))) {
throw new \InvalidArgumentException(sprintf('The name "%s" is invalid.', $name));
}
@@ -74,16 +71,14 @@ class AssetManager
*
* @return array An array of asset names
*/
- public function getNames()
- {
+ public function getNames() {
return array_keys($this->assets);
}
/**
* Clears all assets.
*/
- public function clear()
- {
+ public function clear() {
$this->assets = array();
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php
index 4f010a4..538ced4 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/AssetWriter.php
@@ -28,13 +28,12 @@ class AssetWriter
/**
* Constructor.
*
- * @param string $dir The base web directory
- * @param array $values Variable values
+ * @param string $dir The base web directory
+ * @param array $values Variable values
*
* @throws \InvalidArgumentException if a variable value is not a string
*/
- public function __construct($dir, array $values = array())
- {
+ public function __construct($dir, array $values = array()) {
foreach ($values as $var => $vals) {
foreach ($vals as $value) {
if (!is_string($value)) {
@@ -47,20 +46,18 @@ class AssetWriter
$this->values = $values;
}
- public function writeManagerAssets(AssetManager $am)
- {
+ public function writeManagerAssets(AssetManager $am) {
foreach ($am->getNames() as $name) {
$this->writeAsset($am->get($name));
}
}
- public function writeAsset(AssetInterface $asset)
- {
+ public function writeAsset(AssetInterface $asset) {
foreach (VarUtils::getCombinations($asset->getVars(), $this->values) as $combination) {
$asset->setValues($combination);
static::write(
- $this->dir.'/'.VarUtils::resolve(
+ $this->dir . '/' . VarUtils::resolve(
$asset->getTargetPath(),
$asset->getVars(),
$asset->getValues()
@@ -70,14 +67,13 @@ class AssetWriter
}
}
- protected static function write($path, $contents)
- {
- if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) {
- throw new \RuntimeException('Unable to create directory '.$dir);
+ protected static function write($path, $contents) {
+ if (!is_dir($dir = dirname($path)) && FALSE === @mkdir($dir, 0777, TRUE)) {
+ throw new \RuntimeException('Unable to create directory ' . $dir);
}
- if (false === @file_put_contents($path, $contents)) {
- throw new \RuntimeException('Unable to write file '.$path);
+ if (FALSE === @file_put_contents($path, $contents)) {
+ throw new \RuntimeException('Unable to write file ' . $path);
}
}
@@ -87,8 +83,7 @@ class AssetWriter
* This method is provided for backward compatibility with certain versions
* of AsseticBundle.
*/
- private function getCombinations(array $vars)
- {
+ private function getCombinations(array $vars) {
return VarUtils::getCombinations($vars, $this->values);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php
index 8c7aa11..b195ea7 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ApcCache.php
@@ -23,20 +23,18 @@ class ApcCache implements CacheInterface
/**
* @see CacheInterface::has()
*/
- public function has($key)
- {
+ public function has($key) {
return apc_exists($key);
}
/**
* @see CacheInterface::get()
*/
- public function get($key)
- {
+ public function get($key) {
$value = apc_fetch($key, $success);
if (!$success) {
- throw new \RuntimeException('There is no cached value for '.$key);
+ throw new \RuntimeException('There is no cached value for ' . $key);
}
return $value;
@@ -45,12 +43,11 @@ class ApcCache implements CacheInterface
/**
* @see CacheInterface::set()
*/
- public function set($key, $value)
- {
+ public function set($key, $value) {
$store = apc_store($key, $value, $this->ttl);
if (!$store) {
- throw new \RuntimeException('Unable to store "'.$key.'" for '.$this->ttl.' seconds.');
+ throw new \RuntimeException('Unable to store "' . $key . '" for ' . $this->ttl . ' seconds.');
}
return $store;
@@ -59,8 +56,7 @@ class ApcCache implements CacheInterface
/**
* @see CacheInterface::remove()
*/
- public function remove($key)
- {
+ public function remove($key) {
return apc_delete($key);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php
index 7f357ac..6ced263 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ArrayCache.php
@@ -23,18 +23,16 @@ class ArrayCache implements CacheInterface
/**
* @see CacheInterface::has()
*/
- public function has($key)
- {
+ public function has($key) {
return isset($this->cache[$key]);
}
/**
* @see CacheInterface::get()
*/
- public function get($key)
- {
+ public function get($key) {
if (!$this->has($key)) {
- throw new \RuntimeException('There is no cached value for '.$key);
+ throw new \RuntimeException('There is no cached value for ' . $key);
}
return $this->cache[$key];
@@ -43,16 +41,14 @@ class ArrayCache implements CacheInterface
/**
* @see CacheInterface::set()
*/
- public function set($key, $value)
- {
+ public function set($key, $value) {
$this->cache[$key] = $value;
}
/**
* @see CacheInterface::remove()
*/
- public function remove($key)
- {
+ public function remove($key) {
unset($this->cache[$key]);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php
index be13310..08e9eb9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/CacheInterface.php
@@ -39,7 +39,7 @@ interface CacheInterface
/**
* Sets a value in the cache.
*
- * @param string $key A unique key
+ * @param string $key A unique key
* @param string $value The value to cache
*/
public function set($key, $value);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php
index e285e0b..3dcfb4d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ConfigCache.php
@@ -25,8 +25,7 @@ class ConfigCache
*
* @param string $dir The cache directory
*/
- public function __construct($dir)
- {
+ public function __construct($dir) {
$this->dir = $dir;
}
@@ -37,8 +36,7 @@ class ConfigCache
*
* @return Boolean True if a file exists
*/
- public function has($resource)
- {
+ public function has($resource) {
return file_exists($this->getSourcePath($resource));
}
@@ -46,21 +44,20 @@ class ConfigCache
* Writes a value to a file.
*
* @param string $resource A cache key
- * @param mixed $value A value to cache
+ * @param mixed $value A value to cache
*/
- public function set($resource, $value)
- {
+ public function set($resource, $value) {
$path = $this->getSourcePath($resource);
- if (!is_dir($dir = dirname($path)) && false === @mkdir($dir, 0777, true)) {
+ if (!is_dir($dir = dirname($path)) && FALSE === @mkdir($dir, 0777, TRUE)) {
// @codeCoverageIgnoreStart
- throw new \RuntimeException('Unable to create directory '.$dir);
+ throw new \RuntimeException('Unable to create directory ' . $dir);
// @codeCoverageIgnoreEnd
}
- if (false === @file_put_contents($path, sprintf("getSourcePath($resource);
if (!file_exists($path)) {
- throw new \RuntimeException('There is no cached value for '.$resource);
+ throw new \RuntimeException('There is no cached value for ' . $resource);
}
return include $path;
@@ -90,17 +86,16 @@ class ConfigCache
*
* @return integer A UNIX timestamp
*/
- public function getTimestamp($resource)
- {
+ public function getTimestamp($resource) {
$path = $this->getSourcePath($resource);
if (!file_exists($path)) {
- throw new \RuntimeException('There is no cached value for '.$resource);
+ throw new \RuntimeException('There is no cached value for ' . $resource);
}
- if (false === $mtime = @filemtime($path)) {
+ if (FALSE === $mtime = @filemtime($path)) {
// @codeCoverageIgnoreStart
- throw new \RuntimeException('Unable to determine file mtime for '.$path);
+ throw new \RuntimeException('Unable to determine file mtime for ' . $path);
// @codeCoverageIgnoreEnd
}
@@ -114,10 +109,9 @@ class ConfigCache
*
* @return string A file path
*/
- private function getSourcePath($resource)
- {
+ private function getSourcePath($resource) {
$key = md5($resource);
- return $this->dir.'/'.$key[0].'/'.$key.'.php';
+ return $this->dir . '/' . $key[0] . '/' . $key . '.php';
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php
index 46ef85f..04dedc2 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php
@@ -21,40 +21,35 @@ class ExpiringCache implements CacheInterface
private $cache;
private $lifetime;
- public function __construct(CacheInterface $cache, $lifetime)
- {
+ public function __construct(CacheInterface $cache, $lifetime) {
$this->cache = $cache;
$this->lifetime = $lifetime;
}
- public function has($key)
- {
+ public function has($key) {
if ($this->cache->has($key)) {
- if (time() < $this->cache->get($key.'.expires')) {
- return true;
+ if (time() < $this->cache->get($key . '.expires')) {
+ return TRUE;
}
- $this->cache->remove($key.'.expires');
+ $this->cache->remove($key . '.expires');
$this->cache->remove($key);
}
- return false;
+ return FALSE;
}
- public function get($key)
- {
+ public function get($key) {
return $this->cache->get($key);
}
- public function set($key, $value)
- {
- $this->cache->set($key.'.expires', time() + $this->lifetime);
+ public function set($key, $value) {
+ $this->cache->set($key . '.expires', time() + $this->lifetime);
$this->cache->set($key, $value);
}
- public function remove($key)
- {
- $this->cache->remove($key.'.expires');
+ public function remove($key) {
+ $this->cache->remove($key . '.expires');
$this->cache->remove($key);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php
index f8eddfd..4e2f64e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Cache/FilesystemCache.php
@@ -20,46 +20,41 @@ class FilesystemCache implements CacheInterface
{
private $dir;
- public function __construct($dir)
- {
+ public function __construct($dir) {
$this->dir = $dir;
}
- public function has($key)
- {
- return file_exists($this->dir.'/'.$key);
+ public function has($key) {
+ return file_exists($this->dir . '/' . $key);
}
- public function get($key)
- {
- $path = $this->dir.'/'.$key;
+ public function get($key) {
+ $path = $this->dir . '/' . $key;
if (!file_exists($path)) {
- throw new \RuntimeException('There is no cached value for '.$key);
+ throw new \RuntimeException('There is no cached value for ' . $key);
}
return file_get_contents($path);
}
- public function set($key, $value)
- {
- if (!is_dir($this->dir) && false === @mkdir($this->dir, 0777, true)) {
- throw new \RuntimeException('Unable to create directory '.$this->dir);
+ public function set($key, $value) {
+ if (!is_dir($this->dir) && FALSE === @mkdir($this->dir, 0777, TRUE)) {
+ throw new \RuntimeException('Unable to create directory ' . $this->dir);
}
- $path = $this->dir.'/'.$key;
+ $path = $this->dir . '/' . $key;
- if (false === @file_put_contents($path, $value)) {
- throw new \RuntimeException('Unable to write file '.$path);
+ if (FALSE === @file_put_contents($path, $value)) {
+ throw new \RuntimeException('Unable to write file ' . $path);
}
}
- public function remove($key)
- {
- $path = $this->dir.'/'.$key;
+ public function remove($key) {
+ $path = $this->dir . '/' . $key;
- if (file_exists($path) && false === @unlink($path)) {
- throw new \RuntimeException('Unable to remove file '.$path);
+ if (file_exists($path) && FALSE === @unlink($path)) {
+ throw new \RuntimeException('Unable to remove file ' . $path);
}
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php
index 03a230b..ad250ff 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Exception/FilterException.php
@@ -23,49 +23,44 @@ class FilterException extends \RuntimeException implements Exception
private $originalMessage;
private $input;
- public static function fromProcess(Process $proc)
- {
+ public static function fromProcess(Process $proc) {
$message = sprintf("An error occurred while running:\n%s", $proc->getCommandLine());
$errorOutput = $proc->getErrorOutput();
if (!empty($errorOutput)) {
- $message .= "\n\nError Output:\n".str_replace("\r", '', $errorOutput);
+ $message .= "\n\nError Output:\n" . str_replace("\r", '', $errorOutput);
}
$output = $proc->getOutput();
if (!empty($output)) {
- $message .= "\n\nOutput:\n".str_replace("\r", '', $output);
+ $message .= "\n\nOutput:\n" . str_replace("\r", '', $output);
}
return new self($message);
}
- public function __construct($message, $code = 0, \Exception $previous = null)
- {
+ public function __construct($message, $code = 0, \Exception $previous = NULL) {
parent::__construct($message, $code, $previous);
$this->originalMessage = $message;
}
- public function setInput($input)
- {
+ public function setInput($input) {
$this->input = $input;
$this->updateMessage();
return $this;
}
- public function getInput()
- {
+ public function getInput() {
return $this->input;
}
- private function updateMessage()
- {
+ private function updateMessage() {
$message = $this->originalMessage;
if (!empty($this->input)) {
- $message .= "\n\nInput:\n".$this->input;
+ $message .= "\n\nInput:\n" . $this->input;
}
$this->message = $message;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php
index 951e1c8..d02a914 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticExtension.php
@@ -20,8 +20,7 @@ class AsseticExtension extends \Twig_Extension implements \Twig_Extension_Global
protected $functions;
protected $valueSupplier;
- public function __construct(AssetFactory $factory, $functions = array(), ValueSupplierInterface $valueSupplier = null)
- {
+ public function __construct(AssetFactory $factory, $functions = array(), ValueSupplierInterface $valueSupplier = NULL) {
$this->factory = $factory;
$this->functions = array();
$this->valueSupplier = $valueSupplier;
@@ -35,17 +34,15 @@ class AsseticExtension extends \Twig_Extension implements \Twig_Extension_Global
}
}
- public function getTokenParsers()
- {
+ public function getTokenParsers() {
return array(
new AsseticTokenParser($this->factory, 'javascripts', 'js/*.js'),
new AsseticTokenParser($this->factory, 'stylesheets', 'css/*.css'),
- new AsseticTokenParser($this->factory, 'image', 'images/*', true),
+ new AsseticTokenParser($this->factory, 'image', 'images/*', TRUE),
);
}
- public function getFunctions()
- {
+ public function getFunctions() {
$functions = array();
foreach ($this->functions as $function => $filter) {
$functions[] = new AsseticFilterFunction($function);
@@ -54,23 +51,20 @@ class AsseticExtension extends \Twig_Extension implements \Twig_Extension_Global
return $functions;
}
- public function getGlobals()
- {
+ public function getGlobals() {
return array(
'assetic' => array(
'debug' => $this->factory->isDebug(),
- 'vars' => null !== $this->valueSupplier ? new ValueContainer($this->valueSupplier) : array(),
+ 'vars' => NULL !== $this->valueSupplier ? new ValueContainer($this->valueSupplier) : array(),
),
);
}
- public function getFilterInvoker($function)
- {
+ public function getFilterInvoker($function) {
return new AsseticFilterInvoker($this->factory, $this->functions[$function]);
}
- public function getName()
- {
+ public function getName() {
return 'assetic';
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php
index 2c2b13c..95304ea 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterFunction.php
@@ -13,11 +13,10 @@ namespace Assetic\Extension\Twig;
class AsseticFilterFunction extends \Twig_SimpleFunction
{
- public function __construct($name, $options = array())
- {
- parent::__construct($name, null, array_merge($options, array(
- 'needs_environment' => false,
- 'needs_context' => false,
+ public function __construct($name, $options = array()) {
+ parent::__construct($name, NULL, array_merge($options, array(
+ 'needs_environment' => FALSE,
+ 'needs_context' => FALSE,
'node_class' => '\Assetic\Extension\Twig\AsseticFilterNode',
)));
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php
index 1b70e43..2bd85f8 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterInvoker.php
@@ -22,36 +22,31 @@ class AsseticFilterInvoker
private $filters;
private $options;
- public function __construct($factory, $filter)
- {
+ public function __construct($factory, $filter) {
$this->factory = $factory;
if (is_array($filter) && isset($filter['filter'])) {
- $this->filters = (array) $filter['filter'];
- $this->options = isset($filter['options']) ? (array) $filter['options'] : array();
+ $this->filters = (array)$filter['filter'];
+ $this->options = isset($filter['options']) ? (array)$filter['options'] : array();
} else {
- $this->filters = (array) $filter;
+ $this->filters = (array)$filter;
$this->options = array();
}
}
- public function getFactory()
- {
+ public function getFactory() {
return $this->factory;
}
- public function getFilters()
- {
+ public function getFilters() {
return $this->filters;
}
- public function getOptions()
- {
+ public function getOptions() {
return $this->options;
}
- public function invoke($input, array $options = array())
- {
+ public function invoke($input, array $options = array()) {
$asset = $this->factory->createAsset($input, $this->filters, $options + $this->options);
return $asset->getTargetPath();
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterNode.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterNode.php
index 3fe05ac..550e0df 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterNode.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticFilterNode.php
@@ -13,8 +13,7 @@ namespace Assetic\Extension\Twig;
class AsseticFilterNode extends \Twig_Node_Expression_Function
{
- protected function compileCallable(\Twig_Compiler $compiler)
- {
+ protected function compileCallable(\Twig_Compiler $compiler) {
$compiler->raw(sprintf('$this->env->getExtension(\'Assetic\\Extension\\Twig\\AsseticExtension\')->getFilterInvoker(\'%s\')->invoke', $this->getAttribute('name')));
$this->compileArguments($compiler);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php
index 950e46c..9200d2d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticNode.php
@@ -24,21 +24,20 @@ class AsseticNode extends \Twig_Node
* * combine: Whether to combine assets
* * var_name: The name of the variable to expose to the body node
*
- * @param AssetInterface $asset The asset
- * @param \Twig_Node $body The body node
- * @param array $inputs An array of input strings
- * @param array $filters An array of filter strings
- * @param string $name The name of the asset
- * @param array $attributes An array of attributes
- * @param integer $lineno The line number
- * @param string $tag The tag name
+ * @param AssetInterface $asset The asset
+ * @param \Twig_Node $body The body node
+ * @param array $inputs An array of input strings
+ * @param array $filters An array of filter strings
+ * @param string $name The name of the asset
+ * @param array $attributes An array of attributes
+ * @param integer $lineno The line number
+ * @param string $tag The tag name
*/
- public function __construct(AssetInterface $asset, \Twig_Node $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = null)
- {
+ public function __construct(AssetInterface $asset, \Twig_Node $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = NULL) {
$nodes = array('body' => $body);
$attributes = array_replace(
- array('debug' => null, 'combine' => null, 'var_name' => 'asset_url'),
+ array('debug' => NULL, 'combine' => NULL, 'var_name' => 'asset_url'),
$attributes,
array('asset' => $asset, 'inputs' => $inputs, 'filters' => $filters, 'name' => $name)
);
@@ -46,38 +45,34 @@ class AsseticNode extends \Twig_Node
parent::__construct($nodes, $attributes, $lineno, $tag);
}
- public function compile(\Twig_Compiler $compiler)
- {
+ public function compile(\Twig_Compiler $compiler) {
$compiler->addDebugInfo($this);
$combine = $this->getAttribute('combine');
$debug = $this->getAttribute('debug');
- if (null === $combine && null !== $debug) {
+ if (NULL === $combine && NULL !== $debug) {
$combine = !$debug;
}
- if (null === $combine) {
+ if (NULL === $combine) {
$compiler
->write("if (isset(\$context['assetic']['debug']) && \$context['assetic']['debug']) {\n")
- ->indent()
- ;
+ ->indent();
$this->compileDebug($compiler);
$compiler
->outdent()
->write("} else {\n")
- ->indent()
- ;
+ ->indent();
$this->compileAsset($compiler, $this->getAttribute('asset'), $this->getAttribute('name'));
$compiler
->outdent()
- ->write("}\n")
- ;
- } elseif ($combine) {
+ ->write("}\n");
+ } else if ($combine) {
$this->compileAsset($compiler, $this->getAttribute('asset'), $this->getAttribute('name'));
} else {
$this->compileDebug($compiler);
@@ -86,21 +81,18 @@ class AsseticNode extends \Twig_Node
$compiler
->write('unset($context[')
->repr($this->getAttribute('var_name'))
- ->raw("]);\n")
- ;
+ ->raw("]);\n");
}
- protected function compileDebug(\Twig_Compiler $compiler)
- {
+ protected function compileDebug(\Twig_Compiler $compiler) {
$i = 0;
foreach ($this->getAttribute('asset') as $leaf) {
- $leafName = $this->getAttribute('name').'_'.$i++;
+ $leafName = $this->getAttribute('name') . '_' . $i++;
$this->compileAsset($compiler, $leaf, $leafName);
}
}
- protected function compileAsset(\Twig_Compiler $compiler, AssetInterface $asset, $name)
- {
+ protected function compileAsset(\Twig_Compiler $compiler, AssetInterface $asset, $name) {
if ($vars = $asset->getVars()) {
$compiler->write("// check variable conditions\n");
@@ -108,10 +100,9 @@ class AsseticNode extends \Twig_Node
$compiler
->write("if (!isset(\$context['assetic']['vars']['$var'])) {\n")
->indent()
- ->write("throw new \RuntimeException(sprintf('The asset \"".$name."\" expected variable \"".$var."\" to be set, but got only these vars: %s. Did you set-up a value supplier?', isset(\$context['assetic']['vars']) && \$context['assetic']['vars'] ? implode(', ', \$context['assetic']['vars']) : '# none #'));\n")
+ ->write("throw new \RuntimeException(sprintf('The asset \"" . $name . "\" expected variable \"" . $var . "\" to be set, but got only these vars: %s. Did you set-up a value supplier?', isset(\$context['assetic']['vars']) && \$context['assetic']['vars'] ? implode(', ', \$context['assetic']['vars']) : '# none #'));\n")
->outdent()
- ->write("}\n")
- ;
+ ->write("}\n");
}
$compiler->raw("\n");
@@ -121,19 +112,16 @@ class AsseticNode extends \Twig_Node
->write("// asset \"$name\"\n")
->write('$context[')
->repr($this->getAttribute('var_name'))
- ->raw('] = ')
- ;
+ ->raw('] = ');
$this->compileAssetUrl($compiler, $asset, $name);
$compiler
->raw(";\n")
- ->subcompile($this->getNode('body'))
- ;
+ ->subcompile($this->getNode('body'));
}
- protected function compileAssetUrl(\Twig_Compiler $compiler, AssetInterface $asset, $name)
- {
+ protected function compileAssetUrl(\Twig_Compiler $compiler, AssetInterface $asset, $name) {
if (!$vars = $asset->getVars()) {
$compiler->repr($asset->getTargetPath());
@@ -145,21 +133,19 @@ class AsseticNode extends \Twig_Node
->string($asset->getTargetPath())
->raw(", array(");
- $first = true;
+ $first = TRUE;
foreach ($vars as $var) {
if (!$first) {
$compiler->raw(", ");
}
- $first = false;
+ $first = FALSE;
$compiler
- ->string("{".$var."}")
- ->raw(" => \$context['assetic']['vars']['$var']")
- ;
+ ->string("{" . $var . "}")
+ ->raw(" => \$context['assetic']['vars']['$var']");
}
$compiler
- ->raw("))")
- ;
+ ->raw("))");
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php
index 614f567..c5bba8b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/AsseticTokenParser.php
@@ -28,30 +28,28 @@ class AsseticTokenParser extends \Twig_TokenParser
* Attributes can be added to the tag by passing names as the options
* array. These values, if found, will be passed to the factory and node.
*
- * @param AssetFactory $factory The asset factory
- * @param string $tag The tag name
- * @param string $output The default output string
- * @param Boolean $single Whether to force a single asset
- * @param array $extensions Additional attribute names to look for
+ * @param AssetFactory $factory The asset factory
+ * @param string $tag The tag name
+ * @param string $output The default output string
+ * @param Boolean $single Whether to force a single asset
+ * @param array $extensions Additional attribute names to look for
*/
- public function __construct(AssetFactory $factory, $tag, $output, $single = false, array $extensions = array())
- {
- $this->factory = $factory;
- $this->tag = $tag;
- $this->output = $output;
- $this->single = $single;
+ public function __construct(AssetFactory $factory, $tag, $output, $single = FALSE, array $extensions = array()) {
+ $this->factory = $factory;
+ $this->tag = $tag;
+ $this->output = $output;
+ $this->single = $single;
$this->extensions = $extensions;
}
- public function parse(\Twig_Token $token)
- {
+ public function parse(\Twig_Token $token) {
$inputs = array();
$filters = array();
- $name = null;
+ $name = NULL;
$attributes = array(
- 'output' => $this->output,
+ 'output' => $this->output,
'var_name' => 'asset_url',
- 'vars' => array(),
+ 'vars' => array(),
);
$stream = $this->parser->getStream();
@@ -59,37 +57,37 @@ class AsseticTokenParser extends \Twig_TokenParser
if ($stream->test(\Twig_Token::STRING_TYPE)) {
// '@jquery', 'js/src/core/*', 'js/src/extra.js'
$inputs[] = $stream->next()->getValue();
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'filter')) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, 'filter')) {
// filter='yui_js'
$stream->next();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
$filters = array_merge($filters, array_filter(array_map('trim', explode(',', $stream->expect(\Twig_Token::STRING_TYPE)->getValue()))));
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'output')) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, 'output')) {
// output='js/packed/*.js' OR output='js/core.js'
$stream->next();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
$attributes['output'] = $stream->expect(\Twig_Token::STRING_TYPE)->getValue();
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'name')) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, 'name')) {
// name='core_js'
$stream->next();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
$name = $stream->expect(\Twig_Token::STRING_TYPE)->getValue();
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'as')) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, 'as')) {
// as='the_url'
$stream->next();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
$attributes['var_name'] = $stream->expect(\Twig_Token::STRING_TYPE)->getValue();
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'debug')) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, 'debug')) {
// debug=true
$stream->next();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
$attributes['debug'] = 'true' == $stream->expect(\Twig_Token::NAME_TYPE, array('true', 'false'))->getValue();
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'combine')) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, 'combine')) {
// combine=true
$stream->next();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
$attributes['combine'] = 'true' == $stream->expect(\Twig_Token::NAME_TYPE, array('true', 'false'))->getValue();
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, 'vars')) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, 'vars')) {
// vars=['locale','browser']
$stream->next();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
@@ -106,7 +104,7 @@ class AsseticTokenParser extends \Twig_TokenParser
}
$stream->expect(\Twig_Token::PUNCTUATION_TYPE, ']');
- } elseif ($stream->test(\Twig_Token::NAME_TYPE, $this->extensions)) {
+ } else if ($stream->test(\Twig_Token::NAME_TYPE, $this->extensions)) {
// an arbitrary configured attribute
$key = $stream->next()->getValue();
$stream->expect(\Twig_Token::OPERATOR_TYPE, '=');
@@ -119,7 +117,7 @@ class AsseticTokenParser extends \Twig_TokenParser
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
- $body = $this->parser->subparse(array($this, 'testEndTag'), true);
+ $body = $this->parser->subparse(array($this, 'testEndTag'), TRUE);
$stream->expect(\Twig_Token::BLOCK_END_TYPE);
@@ -136,30 +134,27 @@ class AsseticTokenParser extends \Twig_TokenParser
return $this->createBodyNode($asset, $body, $inputs, $filters, $name, $attributes, $token->getLine(), $this->getTag());
}
- public function getTag()
- {
+ public function getTag() {
return $this->tag;
}
- public function testEndTag(\Twig_Token $token)
- {
- return $token->test(array('end'.$this->getTag()));
+ public function testEndTag(\Twig_Token $token) {
+ return $token->test(array('end' . $this->getTag()));
}
/**
* @param AssetInterface $asset
- * @param \Twig_Node $body
- * @param array $inputs
- * @param array $filters
- * @param string $name
- * @param array $attributes
- * @param int $lineno
- * @param string $tag
+ * @param \Twig_Node $body
+ * @param array $inputs
+ * @param array $filters
+ * @param string $name
+ * @param array $attributes
+ * @param int $lineno
+ * @param string $tag
*
* @return \Twig_Node
*/
- protected function createBodyNode(AssetInterface $asset, \Twig_Node $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = null)
- {
+ protected function createBodyNode(AssetInterface $asset, \Twig_Node $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = NULL) {
$reflector = new \ReflectionMethod($this, 'createNode');
if (__CLASS__ !== $reflector->getDeclaringClass()->name) {
@@ -172,21 +167,20 @@ class AsseticTokenParser extends \Twig_TokenParser
}
/**
- * @param AssetInterface $asset
+ * @param AssetInterface $asset
* @param \Twig_NodeInterface $body
- * @param array $inputs
- * @param array $filters
- * @param string $name
- * @param array $attributes
- * @param int $lineno
- * @param string $tag
+ * @param array $inputs
+ * @param array $filters
+ * @param string $name
+ * @param array $attributes
+ * @param int $lineno
+ * @param string $tag
*
* @return \Twig_Node
*
* @deprecated since 1.3.0, to be removed in 2.0. Use createBodyNode instead.
*/
- protected function createNode(AssetInterface $asset, \Twig_NodeInterface $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = null)
- {
+ protected function createNode(AssetInterface $asset, \Twig_NodeInterface $body, array $inputs, array $filters, $name, array $attributes = array(), $lineno = 0, $tag = NULL) {
@trigger_error(sprintf('The %s method is deprecated since 1.3 and will be removed in 2.0. Use createBodyNode instead.', __METHOD__), E_USER_DEPRECATED);
if (!$body instanceof \Twig_Node) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php
index 2c12d7e..12c2288 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigFormulaLoader.php
@@ -25,17 +25,15 @@ class TwigFormulaLoader implements FormulaLoaderInterface
private $twig;
private $logger;
- public function __construct(\Twig_Environment $twig, LoggerInterface $logger = null)
- {
+ public function __construct(\Twig_Environment $twig, LoggerInterface $logger = NULL) {
$this->twig = $twig;
$this->logger = $logger;
}
- public function load(ResourceInterface $resource)
- {
+ public function load(ResourceInterface $resource) {
try {
- $tokens = $this->twig->tokenize(new \Twig_Source($resource->getContent(), (string) $resource));
- $nodes = $this->twig->parse($tokens);
+ $tokens = $this->twig->tokenize(new \Twig_Source($resource->getContent(), (string)$resource));
+ $nodes = $this->twig->parse($tokens);
} catch (\Exception $e) {
if ($this->logger) {
$this->logger->error(sprintf('The template "%s" contains an error: %s', $resource, $e->getMessage()));
@@ -54,8 +52,7 @@ class TwigFormulaLoader implements FormulaLoaderInterface
*
* @return array An array of asset formulae indexed by name
*/
- private function loadNode(\Twig_Node $node)
- {
+ private function loadNode(\Twig_Node $node) {
$formulae = array();
if ($node instanceof AsseticNode) {
@@ -63,24 +60,24 @@ class TwigFormulaLoader implements FormulaLoaderInterface
$node->getAttribute('inputs'),
$node->getAttribute('filters'),
array(
- 'output' => $node->getAttribute('asset')->getTargetPath(),
- 'name' => $node->getAttribute('name'),
- 'debug' => $node->getAttribute('debug'),
+ 'output' => $node->getAttribute('asset')->getTargetPath(),
+ 'name' => $node->getAttribute('name'),
+ 'debug' => $node->getAttribute('debug'),
'combine' => $node->getAttribute('combine'),
- 'vars' => $node->getAttribute('vars'),
+ 'vars' => $node->getAttribute('vars'),
),
);
- } elseif ($node instanceof AsseticFilterNode) {
+ } else if ($node instanceof AsseticFilterNode) {
$name = $node->getAttribute('name');
$arguments = array();
foreach ($node->getNode('arguments') as $argument) {
- $arguments[] = eval('return '.$this->twig->compile($argument).';');
+ $arguments[] = eval('return ' . $this->twig->compile($argument) . ';');
}
$invoker = $this->twig->getExtension('Assetic\Extension\Twig\AsseticExtension')->getFilterInvoker($name);
- $inputs = isset($arguments[0]) ? (array) $arguments[0] : array();
+ $inputs = isset($arguments[0]) ? (array)$arguments[0] : array();
$filters = $invoker->getFilters();
$options = array_replace($invoker->getOptions(), isset($arguments[1]) ? $arguments[1] : array());
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php
index 21d040a..c7389f3 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/TwigResource.php
@@ -23,14 +23,12 @@ class TwigResource implements ResourceInterface
private $loader;
private $name;
- public function __construct(\Twig_LoaderInterface $loader, $name)
- {
+ public function __construct(\Twig_LoaderInterface $loader, $name) {
$this->loader = $loader;
$this->name = $name;
}
- public function getContent()
- {
+ public function getContent() {
try {
return method_exists($this->loader, 'getSourceContext')
? $this->loader->getSourceContext($this->name)->getCode()
@@ -40,17 +38,15 @@ class TwigResource implements ResourceInterface
}
}
- public function isFresh($timestamp)
- {
+ public function isFresh($timestamp) {
try {
return $this->loader->isFresh($this->name, $timestamp);
} catch (\Twig_Error_Loader $e) {
- return false;
+ return FALSE;
}
}
- public function __toString()
- {
+ public function __toString() {
return $this->name;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php
index e197224..f2ec98d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Extension/Twig/ValueContainer.php
@@ -23,20 +23,17 @@ class ValueContainer implements \ArrayAccess, \IteratorAggregate, \Countable
private $values;
private $valueSupplier;
- public function __construct(ValueSupplierInterface $valueSupplier)
- {
+ public function __construct(ValueSupplierInterface $valueSupplier) {
$this->valueSupplier = $valueSupplier;
}
- public function offsetExists($offset)
- {
+ public function offsetExists($offset) {
$this->initialize();
return array_key_exists($offset, $this->values);
}
- public function offsetGet($offset)
- {
+ public function offsetGet($offset) {
$this->initialize();
if (!array_key_exists($offset, $this->values)) {
@@ -46,33 +43,28 @@ class ValueContainer implements \ArrayAccess, \IteratorAggregate, \Countable
return $this->values[$offset];
}
- public function offsetSet($offset, $value)
- {
+ public function offsetSet($offset, $value) {
throw new \BadMethodCallException('The ValueContainer is read-only.');
}
- public function offsetUnset($offset)
- {
+ public function offsetUnset($offset) {
throw new \BadMethodCallException('The ValueContainer is read-only.');
}
- public function getIterator()
- {
+ public function getIterator() {
$this->initialize();
return new \ArrayIterator($this->values);
}
- public function count()
- {
+ public function count() {
$this->initialize();
return count($this->values);
}
- private function initialize()
- {
- if (null === $this->values) {
+ private function initialize() {
+ if (NULL === $this->values) {
$this->values = $this->valueSupplier->getValues();
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php
index e267196..168c77f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/AssetFactory.php
@@ -40,15 +40,14 @@ class AssetFactory
/**
* Constructor.
*
- * @param string $root The default root directory
+ * @param string $root The default root directory
* @param Boolean $debug Filters prefixed with a "?" will be omitted in debug mode
*/
- public function __construct($root, $debug = false)
- {
- $this->root = rtrim($root, '/');
- $this->debug = $debug;
- $this->output = 'assetic/*';
- $this->workers = array();
+ public function __construct($root, $debug = FALSE) {
+ $this->root = rtrim($root, '/');
+ $this->debug = $debug;
+ $this->output = 'assetic/*';
+ $this->workers = array();
}
/**
@@ -56,8 +55,7 @@ class AssetFactory
*
* @param Boolean $debug Debug mode
*/
- public function setDebug($debug)
- {
+ public function setDebug($debug) {
$this->debug = $debug;
}
@@ -66,8 +64,7 @@ class AssetFactory
*
* @return Boolean Debug mode
*/
- public function isDebug()
- {
+ public function isDebug() {
return $this->debug;
}
@@ -76,8 +73,7 @@ class AssetFactory
*
* @param string $output The default output string
*/
- public function setDefaultOutput($output)
- {
+ public function setDefaultOutput($output) {
$this->output = $output;
}
@@ -86,8 +82,7 @@ class AssetFactory
*
* @param WorkerInterface $worker A worker
*/
- public function addWorker(WorkerInterface $worker)
- {
+ public function addWorker(WorkerInterface $worker) {
$this->workers[] = $worker;
}
@@ -96,8 +91,7 @@ class AssetFactory
*
* @return AssetManager|null The asset manager
*/
- public function getAssetManager()
- {
+ public function getAssetManager() {
return $this->am;
}
@@ -106,8 +100,7 @@ class AssetFactory
*
* @param AssetManager $am The asset manager
*/
- public function setAssetManager(AssetManager $am)
- {
+ public function setAssetManager(AssetManager $am) {
$this->am = $am;
}
@@ -116,8 +109,7 @@ class AssetFactory
*
* @return FilterManager|null The filter manager
*/
- public function getFilterManager()
- {
+ public function getFilterManager() {
return $this->fm;
}
@@ -126,8 +118,7 @@ class AssetFactory
*
* @param FilterManager $fm The filter manager
*/
- public function setFilterManager(FilterManager $fm)
- {
+ public function setFilterManager(FilterManager $fm) {
$this->fm = $fm;
}
@@ -144,14 +135,13 @@ class AssetFactory
* * debug: Forces debug mode on or off for this asset
* * root: An array or string of more root directories
*
- * @param array|string $inputs An array of input strings
+ * @param array|string $inputs An array of input strings
* @param array|string $filters An array of filter names
- * @param array $options An array of options
+ * @param array $options An array of options
*
* @return AssetCollection An asset collection
*/
- public function createAsset($inputs = array(), $filters = array(), array $options = array())
- {
+ public function createAsset($inputs = array(), $filters = array(), array $options = array()) {
if (!is_array($inputs)) {
$inputs = array($inputs);
}
@@ -196,7 +186,7 @@ class AssetFactory
$asset->add(call_user_func_array(array($this, 'createAsset'), $input));
} else {
$asset->add($this->parseInput($input, $options));
- $extensions[pathinfo($input, PATHINFO_EXTENSION)] = true;
+ $extensions[pathinfo($input, PATHINFO_EXTENSION)] = TRUE;
}
}
@@ -204,7 +194,7 @@ class AssetFactory
foreach ($filters as $filter) {
if ('?' != $filter[0]) {
$asset->ensureFilter($this->getFilter($filter));
- } elseif (!$options['debug']) {
+ } else if (!$options['debug']) {
$asset->ensureFilter($this->getFilter(substr($filter, 1)));
}
}
@@ -213,21 +203,21 @@ class AssetFactory
if (!empty($options['vars'])) {
$toAdd = array();
foreach ($options['vars'] as $var) {
- if (false !== strpos($options['output'], '{'.$var.'}')) {
+ if (FALSE !== strpos($options['output'], '{' . $var . '}')) {
continue;
}
- $toAdd[] = '{'.$var.'}';
+ $toAdd[] = '{' . $var . '}';
}
if ($toAdd) {
- $options['output'] = str_replace('*', '*.'.implode('.', $toAdd), $options['output']);
+ $options['output'] = str_replace('*', '*.' . implode('.', $toAdd), $options['output']);
}
}
// append consensus extension if missing
if (1 == count($extensions) && !pathinfo($options['output'], PATHINFO_EXTENSION) && $extension = key($extensions)) {
- $options['output'] .= '.'.$extension;
+ $options['output'] .= '.' . $extension;
}
// output --> target url
@@ -237,19 +227,17 @@ class AssetFactory
return $this->applyWorkers($asset);
}
- public function generateAssetName($inputs, $filters, $options = array())
- {
+ public function generateAssetName($inputs, $filters, $options = array()) {
foreach (array_diff(array_keys($options), array('output', 'debug', 'root')) as $key) {
unset($options[$key]);
}
ksort($options);
- return substr(sha1(serialize($inputs).serialize($filters).serialize($options)), 0, 7);
+ return substr(sha1(serialize($inputs) . serialize($filters) . serialize($options)), 0, 7);
}
- public function getLastModified(AssetInterface $asset)
- {
+ public function getLastModified(AssetInterface $asset) {
$mtime = 0;
foreach ($asset instanceof AssetCollectionInterface ? $asset : array($asset) as $leaf) {
$mtime = max($mtime, $leaf->getLastModified());
@@ -295,18 +283,17 @@ class AssetFactory
*
* Both globs and paths will be absolutized using the current root directory.
*
- * @param string $input An input string
- * @param array $options An array of options
+ * @param string $input An input string
+ * @param array $options An array of options
*
* @return AssetInterface An asset
*/
- protected function parseInput($input, array $options = array())
- {
+ protected function parseInput($input, array $options = array()) {
if ('@' == $input[0]) {
return $this->createAssetReference(substr($input, 1));
}
- if (false !== strpos($input, '://') || 0 === strpos($input, '//')) {
+ if (FALSE !== strpos($input, '://') || 0 === strpos($input, '//')) {
return $this->createHttpAsset($input, $options['vars']);
}
@@ -314,28 +301,26 @@ class AssetFactory
if ($root = self::findRootDir($input, $options['root'])) {
$path = ltrim(substr($input, strlen($root)), '/');
} else {
- $path = null;
+ $path = NULL;
}
} else {
- $root = $this->root;
- $path = $input;
- $input = $this->root.'/'.$path;
+ $root = $this->root;
+ $path = $input;
+ $input = $this->root . '/' . $path;
}
- if (false !== strpos($input, '*')) {
+ if (FALSE !== strpos($input, '*')) {
return $this->createGlobAsset($input, $root, $options['vars']);
}
return $this->createFileAsset($input, $root, $path, $options['vars']);
}
- protected function createAssetCollection(array $assets = array(), array $options = array())
- {
- return new AssetCollection($assets, array(), null, isset($options['vars']) ? $options['vars'] : array());
+ protected function createAssetCollection(array $assets = array(), array $options = array()) {
+ return new AssetCollection($assets, array(), NULL, isset($options['vars']) ? $options['vars'] : array());
}
- protected function createAssetReference($name)
- {
+ protected function createAssetReference($name) {
if (!$this->am) {
throw new \LogicException('There is no asset manager.');
}
@@ -343,23 +328,19 @@ class AssetFactory
return new AssetReference($this->am, $name);
}
- protected function createHttpAsset($sourceUrl, $vars)
- {
- return new HttpAsset($sourceUrl, array(), false, $vars);
+ protected function createHttpAsset($sourceUrl, $vars) {
+ return new HttpAsset($sourceUrl, array(), FALSE, $vars);
}
- protected function createGlobAsset($glob, $root = null, $vars)
- {
+ protected function createGlobAsset($glob, $root = NULL, $vars) {
return new GlobAsset($glob, array(), $root, $vars);
}
- protected function createFileAsset($source, $root = null, $path = null, $vars)
- {
+ protected function createFileAsset($source, $root = NULL, $path = NULL, $vars) {
return new FileAsset($source, array(), $root, $path, $vars);
}
- protected function getFilter($name)
- {
+ protected function getFilter($name) {
if (!$this->fm) {
throw new \LogicException('There is no filter manager.');
}
@@ -377,8 +358,7 @@ class AssetFactory
*
* @return AssetCollectionInterface
*/
- private function applyWorkers(AssetCollectionInterface $asset)
- {
+ private function applyWorkers(AssetCollectionInterface $asset) {
foreach ($asset as $leaf) {
foreach ($this->workers as $worker) {
$retval = $worker->process($leaf, $this);
@@ -400,21 +380,19 @@ class AssetFactory
return $asset instanceof AssetCollectionInterface ? $asset : $this->createAssetCollection(array($asset));
}
- private static function isAbsolutePath($path)
- {
+ private static function isAbsolutePath($path) {
return '/' == $path[0] || '\\' == $path[0] || (3 < strlen($path) && ctype_alpha($path[0]) && $path[1] == ':' && ('\\' == $path[2] || '/' == $path[2]));
}
/**
* Loops through the root directories and returns the first match.
*
- * @param string $path An absolute path
- * @param array $roots An array of root directories
+ * @param string $path An absolute path
+ * @param array $roots An array of root directories
*
* @return string|null The matching root directory, if found
*/
- private static function findRootDir($path, array $roots)
- {
+ private static function findRootDir($path, array $roots) {
foreach ($roots as $root) {
if (0 === strpos($path, $root)) {
return $root;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php
index bef72e5..bcbcad4 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php
@@ -34,16 +34,15 @@ class LazyAssetManager extends AssetManager
* Constructor.
*
* @param AssetFactory $factory The asset factory
- * @param array $loaders An array of loaders indexed by alias
+ * @param array $loaders An array of loaders indexed by alias
*/
- public function __construct(AssetFactory $factory, $loaders = array())
- {
+ public function __construct(AssetFactory $factory, $loaders = array()) {
$this->factory = $factory;
$this->loaders = array();
$this->resources = array();
$this->formulae = array();
- $this->loaded = false;
- $this->loading = false;
+ $this->loaded = FALSE;
+ $this->loading = FALSE;
foreach ($loaders as $alias => $loader) {
$this->setLoader($alias, $loader);
@@ -53,25 +52,23 @@ class LazyAssetManager extends AssetManager
/**
* Adds a loader to the asset manager.
*
- * @param string $alias An alias for the loader
+ * @param string $alias An alias for the loader
* @param FormulaLoaderInterface $loader A loader
*/
- public function setLoader($alias, FormulaLoaderInterface $loader)
- {
+ public function setLoader($alias, FormulaLoaderInterface $loader) {
$this->loaders[$alias] = $loader;
- $this->loaded = false;
+ $this->loaded = FALSE;
}
/**
* Adds a resource to the asset manager.
*
* @param ResourceInterface $resource A resource
- * @param string $loader The loader alias for this resource
+ * @param string $loader The loader alias for this resource
*/
- public function addResource(ResourceInterface $resource, $loader)
- {
+ public function addResource(ResourceInterface $resource, $loader) {
$this->resources[$loader][] = $resource;
- $this->loaded = false;
+ $this->loaded = FALSE;
}
/**
@@ -79,8 +76,7 @@ class LazyAssetManager extends AssetManager
*
* @return array An array of resources
*/
- public function getResources()
- {
+ public function getResources() {
$resources = array();
foreach ($this->resources as $r) {
$resources = array_merge($resources, $r);
@@ -96,8 +92,7 @@ class LazyAssetManager extends AssetManager
*
* @return Boolean If there is a formula
*/
- public function hasFormula($name)
- {
+ public function hasFormula($name) {
if (!$this->loaded) {
$this->load();
}
@@ -114,8 +109,7 @@ class LazyAssetManager extends AssetManager
*
* @throws \InvalidArgumentException If there is no formula by that name
*/
- public function getFormula($name)
- {
+ public function getFormula($name) {
if (!$this->loaded) {
$this->load();
}
@@ -130,11 +124,10 @@ class LazyAssetManager extends AssetManager
/**
* Sets a formula on the asset manager.
*
- * @param string $name An asset name
- * @param array $formula A formula
+ * @param string $name An asset name
+ * @param array $formula A formula
*/
- public function setFormula($name, array $formula)
- {
+ public function setFormula($name, array $formula) {
$this->formulae[$name] = $formula;
}
@@ -143,17 +136,16 @@ class LazyAssetManager extends AssetManager
*
* @throws \LogicException If a resource has been added to an invalid loader
*/
- public function load()
- {
+ public function load() {
if ($this->loading) {
return;
}
if ($diff = array_diff(array_keys($this->resources), array_keys($this->loaders))) {
- throw new \LogicException('The following loader(s) are not registered: '.implode(', ', $diff));
+ throw new \LogicException('The following loader(s) are not registered: ' . implode(', ', $diff));
}
- $this->loading = true;
+ $this->loading = TRUE;
foreach ($this->resources as $loader => $resources) {
foreach ($resources as $resource) {
@@ -161,12 +153,11 @@ class LazyAssetManager extends AssetManager
}
}
- $this->loaded = true;
- $this->loading = false;
+ $this->loaded = TRUE;
+ $this->loading = FALSE;
}
- public function get($name)
- {
+ public function get($name) {
if (!$this->loaded) {
$this->load();
}
@@ -180,8 +171,7 @@ class LazyAssetManager extends AssetManager
return parent::get($name);
}
- public function has($name)
- {
+ public function has($name) {
if (!$this->loaded) {
$this->load();
}
@@ -189,8 +179,7 @@ class LazyAssetManager extends AssetManager
return isset($this->formulae[$name]) || parent::has($name);
}
- public function getNames()
- {
+ public function getNames() {
if (!$this->loaded) {
$this->load();
}
@@ -198,13 +187,11 @@ class LazyAssetManager extends AssetManager
return array_unique(array_merge(parent::getNames(), array_keys($this->formulae)));
}
- public function isDebug()
- {
+ public function isDebug() {
return $this->factory->isDebug();
}
- public function getLastModified(AssetInterface $asset)
- {
+ public function getLastModified(AssetInterface $asset) {
return $this->factory->getLastModified($asset);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php
index 4c747df..1bdadd9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/BasePhpFormulaLoader.php
@@ -25,8 +25,7 @@ abstract class BasePhpFormulaLoader implements FormulaLoaderInterface
protected $factory;
protected $prototypes;
- public function __construct(AssetFactory $factory)
- {
+ public function __construct(AssetFactory $factory) {
$this->factory = $factory;
$this->prototypes = array();
@@ -35,16 +34,14 @@ abstract class BasePhpFormulaLoader implements FormulaLoaderInterface
}
}
- public function addPrototype($prototype, array $options = array())
- {
- $tokens = token_get_all('prototypes[$prototype] = array($tokens, $options);
}
- public function load(ResourceInterface $resource)
- {
+ public function load(ResourceInterface $resource) {
if (!$nbProtos = count($this->prototypes)) {
throw new \LogicException('There are no prototypes registered.');
}
@@ -60,28 +57,32 @@ abstract class BasePhpFormulaLoader implements FormulaLoaderInterface
$current = self::tokenToString($token);
// loop through each prototype (by reference)
foreach (array_keys($this->prototypes) as $i) {
- $prototype = & $this->prototypes[$i][0];
+ $prototype = &$this->prototypes[$i][0];
$options = $this->prototypes[$i][1];
- $buffer = & $buffers[$i];
- $level = & $bufferLevels[$i];
+ $buffer = &$buffers[$i];
+ $level = &$bufferLevels[$i];
if (isset($buffersInWildcard[$i])) {
switch ($current) {
- case '(': ++$level; break;
- case ')': --$level; break;
+ case '(':
+ ++$level;
+ break;
+ case ')':
+ --$level;
+ break;
}
$buffer .= $current;
if (!$level) {
- $calls[] = array($buffer.';', $options);
+ $calls[] = array($buffer . ';', $options);
$buffer = '';
unset($buffersInWildcard[$i]);
}
- } elseif ($current == self::tokenToString(current($prototype))) {
+ } else if ($current == self::tokenToString(current($prototype))) {
$buffer .= $current;
if ('*' == self::tokenToString(next($prototype))) {
- $buffersInWildcard[$i] = true;
+ $buffersInWildcard[$i] = TRUE;
++$level;
}
} else {
@@ -100,8 +101,7 @@ abstract class BasePhpFormulaLoader implements FormulaLoaderInterface
return $formulae;
}
- private function processCall($call, array $protoOptions = array())
- {
+ private function processCall($call, array $protoOptions = array()) {
$tmp = FilesystemUtils::createTemporaryFile('php_formula_loader');
file_put_contents($tmp, implode("\n", array(
'loader = $loader;
$this->configCache = $configCache;
$this->debug = $debug;
}
- public function load(ResourceInterface $resources)
- {
+ public function load(ResourceInterface $resources) {
if (!$resources instanceof IteratorResourceInterface) {
$resources = array($resources);
}
@@ -54,7 +52,7 @@ class CachedFormulaLoader implements FormulaLoaderInterface
$formulae = array();
foreach ($resources as $resource) {
- $id = (string) $resource;
+ $id = (string)$resource;
if (!$this->configCache->has($id) || ($this->debug && !$resource->isFresh($this->configCache->getTimestamp($id)))) {
$formulae += $this->loader->load($resource);
$this->configCache->set($id, $formulae);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php
index 58b56e1..04e8630 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Loader/FunctionCallsFormulaLoader.php
@@ -18,17 +18,15 @@ namespace Assetic\Factory\Loader;
*/
class FunctionCallsFormulaLoader extends BasePhpFormulaLoader
{
- protected function registerPrototypes()
- {
+ protected function registerPrototypes() {
return array(
'assetic_javascripts(*)' => array('output' => 'js/*.js'),
'assetic_stylesheets(*)' => array('output' => 'css/*.css'),
- 'assetic_image(*)' => array('output' => 'images/*'),
+ 'assetic_image(*)' => array('output' => 'images/*'),
);
}
- protected function registerSetupCode()
- {
+ protected function registerSetupCode() {
return <<<'EOF'
function assetic_javascripts()
{
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php
index 6c08900..f041e21 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/CoalescingDirectoryResource.php
@@ -20,8 +20,7 @@ class CoalescingDirectoryResource implements IteratorResourceInterface
{
private $directories;
- public function __construct($directories)
- {
+ public function __construct($directories) {
$this->directories = array();
foreach ($directories as $directory) {
@@ -29,24 +28,21 @@ class CoalescingDirectoryResource implements IteratorResourceInterface
}
}
- public function addDirectory(IteratorResourceInterface $directory)
- {
+ public function addDirectory(IteratorResourceInterface $directory) {
$this->directories[] = $directory;
}
- public function isFresh($timestamp)
- {
+ public function isFresh($timestamp) {
foreach ($this->getFileResources() as $file) {
if (!$file->isFresh($timestamp)) {
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
- public function getContent()
- {
+ public function getContent() {
$parts = array();
foreach ($this->getFileResources() as $file) {
$parts[] = $file->getContent();
@@ -60,32 +56,29 @@ class CoalescingDirectoryResource implements IteratorResourceInterface
*
* @return string An identifying string
*/
- public function __toString()
- {
+ public function __toString() {
$parts = array();
foreach ($this->directories as $directory) {
- $parts[] = (string) $directory;
+ $parts[] = (string)$directory;
}
return implode(',', $parts);
}
- public function getIterator()
- {
+ public function getIterator() {
return new \ArrayIterator($this->getFileResources());
}
/**
* Returns the relative version of a filename.
*
- * @param ResourceInterface $file The file
+ * @param ResourceInterface $file The file
* @param ResourceInterface $directory The directory
*
* @return string The name to compare with files from other directories
*/
- protected function getRelativeName(ResourceInterface $file, ResourceInterface $directory)
- {
- return substr((string) $file, strlen((string) $directory));
+ protected function getRelativeName(ResourceInterface $file, ResourceInterface $directory) {
+ return substr((string)$file, strlen((string)$directory));
}
/**
@@ -93,8 +86,7 @@ class CoalescingDirectoryResource implements IteratorResourceInterface
*
* @return array An array of file resources
*/
- private function getFileResources()
- {
+ private function getFileResources() {
$paths = array();
foreach ($this->directories as $directory) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php
index c823de2..c07cf5b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/DirectoryResource.php
@@ -24,11 +24,10 @@ class DirectoryResource implements IteratorResourceInterface
/**
* Constructor.
*
- * @param string $path A directory path
+ * @param string $path A directory path
* @param string $pattern A filename pattern
*/
- public function __construct($path, $pattern = null)
- {
+ public function __construct($path, $pattern = NULL) {
if (DIRECTORY_SEPARATOR != substr($path, -1)) {
$path .= DIRECTORY_SEPARATOR;
}
@@ -37,26 +36,24 @@ class DirectoryResource implements IteratorResourceInterface
$this->pattern = $pattern;
}
- public function isFresh($timestamp)
- {
+ public function isFresh($timestamp) {
if (!is_dir($this->path) || filemtime($this->path) > $timestamp) {
- return false;
+ return FALSE;
}
foreach ($this as $resource) {
if (!$resource->isFresh($timestamp)) {
- return false;
+ return FALSE;
}
}
- return true;
+ return TRUE;
}
/**
* Returns the combined content of all inner resources.
*/
- public function getContent()
- {
+ public function getContent() {
$content = array();
foreach ($this as $resource) {
$content[] = $resource->getContent();
@@ -65,20 +62,17 @@ class DirectoryResource implements IteratorResourceInterface
return implode("\n", $content);
}
- public function __toString()
- {
+ public function __toString() {
return $this->path;
}
- public function getIterator()
- {
+ public function getIterator() {
return is_dir($this->path)
? new DirectoryResourceIterator($this->getInnerIterator())
: new \EmptyIterator();
}
- protected function getInnerIterator()
- {
+ protected function getInnerIterator() {
return new DirectoryResourceFilterIterator(new \RecursiveDirectoryIterator($this->path, \RecursiveDirectoryIterator::FOLLOW_SYMLINKS), $this->pattern);
}
}
@@ -91,8 +85,7 @@ class DirectoryResource implements IteratorResourceInterface
*/
class DirectoryResourceIterator extends \RecursiveIteratorIterator
{
- public function current()
- {
+ public function current() {
return new FileResource(parent::current()->getPathname());
}
}
@@ -107,15 +100,13 @@ class DirectoryResourceFilterIterator extends \RecursiveFilterIterator
{
protected $pattern;
- public function __construct(\RecursiveDirectoryIterator $iterator, $pattern = null)
- {
+ public function __construct(\RecursiveDirectoryIterator $iterator, $pattern = NULL) {
parent::__construct($iterator);
$this->pattern = $pattern;
}
- public function accept()
- {
+ public function accept() {
$file = $this->current();
$name = $file->getBasename();
@@ -123,11 +114,10 @@ class DirectoryResourceFilterIterator extends \RecursiveFilterIterator
return '.' != $name[0];
}
- return null === $this->pattern || 0 < preg_match($this->pattern, $name);
+ return NULL === $this->pattern || 0 < preg_match($this->pattern, $name);
}
- public function getChildren()
- {
+ public function getChildren() {
return new self(new \RecursiveDirectoryIterator($this->current()->getPathname(), \RecursiveDirectoryIterator::FOLLOW_SYMLINKS), $this->pattern);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php
index b7760e1..df70811 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Resource/FileResource.php
@@ -25,23 +25,19 @@ class FileResource implements ResourceInterface
*
* @param string $path The path to a file
*/
- public function __construct($path)
- {
+ public function __construct($path) {
$this->path = $path;
}
- public function isFresh($timestamp)
- {
+ public function isFresh($timestamp) {
return file_exists($this->path) && filemtime($this->path) <= $timestamp;
}
- public function getContent()
- {
+ public function getContent() {
return file_exists($this->path) ? file_get_contents($this->path) : '';
}
- public function __toString()
- {
+ public function __toString() {
return $this->path;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php
index 712c90d..11bc2f0 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/CacheBustingWorker.php
@@ -24,13 +24,11 @@ class CacheBustingWorker implements WorkerInterface
{
private $separator;
- public function __construct($separator = '-')
- {
+ public function __construct($separator = '-') {
$this->separator = $separator;
}
- public function process(AssetInterface $asset, AssetFactory $factory)
- {
+ public function process(AssetInterface $asset, AssetFactory $factory) {
if (!$path = $asset->getTargetPath()) {
// no path to work with
return;
@@ -41,19 +39,18 @@ class CacheBustingWorker implements WorkerInterface
return;
}
- $replace = $this->separator.$this->getHash($asset, $factory).'.'.$search;
- if (preg_match('/'.preg_quote($replace, '/').'$/', $path)) {
+ $replace = $this->separator . $this->getHash($asset, $factory) . '.' . $search;
+ if (preg_match('/' . preg_quote($replace, '/') . '$/', $path)) {
// already replaced
return;
}
$asset->setTargetPath(
- preg_replace('/\.'.preg_quote($search, '/').'$/', $replace, $path)
+ preg_replace('/\.' . preg_quote($search, '/') . '$/', $replace, $path)
);
}
- protected function getHash(AssetInterface $asset, AssetFactory $factory)
- {
+ protected function getHash(AssetInterface $asset, AssetFactory $factory) {
$hash = hash_init('sha1');
hash_update($hash, $factory->getLastModified($asset));
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php
index 80fd44a..680a16c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/EnsureFilterWorker.php
@@ -33,13 +33,12 @@ class EnsureFilterWorker implements WorkerInterface
/**
* Constructor.
*
- * @param string $pattern A regex for checking the asset's target URL
- * @param FilterInterface $filter A filter to apply if the regex matches
- * @param integer $flags Flags for what to check
+ * @param string $pattern A regex for checking the asset's target URL
+ * @param FilterInterface $filter A filter to apply if the regex matches
+ * @param integer $flags Flags for what to check
*/
- public function __construct($pattern, FilterInterface $filter, $flags = null)
- {
- if (null === $flags) {
+ public function __construct($pattern, FilterInterface $filter, $flags = NULL) {
+ if (NULL === $flags) {
$flags = self::CHECK_SOURCE | self::CHECK_TARGET;
}
@@ -48,8 +47,7 @@ class EnsureFilterWorker implements WorkerInterface
$this->flags = $flags;
}
- public function process(AssetInterface $asset, AssetFactory $factory)
- {
+ public function process(AssetInterface $asset, AssetFactory $factory) {
if (
(self::CHECK_SOURCE === (self::CHECK_SOURCE & $this->flags) && preg_match($this->pattern, $asset->getSourcePath()))
||
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php
index e86cc7b..c3fef2d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Factory/Worker/WorkerInterface.php
@@ -24,8 +24,8 @@ interface WorkerInterface
/**
* Processes an asset.
*
- * @param AssetInterface $asset An asset
- * @param AssetFactory $factory The factory
+ * @param AssetInterface $asset An asset
+ * @param AssetFactory $factory The factory
*
* @return AssetInterface|null May optionally return a replacement asset
*/
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/AutoprefixerFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/AutoprefixerFilter.php
index 5182161..8dbce79 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/AutoprefixerFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/AutoprefixerFilter.php
@@ -33,29 +33,25 @@ class AutoprefixerFilter extends BaseNodeFilter
*/
private $browsers = array();
- public function __construct($autoprefixerBin)
- {
+ public function __construct($autoprefixerBin) {
$this->autoprefixerBin = $autoprefixerBin;
}
/**
* @param array $browsers
*/
- public function setBrowsers(array $browsers)
- {
+ public function setBrowsers(array $browsers) {
$this->browsers = $browsers;
}
/**
* @param string $browser
*/
- public function addBrowser($browser)
- {
+ public function addBrowser($browser) {
$this->browsers[] = $browser;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$input = $asset->getContent();
$pb = $this->createProcessBuilder(array($this->autoprefixerBin));
@@ -81,7 +77,6 @@ class AutoprefixerFilter extends BaseNodeFilter
*
* @param AssetInterface $asset An asset
*/
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php
index 8d65271..96c3731 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseCssFilter.php
@@ -23,32 +23,28 @@ abstract class BaseCssFilter implements FilterInterface
/**
* @see CssUtils::filterReferences()
*/
- protected function filterReferences($content, $callback, $limit = -1, &$count = 0)
- {
+ protected function filterReferences($content, $callback, $limit = -1, &$count = 0) {
return CssUtils::filterReferences($content, $callback, $limit, $count);
}
/**
* @see CssUtils::filterUrls()
*/
- protected function filterUrls($content, $callback, $limit = -1, &$count = 0)
- {
+ protected function filterUrls($content, $callback, $limit = -1, &$count = 0) {
return CssUtils::filterUrls($content, $callback, $limit, $count);
}
/**
* @see CssUtils::filterImports()
*/
- protected function filterImports($content, $callback, $limit = -1, &$count = 0, $includeUrl = true)
- {
+ protected function filterImports($content, $callback, $limit = -1, &$count = 0, $includeUrl = TRUE) {
return CssUtils::filterImports($content, $callback, $limit, $count, $includeUrl);
}
/**
* @see CssUtils::filterIEFilters()
*/
- protected function filterIEFilters($content, $callback, $limit = -1, &$count = 0)
- {
+ protected function filterIEFilters($content, $callback, $limit = -1, &$count = 0) {
return CssUtils::filterIEFilters($content, $callback, $limit, $count);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php
index 64e5a13..547141d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseNodeFilter.php
@@ -15,23 +15,19 @@ abstract class BaseNodeFilter extends BaseProcessFilter
{
private $nodePaths = array();
- public function getNodePaths()
- {
+ public function getNodePaths() {
return $this->nodePaths;
}
- public function setNodePaths(array $nodePaths)
- {
+ public function setNodePaths(array $nodePaths) {
$this->nodePaths = $nodePaths;
}
- public function addNodePath($nodePath)
- {
+ public function addNodePath($nodePath) {
$this->nodePaths[] = $nodePath;
}
- protected function createProcessBuilder(array $arguments = array())
- {
+ protected function createProcessBuilder(array $arguments = array()) {
$pb = parent::createProcessBuilder($arguments);
if ($this->nodePaths) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php
index 642495a..626de1c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/BaseProcessFilter.php
@@ -25,8 +25,7 @@ abstract class BaseProcessFilter implements FilterInterface
*
* @param int $timeout The timeout for the process
*/
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout) {
$this->timeout = $timeout;
}
@@ -37,19 +36,17 @@ abstract class BaseProcessFilter implements FilterInterface
*
* @return ProcessBuilder A new process builder
*/
- protected function createProcessBuilder(array $arguments = array())
- {
+ protected function createProcessBuilder(array $arguments = array()) {
$pb = new ProcessBuilder($arguments);
- if (null !== $this->timeout) {
+ if (NULL !== $this->timeout) {
$pb->setTimeout($this->timeout);
}
return $pb;
}
- protected function mergeEnv(ProcessBuilder $pb)
- {
+ protected function mergeEnv(ProcessBuilder $pb) {
foreach (array_filter($_SERVER, 'is_scalar') as $key => $value) {
$pb->setEnv($key, $value);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php
index b81f201..5367cfd 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CallablesFilter.php
@@ -30,30 +30,26 @@ class CallablesFilter implements FilterInterface, DependencyExtractorInterface
* @param callable|null $dumper
* @param callable|null $extractor
*/
- public function __construct($loader = null, $dumper = null, $extractor = null)
- {
+ public function __construct($loader = NULL, $dumper = NULL, $extractor = NULL) {
$this->loader = $loader;
$this->dumper = $dumper;
$this->extractor = $extractor;
}
- public function filterLoad(AssetInterface $asset)
- {
- if (null !== $callable = $this->loader) {
+ public function filterLoad(AssetInterface $asset) {
+ if (NULL !== $callable = $this->loader) {
$callable($asset);
}
}
- public function filterDump(AssetInterface $asset)
- {
- if (null !== $callable = $this->dumper) {
+ public function filterDump(AssetInterface $asset) {
+ if (NULL !== $callable = $this->dumper) {
$callable($asset);
}
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
- if (null !== $callable = $this->extractor) {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
+ if (NULL !== $callable = $this->extractor) {
return $callable($factory, $content, $loadPath);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CleanCssFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CleanCssFilter.php
index ada5499..0430e36 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CleanCssFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CleanCssFilter.php
@@ -29,7 +29,7 @@ class CleanCssFilter extends BaseNodeFilter
private $compatibility;
private $debug;
private $rootPath;
- private $skipImport = true;
+ private $skipImport = TRUE;
private $timeout;
private $semanticMerging;
private $roundingPrecision;
@@ -47,11 +47,10 @@ class CleanCssFilter extends BaseNodeFilter
/**
- * @param string $cleanCssBin Absolute path to the cleancss executable
- * @param string $nodeBin Absolute path to the folder containg node.js executable
+ * @param string $cleanCssBin Absolute path to the cleancss executable
+ * @param string $nodeBin Absolute path to the folder containg node.js executable
*/
- public function __construct($cleanCssBin = '/usr/bin/cleancss', $nodeBin = null)
- {
+ public function __construct($cleanCssBin = '/usr/bin/cleancss', $nodeBin = NULL) {
$this->cleanCssBin = $cleanCssBin;
$this->nodeBin = $nodeBin;
}
@@ -60,8 +59,7 @@ class CleanCssFilter extends BaseNodeFilter
* Keep line breaks
* @param bool $keepLineBreaks True to enable
*/
- public function setKeepLineBreaks($keepLineBreaks)
- {
+ public function setKeepLineBreaks($keepLineBreaks) {
$this->keepLineBreaks = $keepLineBreaks;
}
@@ -69,8 +67,7 @@ class CleanCssFilter extends BaseNodeFilter
* Remove all special comments
* @param bool $removeSpecialComments True to enable
*/ // i.e. /*! comment */
- public function setRemoveSpecialComments($removeSpecialComments)
- {
+ public function setRemoveSpecialComments($removeSpecialComments) {
$this->removeSpecialComments = $removeSpecialComments;
}
@@ -78,16 +75,15 @@ class CleanCssFilter extends BaseNodeFilter
* Remove all special comments except the first one
* @param bool $onlyKeepFirstSpecialComment True to enable
*/
- public function setOnlyKeepFirstSpecialComment($onlyKeepFirstSpecialComment)
- {
+ public function setOnlyKeepFirstSpecialComment($onlyKeepFirstSpecialComment) {
$this->onlyKeepFirstSpecialComment = $onlyKeepFirstSpecialComment;
}
+
/**
* Enables unsafe mode by assuming BEM-like semantic stylesheets (warning, this may break your styling!)
* @param bool $semanticMerging True to enable
*/
- public function setSemanticMerging($semanticMerging)
- {
+ public function setSemanticMerging($semanticMerging) {
$this->semanticMerging = $semanticMerging;
}
@@ -95,8 +91,7 @@ class CleanCssFilter extends BaseNodeFilter
* A root path to which resolve absolute @import rules
* @param string $rootPath
*/
- public function setRootPath($rootPath)
- {
+ public function setRootPath($rootPath) {
$this->rootPath = $rootPath;
}
@@ -104,16 +99,15 @@ class CleanCssFilter extends BaseNodeFilter
* Disable @import processing
* @param bool $skipImport True to enable
*/
- public function setSkipImport($skipImport)
- {
+ public function setSkipImport($skipImport) {
$this->skipImport = $skipImport;
}
+
/**
* Per connection timeout when fetching remote @imports; defaults to 5 seconds
* @param int $timeout
*/
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout) {
$this->timeout = $timeout;
}
@@ -121,8 +115,7 @@ class CleanCssFilter extends BaseNodeFilter
* Disable URLs rebasing
* @param bool $skipRebase True to enable
*/
- public function setSkipRebase($skipRebase)
- {
+ public function setSkipRebase($skipRebase) {
$this->skipRebase = $skipRebase;
}
@@ -130,8 +123,7 @@ class CleanCssFilter extends BaseNodeFilter
* Disable restructuring optimizations
* @param bool $skipRestructuring True to enable
*/
- public function setSkipRestructuring($skipRestructuring)
- {
+ public function setSkipRestructuring($skipRestructuring) {
$this->skipRestructuring = $skipRestructuring;
}
@@ -139,8 +131,7 @@ class CleanCssFilter extends BaseNodeFilter
* Disable shorthand compacting
* @param bool $skipShorthandCompacting True to enable
*/
- public function setSkipShorthandCompacting($skipShorthandCompacting)
- {
+ public function setSkipShorthandCompacting($skipShorthandCompacting) {
$this->skipShorthandCompacting = $skipShorthandCompacting;
}
@@ -148,8 +139,7 @@ class CleanCssFilter extends BaseNodeFilter
* Enables building input's source map
* @param bool $sourceMap True to enable
*/
- public function setSourceMap($sourceMap)
- {
+ public function setSourceMap($sourceMap) {
$this->sourceMap = $sourceMap;
}
@@ -157,8 +147,7 @@ class CleanCssFilter extends BaseNodeFilter
* Enables inlining sources inside source maps
* @param bool $sourceMapInlineSources True to enable
*/
- public function setSourceMapInlineSources($sourceMapInlineSources)
- {
+ public function setSourceMapInlineSources($sourceMapInlineSources) {
$this->sourceMapInlineSources = $sourceMapInlineSources;
}
@@ -166,8 +155,7 @@ class CleanCssFilter extends BaseNodeFilter
* Disable advanced optimizations - selector & property merging, reduction, etc.
* @param bool $skipAdvanced True to enable
*/
- public function setSkipAdvanced($skipAdvanced)
- {
+ public function setSkipAdvanced($skipAdvanced) {
$this->skipAdvanced = $skipAdvanced;
}
@@ -175,8 +163,7 @@ class CleanCssFilter extends BaseNodeFilter
* Disable properties merging based on their order
* @param bool $skipAggresiveMerging True to enable
*/
- public function setSkipAggresiveMerging($skipAggresiveMerging)
- {
+ public function setSkipAggresiveMerging($skipAggresiveMerging) {
$this->skipAggresiveMerging = $skipAggresiveMerging;
}
@@ -184,8 +171,7 @@ class CleanCssFilter extends BaseNodeFilter
* Disable @import processing for specified rules
* @param string $skipImportFrom
*/
- public function setSkipImportFrom($skipImportFrom)
- {
+ public function setSkipImportFrom($skipImportFrom) {
$this->skipImportFrom = $skipImportFrom;
}
@@ -193,8 +179,7 @@ class CleanCssFilter extends BaseNodeFilter
* Disable @media merging
* @param bool $mediaMerging True to enable
*/
- public function setMediaMerging($mediaMerging)
- {
+ public function setMediaMerging($mediaMerging) {
$this->mediaMerging = $mediaMerging;
}
@@ -202,8 +187,7 @@ class CleanCssFilter extends BaseNodeFilter
* Rounds to `N` decimal places. Defaults to 2. -1 disables rounding.
* @param int $roundingPrecision
*/
- public function setRoundingPrecision($roundingPrecision)
- {
+ public function setRoundingPrecision($roundingPrecision) {
$this->roundingPrecision = $roundingPrecision;
}
@@ -211,8 +195,7 @@ class CleanCssFilter extends BaseNodeFilter
* Force compatibility mode (see https://github.com/jakubpawlowicz/clean-css/blob/master/README.md#how-to-set-compatibility-mode for advanced examples)
* @param string $compatibility
*/
- public function setCompatibility($compatibility)
- {
+ public function setCompatibility($compatibility) {
$this->compatibility = $compatibility;
}
@@ -220,8 +203,7 @@ class CleanCssFilter extends BaseNodeFilter
* Shows debug information (minification time & compression efficiency)
* @param bool $debug True to enable
*/
- public function setDebug($debug)
- {
+ public function setDebug($debug) {
$this->debug = $debug;
}
@@ -229,8 +211,7 @@ class CleanCssFilter extends BaseNodeFilter
/**
* @see Assetic\Filter\FilterInterface::filterLoad()
*/
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
@@ -239,8 +220,7 @@ class CleanCssFilter extends BaseNodeFilter
*
* @see Assetic\Filter\FilterInterface::filterDump()
*/
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder($this->nodeBin
? array($this->nodeBin, $this->cleanCssBin)
: array($this->cleanCssBin));
@@ -250,7 +230,7 @@ class CleanCssFilter extends BaseNodeFilter
}
if ($this->compatibility) {
- $pb->add('--compatibility ' .$this->compatibility);
+ $pb->add('--compatibility ' . $this->compatibility);
}
if ($this->debug) {
@@ -258,7 +238,7 @@ class CleanCssFilter extends BaseNodeFilter
}
if ($this->rootPath) {
- $pb->add('--root ' .$this->rootPath);
+ $pb->add('--root ' . $this->rootPath);
}
if ($this->skipImport) {
@@ -266,11 +246,11 @@ class CleanCssFilter extends BaseNodeFilter
}
if ($this->timeout) {
- $pb->add('--timeout ' .$this->timeout);
+ $pb->add('--timeout ' . $this->timeout);
}
if ($this->roundingPrecision) {
- $pb->add('--rounding-precision ' .$this->roundingPrecision);
+ $pb->add('--rounding-precision ' . $this->roundingPrecision);
}
if ($this->removeSpecialComments) {
@@ -294,7 +274,7 @@ class CleanCssFilter extends BaseNodeFilter
}
if ($this->skipImportFrom) {
- $pb->add('--skip-import-from ' .$this->skipImportFrom);
+ $pb->add('--skip-import-from ' . $this->skipImportFrom);
}
if ($this->mediaMerging) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php
index a5cc818..5982819 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CoffeeScriptFilter.php
@@ -30,24 +30,20 @@ class CoffeeScriptFilter extends BaseNodeFilter
private $bare;
private $noHeader;
- public function __construct($coffeeBin = '/usr/bin/coffee', $nodeBin = null)
- {
+ public function __construct($coffeeBin = '/usr/bin/coffee', $nodeBin = NULL) {
$this->coffeeBin = $coffeeBin;
$this->nodeBin = $nodeBin;
}
- public function setBare($bare)
- {
+ public function setBare($bare) {
$this->bare = $bare;
}
- public function setNoHeader($noHeader)
- {
+ public function setNoHeader($noHeader) {
$this->noHeader = $noHeader;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$input = FilesystemUtils::createTemporaryFile('coffee');
file_put_contents($input, $asset->getContent());
@@ -77,7 +73,6 @@ class CoffeeScriptFilter extends BaseNodeFilter
$asset->setContent($proc->getOutput());
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php
index d80a1ab..40e3941 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CompassFilter.php
@@ -53,139 +53,114 @@ class CompassFilter extends BaseSassFilter
private $httpGeneratedImagesPath;
private $generatedImagesPath;
private $httpJavascriptsPath;
- private $homeEnv = true;
+ private $homeEnv = TRUE;
- public function __construct($compassPath = '/usr/bin/compass', $rubyPath = null)
- {
+ public function __construct($compassPath = '/usr/bin/compass', $rubyPath = NULL) {
$this->compassPath = $compassPath;
$this->rubyPath = $rubyPath;
$this->cacheLocation = FilesystemUtils::getTemporaryDirectory();
if ('cli' !== php_sapi_name()) {
- $this->boring = true;
+ $this->boring = TRUE;
}
}
- public function setScss($scss)
- {
+ public function setScss($scss) {
$this->scss = $scss;
}
// sass options setters
- public function setUnixNewlines($unixNewlines)
- {
+ public function setUnixNewlines($unixNewlines) {
$this->unixNewlines = $unixNewlines;
}
- public function setDebugInfo($debugInfo)
- {
+ public function setDebugInfo($debugInfo) {
$this->debugInfo = $debugInfo;
}
- public function setCacheLocation($cacheLocation)
- {
+ public function setCacheLocation($cacheLocation) {
$this->cacheLocation = $cacheLocation;
}
- public function setNoCache($noCache)
- {
+ public function setNoCache($noCache) {
$this->noCache = $noCache;
}
// compass options setters
- public function setForce($force)
- {
+ public function setForce($force) {
$this->force = $force;
}
- public function setStyle($style)
- {
+ public function setStyle($style) {
$this->style = $style;
}
- public function setQuiet($quiet)
- {
+ public function setQuiet($quiet) {
$this->quiet = $quiet;
}
- public function setBoring($boring)
- {
+ public function setBoring($boring) {
$this->boring = $boring;
}
- public function setNoLineComments($noLineComments)
- {
+ public function setNoLineComments($noLineComments) {
$this->noLineComments = $noLineComments;
}
- public function setImagesDir($imagesDir)
- {
+ public function setImagesDir($imagesDir) {
$this->imagesDir = $imagesDir;
}
- public function setJavascriptsDir($javascriptsDir)
- {
+ public function setJavascriptsDir($javascriptsDir) {
$this->javascriptsDir = $javascriptsDir;
}
- public function setFontsDir($fontsDir)
- {
+ public function setFontsDir($fontsDir) {
$this->fontsDir = $fontsDir;
}
// compass configuration file options setters
- public function setPlugins(array $plugins)
- {
+ public function setPlugins(array $plugins) {
$this->plugins = $plugins;
}
- public function addPlugin($plugin)
- {
+ public function addPlugin($plugin) {
$this->plugins[] = $plugin;
}
- public function setHttpPath($httpPath)
- {
+ public function setHttpPath($httpPath) {
$this->httpPath = $httpPath;
}
- public function setHttpImagesPath($httpImagesPath)
- {
+ public function setHttpImagesPath($httpImagesPath) {
$this->httpImagesPath = $httpImagesPath;
}
- public function setHttpFontsPath($httpFontsPath)
- {
+ public function setHttpFontsPath($httpFontsPath) {
$this->httpFontsPath = $httpFontsPath;
}
- public function setHttpGeneratedImagesPath($httpGeneratedImagesPath)
- {
+ public function setHttpGeneratedImagesPath($httpGeneratedImagesPath) {
$this->httpGeneratedImagesPath = $httpGeneratedImagesPath;
}
- public function setGeneratedImagesPath($generatedImagesPath)
- {
+ public function setGeneratedImagesPath($generatedImagesPath) {
$this->generatedImagesPath = $generatedImagesPath;
}
- public function setHttpJavascriptsPath($httpJavascriptsPath)
- {
+ public function setHttpJavascriptsPath($httpJavascriptsPath) {
$this->httpJavascriptsPath = $httpJavascriptsPath;
}
- public function setHomeEnv($homeEnv)
- {
+ public function setHomeEnv($homeEnv) {
$this->homeEnv = $homeEnv;
}
- public function setRelativeAssets($relativeAssets)
- {
+ public function setRelativeAssets($relativeAssets) {
$this->relativeAssets = $relativeAssets;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$loadPaths = $this->loadPaths;
if ($dir = $asset->getSourceDirectory()) {
$loadPaths[] = $dir;
@@ -198,7 +173,7 @@ class CompassFilter extends BaseSassFilter
'compile',
$tempDir,
);
- if (null !== $this->rubyPath) {
+ if (NULL !== $this->rubyPath) {
$compassProcessArgs = array_merge(explode(' ', $this->rubyPath), $compassProcessArgs);
}
@@ -251,11 +226,11 @@ class CompassFilter extends BaseSassFilter
}
if ($this->unixNewlines) {
- $optionsConfig['sass_options']['unix_newlines'] = true;
+ $optionsConfig['sass_options']['unix_newlines'] = TRUE;
}
if ($this->debugInfo) {
- $optionsConfig['sass_options']['debug_info'] = true;
+ $optionsConfig['sass_options']['debug_info'] = TRUE;
}
if ($this->cacheLocation) {
@@ -263,7 +238,7 @@ class CompassFilter extends BaseSassFilter
}
if ($this->noCache) {
- $optionsConfig['sass_options']['no_cache'] = true;
+ $optionsConfig['sass_options']['no_cache'] = TRUE;
}
if ($this->httpPath) {
@@ -299,22 +274,22 @@ class CompassFilter extends BaseSassFilter
foreach ($optionsConfig as $name => $value) {
if (!is_array($value)) {
$config[] = sprintf('%s = "%s"', $name, addcslashes($value, '\\'));
- } elseif (!empty($value)) {
+ } else if (!empty($value)) {
$config[] = sprintf('%s = %s', $name, $this->formatArrayToRuby($value));
}
}
$configFile = tempnam($tempDir, 'assetic_compass');
- file_put_contents($configFile, implode("\n", $config)."\n");
+ file_put_contents($configFile, implode("\n", $config) . "\n");
$pb->add('--config')->add($configFile);
}
$pb->add('--sass-dir')->add('')->add('--css-dir')->add('');
// compass choose the type (sass or scss from the filename)
- if (null !== $this->scss) {
+ if (NULL !== $this->scss) {
$type = $this->scss ? 'scss' : 'sass';
- } elseif ($path = $asset->getSourcePath()) {
+ } else if ($path = $asset->getSourcePath()) {
// FIXME: what if the extension is something else?
$type = pathinfo($path, PATHINFO_EXTENSION);
} else {
@@ -325,7 +300,7 @@ class CompassFilter extends BaseSassFilter
unlink($tempName); // FIXME: don't use tempnam() here
// input
- $input = $tempName.'.'.$type;
+ $input = $tempName . '.' . $type;
// work-around for https://github.com/chriseppstein/compass/issues/748
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
@@ -336,7 +311,7 @@ class CompassFilter extends BaseSassFilter
file_put_contents($input, $asset->getContent());
// output
- $output = $tempName.'.css';
+ $output = $tempName . '.css';
if ($this->homeEnv) {
// it's not really usefull but... https://github.com/chriseppstein/compass/issues/376
@@ -365,12 +340,10 @@ class CompassFilter extends BaseSassFilter
}
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- private function formatArrayToRuby($array)
- {
+ private function formatArrayToRuby($array) {
$output = array();
// does we have an associative array ?
@@ -378,12 +351,12 @@ class CompassFilter extends BaseSassFilter
foreach ($array as $name => $value) {
$output[] = sprintf(' :%s => "%s"', $name, addcslashes($value, '\\'));
}
- $output = "{\n".implode(",\n", $output)."\n}";
+ $output = "{\n" . implode(",\n", $output) . "\n}";
} else {
foreach ($array as $name => $value) {
$output[] = sprintf(' "%s"', addcslashes($value, '\\'));
}
- $output = "[\n".implode(",\n", $output)."\n]";
+ $output = "[\n" . implode(",\n", $output) . "\n]";
}
return $output;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssCacheBustingFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssCacheBustingFilter.php
index 5bf8cec..3750355 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssCacheBustingFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssCacheBustingFilter.php
@@ -24,22 +24,18 @@ class CssCacheBustingFilter extends BaseCssFilter
private $version;
private $format = '%s?%s';
- public function setVersion($version)
- {
+ public function setVersion($version) {
$this->version = $version;
}
- public function setFormat($versionFormat)
- {
+ public function setFormat($versionFormat) {
$this->format = $versionFormat;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
if (!$this->version) {
return;
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php
index 17970a9..da9a61a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssEmbedFilter.php
@@ -34,60 +34,50 @@ class CssEmbedFilter extends BaseProcessFilter implements DependencyExtractorInt
private $maxUriLength; // Maximum length for a data URI. Defaults to 32768.
private $maxImageSize; // Maximum image size (in bytes) to convert.
- public function __construct($jarPath, $javaPath = '/usr/bin/java')
- {
+ public function __construct($jarPath, $javaPath = '/usr/bin/java') {
$this->jarPath = $jarPath;
$this->javaPath = $javaPath;
}
- public function setCharset($charset)
- {
+ public function setCharset($charset) {
$this->charset = $charset;
}
- public function setMhtml($mhtml)
- {
+ public function setMhtml($mhtml) {
$this->mhtml = $mhtml;
}
- public function setMhtmlRoot($mhtmlRoot)
- {
+ public function setMhtmlRoot($mhtmlRoot) {
$this->mhtmlRoot = $mhtmlRoot;
}
- public function setRoot($root)
- {
+ public function setRoot($root) {
$this->root = $root;
}
- public function setSkipMissing($skipMissing)
- {
+ public function setSkipMissing($skipMissing) {
$this->skipMissing = $skipMissing;
}
- public function setMaxUriLength($maxUriLength)
- {
+ public function setMaxUriLength($maxUriLength) {
$this->maxUriLength = $maxUriLength;
}
- public function setMaxImageSize($maxImageSize)
- {
+ public function setMaxImageSize($maxImageSize) {
$this->maxImageSize = $maxImageSize;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder(array(
$this->javaPath,
'-jar',
$this->jarPath,
));
- if (null !== $this->charset) {
+ if (NULL !== $this->charset) {
$pb->add('--charset')->add($this->charset);
}
@@ -95,12 +85,12 @@ class CssEmbedFilter extends BaseProcessFilter implements DependencyExtractorInt
$pb->add('--mhtml');
}
- if (null !== $this->mhtmlRoot) {
+ if (NULL !== $this->mhtmlRoot) {
$pb->add('--mhtmlroot')->add($this->mhtmlRoot);
}
// automatically define root if not already defined
- if (null === $this->root) {
+ if (NULL === $this->root) {
if ($dir = $asset->getSourceDirectory()) {
$pb->add('--root')->add($dir);
}
@@ -112,11 +102,11 @@ class CssEmbedFilter extends BaseProcessFilter implements DependencyExtractorInt
$pb->add('--skip-missing');
}
- if (null !== $this->maxUriLength) {
+ if (NULL !== $this->maxUriLength) {
$pb->add('--max-uri-length')->add($this->maxUriLength);
}
- if (null !== $this->maxImageSize) {
+ if (NULL !== $this->maxImageSize) {
$pb->add('--max-image-size')->add($this->maxImageSize);
}
@@ -135,8 +125,7 @@ class CssEmbedFilter extends BaseProcessFilter implements DependencyExtractorInt
$asset->setContent($proc->getOutput());
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
// todo
return array();
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php
index 77ec1c4..3939bfe 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssImportFilter.php
@@ -30,50 +30,48 @@ class CssImportFilter extends BaseCssFilter implements DependencyExtractorInterf
*
* @param FilterInterface $importFilter Filter for each imported asset
*/
- public function __construct(FilterInterface $importFilter = null)
- {
+ public function __construct(FilterInterface $importFilter = NULL) {
$this->importFilter = $importFilter ?: new CssRewriteFilter();
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$importFilter = $this->importFilter;
$sourceRoot = $asset->getSourceRoot();
$sourcePath = $asset->getSourcePath();
$callback = function ($matches) use ($importFilter, $sourceRoot, $sourcePath) {
- if (!$matches['url'] || null === $sourceRoot) {
+ if (!$matches['url'] || NULL === $sourceRoot) {
return $matches[0];
}
$importRoot = $sourceRoot;
- if (false !== strpos($matches['url'], '://')) {
+ if (FALSE !== strpos($matches['url'], '://')) {
// absolute
list($importScheme, $tmp) = explode('://', $matches['url'], 2);
list($importHost, $importPath) = explode('/', $tmp, 2);
- $importRoot = $importScheme.'://'.$importHost;
- } elseif (0 === strpos($matches['url'], '//')) {
+ $importRoot = $importScheme . '://' . $importHost;
+ } else if (0 === strpos($matches['url'], '//')) {
// protocol-relative
list($importHost, $importPath) = explode('/', substr($matches['url'], 2), 2);
- $importRoot = '//'.$importHost;
- } elseif ('/' == $matches['url'][0]) {
+ $importRoot = '//' . $importHost;
+ } else if ('/' == $matches['url'][0]) {
// root-relative
$importPath = substr($matches['url'], 1);
- } elseif (null !== $sourcePath) {
+ } else if (NULL !== $sourcePath) {
// document-relative
$importPath = $matches['url'];
if ('.' != $sourceDir = dirname($sourcePath)) {
- $importPath = $sourceDir.'/'.$importPath;
+ $importPath = $sourceDir . '/' . $importPath;
}
} else {
return $matches[0];
}
- $importSource = $importRoot.'/'.$importPath;
- if (false !== strpos($importSource, '://') || 0 === strpos($importSource, '//')) {
- $import = new HttpAsset($importSource, array($importFilter), true);
- } elseif ('css' != pathinfo($importPath, PATHINFO_EXTENSION) || !file_exists($importSource)) {
+ $importSource = $importRoot . '/' . $importPath;
+ if (FALSE !== strpos($importSource, '://') || 0 === strpos($importSource, '//')) {
+ $import = new HttpAsset($importSource, array($importFilter), TRUE);
+ } else if ('css' != pathinfo($importPath, PATHINFO_EXTENSION) || !file_exists($importSource)) {
// ignore non-css and non-existant imports
return $matches[0];
} else {
@@ -96,12 +94,10 @@ class CssImportFilter extends BaseCssFilter implements DependencyExtractorInterf
$asset->setContent($content);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
// todo
return array();
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php
index 6f0b0d2..7857f02 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssMinFilter.php
@@ -24,42 +24,35 @@ class CssMinFilter implements FilterInterface
private $filters;
private $plugins;
- public function __construct()
- {
+ public function __construct() {
$this->filters = array();
$this->plugins = array();
}
- public function setFilters(array $filters)
- {
+ public function setFilters(array $filters) {
$this->filters = $filters;
}
- public function setFilter($name, $value)
- {
+ public function setFilter($name, $value) {
$this->filters[$name] = $value;
}
- public function setPlugins(array $plugins)
- {
+ public function setPlugins(array $plugins) {
$this->plugins = $plugins;
}
- public function setPlugin($name, $value)
- {
+ public function setPlugin($name, $value) {
$this->plugins[$name] = $value;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$filters = $this->filters;
$plugins = $this->plugins;
- if (isset($filters['ImportImports']) && true === $filters['ImportImports']) {
+ if (isset($filters['ImportImports']) && TRUE === $filters['ImportImports']) {
if ($dir = $asset->getSourceDirectory()) {
$filters['ImportImports'] = array('BasePath' => $dir);
} else {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php
index c2250c3..6974f2f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/CssRewriteFilter.php
@@ -20,27 +20,25 @@ use Assetic\Asset\AssetInterface;
*/
class CssRewriteFilter extends BaseCssFilter
{
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$sourceBase = $asset->getSourceRoot();
$sourcePath = $asset->getSourcePath();
$targetPath = $asset->getTargetPath();
- if (null === $sourcePath || null === $targetPath || $sourcePath == $targetPath) {
+ if (NULL === $sourcePath || NULL === $targetPath || $sourcePath == $targetPath) {
return;
}
// learn how to get from the target back to the source
- if (false !== strpos($sourceBase, '://')) {
- list($scheme, $url) = explode('://', $sourceBase.'/'.$sourcePath, 2);
+ if (FALSE !== strpos($sourceBase, '://')) {
+ list($scheme, $url) = explode('://', $sourceBase . '/' . $sourcePath, 2);
list($host, $path) = explode('/', $url, 2);
- $host = $scheme.'://'.$host.'/';
- $path = false === strpos($path, '/') ? '' : dirname($path);
+ $host = $scheme . '://' . $host . '/';
+ $path = FALSE === strpos($path, '/') ? '' : dirname($path);
$path .= '/';
} else {
// assume source and target are on the same host
@@ -49,12 +47,12 @@ class CssRewriteFilter extends BaseCssFilter
// pop entries off the target until it fits in the source
if ('.' == dirname($sourcePath)) {
$path = str_repeat('../', substr_count($targetPath, '/'));
- } elseif ('.' == $targetDir = dirname($targetPath)) {
- $path = dirname($sourcePath).'/';
+ } else if ('.' == $targetDir = dirname($targetPath)) {
+ $path = dirname($sourcePath) . '/';
} else {
$path = '';
while (0 !== strpos($sourcePath, $targetDir)) {
- if (false !== $pos = strrpos($targetDir, '/')) {
+ if (FALSE !== $pos = strrpos($targetDir, '/')) {
$targetDir = substr($targetDir, 0, $pos);
$path .= '../';
} else {
@@ -63,19 +61,19 @@ class CssRewriteFilter extends BaseCssFilter
break;
}
}
- $path .= ltrim(substr(dirname($sourcePath).'/', strlen($targetDir)), '/');
+ $path .= ltrim(substr(dirname($sourcePath) . '/', strlen($targetDir)), '/');
}
}
$content = $this->filterReferences($asset->getContent(), function ($matches) use ($host, $path) {
- if (false !== strpos($matches['url'], '://') || 0 === strpos($matches['url'], '//') || 0 === strpos($matches['url'], 'data:')) {
+ if (FALSE !== strpos($matches['url'], '://') || 0 === strpos($matches['url'], '//') || 0 === strpos($matches['url'], 'data:')) {
// absolute or protocol-relative or data uri
return $matches[0];
}
if (isset($matches['url'][0]) && '/' == $matches['url'][0]) {
// root relative
- return str_replace($matches['url'], $host.$matches['url'], $matches[0]);
+ return str_replace($matches['url'], $host . $matches['url'], $matches[0]);
}
// document relative
@@ -86,7 +84,7 @@ class CssRewriteFilter extends BaseCssFilter
}
$parts = array();
- foreach (explode('/', $host.$path.$url) as $part) {
+ foreach (explode('/', $host . $path . $url) as $part) {
if ('..' === $part && count($parts) && '..' !== end($parts)) {
array_pop($parts);
} else {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php
index 12a3918..e046b5e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DartFilter.php
@@ -24,23 +24,20 @@ class DartFilter extends BaseProcessFilter
{
private $dartBin;
- public function __construct($dartBin = '/usr/bin/dart2js')
- {
+ public function __construct($dartBin = '/usr/bin/dart2js') {
$this->dartBin = $dartBin;
}
- public function filterLoad(AssetInterface $asset)
- {
- $input = FilesystemUtils::createTemporaryFile('dart');
+ public function filterLoad(AssetInterface $asset) {
+ $input = FilesystemUtils::createTemporaryFile('dart');
$output = FilesystemUtils::createTemporaryFile('dart');
file_put_contents($input, $asset->getContent());
$pb = $this->createProcessBuilder()
->add($this->dartBin)
- ->add('-o'.$output)
- ->add($input)
- ;
+ ->add('-o' . $output)
+ ->add($input);
$proc = $pb->getProcess();
$code = $proc->run();
@@ -60,13 +57,11 @@ class DartFilter extends BaseProcessFilter
$this->cleanup($output);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- private function cleanup($file)
- {
- foreach (glob($file.'*') as $related) {
+ private function cleanup($file) {
+ foreach (glob($file . '*') as $related) {
unlink($related);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php
index 6b9a8fb..ebf361a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/DependencyExtractorInterface.php
@@ -24,11 +24,11 @@ interface DependencyExtractorInterface extends FilterInterface
/**
* Returns child assets.
*
- * @param AssetFactory $factory The asset factory
- * @param string $content The asset content
- * @param string $loadPath An optional load path
+ * @param AssetFactory $factory The asset factory
+ * @param string $content The asset content
+ * @param string $loadPath An optional load path
*
* @return AssetInterface[] Child assets
*/
- public function getChildren(AssetFactory $factory, $content, $loadPath = null);
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php
index 313d4a0..b6f3f9f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/EmberPrecompileFilter.php
@@ -28,14 +28,12 @@ class EmberPrecompileFilter extends BaseNodeFilter
private $emberBin;
private $nodeBin;
- public function __construct($handlebarsBin = '/usr/bin/ember-precompile', $nodeBin = null)
- {
+ public function __construct($handlebarsBin = '/usr/bin/ember-precompile', $nodeBin = NULL) {
$this->emberBin = $handlebarsBin;
$this->nodeBin = $nodeBin;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$pb = $this->createProcessBuilder($this->nodeBin
? array($this->nodeBin, $this->emberBin)
: array($this->emberBin));
@@ -47,7 +45,7 @@ class EmberPrecompileFilter extends BaseNodeFilter
}
$inputDirPath = FilesystemUtils::createThrowAwayDirectory('ember_in');
- $inputPath = $inputDirPath.DIRECTORY_SEPARATOR.$templateName;
+ $inputPath = $inputDirPath . DIRECTORY_SEPARATOR . $templateName;
$outputPath = FilesystemUtils::createTemporaryFile('ember_out');
file_put_contents($inputPath, $asset->getContent());
@@ -81,7 +79,6 @@ class EmberPrecompileFilter extends BaseNodeFilter
$asset->setContent($compiledJs);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php
index 0fcd54e..c701334 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/FilterCollection.php
@@ -22,8 +22,7 @@ class FilterCollection implements FilterInterface, \IteratorAggregate, \Countabl
{
private $filters = array();
- public function __construct($filters = array())
- {
+ public function __construct($filters = array()) {
foreach ($filters as $filter) {
$this->ensure($filter);
}
@@ -35,48 +34,41 @@ class FilterCollection implements FilterInterface, \IteratorAggregate, \Countabl
* If the supplied filter is another filter collection, each of its
* filters will be checked.
*/
- public function ensure(FilterInterface $filter)
- {
+ public function ensure(FilterInterface $filter) {
if ($filter instanceof \Traversable) {
foreach ($filter as $f) {
$this->ensure($f);
}
- } elseif (!in_array($filter, $this->filters, true)) {
+ } else if (!in_array($filter, $this->filters, TRUE)) {
$this->filters[] = $filter;
}
}
- public function all()
- {
+ public function all() {
return $this->filters;
}
- public function clear()
- {
+ public function clear() {
$this->filters = array();
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
foreach ($this->filters as $filter) {
$filter->filterLoad($asset);
}
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
foreach ($this->filters as $filter) {
$filter->filterDump($asset);
}
}
- public function getIterator()
- {
+ public function getIterator() {
return new \ArrayIterator($this->filters);
}
- public function count()
- {
+ public function count() {
return count($this->filters);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php
index 2509f4a..466dda4 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/BaseCompilerFilter.php
@@ -50,52 +50,42 @@ abstract class BaseCompilerFilter implements FilterInterface
protected $warningLevel;
protected $language;
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout) {
$this->timeout = $timeout;
}
- public function setCompilationLevel($compilationLevel)
- {
+ public function setCompilationLevel($compilationLevel) {
$this->compilationLevel = $compilationLevel;
}
- public function setJsExterns($jsExterns)
- {
+ public function setJsExterns($jsExterns) {
$this->jsExterns = $jsExterns;
}
- public function setExternsUrl($externsUrl)
- {
+ public function setExternsUrl($externsUrl) {
$this->externsUrl = $externsUrl;
}
- public function setExcludeDefaultExterns($excludeDefaultExterns)
- {
+ public function setExcludeDefaultExterns($excludeDefaultExterns) {
$this->excludeDefaultExterns = $excludeDefaultExterns;
}
- public function setFormatting($formatting)
- {
+ public function setFormatting($formatting) {
$this->formatting = $formatting;
}
- public function setUseClosureLibrary($useClosureLibrary)
- {
+ public function setUseClosureLibrary($useClosureLibrary) {
$this->useClosureLibrary = $useClosureLibrary;
}
- public function setWarningLevel($warningLevel)
- {
+ public function setWarningLevel($warningLevel) {
$this->warningLevel = $warningLevel;
}
- public function setLanguage($language)
- {
+ public function setLanguage($language) {
$this->language = $language;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php
index 3478057..6a7748a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerApiFilter.php
@@ -24,85 +24,82 @@ class CompilerApiFilter extends BaseCompilerFilter
private $proxy;
private $proxyFullUri;
- public function setProxy($proxy)
- {
+ public function setProxy($proxy) {
$this->proxy = $proxy;
}
- public function setProxyFullUri($proxyFullUri)
- {
+ public function setProxyFullUri($proxyFullUri) {
$this->proxyFullUri = $proxyFullUri;
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$query = array(
- 'js_code' => $asset->getContent(),
+ 'js_code' => $asset->getContent(),
'output_format' => 'json',
- 'output_info' => 'compiled_code',
+ 'output_info' => 'compiled_code',
);
- if (null !== $this->compilationLevel) {
+ if (NULL !== $this->compilationLevel) {
$query['compilation_level'] = $this->compilationLevel;
}
- if (null !== $this->jsExterns) {
+ if (NULL !== $this->jsExterns) {
$query['js_externs'] = $this->jsExterns;
}
- if (null !== $this->externsUrl) {
+ if (NULL !== $this->externsUrl) {
$query['externs_url'] = $this->externsUrl;
}
- if (null !== $this->excludeDefaultExterns) {
+ if (NULL !== $this->excludeDefaultExterns) {
$query['exclude_default_externs'] = $this->excludeDefaultExterns ? 'true' : 'false';
}
- if (null !== $this->formatting) {
+ if (NULL !== $this->formatting) {
$query['formatting'] = $this->formatting;
}
- if (null !== $this->useClosureLibrary) {
+ if (NULL !== $this->useClosureLibrary) {
$query['use_closure_library'] = $this->useClosureLibrary ? 'true' : 'false';
}
- if (null !== $this->warningLevel) {
+ if (NULL !== $this->warningLevel) {
$query['warning_level'] = $this->warningLevel;
}
- if (null !== $this->language) {
+ if (NULL !== $this->language) {
$query['language'] = $this->language;
}
if (preg_match('/1|yes|on|true/i', ini_get('allow_url_fopen'))) {
$contextOptions = array('http' => array(
- 'method' => 'POST',
- 'header' => 'Content-Type: application/x-www-form-urlencoded',
+ 'method' => 'POST',
+ 'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query($query),
));
- if (null !== $this->timeout) {
+ if (NULL !== $this->timeout) {
$contextOptions['http']['timeout'] = $this->timeout;
}
if ($this->proxy) {
$contextOptions['http']['proxy'] = $this->proxy;
- $contextOptions['http']['request_fulluri'] = (Boolean) $this->proxyFullUri;
+ $contextOptions['http']['request_fulluri'] = (Boolean)$this->proxyFullUri;
}
$context = stream_context_create($contextOptions);
- $response = file_get_contents('http://closure-compiler.appspot.com/compile', false, $context);
+ $response = file_get_contents('http://closure-compiler.appspot.com/compile', FALSE, $context);
$data = json_decode($response);
- } elseif (defined('CURLOPT_POST') && !in_array('curl_init', explode(',', ini_get('disable_functions')))) {
+ } else if (defined('CURLOPT_POST') && !in_array('curl_init', explode(',', ini_get('disable_functions')))) {
$ch = curl_init('http://closure-compiler.appspot.com/compile');
- curl_setopt($ch, CURLOPT_POST, true);
+ curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded'));
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $query);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
- if (null !== $this->timeout) {
+ if (NULL !== $this->timeout) {
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
}
if ($this->proxy) {
- curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, true);
+ curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt($ch, CURLOPT_PROXY, $this->proxy);
}
$response = curl_exec($ch);
@@ -115,13 +112,13 @@ class CompilerApiFilter extends BaseCompilerFilter
if (isset($data->serverErrors) && 0 < count($data->serverErrors)) {
// @codeCoverageIgnoreStart
- throw new \RuntimeException(sprintf('The Google Closure Compiler API threw some server errors: '.print_r($data->serverErrors, true)));
+ throw new \RuntimeException(sprintf('The Google Closure Compiler API threw some server errors: ' . print_r($data->serverErrors, TRUE)));
// @codeCoverageIgnoreEnd
}
if (isset($data->errors) && 0 < count($data->errors)) {
// @codeCoverageIgnoreStart
- throw new \RuntimeException(sprintf('The Google Closure Compiler API threw some errors: '.print_r($data->errors, true)));
+ throw new \RuntimeException(sprintf('The Google Closure Compiler API threw some errors: ' . print_r($data->errors, TRUE)));
// @codeCoverageIgnoreEnd
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php
index 7cd340e..73a614b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GoogleClosure/CompilerJarFilter.php
@@ -28,19 +28,16 @@ class CompilerJarFilter extends BaseCompilerFilter
private $javaPath;
private $flagFile;
- public function __construct($jarPath, $javaPath = '/usr/bin/java')
- {
+ public function __construct($jarPath, $javaPath = '/usr/bin/java') {
$this->jarPath = $jarPath;
$this->javaPath = $javaPath;
}
- public function setFlagFile($flagFile)
- {
+ public function setFlagFile($flagFile) {
$this->flagFile = $flagFile;
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$is64bit = PHP_INT_SIZE === 8;
$cleanup = array();
@@ -52,47 +49,47 @@ class CompilerJarFilter extends BaseCompilerFilter
array('-jar', $this->jarPath)
));
- if (null !== $this->timeout) {
+ if (NULL !== $this->timeout) {
$pb->setTimeout($this->timeout);
}
- if (null !== $this->compilationLevel) {
+ if (NULL !== $this->compilationLevel) {
$pb->add('--compilation_level')->add($this->compilationLevel);
}
- if (null !== $this->jsExterns) {
+ if (NULL !== $this->jsExterns) {
$cleanup[] = $externs = FilesystemUtils::createTemporaryFile('google_closure');
file_put_contents($externs, $this->jsExterns);
$pb->add('--externs')->add($externs);
}
- if (null !== $this->externsUrl) {
+ if (NULL !== $this->externsUrl) {
$cleanup[] = $externs = FilesystemUtils::createTemporaryFile('google_closure');
file_put_contents($externs, file_get_contents($this->externsUrl));
$pb->add('--externs')->add($externs);
}
- if (null !== $this->excludeDefaultExterns) {
+ if (NULL !== $this->excludeDefaultExterns) {
$pb->add('--use_only_custom_externs');
}
- if (null !== $this->formatting) {
+ if (NULL !== $this->formatting) {
$pb->add('--formatting')->add($this->formatting);
}
- if (null !== $this->useClosureLibrary) {
+ if (NULL !== $this->useClosureLibrary) {
$pb->add('--manage_closure_dependencies');
}
- if (null !== $this->warningLevel) {
+ if (NULL !== $this->warningLevel) {
$pb->add('--warning_level')->add($this->warningLevel);
}
- if (null !== $this->language) {
+ if (NULL !== $this->language) {
$pb->add('--language_in')->add($this->language);
}
- if (null !== $this->flagFile) {
+ if (NULL !== $this->flagFile) {
$pb->add('--flagfile')->add($this->flagFile);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php
index 4b55610..8315953 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/GssFilter.php
@@ -34,54 +34,44 @@ class GssFilter extends BaseProcessFilter
private $outputOrientation;
private $prettyPrint;
- public function __construct($jarPath, $javaPath = '/usr/bin/java')
- {
+ public function __construct($jarPath, $javaPath = '/usr/bin/java') {
$this->jarPath = $jarPath;
$this->javaPath = $javaPath;
}
- public function setAllowUnrecognizedFunctions($allowUnrecognizedFunctions)
- {
+ public function setAllowUnrecognizedFunctions($allowUnrecognizedFunctions) {
$this->allowUnrecognizedFunctions = $allowUnrecognizedFunctions;
}
- public function setAllowedNonStandardFunctions($allowNonStandardFunctions)
- {
+ public function setAllowedNonStandardFunctions($allowNonStandardFunctions) {
$this->allowedNonStandardFunctions = $allowNonStandardFunctions;
}
- public function setCopyrightNotice($copyrightNotice)
- {
+ public function setCopyrightNotice($copyrightNotice) {
$this->copyrightNotice = $copyrightNotice;
}
- public function setDefine($define)
- {
+ public function setDefine($define) {
$this->define = $define;
}
- public function setGssFunctionMapProvider($gssFunctionMapProvider)
- {
+ public function setGssFunctionMapProvider($gssFunctionMapProvider) {
$this->gssFunctionMapProvider = $gssFunctionMapProvider;
}
- public function setInputOrientation($inputOrientation)
- {
+ public function setInputOrientation($inputOrientation) {
$this->inputOrientation = $inputOrientation;
}
- public function setOutputOrientation($outputOrientation)
- {
+ public function setOutputOrientation($outputOrientation) {
$this->outputOrientation = $outputOrientation;
}
- public function setPrettyPrint($prettyPrint)
- {
+ public function setPrettyPrint($prettyPrint) {
$this->prettyPrint = $prettyPrint;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$cleanup = array();
$pb = $this->createProcessBuilder(array(
@@ -90,35 +80,35 @@ class GssFilter extends BaseProcessFilter
$this->jarPath,
));
- if (null !== $this->allowUnrecognizedFunctions) {
+ if (NULL !== $this->allowUnrecognizedFunctions) {
$pb->add('--allow-unrecognized-functions');
}
- if (null !== $this->allowedNonStandardFunctions) {
+ if (NULL !== $this->allowedNonStandardFunctions) {
$pb->add('--allowed_non_standard_functions')->add($this->allowedNonStandardFunctions);
}
- if (null !== $this->copyrightNotice) {
+ if (NULL !== $this->copyrightNotice) {
$pb->add('--copyright-notice')->add($this->copyrightNotice);
}
- if (null !== $this->define) {
+ if (NULL !== $this->define) {
$pb->add('--define')->add($this->define);
}
- if (null !== $this->gssFunctionMapProvider) {
+ if (NULL !== $this->gssFunctionMapProvider) {
$pb->add('--gss-function-map-provider')->add($this->gssFunctionMapProvider);
}
- if (null !== $this->inputOrientation) {
+ if (NULL !== $this->inputOrientation) {
$pb->add('--input-orientation')->add($this->inputOrientation);
}
- if (null !== $this->outputOrientation) {
+ if (NULL !== $this->outputOrientation) {
$pb->add('--output-orientation')->add($this->outputOrientation);
}
- if (null !== $this->prettyPrint) {
+ if (NULL !== $this->prettyPrint) {
$pb->add('--pretty-print');
}
@@ -136,7 +126,6 @@ class GssFilter extends BaseProcessFilter
$asset->setContent($proc->getOutput());
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php
index f34927f..375cc17 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/HandlebarsFilter.php
@@ -26,27 +26,23 @@ class HandlebarsFilter extends BaseNodeFilter
private $handlebarsBin;
private $nodeBin;
- private $minimize = false;
- private $simple = false;
+ private $minimize = FALSE;
+ private $simple = FALSE;
- public function __construct($handlebarsBin = '/usr/bin/handlebars', $nodeBin = null)
- {
+ public function __construct($handlebarsBin = '/usr/bin/handlebars', $nodeBin = NULL) {
$this->handlebarsBin = $handlebarsBin;
$this->nodeBin = $nodeBin;
}
- public function setMinimize($minimize)
- {
+ public function setMinimize($minimize) {
$this->minimize = $minimize;
}
- public function setSimple($simple)
- {
+ public function setSimple($simple) {
$this->simple = $simple;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$pb = $this->createProcessBuilder($this->nodeBin
? array($this->nodeBin, $this->handlebarsBin)
: array($this->handlebarsBin));
@@ -58,7 +54,7 @@ class HandlebarsFilter extends BaseNodeFilter
}
$inputDirPath = FilesystemUtils::createThrowAwayDirectory('handlebars_in');
- $inputPath = $inputDirPath.DIRECTORY_SEPARATOR.$templateName;
+ $inputPath = $inputDirPath . DIRECTORY_SEPARATOR . $templateName;
$outputPath = FilesystemUtils::createTemporaryFile('handlebars_out');
file_put_contents($inputPath, $asset->getContent());
@@ -100,7 +96,6 @@ class HandlebarsFilter extends BaseNodeFilter
$asset->setContent($compiledJs);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php
index 884656b..278eeb9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinFilter.php
@@ -23,12 +23,10 @@ use Assetic\Asset\AssetInterface;
*/
class JSMinFilter implements FilterInterface
{
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$asset->setContent(\JSMin::minify($asset->getContent()));
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php
index 14cd085..dac6277 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSMinPlusFilter.php
@@ -23,12 +23,10 @@ use Assetic\Asset\AssetInterface;
*/
class JSMinPlusFilter implements FilterInterface
{
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$asset->setContent(\JSMinPlus::minify($asset->getContent()));
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSqueezeFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSqueezeFilter.php
index 07c7fd6..cbf987e 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSqueezeFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JSqueezeFilter.php
@@ -21,14 +21,13 @@ use Assetic\Asset\AssetInterface;
*/
class JSqueezeFilter implements FilterInterface
{
- private $singleLine = true;
- private $keepImportantComments = true;
+ private $singleLine = TRUE;
+ private $keepImportantComments = TRUE;
private $className;
- private $specialVarRx = false;
+ private $specialVarRx = FALSE;
private $defaultRx;
- public function __construct()
- {
+ public function __construct() {
// JSqueeze is namespaced since 2.x, this works with both 1.x and 2.x
if (class_exists('\\Patchwork\\JSqueeze')) {
$this->className = '\\Patchwork\\JSqueeze';
@@ -39,33 +38,28 @@ class JSqueezeFilter implements FilterInterface
}
}
- public function setSingleLine($bool)
- {
- $this->singleLine = (bool) $bool;
+ public function setSingleLine($bool) {
+ $this->singleLine = (bool)$bool;
}
// call setSpecialVarRx(true) to enable global var/method/property
// renaming with the default regex (for 1.x or 2.x)
- public function setSpecialVarRx($specialVarRx)
- {
- if (true === $specialVarRx) {
+ public function setSpecialVarRx($specialVarRx) {
+ if (TRUE === $specialVarRx) {
$this->specialVarRx = $this->defaultRx;
} else {
$this->specialVarRx = $specialVarRx;
}
}
- public function keepImportantComments($bool)
- {
- $this->keepImportantComments = (bool) $bool;
+ public function keepImportantComments($bool) {
+ $this->keepImportantComments = (bool)$bool;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$parser = new $this->className();
$asset->setContent($parser->squeeze(
$asset->getContent(),
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php
index fcc1489..3e83965 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegoptimFilter.php
@@ -32,27 +32,22 @@ class JpegoptimFilter extends BaseProcessFilter
*
* @param string $jpegoptimBin Path to the jpegoptim binary
*/
- public function __construct($jpegoptimBin = '/usr/bin/jpegoptim')
- {
+ public function __construct($jpegoptimBin = '/usr/bin/jpegoptim') {
$this->jpegoptimBin = $jpegoptimBin;
}
- public function setStripAll($stripAll)
- {
+ public function setStripAll($stripAll) {
$this->stripAll = $stripAll;
}
- public function setMax($max)
- {
+ public function setMax($max) {
$this->max = $max;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder(array($this->jpegoptimBin));
if ($this->stripAll) {
@@ -60,7 +55,7 @@ class JpegoptimFilter extends BaseProcessFilter
}
if ($this->max) {
- $pb->add('--max='.$this->max);
+ $pb->add('--max=' . $this->max);
}
$pb->add($input = FilesystemUtils::createTemporaryFile('jpegoptim'));
@@ -69,7 +64,7 @@ class JpegoptimFilter extends BaseProcessFilter
$proc = $pb->getProcess();
$proc->run();
- if (false !== strpos($proc->getOutput(), 'ERROR')) {
+ if (FALSE !== strpos($proc->getOutput(), 'ERROR')) {
unlink($input);
throw FilterException::fromProcess($proc)->setInput($asset->getContent());
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php
index 7836538..c1547e9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/JpegtranFilter.php
@@ -38,37 +38,30 @@ class JpegtranFilter extends BaseProcessFilter
*
* @param string $jpegtranBin Path to the jpegtran binary
*/
- public function __construct($jpegtranBin = '/usr/bin/jpegtran')
- {
+ public function __construct($jpegtranBin = '/usr/bin/jpegtran') {
$this->jpegtranBin = $jpegtranBin;
}
- public function setOptimize($optimize)
- {
+ public function setOptimize($optimize) {
$this->optimize = $optimize;
}
- public function setCopy($copy)
- {
+ public function setCopy($copy) {
$this->copy = $copy;
}
- public function setProgressive($progressive)
- {
+ public function setProgressive($progressive) {
$this->progressive = $progressive;
}
- public function setRestart($restart)
- {
+ public function setRestart($restart) {
$this->restart = $restart;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder(array($this->jpegtranBin));
if ($this->optimize) {
@@ -83,7 +76,7 @@ class JpegtranFilter extends BaseProcessFilter
$pb->add('-progressive');
}
- if (null !== $this->restart) {
+ if (NULL !== $this->restart) {
$pb->add('-restart')->add($this->restart);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php
index 7ca5cd7..4532cdd 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessFilter.php
@@ -49,11 +49,10 @@ class LessFilter extends BaseNodeFilter implements DependencyExtractorInterface
/**
* Constructor.
*
- * @param string $nodeBin The path to the node binary
- * @param array $nodePaths An array of node paths
+ * @param string $nodeBin The path to the node binary
+ * @param array $nodePaths An array of node paths
*/
- public function __construct($nodeBin = '/usr/bin/node', array $nodePaths = array())
- {
+ public function __construct($nodeBin = '/usr/bin/node', array $nodePaths = array()) {
$this->nodeBin = $nodeBin;
$this->setNodePaths($nodePaths);
$this->treeOptions = array();
@@ -63,13 +62,11 @@ class LessFilter extends BaseNodeFilter implements DependencyExtractorInterface
/**
* @param bool $compress
*/
- public function setCompress($compress)
- {
+ public function setCompress($compress) {
$this->addTreeOption('compress', $compress);
}
- public function setLoadPaths(array $loadPaths)
- {
+ public function setLoadPaths(array $loadPaths) {
$this->loadPaths = $loadPaths;
}
@@ -78,8 +75,7 @@ class LessFilter extends BaseNodeFilter implements DependencyExtractorInterface
*
* @param string $path Load path (absolute)
*/
- public function addLoadPath($path)
- {
+ public function addLoadPath($path) {
$this->loadPaths[] = $path;
}
@@ -87,8 +83,7 @@ class LessFilter extends BaseNodeFilter implements DependencyExtractorInterface
* @param string $code
* @param string $value
*/
- public function addTreeOption($code, $value)
- {
+ public function addTreeOption($code, $value) {
$this->treeOptions[$code] = $value;
}
@@ -96,13 +91,11 @@ class LessFilter extends BaseNodeFilter implements DependencyExtractorInterface
* @param string $code
* @param string $value
*/
- public function addParserOption($code, $value)
- {
+ public function addParserOption($code, $value) {
$this->parserOptions[$code] = $value;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
static $format = <<<'EOF'
var less = require('less');
var sys = require(process.binding('natives').util ? 'util' : 'sys');
@@ -156,18 +149,16 @@ EOF;
$asset->setContent($proc->getOutput());
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
/**
* @todo support for import-once
* @todo support for import (less) "lib.css"
*/
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
$loadPaths = $this->loadPaths;
- if (null !== $loadPath) {
+ if (NULL !== $loadPath) {
$loadPaths[] = $loadPath;
}
@@ -188,7 +179,7 @@ EOF;
}
foreach ($loadPaths as $loadPath) {
- if (file_exists($file = $loadPath.'/'.$reference)) {
+ if (file_exists($file = $loadPath . '/' . $reference)) {
$coll = $factory->createAsset($file, array(), array('root' => $loadPath));
foreach ($coll as $leaf) {
$leaf->ensureFilter($this);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php
index 6116f58..5424655 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/LessphpFilter.php
@@ -45,8 +45,7 @@ class LessphpFilter implements DependencyExtractorInterface
*
* @param string $path Load Path
*/
- public function addLoadPath($path)
- {
+ public function addLoadPath($path) {
$this->loadPaths[] = $path;
}
@@ -55,39 +54,33 @@ class LessphpFilter implements DependencyExtractorInterface
*
* @param array $loadPaths Load paths
*/
- public function setLoadPaths(array $loadPaths)
- {
+ public function setLoadPaths(array $loadPaths) {
$this->loadPaths = $loadPaths;
}
- public function setPresets(array $presets)
- {
+ public function setPresets(array $presets) {
$this->presets = $presets;
}
-
- public function setOptions(array $options)
- {
- $this->options = $options;
+
+ public function setOptions(array $options) {
+ $this->options = $options;
}
/**
* @param string $formatter One of "lessjs", "compressed", or "classic".
*/
- public function setFormatter($formatter)
- {
+ public function setFormatter($formatter) {
$this->formatter = $formatter;
}
/**
* @param boolean $preserveComments
*/
- public function setPreserveComments($preserveComments)
- {
+ public function setPreserveComments($preserveComments) {
$this->preserveComments = $preserveComments;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$lc = new \lessc();
if ($dir = $asset->getSourceDirectory()) {
$lc->importDir = $dir;
@@ -105,30 +98,27 @@ class LessphpFilter implements DependencyExtractorInterface
$lc->setFormatter($this->formatter);
}
- if (null !== $this->preserveComments) {
+ if (NULL !== $this->preserveComments) {
$lc->setPreserveComments($this->preserveComments);
}
-
- if (method_exists($lc, 'setOptions') && count($this->options) > 0 ) {
- $lc->setOptions($this->options);
+
+ if (method_exists($lc, 'setOptions') && count($this->options) > 0) {
+ $lc->setOptions($this->options);
}
$asset->setContent($lc->parse($asset->getContent(), $this->presets));
}
- public function registerFunction($name, $callable)
- {
+ public function registerFunction($name, $callable) {
$this->customFunctions[$name] = $callable;
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
$loadPaths = $this->loadPaths;
- if (null !== $loadPath) {
+ if (NULL !== $loadPath) {
$loadPaths[] = $loadPath;
}
@@ -149,7 +139,7 @@ class LessphpFilter implements DependencyExtractorInterface
}
foreach ($loadPaths as $loadPath) {
- if (file_exists($file = $loadPath.'/'.$reference)) {
+ if (file_exists($file = $loadPath . '/' . $reference)) {
$coll = $factory->createAsset($file, array(), array('root' => $loadPath));
foreach ($coll as $leaf) {
$leaf->ensureFilter($this);
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/MinifyCssCompressorFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/MinifyCssCompressorFilter.php
index 180667a..4e7f521 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/MinifyCssCompressorFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/MinifyCssCompressorFilter.php
@@ -24,12 +24,10 @@ use Assetic\Asset\AssetInterface;
*/
class MinifyCssCompressorFilter implements FilterInterface
{
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$asset->setContent(\Minify_CSS_Compressor::process($asset->getContent()));
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php
index 5bc1d12..5a93a02 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/OptiPngFilter.php
@@ -31,25 +31,21 @@ class OptiPngFilter extends BaseProcessFilter
*
* @param string $optipngBin Path to the optipng binary
*/
- public function __construct($optipngBin = '/usr/bin/optipng')
- {
+ public function __construct($optipngBin = '/usr/bin/optipng') {
$this->optipngBin = $optipngBin;
}
- public function setLevel($level)
- {
+ public function setLevel($level) {
$this->level = $level;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder(array($this->optipngBin));
- if (null !== $this->level) {
+ if (NULL !== $this->level) {
$pb->add('-o')->add($this->level);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php
index 23ceb4e..08fff01 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackagerFilter.php
@@ -24,42 +24,38 @@ class PackagerFilter implements FilterInterface
{
private $packages;
- public function __construct(array $packages = array())
- {
+ public function __construct(array $packages = array()) {
$this->packages = $packages;
}
- public function addPackage($package)
- {
+ public function addPackage($package) {
$this->packages[] = $package;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
static $manifest = <<getContent());
+ file_put_contents($package . '/package.yml', sprintf($manifest, $hash));
+ file_put_contents($package . '/source.js', $asset->getContent());
$packager = new \Packager(array_merge(array($package), $this->packages));
- $content = $packager->build(array(), array(), array('Application'.$hash));
+ $content = $packager->build(array(), array(), array('Application' . $hash));
- unlink($package.'/package.yml');
- unlink($package.'/source.js');
+ unlink($package . '/package.yml');
+ unlink($package . '/source.js');
rmdir($package);
$asset->setContent($content);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php
index 6dbe5f3..bc9b59d 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PackerFilter.php
@@ -25,31 +25,26 @@ class PackerFilter implements FilterInterface
{
protected $encoding = 'None';
- protected $fastDecode = true;
+ protected $fastDecode = TRUE;
- protected $specialChars = false;
+ protected $specialChars = FALSE;
- public function setEncoding($encoding)
- {
+ public function setEncoding($encoding) {
$this->encoding = $encoding;
}
- public function setFastDecode($fastDecode)
- {
- $this->fastDecode = (bool) $fastDecode;
+ public function setFastDecode($fastDecode) {
+ $this->fastDecode = (bool)$fastDecode;
}
- public function setSpecialChars($specialChars)
- {
- $this->specialChars = (bool) $specialChars;
+ public function setSpecialChars($specialChars) {
+ $this->specialChars = (bool)$specialChars;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$packer = new \JavaScriptPacker($asset->getContent(), $this->encoding, $this->fastDecode, $this->specialChars);
$asset->setContent($packer->pack());
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php
index b1ff33f..dd41eb6 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PhpCssEmbedFilter.php
@@ -25,13 +25,11 @@ class PhpCssEmbedFilter implements DependencyExtractorInterface
{
private $presets = array();
- public function setPresets(array $presets)
- {
+ public function setPresets(array $presets) {
$this->presets = $presets;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$pce = new CssEmbed();
if ($dir = $asset->getSourceDirectory()) {
$pce->setRootDir($dir);
@@ -40,12 +38,10 @@ class PhpCssEmbedFilter implements DependencyExtractorInterface
$asset->setContent($pce->embedString($asset->getContent()));
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
// todo
return array();
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php
index 592ef3a..a936693 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/PngoutFilter.php
@@ -24,26 +24,26 @@ use Assetic\Util\FilesystemUtils;
class PngoutFilter extends BaseProcessFilter
{
// -c#
- const COLOR_GREY = '0';
- const COLOR_RGB = '2';
- const COLOR_PAL = '3';
+ const COLOR_GREY = '0';
+ const COLOR_RGB = '2';
+ const COLOR_PAL = '3';
const COLOR_GRAY_ALPHA = '4';
- const COLOR_RGB_ALPHA = '6';
+ const COLOR_RGB_ALPHA = '6';
// -f#
- const FILTER_NONE = '0';
- const FILTER_X = '1';
- const FILTER_Y = '2';
- const FILTER_X_Y = '3';
+ const FILTER_NONE = '0';
+ const FILTER_X = '1';
+ const FILTER_Y = '2';
+ const FILTER_X_Y = '3';
const FILTER_PAETH = '4';
const FILTER_MIXED = '5';
// -s#
- const STRATEGY_XTREME = '0';
- const STRATEGY_INTENSE = '1';
+ const STRATEGY_XTREME = '0';
+ const STRATEGY_INTENSE = '1';
const STRATEGY_LONGEST_MATCH = '2';
- const STRATEGY_HUFFMAN_ONLY = '3';
- const STRATEGY_UNCOMPRESSED = '4';
+ const STRATEGY_HUFFMAN_ONLY = '3';
+ const STRATEGY_UNCOMPRESSED = '4';
private $pngoutBin;
private $color;
@@ -56,53 +56,46 @@ class PngoutFilter extends BaseProcessFilter
*
* @param string $pngoutBin Path to the pngout binary
*/
- public function __construct($pngoutBin = '/usr/bin/pngout')
- {
+ public function __construct($pngoutBin = '/usr/bin/pngout') {
$this->pngoutBin = $pngoutBin;
}
- public function setColor($color)
- {
+ public function setColor($color) {
$this->color = $color;
}
- public function setFilter($filter)
- {
+ public function setFilter($filter) {
$this->filter = $filter;
}
- public function setStrategy($strategy)
- {
+ public function setStrategy($strategy) {
$this->strategy = $strategy;
}
- public function setBlockSplitThreshold($blockSplitThreshold)
- {
+ public function setBlockSplitThreshold($blockSplitThreshold) {
$this->blockSplitThreshold = $blockSplitThreshold;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder(array($this->pngoutBin));
- if (null !== $this->color) {
- $pb->add('-c'.$this->color);
+ if (NULL !== $this->color) {
+ $pb->add('-c' . $this->color);
}
- if (null !== $this->filter) {
- $pb->add('-f'.$this->filter);
+ if (NULL !== $this->filter) {
+ $pb->add('-f' . $this->filter);
}
- if (null !== $this->strategy) {
- $pb->add('-s'.$this->strategy);
+ if (NULL !== $this->strategy) {
+ $pb->add('-s' . $this->strategy);
}
- if (null !== $this->blockSplitThreshold) {
- $pb->add('-b'.$this->blockSplitThreshold);
+ if (NULL !== $this->blockSplitThreshold) {
+ $pb->add('-b' . $this->blockSplitThreshold);
}
$pb->add($input = FilesystemUtils::createTemporaryFile('pngout_in'));
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ReactJsxFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ReactJsxFilter.php
index dc4f218..a7dcc56 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ReactJsxFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ReactJsxFilter.php
@@ -17,22 +17,20 @@ class ReactJsxFilter extends BaseNodeFilter
private $jsxBin;
private $nodeBin;
- public function __construct($jsxBin = '/usr/bin/jsx', $nodeBin = null)
- {
+ public function __construct($jsxBin = '/usr/bin/jsx', $nodeBin = NULL) {
$this->jsxBin = $jsxBin;
$this->nodeBin = $nodeBin;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$builder = $this->createProcessBuilder($this->nodeBin
? array($this->nodeBin, $this->jsxBin)
: array($this->jsxBin));
$inputDir = FilesystemUtils::createThrowAwayDirectory('jsx_in');
- $inputFile = $inputDir.DIRECTORY_SEPARATOR.'asset.js';
+ $inputFile = $inputDir . DIRECTORY_SEPARATOR . 'asset.js';
$outputDir = FilesystemUtils::createThrowAwayDirectory('jsx_out');
- $outputFile = $outputDir.DIRECTORY_SEPARATOR.'asset.js';
+ $outputFile = $outputDir . DIRECTORY_SEPARATOR . 'asset.js';
// create the asset file
file_put_contents($inputFile, $asset->getContent());
@@ -40,8 +38,7 @@ class ReactJsxFilter extends BaseNodeFilter
$builder
->add($inputDir)
->add($outputDir)
- ->add('--no-cache-dir')
- ;
+ ->add('--no-cache-dir');
$proc = $builder->getProcess();
$code = $proc->run();
@@ -69,7 +66,6 @@ class ReactJsxFilter extends BaseNodeFilter
rmdir($outputDir);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php
index cbcaf4c..f841d6f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/RooleFilter.php
@@ -31,18 +31,16 @@ class RooleFilter extends BaseNodeFilter implements DependencyExtractorInterface
* Constructor
*
* @param string $rooleBin The path to the roole binary
- * @param string $nodeBin The path to the node binary
+ * @param string $nodeBin The path to the node binary
*/
- public function __construct($rooleBin = '/usr/bin/roole', $nodeBin = null)
- {
+ public function __construct($rooleBin = '/usr/bin/roole', $nodeBin = NULL) {
$this->rooleBin = $rooleBin;
$this->nodeBin = $nodeBin;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$input = FilesystemUtils::createTemporaryFile('roole');
- $output = $input.'.css';
+ $output = $input . '.css';
file_put_contents($input, $asset->getContent());
@@ -72,12 +70,10 @@ class RooleFilter extends BaseNodeFilter implements DependencyExtractorInterface
unlink($output);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
// todo
return array();
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/BaseSassFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/BaseSassFilter.php
index 68903f0..7d1e7fb 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/BaseSassFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/BaseSassFilter.php
@@ -12,18 +12,15 @@ abstract class BaseSassFilter extends BaseProcessFilter implements DependencyExt
{
protected $loadPaths = array();
- public function setLoadPaths(array $loadPaths)
- {
+ public function setLoadPaths(array $loadPaths) {
$this->loadPaths = $loadPaths;
}
- public function addLoadPath($loadPath)
- {
+ public function addLoadPath($loadPath) {
$this->loadPaths[] = $loadPath;
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
$loadPaths = $this->loadPaths;
if ($loadPath) {
array_unshift($loadPaths, $loadPath);
@@ -49,16 +46,16 @@ abstract class BaseSassFilter extends BaseProcessFilter implements DependencyExt
);
} else {
$needles = array(
- $reference.'.scss',
- $reference.'.sass',
- self::partialize($reference).'.scss',
- self::partialize($reference).'.sass',
+ $reference . '.scss',
+ $reference . '.sass',
+ self::partialize($reference) . '.scss',
+ self::partialize($reference) . '.sass',
);
}
foreach ($loadPaths as $loadPath) {
foreach ($needles as $needle) {
- if (file_exists($file = $loadPath.'/'.$needle)) {
+ if (file_exists($file = $loadPath . '/' . $needle)) {
$coll = $factory->createAsset($file, array(), array('root' => $loadPath));
foreach ($coll as $leaf) {
/** @var $leaf AssetInterface */
@@ -76,18 +73,17 @@ abstract class BaseSassFilter extends BaseProcessFilter implements DependencyExt
return $children;
}
- private static function partialize($reference)
- {
+ private static function partialize($reference) {
$parts = pathinfo($reference);
if ('.' === $parts['dirname']) {
- $partial = '_'.$parts['filename'];
+ $partial = '_' . $parts['filename'];
} else {
- $partial = $parts['dirname'].DIRECTORY_SEPARATOR.'_'.$parts['filename'];
+ $partial = $parts['dirname'] . DIRECTORY_SEPARATOR . '_' . $parts['filename'];
}
if (isset($parts['extension'])) {
- $partial .= '.'.$parts['extension'];
+ $partial .= '.' . $parts['extension'];
}
return $partial;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php
index 68da116..a111ef0 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/SassFilter.php
@@ -23,9 +23,9 @@ use Assetic\Util\FilesystemUtils;
*/
class SassFilter extends BaseSassFilter
{
- const STYLE_NESTED = 'nested';
- const STYLE_EXPANDED = 'expanded';
- const STYLE_COMPACT = 'compact';
+ const STYLE_NESTED = 'nested';
+ const STYLE_EXPANDED = 'expanded';
+ const STYLE_COMPACT = 'compact';
const STYLE_COMPRESSED = 'compressed';
private $sassPath;
@@ -42,72 +42,59 @@ class SassFilter extends BaseSassFilter
private $noCache;
private $compass;
- public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null)
- {
+ public function __construct($sassPath = '/usr/bin/sass', $rubyPath = NULL) {
$this->sassPath = $sassPath;
$this->rubyPath = $rubyPath;
$this->cacheLocation = FilesystemUtils::getTemporaryDirectory();
}
- public function setUnixNewlines($unixNewlines)
- {
+ public function setUnixNewlines($unixNewlines) {
$this->unixNewlines = $unixNewlines;
}
- public function setScss($scss)
- {
+ public function setScss($scss) {
$this->scss = $scss;
}
- public function setStyle($style)
- {
+ public function setStyle($style) {
$this->style = $style;
}
- public function setPrecision($precision)
- {
+ public function setPrecision($precision) {
$this->precision = $precision;
}
- public function setQuiet($quiet)
- {
+ public function setQuiet($quiet) {
$this->quiet = $quiet;
}
- public function setDebugInfo($debugInfo)
- {
+ public function setDebugInfo($debugInfo) {
$this->debugInfo = $debugInfo;
}
- public function setLineNumbers($lineNumbers)
- {
+ public function setLineNumbers($lineNumbers) {
$this->lineNumbers = $lineNumbers;
}
- public function setSourceMap($sourceMap)
- {
+ public function setSourceMap($sourceMap) {
$this->sourceMap = $sourceMap;
}
- public function setCacheLocation($cacheLocation)
- {
+ public function setCacheLocation($cacheLocation) {
$this->cacheLocation = $cacheLocation;
}
- public function setNoCache($noCache)
- {
+ public function setNoCache($noCache) {
$this->noCache = $noCache;
}
- public function setCompass($compass)
- {
+ public function setCompass($compass) {
$this->compass = $compass;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$sassProcessArgs = array($this->sassPath);
- if (null !== $this->rubyPath) {
+ if (NULL !== $this->rubyPath) {
$sassProcessArgs = array_merge(explode(' ', $this->rubyPath), $sassProcessArgs);
}
@@ -121,7 +108,7 @@ class SassFilter extends BaseSassFilter
$pb->add('--unix-newlines');
}
- if (true === $this->scss || (null === $this->scss && 'scss' == pathinfo($asset->getSourcePath(), PATHINFO_EXTENSION))) {
+ if (TRUE === $this->scss || (NULL === $this->scss && 'scss' == pathinfo($asset->getSourcePath(), PATHINFO_EXTENSION))) {
$pb->add('--scss');
}
@@ -180,7 +167,6 @@ class SassFilter extends BaseSassFilter
$asset->setContent($proc->getOutput());
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php
index f8be046..8fbf567 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Sass/ScssFilter.php
@@ -19,10 +19,9 @@ namespace Assetic\Filter\Sass;
*/
class ScssFilter extends SassFilter
{
- public function __construct($sassPath = '/usr/bin/sass', $rubyPath = null)
- {
+ public function __construct($sassPath = '/usr/bin/sass', $rubyPath = NULL) {
parent::__construct($sassPath, $rubyPath);
- $this->setScss(true);
+ $this->setScss(TRUE);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SassphpFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SassphpFilter.php
index 5d4ed1e..9bfd042 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SassphpFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SassphpFilter.php
@@ -26,8 +26,7 @@ class SassphpFilter implements DependencyExtractorInterface
private $includePaths = array();
private $outputStyle;
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$sass = new \Sass();
$includePaths = array_merge(
@@ -45,31 +44,26 @@ class SassphpFilter implements DependencyExtractorInterface
$asset->setContent($css);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function setOutputStyle($outputStyle)
- {
+ public function setOutputStyle($outputStyle) {
$this->outputStyle = $outputStyle;
}
- public function setIncludePaths(array $paths)
- {
+ public function setIncludePaths(array $paths) {
$this->includePaths = $paths;
}
- public function addIncludePath($path)
- {
+ public function addIncludePath($path) {
$this->includePaths[] = $path;
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
$children = array();
$includePaths = $this->includePaths;
- if (null !== $loadPath && !in_array($loadPath, $includePaths)) {
+ if (NULL !== $loadPath && !in_array($loadPath, $includePaths)) {
array_unshift($includePaths, $loadPath);
}
@@ -113,8 +107,7 @@ class SassphpFilter implements DependencyExtractorInterface
return $children;
}
- private function partialize($reference)
- {
+ private function partialize($reference) {
$parts = pathinfo($reference);
if ('.' === $parts['dirname']) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php
index c2252a1..869d65a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/ScssphpFilter.php
@@ -27,24 +27,21 @@ use Leafo\ScssPhp\Compiler;
*/
class ScssphpFilter implements DependencyExtractorInterface
{
- private $compass = false;
+ private $compass = FALSE;
private $importPaths = array();
private $customFunctions = array();
private $formatter;
private $variables = array();
- public function enableCompass($enable = true)
- {
- $this->compass = (Boolean) $enable;
+ public function enableCompass($enable = TRUE) {
+ $this->compass = (Boolean)$enable;
}
- public function isCompassEnabled()
- {
+ public function isCompassEnabled() {
return $this->compass;
}
- public function setFormatter($formatter)
- {
+ public function setFormatter($formatter) {
$legacyFormatters = array(
'scss_formatter' => 'Leafo\ScssPhp\Formatter\Expanded',
'scss_formatter_nested' => 'Leafo\ScssPhp\Formatter\Nested',
@@ -61,33 +58,27 @@ class ScssphpFilter implements DependencyExtractorInterface
$this->formatter = $formatter;
}
- public function setVariables(array $variables)
- {
+ public function setVariables(array $variables) {
$this->variables = $variables;
}
- public function addVariable($variable)
- {
+ public function addVariable($variable) {
$this->variables[] = $variable;
}
- public function setImportPaths(array $paths)
- {
+ public function setImportPaths(array $paths) {
$this->importPaths = $paths;
}
- public function addImportPath($path)
- {
+ public function addImportPath($path) {
$this->importPaths[] = $path;
}
- public function registerFunction($name, $callable)
- {
+ public function registerFunction($name, $callable) {
$this->customFunctions[$name] = $callable;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$sc = new Compiler();
if ($this->compass) {
@@ -117,14 +108,12 @@ class ScssphpFilter implements DependencyExtractorInterface
$asset->setContent($sc->compile($asset->getContent()));
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
$sc = new Compiler();
- if ($loadPath !== null) {
+ if ($loadPath !== NULL) {
$sc->addImportPath($loadPath);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SeparatorFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SeparatorFilter.php
index a2c02ab..00b37e1 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SeparatorFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SeparatorFilter.php
@@ -31,17 +31,14 @@ class SeparatorFilter implements FilterInterface
*
* @param string $separator Separator to use between assets
*/
- public function __construct($separator = ';')
- {
+ public function __construct($separator = ';') {
$this->separator = $separator;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$asset->setContent($asset->getContent() . $this->separator);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php
index ed46b0f..b1d8610 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/SprocketsFilter.php
@@ -37,30 +37,26 @@ class SprocketsFilter extends BaseProcessFilter implements DependencyExtractorIn
* Constructor.
*
* @param string $sprocketsLib Path to the Sprockets lib/ directory
- * @param string $rubyBin Path to the ruby binary
+ * @param string $rubyBin Path to the ruby binary
*/
- public function __construct($sprocketsLib = null, $rubyBin = '/usr/bin/ruby')
- {
+ public function __construct($sprocketsLib = NULL, $rubyBin = '/usr/bin/ruby') {
$this->sprocketsLib = $sprocketsLib;
$this->rubyBin = $rubyBin;
$this->includeDirs = array();
}
- public function addIncludeDir($directory)
- {
+ public function addIncludeDir($directory) {
$this->includeDirs[] = $directory;
}
- public function setAssetRoot($assetRoot)
- {
+ public function setAssetRoot($assetRoot) {
$this->assetRoot = $assetRoot;
}
/**
* Hack around a bit, get the job done.
*/
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
static $format = <<<'EOF'
#!/usr/bin/env ruby
@@ -79,11 +75,11 @@ EOF;
$more = '';
foreach ($this->includeDirs as $directory) {
- $more .= 'options[:load_path] << '.var_export($directory, true)."\n";
+ $more .= 'options[:load_path] << ' . var_export($directory, TRUE) . "\n";
}
- if (null !== $this->assetRoot) {
- $more .= 'options[:asset_root] = '.var_export($this->assetRoot, true)."\n";
+ if (NULL !== $this->assetRoot) {
+ $more .= 'options[:asset_root] = ' . var_export($this->assetRoot, TRUE) . "\n";
}
if ($more) {
@@ -96,10 +92,10 @@ EOF;
$input = FilesystemUtils::createTemporaryFile('sprockets_in');
file_put_contents($input, sprintf($format,
$this->sprocketsLib
- ? sprintf('File.join(%s, \'sprockets\')', var_export($this->sprocketsLib, true))
+ ? sprintf('File.join(%s, \'sprockets\')', var_export($this->sprocketsLib, TRUE))
: '\'sprockets\'',
$this->getHack($asset),
- var_export($tmpAsset, true),
+ var_export($tmpAsset, TRUE),
$more
));
@@ -120,18 +116,15 @@ EOF;
$asset->setContent($proc->getOutput());
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
// todo
return array();
}
- private function getHack(AssetInterface $asset)
- {
+ private function getHack(AssetInterface $asset) {
static $format = <<<'EOF'
module Sprockets
@@ -146,7 +139,7 @@ end
EOF;
if ($dir = $asset->getSourceDirectory()) {
- return sprintf($format, var_export($dir, true));
+ return sprintf($format, var_export($dir, TRUE));
}
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php
index aed7861..bca2206 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/StylusFilter.php
@@ -31,11 +31,10 @@ class StylusFilter extends BaseNodeFilter implements DependencyExtractorInterfac
/**
* Constructs filter.
*
- * @param string $nodeBin The path to the node binary
- * @param array $nodePaths An array of node paths
+ * @param string $nodeBin The path to the node binary
+ * @param array $nodePaths An array of node paths
*/
- public function __construct($nodeBin = '/usr/bin/node', array $nodePaths = array())
- {
+ public function __construct($nodeBin = '/usr/bin/node', array $nodePaths = array()) {
$this->nodeBin = $nodeBin;
$this->setNodePaths($nodePaths);
}
@@ -45,8 +44,7 @@ class StylusFilter extends BaseNodeFilter implements DependencyExtractorInterfac
*
* @param boolean $compress
*/
- public function setCompress($compress)
- {
+ public function setCompress($compress) {
$this->compress = $compress;
}
@@ -55,16 +53,14 @@ class StylusFilter extends BaseNodeFilter implements DependencyExtractorInterfac
*
* @param boolean $useNib
*/
- public function setUseNib($useNib)
- {
+ public function setUseNib($useNib) {
$this->useNib = $useNib;
}
/**
* {@inheritdoc}
*/
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
static $format = <<<'EOF'
var stylus = require('stylus');
var sys = require(process.binding('natives').util ? 'util' : 'sys');
@@ -87,7 +83,7 @@ EOF;
$parserOptions['filename'] = basename($asset->getSourcePath());
}
- if (null !== $this->compress) {
+ if (NULL !== $this->compress) {
$parserOptions['compress'] = $this->compress;
}
@@ -114,12 +110,10 @@ EOF;
/**
* {@inheritdoc}
*/
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
- public function getChildren(AssetFactory $factory, $content, $loadPath = null)
- {
+ public function getChildren(AssetFactory $factory, $content, $loadPath = NULL) {
// todo
return array();
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php
index 24aee31..ab77030 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/TypeScriptFilter.php
@@ -26,14 +26,12 @@ class TypeScriptFilter extends BaseNodeFilter
private $tscBin;
private $nodeBin;
- public function __construct($tscBin = '/usr/bin/tsc', $nodeBin = null)
- {
+ public function __construct($tscBin = '/usr/bin/tsc', $nodeBin = NULL) {
$this->tscBin = $tscBin;
$this->nodeBin = $nodeBin;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
$pb = $this->createProcessBuilder($this->nodeBin
? array($this->nodeBin, $this->tscBin)
: array($this->tscBin));
@@ -45,7 +43,7 @@ class TypeScriptFilter extends BaseNodeFilter
}
$inputDirPath = FilesystemUtils::createThrowAwayDirectory('typescript_in');
- $inputPath = $inputDirPath.DIRECTORY_SEPARATOR.$templateName.'.ts';
+ $inputPath = $inputDirPath . DIRECTORY_SEPARATOR . $templateName . '.ts';
$outputPath = FilesystemUtils::createTemporaryFile('typescript_out');
file_put_contents($inputPath, $asset->getContent());
@@ -74,7 +72,6 @@ class TypeScriptFilter extends BaseNodeFilter
$asset->setContent($compiledJs);
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php
index d534fa3..f666190 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyCssFilter.php
@@ -32,10 +32,9 @@ class UglifyCssFilter extends BaseNodeFilter
/**
* @param string $uglifycssBin Absolute path to the uglifycss executable
- * @param string $nodeBin Absolute path to the folder containg node.js executable
+ * @param string $nodeBin Absolute path to the folder containg node.js executable
*/
- public function __construct($uglifycssBin = '/usr/bin/uglifycss', $nodeBin = null)
- {
+ public function __construct($uglifycssBin = '/usr/bin/uglifycss', $nodeBin = NULL) {
$this->uglifycssBin = $uglifycssBin;
$this->nodeBin = $nodeBin;
}
@@ -44,8 +43,7 @@ class UglifyCssFilter extends BaseNodeFilter
* Expand variables
* @param bool $expandVars True to enable
*/
- public function setExpandVars($expandVars)
- {
+ public function setExpandVars($expandVars) {
$this->expandVars = $expandVars;
}
@@ -53,8 +51,7 @@ class UglifyCssFilter extends BaseNodeFilter
* Remove newlines within preserved comments
* @param bool $uglyComments True to enable
*/
- public function setUglyComments($uglyComments)
- {
+ public function setUglyComments($uglyComments) {
$this->uglyComments = $uglyComments;
}
@@ -62,16 +59,14 @@ class UglifyCssFilter extends BaseNodeFilter
* Preserve newlines within and around preserved comments
* @param bool $cuteComments True to enable
*/
- public function setCuteComments($cuteComments)
- {
+ public function setCuteComments($cuteComments) {
$this->cuteComments = $cuteComments;
}
/**
* @see Assetic\Filter\FilterInterface::filterLoad()
*/
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
/**
@@ -79,8 +74,7 @@ class UglifyCssFilter extends BaseNodeFilter
*
* @see Assetic\Filter\FilterInterface::filterDump()
*/
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder($this->nodeBin
? array($this->nodeBin, $this->uglifycssBin)
: array($this->uglifycssBin));
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php
index c0441ae..be63941 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJs2Filter.php
@@ -33,57 +33,47 @@ class UglifyJs2Filter extends BaseNodeFilter
private $wrap;
private $defines;
- public function __construct($uglifyjsBin = '/usr/bin/uglifyjs', $nodeBin = null)
- {
+ public function __construct($uglifyjsBin = '/usr/bin/uglifyjs', $nodeBin = NULL) {
$this->uglifyjsBin = $uglifyjsBin;
$this->nodeBin = $nodeBin;
}
- public function setCompress($compress)
- {
+ public function setCompress($compress) {
$this->compress = $compress;
}
- public function setBeautify($beautify)
- {
+ public function setBeautify($beautify) {
$this->beautify = $beautify;
}
- public function setMangle($mangle)
- {
+ public function setMangle($mangle) {
$this->mangle = $mangle;
}
- public function setScrewIe8($screwIe8)
- {
+ public function setScrewIe8($screwIe8) {
$this->screwIe8 = $screwIe8;
}
- public function setComments($comments)
- {
+ public function setComments($comments) {
$this->comments = $comments;
}
- public function setWrap($wrap)
- {
+ public function setWrap($wrap) {
$this->wrap = $wrap;
}
- public function setDefines(array $defines)
- {
+ public function setDefines(array $defines) {
$this->defines = $defines;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder(
$this->nodeBin
- ? array($this->nodeBin, $this->uglifyjsBin)
- : array($this->uglifyjsBin)
+ ? array($this->nodeBin, $this->uglifyjsBin)
+ : array($this->uglifyjsBin)
);
if ($this->compress) {
@@ -107,7 +97,7 @@ class UglifyJs2Filter extends BaseNodeFilter
}
if ($this->comments) {
- $pb->add('--comments')->add(true === $this->comments ? 'all' : $this->comments);
+ $pb->add('--comments')->add(TRUE === $this->comments ? 'all' : $this->comments);
}
if ($this->wrap) {
@@ -119,7 +109,7 @@ class UglifyJs2Filter extends BaseNodeFilter
}
// input and output files
- $input = FilesystemUtils::createTemporaryFile('uglifyjs2_in');
+ $input = FilesystemUtils::createTemporaryFile('uglifyjs2_in');
$output = FilesystemUtils::createTemporaryFile('uglifyjs2_out');
file_put_contents($input, $asset->getContent());
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php
index ff9ad66..fcac28c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/UglifyJsFilter.php
@@ -34,10 +34,9 @@ class UglifyJsFilter extends BaseNodeFilter
/**
* @param string $uglifyjsBin Absolute path to the uglifyjs executable
- * @param string $nodeBin Absolute path to the folder containg node.js executable
+ * @param string $nodeBin Absolute path to the folder containg node.js executable
*/
- public function __construct($uglifyjsBin = '/usr/bin/uglifyjs', $nodeBin = null)
- {
+ public function __construct($uglifyjsBin = '/usr/bin/uglifyjs', $nodeBin = NULL) {
$this->uglifyjsBin = $uglifyjsBin;
$this->nodeBin = $nodeBin;
}
@@ -46,8 +45,7 @@ class UglifyJsFilter extends BaseNodeFilter
* Removes the first block of comments as well
* @param bool $noCopyright True to enable
*/
- public function setNoCopyright($noCopyright)
- {
+ public function setNoCopyright($noCopyright) {
$this->noCopyright = $noCopyright;
}
@@ -55,8 +53,7 @@ class UglifyJsFilter extends BaseNodeFilter
* Output indented code
* @param bool $beautify True to enable
*/
- public function setBeautify($beautify)
- {
+ public function setBeautify($beautify) {
$this->beautify = $beautify;
}
@@ -64,8 +61,7 @@ class UglifyJsFilter extends BaseNodeFilter
* Enable additional optimizations that are known to be unsafe in some situations.
* @param bool $unsafe True to enable
*/
- public function setUnsafe($unsafe)
- {
+ public function setUnsafe($unsafe) {
$this->unsafe = $unsafe;
}
@@ -73,21 +69,18 @@ class UglifyJsFilter extends BaseNodeFilter
* Safely mangle variable and function names for greater file compress.
* @param bool $mangle True to enable
*/
- public function setMangle($mangle)
- {
+ public function setMangle($mangle) {
$this->mangle = $mangle;
}
- public function setDefines(array $defines)
- {
+ public function setDefines(array $defines) {
$this->defines = $defines;
}
/**
* @see Assetic\Filter\FilterInterface::filterLoad()
*/
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
/**
@@ -95,12 +88,11 @@ class UglifyJsFilter extends BaseNodeFilter
*
* @see Assetic\Filter\FilterInterface::filterDump()
*/
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$pb = $this->createProcessBuilder(
$this->nodeBin
- ? array($this->nodeBin, $this->uglifyjsBin)
- : array($this->uglifyjsBin)
+ ? array($this->nodeBin, $this->uglifyjsBin)
+ : array($this->uglifyjsBin)
);
if ($this->noCopyright) {
@@ -115,7 +107,7 @@ class UglifyJsFilter extends BaseNodeFilter
$pb->add('--unsafe');
}
- if (false === $this->mangle) {
+ if (FALSE === $this->mangle) {
$pb->add('--no-mangle');
}
@@ -126,7 +118,7 @@ class UglifyJsFilter extends BaseNodeFilter
}
// input and output files
- $input = FilesystemUtils::createTemporaryFile('uglifyjs_in');
+ $input = FilesystemUtils::createTemporaryFile('uglifyjs_in');
$output = FilesystemUtils::createTemporaryFile('uglifyjs_out');
file_put_contents($input, $asset->getContent());
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
index b3ec267..bbee1d7 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/BaseCompressorFilter.php
@@ -30,46 +30,40 @@ abstract class BaseCompressorFilter extends BaseProcessFilter
private $lineBreak;
private $stackSize;
- public function __construct($jarPath, $javaPath = '/usr/bin/java')
- {
+ public function __construct($jarPath, $javaPath = '/usr/bin/java') {
$this->jarPath = $jarPath;
$this->javaPath = $javaPath;
}
- public function setCharset($charset)
- {
+ public function setCharset($charset) {
$this->charset = $charset;
}
- public function setLineBreak($lineBreak)
- {
+ public function setLineBreak($lineBreak) {
$this->lineBreak = $lineBreak;
}
- public function setStackSize($stackSize)
- {
+ public function setStackSize($stackSize) {
$this->stackSize = $stackSize;
}
- public function filterLoad(AssetInterface $asset)
- {
+ public function filterLoad(AssetInterface $asset) {
}
/**
* Compresses a string.
*
* @param string $content The content to compress
- * @param string $type The type of content, either "js" or "css"
- * @param array $options An indexed array of additional options
+ * @param string $type The type of content, either "js" or "css"
+ * @param array $options An indexed array of additional options
*
* @return string The compressed content
*/
- protected function compress($content, $type, $options = array())
- {
+ protected function compress($content, $type, $options = array()) {
$pb = $this->createProcessBuilder(array($this->javaPath));
- if (null !== $this->stackSize) {
- $pb->add('-Xss'.$this->stackSize);
+ if (NULL !== $this->stackSize) {
+ $pb->add('-Xss' . $this->stackSize);
}
$pb->add('-jar')->add($this->jarPath);
@@ -78,11 +72,11 @@ abstract class BaseCompressorFilter extends BaseProcessFilter
$pb->add($option);
}
- if (null !== $this->charset) {
+ if (NULL !== $this->charset) {
$pb->add('--charset')->add($this->charset);
}
- if (null !== $this->lineBreak) {
+ if (NULL !== $this->lineBreak) {
$pb->add('--line-break')->add($this->lineBreak);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php
index 077c6d5..ee9af32 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/CssCompressorFilter.php
@@ -21,8 +21,7 @@ use Assetic\Asset\AssetInterface;
*/
class CssCompressorFilter extends BaseCompressorFilter
{
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$asset->setContent($this->compress($asset->getContent(), 'css'));
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php
index b2a59fb..79723ad 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Filter/Yui/JsCompressorFilter.php
@@ -25,23 +25,19 @@ class JsCompressorFilter extends BaseCompressorFilter
private $preserveSemi;
private $disableOptimizations;
- public function setNomunge($nomunge = true)
- {
+ public function setNomunge($nomunge = TRUE) {
$this->nomunge = $nomunge;
}
- public function setPreserveSemi($preserveSemi)
- {
+ public function setPreserveSemi($preserveSemi) {
$this->preserveSemi = $preserveSemi;
}
- public function setDisableOptimizations($disableOptimizations)
- {
+ public function setDisableOptimizations($disableOptimizations) {
$this->disableOptimizations = $disableOptimizations;
}
- public function filterDump(AssetInterface $asset)
- {
+ public function filterDump(AssetInterface $asset) {
$options = array();
if ($this->nomunge) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/FilterManager.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/FilterManager.php
index e2820d9..84e04f6 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/FilterManager.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/FilterManager.php
@@ -22,15 +22,13 @@ class FilterManager
{
private $filters = array();
- public function set($alias, FilterInterface $filter)
- {
+ public function set($alias, FilterInterface $filter) {
$this->checkName($alias);
$this->filters[$alias] = $filter;
}
- public function get($alias)
- {
+ public function get($alias) {
if (!isset($this->filters[$alias])) {
throw new \InvalidArgumentException(sprintf('There is no "%s" filter.', $alias));
}
@@ -38,13 +36,11 @@ class FilterManager
return $this->filters[$alias];
}
- public function has($alias)
- {
+ public function has($alias) {
return isset($this->filters[$alias]);
}
- public function getNames()
- {
+ public function getNames() {
return array_keys($this->filters);
}
@@ -55,8 +51,7 @@ class FilterManager
*
* @throws \InvalidArgumentException If the asset name is invalid
*/
- protected function checkName($name)
- {
+ protected function checkName($name) {
if (!ctype_alnum(str_replace('_', '', $name))) {
throw new \InvalidArgumentException(sprintf('The name "%s" is invalid.', $name));
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php
index ebc44b0..d0b81c8 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/CssUtils.php
@@ -18,24 +18,23 @@ namespace Assetic\Util;
*/
abstract class CssUtils
{
- const REGEX_URLS = '/url\((["\']?)(?P.*?)(\\1)\)/';
- const REGEX_IMPORTS = '/@import (?:url\()?(\'|"|)(?P[^\'"\)\n\r]*)\1\)?;?/';
+ const REGEX_URLS = '/url\((["\']?)(?P.*?)(\\1)\)/';
+ const REGEX_IMPORTS = '/@import (?:url\()?(\'|"|)(?P[^\'"\)\n\r]*)\1\)?;?/';
const REGEX_IMPORTS_NO_URLS = '/@import (?!url\()(\'|"|)(?P[^\'"\)\n\r]*)\1;?/';
- const REGEX_IE_FILTERS = '/src=(["\']?)(?P.*?)\\1/';
- const REGEX_COMMENTS = '/(\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)/';
+ const REGEX_IE_FILTERS = '/src=(["\']?)(?P.*?)\\1/';
+ const REGEX_COMMENTS = '/(\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)/';
/**
* Filters all references -- url() and "@import" -- through a callable.
*
- * @param string $content The CSS
+ * @param string $content The CSS
* @param callable $callback A PHP callable
*
* @return string The filtered CSS
*/
- public static function filterReferences($content, $callback)
- {
+ public static function filterReferences($content, $callback) {
$content = static::filterUrls($content, $callback);
- $content = static::filterImports($content, $callback, false);
+ $content = static::filterImports($content, $callback, FALSE);
$content = static::filterIEFilters($content, $callback);
return $content;
@@ -44,13 +43,12 @@ abstract class CssUtils
/**
* Filters all CSS url()'s through a callable.
*
- * @param string $content The CSS
+ * @param string $content The CSS
* @param callable $callback A PHP callable
*
* @return string The filtered CSS
*/
- public static function filterUrls($content, $callback)
- {
+ public static function filterUrls($content, $callback) {
$pattern = static::REGEX_URLS;
return static::filterCommentless($content, function ($part) use (& $callback, $pattern) {
@@ -61,14 +59,13 @@ abstract class CssUtils
/**
* Filters all CSS imports through a callable.
*
- * @param string $content The CSS
- * @param callable $callback A PHP callable
- * @param Boolean $includeUrl Whether to include url() in the pattern
+ * @param string $content The CSS
+ * @param callable $callback A PHP callable
+ * @param Boolean $includeUrl Whether to include url() in the pattern
*
* @return string The filtered CSS
*/
- public static function filterImports($content, $callback, $includeUrl = true)
- {
+ public static function filterImports($content, $callback, $includeUrl = TRUE) {
$pattern = $includeUrl ? static::REGEX_IMPORTS : static::REGEX_IMPORTS_NO_URLS;
return static::filterCommentless($content, function ($part) use (& $callback, $pattern) {
@@ -79,13 +76,12 @@ abstract class CssUtils
/**
* Filters all IE filters (AlphaImageLoader filter) through a callable.
*
- * @param string $content The CSS
+ * @param string $content The CSS
* @param callable $callback A PHP callable
*
* @return string The filtered CSS
*/
- public static function filterIEFilters($content, $callback)
- {
+ public static function filterIEFilters($content, $callback) {
$pattern = static::REGEX_IE_FILTERS;
return static::filterCommentless($content, function ($part) use (& $callback, $pattern) {
@@ -96,13 +92,12 @@ abstract class CssUtils
/**
* Filters each non-comment part through a callable.
*
- * @param string $content The CSS
+ * @param string $content The CSS
* @param callable $callback A PHP callable
*
* @return string The filtered CSS
*/
- public static function filterCommentless($content, $callback)
- {
+ public static function filterCommentless($content, $callback) {
$result = '';
foreach (preg_split(static::REGEX_COMMENTS, $content, -1, PREG_SPLIT_DELIM_CAPTURE) as $part) {
if (!preg_match(static::REGEX_COMMENTS, $part, $match) || $part != $match[0]) {
@@ -122,8 +117,7 @@ abstract class CssUtils
*
* @return array An array of unique URLs
*/
- public static function extractImports($content)
- {
+ public static function extractImports($content) {
$imports = array();
static::filterImports($content, function ($matches) use (&$imports) {
$imports[] = $matches['url'];
@@ -132,7 +126,6 @@ abstract class CssUtils
return array_unique(array_filter($imports));
}
- final private function __construct()
- {
+ final private function __construct() {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/FilesystemUtils.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/FilesystemUtils.php
index 90e6512..a788dff 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/FilesystemUtils.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/FilesystemUtils.php
@@ -21,8 +21,7 @@ class FilesystemUtils
/**
* Recursively removes a directory from the filesystem.
*/
- public static function removeDirectory($directory)
- {
+ public static function removeDirectory($directory) {
$inner = new \RecursiveDirectoryIterator($directory, \FilesystemIterator::SKIP_DOTS);
$outer = new \RecursiveIteratorIterator($inner, \RecursiveIteratorIterator::SELF_FIRST);
@@ -57,9 +56,8 @@ class FilesystemUtils
*
* @return string The directory path
*/
- public static function createThrowAwayDirectory($prefix)
- {
- $directory = self::getTemporaryDirectory().DIRECTORY_SEPARATOR.uniqid('assetic_'.$prefix);
+ public static function createThrowAwayDirectory($prefix) {
+ $directory = self::getTemporaryDirectory() . DIRECTORY_SEPARATOR . uniqid('assetic_' . $prefix);
mkdir($directory);
return $directory;
@@ -72,13 +70,11 @@ class FilesystemUtils
*
* @return string The file path
*/
- public static function createTemporaryFile($prefix)
- {
- return tempnam(self::getTemporaryDirectory(), 'assetic_'.$prefix);
+ public static function createTemporaryFile($prefix) {
+ return tempnam(self::getTemporaryDirectory(), 'assetic_' . $prefix);
}
- public static function getTemporaryDirectory()
- {
+ public static function getTemporaryDirectory() {
return realpath(sys_get_temp_dir());
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php
index 1b53f2b..e0de5a9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/LessUtils.php
@@ -18,7 +18,7 @@ namespace Assetic\Util;
*/
abstract class LessUtils extends CssUtils
{
- const REGEX_IMPORTS = '/@import(?:-once)? (?:\([a-z]*\) )?(?:url\()?(\'|"|)(?P[^\'"\)\n\r]*)\1\)?;?/';
+ const REGEX_IMPORTS = '/@import(?:-once)? (?:\([a-z]*\) )?(?:url\()?(\'|"|)(?P[^\'"\)\n\r]*)\1\)?;?/';
const REGEX_IMPORTS_NO_URLS = '/@import(?:-once)? (?:\([a-z]*\) )?(?!url\()(\'|"|)(?P[^\'"\)\n\r]*)\1;?/';
- const REGEX_COMMENTS = '/((?:\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)|\/\/[^\n]+)/';
+ const REGEX_COMMENTS = '/((?:\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/)|\/\/[^\n]+)/';
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php
index 400e97c..587f9c6 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/TraversableString.php
@@ -21,24 +21,20 @@ class TraversableString implements \IteratorAggregate, \Countable
private $one;
private $many;
- public function __construct($one, array $many)
- {
+ public function __construct($one, array $many) {
$this->one = $one;
$this->many = $many;
}
- public function getIterator()
- {
+ public function getIterator() {
return new \ArrayIterator($this->many);
}
- public function count()
- {
+ public function count() {
return count($this->many);
}
- public function __toString()
- {
- return (string) $this->one;
+ public function __toString() {
+ return (string)$this->one;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php
index d9464c0..81c5cc9 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/Assetic/Util/VarUtils.php
@@ -22,18 +22,17 @@ abstract class VarUtils
* Resolves variable placeholders.
*
* @param string $template A template string
- * @param array $vars Variable names
- * @param array $values Variable values
+ * @param array $vars Variable names
+ * @param array $values Variable values
*
* @return string The resolved string
*
* @throws \InvalidArgumentException If there is a variable with no value
*/
- public static function resolve($template, array $vars, array $values)
- {
+ public static function resolve($template, array $vars, array $values) {
$map = array();
foreach ($vars as $var) {
- if (false === strpos($template, '{'.$var.'}')) {
+ if (FALSE === strpos($template, '{' . $var . '}')) {
continue;
}
@@ -41,14 +40,13 @@ abstract class VarUtils
throw new \InvalidArgumentException(sprintf('The template "%s" contains the variable "%s", but was not given any value for it.', $template, $var));
}
- $map['{'.$var.'}'] = $values[$var];
+ $map['{' . $var . '}'] = $values[$var];
}
return strtr($template, $map);
}
- public static function getCombinations(array $vars, array $values)
- {
+ public static function getCombinations(array $vars, array $values) {
if (!$vars) {
return array(array());
}
@@ -56,7 +54,7 @@ abstract class VarUtils
$combinations = array();
$nbValues = array();
foreach ($values as $var => $vals) {
- if (!in_array($var, $vars, true)) {
+ if (!in_array($var, $vars, TRUE)) {
continue;
}
@@ -78,7 +76,6 @@ abstract class VarUtils
return $combinations;
}
- final private function __construct()
- {
+ final private function __construct() {
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/functions.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/functions.php
index 2af5bde..3cab5a5 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/functions.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/kriswallsmith/assetic/src/functions.php
@@ -21,8 +21,7 @@ if (function_exists('assetic_init')) {
*
* @param AssetFactory $factory The asset factory
*/
-function assetic_init(AssetFactory $factory)
-{
+function assetic_init(AssetFactory $factory) {
global $_assetic;
$_assetic = new stdClass();
@@ -32,14 +31,13 @@ function assetic_init(AssetFactory $factory)
/**
* Returns an array of javascript URLs.
*
- * @param array|string $inputs Input strings
+ * @param array|string $inputs Input strings
* @param array|string $filters Filter names
- * @param array $options An array of options
+ * @param array $options An array of options
*
* @return array An array of javascript URLs
*/
-function assetic_javascripts($inputs = array(), $filters = array(), array $options = array())
-{
+function assetic_javascripts($inputs = array(), $filters = array(), array $options = array()) {
if (!isset($options['output'])) {
$options['output'] = 'js/*.js';
}
@@ -50,14 +48,13 @@ function assetic_javascripts($inputs = array(), $filters = array(), array $optio
/**
* Returns an array of stylesheet URLs.
*
- * @param array|string $inputs Input strings
+ * @param array|string $inputs Input strings
* @param array|string $filters Filter names
- * @param array $options An array of options
+ * @param array $options An array of options
*
* @return array An array of stylesheet URLs
*/
-function assetic_stylesheets($inputs = array(), $filters = array(), array $options = array())
-{
+function assetic_stylesheets($inputs = array(), $filters = array(), array $options = array()) {
if (!isset($options['output'])) {
$options['output'] = 'css/*.css';
}
@@ -68,14 +65,13 @@ function assetic_stylesheets($inputs = array(), $filters = array(), array $optio
/**
* Returns an image URL.
*
- * @param string $input An input
+ * @param string $input An input
* @param array|string $filters Filter names
- * @param array $options An array of options
+ * @param array $options An array of options
*
* @return string An image URL
*/
-function assetic_image($input, $filters = array(), array $options = array())
-{
+function assetic_image($input, $filters = array(), array $options = array()) {
if (!isset($options['output'])) {
$options['output'] = 'images/*';
}
@@ -88,14 +84,13 @@ function assetic_image($input, $filters = array(), array $options = array())
/**
* Returns an array of asset urls.
*
- * @param array|string $inputs Input strings
+ * @param array|string $inputs Input strings
* @param array|string $filters Filter names
- * @param array $options An array of options
+ * @param array $options An array of options
*
* @return array An array of URLs
*/
-function _assetic_urls($inputs = array(), $filters = array(), array $options = array())
-{
+function _assetic_urls($inputs = array(), $filters = array(), array $options = array()) {
global $_assetic;
if (!is_array($inputs)) {
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/composer.json
index d65325d..0d3c21c 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/composer.json
@@ -1,26 +1,28 @@
{
- "name": "lmammino/jsmin4assetic",
- "type": "library",
- "description":"Library for minifying JavaScript files using jsmin with assetic and composer",
- "license": "MIT",
- "authors": [
- {
- "name": "Douglas Crockford",
- "homepage":"http://www.crockford.com"
- },
- {
- "name": "Bogdan Yurov",
- "email":"bogdan@yurov.me"
- },
- {
- "name": "Luciano Mammino",
- "email":"lmammino@oryzone.com"
- }
- ],
- "require": {
- "php":">=5.3"
- },
- "autoload": {
- "classmap": ["src/"]
- }
+ "name": "lmammino/jsmin4assetic",
+ "type": "library",
+ "description": "Library for minifying JavaScript files using jsmin with assetic and composer",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Douglas Crockford",
+ "homepage": "http://www.crockford.com"
+ },
+ {
+ "name": "Bogdan Yurov",
+ "email": "bogdan@yurov.me"
+ },
+ {
+ "name": "Luciano Mammino",
+ "email": "lmammino@oryzone.com"
+ }
+ ],
+ "require": {
+ "php": ">=5.3"
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ }
}
\ No newline at end of file
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMin.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMin.php
index a825229..1314e51 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMin.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMin.php
@@ -1,4 +1,5 @@
min();
- }
+ /**
+ * Minify Javascript.
+ *
+ * @param string $js Javascript to be minified
+ *
+ * @return string
+ */
+ public static function minify($js) {
+ $jsmin = new static($js);
+ return $jsmin->min();
+ }
- /**
- * @param string $input
- */
- public function __construct($input) {
- $this->input = $input;
- }
+ /**
+ * @param string $input
+ */
+ public function __construct($input) {
+ $this->input = $input;
+ }
- /**
- * Perform minification, return result
- *
- * @return string
- */
- public function min() {
- if ($this->output !== '') { // min already run
- return $this->output;
- }
+ /**
+ * Perform minification, return result
+ *
+ * @return string
+ */
+ public function min() {
+ if ($this->output !== '') { // min already run
+ return $this->output;
+ }
- $mbIntEnc = null;
- if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) {
- $mbIntEnc = mb_internal_encoding();
- mb_internal_encoding('8bit');
- }
- $this->input = str_replace("\r\n", "\n", $this->input);
- $this->inputLength = strlen($this->input);
+ $mbIntEnc = NULL;
+ if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) {
+ $mbIntEnc = mb_internal_encoding();
+ mb_internal_encoding('8bit');
+ }
+ $this->input = str_replace("\r\n", "\n", $this->input);
+ $this->inputLength = strlen($this->input);
- $this->action(self::ACTION_DELETE_A_B);
+ $this->action(self::ACTION_DELETE_A_B);
- while ($this->a !== null) {
- // determine next command
- $command = self::ACTION_KEEP_A; // default
- if ($this->a === ' ') {
- if (($this->lastByteOut === '+' || $this->lastByteOut === '-')
- && ($this->b === $this->lastByteOut)
- ) {
- // Don't delete this space. If we do, the addition/subtraction
- // could be parsed as a post-increment
- } elseif (!$this->isAlphaNum($this->b)) {
- $command = self::ACTION_DELETE_A;
- }
- } elseif ($this->a === "\n") {
- if ($this->b === ' ') {
- $command = self::ACTION_DELETE_A_B;
- // in case of mbstring.func_overload & 2, must check for null b,
- // otherwise mb_strpos will give WARNING
- } elseif ($this->b === null
- || (false === strpos('{[(+-', $this->b)
- && !$this->isAlphaNum($this->b))
- ) {
- $command = self::ACTION_DELETE_A;
- }
- } elseif (!$this->isAlphaNum($this->a)) {
- if ($this->b === ' '
- || ($this->b === "\n"
- && (false === strpos('}])+-"\'', $this->a)))
- ) {
- $command = self::ACTION_DELETE_A_B;
- }
- }
- $this->action($command);
- }
- $this->output = trim($this->output);
+ while ($this->a !== NULL) {
+ // determine next command
+ $command = self::ACTION_KEEP_A; // default
+ if ($this->a === ' ') {
+ if (($this->lastByteOut === '+' || $this->lastByteOut === '-')
+ && ($this->b === $this->lastByteOut)
+ ) {
+ // Don't delete this space. If we do, the addition/subtraction
+ // could be parsed as a post-increment
+ } else if (!$this->isAlphaNum($this->b)) {
+ $command = self::ACTION_DELETE_A;
+ }
+ } else if ($this->a === "\n") {
+ if ($this->b === ' ') {
+ $command = self::ACTION_DELETE_A_B;
+ // in case of mbstring.func_overload & 2, must check for null b,
+ // otherwise mb_strpos will give WARNING
+ } else if ($this->b === NULL
+ || (FALSE === strpos('{[(+-', $this->b)
+ && !$this->isAlphaNum($this->b))
+ ) {
+ $command = self::ACTION_DELETE_A;
+ }
+ } else if (!$this->isAlphaNum($this->a)) {
+ if ($this->b === ' '
+ || ($this->b === "\n"
+ && (FALSE === strpos('}])+-"\'', $this->a)))
+ ) {
+ $command = self::ACTION_DELETE_A_B;
+ }
+ }
+ $this->action($command);
+ }
+ $this->output = trim($this->output);
- if ($mbIntEnc !== null) {
- mb_internal_encoding($mbIntEnc);
- }
- return $this->output;
- }
+ if ($mbIntEnc !== NULL) {
+ mb_internal_encoding($mbIntEnc);
+ }
+ return $this->output;
+ }
- /**
- * ACTION_KEEP_A = Output A. Copy B to A. Get the next B.
- * ACTION_DELETE_A = Copy B to A. Get the next B.
- * ACTION_DELETE_A_B = Get the next B.
- *
- * @param int $command
- * @throws JSMinUnterminatedRegExpException|JSMinUnterminatedStringException
- */
- protected function action($command) {
- if ($command === self::ACTION_DELETE_A_B
- && $this->b === ' '
- && ($this->a === '+' || $this->a === '-')
- ) {
- // Note: we're at an addition/substraction operator; the inputIndex
- // will certainly be a valid index
- if ($this->input[$this->inputIndex] === $this->a) {
- // This is "+ +" or "- -". Don't delete the space.
- $command = self::ACTION_KEEP_A;
- }
- }
- switch ($command) {
- case self::ACTION_KEEP_A:
- $this->output .= $this->a;
- $this->lastByteOut = $this->a;
+ /**
+ * ACTION_KEEP_A = Output A. Copy B to A. Get the next B.
+ * ACTION_DELETE_A = Copy B to A. Get the next B.
+ * ACTION_DELETE_A_B = Get the next B.
+ *
+ * @param int $command
+ * @throws JSMinUnterminatedRegExpException|JSMinUnterminatedStringException
+ */
+ protected function action($command) {
+ if ($command === self::ACTION_DELETE_A_B
+ && $this->b === ' '
+ && ($this->a === '+' || $this->a === '-')
+ ) {
+ // Note: we're at an addition/substraction operator; the inputIndex
+ // will certainly be a valid index
+ if ($this->input[$this->inputIndex] === $this->a) {
+ // This is "+ +" or "- -". Don't delete the space.
+ $command = self::ACTION_KEEP_A;
+ }
+ }
+ switch ($command) {
+ case self::ACTION_KEEP_A:
+ $this->output .= $this->a;
+ $this->lastByteOut = $this->a;
- // fallthrough
- case self::ACTION_DELETE_A:
- $this->a = $this->b;
- if ($this->a === "'" || $this->a === '"') { // string literal
- $str = $this->a; // in case needed for exception
- while (true) {
- $this->output .= $this->a;
- $this->lastByteOut = $this->a;
+ // fallthrough
+ case self::ACTION_DELETE_A:
+ $this->a = $this->b;
+ if ($this->a === "'" || $this->a === '"') { // string literal
+ $str = $this->a; // in case needed for exception
+ while (TRUE) {
+ $this->output .= $this->a;
+ $this->lastByteOut = $this->a;
- $this->a = $this->get();
- if ($this->a === $this->b) { // end quote
- break;
- }
- if (ord($this->a) <= self::ORD_LF) {
- throw new JSMinUnterminatedStringException(
- "JSMin: Unterminated String at byte "
- . $this->inputIndex . ": {$str}");
- }
- $str .= $this->a;
- if ($this->a === '\\') {
- $this->output .= $this->a;
- $this->lastByteOut = $this->a;
+ $this->a = $this->get();
+ if ($this->a === $this->b) { // end quote
+ break;
+ }
+ if (ord($this->a) <= self::ORD_LF) {
+ throw new JSMinUnterminatedStringException(
+ "JSMin: Unterminated String at byte "
+ . $this->inputIndex . ": {$str}");
+ }
+ $str .= $this->a;
+ if ($this->a === '\\') {
+ $this->output .= $this->a;
+ $this->lastByteOut = $this->a;
- $this->a = $this->get();
- $str .= $this->a;
- }
- }
- }
- // fallthrough
- case self::ACTION_DELETE_A_B:
- $this->b = $this->next();
- if ($this->b === '/' && $this->isRegexpLiteral()) { // RegExp literal
- $this->output .= $this->a . $this->b;
- $pattern = '/'; // in case needed for exception
- while (true) {
- $this->a = $this->get();
- $pattern .= $this->a;
- if ($this->a === '/') { // end pattern
- break; // while (true)
- } elseif ($this->a === '\\') {
- $this->output .= $this->a;
- $this->a = $this->get();
- $pattern .= $this->a;
- } elseif (ord($this->a) <= self::ORD_LF) {
- throw new JSMinUnterminatedRegExpException(
- "JSMin: Unterminated RegExp at byte "
- . $this->inputIndex . ": {$pattern}");
- }
- $this->output .= $this->a;
- $this->lastByteOut = $this->a;
- }
- $this->b = $this->next();
- }
- // end case ACTION_DELETE_A_B
- }
- }
+ $this->a = $this->get();
+ $str .= $this->a;
+ }
+ }
+ }
+ // fallthrough
+ case self::ACTION_DELETE_A_B:
+ $this->b = $this->next();
+ if ($this->b === '/' && $this->isRegexpLiteral()) { // RegExp literal
+ $this->output .= $this->a . $this->b;
+ $pattern = '/'; // in case needed for exception
+ while (TRUE) {
+ $this->a = $this->get();
+ $pattern .= $this->a;
+ if ($this->a === '/') { // end pattern
+ break; // while (true)
+ } else if ($this->a === '\\') {
+ $this->output .= $this->a;
+ $this->a = $this->get();
+ $pattern .= $this->a;
+ } else if (ord($this->a) <= self::ORD_LF) {
+ throw new JSMinUnterminatedRegExpException(
+ "JSMin: Unterminated RegExp at byte "
+ . $this->inputIndex . ": {$pattern}");
+ }
+ $this->output .= $this->a;
+ $this->lastByteOut = $this->a;
+ }
+ $this->b = $this->next();
+ }
+ // end case ACTION_DELETE_A_B
+ }
+ }
- /**
- * @return bool
- */
- protected function isRegexpLiteral() {
- if (false !== strpos("\n{;(,=:[!&|?", $this->a)) { // we aren't dividing
- return true;
- }
- if (' ' === $this->a) {
- $length = strlen($this->output);
- if ($length < 2) { // weird edge case
- return true;
- }
- // you can't divide a keyword
- if (preg_match('/(?:case|else|in|return|typeof)$/', $this->output, $m)) {
- if ($this->output === $m[0]) { // odd but could happen
- return true;
- }
- // make sure it's a keyword, not end of an identifier
- $charBeforeKeyword = substr($this->output, $length - strlen($m[0]) - 1, 1);
- if (!$this->isAlphaNum($charBeforeKeyword)) {
- return true;
- }
- }
- }
- return false;
- }
+ /**
+ * @return bool
+ */
+ protected function isRegexpLiteral() {
+ if (FALSE !== strpos("\n{;(,=:[!&|?", $this->a)) { // we aren't dividing
+ return TRUE;
+ }
+ if (' ' === $this->a) {
+ $length = strlen($this->output);
+ if ($length < 2) { // weird edge case
+ return TRUE;
+ }
+ // you can't divide a keyword
+ if (preg_match('/(?:case|else|in|return|typeof)$/', $this->output, $m)) {
+ if ($this->output === $m[0]) { // odd but could happen
+ return TRUE;
+ }
+ // make sure it's a keyword, not end of an identifier
+ $charBeforeKeyword = substr($this->output, $length - strlen($m[0]) - 1, 1);
+ if (!$this->isAlphaNum($charBeforeKeyword)) {
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+ }
- /**
- * Get next char. Convert ctrl char to space.
- *
- * @return string
- */
- protected function get() {
- $c = $this->lookAhead;
- $this->lookAhead = null;
- if ($c === null) {
- if ($this->inputIndex < $this->inputLength) {
- $c = $this->input[$this->inputIndex];
- $this->inputIndex += 1;
- } else {
- return null;
- }
- }
- if ($c === "\r" || $c === "\n") {
- return "\n";
- }
- if (ord($c) < self::ORD_SPACE) { // control char
- return ' ';
- }
- return $c;
- }
+ /**
+ * Get next char. Convert ctrl char to space.
+ *
+ * @return string
+ */
+ protected function get() {
+ $c = $this->lookAhead;
+ $this->lookAhead = NULL;
+ if ($c === NULL) {
+ if ($this->inputIndex < $this->inputLength) {
+ $c = $this->input[$this->inputIndex];
+ $this->inputIndex += 1;
+ } else {
+ return NULL;
+ }
+ }
+ if ($c === "\r" || $c === "\n") {
+ return "\n";
+ }
+ if (ord($c) < self::ORD_SPACE) { // control char
+ return ' ';
+ }
+ return $c;
+ }
- /**
- * Get next char. If is ctrl character, translate to a space or newline.
- *
- * @return string
- */
- protected function peek() {
- $this->lookAhead = $this->get();
- return $this->lookAhead;
- }
+ /**
+ * Get next char. If is ctrl character, translate to a space or newline.
+ *
+ * @return string
+ */
+ protected function peek() {
+ $this->lookAhead = $this->get();
+ return $this->lookAhead;
+ }
- /**
- * Is $c a letter, digit, underscore, dollar sign, escape, or non-ASCII?
- *
- * @param string $c
- *
- * @return bool
- */
- protected function isAlphaNum($c) {
- return (preg_match('/^[0-9a-zA-Z_\\$\\\\]$/', $c) || ord($c) > 126);
- }
+ /**
+ * Is $c a letter, digit, underscore, dollar sign, escape, or non-ASCII?
+ *
+ * @param string $c
+ *
+ * @return bool
+ */
+ protected function isAlphaNum($c) {
+ return (preg_match('/^[0-9a-zA-Z_\\$\\\\]$/', $c) || ord($c) > 126);
+ }
- /**
- * @return string
- */
- protected function singleLineComment() {
- $comment = '';
- while (true) {
- $get = $this->get();
- $comment .= $get;
- if (ord($get) <= self::ORD_LF) { // EOL reached
- // if IE conditional comment
- if (preg_match('/^\\/@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
- return "/{$comment}";
- }
- return $get;
- }
- }
- }
+ /**
+ * @return string
+ */
+ protected function singleLineComment() {
+ $comment = '';
+ while (TRUE) {
+ $get = $this->get();
+ $comment .= $get;
+ if (ord($get) <= self::ORD_LF) { // EOL reached
+ // if IE conditional comment
+ if (preg_match('/^\\/@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
+ return "/{$comment}";
+ }
+ return $get;
+ }
+ }
+ }
- /**
- * @return string
- * @throws JSMinUnterminatedCommentException
- */
- protected function multipleLineComment() {
- $this->get();
- $comment = '';
- while (true) {
- $get = $this->get();
- if ($get === '*') {
- if ($this->peek() === '/') { // end of comment reached
- $this->get();
- // if comment preserved by YUI Compressor
- if (0 === strpos($comment, '!')) {
- return "\n/*!" . substr($comment, 1) . "*/\n";
- }
- // if IE conditional comment
- if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
- return "/*{$comment}*/";
- }
- return ' ';
- }
- } elseif ($get === null) {
- throw new JSMinUnterminatedCommentException(
- "JSMin: Unterminated comment at byte "
- . $this->inputIndex . ": /*{$comment}");
- }
- $comment .= $get;
- }
- }
+ /**
+ * @return string
+ * @throws JSMinUnterminatedCommentException
+ */
+ protected function multipleLineComment() {
+ $this->get();
+ $comment = '';
+ while (TRUE) {
+ $get = $this->get();
+ if ($get === '*') {
+ if ($this->peek() === '/') { // end of comment reached
+ $this->get();
+ // if comment preserved by YUI Compressor
+ if (0 === strpos($comment, '!')) {
+ return "\n/*!" . substr($comment, 1) . "*/\n";
+ }
+ // if IE conditional comment
+ if (preg_match('/^@(?:cc_on|if|elif|else|end)\\b/', $comment)) {
+ return "/*{$comment}*/";
+ }
+ return ' ';
+ }
+ } else if ($get === NULL) {
+ throw new JSMinUnterminatedCommentException(
+ "JSMin: Unterminated comment at byte "
+ . $this->inputIndex . ": /*{$comment}");
+ }
+ $comment .= $get;
+ }
+ }
- /**
- * Get the next character, skipping over comments.
- * Some comments may be preserved.
- *
- * @return string
- */
- protected function next() {
- $get = $this->get();
- if ($get !== '/') {
- return $get;
- }
- switch ($this->peek()) {
- case '/':
- return $this->singleLineComment();
- case '*':
- return $this->multipleLineComment();
- default:
- return $get;
- }
- }
+ /**
+ * Get the next character, skipping over comments.
+ * Some comments may be preserved.
+ *
+ * @return string
+ */
+ protected function next() {
+ $get = $this->get();
+ if ($get !== '/') {
+ return $get;
+ }
+ switch ($this->peek()) {
+ case '/':
+ return $this->singleLineComment();
+ case '*':
+ return $this->multipleLineComment();
+ default:
+ return $get;
+ }
+ }
}
\ No newline at end of file
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMinUnterminatedCommentException.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMinUnterminatedCommentException.php
index 7ffc3b2..02cf316 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMinUnterminatedCommentException.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/lmammino/jsmin4assetic/src/JSMinUnterminatedCommentException.php
@@ -1,5 +1,6 @@
=5.3.0",
- "ext-pcre": "*",
- "matthiasmullie/path-converter": "~1.1"
- },
- "require-dev": {
- "matthiasmullie/scrapbook": "~1.0",
- "phpunit/phpunit": "~4.8",
- "friendsofphp/php-cs-fixer": "~2.0"
- },
- "suggest": {
- "psr/cache-implementation": "Cache implementation to use with Minify::cache"
- },
- "autoload": {
- "psr-4": {
- "MatthiasMullie\\Minify\\": "src/"
- }
- },
- "bin": [
- "bin/minifycss",
- "bin/minifyjs"
- ]
+ "name": "matthiasmullie/minify",
+ "type": "library",
+ "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.",
+ "keywords": [
+ "minify",
+ "minifier",
+ "css",
+ "js",
+ "javascript"
+ ],
+ "homepage": "http://www.minifier.org",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Matthias Mullie",
+ "homepage": "http://www.mullie.eu",
+ "email": "minify@mullie.eu",
+ "role": "Developer"
+ }
+ ],
+ "require": {
+ "php": ">=5.3.0",
+ "ext-pcre": "*",
+ "matthiasmullie/path-converter": "~1.1"
+ },
+ "require-dev": {
+ "matthiasmullie/scrapbook": "~1.0",
+ "phpunit/phpunit": "~4.8",
+ "friendsofphp/php-cs-fixer": "~2.0"
+ },
+ "suggest": {
+ "psr/cache-implementation": "Cache implementation to use with Minify::cache"
+ },
+ "autoload": {
+ "psr-4": {
+ "MatthiasMullie\\Minify\\": "src/"
+ }
+ },
+ "bin": [
+ "bin/minifycss",
+ "bin/minifyjs"
+ ]
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/CSS.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/CSS.php
index 742f043..b613322 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/CSS.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/CSS.php
@@ -59,8 +59,7 @@ class CSS extends Minify
*
* @param int $size Size in kB
*/
- public function setMaxImportSize($size)
- {
+ public function setMaxImportSize($size) {
$this->maxImportSize = $size;
}
@@ -72,8 +71,7 @@ class CSS extends Minify
*
* @param string[] $extensions Array of file extensions
*/
- public function setImportExtensions(array $extensions)
- {
+ public function setImportExtensions(array $extensions) {
$this->importExtensions = $extensions;
}
@@ -84,8 +82,7 @@ class CSS extends Minify
*
* @return string
*/
- protected function moveImportsToTop($content)
- {
+ protected function moveImportsToTop($content) {
if (preg_match_all('/(;?)(@import (?url\()?(?P["\']?).+?(?P=quotes)(?(url)\)))/', $content, $matches)) {
// remove from content
foreach ($matches[0] as $import) {
@@ -93,7 +90,7 @@ class CSS extends Minify
}
// add to top
- $content = implode(';', $matches[2]).';'.trim($content, ';');
+ $content = implode(';', $matches[2]) . ';' . trim($content, ';');
}
return $content;
@@ -105,16 +102,15 @@ class CSS extends Minify
* @import's will be loaded and their content merged into the original file,
* to save HTTP requests.
*
- * @param string $source The file to combine imports for
- * @param string $content The CSS content to combine imports for
+ * @param string $source The file to combine imports for
+ * @param string $content The CSS content to combine imports for
* @param string[] $parents Parent paths, for circular reference checks
*
* @return string
*
* @throws FileImportException
*/
- protected function combineImports($source, $content, $parents)
- {
+ protected function combineImports($source, $content, $parents) {
$importRegexes = array(
// @import url(xxx)
'/
@@ -200,7 +196,7 @@ class CSS extends Minify
// loop the matches
foreach ($matches as $match) {
// get the path for the file that will be imported
- $importPath = dirname($source).'/'.$match['path'];
+ $importPath = dirname($source) . '/' . $match['path'];
// only replace the import with the content if we can grab the
// content of the file
@@ -211,7 +207,7 @@ class CSS extends Minify
// check if current file was not imported previously in the same
// import chain.
if (in_array($importPath, $parents)) {
- throw new FileImportException('Failed to import file "'.$importPath.'": circular reference detected.');
+ throw new FileImportException('Failed to import file "' . $importPath . '": circular reference detected.');
}
// grab referenced file & minify it (which may include importing
@@ -221,7 +217,7 @@ class CSS extends Minify
// check if this is only valid for certain media
if (!empty($match['media'])) {
- $importContent = '@media '.$match['media'].'{'.$importContent.'}';
+ $importContent = '@media ' . $match['media'] . '{' . $importContent . '}';
}
// add to replacement array
@@ -239,13 +235,12 @@ class CSS extends Minify
* @url(image.jpg) images will be loaded and their content merged into the
* original file, to save HTTP requests.
*
- * @param string $source The file to import files for
+ * @param string $source The file to import files for
* @param string $content The CSS content to import files for
*
* @return string
*/
- protected function importFiles($source, $content)
- {
+ protected function importFiles($source, $content) {
$regex = '/url\((["\']?)(.+?)\\1\)/i';
if ($this->importExtensions && preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) {
$search = array();
@@ -260,7 +255,7 @@ class CSS extends Minify
// get the path for the file that will be imported
$path = $match[2];
- $path = dirname($source).'/'.$path;
+ $path = dirname($source) . '/' . $path;
// only replace the import with the content if we're able to get
// the content of the file, and it's relatively small
@@ -271,7 +266,7 @@ class CSS extends Minify
// build replacement
$search[] = $match[0];
- $replace[] = 'url('.$this->importExtensions[$extension].';base64,'.$importContent.')';
+ $replace[] = 'url(' . $this->importExtensions[$extension] . ';base64,' . $importContent . ')';
}
}
@@ -287,12 +282,11 @@ class CSS extends Minify
* Perform CSS optimizations.
*
* @param string[optional] $path Path to write the data to
- * @param string[] $parents Parent paths, for circular reference checks
+ * @param string[] $parents Parent paths, for circular reference checks
*
* @return string The minified data
*/
- public function execute($path = null, $parents = array())
- {
+ public function execute($path = NULL, $parents = array()) {
$content = '';
// loop CSS data (raw data and files)
@@ -347,12 +341,11 @@ class CSS extends Minify
* (e.g. ../../images/image.gif, if the new CSS file is 1 folder deeper).
*
* @param ConverterInterface $converter Relative path converter
- * @param string $content The CSS content to update relative urls for
+ * @param string $content The CSS content to update relative urls for
*
* @return string
*/
- protected function move(ConverterInterface $converter, $content)
- {
+ protected function move(ConverterInterface $converter, $content) {
/*
* Relative path references will usually be enclosed by url(). @import
* is an exception, where url() is not necessary around the path (but is
@@ -461,9 +454,9 @@ class CSS extends Minify
// build replacement
$search[] = $match[0];
if ($type === 'url') {
- $replace[] = 'url('.$url.')';
- } elseif ($type === 'import') {
- $replace[] = '@import "'.$url.'"';
+ $replace[] = 'url(' . $url . ')';
+ } else if ($type === 'import') {
+ $replace[] = '@import "' . $url . '"';
}
}
@@ -479,8 +472,7 @@ class CSS extends Minify
*
* @return string
*/
- protected function shortenHex($content)
- {
+ protected function shortenHex($content) {
$content = preg_replace('/(?<=[: ])#([0-9a-z])\\1([0-9a-z])\\2([0-9a-z])\\3(?=[; }])/i', '#$1$2$3', $content);
// we can shorten some even more by replacing them with their color name
@@ -515,7 +507,7 @@ class CSS extends Minify
);
return preg_replace_callback(
- '/(?<=[: ])('.implode(array_keys($colors), '|').')(?=[; }])/i',
+ '/(?<=[: ])(' . implode(array_keys($colors), '|') . ')(?=[; }])/i',
function ($match) use ($colors) {
return $colors[strtoupper($match[0])];
},
@@ -530,18 +522,17 @@ class CSS extends Minify
*
* @return string
*/
- protected function shortenFontWeights($content)
- {
+ protected function shortenFontWeights($content) {
$weights = array(
'normal' => 400,
'bold' => 700,
);
$callback = function ($match) use ($weights) {
- return $match[1].$weights[$match[2]];
+ return $match[1] . $weights[$match[2]];
};
- return preg_replace_callback('/(font-weight\s*:\s*)('.implode('|', array_keys($weights)).')(?=[;}])/', $callback, $content);
+ return preg_replace_callback('/(font-weight\s*:\s*)(' . implode('|', array_keys($weights)) . ')(?=[;}])/', $callback, $content);
}
/**
@@ -551,8 +542,7 @@ class CSS extends Minify
*
* @return string
*/
- protected function shortenZeroes($content)
- {
+ protected function shortenZeroes($content) {
// we don't want to strip units in `calc()` expressions:
// `5px - 0px` is valid, but `5px - 0` is not
// `10px * 0` is valid (equates to 0), and so is `10 * 0px`, but
@@ -577,19 +567,19 @@ class CSS extends Minify
// practice, Webkit (especially Safari) seems to stumble over at least
// 0%, potentially other units as well. Only stripping 'px' for now.
// @see https://github.com/matthiasmullie/minify/issues/60
- $content = preg_replace('/'.$before.'(-?0*(\.0+)?)(?<=0)px'.$after.'/', '\\1', $content);
+ $content = preg_replace('/' . $before . '(-?0*(\.0+)?)(?<=0)px' . $after . '/', '\\1', $content);
// strip 0-digits (.0 -> 0)
- $content = preg_replace('/'.$before.'\.0+'.$units.'?'.$after.'/', '0\\1', $content);
+ $content = preg_replace('/' . $before . '\.0+' . $units . '?' . $after . '/', '0\\1', $content);
// strip trailing 0: 50.10 -> 50.1, 50.10px -> 50.1px
- $content = preg_replace('/'.$before.'(-?[0-9]+\.[0-9]+)0+'.$units.'?'.$after.'/', '\\1\\2', $content);
+ $content = preg_replace('/' . $before . '(-?[0-9]+\.[0-9]+)0+' . $units . '?' . $after . '/', '\\1\\2', $content);
// strip trailing 0: 50.00 -> 50, 50.00px -> 50px
- $content = preg_replace('/'.$before.'(-?[0-9]+)\.0+'.$units.'?'.$after.'/', '\\1\\2', $content);
+ $content = preg_replace('/' . $before . '(-?[0-9]+)\.0+' . $units . '?' . $after . '/', '\\1\\2', $content);
// strip leading 0: 0.1 -> .1, 01.1 -> 1.1
- $content = preg_replace('/'.$before.'(-?)0+([0-9]*\.[0-9]+)'.$units.'?'.$after.'/', '\\1\\2\\3', $content);
+ $content = preg_replace('/' . $before . '(-?)0+([0-9]*\.[0-9]+)' . $units . '?' . $after . '/', '\\1\\2\\3', $content);
// strip negative zeroes (-0 -> 0) & truncate zeroes (00 -> 0)
- $content = preg_replace('/'.$before.'-?0+'.$units.'?'.$after.'/', '0\\1', $content);
+ $content = preg_replace('/' . $before . '-?0+' . $units . '?' . $after . '/', '0\\1', $content);
// IE doesn't seem to understand a unitless flex-basis value (correct -
// it goes against the spec), so let's add it in again (make it `%`,
@@ -611,8 +601,7 @@ class CSS extends Minify
*
* @return string
*/
- protected function stripEmptyTags($content)
- {
+ protected function stripEmptyTags($content) {
$content = preg_replace('/(?<=^)[^\{\};]+\{\s*\}/', '', $content);
$content = preg_replace('/(?<=(\}|;))[^\{\};]+\{\s*\}/', '', $content);
@@ -622,8 +611,7 @@ class CSS extends Minify
/**
* Strip comments from source code.
*/
- protected function stripComments()
- {
+ protected function stripComments() {
$this->registerPattern('/\/\*.*?\*\//s', '');
}
@@ -634,8 +622,7 @@ class CSS extends Minify
*
* @return string
*/
- protected function stripWhitespace($content)
- {
+ protected function stripWhitespace($content) {
// remove leading & trailing whitespace
$content = preg_replace('/^\s*/m', '', $content);
$content = preg_replace('/\s*$/m', '', $content);
@@ -655,7 +642,7 @@ class CSS extends Minify
// not in things like `calc(3px + 2px)`, shorthands like `3px -2px`, or
// selectors like `div.weird- p`
$pseudos = array('nth-child', 'nth-last-child', 'nth-last-of-type', 'nth-of-type');
- $content = preg_replace('/:('.implode('|', $pseudos).')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content);
+ $content = preg_replace('/:(' . implode('|', $pseudos) . ')\(\s*([+-]?)\s*(.+?)\s*([+-]?)\s*(.*?)\s*\)/', ':$1($2$3$4$5)', $content);
// remove semicolon/whitespace followed by closing bracket
$content = str_replace(';}', '}', $content);
@@ -670,8 +657,7 @@ class CSS extends Minify
*
* @return string[]
*/
- protected function findCalcs($content)
- {
+ protected function findCalcs($content) {
$results = array();
preg_match_all('/calc(\(.+?)(?=$|;|calc\()/', $content, $matches, PREG_SET_ORDER);
@@ -685,12 +671,12 @@ class CSS extends Minify
$expr .= $char;
if ($char === '(') {
$opened++;
- } elseif ($char === ')' && --$opened === 0) {
+ } else if ($char === ')' && --$opened === 0) {
break;
}
}
- $results['calc('.count($results).')'] = 'calc'.$expr;
+ $results['calc(' . count($results) . ')'] = 'calc' . $expr;
}
return $results;
@@ -703,8 +689,7 @@ class CSS extends Minify
*
* @return bool
*/
- protected function canImportBySize($path)
- {
+ protected function canImportBySize($path) {
return ($size = @filesize($path)) && $size <= $this->maxImportSize * 1024;
}
@@ -715,8 +700,7 @@ class CSS extends Minify
*
* @return bool
*/
- protected function canImportByPath($path)
- {
+ protected function canImportByPath($path) {
return preg_match('/^(data:|https?:|\\/)/', $path) === 0;
}
@@ -729,8 +713,7 @@ class CSS extends Minify
*
* @return ConverterInterface
*/
- protected function getPathConverter($source, $target)
- {
+ protected function getPathConverter($source, $target) {
return new Converter($source, $target);
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exception.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exception.php
index d03898f..8670fc4 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exception.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exception.php
@@ -6,6 +6,7 @@
*
* @author Matthias Mullie
*/
+
namespace MatthiasMullie\Minify;
/**
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php
index af5e81b..2b64584 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/BasicException.php
@@ -8,6 +8,7 @@
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
* @license MIT License
*/
+
namespace MatthiasMullie\Minify\Exceptions;
use MatthiasMullie\Minify\Exception;
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php
index 912a2c9..8965b5b 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/FileImportException.php
@@ -8,6 +8,7 @@
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
* @license MIT License
*/
+
namespace MatthiasMullie\Minify\Exceptions;
/**
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/IOException.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/IOException.php
index b172eb4..4bcb065 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/IOException.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/Exceptions/IOException.php
@@ -8,6 +8,7 @@
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
* @license MIT License
*/
+
namespace MatthiasMullie\Minify\Exceptions;
/**
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/JS.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/JS.php
index 651d8be..493601f 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/JS.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/minify/src/JS.php
@@ -8,6 +8,7 @@
* @copyright Copyright (c) 2012, Matthias Mullie. All rights reserved
* @license MIT License
*/
+
namespace MatthiasMullie\Minify;
/**
@@ -122,18 +123,17 @@ class JS extends Minify
/**
* {@inheritdoc}
*/
- public function __construct()
- {
+ public function __construct() {
call_user_func_array(array('parent', '__construct'), func_get_args());
- $dataDir = __DIR__.'/../data/js/';
+ $dataDir = __DIR__ . '/../data/js/';
$options = FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES;
- $this->keywordsReserved = file($dataDir.'keywords_reserved.txt', $options);
- $this->keywordsBefore = file($dataDir.'keywords_before.txt', $options);
- $this->keywordsAfter = file($dataDir.'keywords_after.txt', $options);
- $this->operators = file($dataDir.'operators.txt', $options);
- $this->operatorsBefore = file($dataDir.'operators_before.txt', $options);
- $this->operatorsAfter = file($dataDir.'operators_after.txt', $options);
+ $this->keywordsReserved = file($dataDir . 'keywords_reserved.txt', $options);
+ $this->keywordsBefore = file($dataDir . 'keywords_before.txt', $options);
+ $this->keywordsAfter = file($dataDir . 'keywords_after.txt', $options);
+ $this->operators = file($dataDir . 'operators.txt', $options);
+ $this->operatorsBefore = file($dataDir . 'operators_before.txt', $options);
+ $this->operatorsAfter = file($dataDir . 'operators_after.txt', $options);
}
/**
@@ -144,8 +144,7 @@ class JS extends Minify
*
* @return string The minified data
*/
- public function execute($path = null)
- {
+ public function execute($path = NULL) {
$content = '';
/*
@@ -174,12 +173,12 @@ class JS extends Minify
$js = $this->stripWhitespace($js);
// combine js: separating the scripts by a ;
- $content .= $js.";";
+ $content .= $js . ";";
}
// clean up leftover `;`s from the combination of multiple scripts
$content = ltrim($content, ';');
- $content = (string) substr($content, 0, -1);
+ $content = (string)substr($content, 0, -1);
/*
* Earlier, we extracted strings & regular expressions and replaced them
@@ -193,8 +192,7 @@ class JS extends Minify
/**
* Strip comments from source code.
*/
- protected function stripComments()
- {
+ protected function stripComments() {
// single-line comments
$this->registerPattern('/\/\/.*$/m', '');
@@ -219,13 +217,12 @@ class JS extends Minify
* $this->extracted and after doing all other minifying, we can restore the
* original content via restoreRegex()
*/
- protected function extractRegex()
- {
+ protected function extractRegex() {
// PHP only supports $this inside anonymous functions since 5.4
$minifier = $this;
$callback = function ($match) use ($minifier) {
$count = count($minifier->extracted);
- $placeholder = '"'.$count.'"';
+ $placeholder = '"' . $count . '"';
$minifier->extracted[$placeholder] = $match[0];
return $placeholder;
@@ -243,8 +240,8 @@ class JS extends Minify
// a regular expression can only be followed by a few operators or some
// of the RegExp methods (a `\` followed by a variable or value is
// likely part of a division, not a regex)
- $keywords = array('do', 'in', 'new', 'else', 'throw', 'yield', 'delete', 'return', 'typeof');
- $before = '([=:,;\+\-\*\/\}\(\{\[&\|!]|^|'.implode('|', $keywords).')\s*';
+ $keywords = array('do', 'in', 'new', 'else', 'throw', 'yield', 'delete', 'return', 'typeof');
+ $before = '([=:,;\+\-\*\/\}\(\{\[&\|!]|^|' . implode('|', $keywords) . ')\s*';
$propertiesAndMethods = array(
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#Properties_2
'constructor',
@@ -264,8 +261,8 @@ class JS extends Minify
);
$delimiters = array_fill(0, count($propertiesAndMethods), '/');
$propertiesAndMethods = array_map('preg_quote', $propertiesAndMethods, $delimiters);
- $after = '(?=\s*[\.,;\)\}&\|+]|\/\/|$|\.('.implode('|', $propertiesAndMethods).'))';
- $this->registerPattern('/'.$before.'\K'.$pattern.$after.'/', $callback);
+ $after = '(?=\s*[\.,;\)\}&\|+]|\/\/|$|\.(' . implode('|', $propertiesAndMethods) . '))';
+ $this->registerPattern('/' . $before . '\K' . $pattern . $after . '/', $callback);
// regular expressions following a `)` are rather annoying to detect...
// quite often, `/` after `)` is a division operator & if it happens to
@@ -279,8 +276,8 @@ class JS extends Minify
// if a regex following `)` is not followed by `.`,
// it's quite likely not a regex
$before = '\)\s*';
- $after = '(?=\s*\.('.implode('|', $propertiesAndMethods).'))';
- $this->registerPattern('/'.$before.'\K'.$pattern.$after.'/', $callback);
+ $after = '(?=\s*\.(' . implode('|', $propertiesAndMethods) . '))';
+ $this->registerPattern('/' . $before . '\K' . $pattern . $after . '/', $callback);
// 1 more edge case: a regex can be followed by a lot more operators or
// keywords if there's a newline (ASI) in between, where the operator
@@ -288,8 +285,8 @@ class JS extends Minify
// (https://github.com/matthiasmullie/minify/issues/56)
$operators = $this->getOperatorsForRegex($this->operatorsBefore, '/');
$operators += $this->getOperatorsForRegex($this->keywordsReserved, '/');
- $after = '(?=\s*\n\s*('.implode('|', $operators).'))';
- $this->registerPattern('/'.$pattern.$after.'/', $callback);
+ $after = '(?=\s*\n\s*(' . implode('|', $operators) . '))';
+ $this->registerPattern('/' . $pattern . $after . '/', $callback);
}
/**
@@ -308,8 +305,7 @@ class JS extends Minify
*
* @return string
*/
- protected function stripWhitespace($content)
- {
+ protected function stripWhitespace($content) {
// uniform line endings, make them all line feed
$content = str_replace(array("\r\n", "\r"), "\n", $content);
@@ -333,8 +329,8 @@ class JS extends Minify
unset($operatorsBefore['+'], $operatorsBefore['-'], $operatorsAfter['+'], $operatorsAfter['-']);
$content = preg_replace(
array(
- '/('.implode('|', $operatorsBefore).')\s+/',
- '/\s+('.implode('|', $operatorsAfter).')/',
+ '/(' . implode('|', $operatorsBefore) . ')\s+/',
+ '/\s+(' . implode('|', $operatorsAfter) . ')/',
), '\\1', $content
);
@@ -347,8 +343,8 @@ class JS extends Minify
);
// collapse whitespace around reserved words into single space
- $content = preg_replace('/(^|[;\}\s])\K('.implode('|', $keywordsBefore).')\s+/', '\\2 ', $content);
- $content = preg_replace('/\s+('.implode('|', $keywordsAfter).')(?=([;\{\s]|$))/', ' \\1', $content);
+ $content = preg_replace('/(^|[;\}\s])\K(' . implode('|', $keywordsBefore) . ')\s+/', '\\2 ', $content);
+ $content = preg_replace('/\s+(' . implode('|', $keywordsAfter) . ')(?=([;\{\s]|$))/', ' \\1', $content);
/*
* We didn't strip whitespace after a couple of operators because they
@@ -358,8 +354,8 @@ class JS extends Minify
*/
$operatorsDiffBefore = array_diff($operators, $operatorsBefore);
$operatorsDiffAfter = array_diff($operators, $operatorsAfter);
- $content = preg_replace('/('.implode('|', $operatorsDiffBefore).')[^\S\n]+/', '\\1', $content);
- $content = preg_replace('/[^\S\n]+('.implode('|', $operatorsDiffAfter).')/', '\\1', $content);
+ $content = preg_replace('/(' . implode('|', $operatorsDiffBefore) . ')[^\S\n]+/', '\\1', $content);
+ $content = preg_replace('/[^\S\n]+(' . implode('|', $operatorsDiffAfter) . ')/', '\\1', $content);
/*
* Whitespace after `return` can be omitted in a few occasions
@@ -430,12 +426,11 @@ class JS extends Minify
* This will prepare the given array by escaping all characters.
*
* @param string[] $operators
- * @param string $delimiter
+ * @param string $delimiter
*
* @return string[]
*/
- protected function getOperatorsForRegex(array $operators, $delimiter = '/')
- {
+ protected function getOperatorsForRegex(array $operators, $delimiter = '/') {
// escape operators for use in regex
$delimiters = array_fill(0, count($operators), $delimiter);
$escaped = array_map('preg_quote', $operators, $delimiters);
@@ -451,7 +446,7 @@ class JS extends Minify
// don't confuse = with other assignment shortcuts (e.g. +=)
$chars = preg_quote('+-*\=<>%&|', $delimiter);
- $operators['='] = '(?keywordsReserved;
@@ -510,11 +503,11 @@ class JS extends Minify
* array['key-here'] can't be replaced by array.key-here since '-'
* is not a valid character there.
*/
- if (!preg_match('/^'.$minifier::REGEX_VARIABLE.'$/u', $property)) {
+ if (!preg_match('/^' . $minifier::REGEX_VARIABLE . '$/u', $property)) {
return $match[0];
}
- return '.'.$property;
+ return '.' . $property;
};
/*
@@ -535,9 +528,9 @@ class JS extends Minify
* separate look-behind assertions, one for each keyword.
*/
$keywords = $this->getKeywordsForRegex($keywords);
- $keywords = '(?load($data);
@@ -106,12 +105,11 @@ abstract class Minify
*
* @return string The minified data
*/
- public function minify($path = null)
- {
+ public function minify($path = NULL) {
$content = $this->execute($path);
// save to path
- if ($path !== null) {
+ if ($path !== NULL) {
$this->save($content, $path);
}
@@ -126,13 +124,12 @@ abstract class Minify
*
* @return string The minified & gzipped data
*/
- public function gzip($path = null, $level = 9)
- {
+ public function gzip($path = NULL, $level = 9) {
$content = $this->execute($path);
$content = gzencode($content, $level, FORCE_GZIP);
// save to path
- if ($path !== null) {
+ if ($path !== NULL) {
$this->save($content, $path);
}
@@ -146,8 +143,7 @@ abstract class Minify
*
* @return CacheItemInterface Cache item with the minifier data
*/
- public function cache(CacheItemInterface $item)
- {
+ public function cache(CacheItemInterface $item) {
$content = $this->execute();
$item->set($content);
@@ -161,7 +157,7 @@ abstract class Minify
*
* @return string The minified data
*/
- abstract public function execute($path = null);
+ abstract public function execute($path = NULL);
/**
* Load data.
@@ -170,8 +166,7 @@ abstract class Minify
*
* @return string
*/
- protected function load($data)
- {
+ protected function load($data) {
// check if the data is a file
if ($this->canImportFile($data)) {
$data = file_get_contents($data);
@@ -189,12 +184,11 @@ abstract class Minify
* Save to file.
*
* @param string $content The minified data
- * @param string $path The path to save the minified data to
+ * @param string $path The path to save the minified data to
*
* @throws IOException
*/
- protected function save($content, $path)
- {
+ protected function save($content, $path) {
$handler = $this->openFileForWriting($path);
$this->writeToFile($handler, $content);
@@ -205,11 +199,10 @@ abstract class Minify
/**
* Register a pattern to execute against the source content.
*
- * @param string $pattern PCRE pattern
+ * @param string $pattern PCRE pattern
* @param string|callable $replacement Replacement value for matched pattern
*/
- protected function registerPattern($pattern, $replacement = '')
- {
+ protected function registerPattern($pattern, $replacement = '') {
// study the pattern, we'll execute it more than once
$pattern .= 'S';
@@ -228,8 +221,7 @@ abstract class Minify
*
* @return string The (manipulated) content
*/
- protected function replace($content)
- {
+ protected function replace($content) {
$processed = '';
$positions = array_fill(0, count($this->patterns), -1);
$matches = array();
@@ -245,7 +237,7 @@ abstract class Minify
continue;
}
- $match = null;
+ $match = NULL;
if (preg_match($pattern, $content, $match, PREG_OFFSET_CAPTURE)) {
$matches[$i] = $match;
@@ -281,8 +273,8 @@ abstract class Minify
// figure out which part of the string was unmatched; that's the
// part we'll execute the patterns on again next
- $content = (string) substr($content, $discardLength);
- $unmatched = (string) substr($content, strpos($content, $match) + strlen($match));
+ $content = (string)substr($content, $discardLength);
+ $unmatched = (string)substr($content, strpos($content, $match) + strlen($match));
// move the replaced part to $processed and prepare $content to
// again match batch of patterns against
@@ -306,14 +298,13 @@ abstract class Minify
* This function will be called plenty of times, where $content will always
* move up 1 character.
*
- * @param string $pattern Pattern to match
+ * @param string $pattern Pattern to match
* @param string|callable $replacement Replacement value
- * @param string $content Content to match pattern against
+ * @param string $content Content to match pattern against
*
* @return string
*/
- protected function replacePattern($pattern, $replacement, $content)
- {
+ protected function replacePattern($pattern, $replacement, $content) {
if (is_callable($replacement)) {
return preg_replace_callback($pattern, $replacement, $content, 1, $count);
} else {
@@ -335,8 +326,7 @@ abstract class Minify
* @param string[optional] $chars
* @param string[optional] $placeholderPrefix
*/
- protected function extractStrings($chars = '\'"', $placeholderPrefix = '')
- {
+ protected function extractStrings($chars = '\'"', $placeholderPrefix = '') {
// PHP only supports $this inside anonymous functions since 5.4
$minifier = $this;
$callback = function ($match) use ($minifier, $placeholderPrefix) {
@@ -352,8 +342,8 @@ abstract class Minify
}
$count = count($minifier->extracted);
- $placeholder = $match[1].$placeholderPrefix.$count.$match[1];
- $minifier->extracted[$placeholder] = $match[1].$match[2].$match[1];
+ $placeholder = $match[1] . $placeholderPrefix . $count . $match[1];
+ $minifier->extracted[$placeholder] = $match[1] . $match[2] . $match[1];
return $placeholder;
};
@@ -370,7 +360,7 @@ abstract class Minify
* considered as escape-char (times 2) and to get it in the regex,
* escaped (times 2)
*/
- $this->registerPattern('/(['.$chars.'])(.*?(?registerPattern('/([' . $chars . '])(.*?(?extracted) {
// nothing was extracted, nothing to restore
return $content;
@@ -403,8 +392,7 @@ abstract class Minify
*
* @return bool
*/
- protected function canImportFile($path)
- {
+ protected function canImportFile($path) {
$parsed = parse_url($path);
if (
// file is elsewhere
@@ -412,7 +400,7 @@ abstract class Minify
// file responds to queries (may change, or need to bypass cache)
isset($parsed['query'])
) {
- return false;
+ return FALSE;
}
return strlen($path) < PHP_MAXPATHLEN && @is_file($path) && is_readable($path);
@@ -427,10 +415,9 @@ abstract class Minify
*
* @throws IOException
*/
- protected function openFileForWriting($path)
- {
- if (($handler = @fopen($path, 'w')) === false) {
- throw new IOException('The file "'.$path.'" could not be opened for writing. Check if PHP has enough permissions.');
+ protected function openFileForWriting($path) {
+ if (($handler = @fopen($path, 'w')) === FALSE) {
+ throw new IOException('The file "' . $path . '" could not be opened for writing. Check if PHP has enough permissions.');
}
return $handler;
@@ -440,15 +427,14 @@ abstract class Minify
* Attempts to write $content to the file specified by $handler. $path is used for printing exceptions.
*
* @param resource $handler The resource to write to
- * @param string $content The content to write
- * @param string $path The path to the file (for exception printing only)
+ * @param string $content The content to write
+ * @param string $path The path to the file (for exception printing only)
*
* @throws IOException
*/
- protected function writeToFile($handler, $content, $path = '')
- {
- if (($result = @fwrite($handler, $content)) === false || ($result < strlen($content))) {
- throw new IOException('The file "'.$path.'" could not be written to. Check your disk space and file permissions.');
+ protected function writeToFile($handler, $content, $path = '') {
+ if (($result = @fwrite($handler, $content)) === FALSE || ($result < strlen($content))) {
+ throw new IOException('The file "' . $path . '" could not be written to. Check your disk space and file permissions.');
}
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/composer.json
index 1cb6a4c..fe774b0 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/composer.json
@@ -1,28 +1,33 @@
{
- "name": "matthiasmullie/path-converter",
- "type": "library",
- "description": "Relative path converter",
- "keywords": ["relative", "path", "converter", "paths"],
- "homepage": "http://github.com/matthiasmullie/path-converter",
- "license": "MIT",
- "authors": [
- {
- "name": "Matthias Mullie",
- "homepage": "http://www.mullie.eu",
- "email": "pathconverter@mullie.eu",
- "role": "Developer"
- }
- ],
- "require": {
- "php": ">=5.3.0",
- "ext-pcre": "*"
- },
- "require-dev": {
- "phpunit/phpunit": "~4.8"
- },
- "autoload": {
- "psr-4": {
- "MatthiasMullie\\PathConverter\\": "src/"
- }
+ "name": "matthiasmullie/path-converter",
+ "type": "library",
+ "description": "Relative path converter",
+ "keywords": [
+ "relative",
+ "path",
+ "converter",
+ "paths"
+ ],
+ "homepage": "http://github.com/matthiasmullie/path-converter",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Matthias Mullie",
+ "homepage": "http://www.mullie.eu",
+ "email": "pathconverter@mullie.eu",
+ "role": "Developer"
}
+ ],
+ "require": {
+ "php": ">=5.3.0",
+ "ext-pcre": "*"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.8"
+ },
+ "autoload": {
+ "psr-4": {
+ "MatthiasMullie\\PathConverter\\": "src/"
+ }
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/Converter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/Converter.php
index b92b24c..e26d860 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/Converter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/Converter.php
@@ -30,17 +30,16 @@ class Converter implements ConverterInterface
/**
* @param string $from The original base path (directory, not file!)
- * @param string $to The new base path (directory, not file!)
+ * @param string $to The new base path (directory, not file!)
*/
- public function __construct($from, $to)
- {
+ public function __construct($from, $to) {
$shared = $this->shared($from, $to);
if ($shared === '') {
// when both paths have nothing in common, one of them is probably
// absolute while the other is relative
$cwd = getcwd();
- $from = strpos($from, $cwd) === 0 ? $from : $cwd.'/'.$from;
- $to = strpos($to, $cwd) === 0 ? $to : $cwd.'/'.$to;
+ $from = strpos($from, $cwd) === 0 ? $from : $cwd . '/' . $from;
+ $to = strpos($to, $cwd) === 0 ? $to : $cwd . '/' . $to;
// or traveling the tree via `..`
// attempt to resolve path, or assume it's fine if it doesn't exist
@@ -65,8 +64,7 @@ class Converter implements ConverterInterface
*
* @return string
*/
- protected function normalize($path)
- {
+ protected function normalize($path) {
// deal with different operating systems' directory structure
$path = rtrim(str_replace(DIRECTORY_SEPARATOR, '/', $path), '/');
@@ -98,8 +96,7 @@ class Converter implements ConverterInterface
*
* @return string
*/
- protected function shared($path1, $path2)
- {
+ protected function shared($path1, $path2) {
// $path could theoretically be empty (e.g. no path is given), in which
// case it shouldn't expand to array(''), which would compare to one's
// root /
@@ -133,8 +130,7 @@ class Converter implements ConverterInterface
*
* @return string The new relative path
*/
- public function convert($path)
- {
+ public function convert($path) {
// quit early if conversion makes no sense
if ($this->from === $this->to) {
return $path;
@@ -147,7 +143,7 @@ class Converter implements ConverterInterface
}
// normalize paths
- $path = $this->normalize($this->from.'/'.$path);
+ $path = $this->normalize($this->from . '/' . $path);
// strip shared ancestor paths
$shared = $this->shared($path, $this->to);
@@ -157,7 +153,7 @@ class Converter implements ConverterInterface
// add .. for every directory that needs to be traversed to new path
$to = str_repeat('../', mb_substr_count($to, '/'));
- return $to.ltrim($path, '/');
+ return $to . ltrim($path, '/');
}
/**
@@ -167,8 +163,7 @@ class Converter implements ConverterInterface
*
* @return string
*/
- protected function dirname($path)
- {
+ protected function dirname($path) {
if (@is_file($path)) {
return dirname($path);
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/NoConverter.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/NoConverter.php
index 2fcfd0f..85edc84 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/NoConverter.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/matthiasmullie/path-converter/src/NoConverter.php
@@ -16,8 +16,7 @@ class NoConverter implements ConverterInterface
/**
* {@inheritdoc}
*/
- public function convert($path)
- {
+ public function convert($path) {
return $path;
}
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/composer.json b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/composer.json
index f477e9a..e6f188a 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/composer.json
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/composer.json
@@ -1,26 +1,31 @@
{
- "name": "natxet/cssmin",
- "description": "Minifying CSS",
- "type": "library",
- "keywords": ["css","minify"],
- "homepage": "http://code.google.com/p/cssmin/",
- "license": "MIT",
- "authors": [
- {
- "name": "Joe Scylla",
- "email": "joe.scylla@gmail.com",
- "homepage": "https://profiles.google.com/joe.scylla"
- }
- ],
- "require": {
- "php": ">=5.0"
- },
- "autoload": {
- "classmap": ["src/"]
- },
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-dev"
- }
- }
+ "name": "natxet/cssmin",
+ "description": "Minifying CSS",
+ "type": "library",
+ "keywords": [
+ "css",
+ "minify"
+ ],
+ "homepage": "http://code.google.com/p/cssmin/",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Joe Scylla",
+ "email": "joe.scylla@gmail.com",
+ "homepage": "https://profiles.google.com/joe.scylla"
+ }
+ ],
+ "require": {
+ "php": ">=5.0"
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0-dev"
+ }
+ }
}
diff --git a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/src/CssMin.php b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/src/CssMin.php
index f356ea5..646d6dd 100644
--- a/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/src/CssMin.php
+++ b/main/app/sprinkles/core/assets/SiteAssets/php/vendor/natxet/CssMin/src/CssMin.php
@@ -24,44 +24,45 @@
* THE SOFTWARE.
* --
*
- * @package CssMin
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
+
/**
* Abstract definition of a CSS token class.
*
* Every token has to extend this class.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssToken
{
- /**
- * Returns the token as string.
- *
- * @return string
- */
- abstract public function __toString();
+ /**
+ * Returns the token as string.
+ *
+ * @return string
+ */
+ abstract public function __toString();
}
/**
* Abstract definition of a for a ruleset start token.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssRulesetStartToken extends aCssToken
{
@@ -71,24 +72,23 @@ abstract class aCssRulesetStartToken extends aCssToken
/**
* Abstract definition of a for ruleset end token.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssRulesetEndToken extends aCssToken
{
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "}";
- }
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "}";
+ }
}
/**
@@ -97,66 +97,69 @@ abstract class aCssRulesetEndToken extends aCssToken
* Every parser plugin have to extend this class. A parser plugin contains the logic to parse one or aspects of a
* stylesheet.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssParserPlugin
{
- /**
- * Plugin configuration.
- *
- * @var array
- */
- protected $configuration = array();
- /**
- * The CssParser of the plugin.
- *
- * @var CssParser
- */
- protected $parser = null;
- /**
- * Plugin buffer.
- *
- * @var string
- */
- protected $buffer = "";
- /**
- * Constructor.
- *
- * @param CssParser $parser The CssParser object of this plugin.
- * @param array $configuration Plugin configuration [optional]
- * @return void
- */
- public function __construct(CssParser $parser, array $configuration = null)
- {
- $this->configuration = $configuration;
- $this->parser = $parser;
- }
- /**
- * Returns the array of chars triggering the parser plugin.
- *
- * @return array
- */
- abstract public function getTriggerChars();
- /**
- * Returns the array of states triggering the parser plugin or FALSE if every state will trigger the parser plugin.
- *
- * @return array
- */
- abstract public function getTriggerStates();
- /**
- * Parser routine of the plugin.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- abstract public function parse($index, $char, $previousChar, $state);
+ /**
+ * Plugin configuration.
+ *
+ * @var array
+ */
+ protected $configuration = array();
+ /**
+ * The CssParser of the plugin.
+ *
+ * @var CssParser
+ */
+ protected $parser = NULL;
+ /**
+ * Plugin buffer.
+ *
+ * @var string
+ */
+ protected $buffer = "";
+
+ /**
+ * Constructor.
+ *
+ * @param CssParser $parser The CssParser object of this plugin.
+ * @param array $configuration Plugin configuration [optional]
+ * @return void
+ */
+ public function __construct(CssParser $parser, array $configuration = NULL) {
+ $this->configuration = $configuration;
+ $this->parser = $parser;
+ }
+
+ /**
+ * Returns the array of chars triggering the parser plugin.
+ *
+ * @return array
+ */
+ abstract public function getTriggerChars();
+
+ /**
+ * Returns the array of states triggering the parser plugin or FALSE if every state will trigger the parser plugin.
+ *
+ * @return array
+ */
+ abstract public function getTriggerStates();
+
+ /**
+ * Parser routine of the plugin.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ abstract public function parse($index, $char, $previousChar, $state);
}
/**
@@ -165,52 +168,54 @@ abstract class aCssParserPlugin
* Minifier plugin process the parsed tokens one by one to apply changes to the token. Every minifier plugin has to
* extend this class.
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssMinifierPlugin
{
- /**
- * Plugin configuration.
- *
- * @var array
- */
- protected $configuration = array();
- /**
- * The CssMinifier of the plugin.
- *
- * @var CssMinifier
- */
- protected $minifier = null;
- /**
- * Constructor.
- *
- * @param CssMinifier $minifier The CssMinifier object of this plugin.
- * @param array $configuration Plugin configuration [optional]
- * @return void
- */
- public function __construct(CssMinifier $minifier, array $configuration = array())
- {
- $this->configuration = $configuration;
- $this->minifier = $minifier;
- }
- /**
- * Apply the plugin to the token.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- abstract public function apply(aCssToken &$token);
- /**
- * --
- *
- * @return array
- */
- abstract public function getTriggerTokens();
+ /**
+ * Plugin configuration.
+ *
+ * @var array
+ */
+ protected $configuration = array();
+ /**
+ * The CssMinifier of the plugin.
+ *
+ * @var CssMinifier
+ */
+ protected $minifier = NULL;
+
+ /**
+ * Constructor.
+ *
+ * @param CssMinifier $minifier The CssMinifier object of this plugin.
+ * @param array $configuration Plugin configuration [optional]
+ * @return void
+ */
+ public function __construct(CssMinifier $minifier, array $configuration = array()) {
+ $this->configuration = $configuration;
+ $this->minifier = $minifier;
+ }
+
+ /**
+ * Apply the plugin to the token.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ abstract public function apply(aCssToken &$token);
+
+ /**
+ * --
+ *
+ * @return array
+ */
+ abstract public function getTriggerTokens();
}
/**
@@ -219,46 +224,47 @@ abstract class aCssMinifierPlugin
* Minifier filters allows a pre-processing of the parsed token to add, edit or delete tokens. Every minifier filter
* has to extend this class.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssMinifierFilter
{
- /**
- * Filter configuration.
- *
- * @var array
- */
- protected $configuration = array();
- /**
- * The CssMinifier of the filter.
- *
- * @var CssMinifier
- */
- protected $minifier = null;
- /**
- * Constructor.
- *
- * @param CssMinifier $minifier The CssMinifier object of this plugin.
- * @param array $configuration Filter configuration [optional]
- * @return void
- */
- public function __construct(CssMinifier $minifier, array $configuration = array())
- {
- $this->configuration = $configuration;
- $this->minifier = $minifier;
- }
- /**
- * Filter the tokens.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- abstract public function apply(array &$tokens);
+ /**
+ * Filter configuration.
+ *
+ * @var array
+ */
+ protected $configuration = array();
+ /**
+ * The CssMinifier of the filter.
+ *
+ * @var CssMinifier
+ */
+ protected $minifier = NULL;
+
+ /**
+ * Constructor.
+ *
+ * @param CssMinifier $minifier The CssMinifier object of this plugin.
+ * @param array $configuration Filter configuration [optional]
+ * @return void
+ */
+ public function __construct(CssMinifier $minifier, array $configuration = array()) {
+ $this->configuration = $configuration;
+ $this->minifier = $minifier;
+ }
+
+ /**
+ * Filter the tokens.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ abstract public function apply(array &$tokens);
}
/**
@@ -266,126 +272,127 @@ abstract class aCssMinifierFilter
*
* Every formatter have to extend this class.
*
- * @package CssMin/Formatter
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Formatter
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssFormatter
{
- /**
- * Indent string.
- *
- * @var string
- */
- protected $indent = " ";
- /**
- * Declaration padding.
- *
- * @var integer
- */
- protected $padding = 0;
- /**
- * Tokens.
- *
- * @var array
- */
- protected $tokens = array();
- /**
- * Constructor.
- *
- * @param array $tokens Array of CssToken
- * @param string $indent Indent string [optional]
- * @param integer $padding Declaration value padding [optional]
- */
- public function __construct(array $tokens, $indent = null, $padding = null)
- {
- $this->tokens = $tokens;
- $this->indent = !is_null($indent) ? $indent : $this->indent;
- $this->padding = !is_null($padding) ? $padding : $this->padding;
- }
- /**
- * Returns the array of aCssToken as formatted string.
- *
- * @return string
- */
- abstract public function __toString();
+ /**
+ * Indent string.
+ *
+ * @var string
+ */
+ protected $indent = " ";
+ /**
+ * Declaration padding.
+ *
+ * @var integer
+ */
+ protected $padding = 0;
+ /**
+ * Tokens.
+ *
+ * @var array
+ */
+ protected $tokens = array();
+
+ /**
+ * Constructor.
+ *
+ * @param array $tokens Array of CssToken
+ * @param string $indent Indent string [optional]
+ * @param integer $padding Declaration value padding [optional]
+ */
+ public function __construct(array $tokens, $indent = NULL, $padding = NULL) {
+ $this->tokens = $tokens;
+ $this->indent = !is_null($indent) ? $indent : $this->indent;
+ $this->padding = !is_null($padding) ? $padding : $this->padding;
+ }
+
+ /**
+ * Returns the array of aCssToken as formatted string.
+ *
+ * @return string
+ */
+ abstract public function __toString();
}
/**
* Abstract definition of a ruleset declaration token.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssDeclarationToken extends aCssToken
{
- /**
- * Is the declaration flagged as important?
- *
- * @var boolean
- */
- public $IsImportant = false;
- /**
- * Is the declaration flagged as last one of the ruleset?
- *
- * @var boolean
- */
- public $IsLast = false;
- /**
- * Property name of the declaration.
- *
- * @var string
- */
- public $Property = "";
- /**
- * Value of the declaration.
- *
- * @var string
- */
- public $Value = "";
- /**
- * Set the properties of the @font-face declaration.
- *
- * @param string $property Property of the declaration
- * @param string $value Value of the declaration
- * @param boolean $isImportant Is the !important flag is set?
- * @param boolean $IsLast Is the declaration the last one of the block?
- * @return void
- */
- public function __construct($property, $value, $isImportant = false, $isLast = false)
- {
- $this->Property = $property;
- $this->Value = $value;
- $this->IsImportant = $isImportant;
- $this->IsLast = $isLast;
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->Property . ":" . $this->Value . ($this->IsImportant ? " !important" : "") . ($this->IsLast ? "" : ";");
- }
+ /**
+ * Is the declaration flagged as important?
+ *
+ * @var boolean
+ */
+ public $IsImportant = FALSE;
+ /**
+ * Is the declaration flagged as last one of the ruleset?
+ *
+ * @var boolean
+ */
+ public $IsLast = FALSE;
+ /**
+ * Property name of the declaration.
+ *
+ * @var string
+ */
+ public $Property = "";
+ /**
+ * Value of the declaration.
+ *
+ * @var string
+ */
+ public $Value = "";
+
+ /**
+ * Set the properties of the @font-face declaration.
+ *
+ * @param string $property Property of the declaration
+ * @param string $value Value of the declaration
+ * @param boolean $isImportant Is the !important flag is set?
+ * @param boolean $IsLast Is the declaration the last one of the block?
+ * @return void
+ */
+ public function __construct($property, $value, $isImportant = FALSE, $isLast = FALSE) {
+ $this->Property = $property;
+ $this->Value = $value;
+ $this->IsImportant = $isImportant;
+ $this->IsLast = $isLast;
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return $this->Property . ":" . $this->Value . ($this->IsImportant ? " !important" : "") . ($this->IsLast ? "" : ";");
+ }
}
/**
* Abstract definition of a for at-rule block start token.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssAtBlockStartToken extends aCssToken
{
@@ -395,133 +402,107 @@ abstract class aCssAtBlockStartToken extends aCssToken
/**
* Abstract definition of a for at-rule block end token.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
abstract class aCssAtBlockEndToken extends aCssToken
{
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "}";
- }
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "}";
+ }
}
/**
* {@link aCssFromatter Formatter} returning the CSS source in {@link http://goo.gl/etzLs Whitesmiths indent style}.
*
- * @package CssMin/Formatter
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Formatter
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssWhitesmithsFormatter extends aCssFormatter
{
- /**
- * Implements {@link aCssFormatter::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- $r = array();
- $level = 0;
- for ($i = 0, $l = count($this->tokens); $i < $l; $i++)
- {
- $token = $this->tokens[$i];
- $class = get_class($token);
- $indent = str_repeat($this->indent, $level);
- if ($class === "CssCommentToken")
- {
- $lines = array_map("trim", explode("\n", $token->Comment));
- for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++)
- {
- $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii];
- }
- }
- elseif ($class === "CssAtCharsetToken")
- {
- $r[] = $indent . "@charset " . $token->Charset . ";";
- }
- elseif ($class === "CssAtFontFaceStartToken")
- {
- $r[] = $indent . "@font-face";
- $r[] = $this->indent . $indent . "{";
- $level++;
- }
- elseif ($class === "CssAtImportToken")
- {
- $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";";
- }
- elseif ($class === "CssAtKeyframesStartToken")
- {
- $r[] = $indent . "@keyframes " . $token->Name;
- $r[] = $this->indent . $indent . "{";
- $level++;
- }
- elseif ($class === "CssAtMediaStartToken")
- {
- $r[] = $indent . "@media " . implode(", ", $token->MediaTypes);
- $r[] = $this->indent . $indent . "{";
- $level++;
- }
- elseif ($class === "CssAtPageStartToken")
- {
- $r[] = $indent . "@page";
- $r[] = $this->indent . $indent . "{";
- $level++;
- }
- elseif ($class === "CssAtVariablesStartToken")
- {
- $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes);
- $r[] = $this->indent . $indent . "{";
- $level++;
- }
- elseif ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken")
- {
- $r[] = $indent . implode(", ", $token->Selectors);
- $r[] = $this->indent . $indent . "{";
- $level++;
- }
- elseif ($class === "CssAtFontFaceDeclarationToken"
- || $class === "CssAtKeyframesRulesetDeclarationToken"
- || $class === "CssAtPageDeclarationToken"
- || $class === "CssAtVariablesDeclarationToken"
- || $class === "CssRulesetDeclarationToken"
- )
- {
- $declaration = $indent . $token->Property . ": ";
- if ($this->padding)
- {
- $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT);
- }
- $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";";
- }
- elseif ($class === "CssAtFontFaceEndToken"
- || $class === "CssAtMediaEndToken"
- || $class === "CssAtKeyframesEndToken"
- || $class === "CssAtKeyframesRulesetEndToken"
- || $class === "CssAtPageEndToken"
- || $class === "CssAtVariablesEndToken"
- || $class === "CssRulesetEndToken"
- )
- {
- $r[] = $indent . "}";
- $level--;
- }
- }
- return implode("\n", $r);
- }
+ /**
+ * Implements {@link aCssFormatter::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ $r = array();
+ $level = 0;
+ for ($i = 0, $l = count($this->tokens); $i < $l; $i++) {
+ $token = $this->tokens[$i];
+ $class = get_class($token);
+ $indent = str_repeat($this->indent, $level);
+ if ($class === "CssCommentToken") {
+ $lines = array_map("trim", explode("\n", $token->Comment));
+ for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) {
+ $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii];
+ }
+ } else if ($class === "CssAtCharsetToken") {
+ $r[] = $indent . "@charset " . $token->Charset . ";";
+ } else if ($class === "CssAtFontFaceStartToken") {
+ $r[] = $indent . "@font-face";
+ $r[] = $this->indent . $indent . "{";
+ $level++;
+ } else if ($class === "CssAtImportToken") {
+ $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";";
+ } else if ($class === "CssAtKeyframesStartToken") {
+ $r[] = $indent . "@keyframes " . $token->Name;
+ $r[] = $this->indent . $indent . "{";
+ $level++;
+ } else if ($class === "CssAtMediaStartToken") {
+ $r[] = $indent . "@media " . implode(", ", $token->MediaTypes);
+ $r[] = $this->indent . $indent . "{";
+ $level++;
+ } else if ($class === "CssAtPageStartToken") {
+ $r[] = $indent . "@page";
+ $r[] = $this->indent . $indent . "{";
+ $level++;
+ } else if ($class === "CssAtVariablesStartToken") {
+ $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes);
+ $r[] = $this->indent . $indent . "{";
+ $level++;
+ } else if ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken") {
+ $r[] = $indent . implode(", ", $token->Selectors);
+ $r[] = $this->indent . $indent . "{";
+ $level++;
+ } else if ($class === "CssAtFontFaceDeclarationToken"
+ || $class === "CssAtKeyframesRulesetDeclarationToken"
+ || $class === "CssAtPageDeclarationToken"
+ || $class === "CssAtVariablesDeclarationToken"
+ || $class === "CssRulesetDeclarationToken"
+ ) {
+ $declaration = $indent . $token->Property . ": ";
+ if ($this->padding) {
+ $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT);
+ }
+ $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";";
+ } else if ($class === "CssAtFontFaceEndToken"
+ || $class === "CssAtMediaEndToken"
+ || $class === "CssAtKeyframesEndToken"
+ || $class === "CssAtKeyframesRulesetEndToken"
+ || $class === "CssAtPageEndToken"
+ || $class === "CssAtVariablesEndToken"
+ || $class === "CssRulesetEndToken"
+ ) {
+ $r[] = $indent . "}";
+ $level--;
+ }
+ }
+ return implode("\n", $r);
+ }
}
/**
@@ -533,9 +514,9 @@ class CssWhitesmithsFormatter extends aCssFormatter
* Example:
*
* @variables
- * {
- * defaultColor: black;
- * }
+ * {
+ * defaultColor: black;
+ * }
* color: var(defaultColor);
*
*
@@ -544,95 +525,90 @@ class CssWhitesmithsFormatter extends aCssFormatter
* color:black;
*
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssVariablesMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Regular expression matching a value.
- *
- * @var string
- */
- private $reMatch = "/var\((.+)\)/iSU";
- /**
- * Parsed variables.
- *
- * @var array
- */
- private $variables = null;
- /**
- * Returns the variables.
- *
- * @return array
- */
- public function getVariables()
- {
- return $this->variables;
- }
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- if (stripos($token->Value, "var") !== false && preg_match_all($this->reMatch, $token->Value, $m))
- {
- $mediaTypes = $token->MediaTypes;
- if (!in_array("all", $mediaTypes))
- {
- $mediaTypes[] = "all";
- }
- for ($i = 0, $l = count($m[0]); $i < $l; $i++)
- {
- $variable = trim($m[1][$i]);
- foreach ($mediaTypes as $mediaType)
- {
- if (isset($this->variables[$mediaType], $this->variables[$mediaType][$variable]))
- {
- // Variable value found => set the declaration value to the variable value and return
- $token->Value = str_replace($m[0][$i], $this->variables[$mediaType][$variable], $token->Value);
- continue 2;
- }
- }
- // If no value was found trigger an error and replace the token with a CssNullToken
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": No value found for variable " . $variable . "
in media types " . implode(", ", $mediaTypes) . "
", (string) $token));
- $token = new CssNullToken();
- return true;
- }
- }
- return false;
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
- /**
- * Sets the variables.
- *
- * @param array $variables Variables to set
- * @return void
- */
- public function setVariables(array $variables)
- {
- $this->variables = $variables;
- }
+ /**
+ * Regular expression matching a value.
+ *
+ * @var string
+ */
+ private $reMatch = "/var\((.+)\)/iSU";
+ /**
+ * Parsed variables.
+ *
+ * @var array
+ */
+ private $variables = NULL;
+
+ /**
+ * Returns the variables.
+ *
+ * @return array
+ */
+ public function getVariables() {
+ return $this->variables;
+ }
+
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ if (stripos($token->Value, "var") !== FALSE && preg_match_all($this->reMatch, $token->Value, $m)) {
+ $mediaTypes = $token->MediaTypes;
+ if (!in_array("all", $mediaTypes)) {
+ $mediaTypes[] = "all";
+ }
+ for ($i = 0, $l = count($m[0]); $i < $l; $i++) {
+ $variable = trim($m[1][$i]);
+ foreach ($mediaTypes as $mediaType) {
+ if (isset($this->variables[$mediaType], $this->variables[$mediaType][$variable])) {
+ // Variable value found => set the declaration value to the variable value and return
+ $token->Value = str_replace($m[0][$i], $this->variables[$mediaType][$variable], $token->Value);
+ continue 2;
+ }
+ }
+ // If no value was found trigger an error and replace the token with a CssNullToken
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": No value found for variable " . $variable . "
in media types " . implode(", ", $mediaTypes) . "
", (string)$token));
+ $token = new CssNullToken();
+ return TRUE;
+ }
+ }
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
+
+ /**
+ * Sets the variables.
+ *
+ * @param array $variables Variables to set
+ * @return void
+ */
+ public function setVariables(array $variables) {
+ $this->variables = $variables;
+ }
}
/**
@@ -640,93 +616,75 @@ class CssVariablesMinifierPlugin extends aCssMinifierPlugin
* blocks. The variables will get store in the {@link CssVariablesMinifierPlugin} that will apply the variables to
* declaration.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssVariablesMinifierFilter extends aCssMinifierFilter
{
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- $variables = array();
- $defaultMediaTypes = array("all");
- $mediaTypes = array();
- $remove = array();
- for($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- // @variables at-rule block found
- if (get_class($tokens[$i]) === "CssAtVariablesStartToken")
- {
- $remove[] = $i;
- $mediaTypes = (count($tokens[$i]->MediaTypes) == 0 ? $defaultMediaTypes : $tokens[$i]->MediaTypes);
- foreach ($mediaTypes as $mediaType)
- {
- if (!isset($variables[$mediaType]))
- {
- $variables[$mediaType] = array();
- }
- }
- // Read the variable declaration tokens
- for($i = $i; $i < $l; $i++)
- {
- // Found a variable declaration => read the variable values
- if (get_class($tokens[$i]) === "CssAtVariablesDeclarationToken")
- {
- foreach ($mediaTypes as $mediaType)
- {
- $variables[$mediaType][$tokens[$i]->Property] = $tokens[$i]->Value;
- }
- $remove[] = $i;
- }
- // Found the variables end token => break;
- elseif (get_class($tokens[$i]) === "CssAtVariablesEndToken")
- {
- $remove[] = $i;
- break;
- }
- }
- }
- }
- // Variables in @variables at-rule blocks
- foreach($variables as $mediaType => $null)
- {
- foreach($variables[$mediaType] as $variable => $value)
- {
- // If a var() statement in a variable value found...
- if (stripos($value, "var") !== false && preg_match_all("/var\((.+)\)/iSU", $value, $m))
- {
- // ... then replace the var() statement with the variable values.
- for ($i = 0, $l = count($m[0]); $i < $l; $i++)
- {
- $variables[$mediaType][$variable] = str_replace($m[0][$i], (isset($variables[$mediaType][$m[1][$i]]) ? $variables[$mediaType][$m[1][$i]] : ""), $variables[$mediaType][$variable]);
- }
- }
- }
- }
- // Remove the complete @variables at-rule block
- foreach ($remove as $i)
- {
- $tokens[$i] = null;
- }
- if (!($plugin = $this->minifier->getPlugin("CssVariablesMinifierPlugin")))
- {
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin CssVariablesMinifierPlugin
was not found but is required for " . __CLASS__ . "
"));
- }
- else
- {
- $plugin->setVariables($variables);
- }
- return count($remove);
- }
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ $variables = array();
+ $defaultMediaTypes = array("all");
+ $mediaTypes = array();
+ $remove = array();
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ // @variables at-rule block found
+ if (get_class($tokens[$i]) === "CssAtVariablesStartToken") {
+ $remove[] = $i;
+ $mediaTypes = (count($tokens[$i]->MediaTypes) == 0 ? $defaultMediaTypes : $tokens[$i]->MediaTypes);
+ foreach ($mediaTypes as $mediaType) {
+ if (!isset($variables[$mediaType])) {
+ $variables[$mediaType] = array();
+ }
+ }
+ // Read the variable declaration tokens
+ for ($i = $i; $i < $l; $i++) {
+ // Found a variable declaration => read the variable values
+ if (get_class($tokens[$i]) === "CssAtVariablesDeclarationToken") {
+ foreach ($mediaTypes as $mediaType) {
+ $variables[$mediaType][$tokens[$i]->Property] = $tokens[$i]->Value;
+ }
+ $remove[] = $i;
+ } // Found the variables end token => break;
+ else if (get_class($tokens[$i]) === "CssAtVariablesEndToken") {
+ $remove[] = $i;
+ break;
+ }
+ }
+ }
+ }
+ // Variables in @variables at-rule blocks
+ foreach ($variables as $mediaType => $null) {
+ foreach ($variables[$mediaType] as $variable => $value) {
+ // If a var() statement in a variable value found...
+ if (stripos($value, "var") !== FALSE && preg_match_all("/var\((.+)\)/iSU", $value, $m)) {
+ // ... then replace the var() statement with the variable values.
+ for ($i = 0, $l = count($m[0]); $i < $l; $i++) {
+ $variables[$mediaType][$variable] = str_replace($m[0][$i], (isset($variables[$mediaType][$m[1][$i]]) ? $variables[$mediaType][$m[1][$i]] : ""), $variables[$mediaType][$variable]);
+ }
+ }
+ }
+ }
+ // Remove the complete @variables at-rule block
+ foreach ($remove as $i) {
+ $tokens[$i] = NULL;
+ }
+ if (!($plugin = $this->minifier->getPlugin("CssVariablesMinifierPlugin"))) {
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin CssVariablesMinifierPlugin
was not found but is required for " . __CLASS__ . "
"));
+ } else {
+ $plugin->setVariables($variables);
+ }
+ return count($remove);
+ }
}
/**
@@ -734,75 +692,65 @@ class CssVariablesMinifierFilter extends aCssMinifierFilter
*
* This plugin return no {@link aCssToken CssToken} but ensures that url() values will get parsed properly.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssUrlParserPlugin extends aCssParserPlugin
{
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array("(", ")");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return false;
- }
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- // Start of string
- if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 3, 4)) === "url(" && $state !== "T_URL")
- {
- $this->parser->pushState("T_URL");
- $this->parser->setExclusive(__CLASS__);
- }
- // Escaped LF in url => remove escape backslash and LF
- elseif ($char === "\n" && $previousChar === "\\" && $state === "T_URL")
- {
- $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2));
- }
- // Parse error: Unescaped LF in string literal
- elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_URL")
- {
- $line = $this->parser->getBuffer();
- $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . ")"); // Replace the LF with the url string delimiter
- $this->parser->popState();
- $this->parser->unsetExclusive();
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_"));
- }
- // End of string
- elseif ($char === ")" && $state === "T_URL")
- {
- $this->parser->popState();
- $this->parser->unsetExclusive();
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array("(", ")");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ // Start of string
+ if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 3, 4)) === "url(" && $state !== "T_URL") {
+ $this->parser->pushState("T_URL");
+ $this->parser->setExclusive(__CLASS__);
+ } // Escaped LF in url => remove escape backslash and LF
+ else if ($char === "\n" && $previousChar === "\\" && $state === "T_URL") {
+ $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2));
+ } // Parse error: Unescaped LF in string literal
+ else if ($char === "\n" && $previousChar !== "\\" && $state === "T_URL") {
+ $line = $this->parser->getBuffer();
+ $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . ")"); // Replace the LF with the url string delimiter
+ $this->parser->popState();
+ $this->parser->unsetExclusive();
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_"));
+ } // End of string
+ else if ($char === ")" && $state === "T_URL") {
+ $this->parser->popState();
+ $this->parser->unsetExclusive();
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
@@ -810,229 +758,219 @@ class CssUrlParserPlugin extends aCssParserPlugin
*
* This plugin return no {@link aCssToken CssToken} but ensures that string values will get parsed properly.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssStringParserPlugin extends aCssParserPlugin
{
- /**
- * Current string delimiter char.
- *
- * @var string
- */
- private $delimiterChar = null;
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array("\"", "'", "\n");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return false;
- }
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- // Start of string
- if (($char === "\"" || $char === "'") && $state !== "T_STRING")
- {
- $this->delimiterChar = $char;
- $this->parser->pushState("T_STRING");
- $this->parser->setExclusive(__CLASS__);
- }
- // Escaped LF in string => remove escape backslash and LF
- elseif ($char === "\n" && $previousChar === "\\" && $state === "T_STRING")
- {
- $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2));
- }
- // Parse error: Unescaped LF in string literal
- elseif ($char === "\n" && $previousChar !== "\\" && $state === "T_STRING")
- {
- $line = $this->parser->getBuffer();
- $this->parser->popState();
- $this->parser->unsetExclusive();
- $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . $this->delimiterChar); // Replace the LF with the current string char
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_"));
- $this->delimiterChar = null;
- }
- // End of string
- elseif ($char === $this->delimiterChar && $state === "T_STRING")
- {
- // If the Previous char is a escape char count the amount of the previous escape chars. If the amount of
- // escape chars is uneven do not end the string
- if ($previousChar == "\\")
- {
- $source = $this->parser->getSource();
- $c = 1;
- $i = $index - 2;
- while (substr($source, $i, 1) === "\\")
- {
- $c++; $i--;
- }
- if ($c % 2)
- {
- return false;
- }
- }
- $this->parser->popState();
- $this->parser->unsetExclusive();
- $this->delimiterChar = null;
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Current string delimiter char.
+ *
+ * @var string
+ */
+ private $delimiterChar = NULL;
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array("\"", "'", "\n");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ // Start of string
+ if (($char === "\"" || $char === "'") && $state !== "T_STRING") {
+ $this->delimiterChar = $char;
+ $this->parser->pushState("T_STRING");
+ $this->parser->setExclusive(__CLASS__);
+ } // Escaped LF in string => remove escape backslash and LF
+ else if ($char === "\n" && $previousChar === "\\" && $state === "T_STRING") {
+ $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -2));
+ } // Parse error: Unescaped LF in string literal
+ else if ($char === "\n" && $previousChar !== "\\" && $state === "T_STRING") {
+ $line = $this->parser->getBuffer();
+ $this->parser->popState();
+ $this->parser->unsetExclusive();
+ $this->parser->setBuffer(substr($this->parser->getBuffer(), 0, -1) . $this->delimiterChar); // Replace the LF with the current string char
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated string literal", $line . "_"));
+ $this->delimiterChar = NULL;
+ } // End of string
+ else if ($char === $this->delimiterChar && $state === "T_STRING") {
+ // If the Previous char is a escape char count the amount of the previous escape chars. If the amount of
+ // escape chars is uneven do not end the string
+ if ($previousChar == "\\") {
+ $source = $this->parser->getSource();
+ $c = 1;
+ $i = $index - 2;
+ while (substr($source, $i, 1) === "\\") {
+ $c++;
+ $i--;
+ }
+ if ($c % 2) {
+ return FALSE;
+ }
+ }
+ $this->parser->popState();
+ $this->parser->unsetExclusive();
+ $this->delimiterChar = NULL;
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
* This {@link aCssMinifierFilter minifier filter} sorts the ruleset declarations of a ruleset by name.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Rowan Beentje
- * @copyright Rowan Beentje
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Rowan Beentje
+ * @copyright Rowan Beentje
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssSortRulesetPropertiesMinifierFilter extends aCssMinifierFilter
{
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- $r = 0;
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- // Only look for ruleset start rules
- if (get_class($tokens[$i]) !== "CssRulesetStartToken") { continue; }
- // Look for the corresponding ruleset end
- $endIndex = false;
- for ($ii = $i + 1; $ii < $l; $ii++)
- {
- if (get_class($tokens[$ii]) !== "CssRulesetEndToken") { continue; }
- $endIndex = $ii;
- break;
- }
- if (!$endIndex) { break; }
- $startIndex = $i;
- $i = $endIndex;
- // Skip if there's only one token in this ruleset
- if ($endIndex - $startIndex <= 2) { continue; }
- // Ensure that everything between the start and end is a declaration token, for safety
- for ($ii = $startIndex + 1; $ii < $endIndex; $ii++)
- {
- if (get_class($tokens[$ii]) !== "CssRulesetDeclarationToken") { continue(2); }
- }
- $declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1);
- // Check whether a sort is required
- $sortRequired = $lastPropertyName = false;
- foreach ($declarations as $declaration)
- {
- if ($lastPropertyName)
- {
- if (strcmp($lastPropertyName, $declaration->Property) > 0)
- {
- $sortRequired = true;
- break;
- }
- }
- $lastPropertyName = $declaration->Property;
- }
- if (!$sortRequired) { continue; }
- // Arrange the declarations alphabetically by name
- usort($declarations, array(__CLASS__, "userDefinedSort1"));
- // Update "IsLast" property
- for ($ii = 0, $ll = count($declarations) - 1; $ii <= $ll; $ii++)
- {
- if ($ii == $ll)
- {
- $declarations[$ii]->IsLast = true;
- }
- else
- {
- $declarations[$ii]->IsLast = false;
- }
- }
- // Splice back into the array.
- array_splice($tokens, $startIndex + 1, $endIndex - $startIndex - 1, $declarations);
- $r += $endIndex - $startIndex - 1;
- }
- return $r;
- }
- /**
- * User defined sort function.
- *
- * @return integer
- */
- public static function userDefinedSort1($a, $b)
- {
- return strcmp($a->Property, $b->Property);
- }
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ $r = 0;
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ // Only look for ruleset start rules
+ if (get_class($tokens[$i]) !== "CssRulesetStartToken") {
+ continue;
+ }
+ // Look for the corresponding ruleset end
+ $endIndex = FALSE;
+ for ($ii = $i + 1; $ii < $l; $ii++) {
+ if (get_class($tokens[$ii]) !== "CssRulesetEndToken") {
+ continue;
+ }
+ $endIndex = $ii;
+ break;
+ }
+ if (!$endIndex) {
+ break;
+ }
+ $startIndex = $i;
+ $i = $endIndex;
+ // Skip if there's only one token in this ruleset
+ if ($endIndex - $startIndex <= 2) {
+ continue;
+ }
+ // Ensure that everything between the start and end is a declaration token, for safety
+ for ($ii = $startIndex + 1; $ii < $endIndex; $ii++) {
+ if (get_class($tokens[$ii]) !== "CssRulesetDeclarationToken") {
+ continue(2);
+ }
+ }
+ $declarations = array_slice($tokens, $startIndex + 1, $endIndex - $startIndex - 1);
+ // Check whether a sort is required
+ $sortRequired = $lastPropertyName = FALSE;
+ foreach ($declarations as $declaration) {
+ if ($lastPropertyName) {
+ if (strcmp($lastPropertyName, $declaration->Property) > 0) {
+ $sortRequired = TRUE;
+ break;
+ }
+ }
+ $lastPropertyName = $declaration->Property;
+ }
+ if (!$sortRequired) {
+ continue;
+ }
+ // Arrange the declarations alphabetically by name
+ usort($declarations, array(__CLASS__, "userDefinedSort1"));
+ // Update "IsLast" property
+ for ($ii = 0, $ll = count($declarations) - 1; $ii <= $ll; $ii++) {
+ if ($ii == $ll) {
+ $declarations[$ii]->IsLast = TRUE;
+ } else {
+ $declarations[$ii]->IsLast = FALSE;
+ }
+ }
+ // Splice back into the array.
+ array_splice($tokens, $startIndex + 1, $endIndex - $startIndex - 1, $declarations);
+ $r += $endIndex - $startIndex - 1;
+ }
+ return $r;
+ }
+
+ /**
+ * User defined sort function.
+ *
+ * @return integer
+ */
+ public static function userDefinedSort1($a, $b) {
+ return strcmp($a->Property, $b->Property);
+ }
}
/**
* This {@link aCssToken CSS token} represents the start of a ruleset.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRulesetStartToken extends aCssRulesetStartToken
{
- /**
- * Array of selectors.
- *
- * @var array
- */
- public $Selectors = array();
- /**
- * Set the properties of a ruleset token.
- *
- * @param array $selectors Selectors of the ruleset
- * @return void
- */
- public function __construct(array $selectors = array())
- {
- $this->Selectors = $selectors;
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return implode(",", $this->Selectors) . "{";
- }
+ /**
+ * Array of selectors.
+ *
+ * @var array
+ */
+ public $Selectors = array();
+
+ /**
+ * Set the properties of a ruleset token.
+ *
+ * @param array $selectors Selectors of the ruleset
+ * @return void
+ */
+ public function __construct(array $selectors = array()) {
+ $this->Selectors = $selectors;
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return implode(",", $this->Selectors) . "{";
+ }
}
/**
@@ -1041,138 +979,117 @@ class CssRulesetStartToken extends aCssRulesetStartToken
* Found rulesets will add a {@link CssRulesetStartToken} and {@link CssRulesetEndToken} to the
* parser; including declarations as {@link CssRulesetDeclarationToken}.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRulesetParserPlugin extends aCssParserPlugin
{
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array(",", "{", "}", ":", ";");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return array("T_DOCUMENT", "T_AT_MEDIA", "T_RULESET::SELECTORS", "T_RULESET", "T_RULESET_DECLARATION");
- }
- /**
- * Selectors.
- *
- * @var array
- */
- private $selectors = array();
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- // Start of Ruleset and selectors
- if ($char === "," && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS"))
- {
- if ($state !== "T_RULESET::SELECTORS")
- {
- $this->parser->pushState("T_RULESET::SELECTORS");
- }
- $this->selectors[] = $this->parser->getAndClearBuffer(",{");
- }
- // End of selectors and start of declarations
- elseif ($char === "{" && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS"))
- {
- if ($this->parser->getBuffer() !== "")
- {
- $this->selectors[] = $this->parser->getAndClearBuffer(",{");
- if ($state == "T_RULESET::SELECTORS")
- {
- $this->parser->popState();
- }
- $this->parser->pushState("T_RULESET");
- $this->parser->appendToken(new CssRulesetStartToken($this->selectors));
- $this->selectors = array();
- }
- }
- // Start of declaration
- elseif ($char === ":" && $state === "T_RULESET")
- {
- $this->parser->pushState("T_RULESET_DECLARATION");
- $this->buffer = $this->parser->getAndClearBuffer(":;", true);
- }
- // Unterminated ruleset declaration
- elseif ($char === ":" && $state === "T_RULESET_DECLARATION")
- {
- // Ignore Internet Explorer filter declarations
- if ($this->buffer === "filter")
- {
- return false;
- }
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_"));
- }
- // End of declaration
- elseif (($char === ";" || $char === "}") && $state === "T_RULESET_DECLARATION")
- {
- $value = $this->parser->getAndClearBuffer(";}");
- if (strtolower(substr($value, -10, 10)) === "!important")
- {
- $value = trim(substr($value, 0, -10));
- $isImportant = true;
- }
- else
- {
- $isImportant = false;
- }
- $this->parser->popState();
- $this->parser->appendToken(new CssRulesetDeclarationToken($this->buffer, $value, $this->parser->getMediaTypes(), $isImportant));
- // Declaration ends with a right curly brace; so we have to end the ruleset
- if ($char === "}")
- {
- $this->parser->appendToken(new CssRulesetEndToken());
- $this->parser->popState();
- }
- $this->buffer = "";
- }
- // End of ruleset
- elseif ($char === "}" && $state === "T_RULESET")
- {
- $this->parser->popState();
- $this->parser->clearBuffer();
- $this->parser->appendToken(new CssRulesetEndToken());
- $this->buffer = "";
- $this->selectors = array();
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array(",", "{", "}", ":", ";");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return array("T_DOCUMENT", "T_AT_MEDIA", "T_RULESET::SELECTORS", "T_RULESET", "T_RULESET_DECLARATION");
+ }
+
+ /**
+ * Selectors.
+ *
+ * @var array
+ */
+ private $selectors = array();
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ // Start of Ruleset and selectors
+ if ($char === "," && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) {
+ if ($state !== "T_RULESET::SELECTORS") {
+ $this->parser->pushState("T_RULESET::SELECTORS");
+ }
+ $this->selectors[] = $this->parser->getAndClearBuffer(",{");
+ } // End of selectors and start of declarations
+ else if ($char === "{" && ($state === "T_DOCUMENT" || $state === "T_AT_MEDIA" || $state === "T_RULESET::SELECTORS")) {
+ if ($this->parser->getBuffer() !== "") {
+ $this->selectors[] = $this->parser->getAndClearBuffer(",{");
+ if ($state == "T_RULESET::SELECTORS") {
+ $this->parser->popState();
+ }
+ $this->parser->pushState("T_RULESET");
+ $this->parser->appendToken(new CssRulesetStartToken($this->selectors));
+ $this->selectors = array();
+ }
+ } // Start of declaration
+ else if ($char === ":" && $state === "T_RULESET") {
+ $this->parser->pushState("T_RULESET_DECLARATION");
+ $this->buffer = $this->parser->getAndClearBuffer(":;", TRUE);
+ } // Unterminated ruleset declaration
+ else if ($char === ":" && $state === "T_RULESET_DECLARATION") {
+ // Ignore Internet Explorer filter declarations
+ if ($this->buffer === "filter") {
+ return FALSE;
+ }
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_"));
+ } // End of declaration
+ else if (($char === ";" || $char === "}") && $state === "T_RULESET_DECLARATION") {
+ $value = $this->parser->getAndClearBuffer(";}");
+ if (strtolower(substr($value, -10, 10)) === "!important") {
+ $value = trim(substr($value, 0, -10));
+ $isImportant = TRUE;
+ } else {
+ $isImportant = FALSE;
+ }
+ $this->parser->popState();
+ $this->parser->appendToken(new CssRulesetDeclarationToken($this->buffer, $value, $this->parser->getMediaTypes(), $isImportant));
+ // Declaration ends with a right curly brace; so we have to end the ruleset
+ if ($char === "}") {
+ $this->parser->appendToken(new CssRulesetEndToken());
+ $this->parser->popState();
+ }
+ $this->buffer = "";
+ } // End of ruleset
+ else if ($char === "}" && $state === "T_RULESET") {
+ $this->parser->popState();
+ $this->parser->clearBuffer();
+ $this->parser->appendToken(new CssRulesetEndToken());
+ $this->buffer = "";
+ $this->selectors = array();
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
* This {@link aCssToken CSS token} represents the end of a ruleset.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRulesetEndToken extends aCssRulesetEndToken
{
@@ -1182,36 +1099,36 @@ class CssRulesetEndToken extends aCssRulesetEndToken
/**
* This {@link aCssToken CSS token} represents a ruleset declaration.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRulesetDeclarationToken extends aCssDeclarationToken
{
- /**
- * Media types of the declaration.
- *
- * @var array
- */
- public $MediaTypes = array("all");
- /**
- * Set the properties of a ddocument- or at-rule @media level declaration.
- *
- * @param string $property Property of the declaration
- * @param string $value Value of the declaration
- * @param mixed $mediaTypes Media types of the declaration
- * @param boolean $isImportant Is the !important flag is set
- * @param boolean $isLast Is the declaration the last one of the ruleset
- * @return void
- */
- public function __construct($property, $value, $mediaTypes = null, $isImportant = false, $isLast = false)
- {
- parent::__construct($property, $value, $isImportant, $isLast);
- $this->MediaTypes = $mediaTypes ? $mediaTypes : array("all");
- }
+ /**
+ * Media types of the declaration.
+ *
+ * @var array
+ */
+ public $MediaTypes = array("all");
+
+ /**
+ * Set the properties of a ddocument- or at-rule @media level declaration.
+ *
+ * @param string $property Property of the declaration
+ * @param string $value Value of the declaration
+ * @param mixed $mediaTypes Media types of the declaration
+ * @param boolean $isImportant Is the !important flag is set
+ * @param boolean $isLast Is the declaration the last one of the ruleset
+ * @return void
+ */
+ public function __construct($property, $value, $mediaTypes = NULL, $isImportant = FALSE, $isLast = FALSE) {
+ parent::__construct($property, $value, $isImportant, $isLast);
+ $this->MediaTypes = $mediaTypes ? $mediaTypes : array("all");
+ }
}
/**
@@ -1219,936 +1136,843 @@ class CssRulesetDeclarationToken extends aCssDeclarationToken
* @font-face at-rule or @page at-rule block. If the property IsLast is TRUE the decrations will get stringified
* without tailing semicolon.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRemoveLastDelarationSemiColonMinifierFilter extends aCssMinifierFilter
{
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- $current = get_class($tokens[$i]);
- $next = isset($tokens[$i+1]) ? get_class($tokens[$i+1]) : false;
- if (($current === "CssRulesetDeclarationToken" && $next === "CssRulesetEndToken") ||
- ($current === "CssAtFontFaceDeclarationToken" && $next === "CssAtFontFaceEndToken") ||
- ($current === "CssAtPageDeclarationToken" && $next === "CssAtPageEndToken"))
- {
- $tokens[$i]->IsLast = true;
- }
- }
- return 0;
- }
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ $current = get_class($tokens[$i]);
+ $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : FALSE;
+ if (($current === "CssRulesetDeclarationToken" && $next === "CssRulesetEndToken") ||
+ ($current === "CssAtFontFaceDeclarationToken" && $next === "CssAtFontFaceEndToken") ||
+ ($current === "CssAtPageDeclarationToken" && $next === "CssAtPageEndToken")) {
+ $tokens[$i]->IsLast = TRUE;
+ }
+ }
+ return 0;
+ }
}
/**
* This {@link aCssMinifierFilter minifier filter} will remove any empty rulesets (including @keyframes at-rule block
* rulesets).
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRemoveEmptyRulesetsMinifierFilter extends aCssMinifierFilter
{
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- $r = 0;
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- $current = get_class($tokens[$i]);
- $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false;
- if (($current === "CssRulesetStartToken" && $next === "CssRulesetEndToken") ||
- ($current === "CssAtKeyframesRulesetStartToken" && $next === "CssAtKeyframesRulesetEndToken" && !array_intersect(array("from", "0%", "to", "100%"), array_map("strtolower", $tokens[$i]->Selectors)))
- )
- {
- $tokens[$i] = null;
- $tokens[$i + 1] = null;
- $i++;
- $r = $r + 2;
- }
- }
- return $r;
- }
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ $r = 0;
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ $current = get_class($tokens[$i]);
+ $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : FALSE;
+ if (($current === "CssRulesetStartToken" && $next === "CssRulesetEndToken") ||
+ ($current === "CssAtKeyframesRulesetStartToken" && $next === "CssAtKeyframesRulesetEndToken" && !array_intersect(array("from", "0%", "to", "100%"), array_map("strtolower", $tokens[$i]->Selectors)))
+ ) {
+ $tokens[$i] = NULL;
+ $tokens[$i + 1] = NULL;
+ $i++;
+ $r = $r + 2;
+ }
+ }
+ return $r;
+ }
}
/**
* This {@link aCssMinifierFilter minifier filter} will remove any empty @font-face, @keyframes, @media and @page
* at-rule blocks.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRemoveEmptyAtBlocksMinifierFilter extends aCssMinifierFilter
{
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- $r = 0;
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- $current = get_class($tokens[$i]);
- $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : false;
- if (($current === "CssAtFontFaceStartToken" && $next === "CssAtFontFaceEndToken") ||
- ($current === "CssAtKeyframesStartToken" && $next === "CssAtKeyframesEndToken") ||
- ($current === "CssAtPageStartToken" && $next === "CssAtPageEndToken") ||
- ($current === "CssAtMediaStartToken" && $next === "CssAtMediaEndToken"))
- {
- $tokens[$i] = null;
- $tokens[$i + 1] = null;
- $i++;
- $r = $r + 2;
- }
- }
- return $r;
- }
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ $r = 0;
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ $current = get_class($tokens[$i]);
+ $next = isset($tokens[$i + 1]) ? get_class($tokens[$i + 1]) : FALSE;
+ if (($current === "CssAtFontFaceStartToken" && $next === "CssAtFontFaceEndToken") ||
+ ($current === "CssAtKeyframesStartToken" && $next === "CssAtKeyframesEndToken") ||
+ ($current === "CssAtPageStartToken" && $next === "CssAtPageEndToken") ||
+ ($current === "CssAtMediaStartToken" && $next === "CssAtMediaEndToken")) {
+ $tokens[$i] = NULL;
+ $tokens[$i + 1] = NULL;
+ $i++;
+ $r = $r + 2;
+ }
+ }
+ return $r;
+ }
}
/**
* This {@link aCssMinifierFilter minifier filter} will remove any comments from the array of parsed tokens.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssRemoveCommentsMinifierFilter extends aCssMinifierFilter
{
- /**
- * Regular expression whitelisting any important comments to preserve.
- *
- * @var string
- */
- private $whitelistPattern = '/(^\/\*!|@preserve|copyright|license|author|https?:|www\.)/i';
-
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- $r = 0;
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- if (get_class($tokens[$i]) === "CssCommentToken")
- {
- if (!preg_match($this->whitelistPattern, $tokens[$i]->Comment))
- {
- $tokens[$i] = null;
- $r++;
- }
- }
- }
- return $r;
- }
+ /**
+ * Regular expression whitelisting any important comments to preserve.
+ *
+ * @var string
+ */
+ private $whitelistPattern = '/(^\/\*!|@preserve|copyright|license|author|https?:|www\.)/i';
+
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ $r = 0;
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ if (get_class($tokens[$i]) === "CssCommentToken") {
+ if (!preg_match($this->whitelistPattern, $tokens[$i]->Comment)) {
+ $tokens[$i] = NULL;
+ $r++;
+ }
+ }
+ }
+ return $r;
+ }
}
/**
* CSS Parser.
*
- * @package CssMin/Parser
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssParser
{
- /**
- * Parse buffer.
- *
- * @var string
- */
- private $buffer = "";
- /**
- * {@link aCssParserPlugin Plugins}.
- *
- * @var array
- */
- private $plugins = array();
- /**
- * Source to parse.
- *
- * @var string
- */
- private $source = "";
- /**
- * Current state.
- *
- * @var integer
- */
- private $state = "T_DOCUMENT";
- /**
- * Exclusive state.
- *
- * @var string
- */
- private $stateExclusive = false;
- /**
- * Media types state.
- *
- * @var mixed
- */
- private $stateMediaTypes = false;
- /**
- * State stack.
- *
- * @var array
- */
- private $states = array("T_DOCUMENT");
- /**
- * Parsed tokens.
- *
- * @var array
- */
- private $tokens = array();
- /**
- * Constructer.
- *
- * Create instances of the used {@link aCssParserPlugin plugins}.
- *
- * @param string $source CSS source [optional]
- * @param array $plugins Plugin configuration [optional]
- * @return void
- */
- public function __construct($source = null, array $plugins = null)
- {
- $plugins = array_merge(array
- (
- "Comment" => true,
- "String" => true,
- "Url" => true,
- "Expression" => true,
- "Ruleset" => true,
- "AtCharset" => true,
- "AtFontFace" => true,
- "AtImport" => true,
- "AtKeyframes" => true,
- "AtMedia" => true,
- "AtPage" => true,
- "AtVariables" => true
- ), is_array($plugins) ? $plugins : array());
- // Create plugin instances
- foreach ($plugins as $name => $config)
- {
- if ($config !== false)
- {
- $class = "Css" . $name . "ParserPlugin";
- $config = is_array($config) ? $config : array();
- if (class_exists($class))
- {
- $this->plugins[] = new $class($this, $config);
- }
- else
- {
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin " . $name . "
with the class name " . $class . "
was not found"));
- }
- }
- }
- if (!is_null($source))
- {
- $this->parse($source);
- }
- }
- /**
- * Append a token to the array of tokens.
- *
- * @param aCssToken $token Token to append
- * @return void
- */
- public function appendToken(aCssToken $token)
- {
- $this->tokens[] = $token;
- }
- /**
- * Clears the current buffer.
- *
- * @return void
- */
- public function clearBuffer()
- {
- $this->buffer = "";
- }
- /**
- * Returns and clear the current buffer.
- *
- * @param string $trim Chars to use to trim the returned buffer
- * @param boolean $tolower if TRUE the returned buffer will get converted to lower case
- * @return string
- */
- public function getAndClearBuffer($trim = "", $tolower = false)
- {
- $r = $this->getBuffer($trim, $tolower);
- $this->buffer = "";
- return $r;
- }
- /**
- * Returns the current buffer.
- *
- * @param string $trim Chars to use to trim the returned buffer
- * @param boolean $tolower if TRUE the returned buffer will get converted to lower case
- * @return string
- */
- public function getBuffer($trim = "", $tolower = false)
- {
- $r = $this->buffer;
- if ($trim)
- {
- $r = trim($r, " \t\n\r\0\x0B" . $trim);
- }
- if ($tolower)
- {
- $r = strtolower($r);
- }
- return $r;
- }
- /**
- * Returns the current media types state.
- *
- * @return array
- */
- public function getMediaTypes()
- {
- return $this->stateMediaTypes;
- }
- /**
- * Returns the CSS source.
- *
- * @return string
- */
- public function getSource()
- {
- return $this->source;
- }
- /**
- * Returns the current state.
- *
- * @return integer The current state
- */
- public function getState()
- {
- return $this->state;
- }
- /**
- * Returns a plugin by class name.
- *
- * @param string $name Class name of the plugin
- * @return aCssParserPlugin
- */
- public function getPlugin($class)
- {
- static $index = null;
- if (is_null($index))
- {
- $index = array();
- for ($i = 0, $l = count($this->plugins); $i < $l; $i++)
- {
- $index[get_class($this->plugins[$i])] = $i;
- }
- }
- return isset($index[$class]) ? $this->plugins[$index[$class]] : false;
- }
- /**
- * Returns the parsed tokens.
- *
- * @return array
- */
- public function getTokens()
- {
- return $this->tokens;
- }
- /**
- * Returns if the current state equals the passed state.
- *
- * @param integer $state State to compare with the current state
- * @return boolean TRUE is the state equals to the passed state; FALSE if not
- */
- public function isState($state)
- {
- return ($this->state == $state);
- }
- /**
- * Parse the CSS source and return a array with parsed tokens.
- *
- * @param string $source CSS source
- * @return array Array with tokens
- */
- public function parse($source)
- {
- // Reset
- $this->source = "";
- $this->tokens = array();
- // Create a global and plugin lookup table for trigger chars; set array of plugins as local variable and create
- // several helper variables for plugin handling
- $globalTriggerChars = "";
- $plugins = $this->plugins;
- $pluginCount = count($plugins);
- $pluginIndex = array();
- $pluginTriggerStates = array();
- $pluginTriggerChars = array();
- for ($i = 0, $l = count($plugins); $i < $l; $i++)
- {
- $tPluginClassName = get_class($plugins[$i]);
- $pluginTriggerChars[$i] = implode("", $plugins[$i]->getTriggerChars());
- $tPluginTriggerStates = $plugins[$i]->getTriggerStates();
- $pluginTriggerStates[$i] = $tPluginTriggerStates === false ? false : "|" . implode("|", $tPluginTriggerStates) . "|";
- $pluginIndex[$tPluginClassName] = $i;
- for ($ii = 0, $ll = strlen($pluginTriggerChars[$i]); $ii < $ll; $ii++)
- {
- $c = substr($pluginTriggerChars[$i], $ii, 1);
- if (strpos($globalTriggerChars, $c) === false)
- {
- $globalTriggerChars .= $c;
- }
- }
- }
- // Normalise line endings
- $source = str_replace("\r\n", "\n", $source); // Windows to Unix line endings
- $source = str_replace("\r", "\n", $source); // Mac to Unix line endings
- $this->source = $source;
- // Variables
- $buffer = &$this->buffer;
- $exclusive = &$this->stateExclusive;
- $state = &$this->state;
- $c = $p = null;
- // --
- for ($i = 0, $l = strlen($source); $i < $l; $i++)
- {
- // Set the current Char
- $c = $source[$i]; // Is faster than: $c = substr($source, $i, 1);
- // Normalize and filter double whitespace characters
- if ($exclusive === false)
- {
- if ($c === "\n" || $c === "\t")
- {
- $c = " ";
- }
- if ($c === " " && $p === " ")
- {
- continue;
- }
- }
- $buffer .= $c;
-
- // Fix case when value of url() contains parentheses, for example: url("data: ... ()")
- if ($this->getState() == 'T_URL' && $c == ')') {
- $trimmedBuffer = trim($buffer);
- if (preg_match('@url\((\s+)?".+@', $trimmedBuffer)
- && !preg_match('@url\((\s+)?".+"\)@', $trimmedBuffer)
- || preg_match('@url\((\s+)?\'.+@', $trimmedBuffer)
- && !preg_match('@url\((\s+)?\'.+\'\)@', $trimmedBuffer)
- ) {
- $p = $c; // Set the parent char
- continue;
- }
- }
-
- // Extended processing only if the current char is a global trigger char
- if (strpos($globalTriggerChars, $c) !== false)
- {
- // Exclusive state is set; process with the exclusive plugin
- if ($exclusive)
- {
- $tPluginIndex = $pluginIndex[$exclusive];
- if (strpos($pluginTriggerChars[$tPluginIndex], $c) !== false && ($pluginTriggerStates[$tPluginIndex] === false || strpos($pluginTriggerStates[$tPluginIndex], $state) !== false))
- {
- $r = $plugins[$tPluginIndex]->parse($i, $c, $p, $state);
- // Return value is TRUE => continue with next char
- if ($r === true)
- {
- continue;
- }
- // Return value is numeric => set new index and continue with next char
- elseif ($r !== false && $r != $i)
- {
- $i = $r;
- continue;
- }
- }
- }
- // Else iterate through the plugins
- else
- {
- $triggerState = "|" . $state . "|";
- for ($ii = 0, $ll = $pluginCount; $ii < $ll; $ii++)
- {
- // Only process if the current char is one of the plugin trigger chars
- if (strpos($pluginTriggerChars[$ii], $c) !== false && ($pluginTriggerStates[$ii] === false || strpos($pluginTriggerStates[$ii], $triggerState) !== false))
- {
- // Process with the plugin
- $r = $plugins[$ii]->parse($i, $c, $p, $state);
- // Return value is TRUE => break the plugin loop and and continue with next char
- if ($r === true)
- {
- break;
- }
- // Return value is numeric => set new index, break the plugin loop and and continue with next char
- elseif ($r !== false && $r != $i)
- {
- $i = $r;
- break;
- }
- }
- }
- }
- }
- $p = $c; // Set the parent char
- }
- return $this->tokens;
- }
- /**
- * Remove the last state of the state stack and return the removed stack value.
- *
- * @return integer Removed state value
- */
- public function popState()
- {
- $r = array_pop($this->states);
- $this->state = $this->states[count($this->states) - 1];
- return $r;
- }
- /**
- * Adds a new state onto the state stack.
- *
- * @param integer $state State to add onto the state stack.
- * @return integer The index of the added state in the state stacks
- */
- public function pushState($state)
- {
- $r = array_push($this->states, $state);
- $this->state = $this->states[count($this->states) - 1];
- return $r;
- }
- /**
- * Sets/restores the buffer.
- *
- * @param string $buffer Buffer to set
- * @return void
- */
- public function setBuffer($buffer)
- {
- $this->buffer = $buffer;
- }
- /**
- * Set the exclusive state.
- *
- * @param string $exclusive Exclusive state
- * @return void
- */
- public function setExclusive($exclusive)
- {
- $this->stateExclusive = $exclusive;
- }
- /**
- * Set the media types state.
- *
- * @param array $mediaTypes Media types state
- * @return void
- */
- public function setMediaTypes(array $mediaTypes)
- {
- $this->stateMediaTypes = $mediaTypes;
- }
- /**
- * Sets the current state in the state stack; equals to {@link CssParser::popState()} + {@link CssParser::pushState()}.
- *
- * @param integer $state State to set
- * @return integer
- */
- public function setState($state)
- {
- $r = array_pop($this->states);
- array_push($this->states, $state);
- $this->state = $this->states[count($this->states) - 1];
- return $r;
- }
- /**
- * Removes the exclusive state.
- *
- * @return void
- */
- public function unsetExclusive()
- {
- $this->stateExclusive = false;
- }
- /**
- * Removes the media types state.
- *
- * @return void
- */
- public function unsetMediaTypes()
- {
- $this->stateMediaTypes = false;
- }
+ /**
+ * Parse buffer.
+ *
+ * @var string
+ */
+ private $buffer = "";
+ /**
+ * {@link aCssParserPlugin Plugins}.
+ *
+ * @var array
+ */
+ private $plugins = array();
+ /**
+ * Source to parse.
+ *
+ * @var string
+ */
+ private $source = "";
+ /**
+ * Current state.
+ *
+ * @var integer
+ */
+ private $state = "T_DOCUMENT";
+ /**
+ * Exclusive state.
+ *
+ * @var string
+ */
+ private $stateExclusive = FALSE;
+ /**
+ * Media types state.
+ *
+ * @var mixed
+ */
+ private $stateMediaTypes = FALSE;
+ /**
+ * State stack.
+ *
+ * @var array
+ */
+ private $states = array("T_DOCUMENT");
+ /**
+ * Parsed tokens.
+ *
+ * @var array
+ */
+ private $tokens = array();
+
+ /**
+ * Constructer.
+ *
+ * Create instances of the used {@link aCssParserPlugin plugins}.
+ *
+ * @param string $source CSS source [optional]
+ * @param array $plugins Plugin configuration [optional]
+ * @return void
+ */
+ public function __construct($source = NULL, array $plugins = NULL) {
+ $plugins = array_merge(array
+ (
+ "Comment" => TRUE,
+ "String" => TRUE,
+ "Url" => TRUE,
+ "Expression" => TRUE,
+ "Ruleset" => TRUE,
+ "AtCharset" => TRUE,
+ "AtFontFace" => TRUE,
+ "AtImport" => TRUE,
+ "AtKeyframes" => TRUE,
+ "AtMedia" => TRUE,
+ "AtPage" => TRUE,
+ "AtVariables" => TRUE
+ ), is_array($plugins) ? $plugins : array());
+ // Create plugin instances
+ foreach ($plugins as $name => $config) {
+ if ($config !== FALSE) {
+ $class = "Css" . $name . "ParserPlugin";
+ $config = is_array($config) ? $config : array();
+ if (class_exists($class)) {
+ $this->plugins[] = new $class($this, $config);
+ } else {
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin " . $name . "
with the class name " . $class . "
was not found"));
+ }
+ }
+ }
+ if (!is_null($source)) {
+ $this->parse($source);
+ }
+ }
+
+ /**
+ * Append a token to the array of tokens.
+ *
+ * @param aCssToken $token Token to append
+ * @return void
+ */
+ public function appendToken(aCssToken $token) {
+ $this->tokens[] = $token;
+ }
+
+ /**
+ * Clears the current buffer.
+ *
+ * @return void
+ */
+ public function clearBuffer() {
+ $this->buffer = "";
+ }
+
+ /**
+ * Returns and clear the current buffer.
+ *
+ * @param string $trim Chars to use to trim the returned buffer
+ * @param boolean $tolower if TRUE the returned buffer will get converted to lower case
+ * @return string
+ */
+ public function getAndClearBuffer($trim = "", $tolower = FALSE) {
+ $r = $this->getBuffer($trim, $tolower);
+ $this->buffer = "";
+ return $r;
+ }
+
+ /**
+ * Returns the current buffer.
+ *
+ * @param string $trim Chars to use to trim the returned buffer
+ * @param boolean $tolower if TRUE the returned buffer will get converted to lower case
+ * @return string
+ */
+ public function getBuffer($trim = "", $tolower = FALSE) {
+ $r = $this->buffer;
+ if ($trim) {
+ $r = trim($r, " \t\n\r\0\x0B" . $trim);
+ }
+ if ($tolower) {
+ $r = strtolower($r);
+ }
+ return $r;
+ }
+
+ /**
+ * Returns the current media types state.
+ *
+ * @return array
+ */
+ public function getMediaTypes() {
+ return $this->stateMediaTypes;
+ }
+
+ /**
+ * Returns the CSS source.
+ *
+ * @return string
+ */
+ public function getSource() {
+ return $this->source;
+ }
+
+ /**
+ * Returns the current state.
+ *
+ * @return integer The current state
+ */
+ public function getState() {
+ return $this->state;
+ }
+
+ /**
+ * Returns a plugin by class name.
+ *
+ * @param string $name Class name of the plugin
+ * @return aCssParserPlugin
+ */
+ public function getPlugin($class) {
+ static $index = NULL;
+ if (is_null($index)) {
+ $index = array();
+ for ($i = 0, $l = count($this->plugins); $i < $l; $i++) {
+ $index[get_class($this->plugins[$i])] = $i;
+ }
+ }
+ return isset($index[$class]) ? $this->plugins[$index[$class]] : FALSE;
+ }
+
+ /**
+ * Returns the parsed tokens.
+ *
+ * @return array
+ */
+ public function getTokens() {
+ return $this->tokens;
+ }
+
+ /**
+ * Returns if the current state equals the passed state.
+ *
+ * @param integer $state State to compare with the current state
+ * @return boolean TRUE is the state equals to the passed state; FALSE if not
+ */
+ public function isState($state) {
+ return ($this->state == $state);
+ }
+
+ /**
+ * Parse the CSS source and return a array with parsed tokens.
+ *
+ * @param string $source CSS source
+ * @return array Array with tokens
+ */
+ public function parse($source) {
+ // Reset
+ $this->source = "";
+ $this->tokens = array();
+ // Create a global and plugin lookup table for trigger chars; set array of plugins as local variable and create
+ // several helper variables for plugin handling
+ $globalTriggerChars = "";
+ $plugins = $this->plugins;
+ $pluginCount = count($plugins);
+ $pluginIndex = array();
+ $pluginTriggerStates = array();
+ $pluginTriggerChars = array();
+ for ($i = 0, $l = count($plugins); $i < $l; $i++) {
+ $tPluginClassName = get_class($plugins[$i]);
+ $pluginTriggerChars[$i] = implode("", $plugins[$i]->getTriggerChars());
+ $tPluginTriggerStates = $plugins[$i]->getTriggerStates();
+ $pluginTriggerStates[$i] = $tPluginTriggerStates === FALSE ? FALSE : "|" . implode("|", $tPluginTriggerStates) . "|";
+ $pluginIndex[$tPluginClassName] = $i;
+ for ($ii = 0, $ll = strlen($pluginTriggerChars[$i]); $ii < $ll; $ii++) {
+ $c = substr($pluginTriggerChars[$i], $ii, 1);
+ if (strpos($globalTriggerChars, $c) === FALSE) {
+ $globalTriggerChars .= $c;
+ }
+ }
+ }
+ // Normalise line endings
+ $source = str_replace("\r\n", "\n", $source); // Windows to Unix line endings
+ $source = str_replace("\r", "\n", $source); // Mac to Unix line endings
+ $this->source = $source;
+ // Variables
+ $buffer = &$this->buffer;
+ $exclusive = &$this->stateExclusive;
+ $state = &$this->state;
+ $c = $p = NULL;
+ // --
+ for ($i = 0, $l = strlen($source); $i < $l; $i++) {
+ // Set the current Char
+ $c = $source[$i]; // Is faster than: $c = substr($source, $i, 1);
+ // Normalize and filter double whitespace characters
+ if ($exclusive === FALSE) {
+ if ($c === "\n" || $c === "\t") {
+ $c = " ";
+ }
+ if ($c === " " && $p === " ") {
+ continue;
+ }
+ }
+ $buffer .= $c;
+
+ // Fix case when value of url() contains parentheses, for example: url("data: ... ()")
+ if ($this->getState() == 'T_URL' && $c == ')') {
+ $trimmedBuffer = trim($buffer);
+ if (preg_match('@url\((\s+)?".+@', $trimmedBuffer)
+ && !preg_match('@url\((\s+)?".+"\)@', $trimmedBuffer)
+ || preg_match('@url\((\s+)?\'.+@', $trimmedBuffer)
+ && !preg_match('@url\((\s+)?\'.+\'\)@', $trimmedBuffer)
+ ) {
+ $p = $c; // Set the parent char
+ continue;
+ }
+ }
+
+ // Extended processing only if the current char is a global trigger char
+ if (strpos($globalTriggerChars, $c) !== FALSE) {
+ // Exclusive state is set; process with the exclusive plugin
+ if ($exclusive) {
+ $tPluginIndex = $pluginIndex[$exclusive];
+ if (strpos($pluginTriggerChars[$tPluginIndex], $c) !== FALSE && ($pluginTriggerStates[$tPluginIndex] === FALSE || strpos($pluginTriggerStates[$tPluginIndex], $state) !== FALSE)) {
+ $r = $plugins[$tPluginIndex]->parse($i, $c, $p, $state);
+ // Return value is TRUE => continue with next char
+ if ($r === TRUE) {
+ continue;
+ } // Return value is numeric => set new index and continue with next char
+ else if ($r !== FALSE && $r != $i) {
+ $i = $r;
+ continue;
+ }
+ }
+ } // Else iterate through the plugins
+ else {
+ $triggerState = "|" . $state . "|";
+ for ($ii = 0, $ll = $pluginCount; $ii < $ll; $ii++) {
+ // Only process if the current char is one of the plugin trigger chars
+ if (strpos($pluginTriggerChars[$ii], $c) !== FALSE && ($pluginTriggerStates[$ii] === FALSE || strpos($pluginTriggerStates[$ii], $triggerState) !== FALSE)) {
+ // Process with the plugin
+ $r = $plugins[$ii]->parse($i, $c, $p, $state);
+ // Return value is TRUE => break the plugin loop and and continue with next char
+ if ($r === TRUE) {
+ break;
+ } // Return value is numeric => set new index, break the plugin loop and and continue with next char
+ else if ($r !== FALSE && $r != $i) {
+ $i = $r;
+ break;
+ }
+ }
+ }
+ }
+ }
+ $p = $c; // Set the parent char
+ }
+ return $this->tokens;
+ }
+
+ /**
+ * Remove the last state of the state stack and return the removed stack value.
+ *
+ * @return integer Removed state value
+ */
+ public function popState() {
+ $r = array_pop($this->states);
+ $this->state = $this->states[count($this->states) - 1];
+ return $r;
+ }
+
+ /**
+ * Adds a new state onto the state stack.
+ *
+ * @param integer $state State to add onto the state stack.
+ * @return integer The index of the added state in the state stacks
+ */
+ public function pushState($state) {
+ $r = array_push($this->states, $state);
+ $this->state = $this->states[count($this->states) - 1];
+ return $r;
+ }
+
+ /**
+ * Sets/restores the buffer.
+ *
+ * @param string $buffer Buffer to set
+ * @return void
+ */
+ public function setBuffer($buffer) {
+ $this->buffer = $buffer;
+ }
+
+ /**
+ * Set the exclusive state.
+ *
+ * @param string $exclusive Exclusive state
+ * @return void
+ */
+ public function setExclusive($exclusive) {
+ $this->stateExclusive = $exclusive;
+ }
+
+ /**
+ * Set the media types state.
+ *
+ * @param array $mediaTypes Media types state
+ * @return void
+ */
+ public function setMediaTypes(array $mediaTypes) {
+ $this->stateMediaTypes = $mediaTypes;
+ }
+
+ /**
+ * Sets the current state in the state stack; equals to {@link CssParser::popState()} + {@link CssParser::pushState()}.
+ *
+ * @param integer $state State to set
+ * @return integer
+ */
+ public function setState($state) {
+ $r = array_pop($this->states);
+ array_push($this->states, $state);
+ $this->state = $this->states[count($this->states) - 1];
+ return $r;
+ }
+
+ /**
+ * Removes the exclusive state.
+ *
+ * @return void
+ */
+ public function unsetExclusive() {
+ $this->stateExclusive = FALSE;
+ }
+
+ /**
+ * Removes the media types state.
+ *
+ * @return void
+ */
+ public function unsetMediaTypes() {
+ $this->stateMediaTypes = FALSE;
+ }
}
/**
* {@link aCssFromatter Formatter} returning the CSS source in {@link http://goo.gl/j4XdU OTBS indent style} (The One True Brace Style).
*
- * @package CssMin/Formatter
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Formatter
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssOtbsFormatter extends aCssFormatter
{
- /**
- * Implements {@link aCssFormatter::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- $r = array();
- $level = 0;
- for ($i = 0, $l = count($this->tokens); $i < $l; $i++)
- {
- $token = $this->tokens[$i];
- $class = get_class($token);
- $indent = str_repeat($this->indent, $level);
- if ($class === "CssCommentToken")
- {
- $lines = array_map("trim", explode("\n", $token->Comment));
- for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++)
- {
- $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii];
- }
- }
- elseif ($class === "CssAtCharsetToken")
- {
- $r[] = $indent . "@charset " . $token->Charset . ";";
- }
- elseif ($class === "CssAtFontFaceStartToken")
- {
- $r[] = $indent . "@font-face {";
- $level++;
- }
- elseif ($class === "CssAtImportToken")
- {
- $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";";
- }
- elseif ($class === "CssAtKeyframesStartToken")
- {
- $r[] = $indent . "@keyframes " . $token->Name . " {";
- $level++;
- }
- elseif ($class === "CssAtMediaStartToken")
- {
- $r[] = $indent . "@media " . implode(", ", $token->MediaTypes) . " {";
- $level++;
- }
- elseif ($class === "CssAtPageStartToken")
- {
- $r[] = $indent . "@page {";
- $level++;
- }
- elseif ($class === "CssAtVariablesStartToken")
- {
- $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes) . " {";
- $level++;
- }
- elseif ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken")
- {
- $r[] = $indent . implode(", ", $token->Selectors) . " {";
- $level++;
- }
- elseif ($class === "CssAtFontFaceDeclarationToken"
- || $class === "CssAtKeyframesRulesetDeclarationToken"
- || $class === "CssAtPageDeclarationToken"
- || $class === "CssAtVariablesDeclarationToken"
- || $class === "CssRulesetDeclarationToken"
- )
- {
- $declaration = $indent . $token->Property . ": ";
- if ($this->padding)
- {
- $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT);
- }
- $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";";
- }
- elseif ($class === "CssAtFontFaceEndToken"
- || $class === "CssAtMediaEndToken"
- || $class === "CssAtKeyframesEndToken"
- || $class === "CssAtKeyframesRulesetEndToken"
- || $class === "CssAtPageEndToken"
- || $class === "CssAtVariablesEndToken"
- || $class === "CssRulesetEndToken"
- )
- {
- $level--;
- $r[] = str_repeat($indent, $level) . "}";
- }
- }
- return implode("\n", $r);
- }
+ /**
+ * Implements {@link aCssFormatter::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ $r = array();
+ $level = 0;
+ for ($i = 0, $l = count($this->tokens); $i < $l; $i++) {
+ $token = $this->tokens[$i];
+ $class = get_class($token);
+ $indent = str_repeat($this->indent, $level);
+ if ($class === "CssCommentToken") {
+ $lines = array_map("trim", explode("\n", $token->Comment));
+ for ($ii = 0, $ll = count($lines); $ii < $ll; $ii++) {
+ $r[] = $indent . (substr($lines[$ii], 0, 1) == "*" ? " " : "") . $lines[$ii];
+ }
+ } else if ($class === "CssAtCharsetToken") {
+ $r[] = $indent . "@charset " . $token->Charset . ";";
+ } else if ($class === "CssAtFontFaceStartToken") {
+ $r[] = $indent . "@font-face {";
+ $level++;
+ } else if ($class === "CssAtImportToken") {
+ $r[] = $indent . "@import " . $token->Import . " " . implode(", ", $token->MediaTypes) . ";";
+ } else if ($class === "CssAtKeyframesStartToken") {
+ $r[] = $indent . "@keyframes " . $token->Name . " {";
+ $level++;
+ } else if ($class === "CssAtMediaStartToken") {
+ $r[] = $indent . "@media " . implode(", ", $token->MediaTypes) . " {";
+ $level++;
+ } else if ($class === "CssAtPageStartToken") {
+ $r[] = $indent . "@page {";
+ $level++;
+ } else if ($class === "CssAtVariablesStartToken") {
+ $r[] = $indent . "@variables " . implode(", ", $token->MediaTypes) . " {";
+ $level++;
+ } else if ($class === "CssRulesetStartToken" || $class === "CssAtKeyframesRulesetStartToken") {
+ $r[] = $indent . implode(", ", $token->Selectors) . " {";
+ $level++;
+ } else if ($class === "CssAtFontFaceDeclarationToken"
+ || $class === "CssAtKeyframesRulesetDeclarationToken"
+ || $class === "CssAtPageDeclarationToken"
+ || $class === "CssAtVariablesDeclarationToken"
+ || $class === "CssRulesetDeclarationToken"
+ ) {
+ $declaration = $indent . $token->Property . ": ";
+ if ($this->padding) {
+ $declaration = str_pad($declaration, $this->padding, " ", STR_PAD_RIGHT);
+ }
+ $r[] = $declaration . $token->Value . ($token->IsImportant ? " !important" : "") . ";";
+ } else if ($class === "CssAtFontFaceEndToken"
+ || $class === "CssAtMediaEndToken"
+ || $class === "CssAtKeyframesEndToken"
+ || $class === "CssAtKeyframesRulesetEndToken"
+ || $class === "CssAtPageEndToken"
+ || $class === "CssAtVariablesEndToken"
+ || $class === "CssRulesetEndToken"
+ ) {
+ $level--;
+ $r[] = str_repeat($indent, $level) . "}";
+ }
+ }
+ return implode("\n", $r);
+ }
}
/**
* This {@link aCssToken CSS token} is a utility token that extends {@link aNullToken} and returns only a empty string.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssNullToken extends aCssToken
{
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "";
- }
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "";
+ }
}
/**
* CSS Minifier.
*
- * @package CssMin/Minifier
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssMinifier
{
- /**
- * {@link aCssMinifierFilter Filters}.
- *
- * @var array
- */
- private $filters = array();
- /**
- * {@link aCssMinifierPlugin Plugins}.
- *
- * @var array
- */
- private $plugins = array();
- /**
- * Minified source.
- *
- * @var string
- */
- private $minified = "";
- /**
- * Constructer.
- *
- * Creates instances of {@link aCssMinifierFilter filters} and {@link aCssMinifierPlugin plugins}.
- *
- * @param string $source CSS source [optional]
- * @param array $filters Filter configuration [optional]
- * @param array $plugins Plugin configuration [optional]
- * @return void
- */
- public function __construct($source = null, array $filters = null, array $plugins = null)
- {
- $filters = array_merge(array
- (
- "ImportImports" => false,
- "RemoveComments" => true,
- "RemoveEmptyRulesets" => true,
- "RemoveEmptyAtBlocks" => true,
- "ConvertLevel3Properties" => false,
- "ConvertLevel3AtKeyframes" => false,
- "Variables" => true,
- "RemoveLastDelarationSemiColon" => true
- ), is_array($filters) ? $filters : array());
- $plugins = array_merge(array
- (
- "Variables" => true,
- "ConvertFontWeight" => false,
- "ConvertHslColors" => false,
- "ConvertRgbColors" => false,
- "ConvertNamedColors" => false,
- "CompressColorValues" => false,
- "CompressUnitValues" => false,
- "CompressExpressionValues" => false
- ), is_array($plugins) ? $plugins : array());
- // Filters
- foreach ($filters as $name => $config)
- {
- if ($config !== false)
- {
- $class = "Css" . $name . "MinifierFilter";
- $config = is_array($config) ? $config : array();
- if (class_exists($class))
- {
- $this->filters[] = new $class($this, $config);
- }
- else
- {
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The filter " . $name . "
with the class name " . $class . "
was not found"));
- }
- }
- }
- // Plugins
- foreach ($plugins as $name => $config)
- {
- if ($config !== false)
- {
- $class = "Css" . $name . "MinifierPlugin";
- $config = is_array($config) ? $config : array();
- if (class_exists($class))
- {
- $this->plugins[] = new $class($this, $config);
- }
- else
- {
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin " . $name . "
with the class name " . $class . "
was not found"));
- }
- }
- }
- // --
- if (!is_null($source))
- {
- $this->minify($source);
- }
- }
- /**
- * Returns the minified Source.
- *
- * @return string
- */
- public function getMinified()
- {
- return $this->minified;
- }
- /**
- * Returns a plugin by class name.
- *
- * @param string $name Class name of the plugin
- * @return aCssMinifierPlugin
- */
- public function getPlugin($class)
- {
- static $index = null;
- if (is_null($index))
- {
- $index = array();
- for ($i = 0, $l = count($this->plugins); $i < $l; $i++)
- {
- $index[get_class($this->plugins[$i])] = $i;
- }
- }
- return isset($index[$class]) ? $this->plugins[$index[$class]] : false;
- }
- /**
- * Minifies the CSS source.
- *
- * @param string $source CSS source
- * @return string
- */
- public function minify($source)
- {
- // Variables
- $r = "";
- $parser = new CssParser($source);
- $tokens = $parser->getTokens();
- $filters = $this->filters;
- $filterCount = count($this->filters);
- $plugins = $this->plugins;
- $pluginCount = count($plugins);
- $pluginIndex = array();
- $pluginTriggerTokens = array();
- $globalTriggerTokens = array();
- for ($i = 0, $l = count($plugins); $i < $l; $i++)
- {
- $tPluginClassName = get_class($plugins[$i]);
- $pluginTriggerTokens[$i] = $plugins[$i]->getTriggerTokens();
- foreach ($pluginTriggerTokens[$i] as $v)
- {
- if (!in_array($v, $globalTriggerTokens))
- {
- $globalTriggerTokens[] = $v;
- }
- }
- $pluginTriggerTokens[$i] = "|" . implode("|", $pluginTriggerTokens[$i]) . "|";
- $pluginIndex[$tPluginClassName] = $i;
- }
- $globalTriggerTokens = "|" . implode("|", $globalTriggerTokens) . "|";
- /*
+ /**
+ * {@link aCssMinifierFilter Filters}.
+ *
+ * @var array
+ */
+ private $filters = array();
+ /**
+ * {@link aCssMinifierPlugin Plugins}.
+ *
+ * @var array
+ */
+ private $plugins = array();
+ /**
+ * Minified source.
+ *
+ * @var string
+ */
+ private $minified = "";
+
+ /**
+ * Constructer.
+ *
+ * Creates instances of {@link aCssMinifierFilter filters} and {@link aCssMinifierPlugin plugins}.
+ *
+ * @param string $source CSS source [optional]
+ * @param array $filters Filter configuration [optional]
+ * @param array $plugins Plugin configuration [optional]
+ * @return void
+ */
+ public function __construct($source = NULL, array $filters = NULL, array $plugins = NULL) {
+ $filters = array_merge(array
+ (
+ "ImportImports" => FALSE,
+ "RemoveComments" => TRUE,
+ "RemoveEmptyRulesets" => TRUE,
+ "RemoveEmptyAtBlocks" => TRUE,
+ "ConvertLevel3Properties" => FALSE,
+ "ConvertLevel3AtKeyframes" => FALSE,
+ "Variables" => TRUE,
+ "RemoveLastDelarationSemiColon" => TRUE
+ ), is_array($filters) ? $filters : array());
+ $plugins = array_merge(array
+ (
+ "Variables" => TRUE,
+ "ConvertFontWeight" => FALSE,
+ "ConvertHslColors" => FALSE,
+ "ConvertRgbColors" => FALSE,
+ "ConvertNamedColors" => FALSE,
+ "CompressColorValues" => FALSE,
+ "CompressUnitValues" => FALSE,
+ "CompressExpressionValues" => FALSE
+ ), is_array($plugins) ? $plugins : array());
+ // Filters
+ foreach ($filters as $name => $config) {
+ if ($config !== FALSE) {
+ $class = "Css" . $name . "MinifierFilter";
+ $config = is_array($config) ? $config : array();
+ if (class_exists($class)) {
+ $this->filters[] = new $class($this, $config);
+ } else {
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The filter " . $name . "
with the class name " . $class . "
was not found"));
+ }
+ }
+ }
+ // Plugins
+ foreach ($plugins as $name => $config) {
+ if ($config !== FALSE) {
+ $class = "Css" . $name . "MinifierPlugin";
+ $config = is_array($config) ? $config : array();
+ if (class_exists($class)) {
+ $this->plugins[] = new $class($this, $config);
+ } else {
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": The plugin " . $name . "
with the class name " . $class . "
was not found"));
+ }
+ }
+ }
+ // --
+ if (!is_null($source)) {
+ $this->minify($source);
+ }
+ }
+
+ /**
+ * Returns the minified Source.
+ *
+ * @return string
+ */
+ public function getMinified() {
+ return $this->minified;
+ }
+
+ /**
+ * Returns a plugin by class name.
+ *
+ * @param string $name Class name of the plugin
+ * @return aCssMinifierPlugin
+ */
+ public function getPlugin($class) {
+ static $index = NULL;
+ if (is_null($index)) {
+ $index = array();
+ for ($i = 0, $l = count($this->plugins); $i < $l; $i++) {
+ $index[get_class($this->plugins[$i])] = $i;
+ }
+ }
+ return isset($index[$class]) ? $this->plugins[$index[$class]] : FALSE;
+ }
+
+ /**
+ * Minifies the CSS source.
+ *
+ * @param string $source CSS source
+ * @return string
+ */
+ public function minify($source) {
+ // Variables
+ $r = "";
+ $parser = new CssParser($source);
+ $tokens = $parser->getTokens();
+ $filters = $this->filters;
+ $filterCount = count($this->filters);
+ $plugins = $this->plugins;
+ $pluginCount = count($plugins);
+ $pluginIndex = array();
+ $pluginTriggerTokens = array();
+ $globalTriggerTokens = array();
+ for ($i = 0, $l = count($plugins); $i < $l; $i++) {
+ $tPluginClassName = get_class($plugins[$i]);
+ $pluginTriggerTokens[$i] = $plugins[$i]->getTriggerTokens();
+ foreach ($pluginTriggerTokens[$i] as $v) {
+ if (!in_array($v, $globalTriggerTokens)) {
+ $globalTriggerTokens[] = $v;
+ }
+ }
+ $pluginTriggerTokens[$i] = "|" . implode("|", $pluginTriggerTokens[$i]) . "|";
+ $pluginIndex[$tPluginClassName] = $i;
+ }
+ $globalTriggerTokens = "|" . implode("|", $globalTriggerTokens) . "|";
+ /*
* Apply filters
*/
- for($i = 0; $i < $filterCount; $i++)
- {
- // Apply the filter; if the return value is larger than 0...
- if ($filters[$i]->apply($tokens) > 0)
- {
- // ...then filter null values and rebuild the token array
- $tokens = array_values(array_filter($tokens));
- }
- }
- $tokenCount = count($tokens);
- /*
+ for ($i = 0; $i < $filterCount; $i++) {
+ // Apply the filter; if the return value is larger than 0...
+ if ($filters[$i]->apply($tokens) > 0) {
+ // ...then filter null values and rebuild the token array
+ $tokens = array_values(array_filter($tokens));
+ }
+ }
+ $tokenCount = count($tokens);
+ /*
* Apply plugins
*/
- for($i = 0; $i < $tokenCount; $i++)
- {
- $triggerToken = "|" . get_class($tokens[$i]) . "|";
- if (strpos($globalTriggerTokens, $triggerToken) !== false)
- {
- for($ii = 0; $ii < $pluginCount; $ii++)
- {
- if (strpos($pluginTriggerTokens[$ii], $triggerToken) !== false || $pluginTriggerTokens[$ii] === false)
- {
- // Apply the plugin; if the return value is TRUE continue to the next token
- if ($plugins[$ii]->apply($tokens[$i]) === true)
- {
- continue 2;
- }
- }
- }
- }
- }
- // Stringify the tokens
- for($i = 0; $i < $tokenCount; $i++)
- {
- $r .= (string) $tokens[$i];
- }
- $this->minified = $r;
- return $r;
- }
+ for ($i = 0; $i < $tokenCount; $i++) {
+ $triggerToken = "|" . get_class($tokens[$i]) . "|";
+ if (strpos($globalTriggerTokens, $triggerToken) !== FALSE) {
+ for ($ii = 0; $ii < $pluginCount; $ii++) {
+ if (strpos($pluginTriggerTokens[$ii], $triggerToken) !== FALSE || $pluginTriggerTokens[$ii] === FALSE) {
+ // Apply the plugin; if the return value is TRUE continue to the next token
+ if ($plugins[$ii]->apply($tokens[$i]) === TRUE) {
+ continue 2;
+ }
+ }
+ }
+ }
+ }
+ // Stringify the tokens
+ for ($i = 0; $i < $tokenCount; $i++) {
+ $r .= (string)$tokens[$i];
+ }
+ $this->minified = $r;
+ return $r;
+ }
}
/**
@@ -2176,166 +2000,155 @@ class CssMinifier
* THE SOFTWARE.
* --
*
- * @package CssMin
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssMin
{
- /**
- * Index of classes
- *
- * @var array
- */
- private static $classIndex = array();
- /**
- * Parse/minify errors
- *
- * @var array
- */
- private static $errors = array();
- /**
- * Verbose output.
- *
- * @var boolean
- */
- private static $isVerbose = false;
- /**
- * {@link http://goo.gl/JrW54 Autoload} function of CssMin.
- *
- * @param string $class Name of the class
- * @return void
- */
- public static function autoload($class)
- {
- if (isset(self::$classIndex[$class]))
- {
- require(self::$classIndex[$class]);
- }
- }
- /**
- * Return errors
- *
- * @return array of {CssError}.
- */
- public static function getErrors()
- {
- return self::$errors;
- }
- /**
- * Returns if there were errors.
- *
- * @return boolean
- */
- public static function hasErrors()
- {
- return count(self::$errors) > 0;
- }
- /**
- * Initialises CssMin.
- *
- * @return void
- */
- public static function initialise()
- {
- // Create the class index for autoloading or including
- $paths = array(dirname(__FILE__));
- for ($i = 0; $i < count($paths); $i++)
- {
- $path = $paths[$i];
- $subDirectorys = glob($path . "*", GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT);
- if (is_array($subDirectorys))
- {
- foreach ($subDirectorys as $subDirectory)
- {
- $paths[] = $subDirectory;
- }
- }
- $files = glob($path . "*.php", 0);
- if (is_array($files))
- {
- foreach ($files as $file)
- {
- $class = substr(basename($file), 0, -4);
- self::$classIndex[$class] = $file;
- }
- }
- }
- krsort(self::$classIndex);
- // Only use autoloading if spl_autoload_register() is available and no __autoload() is defined (because
- // __autoload() breaks if spl_autoload_register() is used.
- if (function_exists("spl_autoload_register") && !is_callable("__autoload"))
- {
- spl_autoload_register(array(__CLASS__, "autoload"));
- }
- // Otherwise include all class files
- else
- {
- foreach (self::$classIndex as $class => $file)
- {
- if (!class_exists($class))
- {
- require_once($file);
- }
- }
- }
- }
- /**
- * Minifies CSS source.
- *
- * @param string $source CSS source
- * @param array $filters Filter configuration [optional]
- * @param array $plugins Plugin configuration [optional]
- * @return string Minified CSS
- */
- public static function minify($source, array $filters = null, array $plugins = null)
- {
- self::$errors = array();
- $minifier = new CssMinifier($source, $filters, $plugins);
- return $minifier->getMinified();
- }
- /**
- * Parse the CSS source.
- *
- * @param string $source CSS source
- * @param array $plugins Plugin configuration [optional]
- * @return array Array of aCssToken
- */
- public static function parse($source, array $plugins = null)
- {
- self::$errors = array();
- $parser = new CssParser($source, $plugins);
- return $parser->getTokens();
- }
- /**
- * --
- *
- * @param boolean $to
- * @return boolean
- */
- public static function setVerbose($to)
- {
- self::$isVerbose = (boolean) $to;
- return self::$isVerbose;
- }
- /**
- * --
- *
- * @param CssError $error
- * @return void
- */
- public static function triggerError(CssError $error)
- {
- self::$errors[] = $error;
- if (self::$isVerbose)
- {
- trigger_error((string) $error, E_USER_WARNING);
- }
- }
+ /**
+ * Index of classes
+ *
+ * @var array
+ */
+ private static $classIndex = array();
+ /**
+ * Parse/minify errors
+ *
+ * @var array
+ */
+ private static $errors = array();
+ /**
+ * Verbose output.
+ *
+ * @var boolean
+ */
+ private static $isVerbose = FALSE;
+
+ /**
+ * {@link http://goo.gl/JrW54 Autoload} function of CssMin.
+ *
+ * @param string $class Name of the class
+ * @return void
+ */
+ public static function autoload($class) {
+ if (isset(self::$classIndex[$class])) {
+ require(self::$classIndex[$class]);
+ }
+ }
+
+ /**
+ * Return errors
+ *
+ * @return array of {CssError}.
+ */
+ public static function getErrors() {
+ return self::$errors;
+ }
+
+ /**
+ * Returns if there were errors.
+ *
+ * @return boolean
+ */
+ public static function hasErrors() {
+ return count(self::$errors) > 0;
+ }
+
+ /**
+ * Initialises CssMin.
+ *
+ * @return void
+ */
+ public static function initialise() {
+ // Create the class index for autoloading or including
+ $paths = array(dirname(__FILE__));
+ for ($i = 0; $i < count($paths); $i++) {
+ $path = $paths[$i];
+ $subDirectorys = glob($path . "*", GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT);
+ if (is_array($subDirectorys)) {
+ foreach ($subDirectorys as $subDirectory) {
+ $paths[] = $subDirectory;
+ }
+ }
+ $files = glob($path . "*.php", 0);
+ if (is_array($files)) {
+ foreach ($files as $file) {
+ $class = substr(basename($file), 0, -4);
+ self::$classIndex[$class] = $file;
+ }
+ }
+ }
+ krsort(self::$classIndex);
+ // Only use autoloading if spl_autoload_register() is available and no __autoload() is defined (because
+ // __autoload() breaks if spl_autoload_register() is used.
+ if (function_exists("spl_autoload_register") && !is_callable("__autoload")) {
+ spl_autoload_register(array(__CLASS__, "autoload"));
+ } // Otherwise include all class files
+ else {
+ foreach (self::$classIndex as $class => $file) {
+ if (!class_exists($class)) {
+ require_once($file);
+ }
+ }
+ }
+ }
+
+ /**
+ * Minifies CSS source.
+ *
+ * @param string $source CSS source
+ * @param array $filters Filter configuration [optional]
+ * @param array $plugins Plugin configuration [optional]
+ * @return string Minified CSS
+ */
+ public static function minify($source, array $filters = NULL, array $plugins = NULL) {
+ self::$errors = array();
+ $minifier = new CssMinifier($source, $filters, $plugins);
+ return $minifier->getMinified();
+ }
+
+ /**
+ * Parse the CSS source.
+ *
+ * @param string $source CSS source
+ * @param array $plugins Plugin configuration [optional]
+ * @return array Array of aCssToken
+ */
+ public static function parse($source, array $plugins = NULL) {
+ self::$errors = array();
+ $parser = new CssParser($source, $plugins);
+ return $parser->getTokens();
+ }
+
+ /**
+ * --
+ *
+ * @param boolean $to
+ * @return boolean
+ */
+ public static function setVerbose($to) {
+ self::$isVerbose = (boolean)$to;
+ return self::$isVerbose;
+ }
+
+ /**
+ * --
+ *
+ * @param CssError $error
+ * @return void
+ */
+ public static function triggerError(CssError $error) {
+ self::$errors[] = $error;
+ if (self::$isVerbose) {
+ trigger_error((string)$error, E_USER_WARNING);
+ }
+ }
}
+
// Initialises CssMin
CssMin::initialise();
@@ -2343,203 +2156,164 @@ CssMin::initialise();
* This {@link aCssMinifierFilter minifier filter} import external css files defined with the @import at-rule into the
* current stylesheet.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssImportImportsMinifierFilter extends aCssMinifierFilter
{
- /**
- * Array with already imported external stylesheets.
- *
- * @var array
- */
- private $imported = array();
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- if (!isset($this->configuration["BasePath"]) || !is_dir($this->configuration["BasePath"]))
- {
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Base path " . ($this->configuration["BasePath"] ? $this->configuration["BasePath"] : "null"). "
is not a directory"));
- return 0;
- }
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- if (get_class($tokens[$i]) === "CssAtImportToken")
- {
- $import = $this->configuration["BasePath"] . "/" . $tokens[$i]->Import;
- // Import file was not found/is not a file
- if (!is_file($import))
- {
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Import file " . $import. "
was not found.", (string) $tokens[$i]));
- }
- // Import file already imported; remove this @import at-rule to prevent recursions
- elseif (in_array($import, $this->imported))
- {
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Import file " . $import. "
was already imported.", (string) $tokens[$i]));
- $tokens[$i] = null;
- }
- else
- {
- $this->imported[] = $import;
- $parser = new CssParser(file_get_contents($import));
- $import = $parser->getTokens();
- // The @import at-rule has media types defined requiring special handling
- if (count($tokens[$i]->MediaTypes) > 0 && !(count($tokens[$i]->MediaTypes) == 1 && $tokens[$i]->MediaTypes[0] == "all"))
- {
- $blocks = array();
- /*
+ /**
+ * Array with already imported external stylesheets.
+ *
+ * @var array
+ */
+ private $imported = array();
+
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ if (!isset($this->configuration["BasePath"]) || !is_dir($this->configuration["BasePath"])) {
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Base path " . ($this->configuration["BasePath"] ? $this->configuration["BasePath"] : "null") . "
is not a directory"));
+ return 0;
+ }
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ if (get_class($tokens[$i]) === "CssAtImportToken") {
+ $import = $this->configuration["BasePath"] . "/" . $tokens[$i]->Import;
+ // Import file was not found/is not a file
+ if (!is_file($import)) {
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Import file " . $import . "
was not found.", (string)$tokens[$i]));
+ } // Import file already imported; remove this @import at-rule to prevent recursions
+ else if (in_array($import, $this->imported)) {
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Import file " . $import . "
was already imported.", (string)$tokens[$i]));
+ $tokens[$i] = NULL;
+ } else {
+ $this->imported[] = $import;
+ $parser = new CssParser(file_get_contents($import));
+ $import = $parser->getTokens();
+ // The @import at-rule has media types defined requiring special handling
+ if (count($tokens[$i]->MediaTypes) > 0 && !(count($tokens[$i]->MediaTypes) == 1 && $tokens[$i]->MediaTypes[0] == "all")) {
+ $blocks = array();
+ /*
* Filter or set media types of @import at-rule or remove the @import at-rule if no media type is matching the parent @import at-rule
*/
- for($ii = 0, $ll = count($import); $ii < $ll; $ii++)
- {
- if (get_class($import[$ii]) === "CssAtImportToken")
- {
- // @import at-rule defines no media type or only the "all" media type; set the media types to the one defined in the parent @import at-rule
- if (count($import[$ii]->MediaTypes) == 0 || (count($import[$ii]->MediaTypes) == 1 && $import[$ii]->MediaTypes[0] == "all"))
- {
- $import[$ii]->MediaTypes = $tokens[$i]->MediaTypes;
- }
- // @import at-rule defineds one or more media types; filter out media types not matching with the parent @import at-rule
- elseif (count($import[$ii]->MediaTypes) > 0)
- {
- foreach ($import[$ii]->MediaTypes as $index => $mediaType)
- {
- if (!in_array($mediaType, $tokens[$i]->MediaTypes))
- {
- unset($import[$ii]->MediaTypes[$index]);
- }
- }
- $import[$ii]->MediaTypes = array_values($import[$ii]->MediaTypes);
- // If there are no media types left in the @import at-rule remove the @import at-rule
- if (count($import[$ii]->MediaTypes) == 0)
- {
- $import[$ii] = null;
- }
- }
- }
- }
- /*
+ for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) {
+ if (get_class($import[$ii]) === "CssAtImportToken") {
+ // @import at-rule defines no media type or only the "all" media type; set the media types to the one defined in the parent @import at-rule
+ if (count($import[$ii]->MediaTypes) == 0 || (count($import[$ii]->MediaTypes) == 1 && $import[$ii]->MediaTypes[0] == "all")) {
+ $import[$ii]->MediaTypes = $tokens[$i]->MediaTypes;
+ } // @import at-rule defineds one or more media types; filter out media types not matching with the parent @import at-rule
+ else if (count($import[$ii]->MediaTypes) > 0) {
+ foreach ($import[$ii]->MediaTypes as $index => $mediaType) {
+ if (!in_array($mediaType, $tokens[$i]->MediaTypes)) {
+ unset($import[$ii]->MediaTypes[$index]);
+ }
+ }
+ $import[$ii]->MediaTypes = array_values($import[$ii]->MediaTypes);
+ // If there are no media types left in the @import at-rule remove the @import at-rule
+ if (count($import[$ii]->MediaTypes) == 0) {
+ $import[$ii] = NULL;
+ }
+ }
+ }
+ }
+ /*
* Remove media types of @media at-rule block not defined in the @import at-rule
*/
- for($ii = 0, $ll = count($import); $ii < $ll; $ii++)
- {
- if (get_class($import[$ii]) === "CssAtMediaStartToken")
- {
- foreach ($import[$ii]->MediaTypes as $index => $mediaType)
- {
- if (!in_array($mediaType, $tokens[$i]->MediaTypes))
- {
- unset($import[$ii]->MediaTypes[$index]);
- }
- $import[$ii]->MediaTypes = array_values($import[$ii]->MediaTypes);
- }
- }
- }
- /*
+ for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) {
+ if (get_class($import[$ii]) === "CssAtMediaStartToken") {
+ foreach ($import[$ii]->MediaTypes as $index => $mediaType) {
+ if (!in_array($mediaType, $tokens[$i]->MediaTypes)) {
+ unset($import[$ii]->MediaTypes[$index]);
+ }
+ $import[$ii]->MediaTypes = array_values($import[$ii]->MediaTypes);
+ }
+ }
+ }
+ /*
* If no media types left of the @media at-rule block remove the complete block
*/
- for($ii = 0, $ll = count($import); $ii < $ll; $ii++)
- {
- if (get_class($import[$ii]) === "CssAtMediaStartToken")
- {
- if (count($import[$ii]->MediaTypes) === 0)
- {
- for ($iii = $ii; $iii < $ll; $iii++)
- {
- if (get_class($import[$iii]) === "CssAtMediaEndToken")
- {
- break;
- }
- }
- if (get_class($import[$iii]) === "CssAtMediaEndToken")
- {
- array_splice($import, $ii, $iii - $ii + 1, array());
- $ll = count($import);
- }
- }
- }
- }
- /*
+ for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) {
+ if (get_class($import[$ii]) === "CssAtMediaStartToken") {
+ if (count($import[$ii]->MediaTypes) === 0) {
+ for ($iii = $ii; $iii < $ll; $iii++) {
+ if (get_class($import[$iii]) === "CssAtMediaEndToken") {
+ break;
+ }
+ }
+ if (get_class($import[$iii]) === "CssAtMediaEndToken") {
+ array_splice($import, $ii, $iii - $ii + 1, array());
+ $ll = count($import);
+ }
+ }
+ }
+ }
+ /*
* If the media types of the @media at-rule equals the media types defined in the @import
* at-rule remove the CssAtMediaStartToken and CssAtMediaEndToken token
*/
- for($ii = 0, $ll = count($import); $ii < $ll; $ii++)
- {
- if (get_class($import[$ii]) === "CssAtMediaStartToken" && count(array_diff($tokens[$i]->MediaTypes, $import[$ii]->MediaTypes)) === 0)
- {
- for ($iii = $ii; $iii < $ll; $iii++)
- {
- if (get_class($import[$iii]) == "CssAtMediaEndToken")
- {
- break;
- }
- }
- if (get_class($import[$iii]) == "CssAtMediaEndToken")
- {
- unset($import[$ii]);
- unset($import[$iii]);
- $import = array_values($import);
- $ll = count($import);
- }
- }
- }
- /**
- * Extract CssAtImportToken and CssAtCharsetToken tokens
- */
- for($ii = 0, $ll = count($import); $ii < $ll; $ii++)
- {
- $class = get_class($import[$ii]);
- if ($class === "CssAtImportToken" || $class === "CssAtCharsetToken")
- {
- $blocks = array_merge($blocks, array_splice($import, $ii, 1, array()));
- $ll = count($import);
- }
- }
- /*
+ for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) {
+ if (get_class($import[$ii]) === "CssAtMediaStartToken" && count(array_diff($tokens[$i]->MediaTypes, $import[$ii]->MediaTypes)) === 0) {
+ for ($iii = $ii; $iii < $ll; $iii++) {
+ if (get_class($import[$iii]) == "CssAtMediaEndToken") {
+ break;
+ }
+ }
+ if (get_class($import[$iii]) == "CssAtMediaEndToken") {
+ unset($import[$ii]);
+ unset($import[$iii]);
+ $import = array_values($import);
+ $ll = count($import);
+ }
+ }
+ }
+ /**
+ * Extract CssAtImportToken and CssAtCharsetToken tokens
+ */
+ for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) {
+ $class = get_class($import[$ii]);
+ if ($class === "CssAtImportToken" || $class === "CssAtCharsetToken") {
+ $blocks = array_merge($blocks, array_splice($import, $ii, 1, array()));
+ $ll = count($import);
+ }
+ }
+ /*
* Extract the @font-face, @media and @page at-rule block
*/
- for($ii = 0, $ll = count($import); $ii < $ll; $ii++)
- {
- $class = get_class($import[$ii]);
- if ($class === "CssAtFontFaceStartToken" || $class === "CssAtMediaStartToken" || $class === "CssAtPageStartToken" || $class === "CssAtVariablesStartToken")
- {
- for ($iii = $ii; $iii < $ll; $iii++)
- {
- $class = get_class($import[$iii]);
- if ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken")
- {
- break;
- }
- }
- $class = get_class($import[$iii]);
- if (isset($import[$iii]) && ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken"))
- {
- $blocks = array_merge($blocks, array_splice($import, $ii, $iii - $ii + 1, array()));
- $ll = count($import);
- }
- }
- }
- // Create the import array with extracted tokens and the rulesets wrapped into a @media at-rule block
- $import = array_merge($blocks, array(new CssAtMediaStartToken($tokens[$i]->MediaTypes)), $import, array(new CssAtMediaEndToken()));
- }
- // Insert the imported tokens
- array_splice($tokens, $i, 1, $import);
- // Modify parameters of the for-loop
- $i--;
- $l = count($tokens);
- }
- }
- }
- }
+ for ($ii = 0, $ll = count($import); $ii < $ll; $ii++) {
+ $class = get_class($import[$ii]);
+ if ($class === "CssAtFontFaceStartToken" || $class === "CssAtMediaStartToken" || $class === "CssAtPageStartToken" || $class === "CssAtVariablesStartToken") {
+ for ($iii = $ii; $iii < $ll; $iii++) {
+ $class = get_class($import[$iii]);
+ if ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken") {
+ break;
+ }
+ }
+ $class = get_class($import[$iii]);
+ if (isset($import[$iii]) && ($class === "CssAtFontFaceEndToken" || $class === "CssAtMediaEndToken" || $class === "CssAtPageEndToken" || $class === "CssAtVariablesEndToken")) {
+ $blocks = array_merge($blocks, array_splice($import, $ii, $iii - $ii + 1, array()));
+ $ll = count($import);
+ }
+ }
+ }
+ // Create the import array with extracted tokens and the rulesets wrapped into a @media at-rule block
+ $import = array_merge($blocks, array(new CssAtMediaStartToken($tokens[$i]->MediaTypes)), $import, array(new CssAtMediaEndToken()));
+ }
+ // Insert the imported tokens
+ array_splice($tokens, $i, 1, $import);
+ // Modify parameters of the for-loop
+ $i--;
+ $l = count($tokens);
+ }
+ }
+ }
+ }
}
/**
@@ -2548,145 +2322,136 @@ class CssImportImportsMinifierFilter extends aCssMinifierFilter
* This plugin return no {@link aCssToken CssToken} but ensures that expression() declaration values will get parsed
* properly.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssExpressionParserPlugin extends aCssParserPlugin
{
- /**
- * Count of left braces.
- *
- * @var integer
- */
- private $leftBraces = 0;
- /**
- * Count of right braces.
- *
- * @var integer
- */
- private $rightBraces = 0;
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array("(", ")", ";", "}");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return false;
- }
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- // Start of expression
- if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 10, 11)) === "expression(" && $state !== "T_EXPRESSION")
- {
- $this->parser->pushState("T_EXPRESSION");
- $this->leftBraces++;
- }
- // Count left braces
- elseif ($char === "(" && $state === "T_EXPRESSION")
- {
- $this->leftBraces++;
- }
- // Count right braces
- elseif ($char === ")" && $state === "T_EXPRESSION")
- {
- $this->rightBraces++;
- }
- // Possible end of expression; if left and right braces are equal the expressen ends
- elseif (($char === ";" || $char === "}") && $state === "T_EXPRESSION" && $this->leftBraces === $this->rightBraces)
- {
- $this->leftBraces = $this->rightBraces = 0;
- $this->parser->popState();
- return $index - 1;
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Count of left braces.
+ *
+ * @var integer
+ */
+ private $leftBraces = 0;
+ /**
+ * Count of right braces.
+ *
+ * @var integer
+ */
+ private $rightBraces = 0;
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array("(", ")", ";", "}");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ // Start of expression
+ if ($char === "(" && strtolower(substr($this->parser->getSource(), $index - 10, 11)) === "expression(" && $state !== "T_EXPRESSION") {
+ $this->parser->pushState("T_EXPRESSION");
+ $this->leftBraces++;
+ } // Count left braces
+ else if ($char === "(" && $state === "T_EXPRESSION") {
+ $this->leftBraces++;
+ } // Count right braces
+ else if ($char === ")" && $state === "T_EXPRESSION") {
+ $this->rightBraces++;
+ } // Possible end of expression; if left and right braces are equal the expressen ends
+ else if (($char === ";" || $char === "}") && $state === "T_EXPRESSION" && $this->leftBraces === $this->rightBraces) {
+ $this->leftBraces = $this->rightBraces = 0;
+ $this->parser->popState();
+ return $index - 1;
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
* CSS Error.
*
- * @package CssMin
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssError
{
- /**
- * File.
- *
- * @var string
- */
- public $File = "";
- /**
- * Line.
- *
- * @var integer
- */
- public $Line = 0;
- /**
- * Error message.
- *
- * @var string
- */
- public $Message = "";
- /**
- * Source.
- *
- * @var string
- */
- public $Source = "";
- /**
- * Constructor triggering the error.
- *
- * @param string $message Error message
- * @param string $source Corresponding line [optional]
- * @return void
- */
- public function __construct($file, $line, $message, $source = "")
- {
- $this->File = $file;
- $this->Line = $line;
- $this->Message = $message;
- $this->Source = $source;
- }
- /**
- * Returns the error as formatted string.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->Message . ($this->Source ? ":
" . $this->Source . "
": "") . "
in file " . $this->File . " at line " . $this->Line;
- }
+ /**
+ * File.
+ *
+ * @var string
+ */
+ public $File = "";
+ /**
+ * Line.
+ *
+ * @var integer
+ */
+ public $Line = 0;
+ /**
+ * Error message.
+ *
+ * @var string
+ */
+ public $Message = "";
+ /**
+ * Source.
+ *
+ * @var string
+ */
+ public $Source = "";
+
+ /**
+ * Constructor triggering the error.
+ *
+ * @param string $message Error message
+ * @param string $source Corresponding line [optional]
+ * @return void
+ */
+ public function __construct($file, $line, $message, $source = "") {
+ $this->File = $file;
+ $this->Line = $line;
+ $this->Message = $message;
+ $this->Source = $source;
+ }
+
+ /**
+ * Returns the error as formatted string.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return $this->Message . ($this->Source ? ":
" . $this->Source . "
" : "") . "
in file " . $this->File . " at line " . $this->Line;
+ }
}
/**
@@ -2702,58 +2467,55 @@ class CssError
* color:#c89905;
*
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssConvertRgbColorsMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Regular expression matching the value.
- *
- * @var string
- */
- private $reMatch = "/rgb\s*\(\s*([0-9%]+)\s*,\s*([0-9%]+)\s*,\s*([0-9%]+)\s*\)/iS";
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- if (stripos($token->Value, "rgb") !== false && preg_match($this->reMatch, $token->Value, $m))
- {
- for ($i = 1, $l = count($m); $i < $l; $i++)
- {
- if (strpos("%", $m[$i]) !== false)
- {
- $m[$i] = substr($m[$i], 0, -1);
- $m[$i] = (int) (256 * ($m[$i] / 100));
- }
- $m[$i] = str_pad(dechex($m[$i]), 2, "0", STR_PAD_LEFT);
- }
- $token->Value = str_replace($m[0], "#" . $m[1] . $m[2] . $m[3], $token->Value);
- }
- return false;
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
+ /**
+ * Regular expression matching the value.
+ *
+ * @var string
+ */
+ private $reMatch = "/rgb\s*\(\s*([0-9%]+)\s*,\s*([0-9%]+)\s*,\s*([0-9%]+)\s*\)/iS";
+
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ if (stripos($token->Value, "rgb") !== FALSE && preg_match($this->reMatch, $token->Value, $m)) {
+ for ($i = 1, $l = count($m); $i < $l; $i++) {
+ if (strpos("%", $m[$i]) !== FALSE) {
+ $m[$i] = substr($m[$i], 0, -1);
+ $m[$i] = (int)(256 * ($m[$i] / 100));
+ }
+ $m[$i] = str_pad(dechex($m[$i]), 2, "0", STR_PAD_LEFT);
+ }
+ $token->Value = str_replace($m[0], "#" . $m[1] . $m[2] . $m[3], $token->Value);
+ }
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
}
/**
@@ -2771,635 +2533,607 @@ class CssConvertRgbColorsMinifierPlugin extends aCssMinifierPlugin
* border:1px solid #4b0082;
*
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssConvertNamedColorsMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Regular expression matching the value.
- *
- * @var string
- */
- private $reMatch = null;
- /**
- * Transformation table used by the {@link CssConvertNamedColorsMinifierPlugin::reReplace() replacement method}.
- *
- * @var array
- */
- private $transformation = array
- (
- "aliceblue" => "#f0f8ff",
- "antiquewhite" => "#faebd7",
- "aqua" => "#0ff",
- "aquamarine" => "#7fffd4",
- "azure" => "#f0ffff",
- "beige" => "#f5f5dc",
- "black" => "#000",
- "blue" => "#00f",
- "blueviolet" => "#8a2be2",
- "brown" => "#a52a2a",
- "burlywood" => "#deb887",
- "cadetblue" => "#5f9ea0",
- "chartreuse" => "#7fff00",
- "chocolate" => "#d2691e",
- "coral" => "#ff7f50",
- "cornflowerblue" => "#6495ed",
- "cornsilk" => "#fff8dc",
- "crimson" => "#dc143c",
- "darkblue" => "#00008b",
- "darkcyan" => "#008b8b",
- "darkgoldenrod" => "#b8860b",
- "darkgray" => "#a9a9a9",
- "darkgreen" => "#006400",
- "darkkhaki" => "#bdb76b",
- "darkmagenta" => "#8b008b",
- "darkolivegreen" => "#556b2f",
- "darkorange" => "#ff8c00",
- "darkorchid" => "#9932cc",
- "darkred" => "#8b0000",
- "darksalmon" => "#e9967a",
- "darkseagreen" => "#8fbc8f",
- "darkslateblue" => "#483d8b",
- "darkslategray" => "#2f4f4f",
- "darkturquoise" => "#00ced1",
- "darkviolet" => "#9400d3",
- "deeppink" => "#ff1493",
- "deepskyblue" => "#00bfff",
- "dimgray" => "#696969",
- "dodgerblue" => "#1e90ff",
- "firebrick" => "#b22222",
- "floralwhite" => "#fffaf0",
- "forestgreen" => "#228b22",
- "fuchsia" => "#f0f",
- "gainsboro" => "#dcdcdc",
- "ghostwhite" => "#f8f8ff",
- "gold" => "#ffd700",
- "goldenrod" => "#daa520",
- "gray" => "#808080",
- "green" => "#008000",
- "greenyellow" => "#adff2f",
- "honeydew" => "#f0fff0",
- "hotpink" => "#ff69b4",
- "indianred" => "#cd5c5c",
- "indigo" => "#4b0082",
- "ivory" => "#fffff0",
- "khaki" => "#f0e68c",
- "lavender" => "#e6e6fa",
- "lavenderblush" => "#fff0f5",
- "lawngreen" => "#7cfc00",
- "lemonchiffon" => "#fffacd",
- "lightblue" => "#add8e6",
- "lightcoral" => "#f08080",
- "lightcyan" => "#e0ffff",
- "lightgoldenrodyellow" => "#fafad2",
- "lightgreen" => "#90ee90",
- "lightgrey" => "#d3d3d3",
- "lightpink" => "#ffb6c1",
- "lightsalmon" => "#ffa07a",
- "lightseagreen" => "#20b2aa",
- "lightskyblue" => "#87cefa",
- "lightslategray" => "#789",
- "lightsteelblue" => "#b0c4de",
- "lightyellow" => "#ffffe0",
- "lime" => "#0f0",
- "limegreen" => "#32cd32",
- "linen" => "#faf0e6",
- "maroon" => "#800000",
- "mediumaquamarine" => "#66cdaa",
- "mediumblue" => "#0000cd",
- "mediumorchid" => "#ba55d3",
- "mediumpurple" => "#9370db",
- "mediumseagreen" => "#3cb371",
- "mediumslateblue" => "#7b68ee",
- "mediumspringgreen" => "#00fa9a",
- "mediumturquoise" => "#48d1cc",
- "mediumvioletred" => "#c71585",
- "midnightblue" => "#191970",
- "mintcream" => "#f5fffa",
- "mistyrose" => "#ffe4e1",
- "moccasin" => "#ffe4b5",
- "navajowhite" => "#ffdead",
- "navy" => "#000080",
- "oldlace" => "#fdf5e6",
- "olive" => "#808000",
- "olivedrab" => "#6b8e23",
- "orange" => "#ffa500",
- "orangered" => "#ff4500",
- "orchid" => "#da70d6",
- "palegoldenrod" => "#eee8aa",
- "palegreen" => "#98fb98",
- "paleturquoise" => "#afeeee",
- "palevioletred" => "#db7093",
- "papayawhip" => "#ffefd5",
- "peachpuff" => "#ffdab9",
- "peru" => "#cd853f",
- "pink" => "#ffc0cb",
- "plum" => "#dda0dd",
- "powderblue" => "#b0e0e6",
- "purple" => "#800080",
- "red" => "#f00",
- "rosybrown" => "#bc8f8f",
- "royalblue" => "#4169e1",
- "saddlebrown" => "#8b4513",
- "salmon" => "#fa8072",
- "sandybrown" => "#f4a460",
- "seagreen" => "#2e8b57",
- "seashell" => "#fff5ee",
- "sienna" => "#a0522d",
- "silver" => "#c0c0c0",
- "skyblue" => "#87ceeb",
- "slateblue" => "#6a5acd",
- "slategray" => "#708090",
- "snow" => "#fffafa",
- "springgreen" => "#00ff7f",
- "steelblue" => "#4682b4",
- "tan" => "#d2b48c",
- "teal" => "#008080",
- "thistle" => "#d8bfd8",
- "tomato" => "#ff6347",
- "turquoise" => "#40e0d0",
- "violet" => "#ee82ee",
- "wheat" => "#f5deb3",
- "white" => "#fff",
- "whitesmoke" => "#f5f5f5",
- "yellow" => "#ff0",
- "yellowgreen" => "#9acd32"
- );
- /**
- * Overwrites {@link aCssMinifierPlugin::__construct()}.
- *
- * The constructor will create the {@link CssConvertNamedColorsMinifierPlugin::$reMatch replace regular expression}
- * based on the {@link CssConvertNamedColorsMinifierPlugin::$transformation transformation table}.
- *
- * @param CssMinifier $minifier The CssMinifier object of this plugin.
- * @param array $configuration Plugin configuration [optional]
- * @return void
- */
- public function __construct(CssMinifier $minifier, array $configuration = array())
- {
- $this->reMatch = "/(^|\s)+(" . implode("|", array_keys($this->transformation)) . ")(\s|$)+/iS";
- parent::__construct($minifier, $configuration);
- }
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- $lcValue = strtolower($token->Value);
- // Declaration value equals a value in the transformation table => simple replace
- if (isset($this->transformation[$lcValue]))
- {
- $token->Value = $this->transformation[$lcValue];
- }
- // Declaration value contains a value in the transformation table => regular expression replace
- elseif (preg_match($this->reMatch, $token->Value))
- {
- $token->Value = preg_replace_callback($this->reMatch, array($this, 'reReplace'), $token->Value);
- }
- return false;
- }
- /**
- * Callback for replacement value.
- *
- * @param array $match
- * @return string
- */
- private function reReplace($match)
- {
- return $match[1] . $this->transformation[strtolower($match[2])] . $match[3];
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
+ /**
+ * Regular expression matching the value.
+ *
+ * @var string
+ */
+ private $reMatch = NULL;
+ /**
+ * Transformation table used by the {@link CssConvertNamedColorsMinifierPlugin::reReplace() replacement method}.
+ *
+ * @var array
+ */
+ private $transformation = array
+ (
+ "aliceblue" => "#f0f8ff",
+ "antiquewhite" => "#faebd7",
+ "aqua" => "#0ff",
+ "aquamarine" => "#7fffd4",
+ "azure" => "#f0ffff",
+ "beige" => "#f5f5dc",
+ "black" => "#000",
+ "blue" => "#00f",
+ "blueviolet" => "#8a2be2",
+ "brown" => "#a52a2a",
+ "burlywood" => "#deb887",
+ "cadetblue" => "#5f9ea0",
+ "chartreuse" => "#7fff00",
+ "chocolate" => "#d2691e",
+ "coral" => "#ff7f50",
+ "cornflowerblue" => "#6495ed",
+ "cornsilk" => "#fff8dc",
+ "crimson" => "#dc143c",
+ "darkblue" => "#00008b",
+ "darkcyan" => "#008b8b",
+ "darkgoldenrod" => "#b8860b",
+ "darkgray" => "#a9a9a9",
+ "darkgreen" => "#006400",
+ "darkkhaki" => "#bdb76b",
+ "darkmagenta" => "#8b008b",
+ "darkolivegreen" => "#556b2f",
+ "darkorange" => "#ff8c00",
+ "darkorchid" => "#9932cc",
+ "darkred" => "#8b0000",
+ "darksalmon" => "#e9967a",
+ "darkseagreen" => "#8fbc8f",
+ "darkslateblue" => "#483d8b",
+ "darkslategray" => "#2f4f4f",
+ "darkturquoise" => "#00ced1",
+ "darkviolet" => "#9400d3",
+ "deeppink" => "#ff1493",
+ "deepskyblue" => "#00bfff",
+ "dimgray" => "#696969",
+ "dodgerblue" => "#1e90ff",
+ "firebrick" => "#b22222",
+ "floralwhite" => "#fffaf0",
+ "forestgreen" => "#228b22",
+ "fuchsia" => "#f0f",
+ "gainsboro" => "#dcdcdc",
+ "ghostwhite" => "#f8f8ff",
+ "gold" => "#ffd700",
+ "goldenrod" => "#daa520",
+ "gray" => "#808080",
+ "green" => "#008000",
+ "greenyellow" => "#adff2f",
+ "honeydew" => "#f0fff0",
+ "hotpink" => "#ff69b4",
+ "indianred" => "#cd5c5c",
+ "indigo" => "#4b0082",
+ "ivory" => "#fffff0",
+ "khaki" => "#f0e68c",
+ "lavender" => "#e6e6fa",
+ "lavenderblush" => "#fff0f5",
+ "lawngreen" => "#7cfc00",
+ "lemonchiffon" => "#fffacd",
+ "lightblue" => "#add8e6",
+ "lightcoral" => "#f08080",
+ "lightcyan" => "#e0ffff",
+ "lightgoldenrodyellow" => "#fafad2",
+ "lightgreen" => "#90ee90",
+ "lightgrey" => "#d3d3d3",
+ "lightpink" => "#ffb6c1",
+ "lightsalmon" => "#ffa07a",
+ "lightseagreen" => "#20b2aa",
+ "lightskyblue" => "#87cefa",
+ "lightslategray" => "#789",
+ "lightsteelblue" => "#b0c4de",
+ "lightyellow" => "#ffffe0",
+ "lime" => "#0f0",
+ "limegreen" => "#32cd32",
+ "linen" => "#faf0e6",
+ "maroon" => "#800000",
+ "mediumaquamarine" => "#66cdaa",
+ "mediumblue" => "#0000cd",
+ "mediumorchid" => "#ba55d3",
+ "mediumpurple" => "#9370db",
+ "mediumseagreen" => "#3cb371",
+ "mediumslateblue" => "#7b68ee",
+ "mediumspringgreen" => "#00fa9a",
+ "mediumturquoise" => "#48d1cc",
+ "mediumvioletred" => "#c71585",
+ "midnightblue" => "#191970",
+ "mintcream" => "#f5fffa",
+ "mistyrose" => "#ffe4e1",
+ "moccasin" => "#ffe4b5",
+ "navajowhite" => "#ffdead",
+ "navy" => "#000080",
+ "oldlace" => "#fdf5e6",
+ "olive" => "#808000",
+ "olivedrab" => "#6b8e23",
+ "orange" => "#ffa500",
+ "orangered" => "#ff4500",
+ "orchid" => "#da70d6",
+ "palegoldenrod" => "#eee8aa",
+ "palegreen" => "#98fb98",
+ "paleturquoise" => "#afeeee",
+ "palevioletred" => "#db7093",
+ "papayawhip" => "#ffefd5",
+ "peachpuff" => "#ffdab9",
+ "peru" => "#cd853f",
+ "pink" => "#ffc0cb",
+ "plum" => "#dda0dd",
+ "powderblue" => "#b0e0e6",
+ "purple" => "#800080",
+ "red" => "#f00",
+ "rosybrown" => "#bc8f8f",
+ "royalblue" => "#4169e1",
+ "saddlebrown" => "#8b4513",
+ "salmon" => "#fa8072",
+ "sandybrown" => "#f4a460",
+ "seagreen" => "#2e8b57",
+ "seashell" => "#fff5ee",
+ "sienna" => "#a0522d",
+ "silver" => "#c0c0c0",
+ "skyblue" => "#87ceeb",
+ "slateblue" => "#6a5acd",
+ "slategray" => "#708090",
+ "snow" => "#fffafa",
+ "springgreen" => "#00ff7f",
+ "steelblue" => "#4682b4",
+ "tan" => "#d2b48c",
+ "teal" => "#008080",
+ "thistle" => "#d8bfd8",
+ "tomato" => "#ff6347",
+ "turquoise" => "#40e0d0",
+ "violet" => "#ee82ee",
+ "wheat" => "#f5deb3",
+ "white" => "#fff",
+ "whitesmoke" => "#f5f5f5",
+ "yellow" => "#ff0",
+ "yellowgreen" => "#9acd32"
+ );
+
+ /**
+ * Overwrites {@link aCssMinifierPlugin::__construct()}.
+ *
+ * The constructor will create the {@link CssConvertNamedColorsMinifierPlugin::$reMatch replace regular expression}
+ * based on the {@link CssConvertNamedColorsMinifierPlugin::$transformation transformation table}.
+ *
+ * @param CssMinifier $minifier The CssMinifier object of this plugin.
+ * @param array $configuration Plugin configuration [optional]
+ * @return void
+ */
+ public function __construct(CssMinifier $minifier, array $configuration = array()) {
+ $this->reMatch = "/(^|\s)+(" . implode("|", array_keys($this->transformation)) . ")(\s|$)+/iS";
+ parent::__construct($minifier, $configuration);
+ }
+
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ $lcValue = strtolower($token->Value);
+ // Declaration value equals a value in the transformation table => simple replace
+ if (isset($this->transformation[$lcValue])) {
+ $token->Value = $this->transformation[$lcValue];
+ } // Declaration value contains a value in the transformation table => regular expression replace
+ else if (preg_match($this->reMatch, $token->Value)) {
+ $token->Value = preg_replace_callback($this->reMatch, array($this, 'reReplace'), $token->Value);
+ }
+ return FALSE;
+ }
+
+ /**
+ * Callback for replacement value.
+ *
+ * @param array $match
+ * @return string
+ */
+ private function reReplace($match) {
+ return $match[1] . $this->transformation[strtolower($match[2])] . $match[3];
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
}
/**
* This {@link aCssMinifierFilter minifier filter} triggers on CSS Level 3 properties and will add declaration tokens
* with browser-specific properties.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssConvertLevel3PropertiesMinifierFilter extends aCssMinifierFilter
{
- /**
- * Css property transformations table. Used to convert CSS3 and proprietary properties to the browser-specific
- * counterparts.
- *
- * @var array
- */
- private $transformations = array
- (
- // Property Array(Mozilla, Webkit, Opera, Internet Explorer); NULL values are placeholders and will get ignored
- "animation" => array(null, "-webkit-animation", null, null),
- "animation-delay" => array(null, "-webkit-animation-delay", null, null),
- "animation-direction" => array(null, "-webkit-animation-direction", null, null),
- "animation-duration" => array(null, "-webkit-animation-duration", null, null),
- "animation-fill-mode" => array(null, "-webkit-animation-fill-mode", null, null),
- "animation-iteration-count" => array(null, "-webkit-animation-iteration-count", null, null),
- "animation-name" => array(null, "-webkit-animation-name", null, null),
- "animation-play-state" => array(null, "-webkit-animation-play-state", null, null),
- "animation-timing-function" => array(null, "-webkit-animation-timing-function", null, null),
- "appearance" => array("-moz-appearance", "-webkit-appearance", null, null),
- "backface-visibility" => array(null, "-webkit-backface-visibility", null, null),
- "background-clip" => array(null, "-webkit-background-clip", null, null),
- "background-composite" => array(null, "-webkit-background-composite", null, null),
- "background-inline-policy" => array("-moz-background-inline-policy", null, null, null),
- "background-origin" => array(null, "-webkit-background-origin", null, null),
- "background-position-x" => array(null, null, null, "-ms-background-position-x"),
- "background-position-y" => array(null, null, null, "-ms-background-position-y"),
- "background-size" => array(null, "-webkit-background-size", null, null),
- "behavior" => array(null, null, null, "-ms-behavior"),
- "binding" => array("-moz-binding", null, null, null),
- "border-after" => array(null, "-webkit-border-after", null, null),
- "border-after-color" => array(null, "-webkit-border-after-color", null, null),
- "border-after-style" => array(null, "-webkit-border-after-style", null, null),
- "border-after-width" => array(null, "-webkit-border-after-width", null, null),
- "border-before" => array(null, "-webkit-border-before", null, null),
- "border-before-color" => array(null, "-webkit-border-before-color", null, null),
- "border-before-style" => array(null, "-webkit-border-before-style", null, null),
- "border-before-width" => array(null, "-webkit-border-before-width", null, null),
- "border-border-bottom-colors" => array("-moz-border-bottom-colors", null, null, null),
- "border-bottom-left-radius" => array("-moz-border-radius-bottomleft", "-webkit-border-bottom-left-radius", null, null),
- "border-bottom-right-radius" => array("-moz-border-radius-bottomright", "-webkit-border-bottom-right-radius", null, null),
- "border-end" => array("-moz-border-end", "-webkit-border-end", null, null),
- "border-end-color" => array("-moz-border-end-color", "-webkit-border-end-color", null, null),
- "border-end-style" => array("-moz-border-end-style", "-webkit-border-end-style", null, null),
- "border-end-width" => array("-moz-border-end-width", "-webkit-border-end-width", null, null),
- "border-fit" => array(null, "-webkit-border-fit", null, null),
- "border-horizontal-spacing" => array(null, "-webkit-border-horizontal-spacing", null, null),
- "border-image" => array("-moz-border-image", "-webkit-border-image", null, null),
- "border-left-colors" => array("-moz-border-left-colors", null, null, null),
- "border-radius" => array("-moz-border-radius", "-webkit-border-radius", null, null),
- "border-border-right-colors" => array("-moz-border-right-colors", null, null, null),
- "border-start" => array("-moz-border-start", "-webkit-border-start", null, null),
- "border-start-color" => array("-moz-border-start-color", "-webkit-border-start-color", null, null),
- "border-start-style" => array("-moz-border-start-style", "-webkit-border-start-style", null, null),
- "border-start-width" => array("-moz-border-start-width", "-webkit-border-start-width", null, null),
- "border-top-colors" => array("-moz-border-top-colors", null, null, null),
- "border-top-left-radius" => array("-moz-border-radius-topleft", "-webkit-border-top-left-radius", null, null),
- "border-top-right-radius" => array("-moz-border-radius-topright", "-webkit-border-top-right-radius", null, null),
- "border-vertical-spacing" => array(null, "-webkit-border-vertical-spacing", null, null),
- "box-align" => array("-moz-box-align", "-webkit-box-align", null, null),
- "box-direction" => array("-moz-box-direction", "-webkit-box-direction", null, null),
- "box-flex" => array("-moz-box-flex", "-webkit-box-flex", null, null),
- "box-flex-group" => array(null, "-webkit-box-flex-group", null, null),
- "box-flex-lines" => array(null, "-webkit-box-flex-lines", null, null),
- "box-ordinal-group" => array("-moz-box-ordinal-group", "-webkit-box-ordinal-group", null, null),
- "box-orient" => array("-moz-box-orient", "-webkit-box-orient", null, null),
- "box-pack" => array("-moz-box-pack", "-webkit-box-pack", null, null),
- "box-reflect" => array(null, "-webkit-box-reflect", null, null),
- "box-shadow" => array("-moz-box-shadow", "-webkit-box-shadow", null, null),
- "box-sizing" => array("-moz-box-sizing", null, null, null),
- "color-correction" => array(null, "-webkit-color-correction", null, null),
- "column-break-after" => array(null, "-webkit-column-break-after", null, null),
- "column-break-before" => array(null, "-webkit-column-break-before", null, null),
- "column-break-inside" => array(null, "-webkit-column-break-inside", null, null),
- "column-count" => array("-moz-column-count", "-webkit-column-count", null, null),
- "column-gap" => array("-moz-column-gap", "-webkit-column-gap", null, null),
- "column-rule" => array("-moz-column-rule", "-webkit-column-rule", null, null),
- "column-rule-color" => array("-moz-column-rule-color", "-webkit-column-rule-color", null, null),
- "column-rule-style" => array("-moz-column-rule-style", "-webkit-column-rule-style", null, null),
- "column-rule-width" => array("-moz-column-rule-width", "-webkit-column-rule-width", null, null),
- "column-span" => array(null, "-webkit-column-span", null, null),
- "column-width" => array("-moz-column-width", "-webkit-column-width", null, null),
- "columns" => array(null, "-webkit-columns", null, null),
- "filter" => array(__CLASS__, "filter"),
- "float-edge" => array("-moz-float-edge", null, null, null),
- "font-feature-settings" => array("-moz-font-feature-settings", null, null, null),
- "font-language-override" => array("-moz-font-language-override", null, null, null),
- "font-size-delta" => array(null, "-webkit-font-size-delta", null, null),
- "font-smoothing" => array(null, "-webkit-font-smoothing", null, null),
- "force-broken-image-icon" => array("-moz-force-broken-image-icon", null, null, null),
- "highlight" => array(null, "-webkit-highlight", null, null),
- "hyphenate-character" => array(null, "-webkit-hyphenate-character", null, null),
- "hyphenate-locale" => array(null, "-webkit-hyphenate-locale", null, null),
- "hyphens" => array(null, "-webkit-hyphens", null, null),
- "force-broken-image-icon" => array("-moz-image-region", null, null, null),
- "ime-mode" => array(null, null, null, "-ms-ime-mode"),
- "interpolation-mode" => array(null, null, null, "-ms-interpolation-mode"),
- "layout-flow" => array(null, null, null, "-ms-layout-flow"),
- "layout-grid" => array(null, null, null, "-ms-layout-grid"),
- "layout-grid-char" => array(null, null, null, "-ms-layout-grid-char"),
- "layout-grid-line" => array(null, null, null, "-ms-layout-grid-line"),
- "layout-grid-mode" => array(null, null, null, "-ms-layout-grid-mode"),
- "layout-grid-type" => array(null, null, null, "-ms-layout-grid-type"),
- "line-break" => array(null, "-webkit-line-break", null, "-ms-line-break"),
- "line-clamp" => array(null, "-webkit-line-clamp", null, null),
- "line-grid-mode" => array(null, null, null, "-ms-line-grid-mode"),
- "logical-height" => array(null, "-webkit-logical-height", null, null),
- "logical-width" => array(null, "-webkit-logical-width", null, null),
- "margin-after" => array(null, "-webkit-margin-after", null, null),
- "margin-after-collapse" => array(null, "-webkit-margin-after-collapse", null, null),
- "margin-before" => array(null, "-webkit-margin-before", null, null),
- "margin-before-collapse" => array(null, "-webkit-margin-before-collapse", null, null),
- "margin-bottom-collapse" => array(null, "-webkit-margin-bottom-collapse", null, null),
- "margin-collapse" => array(null, "-webkit-margin-collapse", null, null),
- "margin-end" => array("-moz-margin-end", "-webkit-margin-end", null, null),
- "margin-start" => array("-moz-margin-start", "-webkit-margin-start", null, null),
- "margin-top-collapse" => array(null, "-webkit-margin-top-collapse", null, null),
- "marquee " => array(null, "-webkit-marquee", null, null),
- "marquee-direction" => array(null, "-webkit-marquee-direction", null, null),
- "marquee-increment" => array(null, "-webkit-marquee-increment", null, null),
- "marquee-repetition" => array(null, "-webkit-marquee-repetition", null, null),
- "marquee-speed" => array(null, "-webkit-marquee-speed", null, null),
- "marquee-style" => array(null, "-webkit-marquee-style", null, null),
- "mask" => array(null, "-webkit-mask", null, null),
- "mask-attachment" => array(null, "-webkit-mask-attachment", null, null),
- "mask-box-image" => array(null, "-webkit-mask-box-image", null, null),
- "mask-clip" => array(null, "-webkit-mask-clip", null, null),
- "mask-composite" => array(null, "-webkit-mask-composite", null, null),
- "mask-image" => array(null, "-webkit-mask-image", null, null),
- "mask-origin" => array(null, "-webkit-mask-origin", null, null),
- "mask-position" => array(null, "-webkit-mask-position", null, null),
- "mask-position-x" => array(null, "-webkit-mask-position-x", null, null),
- "mask-position-y" => array(null, "-webkit-mask-position-y", null, null),
- "mask-repeat" => array(null, "-webkit-mask-repeat", null, null),
- "mask-repeat-x" => array(null, "-webkit-mask-repeat-x", null, null),
- "mask-repeat-y" => array(null, "-webkit-mask-repeat-y", null, null),
- "mask-size" => array(null, "-webkit-mask-size", null, null),
- "match-nearest-mail-blockquote-color" => array(null, "-webkit-match-nearest-mail-blockquote-color", null, null),
- "max-logical-height" => array(null, "-webkit-max-logical-height", null, null),
- "max-logical-width" => array(null, "-webkit-max-logical-width", null, null),
- "min-logical-height" => array(null, "-webkit-min-logical-height", null, null),
- "min-logical-width" => array(null, "-webkit-min-logical-width", null, null),
- "object-fit" => array(null, null, "-o-object-fit", null),
- "object-position" => array(null, null, "-o-object-position", null),
- "opacity" => array(__CLASS__, "opacity"),
- "outline-radius" => array("-moz-outline-radius", null, null, null),
- "outline-bottom-left-radius" => array("-moz-outline-radius-bottomleft", null, null, null),
- "outline-bottom-right-radius" => array("-moz-outline-radius-bottomright", null, null, null),
- "outline-top-left-radius" => array("-moz-outline-radius-topleft", null, null, null),
- "outline-top-right-radius" => array("-moz-outline-radius-topright", null, null, null),
- "padding-after" => array(null, "-webkit-padding-after", null, null),
- "padding-before" => array(null, "-webkit-padding-before", null, null),
- "padding-end" => array("-moz-padding-end", "-webkit-padding-end", null, null),
- "padding-start" => array("-moz-padding-start", "-webkit-padding-start", null, null),
- "perspective" => array(null, "-webkit-perspective", null, null),
- "perspective-origin" => array(null, "-webkit-perspective-origin", null, null),
- "perspective-origin-x" => array(null, "-webkit-perspective-origin-x", null, null),
- "perspective-origin-y" => array(null, "-webkit-perspective-origin-y", null, null),
- "rtl-ordering" => array(null, "-webkit-rtl-ordering", null, null),
- "scrollbar-3dlight-color" => array(null, null, null, "-ms-scrollbar-3dlight-color"),
- "scrollbar-arrow-color" => array(null, null, null, "-ms-scrollbar-arrow-color"),
- "scrollbar-base-color" => array(null, null, null, "-ms-scrollbar-base-color"),
- "scrollbar-darkshadow-color" => array(null, null, null, "-ms-scrollbar-darkshadow-color"),
- "scrollbar-face-color" => array(null, null, null, "-ms-scrollbar-face-color"),
- "scrollbar-highlight-color" => array(null, null, null, "-ms-scrollbar-highlight-color"),
- "scrollbar-shadow-color" => array(null, null, null, "-ms-scrollbar-shadow-color"),
- "scrollbar-track-color" => array(null, null, null, "-ms-scrollbar-track-color"),
- "stack-sizing" => array("-moz-stack-sizing", null, null, null),
- "svg-shadow" => array(null, "-webkit-svg-shadow", null, null),
- "tab-size" => array("-moz-tab-size", null, "-o-tab-size", null),
- "table-baseline" => array(null, null, "-o-table-baseline", null),
- "text-align-last" => array(null, null, null, "-ms-text-align-last"),
- "text-autospace" => array(null, null, null, "-ms-text-autospace"),
- "text-combine" => array(null, "-webkit-text-combine", null, null),
- "text-decorations-in-effect" => array(null, "-webkit-text-decorations-in-effect", null, null),
- "text-emphasis" => array(null, "-webkit-text-emphasis", null, null),
- "text-emphasis-color" => array(null, "-webkit-text-emphasis-color", null, null),
- "text-emphasis-position" => array(null, "-webkit-text-emphasis-position", null, null),
- "text-emphasis-style" => array(null, "-webkit-text-emphasis-style", null, null),
- "text-fill-color" => array(null, "-webkit-text-fill-color", null, null),
- "text-justify" => array(null, null, null, "-ms-text-justify"),
- "text-kashida-space" => array(null, null, null, "-ms-text-kashida-space"),
- "text-overflow" => array(null, null, "-o-text-overflow", "-ms-text-overflow"),
- "text-security" => array(null, "-webkit-text-security", null, null),
- "text-size-adjust" => array(null, "-webkit-text-size-adjust", null, "-ms-text-size-adjust"),
- "text-stroke" => array(null, "-webkit-text-stroke", null, null),
- "text-stroke-color" => array(null, "-webkit-text-stroke-color", null, null),
- "text-stroke-width" => array(null, "-webkit-text-stroke-width", null, null),
- "text-underline-position" => array(null, null, null, "-ms-text-underline-position"),
- "transform" => array("-moz-transform", "-webkit-transform", "-o-transform", null),
- "transform-origin" => array("-moz-transform-origin", "-webkit-transform-origin", "-o-transform-origin", null),
- "transform-origin-x" => array(null, "-webkit-transform-origin-x", null, null),
- "transform-origin-y" => array(null, "-webkit-transform-origin-y", null, null),
- "transform-origin-z" => array(null, "-webkit-transform-origin-z", null, null),
- "transform-style" => array(null, "-webkit-transform-style", null, null),
- "transition" => array("-moz-transition", "-webkit-transition", "-o-transition", null),
- "transition-delay" => array("-moz-transition-delay", "-webkit-transition-delay", "-o-transition-delay", null),
- "transition-duration" => array("-moz-transition-duration", "-webkit-transition-duration", "-o-transition-duration", null),
- "transition-property" => array("-moz-transition-property", "-webkit-transition-property", "-o-transition-property", null),
- "transition-timing-function" => array("-moz-transition-timing-function", "-webkit-transition-timing-function", "-o-transition-timing-function", null),
- "user-drag" => array(null, "-webkit-user-drag", null, null),
- "user-focus" => array("-moz-user-focus", null, null, null),
- "user-input" => array("-moz-user-input", null, null, null),
- "user-modify" => array("-moz-user-modify", "-webkit-user-modify", null, null),
- "user-select" => array("-moz-user-select", "-webkit-user-select", null, null),
- "white-space" => array(__CLASS__, "whiteSpace"),
- "window-shadow" => array("-moz-window-shadow", null, null, null),
- "word-break" => array(null, null, null, "-ms-word-break"),
- "word-wrap" => array(null, null, null, "-ms-word-wrap"),
- "writing-mode" => array(null, "-webkit-writing-mode", null, "-ms-writing-mode"),
- "zoom" => array(null, null, null, "-ms-zoom")
- );
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- $r = 0;
- $transformations = &$this->transformations;
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- if (get_class($tokens[$i]) === "CssRulesetDeclarationToken")
- {
- $tProperty = $tokens[$i]->Property;
- if (isset($transformations[$tProperty]))
- {
- $result = array();
- if (is_callable($transformations[$tProperty]))
- {
- $result = call_user_func_array($transformations[$tProperty], array($tokens[$i]));
- if (!is_array($result) && is_object($result))
- {
- $result = array($result);
- }
- }
- else
- {
- $tValue = $tokens[$i]->Value;
- $tMediaTypes = $tokens[$i]->MediaTypes;
- foreach ($transformations[$tProperty] as $property)
- {
- if ($property !== null)
- {
- $result[] = new CssRulesetDeclarationToken($property, $tValue, $tMediaTypes);
- }
- }
- }
- if (count($result) > 0)
- {
- array_splice($tokens, $i + 1, 0, $result);
- $i += count($result);
- $l += count($result);
- }
- }
- }
- }
- return $r;
- }
- /**
- * Transforms the Internet Explorer specific declaration property "filter" to Internet Explorer 8+ compatible
- * declaratiopn property "-ms-filter".
- *
- * @param aCssToken $token
- * @return array
- */
- private static function filter($token)
- {
- $r = array
- (
- new CssRulesetDeclarationToken("-ms-filter", "\"" . $token->Value . "\"", $token->MediaTypes),
- );
- return $r;
- }
- /**
- * Transforms "opacity: {value}" into browser specific counterparts.
- *
- * @param aCssToken $token
- * @return array
- */
- private static function opacity($token)
- {
- // Calculate the value for Internet Explorer filter statement
- $ieValue = (int) ((float) $token->Value * 100);
- $r = array
- (
- // Internet Explorer >= 8
- new CssRulesetDeclarationToken("-ms-filter", "\"alpha(opacity=" . $ieValue . ")\"", $token->MediaTypes),
- // Internet Explorer >= 4 <= 7
- new CssRulesetDeclarationToken("filter", "alpha(opacity=" . $ieValue . ")", $token->MediaTypes),
- new CssRulesetDeclarationToken("zoom", "1", $token->MediaTypes)
- );
- return $r;
- }
- /**
- * Transforms "white-space: pre-wrap" into browser specific counterparts.
- *
- * @param aCssToken $token
- * @return array
- */
- private static function whiteSpace($token)
- {
- if (strtolower($token->Value) === "pre-wrap")
- {
- $r = array
- (
- // Firefox < 3
- new CssRulesetDeclarationToken("white-space", "-moz-pre-wrap", $token->MediaTypes),
- // Webkit
- new CssRulesetDeclarationToken("white-space", "-webkit-pre-wrap", $token->MediaTypes),
- // Opera >= 4 <= 6
- new CssRulesetDeclarationToken("white-space", "-pre-wrap", $token->MediaTypes),
- // Opera >= 7
- new CssRulesetDeclarationToken("white-space", "-o-pre-wrap", $token->MediaTypes),
- // Internet Explorer >= 5.5
- new CssRulesetDeclarationToken("word-wrap", "break-word", $token->MediaTypes)
- );
- return $r;
- }
- else
- {
- return array();
- }
- }
+ /**
+ * Css property transformations table. Used to convert CSS3 and proprietary properties to the browser-specific
+ * counterparts.
+ *
+ * @var array
+ */
+ private $transformations = array
+ (
+ // Property Array(Mozilla, Webkit, Opera, Internet Explorer); NULL values are placeholders and will get ignored
+ "animation" => array(NULL, "-webkit-animation", NULL, NULL),
+ "animation-delay" => array(NULL, "-webkit-animation-delay", NULL, NULL),
+ "animation-direction" => array(NULL, "-webkit-animation-direction", NULL, NULL),
+ "animation-duration" => array(NULL, "-webkit-animation-duration", NULL, NULL),
+ "animation-fill-mode" => array(NULL, "-webkit-animation-fill-mode", NULL, NULL),
+ "animation-iteration-count" => array(NULL, "-webkit-animation-iteration-count", NULL, NULL),
+ "animation-name" => array(NULL, "-webkit-animation-name", NULL, NULL),
+ "animation-play-state" => array(NULL, "-webkit-animation-play-state", NULL, NULL),
+ "animation-timing-function" => array(NULL, "-webkit-animation-timing-function", NULL, NULL),
+ "appearance" => array("-moz-appearance", "-webkit-appearance", NULL, NULL),
+ "backface-visibility" => array(NULL, "-webkit-backface-visibility", NULL, NULL),
+ "background-clip" => array(NULL, "-webkit-background-clip", NULL, NULL),
+ "background-composite" => array(NULL, "-webkit-background-composite", NULL, NULL),
+ "background-inline-policy" => array("-moz-background-inline-policy", NULL, NULL, NULL),
+ "background-origin" => array(NULL, "-webkit-background-origin", NULL, NULL),
+ "background-position-x" => array(NULL, NULL, NULL, "-ms-background-position-x"),
+ "background-position-y" => array(NULL, NULL, NULL, "-ms-background-position-y"),
+ "background-size" => array(NULL, "-webkit-background-size", NULL, NULL),
+ "behavior" => array(NULL, NULL, NULL, "-ms-behavior"),
+ "binding" => array("-moz-binding", NULL, NULL, NULL),
+ "border-after" => array(NULL, "-webkit-border-after", NULL, NULL),
+ "border-after-color" => array(NULL, "-webkit-border-after-color", NULL, NULL),
+ "border-after-style" => array(NULL, "-webkit-border-after-style", NULL, NULL),
+ "border-after-width" => array(NULL, "-webkit-border-after-width", NULL, NULL),
+ "border-before" => array(NULL, "-webkit-border-before", NULL, NULL),
+ "border-before-color" => array(NULL, "-webkit-border-before-color", NULL, NULL),
+ "border-before-style" => array(NULL, "-webkit-border-before-style", NULL, NULL),
+ "border-before-width" => array(NULL, "-webkit-border-before-width", NULL, NULL),
+ "border-border-bottom-colors" => array("-moz-border-bottom-colors", NULL, NULL, NULL),
+ "border-bottom-left-radius" => array("-moz-border-radius-bottomleft", "-webkit-border-bottom-left-radius", NULL, NULL),
+ "border-bottom-right-radius" => array("-moz-border-radius-bottomright", "-webkit-border-bottom-right-radius", NULL, NULL),
+ "border-end" => array("-moz-border-end", "-webkit-border-end", NULL, NULL),
+ "border-end-color" => array("-moz-border-end-color", "-webkit-border-end-color", NULL, NULL),
+ "border-end-style" => array("-moz-border-end-style", "-webkit-border-end-style", NULL, NULL),
+ "border-end-width" => array("-moz-border-end-width", "-webkit-border-end-width", NULL, NULL),
+ "border-fit" => array(NULL, "-webkit-border-fit", NULL, NULL),
+ "border-horizontal-spacing" => array(NULL, "-webkit-border-horizontal-spacing", NULL, NULL),
+ "border-image" => array("-moz-border-image", "-webkit-border-image", NULL, NULL),
+ "border-left-colors" => array("-moz-border-left-colors", NULL, NULL, NULL),
+ "border-radius" => array("-moz-border-radius", "-webkit-border-radius", NULL, NULL),
+ "border-border-right-colors" => array("-moz-border-right-colors", NULL, NULL, NULL),
+ "border-start" => array("-moz-border-start", "-webkit-border-start", NULL, NULL),
+ "border-start-color" => array("-moz-border-start-color", "-webkit-border-start-color", NULL, NULL),
+ "border-start-style" => array("-moz-border-start-style", "-webkit-border-start-style", NULL, NULL),
+ "border-start-width" => array("-moz-border-start-width", "-webkit-border-start-width", NULL, NULL),
+ "border-top-colors" => array("-moz-border-top-colors", NULL, NULL, NULL),
+ "border-top-left-radius" => array("-moz-border-radius-topleft", "-webkit-border-top-left-radius", NULL, NULL),
+ "border-top-right-radius" => array("-moz-border-radius-topright", "-webkit-border-top-right-radius", NULL, NULL),
+ "border-vertical-spacing" => array(NULL, "-webkit-border-vertical-spacing", NULL, NULL),
+ "box-align" => array("-moz-box-align", "-webkit-box-align", NULL, NULL),
+ "box-direction" => array("-moz-box-direction", "-webkit-box-direction", NULL, NULL),
+ "box-flex" => array("-moz-box-flex", "-webkit-box-flex", NULL, NULL),
+ "box-flex-group" => array(NULL, "-webkit-box-flex-group", NULL, NULL),
+ "box-flex-lines" => array(NULL, "-webkit-box-flex-lines", NULL, NULL),
+ "box-ordinal-group" => array("-moz-box-ordinal-group", "-webkit-box-ordinal-group", NULL, NULL),
+ "box-orient" => array("-moz-box-orient", "-webkit-box-orient", NULL, NULL),
+ "box-pack" => array("-moz-box-pack", "-webkit-box-pack", NULL, NULL),
+ "box-reflect" => array(NULL, "-webkit-box-reflect", NULL, NULL),
+ "box-shadow" => array("-moz-box-shadow", "-webkit-box-shadow", NULL, NULL),
+ "box-sizing" => array("-moz-box-sizing", NULL, NULL, NULL),
+ "color-correction" => array(NULL, "-webkit-color-correction", NULL, NULL),
+ "column-break-after" => array(NULL, "-webkit-column-break-after", NULL, NULL),
+ "column-break-before" => array(NULL, "-webkit-column-break-before", NULL, NULL),
+ "column-break-inside" => array(NULL, "-webkit-column-break-inside", NULL, NULL),
+ "column-count" => array("-moz-column-count", "-webkit-column-count", NULL, NULL),
+ "column-gap" => array("-moz-column-gap", "-webkit-column-gap", NULL, NULL),
+ "column-rule" => array("-moz-column-rule", "-webkit-column-rule", NULL, NULL),
+ "column-rule-color" => array("-moz-column-rule-color", "-webkit-column-rule-color", NULL, NULL),
+ "column-rule-style" => array("-moz-column-rule-style", "-webkit-column-rule-style", NULL, NULL),
+ "column-rule-width" => array("-moz-column-rule-width", "-webkit-column-rule-width", NULL, NULL),
+ "column-span" => array(NULL, "-webkit-column-span", NULL, NULL),
+ "column-width" => array("-moz-column-width", "-webkit-column-width", NULL, NULL),
+ "columns" => array(NULL, "-webkit-columns", NULL, NULL),
+ "filter" => array(__CLASS__, "filter"),
+ "float-edge" => array("-moz-float-edge", NULL, NULL, NULL),
+ "font-feature-settings" => array("-moz-font-feature-settings", NULL, NULL, NULL),
+ "font-language-override" => array("-moz-font-language-override", NULL, NULL, NULL),
+ "font-size-delta" => array(NULL, "-webkit-font-size-delta", NULL, NULL),
+ "font-smoothing" => array(NULL, "-webkit-font-smoothing", NULL, NULL),
+ "force-broken-image-icon" => array("-moz-force-broken-image-icon", NULL, NULL, NULL),
+ "highlight" => array(NULL, "-webkit-highlight", NULL, NULL),
+ "hyphenate-character" => array(NULL, "-webkit-hyphenate-character", NULL, NULL),
+ "hyphenate-locale" => array(NULL, "-webkit-hyphenate-locale", NULL, NULL),
+ "hyphens" => array(NULL, "-webkit-hyphens", NULL, NULL),
+ "force-broken-image-icon" => array("-moz-image-region", NULL, NULL, NULL),
+ "ime-mode" => array(NULL, NULL, NULL, "-ms-ime-mode"),
+ "interpolation-mode" => array(NULL, NULL, NULL, "-ms-interpolation-mode"),
+ "layout-flow" => array(NULL, NULL, NULL, "-ms-layout-flow"),
+ "layout-grid" => array(NULL, NULL, NULL, "-ms-layout-grid"),
+ "layout-grid-char" => array(NULL, NULL, NULL, "-ms-layout-grid-char"),
+ "layout-grid-line" => array(NULL, NULL, NULL, "-ms-layout-grid-line"),
+ "layout-grid-mode" => array(NULL, NULL, NULL, "-ms-layout-grid-mode"),
+ "layout-grid-type" => array(NULL, NULL, NULL, "-ms-layout-grid-type"),
+ "line-break" => array(NULL, "-webkit-line-break", NULL, "-ms-line-break"),
+ "line-clamp" => array(NULL, "-webkit-line-clamp", NULL, NULL),
+ "line-grid-mode" => array(NULL, NULL, NULL, "-ms-line-grid-mode"),
+ "logical-height" => array(NULL, "-webkit-logical-height", NULL, NULL),
+ "logical-width" => array(NULL, "-webkit-logical-width", NULL, NULL),
+ "margin-after" => array(NULL, "-webkit-margin-after", NULL, NULL),
+ "margin-after-collapse" => array(NULL, "-webkit-margin-after-collapse", NULL, NULL),
+ "margin-before" => array(NULL, "-webkit-margin-before", NULL, NULL),
+ "margin-before-collapse" => array(NULL, "-webkit-margin-before-collapse", NULL, NULL),
+ "margin-bottom-collapse" => array(NULL, "-webkit-margin-bottom-collapse", NULL, NULL),
+ "margin-collapse" => array(NULL, "-webkit-margin-collapse", NULL, NULL),
+ "margin-end" => array("-moz-margin-end", "-webkit-margin-end", NULL, NULL),
+ "margin-start" => array("-moz-margin-start", "-webkit-margin-start", NULL, NULL),
+ "margin-top-collapse" => array(NULL, "-webkit-margin-top-collapse", NULL, NULL),
+ "marquee " => array(NULL, "-webkit-marquee", NULL, NULL),
+ "marquee-direction" => array(NULL, "-webkit-marquee-direction", NULL, NULL),
+ "marquee-increment" => array(NULL, "-webkit-marquee-increment", NULL, NULL),
+ "marquee-repetition" => array(NULL, "-webkit-marquee-repetition", NULL, NULL),
+ "marquee-speed" => array(NULL, "-webkit-marquee-speed", NULL, NULL),
+ "marquee-style" => array(NULL, "-webkit-marquee-style", NULL, NULL),
+ "mask" => array(NULL, "-webkit-mask", NULL, NULL),
+ "mask-attachment" => array(NULL, "-webkit-mask-attachment", NULL, NULL),
+ "mask-box-image" => array(NULL, "-webkit-mask-box-image", NULL, NULL),
+ "mask-clip" => array(NULL, "-webkit-mask-clip", NULL, NULL),
+ "mask-composite" => array(NULL, "-webkit-mask-composite", NULL, NULL),
+ "mask-image" => array(NULL, "-webkit-mask-image", NULL, NULL),
+ "mask-origin" => array(NULL, "-webkit-mask-origin", NULL, NULL),
+ "mask-position" => array(NULL, "-webkit-mask-position", NULL, NULL),
+ "mask-position-x" => array(NULL, "-webkit-mask-position-x", NULL, NULL),
+ "mask-position-y" => array(NULL, "-webkit-mask-position-y", NULL, NULL),
+ "mask-repeat" => array(NULL, "-webkit-mask-repeat", NULL, NULL),
+ "mask-repeat-x" => array(NULL, "-webkit-mask-repeat-x", NULL, NULL),
+ "mask-repeat-y" => array(NULL, "-webkit-mask-repeat-y", NULL, NULL),
+ "mask-size" => array(NULL, "-webkit-mask-size", NULL, NULL),
+ "match-nearest-mail-blockquote-color" => array(NULL, "-webkit-match-nearest-mail-blockquote-color", NULL, NULL),
+ "max-logical-height" => array(NULL, "-webkit-max-logical-height", NULL, NULL),
+ "max-logical-width" => array(NULL, "-webkit-max-logical-width", NULL, NULL),
+ "min-logical-height" => array(NULL, "-webkit-min-logical-height", NULL, NULL),
+ "min-logical-width" => array(NULL, "-webkit-min-logical-width", NULL, NULL),
+ "object-fit" => array(NULL, NULL, "-o-object-fit", NULL),
+ "object-position" => array(NULL, NULL, "-o-object-position", NULL),
+ "opacity" => array(__CLASS__, "opacity"),
+ "outline-radius" => array("-moz-outline-radius", NULL, NULL, NULL),
+ "outline-bottom-left-radius" => array("-moz-outline-radius-bottomleft", NULL, NULL, NULL),
+ "outline-bottom-right-radius" => array("-moz-outline-radius-bottomright", NULL, NULL, NULL),
+ "outline-top-left-radius" => array("-moz-outline-radius-topleft", NULL, NULL, NULL),
+ "outline-top-right-radius" => array("-moz-outline-radius-topright", NULL, NULL, NULL),
+ "padding-after" => array(NULL, "-webkit-padding-after", NULL, NULL),
+ "padding-before" => array(NULL, "-webkit-padding-before", NULL, NULL),
+ "padding-end" => array("-moz-padding-end", "-webkit-padding-end", NULL, NULL),
+ "padding-start" => array("-moz-padding-start", "-webkit-padding-start", NULL, NULL),
+ "perspective" => array(NULL, "-webkit-perspective", NULL, NULL),
+ "perspective-origin" => array(NULL, "-webkit-perspective-origin", NULL, NULL),
+ "perspective-origin-x" => array(NULL, "-webkit-perspective-origin-x", NULL, NULL),
+ "perspective-origin-y" => array(NULL, "-webkit-perspective-origin-y", NULL, NULL),
+ "rtl-ordering" => array(NULL, "-webkit-rtl-ordering", NULL, NULL),
+ "scrollbar-3dlight-color" => array(NULL, NULL, NULL, "-ms-scrollbar-3dlight-color"),
+ "scrollbar-arrow-color" => array(NULL, NULL, NULL, "-ms-scrollbar-arrow-color"),
+ "scrollbar-base-color" => array(NULL, NULL, NULL, "-ms-scrollbar-base-color"),
+ "scrollbar-darkshadow-color" => array(NULL, NULL, NULL, "-ms-scrollbar-darkshadow-color"),
+ "scrollbar-face-color" => array(NULL, NULL, NULL, "-ms-scrollbar-face-color"),
+ "scrollbar-highlight-color" => array(NULL, NULL, NULL, "-ms-scrollbar-highlight-color"),
+ "scrollbar-shadow-color" => array(NULL, NULL, NULL, "-ms-scrollbar-shadow-color"),
+ "scrollbar-track-color" => array(NULL, NULL, NULL, "-ms-scrollbar-track-color"),
+ "stack-sizing" => array("-moz-stack-sizing", NULL, NULL, NULL),
+ "svg-shadow" => array(NULL, "-webkit-svg-shadow", NULL, NULL),
+ "tab-size" => array("-moz-tab-size", NULL, "-o-tab-size", NULL),
+ "table-baseline" => array(NULL, NULL, "-o-table-baseline", NULL),
+ "text-align-last" => array(NULL, NULL, NULL, "-ms-text-align-last"),
+ "text-autospace" => array(NULL, NULL, NULL, "-ms-text-autospace"),
+ "text-combine" => array(NULL, "-webkit-text-combine", NULL, NULL),
+ "text-decorations-in-effect" => array(NULL, "-webkit-text-decorations-in-effect", NULL, NULL),
+ "text-emphasis" => array(NULL, "-webkit-text-emphasis", NULL, NULL),
+ "text-emphasis-color" => array(NULL, "-webkit-text-emphasis-color", NULL, NULL),
+ "text-emphasis-position" => array(NULL, "-webkit-text-emphasis-position", NULL, NULL),
+ "text-emphasis-style" => array(NULL, "-webkit-text-emphasis-style", NULL, NULL),
+ "text-fill-color" => array(NULL, "-webkit-text-fill-color", NULL, NULL),
+ "text-justify" => array(NULL, NULL, NULL, "-ms-text-justify"),
+ "text-kashida-space" => array(NULL, NULL, NULL, "-ms-text-kashida-space"),
+ "text-overflow" => array(NULL, NULL, "-o-text-overflow", "-ms-text-overflow"),
+ "text-security" => array(NULL, "-webkit-text-security", NULL, NULL),
+ "text-size-adjust" => array(NULL, "-webkit-text-size-adjust", NULL, "-ms-text-size-adjust"),
+ "text-stroke" => array(NULL, "-webkit-text-stroke", NULL, NULL),
+ "text-stroke-color" => array(NULL, "-webkit-text-stroke-color", NULL, NULL),
+ "text-stroke-width" => array(NULL, "-webkit-text-stroke-width", NULL, NULL),
+ "text-underline-position" => array(NULL, NULL, NULL, "-ms-text-underline-position"),
+ "transform" => array("-moz-transform", "-webkit-transform", "-o-transform", NULL),
+ "transform-origin" => array("-moz-transform-origin", "-webkit-transform-origin", "-o-transform-origin", NULL),
+ "transform-origin-x" => array(NULL, "-webkit-transform-origin-x", NULL, NULL),
+ "transform-origin-y" => array(NULL, "-webkit-transform-origin-y", NULL, NULL),
+ "transform-origin-z" => array(NULL, "-webkit-transform-origin-z", NULL, NULL),
+ "transform-style" => array(NULL, "-webkit-transform-style", NULL, NULL),
+ "transition" => array("-moz-transition", "-webkit-transition", "-o-transition", NULL),
+ "transition-delay" => array("-moz-transition-delay", "-webkit-transition-delay", "-o-transition-delay", NULL),
+ "transition-duration" => array("-moz-transition-duration", "-webkit-transition-duration", "-o-transition-duration", NULL),
+ "transition-property" => array("-moz-transition-property", "-webkit-transition-property", "-o-transition-property", NULL),
+ "transition-timing-function" => array("-moz-transition-timing-function", "-webkit-transition-timing-function", "-o-transition-timing-function", NULL),
+ "user-drag" => array(NULL, "-webkit-user-drag", NULL, NULL),
+ "user-focus" => array("-moz-user-focus", NULL, NULL, NULL),
+ "user-input" => array("-moz-user-input", NULL, NULL, NULL),
+ "user-modify" => array("-moz-user-modify", "-webkit-user-modify", NULL, NULL),
+ "user-select" => array("-moz-user-select", "-webkit-user-select", NULL, NULL),
+ "white-space" => array(__CLASS__, "whiteSpace"),
+ "window-shadow" => array("-moz-window-shadow", NULL, NULL, NULL),
+ "word-break" => array(NULL, NULL, NULL, "-ms-word-break"),
+ "word-wrap" => array(NULL, NULL, NULL, "-ms-word-wrap"),
+ "writing-mode" => array(NULL, "-webkit-writing-mode", NULL, "-ms-writing-mode"),
+ "zoom" => array(NULL, NULL, NULL, "-ms-zoom")
+ );
+
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value large than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ $r = 0;
+ $transformations = &$this->transformations;
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ if (get_class($tokens[$i]) === "CssRulesetDeclarationToken") {
+ $tProperty = $tokens[$i]->Property;
+ if (isset($transformations[$tProperty])) {
+ $result = array();
+ if (is_callable($transformations[$tProperty])) {
+ $result = call_user_func_array($transformations[$tProperty], array($tokens[$i]));
+ if (!is_array($result) && is_object($result)) {
+ $result = array($result);
+ }
+ } else {
+ $tValue = $tokens[$i]->Value;
+ $tMediaTypes = $tokens[$i]->MediaTypes;
+ foreach ($transformations[$tProperty] as $property) {
+ if ($property !== NULL) {
+ $result[] = new CssRulesetDeclarationToken($property, $tValue, $tMediaTypes);
+ }
+ }
+ }
+ if (count($result) > 0) {
+ array_splice($tokens, $i + 1, 0, $result);
+ $i += count($result);
+ $l += count($result);
+ }
+ }
+ }
+ }
+ return $r;
+ }
+
+ /**
+ * Transforms the Internet Explorer specific declaration property "filter" to Internet Explorer 8+ compatible
+ * declaratiopn property "-ms-filter".
+ *
+ * @param aCssToken $token
+ * @return array
+ */
+ private static function filter($token) {
+ $r = array
+ (
+ new CssRulesetDeclarationToken("-ms-filter", "\"" . $token->Value . "\"", $token->MediaTypes),
+ );
+ return $r;
+ }
+
+ /**
+ * Transforms "opacity: {value}" into browser specific counterparts.
+ *
+ * @param aCssToken $token
+ * @return array
+ */
+ private static function opacity($token) {
+ // Calculate the value for Internet Explorer filter statement
+ $ieValue = (int)((float)$token->Value * 100);
+ $r = array
+ (
+ // Internet Explorer >= 8
+ new CssRulesetDeclarationToken("-ms-filter", "\"alpha(opacity=" . $ieValue . ")\"", $token->MediaTypes),
+ // Internet Explorer >= 4 <= 7
+ new CssRulesetDeclarationToken("filter", "alpha(opacity=" . $ieValue . ")", $token->MediaTypes),
+ new CssRulesetDeclarationToken("zoom", "1", $token->MediaTypes)
+ );
+ return $r;
+ }
+
+ /**
+ * Transforms "white-space: pre-wrap" into browser specific counterparts.
+ *
+ * @param aCssToken $token
+ * @return array
+ */
+ private static function whiteSpace($token) {
+ if (strtolower($token->Value) === "pre-wrap") {
+ $r = array
+ (
+ // Firefox < 3
+ new CssRulesetDeclarationToken("white-space", "-moz-pre-wrap", $token->MediaTypes),
+ // Webkit
+ new CssRulesetDeclarationToken("white-space", "-webkit-pre-wrap", $token->MediaTypes),
+ // Opera >= 4 <= 6
+ new CssRulesetDeclarationToken("white-space", "-pre-wrap", $token->MediaTypes),
+ // Opera >= 7
+ new CssRulesetDeclarationToken("white-space", "-o-pre-wrap", $token->MediaTypes),
+ // Internet Explorer >= 5.5
+ new CssRulesetDeclarationToken("word-wrap", "break-word", $token->MediaTypes)
+ );
+ return $r;
+ } else {
+ return array();
+ }
+ }
}
/**
* This {@link aCssMinifierFilter minifier filter} will convert @keyframes at-rule block to browser specific counterparts.
*
- * @package CssMin/Minifier/Filters
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Filters
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssConvertLevel3AtKeyframesMinifierFilter extends aCssMinifierFilter
{
- /**
- * Implements {@link aCssMinifierFilter::filter()}.
- *
- * @param array $tokens Array of objects of type aCssToken
- * @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array
- */
- public function apply(array &$tokens)
- {
- $r = 0;
- $transformations = array("-moz-keyframes", "-webkit-keyframes");
- for ($i = 0, $l = count($tokens); $i < $l; $i++)
- {
- if (get_class($tokens[$i]) === "CssAtKeyframesStartToken")
- {
- for ($ii = $i; $ii < $l; $ii++)
- {
- if (get_class($tokens[$ii]) === "CssAtKeyframesEndToken")
- {
- break;
- }
- }
- if (get_class($tokens[$ii]) === "CssAtKeyframesEndToken")
- {
- $add = array();
- $source = array();
- for ($iii = $i; $iii <= $ii; $iii++)
- {
- $source[] = clone($tokens[$iii]);
- }
- foreach ($transformations as $transformation)
- {
- $t = array();
- foreach ($source as $token)
- {
- $t[] = clone($token);
- }
- $t[0]->AtRuleName = $transformation;
- $add = array_merge($add, $t);
- }
- if (isset($this->configuration["RemoveSource"]) && $this->configuration["RemoveSource"] === true)
- {
- array_splice($tokens, $i, $ii - $i + 1, $add);
- }
- else
- {
- array_splice($tokens, $ii + 1, 0, $add);
- }
- $l = count($tokens);
- $i = $ii + count($add);
- $r += count($add);
- }
- }
- }
- return $r;
- }
+ /**
+ * Implements {@link aCssMinifierFilter::filter()}.
+ *
+ * @param array $tokens Array of objects of type aCssToken
+ * @return integer Count of added, changed or removed tokens; a return value larger than 0 will rebuild the array
+ */
+ public function apply(array &$tokens) {
+ $r = 0;
+ $transformations = array("-moz-keyframes", "-webkit-keyframes");
+ for ($i = 0, $l = count($tokens); $i < $l; $i++) {
+ if (get_class($tokens[$i]) === "CssAtKeyframesStartToken") {
+ for ($ii = $i; $ii < $l; $ii++) {
+ if (get_class($tokens[$ii]) === "CssAtKeyframesEndToken") {
+ break;
+ }
+ }
+ if (get_class($tokens[$ii]) === "CssAtKeyframesEndToken") {
+ $add = array();
+ $source = array();
+ for ($iii = $i; $iii <= $ii; $iii++) {
+ $source[] = clone($tokens[$iii]);
+ }
+ foreach ($transformations as $transformation) {
+ $t = array();
+ foreach ($source as $token) {
+ $t[] = clone($token);
+ }
+ $t[0]->AtRuleName = $transformation;
+ $add = array_merge($add, $t);
+ }
+ if (isset($this->configuration["RemoveSource"]) && $this->configuration["RemoveSource"] === TRUE) {
+ array_splice($tokens, $i, $ii - $i + 1, $add);
+ } else {
+ array_splice($tokens, $ii + 1, 0, $add);
+ }
+ $l = count($tokens);
+ $i = $ii + count($add);
+ $r += count($add);
+ }
+ }
+ }
+ return $r;
+ }
}
/**
@@ -3415,119 +3149,107 @@ class CssConvertLevel3AtKeyframesMinifierFilter extends aCssMinifierFilter
* color:#4e5aa7;
*
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssConvertHslColorsMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Regular expression matching the value.
- *
- * @var string
- */
- private $reMatch = "/^hsl\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*%\s*,\s*([0-9]+)\s*%\s*\)/iS";
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- if (stripos($token->Value, "hsl") !== false && preg_match($this->reMatch, $token->Value, $m))
- {
- $token->Value = str_replace($m[0], $this->hsl2hex($m[1], $m[2], $m[3]), $token->Value);
- }
- return false;
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
- /**
- * Convert a HSL value to hexadecimal notation.
- *
- * Based on: {@link http://www.easyrgb.com/index.php?X=MATH&H=19#text19}.
- *
- * @param integer $hue Hue
- * @param integer $saturation Saturation
- * @param integer $lightness Lightnesss
- * @return string
- */
- private function hsl2hex($hue, $saturation, $lightness)
- {
- $hue = $hue / 360;
- $saturation = $saturation / 100;
- $lightness = $lightness / 100;
- if ($saturation == 0)
- {
- $red = $lightness * 255;
- $green = $lightness * 255;
- $blue = $lightness * 255;
- }
- else
- {
- if ($lightness < 0.5 )
- {
- $v2 = $lightness * (1 + $saturation);
- }
- else
- {
- $v2 = ($lightness + $saturation) - ($saturation * $lightness);
- }
- $v1 = 2 * $lightness - $v2;
- $red = 255 * self::hue2rgb($v1, $v2, $hue + (1 / 3));
- $green = 255 * self::hue2rgb($v1, $v2, $hue);
- $blue = 255 * self::hue2rgb($v1, $v2, $hue - (1 / 3));
- }
- return "#" . str_pad(dechex(round($red)), 2, "0", STR_PAD_LEFT) . str_pad(dechex(round($green)), 2, "0", STR_PAD_LEFT) . str_pad(dechex(round($blue)), 2, "0", STR_PAD_LEFT);
- }
- /**
- * Apply hue to a rgb color value.
- *
- * @param integer $v1 Value 1
- * @param integer $v2 Value 2
- * @param integer $hue Hue
- * @return integer
- */
- private function hue2rgb($v1, $v2, $hue)
- {
- if ($hue < 0)
- {
- $hue += 1;
- }
- if ($hue > 1)
- {
- $hue -= 1;
- }
- if ((6 * $hue) < 1)
- {
- return ($v1 + ($v2 - $v1) * 6 * $hue);
- }
- if ((2 * $hue) < 1)
- {
- return ($v2);
- }
- if ((3 * $hue) < 2)
- {
- return ($v1 + ($v2 - $v1) * (( 2 / 3) - $hue) * 6);
- }
- return $v1;
- }
+ /**
+ * Regular expression matching the value.
+ *
+ * @var string
+ */
+ private $reMatch = "/^hsl\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*%\s*,\s*([0-9]+)\s*%\s*\)/iS";
+
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ if (stripos($token->Value, "hsl") !== FALSE && preg_match($this->reMatch, $token->Value, $m)) {
+ $token->Value = str_replace($m[0], $this->hsl2hex($m[1], $m[2], $m[3]), $token->Value);
+ }
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
+
+ /**
+ * Convert a HSL value to hexadecimal notation.
+ *
+ * Based on: {@link http://www.easyrgb.com/index.php?X=MATH&H=19#text19}.
+ *
+ * @param integer $hue Hue
+ * @param integer $saturation Saturation
+ * @param integer $lightness Lightnesss
+ * @return string
+ */
+ private function hsl2hex($hue, $saturation, $lightness) {
+ $hue = $hue / 360;
+ $saturation = $saturation / 100;
+ $lightness = $lightness / 100;
+ if ($saturation == 0) {
+ $red = $lightness * 255;
+ $green = $lightness * 255;
+ $blue = $lightness * 255;
+ } else {
+ if ($lightness < 0.5) {
+ $v2 = $lightness * (1 + $saturation);
+ } else {
+ $v2 = ($lightness + $saturation) - ($saturation * $lightness);
+ }
+ $v1 = 2 * $lightness - $v2;
+ $red = 255 * self::hue2rgb($v1, $v2, $hue + (1 / 3));
+ $green = 255 * self::hue2rgb($v1, $v2, $hue);
+ $blue = 255 * self::hue2rgb($v1, $v2, $hue - (1 / 3));
+ }
+ return "#" . str_pad(dechex(round($red)), 2, "0", STR_PAD_LEFT) . str_pad(dechex(round($green)), 2, "0", STR_PAD_LEFT) . str_pad(dechex(round($blue)), 2, "0", STR_PAD_LEFT);
+ }
+
+ /**
+ * Apply hue to a rgb color value.
+ *
+ * @param integer $v1 Value 1
+ * @param integer $v2 Value 2
+ * @param integer $hue Hue
+ * @return integer
+ */
+ private function hue2rgb($v1, $v2, $hue) {
+ if ($hue < 0) {
+ $hue += 1;
+ }
+ if ($hue > 1) {
+ $hue -= 1;
+ }
+ if ((6 * $hue) < 1) {
+ return ($v1 + ($v2 - $v1) * 6 * $hue);
+ }
+ if ((2 * $hue) < 1) {
+ return ($v2);
+ }
+ if ((3 * $hue) < 2) {
+ return ($v1 + ($v2 - $v1) * ((2 / 3) - $hue) * 6);
+ }
+ return $v1;
+ }
}
/**
@@ -3545,94 +3267,93 @@ class CssConvertHslColorsMinifierPlugin extends aCssMinifierPlugin
* font:700 11px monospace;
*
*
- * @package CssMin/Minifier/Pluginsn
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Pluginsn
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssConvertFontWeightMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Array of included declaration properties this plugin will process; others declaration properties will get
- * ignored.
- *
- * @var array
- */
- private $include = array
- (
- "font",
- "font-weight"
- );
- /**
- * Regular expression matching the value.
- *
- * @var string
- */
- private $reMatch = null;
- /**
- * Transformation table used by the {@link CssConvertFontWeightMinifierPlugin::reReplace() replacement method}.
- *
- * @var array
- */
- private $transformation = array
- (
- "normal" => "400",
- "bold" => "700"
- );
- /**
- * Overwrites {@link aCssMinifierPlugin::__construct()}.
- *
- * The constructor will create the {@link CssConvertFontWeightMinifierPlugin::$reMatch replace regular expression}
- * based on the {@link CssConvertFontWeightMinifierPlugin::$transformation transformation table}.
- *
- * @param CssMinifier $minifier The CssMinifier object of this plugin.
- * @return void
- */
- public function __construct(CssMinifier $minifier)
- {
- $this->reMatch = "/(^|\s)+(" . implode("|", array_keys($this->transformation)). ")(\s|$)+/iS";
- parent::__construct($minifier);
- }
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- if (in_array($token->Property, $this->include) && preg_match($this->reMatch, $token->Value, $m))
- {
- $token->Value = preg_replace_callback($this->reMatch, array($this, 'reReplace'), $token->Value);
- }
- return false;
- }
- /**
- * Callback for replacement value.
- *
- * @param array $match
- * @return string
- */
- private function reReplace($match)
- {
- return $match[1] . $this->transformation[strtolower($match[2])] . $match[3];
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
+ /**
+ * Array of included declaration properties this plugin will process; others declaration properties will get
+ * ignored.
+ *
+ * @var array
+ */
+ private $include = array
+ (
+ "font",
+ "font-weight"
+ );
+ /**
+ * Regular expression matching the value.
+ *
+ * @var string
+ */
+ private $reMatch = NULL;
+ /**
+ * Transformation table used by the {@link CssConvertFontWeightMinifierPlugin::reReplace() replacement method}.
+ *
+ * @var array
+ */
+ private $transformation = array
+ (
+ "normal" => "400",
+ "bold" => "700"
+ );
+
+ /**
+ * Overwrites {@link aCssMinifierPlugin::__construct()}.
+ *
+ * The constructor will create the {@link CssConvertFontWeightMinifierPlugin::$reMatch replace regular expression}
+ * based on the {@link CssConvertFontWeightMinifierPlugin::$transformation transformation table}.
+ *
+ * @param CssMinifier $minifier The CssMinifier object of this plugin.
+ * @return void
+ */
+ public function __construct(CssMinifier $minifier) {
+ $this->reMatch = "/(^|\s)+(" . implode("|", array_keys($this->transformation)) . ")(\s|$)+/iS";
+ parent::__construct($minifier);
+ }
+
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ if (in_array($token->Property, $this->include) && preg_match($this->reMatch, $token->Value, $m)) {
+ $token->Value = preg_replace_callback($this->reMatch, array($this, 'reReplace'), $token->Value);
+ }
+ return FALSE;
+ }
+
+ /**
+ * Callback for replacement value.
+ *
+ * @param array $match
+ * @return string
+ */
+ private function reReplace($match) {
+ return $match[1] . $this->transformation[strtolower($match[2])] . $match[3];
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
}
/**
@@ -3654,83 +3375,79 @@ class CssConvertFontWeightMinifierPlugin extends aCssMinifierPlugin
*
* --
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssCompressUnitValuesMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Regular expression used for matching and replacing unit values.
- *
- * @var array
- */
- private $re = array
- (
- "/(^| |-)0\.([0-9]+?)(0+)?(%|em|ex|px|in|cm|mm|pt|pc)/iS" => "\${1}.\${2}\${4}",
- "/(^| )-?(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/iS" => "\${1}0",
- );
- /**
- * Regular expression used for matching and replacing unit values only for non-blacklisted declarations.
- *
- * @var array
- */
- private $reBlacklisted = array(
- "/(^0\s0\s0\s0)|(^0\s0\s0$)|(^0\s0$)/iS" => "0",
- );
- /**
- * Blacklisted properties for the above regular expression.
- *
- * @var array
- */
- private $propertiesBlacklist = array('background-position');
- /**
- * Regular expression matching the value.
- *
- * @var string
- */
- private $reMatch = "/(^| |-)0\.([0-9]+?)(0+)?(%|em|ex|px|in|cm|mm|pt|pc)|(^| )-?(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)|(^0\s0\s0\s0$)|(^0\s0\s0$)|(^0\s0$)/iS";
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- if (preg_match($this->reMatch, $token->Value))
- {
- foreach ($this->re as $reMatch => $reReplace)
- {
- $token->Value = preg_replace($reMatch, $reReplace, $token->Value);
- }
- if (!in_array($token->Property, $this->propertiesBlacklist))
- {
- foreach ($this->reBlacklisted as $reMatch => $reReplace)
- {
- $token->Value = preg_replace($reMatch, $reReplace, $token->Value);
- }
- }
- }
- return false;
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
+ /**
+ * Regular expression used for matching and replacing unit values.
+ *
+ * @var array
+ */
+ private $re = array
+ (
+ "/(^| |-)0\.([0-9]+?)(0+)?(%|em|ex|px|in|cm|mm|pt|pc)/iS" => "\${1}.\${2}\${4}",
+ "/(^| )-?(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/iS" => "\${1}0",
+ );
+ /**
+ * Regular expression used for matching and replacing unit values only for non-blacklisted declarations.
+ *
+ * @var array
+ */
+ private $reBlacklisted = array(
+ "/(^0\s0\s0\s0)|(^0\s0\s0$)|(^0\s0$)/iS" => "0",
+ );
+ /**
+ * Blacklisted properties for the above regular expression.
+ *
+ * @var array
+ */
+ private $propertiesBlacklist = array('background-position');
+ /**
+ * Regular expression matching the value.
+ *
+ * @var string
+ */
+ private $reMatch = "/(^| |-)0\.([0-9]+?)(0+)?(%|em|ex|px|in|cm|mm|pt|pc)|(^| )-?(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)|(^0\s0\s0\s0$)|(^0\s0\s0$)|(^0\s0$)/iS";
+
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ if (preg_match($this->reMatch, $token->Value)) {
+ foreach ($this->re as $reMatch => $reReplace) {
+ $token->Value = preg_replace($reMatch, $reReplace, $token->Value);
+ }
+ if (!in_array($token->Property, $this->propertiesBlacklist)) {
+ foreach ($this->reBlacklisted as $reMatch => $reReplace) {
+ $token->Value = preg_replace($reMatch, $reReplace, $token->Value);
+ }
+ }
+ }
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
}
/**
@@ -3739,46 +3456,44 @@ class CssCompressUnitValuesMinifierPlugin extends aCssMinifierPlugin
* For compression of expressions {@link https://github.com/rgrove/jsmin-php/ JSMin} will get used. JSMin have to be
* already included or loadable via {@link http://goo.gl/JrW54 PHP autoloading}.
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssCompressExpressionValuesMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- if (class_exists("JSMin") && stripos($token->Value, "expression(") !== false)
- {
- $value = $token->Value;
- $value = substr($token->Value, stripos($token->Value, "expression(") + 10);
- $value = trim(JSMin::minify($value));
- $token->Value = "expression(" . $value . ")";
- }
- return false;
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ if (class_exists("JSMin") && stripos($token->Value, "expression(") !== FALSE) {
+ $value = $token->Value;
+ $value = substr($token->Value, stripos($token->Value, "expression(") + 10);
+ $value = trim(JSMin::minify($value));
+ $token->Value = "expression(" . $value . ")";
+ }
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
}
/**
@@ -3795,92 +3510,90 @@ class CssCompressExpressionValuesMinifierPlugin extends aCssMinifierPlugin
* color:#abc;
*
*
- * @package CssMin/Minifier/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Minifier/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssCompressColorValuesMinifierPlugin extends aCssMinifierPlugin
{
- /**
- * Regular expression matching 6 char hexadecimal color values.
- *
- * @var string
- */
- private $reMatch = "/\#([0-9a-f]{6})/iS";
- /**
- * Implements {@link aCssMinifierPlugin::minify()}.
- *
- * @param aCssToken $token Token to process
- * @return boolean Return TRUE to break the processing of this token; FALSE to continue
- */
- public function apply(aCssToken &$token)
- {
- if (strpos($token->Value, "#") !== false && preg_match($this->reMatch, $token->Value, $m))
- {
- $value = strtolower($m[1]);
- if ($value[0] == $value[1] && $value[2] == $value[3] && $value[4] == $value[5])
- {
- $token->Value = str_replace($m[0], "#" . $value[0] . $value[2] . $value[4], $token->Value);
- }
- }
- return false;
- }
- /**
- * Implements {@link aMinifierPlugin::getTriggerTokens()}
- *
- * @return array
- */
- public function getTriggerTokens()
- {
- return array
- (
- "CssAtFontFaceDeclarationToken",
- "CssAtPageDeclarationToken",
- "CssRulesetDeclarationToken"
- );
- }
+ /**
+ * Regular expression matching 6 char hexadecimal color values.
+ *
+ * @var string
+ */
+ private $reMatch = "/\#([0-9a-f]{6})/iS";
+
+ /**
+ * Implements {@link aCssMinifierPlugin::minify()}.
+ *
+ * @param aCssToken $token Token to process
+ * @return boolean Return TRUE to break the processing of this token; FALSE to continue
+ */
+ public function apply(aCssToken &$token) {
+ if (strpos($token->Value, "#") !== FALSE && preg_match($this->reMatch, $token->Value, $m)) {
+ $value = strtolower($m[1]);
+ if ($value[0] == $value[1] && $value[2] == $value[3] && $value[4] == $value[5]) {
+ $token->Value = str_replace($m[0], "#" . $value[0] . $value[2] . $value[4], $token->Value);
+ }
+ }
+ return FALSE;
+ }
+
+ /**
+ * Implements {@link aMinifierPlugin::getTriggerTokens()}
+ *
+ * @return array
+ */
+ public function getTriggerTokens() {
+ return array
+ (
+ "CssAtFontFaceDeclarationToken",
+ "CssAtPageDeclarationToken",
+ "CssRulesetDeclarationToken"
+ );
+ }
}
/**
* This {@link aCssToken CSS token} represents a CSS comment.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssCommentToken extends aCssToken
{
- /**
- * Comment as Text.
- *
- * @var string
- */
- public $Comment = "";
- /**
- * Set the properties of a comment token.
- *
- * @param string $comment Comment including comment delimiters
- * @return void
- */
- public function __construct($comment)
- {
- $this->Comment = $comment;
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->Comment;
- }
+ /**
+ * Comment as Text.
+ *
+ * @var string
+ */
+ public $Comment = "";
+
+ /**
+ * Set the properties of a comment token.
+ *
+ * @param string $comment Comment including comment delimiters
+ * @return void
+ */
+ public function __construct($comment) {
+ $this->Comment = $comment;
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return $this->Comment;
+ }
}
/**
@@ -3888,107 +3601,102 @@ class CssCommentToken extends aCssToken
*
* Adds a {@link CssCommentToken} to the parser if a comment was found.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssCommentParserPlugin extends aCssParserPlugin
{
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array("*", "/");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return false;
- }
- /**
- * Stored buffer for restore.
- *
- * @var string
- */
- private $restoreBuffer = "";
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- if ($char === "*" && $previousChar === "/" && $state !== "T_COMMENT")
- {
- $this->parser->pushState("T_COMMENT");
- $this->parser->setExclusive(__CLASS__);
- $this->restoreBuffer = substr($this->parser->getAndClearBuffer(), 0, -2);
- }
- elseif ($char === "/" && $previousChar === "*" && $state === "T_COMMENT")
- {
- $this->parser->popState();
- $this->parser->unsetExclusive();
- $this->parser->appendToken(new CssCommentToken("/*" . $this->parser->getAndClearBuffer()));
- $this->parser->setBuffer($this->restoreBuffer);
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array("*", "/");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return FALSE;
+ }
+
+ /**
+ * Stored buffer for restore.
+ *
+ * @var string
+ */
+ private $restoreBuffer = "";
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ if ($char === "*" && $previousChar === "/" && $state !== "T_COMMENT") {
+ $this->parser->pushState("T_COMMENT");
+ $this->parser->setExclusive(__CLASS__);
+ $this->restoreBuffer = substr($this->parser->getAndClearBuffer(), 0, -2);
+ } else if ($char === "/" && $previousChar === "*" && $state === "T_COMMENT") {
+ $this->parser->popState();
+ $this->parser->unsetExclusive();
+ $this->parser->appendToken(new CssCommentToken("/*" . $this->parser->getAndClearBuffer()));
+ $this->parser->setBuffer($this->restoreBuffer);
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
* This {@link aCssToken CSS token} represents the start of a @variables at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtVariablesStartToken extends aCssAtBlockStartToken
{
- /**
- * Media types of the @variables at-rule block.
- *
- * @var array
- */
- public $MediaTypes = array();
- /**
- * Set the properties of a @variables at-rule token.
- *
- * @param array $mediaTypes Media types
- * @return void
- */
- public function __construct($mediaTypes = null)
- {
- $this->MediaTypes = $mediaTypes ? $mediaTypes : array("all");
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "";
- }
+ /**
+ * Media types of the @variables at-rule block.
+ *
+ * @var array
+ */
+ public $MediaTypes = array();
+
+ /**
+ * Set the properties of a @variables at-rule token.
+ *
+ * @param array $mediaTypes Media types
+ * @return void
+ */
+ public function __construct($mediaTypes = NULL) {
+ $this->MediaTypes = $mediaTypes ? $mediaTypes : array("all");
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "";
+ }
}
/**
@@ -3997,188 +3705,169 @@ class CssAtVariablesStartToken extends aCssAtBlockStartToken
* Found @variables at-rule blocks will add a {@link CssAtVariablesStartToken} and {@link CssAtVariablesEndToken} to the
* parser; including declarations as {@link CssAtVariablesDeclarationToken}.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtVariablesParserPlugin extends aCssParserPlugin
{
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array("@", "{", "}", ":", ";");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return array("T_DOCUMENT", "T_AT_VARIABLES::PREPARE", "T_AT_VARIABLES", "T_AT_VARIABLES_DECLARATION");
- }
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- // Start of @variables at-rule block
- if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 10)) === "@variables")
- {
- $this->parser->pushState("T_AT_VARIABLES::PREPARE");
- $this->parser->clearBuffer();
- return $index + 10;
- }
- // Start of @variables declarations
- elseif ($char === "{" && $state === "T_AT_VARIABLES::PREPARE")
- {
- $this->parser->setState("T_AT_VARIABLES");
- $mediaTypes = array_filter(array_map("trim", explode(",", $this->parser->getAndClearBuffer("{"))));
- $this->parser->appendToken(new CssAtVariablesStartToken($mediaTypes));
- }
- // Start of @variables declaration
- if ($char === ":" && $state === "T_AT_VARIABLES")
- {
- $this->buffer = $this->parser->getAndClearBuffer(":");
- $this->parser->pushState("T_AT_VARIABLES_DECLARATION");
- }
- // Unterminated @variables declaration
- elseif ($char === ":" && $state === "T_AT_VARIABLES_DECLARATION")
- {
- // Ignore Internet Explorer filter declarations
- if ($this->buffer === "filter")
- {
- return false;
- }
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @variables declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_"));
- }
- // End of @variables declaration
- elseif (($char === ";" || $char === "}") && $state === "T_AT_VARIABLES_DECLARATION")
- {
- $value = $this->parser->getAndClearBuffer(";}");
- if (strtolower(substr($value, -10, 10)) === "!important")
- {
- $value = trim(substr($value, 0, -10));
- $isImportant = true;
- }
- else
- {
- $isImportant = false;
- }
- $this->parser->popState();
- $this->parser->appendToken(new CssAtVariablesDeclarationToken($this->buffer, $value, $isImportant));
- $this->buffer = "";
- }
- // End of @variables at-rule block
- elseif ($char === "}" && $state === "T_AT_VARIABLES")
- {
- $this->parser->popState();
- $this->parser->clearBuffer();
- $this->parser->appendToken(new CssAtVariablesEndToken());
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array("@", "{", "}", ":", ";");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return array("T_DOCUMENT", "T_AT_VARIABLES::PREPARE", "T_AT_VARIABLES", "T_AT_VARIABLES_DECLARATION");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ // Start of @variables at-rule block
+ if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 10)) === "@variables") {
+ $this->parser->pushState("T_AT_VARIABLES::PREPARE");
+ $this->parser->clearBuffer();
+ return $index + 10;
+ } // Start of @variables declarations
+ else if ($char === "{" && $state === "T_AT_VARIABLES::PREPARE") {
+ $this->parser->setState("T_AT_VARIABLES");
+ $mediaTypes = array_filter(array_map("trim", explode(",", $this->parser->getAndClearBuffer("{"))));
+ $this->parser->appendToken(new CssAtVariablesStartToken($mediaTypes));
+ }
+ // Start of @variables declaration
+ if ($char === ":" && $state === "T_AT_VARIABLES") {
+ $this->buffer = $this->parser->getAndClearBuffer(":");
+ $this->parser->pushState("T_AT_VARIABLES_DECLARATION");
+ } // Unterminated @variables declaration
+ else if ($char === ":" && $state === "T_AT_VARIABLES_DECLARATION") {
+ // Ignore Internet Explorer filter declarations
+ if ($this->buffer === "filter") {
+ return FALSE;
+ }
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @variables declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_"));
+ } // End of @variables declaration
+ else if (($char === ";" || $char === "}") && $state === "T_AT_VARIABLES_DECLARATION") {
+ $value = $this->parser->getAndClearBuffer(";}");
+ if (strtolower(substr($value, -10, 10)) === "!important") {
+ $value = trim(substr($value, 0, -10));
+ $isImportant = TRUE;
+ } else {
+ $isImportant = FALSE;
+ }
+ $this->parser->popState();
+ $this->parser->appendToken(new CssAtVariablesDeclarationToken($this->buffer, $value, $isImportant));
+ $this->buffer = "";
+ } // End of @variables at-rule block
+ else if ($char === "}" && $state === "T_AT_VARIABLES") {
+ $this->parser->popState();
+ $this->parser->clearBuffer();
+ $this->parser->appendToken(new CssAtVariablesEndToken());
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
* This {@link aCssToken CSS token} represents the end of a @variables at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtVariablesEndToken extends aCssAtBlockEndToken
{
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "";
- }
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "";
+ }
}
/**
* This {@link aCssToken CSS token} represents a declaration of a @variables at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtVariablesDeclarationToken extends aCssDeclarationToken
{
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "";
- }
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "";
+ }
}
/**
* This {@link aCssToken CSS token} represents the start of a @page at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtPageStartToken extends aCssAtBlockStartToken
{
- /**
- * Selector.
- *
- * @var string
- */
- public $Selector = "";
- /**
- * Sets the properties of the @page at-rule.
- *
- * @param string $selector Selector
- * @return void
- */
- public function __construct($selector = "")
- {
- $this->Selector = $selector;
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "@page" . ($this->Selector ? " " . $this->Selector : "") . "{";
- }
+ /**
+ * Selector.
+ *
+ * @var string
+ */
+ public $Selector = "";
+
+ /**
+ * Sets the properties of the @page at-rule.
+ *
+ * @param string $selector Selector
+ * @return void
+ */
+ public function __construct($selector = "") {
+ $this->Selector = $selector;
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "@page" . ($this->Selector ? " " . $this->Selector : "") . "{";
+ }
}
/**
@@ -4187,121 +3876,102 @@ class CssAtPageStartToken extends aCssAtBlockStartToken
* Found @page at-rule blocks will add a {@link CssAtPageStartToken} and {@link CssAtPageEndToken} to the
* parser; including declarations as {@link CssAtPageDeclarationToken}.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtPageParserPlugin extends aCssParserPlugin
{
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array("@", "{", "}", ":", ";");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return array("T_DOCUMENT", "T_AT_PAGE::SELECTOR", "T_AT_PAGE", "T_AT_PAGE_DECLARATION");
- }
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- // Start of @page at-rule block
- if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 5)) === "@page")
- {
- $this->parser->pushState("T_AT_PAGE::SELECTOR");
- $this->parser->clearBuffer();
- return $index + 5;
- }
- // Start of @page declarations
- elseif ($char === "{" && $state === "T_AT_PAGE::SELECTOR")
- {
- $selector = $this->parser->getAndClearBuffer("{");
- $this->parser->setState("T_AT_PAGE");
- $this->parser->clearBuffer();
- $this->parser->appendToken(new CssAtPageStartToken($selector));
- }
- // Start of @page declaration
- elseif ($char === ":" && $state === "T_AT_PAGE")
- {
- $this->parser->pushState("T_AT_PAGE_DECLARATION");
- $this->buffer = $this->parser->getAndClearBuffer(":", true);
- }
- // Unterminated @font-face declaration
- elseif ($char === ":" && $state === "T_AT_PAGE_DECLARATION")
- {
- // Ignore Internet Explorer filter declarations
- if ($this->buffer === "filter")
- {
- return false;
- }
- CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @page declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_"));
- }
- // End of @page declaration
- elseif (($char === ";" || $char === "}") && $state == "T_AT_PAGE_DECLARATION")
- {
- $value = $this->parser->getAndClearBuffer(";}");
- if (strtolower(substr($value, -10, 10)) == "!important")
- {
- $value = trim(substr($value, 0, -10));
- $isImportant = true;
- }
- else
- {
- $isImportant = false;
- }
- $this->parser->popState();
- $this->parser->appendToken(new CssAtPageDeclarationToken($this->buffer, $value, $isImportant));
- // --
- if ($char === "}")
- {
- $this->parser->popState();
- $this->parser->appendToken(new CssAtPageEndToken());
- }
- $this->buffer = "";
- }
- // End of @page at-rule block
- elseif ($char === "}" && $state === "T_AT_PAGE")
- {
- $this->parser->popState();
- $this->parser->clearBuffer();
- $this->parser->appendToken(new CssAtPageEndToken());
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array("@", "{", "}", ":", ";");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return array("T_DOCUMENT", "T_AT_PAGE::SELECTOR", "T_AT_PAGE", "T_AT_PAGE_DECLARATION");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ // Start of @page at-rule block
+ if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 5)) === "@page") {
+ $this->parser->pushState("T_AT_PAGE::SELECTOR");
+ $this->parser->clearBuffer();
+ return $index + 5;
+ } // Start of @page declarations
+ else if ($char === "{" && $state === "T_AT_PAGE::SELECTOR") {
+ $selector = $this->parser->getAndClearBuffer("{");
+ $this->parser->setState("T_AT_PAGE");
+ $this->parser->clearBuffer();
+ $this->parser->appendToken(new CssAtPageStartToken($selector));
+ } // Start of @page declaration
+ else if ($char === ":" && $state === "T_AT_PAGE") {
+ $this->parser->pushState("T_AT_PAGE_DECLARATION");
+ $this->buffer = $this->parser->getAndClearBuffer(":", TRUE);
+ } // Unterminated @font-face declaration
+ else if ($char === ":" && $state === "T_AT_PAGE_DECLARATION") {
+ // Ignore Internet Explorer filter declarations
+ if ($this->buffer === "filter") {
+ return FALSE;
+ }
+ CssMin::triggerError(new CssError(__FILE__, __LINE__, __METHOD__ . ": Unterminated @page declaration", $this->buffer . ":" . $this->parser->getBuffer() . "_"));
+ } // End of @page declaration
+ else if (($char === ";" || $char === "}") && $state == "T_AT_PAGE_DECLARATION") {
+ $value = $this->parser->getAndClearBuffer(";}");
+ if (strtolower(substr($value, -10, 10)) == "!important") {
+ $value = trim(substr($value, 0, -10));
+ $isImportant = TRUE;
+ } else {
+ $isImportant = FALSE;
+ }
+ $this->parser->popState();
+ $this->parser->appendToken(new CssAtPageDeclarationToken($this->buffer, $value, $isImportant));
+ // --
+ if ($char === "}") {
+ $this->parser->popState();
+ $this->parser->appendToken(new CssAtPageEndToken());
+ }
+ $this->buffer = "";
+ } // End of @page at-rule block
+ else if ($char === "}" && $state === "T_AT_PAGE") {
+ $this->parser->popState();
+ $this->parser->clearBuffer();
+ $this->parser->appendToken(new CssAtPageEndToken());
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
* This {@link aCssToken CSS token} represents the end of a @page at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtPageEndToken extends aCssAtBlockEndToken
{
@@ -4311,12 +3981,12 @@ class CssAtPageEndToken extends aCssAtBlockEndToken
/**
* This {@link aCssToken CSS token} represents a declaration of a @page at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtPageDeclarationToken extends aCssDeclarationToken
{
@@ -4326,34 +3996,33 @@ class CssAtPageDeclarationToken extends aCssDeclarationToken
/**
* This {@link aCssToken CSS token} represents the start of a @media at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtMediaStartToken extends aCssAtBlockStartToken
{
- /**
- * Sets the properties of the @media at-rule.
- *
- * @param array $mediaTypes Media types
- * @return void
- */
- public function __construct(array $mediaTypes = array())
- {
- $this->MediaTypes = $mediaTypes;
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return "@media " . implode(",", $this->MediaTypes) . "{";
- }
+ /**
+ * Sets the properties of the @media at-rule.
+ *
+ * @param array $mediaTypes Media types
+ * @return void
+ */
+ public function __construct(array $mediaTypes = array()) {
+ $this->MediaTypes = $mediaTypes;
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return "@media " . implode(",", $this->MediaTypes) . "{";
+ }
}
/**
@@ -4363,80 +4032,72 @@ class CssAtMediaStartToken extends aCssAtBlockStartToken
* This plugin will also set the the current media types using {@link CssParser::setMediaTypes()} and
* {@link CssParser::unsetMediaTypes()}.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Parser/Plugins
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtMediaParserPlugin extends aCssParserPlugin
{
- /**
- * Implements {@link aCssParserPlugin::getTriggerChars()}.
- *
- * @return array
- */
- public function getTriggerChars()
- {
- return array("@", "{", "}");
- }
- /**
- * Implements {@link aCssParserPlugin::getTriggerStates()}.
- *
- * @return array
- */
- public function getTriggerStates()
- {
- return array("T_DOCUMENT", "T_AT_MEDIA::PREPARE", "T_AT_MEDIA");
- }
- /**
- * Implements {@link aCssParserPlugin::parse()}.
- *
- * @param integer $index Current index
- * @param string $char Current char
- * @param string $previousChar Previous char
- * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
- */
- public function parse($index, $char, $previousChar, $state)
- {
- if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 6)) === "@media")
- {
- $this->parser->pushState("T_AT_MEDIA::PREPARE");
- $this->parser->clearBuffer();
- return $index + 6;
- }
- elseif ($char === "{" && $state === "T_AT_MEDIA::PREPARE")
- {
- $mediaTypes = array_filter(array_map("trim", explode(",", $this->parser->getAndClearBuffer("{"))));
- $this->parser->setMediaTypes($mediaTypes);
- $this->parser->setState("T_AT_MEDIA");
- $this->parser->appendToken(new CssAtMediaStartToken($mediaTypes));
- }
- elseif ($char === "}" && $state === "T_AT_MEDIA")
- {
- $this->parser->appendToken(new CssAtMediaEndToken());
- $this->parser->clearBuffer();
- $this->parser->unsetMediaTypes();
- $this->parser->popState();
- }
- else
- {
- return false;
- }
- return true;
- }
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerChars()}.
+ *
+ * @return array
+ */
+ public function getTriggerChars() {
+ return array("@", "{", "}");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::getTriggerStates()}.
+ *
+ * @return array
+ */
+ public function getTriggerStates() {
+ return array("T_DOCUMENT", "T_AT_MEDIA::PREPARE", "T_AT_MEDIA");
+ }
+
+ /**
+ * Implements {@link aCssParserPlugin::parse()}.
+ *
+ * @param integer $index Current index
+ * @param string $char Current char
+ * @param string $previousChar Previous char
+ * @return mixed TRUE will break the processing; FALSE continue with the next plugin; integer set a new index and break the processing
+ */
+ public function parse($index, $char, $previousChar, $state) {
+ if ($char === "@" && $state === "T_DOCUMENT" && strtolower(substr($this->parser->getSource(), $index, 6)) === "@media") {
+ $this->parser->pushState("T_AT_MEDIA::PREPARE");
+ $this->parser->clearBuffer();
+ return $index + 6;
+ } else if ($char === "{" && $state === "T_AT_MEDIA::PREPARE") {
+ $mediaTypes = array_filter(array_map("trim", explode(",", $this->parser->getAndClearBuffer("{"))));
+ $this->parser->setMediaTypes($mediaTypes);
+ $this->parser->setState("T_AT_MEDIA");
+ $this->parser->appendToken(new CssAtMediaStartToken($mediaTypes));
+ } else if ($char === "}" && $state === "T_AT_MEDIA") {
+ $this->parser->appendToken(new CssAtMediaEndToken());
+ $this->parser->clearBuffer();
+ $this->parser->unsetMediaTypes();
+ $this->parser->popState();
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+ }
}
/**
* This {@link aCssToken CSS token} represents the end of a @media at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtMediaEndToken extends aCssAtBlockEndToken
{
@@ -4446,104 +4107,102 @@ class CssAtMediaEndToken extends aCssAtBlockEndToken
/**
* This {@link aCssToken CSS token} represents the start of a @keyframes at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtKeyframesStartToken extends aCssAtBlockStartToken
{
- /**
- * Name of the at-rule.
- *
- * @var string
- */
- public $AtRuleName = "keyframes";
- /**
- * Name
- *
- * @var string
- */
- public $Name = "";
- /**
- * Sets the properties of the @page at-rule.
- *
- * @param string $selector Selector
- * @return void
- */
- public function __construct($name, $atRuleName = null)
- {
- $this->Name = $name;
- if (!is_null($atRuleName))
- {
- $this->AtRuleName = $atRuleName;
- }
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- if ($this->AtRuleName === "-moz-keyframes")
- {
- return "@-moz-keyframes " . $this->Name . " {";
- }
- return "@" . $this->AtRuleName . " " . $this->Name . "{";
- }
+ /**
+ * Name of the at-rule.
+ *
+ * @var string
+ */
+ public $AtRuleName = "keyframes";
+ /**
+ * Name
+ *
+ * @var string
+ */
+ public $Name = "";
+
+ /**
+ * Sets the properties of the @page at-rule.
+ *
+ * @param string $selector Selector
+ * @return void
+ */
+ public function __construct($name, $atRuleName = NULL) {
+ $this->Name = $name;
+ if (!is_null($atRuleName)) {
+ $this->AtRuleName = $atRuleName;
+ }
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ if ($this->AtRuleName === "-moz-keyframes") {
+ return "@-moz-keyframes " . $this->Name . " {";
+ }
+ return "@" . $this->AtRuleName . " " . $this->Name . "{";
+ }
}
/**
* This {@link aCssToken CSS token} represents the start of a ruleset of a @keyframes at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtKeyframesRulesetStartToken extends aCssRulesetStartToken
{
- /**
- * Array of selectors.
- *
- * @var array
- */
- public $Selectors = array();
- /**
- * Set the properties of a ruleset token.
- *
- * @param array $selectors Selectors of the ruleset
- * @return void
- */
- public function __construct(array $selectors = array())
- {
- $this->Selectors = $selectors;
- }
- /**
- * Implements {@link aCssToken::__toString()}.
- *
- * @return string
- */
- public function __toString()
- {
- return implode(",", $this->Selectors) . "{";
- }
+ /**
+ * Array of selectors.
+ *
+ * @var array
+ */
+ public $Selectors = array();
+
+ /**
+ * Set the properties of a ruleset token.
+ *
+ * @param array $selectors Selectors of the ruleset
+ * @return void
+ */
+ public function __construct(array $selectors = array()) {
+ $this->Selectors = $selectors;
+ }
+
+ /**
+ * Implements {@link aCssToken::__toString()}.
+ *
+ * @return string
+ */
+ public function __toString() {
+ return implode(",", $this->Selectors) . "{";
+ }
}
/**
* This {@link aCssToken CSS token} represents the end of a ruleset of a @keyframes at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtKeyframesRulesetEndToken extends aCssRulesetEndToken
{
@@ -4553,12 +4212,12 @@ class CssAtKeyframesRulesetEndToken extends aCssRulesetEndToken
/**
* This {@link aCssToken CSS token} represents a ruleset declaration of a @keyframes at-rule block.
*
- * @package CssMin/Tokens
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla
- * @copyright 2008 - 2011 Joe Scylla
- * @license http://opensource.org/licenses/mit-license.php MIT License
- * @version 3.0.1
+ * @package CssMin/Tokens
+ * @link http://code.google.com/p/cssmin/
+ * @author Joe Scylla
+ * @copyright 2008 - 2011 Joe Scylla
+ * @license http://opensource.org/licenses/mit-license.php MIT License
+ * @version 3.0.1
*/
class CssAtKeyframesRulesetDeclarationToken extends aCssDeclarationToken
{
@@ -4568,188 +4227,156 @@ class CssAtKeyframesRulesetDeclarationToken extends aCssDeclarationToken
/**
* {@link aCssParserPlugin Parser plugin} for parsing @keyframes at-rule blocks, rulesets and declarations.
*
- * @package CssMin/Parser/Plugins
- * @link http://code.google.com/p/cssmin/
- * @author Joe Scylla