From fcd89a81a86b99ce87ef605331a16518b45b5143 Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Wed, 9 May 2018 09:53:17 +0000 Subject: [PATCH] Library updates, footer adjustments + fix problem with inlining SVGs from a subdirectory. WIP #1912 @2 --- wp-content/themes/physioassist/composer.lock | 793 +-- .../assets/styles/layouts/footer.styl | 11 +- .../resources/views/partials/footer.blade.php | 6 +- .../themes/physioassist/vendor/autoload.php | 2 +- .../src/Branch/BranchPostTypeArchive.php | 2 +- .../vendor/composer/autoload_files.php | 3 +- .../vendor/composer/autoload_psr4.php | 4 +- .../vendor/composer/autoload_real.php | 14 +- .../vendor/composer/autoload_static.php | 31 +- .../vendor/composer/installed.json | 1517 +++--- .../vendor/composer/installers/.travis.yml | 1 + .../vendor/composer/installers/CHANGELOG.md | 17 + .../vendor/composer/installers/README.md | 7 +- .../vendor/composer/installers/composer.json | 5 +- .../Composer/Installers/CakePHPInstaller.php | 1 - .../Composer/Installers/EliasisInstaller.php | 5 +- .../src/Composer/Installers/Installer.php | 15 +- .../Composer/Installers/MajimaInstaller.php | 37 + .../src/Composer/Installers/ModxInstaller.php | 12 + .../Composer/Installers/OctoberInstaller.php | 6 +- .../Composer/Installers/PxcmsInstaller.php | 63 + .../Composer/Installers/ShopwareInstaller.php | 4 +- .../Installers/SilverStripeInstaller.php | 3 +- .../Installers/SiteDirectInstaller.php | 25 + .../Installers/WordPressInstaller.php | 1 + .../Installers/Test/AsgardInstallerTest.php | 3 +- .../Installers/Test/BitrixInstallerTest.php | 3 +- .../Installers/Test/CakePHPInstallerTest.php | 1 - .../Installers/Test/DokuWikiInstallerTest.php | 3 +- .../Installers/Test/InstallerTest.php | 18 +- .../Installers/Test/MayaInstallerTest.php | 3 +- .../Test/MediaWikiInstallerTest.php | 3 +- .../Installers/Test/OctoberInstallerTest.php | 5 +- .../Installers/Test/OntoWikiInstallerTest.php | 5 +- .../Test/SiteDirectInstallerTest.php | 120 + .../Installers/Test/SyDESInstallerTest.php | 3 +- .../Composer/Installers/Test/TestCase.php | 3 +- .../Installers/Test/VgmcpInstallerTest.php | 3 +- .../vendor/doctrine/inflector/composer.json | 6 +- .../Doctrine/Common/Inflector/Inflector.php | 119 +- .../vendor/illuminate/config/Repository.php | 27 +- .../vendor/illuminate/config/composer.json | 8 +- .../vendor/illuminate/console/Application.php | 61 +- .../vendor/illuminate/console/Command.php | 59 +- .../console/Events/CommandFinished.php | 54 + .../console/Events/CommandStarting.php | 45 + .../illuminate/console/GeneratorCommand.php | 14 +- .../vendor/illuminate/console/Parser.php | 6 +- .../console/Scheduling/CacheEventMutex.php | 81 + .../console/Scheduling/CacheMutex.php | 59 - .../Scheduling/CacheSchedulingMutex.php | 75 + .../console/Scheduling/CallbackEvent.php | 47 +- .../console/Scheduling/CommandBuilder.php | 6 +- .../illuminate/console/Scheduling/Event.php | 96 +- .../Scheduling/{Mutex.php => EventMutex.php} | 8 +- .../console/Scheduling/ManagesFrequencies.php | 118 +- .../console/Scheduling/Schedule.php | 83 +- .../Scheduling/ScheduleFinishCommand.php | 2 +- .../console/Scheduling/ScheduleRunCommand.php | 63 +- .../console/Scheduling/SchedulingMutex.php | 26 + .../vendor/illuminate/console/composer.json | 15 +- .../illuminate/container/BoundMethod.php | 2 +- .../vendor/illuminate/container/Container.php | 70 +- .../container/EntryNotFoundException.php | 11 + .../vendor/illuminate/container/composer.json | 7 +- .../illuminate/contracts/Auth/Access/Gate.php | 22 +- .../contracts/Broadcasting/Factory.php | 2 +- .../Broadcasting/ShouldBroadcast.php | 4 +- .../illuminate/contracts/Bus/Dispatcher.php | 24 + .../illuminate/contracts/Cache/Factory.php | 2 +- .../illuminate/contracts/Cache/Lock.php | 30 + .../contracts/Cache/LockProvider.php | 15 + .../contracts/Cache/LockTimeoutException.php | 10 + .../illuminate/contracts/Cache/Repository.php | 16 +- .../contracts/Config/Repository.php | 2 +- .../contracts/Console/Application.php | 5 +- .../illuminate/contracts/Console/Kernel.php | 5 +- .../Container/BindingResolutionException.php | 3 +- .../contracts/Container/Container.php | 18 +- .../illuminate/contracts/Cookie/Factory.php | 8 +- .../contracts/Database/ModelIdentifier.php | 20 +- .../contracts/Filesystem/Filesystem.php | 4 +- .../contracts/Foundation/Application.php | 23 +- .../illuminate/contracts/Hashing/Hasher.php | 8 + .../illuminate/contracts/Logging/Log.php | 98 - .../illuminate/contracts/Mail/MailQueue.php | 14 +- .../illuminate/contracts/Mail/Mailable.php | 6 +- .../illuminate/contracts/Mail/Mailer.php | 24 +- .../contracts/Pagination/Paginator.php | 7 + .../vendor/illuminate/contracts/Queue/Job.php | 37 +- .../illuminate/contracts/Queue/Queue.php | 12 +- .../contracts/Queue/QueueableCollection.php | 14 + .../contracts/Queue/QueueableEntity.php | 14 + .../illuminate/contracts/Redis/Connection.php | 35 + .../Redis/LimiterTimeoutException.php | 10 + .../contracts/Routing/Registrar.php | 2 +- .../contracts/Routing/ResponseFactory.php | 13 +- .../contracts/Routing/UrlRoutable.php | 8 + .../contracts/Support/MessageBag.php | 21 +- .../contracts/Support/Responsable.php | 14 + .../contracts/Translation/Loader.php | 40 + .../contracts/Validation/ImplicitRule.php | 8 + .../illuminate/contracts/Validation/Rule.php | 22 + .../Validation/ValidatesWhenResolved.php | 2 +- .../contracts/Validation/Validator.php | 7 + .../View/Engine.php} | 4 +- .../vendor/illuminate/contracts/composer.json | 6 +- .../illuminate/events/CallQueuedHandler.php | 86 - .../illuminate/events/CallQueuedListener.php | 19 + .../vendor/illuminate/events/Dispatcher.php | 72 +- .../vendor/illuminate/events/composer.json | 10 +- .../vendor/illuminate/filesystem/Cache.php | 77 + .../illuminate/filesystem/Filesystem.php | 30 +- .../filesystem/FilesystemAdapter.php | 196 +- .../filesystem/FilesystemManager.php | 81 +- .../illuminate/filesystem/composer.json | 14 +- .../vendor/illuminate/support/Arr.php | 112 +- .../vendor/illuminate/support/Carbon.php | 48 + .../vendor/illuminate/support/Collection.php | 428 +- .../vendor/illuminate/support/Composer.php | 1 - .../illuminate/support/Debug/Dumper.php | 2 +- .../illuminate/support/Facades/Artisan.php | 2 +- .../illuminate/support/Facades/Blade.php | 17 + .../illuminate/support/Facades/Broadcast.php | 2 + .../vendor/illuminate/support/Facades/Bus.php | 7 + .../illuminate/support/Facades/Cache.php | 15 + .../illuminate/support/Facades/Config.php | 7 + .../illuminate/support/Facades/Cookie.php | 4 + .../illuminate/support/Facades/Crypt.php | 3 + .../vendor/illuminate/support/Facades/DB.php | 21 + .../illuminate/support/Facades/Event.php | 15 +- .../illuminate/support/Facades/File.php | 36 + .../illuminate/support/Facades/Gate.php | 14 + .../illuminate/support/Facades/Hash.php | 5 + .../illuminate/support/Facades/Input.php | 39 + .../illuminate/support/Facades/Lang.php | 5 + .../vendor/illuminate/support/Facades/Log.php | 12 +- .../illuminate/support/Facades/Mail.php | 8 + .../support/Facades/Notification.php | 23 +- .../illuminate/support/Facades/Password.php | 5 + .../illuminate/support/Facades/Queue.php | 11 + .../illuminate/support/Facades/Redirect.php | 13 + .../illuminate/support/Facades/Redis.php | 2 + .../illuminate/support/Facades/Request.php | 39 + .../illuminate/support/Facades/Response.php | 13 + .../illuminate/support/Facades/Route.php | 39 +- .../illuminate/support/Facades/Schema.php | 6 + .../illuminate/support/Facades/Session.php | 22 + .../illuminate/support/Facades/Storage.php | 26 +- .../vendor/illuminate/support/Facades/URL.php | 8 + .../illuminate/support/Facades/Validator.php | 5 + .../illuminate/support/Facades/View.php | 9 + .../vendor/illuminate/support/Fluent.php | 14 +- .../support/HigherOrderCollectionProxy.php | 3 + .../illuminate/support/InteractsWithTime.php | 64 + .../vendor/illuminate/support/Manager.php | 6 + .../vendor/illuminate/support/MessageBag.php | 13 +- .../support/NamespacedItemResolver.php | 12 +- .../vendor/illuminate/support/Optional.php | 129 + .../vendor/illuminate/support/Pluralizer.php | 5 + .../illuminate/support/ProcessUtils.php | 69 + .../illuminate/support/ServiceProvider.php | 59 +- .../vendor/illuminate/support/Str.php | 352 +- .../support/Testing/Fakes/BusFake.php | 54 +- .../support/Testing/Fakes/EventFake.php | 69 +- .../support/Testing/Fakes/MailFake.php | 148 +- .../Testing/Fakes/NotificationFake.php | 38 +- .../support/Testing/Fakes/PendingMailFake.php | 8 +- .../support/Testing/Fakes/QueueFake.php | 121 +- .../illuminate/support/Traits/Localizable.php | 31 + .../illuminate/support/Traits/Macroable.php | 45 +- .../illuminate/support/ViewErrorBag.php | 13 + .../vendor/illuminate/support/composer.json | 20 +- .../vendor/illuminate/support/helpers.php | 199 +- .../view/Compilers/BladeCompiler.php | 181 +- .../Concerns/CompilesConditionals.php | 129 + .../view/Compilers/Concerns/CompilesEchos.php | 2 +- .../Compilers/Concerns/CompilesHelpers.php | 49 + .../Compilers/Concerns/CompilesIncludes.php | 15 +- .../view/Compilers/Concerns/CompilesJson.php | 30 + .../Compilers/Concerns/CompilesRawPhp.php | 14 +- .../Concerns/CompilesTranslations.php | 4 +- .../view/Concerns/ManagesEvents.php | 4 +- .../view/Concerns/ManagesLayouts.php | 11 +- .../illuminate/view/Concerns/ManagesLoops.php | 2 +- .../view/Engines/EngineResolver.php | 6 +- .../illuminate/view/Engines/FileEngine.php | 4 +- .../illuminate/view/Engines/PhpEngine.php | 3 +- .../vendor/illuminate/view/Factory.php | 25 +- .../vendor/illuminate/view/FileViewFinder.php | 4 +- .../vendor/illuminate/view/View.php | 27 +- .../illuminate/view/ViewServiceProvider.php | 21 +- .../vendor/illuminate/view/composer.json | 16 +- .../log1x/blade-svg-sage/src/helpers.php | 2 +- .../vendor/nesbot/carbon/.php_cs.dist | 25 +- .../vendor/nesbot/carbon/build.php | 87 + .../vendor/nesbot/carbon/composer.json | 23 +- .../vendor/nesbot/carbon/readme.md | 12 +- .../nesbot/carbon/src/Carbon/Carbon.php | 2183 ++++++-- .../carbon/src/Carbon/CarbonInterval.php | 288 +- .../nesbot/carbon/src/Carbon/Lang/af.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/ar.php | 6 +- .../carbon/src/Carbon/Lang/ar_Shakl.php | 31 + .../nesbot/carbon/src/Carbon/Lang/az.php | 4 +- .../nesbot/carbon/src/Carbon/Lang/bg.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/ca.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/cs.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/cy.php | 29 + .../nesbot/carbon/src/Carbon/Lang/da.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/de.php | 44 +- .../nesbot/carbon/src/Carbon/Lang/dv_MV.php | 31 + .../nesbot/carbon/src/Carbon/Lang/el.php | 34 +- .../nesbot/carbon/src/Carbon/Lang/en.php | 33 +- .../nesbot/carbon/src/Carbon/Lang/eo.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/es.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/et.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/fi.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/fo.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/fr.php | 29 +- .../nesbot/carbon/src/Carbon/Lang/gl.php | 14 +- .../nesbot/carbon/src/Carbon/Lang/gu.php | 31 + .../nesbot/carbon/src/Carbon/Lang/hy.php | 18 +- .../nesbot/carbon/src/Carbon/Lang/it.php | 35 +- .../nesbot/carbon/src/Carbon/Lang/ja.php | 36 +- .../nesbot/carbon/src/Carbon/Lang/kk.php | 29 + .../nesbot/carbon/src/Carbon/Lang/mk.php | 14 +- .../nesbot/carbon/src/Carbon/Lang/mn.php | 62 + .../nesbot/carbon/src/Carbon/Lang/nl.php | 20 +- .../nesbot/carbon/src/Carbon/Lang/no.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/pl.php | 32 +- .../nesbot/carbon/src/Carbon/Lang/ps.php | 31 + .../nesbot/carbon/src/Carbon/Lang/pt.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/pt_BR.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/sk.php | 9 +- .../nesbot/carbon/src/Carbon/Lang/sq.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/sr.php | 6 + .../nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php | 38 + .../nesbot/carbon/src/Carbon/Lang/sr_ME.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/sv.php | 28 +- .../nesbot/carbon/src/Carbon/Lang/th.php | 36 +- .../nesbot/carbon/src/Carbon/Lang/uk.php | 2 +- .../nesbot/carbon/src/Carbon/Lang/uz.php | 30 +- .../nesbot/carbon/src/Carbon/Lang/zh_TW.php | 30 +- .../nesbot/carbon/src/Carbon/Translator.php | 143 + .../nesbot/carbon/src/JsonSerializable.php | 16 + .../paragonie/random_compat/build-phar.sh | 5 - .../paragonie/random_compat/composer.json | 37 - .../dist/random_compat.phar.pubkey | 5 - .../dist/random_compat.phar.pubkey.asc | 11 - .../random_compat/lib/byte_safe_strings.php | 181 - .../random_compat/lib/cast_to_int.php | 74 - .../random_compat/lib/error_polyfill.php | 49 - .../paragonie/random_compat/lib/random.php | 223 - .../lib/random_bytes_com_dotnet.php | 88 - .../lib/random_bytes_dev_urandom.php | 167 - .../lib/random_bytes_libsodium.php | 88 - .../lib/random_bytes_libsodium_legacy.php | 92 - .../random_compat/lib/random_bytes_mcrypt.php | 77 - .../random_compat/lib/random_int.php | 190 - .../random_compat/other/build_phar.php | 57 - .../random_compat/psalm-autoload.php | 9 - .../vendor/paragonie/random_compat/psalm.xml | 15 - .../vendor/psr/container/.gitignore | 3 + .../physioassist/vendor/psr/container/LICENSE | 21 + .../vendor/psr/container/README.md | 5 + .../vendor/psr/container/composer.json | 27 + .../src/ContainerExceptionInterface.php | 13 + .../psr/container/src/ContainerInterface.php | 37 + .../src/NotFoundExceptionInterface.php | 13 + .../vendor/psr/simple-cache/.editorconfig | 12 + .../vendor/psr/simple-cache/LICENSE.md | 21 + .../vendor/psr/simple-cache/README.md | 8 + .../vendor/psr/simple-cache/composer.json | 25 + .../psr/simple-cache/src/CacheException.php | 10 + .../psr/simple-cache/src/CacheInterface.php | 114 + .../src/InvalidArgumentException.php | 13 + .../vendor/roots/sage-installer/.travis.yml | 1 - .../sage-installer/LICENSE.md} | 17 +- .../vendor/roots/sage-installer/README.md | 19 + .../vendor/roots/sage-installer/composer.json | 9 +- .../vendor/roots/sage-installer/composer.lock | 374 +- .../src/Console/Commands/Command.php | 2 +- .../src/Console/Commands/PresetCommand.php | 29 +- .../sage-installer/src/Presets/Bootstrap.php | 4 +- .../src/Presets/FontAwesome.php | 15 - .../sage-installer/src/Presets/Tachyons.php | 2 +- .../Bootstrap/styles/common/_variables.scss | 5 + .../stubs/Bulma/styles/common/_variables.scss | 2 +- .../styles/autoload/_fontawesome.scss | 3 - .../Foundation/styles/common/_variables.scss | 2 +- .../stubs/None/styles/common/_variables.scss | 2 +- .../Tachyons/styles/common/_variables.scss | 2 +- .../src/Transformations/ThemeHeaders.php | 8 +- .../vendor/roots/sage-lib/Config.php | 1 + .../vendor/roots/sage-lib/composer.json | 4 +- .../vendor/roots/sage-lib/composer.lock | 492 +- .../vendor/symfony/console/Application.php | 362 +- .../vendor/symfony/console/CHANGELOG.md | 23 + .../symfony/console/Command/Command.php | 64 +- .../symfony/console/Command/HelpCommand.php | 5 - .../symfony/console/Command/LockableTrait.php | 31 +- .../CommandLoader/CommandLoaderInterface.php | 37 + .../CommandLoader/ContainerCommandLoader.php | 55 + .../CommandLoader/FactoryCommandLoader.php | 62 + .../vendor/symfony/console/ConsoleEvents.php | 21 - .../AddConsoleCommandPass.php | 68 +- .../Descriptor/ApplicationDescription.php | 29 +- .../symfony/console/Descriptor/Descriptor.php | 15 - .../Descriptor/DescriptorInterface.php | 2 +- .../console/Descriptor/JsonDescriptor.php | 13 +- .../console/Descriptor/MarkdownDescriptor.php | 2 +- .../console/Descriptor/TextDescriptor.php | 20 +- .../console/Descriptor/XmlDescriptor.php | 29 +- .../console/Event/ConsoleCommandEvent.php | 2 - .../console/Event/ConsoleErrorEvent.php | 41 +- .../console/Event/ConsoleExceptionEvent.php | 71 - .../console/Event/ConsoleTerminateEvent.php | 7 +- .../console/EventListener/ErrorListener.php | 8 +- .../Exception/CommandNotFoundException.php | 10 +- .../console/Formatter/OutputFormatter.php | 31 +- .../Formatter/OutputFormatterStyle.php | 6 +- .../OutputFormatterStyleInterface.php | 2 - .../Formatter/OutputFormatterStyleStack.php | 14 - .../console/Helper/DescriptorHelper.php | 3 - .../vendor/symfony/console/Helper/Helper.php | 8 +- .../console/Helper/HelperInterface.php | 2 - .../symfony/console/Helper/HelperSet.php | 7 - .../symfony/console/Helper/ProcessHelper.php | 5 +- .../symfony/console/Helper/ProgressBar.php | 181 +- .../console/Helper/ProgressIndicator.php | 6 +- .../symfony/console/Helper/QuestionHelper.php | 88 +- .../console/Helper/SymfonyQuestionHelper.php | 24 - .../vendor/symfony/console/Helper/Table.php | 80 +- .../symfony/console/Helper/TableCell.php | 17 +- .../symfony/console/Helper/TableSeparator.php | 3 - .../symfony/console/Input/ArgvInput.php | 32 +- .../symfony/console/Input/ArrayInput.php | 22 +- .../vendor/symfony/console/Input/Input.php | 8 - .../symfony/console/Input/InputArgument.php | 6 +- .../symfony/console/Input/InputDefinition.php | 14 +- .../symfony/console/Input/InputInterface.php | 8 +- .../symfony/console/Input/InputOption.php | 10 +- .../symfony/console/Input/StringInput.php | 6 +- .../vendor/symfony/console/LICENSE | 2 +- .../symfony/console/Logger/ConsoleLogger.php | 45 +- .../symfony/console/Output/BufferedOutput.php | 3 - .../symfony/console/Output/ConsoleOutput.php | 7 +- .../console/Output/ConsoleOutputInterface.php | 5 - .../vendor/symfony/console/Output/Output.php | 4 +- .../console/Output/OutputInterface.php | 5 - .../symfony/console/Output/StreamOutput.php | 27 +- .../console/Question/ChoiceQuestion.php | 11 +- .../console/Question/ConfirmationQuestion.php | 6 +- .../symfony/console/Question/Question.php | 16 +- .../symfony/console/Style/OutputStyle.php | 3 - .../symfony/console/Style/StyleInterface.php | 11 +- .../symfony/console/Style/SymfonyStyle.php | 25 +- .../symfony/console/Tester/CommandTester.php | 9 +- .../symfony/console/Tests/ApplicationTest.php | 293 +- .../console/Tests/Command/CommandTest.php | 10 +- .../Tests/Command/LockableTraitTest.php | 14 +- .../ContainerCommandLoaderTest.php | 61 + .../FactoryCommandLoaderTest.php | 60 + .../AddConsoleCommandPassTest.php | 79 +- .../Tests/EventListener/ErrorListenerTest.php | 12 +- .../Fixtures/FooSameCaseLowercaseCommand.php | 11 + .../Fixtures/FooSameCaseUppercaseCommand.php | 11 + .../console/Tests/Fixtures/TestTiti.php | 21 + .../console/Tests/Fixtures/TestToto.php | 22 + .../Fixtures/application_renderexception1.txt | 7 +- .../Fixtures/application_renderexception2.txt | 7 +- .../Fixtures/application_renderexception3.txt | 6 +- .../application_renderexception3decorated.txt | 6 +- .../Fixtures/application_renderexception4.txt | 9 +- ...plication_renderexception_doublewidth1.txt | 2 +- ..._renderexception_doublewidth1decorated.txt | 2 +- ...plication_renderexception_doublewidth2.txt | 2 +- ...plication_renderexception_escapeslines.txt | 2 +- ...application_renderexception_linebreaks.txt | 11 + .../console/Tests/Fixtures/command_2.txt | 6 +- .../Tests/Fixtures/command_mbstring.txt | 6 +- .../Tests/Formatter/OutputFormatterTest.php | 14 +- .../Tests/Helper/ProcessHelperTest.php | 5 +- .../Tests/Helper/QuestionHelperTest.php | 465 +- .../console/Tests/Helper/TableTest.php | 16 + .../console/Tests/Input/ArgvInputTest.php | 44 + .../console/Tests/Input/ArrayInputTest.php | 6 + .../console/Tests/Input/InputArgumentTest.php | 22 +- .../console/Tests/Input/InputOptionTest.php | 22 +- .../Tests/Logger/ConsoleLoggerTest.php | 4 +- .../vendor/symfony/console/composer.json | 25 +- .../vendor/symfony/debug/CHANGELOG.md | 11 + .../vendor/symfony/debug/Debug.php | 5 +- .../vendor/symfony/debug/DebugClassLoader.php | 208 +- .../vendor/symfony/debug/ErrorHandler.php | 198 +- .../Exception/ClassNotFoundException.php | 2 +- .../debug/Exception/ContextErrorException.php | 40 - .../debug/Exception/FatalErrorException.php | 7 +- .../debug/Exception/FatalThrowableError.php | 3 +- .../debug/Exception/SilencedErrorContext.php | 2 +- .../Exception/UndefinedFunctionException.php | 2 +- .../Exception/UndefinedMethodException.php | 2 +- .../vendor/symfony/debug/ExceptionHandler.php | 42 +- .../ClassNotFoundFatalErrorHandler.php | 29 +- .../physioassist/vendor/symfony/debug/LICENSE | 2 +- .../symfony/debug/Resources/ext/README.md | 134 - .../symfony/debug/Resources/ext/config.m4 | 63 - .../symfony/debug/Resources/ext/config.w32 | 13 - .../debug/Resources/ext/php_symfony_debug.h | 60 - .../debug/Resources/ext/symfony_debug.c | 283 -- .../debug/Resources/ext/tests/001.phpt | 153 - .../debug/Resources/ext/tests/002.phpt | 63 - .../debug/Resources/ext/tests/002_1.phpt | 46 - .../debug/Resources/ext/tests/003.phpt | 85 - .../debug/Tests/DebugClassLoaderTest.php | 137 +- .../symfony/debug/Tests/ErrorHandlerTest.php | 75 +- .../Tests/Exception/FlattenExceptionTest.php | 14 +- ...UndefinedFunctionFatalErrorHandlerTest.php | 2 +- .../debug/Tests/Fixtures/AnnotatedClass.php | 13 + .../debug/Tests/Fixtures/DeprecatedClass.php | 2 +- .../Tests/Fixtures/DeprecatedInterface.php | 2 +- .../debug/Tests/Fixtures/FinalClass.php | 2 +- .../debug/Tests/Fixtures/FinalMethod.php | 2 +- .../debug/Tests/Fixtures/InternalClass.php | 15 + .../Tests/Fixtures/InternalInterface.php | 10 + .../debug/Tests/Fixtures/InternalTrait.php | 10 + .../debug/Tests/Fixtures/InternalTrait2.php | 23 + .../symfony/debug/Tests/Fixtures/Throwing.php | 3 + .../debug/Tests/phpt/debug_class_loader.phpt | 26 + .../Tests/phpt/decorate_exception_hander.phpt | 47 + .../debug/Tests/phpt/exception_rethrown.phpt | 35 + .../phpt/fatal_with_nested_handlers.phpt | 42 + .../vendor/symfony/debug/composer.json | 8 +- .../vendor/symfony/finder/CHANGELOG.md | 12 + .../finder/Comparator/DateComparator.php | 4 +- .../finder/Comparator/NumberComparator.php | 4 +- .../finder/Exception/ExceptionInterface.php | 25 - .../vendor/symfony/finder/Finder.php | 54 +- .../finder/Iterator/CustomFilterIterator.php | 4 +- .../Iterator/DateRangeFilterIterator.php | 4 +- .../Iterator/DepthRangeFilterIterator.php | 6 +- .../ExcludeDirectoryFilterIterator.php | 4 +- .../Iterator/FileTypeFilterIterator.php | 6 +- .../finder/Iterator/FilterIterator.php | 58 - .../Iterator/MultiplePcreFilterIterator.php | 4 +- .../Iterator/RecursiveDirectoryIterator.php | 18 +- .../Iterator/SizeRangeFilterIterator.php | 4 +- .../finder/Iterator/SortableIterator.php | 2 - .../vendor/symfony/finder/LICENSE | 2 +- .../vendor/symfony/finder/SplFileInfo.php | 4 +- .../symfony/finder/Tests/FinderTest.php | 55 +- .../Tests/Iterator/FilterIteratorTest.php | 51 - .../finder/Tests/Iterator/MockSplFileInfo.php | 6 +- .../Tests/Iterator/SortableIteratorTest.php | 6 +- .../vendor/symfony/finder/composer.json | 4 +- .../vendor/symfony/polyfill-mbstring/LICENSE | 2 +- .../symfony/polyfill-mbstring/Mbstring.php | 165 +- .../symfony/polyfill-mbstring/bootstrap.php | 2 + .../symfony/polyfill-mbstring/composer.json | 2 +- .../vendor/symfony/process/CHANGELOG.md | 6 + .../Exception/ProcessTimedOutException.php | 4 +- .../symfony/process/ExecutableFinder.php | 2 - .../vendor/symfony/process/InputStream.php | 4 +- .../vendor/symfony/process/LICENSE | 2 +- .../symfony/process/PhpExecutableFinder.php | 6 +- .../vendor/symfony/process/PhpProcess.php | 4 +- .../symfony/process/Pipes/AbstractPipes.php | 9 +- .../symfony/process/Pipes/UnixPipes.php | 5 +- .../symfony/process/Pipes/WindowsPipes.php | 4 - .../vendor/symfony/process/Process.php | 98 +- .../vendor/symfony/process/ProcessBuilder.php | 18 +- .../vendor/symfony/process/ProcessUtils.php | 2 +- .../symfony/process/Tests/PhpProcessTest.php | 2 +- .../process/Tests/ProcessBuilderTest.php | 6 +- .../Tests/ProcessFailedExceptionTest.php | 10 +- .../symfony/process/Tests/ProcessTest.php | 44 +- .../vendor/symfony/process/composer.json | 4 +- .../vendor/symfony/translation/CHANGELOG.md | 22 + .../Catalogue/AbstractOperation.php | 14 - .../translation/Command/XliffLintCommand.php | 5 +- .../TranslationDataCollector.php | 27 +- .../translation/DataCollectorTranslator.php | 3 - .../TranslationDumperPass.php | 44 + .../TranslationExtractorPass.php | 49 + .../DependencyInjection/TranslatorPass.php | 79 + .../translation/Dumper/CsvFileDumper.php | 4 +- .../symfony/translation/Dumper/FileDumper.php | 30 +- .../translation/Dumper/JsonFileDumper.php | 2 +- .../translation/Dumper/XliffFileDumper.php | 22 +- .../translation/Dumper/YamlFileDumper.php | 9 +- .../Extractor/AbstractFileExtractor.php | 11 +- .../Extractor/ExtractorInterface.php | 2 +- .../translation/Extractor/PhpExtractor.php | 256 + .../Extractor/PhpStringTokenParser.php | 142 + .../ChoiceMessageFormatterInterface.php | 30 + .../Formatter/MessageFormatter.php | 48 + .../Formatter/MessageFormatterInterface.php | 30 + .../translation/IdentityTranslator.php | 2 - .../vendor/symfony/translation/LICENSE | 2 +- .../translation/Loader/CsvFileLoader.php | 6 +- .../symfony/translation/Loader/FileLoader.php | 2 +- .../translation/Loader/IcuDatFileLoader.php | 1 - .../translation/Loader/IcuResFileLoader.php | 7 +- .../translation/Loader/MoFileLoader.php | 19 +- .../translation/Loader/PoFileLoader.php | 17 +- .../translation/Loader/QtFileLoader.php | 2 +- .../translation/Loader/XliffFileLoader.php | 99 +- .../translation/Loader/YamlFileLoader.php | 3 +- .../symfony/translation/LoggingTranslator.php | 3 - .../symfony/translation/MessageCatalogue.php | 6 +- .../translation/MessageCatalogueInterface.php | 6 - .../symfony/translation/MessageSelector.php | 12 +- .../translation/PluralizationRules.php | 29 +- .../translation/Reader/TranslationReader.php | 63 + .../Reader/TranslationReaderInterface.php | 30 + .../schemas/xliff-core-1.2-strict.xsd | 4446 ++++++++--------- .../TranslationDumperPassTest.php | 48 + .../TranslationExtractorPassTest.php | 66 + .../TranslationPassTest.php | 57 + .../Tests/Dumper/FileDumperTest.php | 23 +- .../Tests/Dumper/XliffFileDumperTest.php | 25 + .../Tests/Extractor/PhpExtractorTest.php | 95 + .../Tests/Formatter/MessageFormatterTest.php | 82 + .../Tests/Loader/XliffFileLoaderTest.php | 69 + .../translation/Tests/MessageSelectorTest.php | 4 + .../Tests/PluralizationRulesTest.php | 4 +- .../translation/Tests/TranslatorTest.php | 29 +- .../Tests/Writer/TranslationWriterTest.php | 4 +- .../fixtures/extractor/resource.format.engine | 0 .../this.is.a.template.format.engine | 0 .../fixtures/extractor/translation.html.php | 49 + .../Tests/fixtures/resources-2.0-clean.xlf | 6 +- .../resources-2.0-multi-segment-unit.xlf | 17 + .../Tests/fixtures/resources-clean.xlf | 6 +- .../Tests/fixtures/resources-notes-meta.xlf | 26 + .../fixtures/resources-target-attributes.xlf | 2 +- .../Tests/fixtures/resources-tool-info.xlf | 2 +- .../vendor/symfony/translation/Translator.php | 62 +- .../translation/Writer/TranslationWriter.php | 12 +- .../Writer/TranslationWriterInterface.php | 34 + .../vendor/symfony/translation/composer.json | 19 +- .../vendor/symfony/yaml/CHANGELOG.md | 18 + .../symfony/yaml/Command/LintCommand.php | 19 +- .../vendor/symfony/yaml/Dumper.php | 15 +- .../symfony/yaml/Exception/ParseException.php | 2 - .../vendor/symfony/yaml/Inline.php | 208 +- .../physioassist/vendor/symfony/yaml/LICENSE | 2 +- .../vendor/symfony/yaml/Parser.php | 310 +- .../yaml/Tests/Command/LintCommandTest.php | 20 +- .../vendor/symfony/yaml/Tests/DumperTest.php | 25 +- .../Fixtures/YtsSpecificationExamples.yml | 11 +- .../yaml/Tests/Fixtures/YtsTypeTransfers.yml | 6 +- .../multiple_lines_as_literal_block.yml | 1 + ...eral_block_leading_space_in_first_line.yml | 4 + .../yaml/Tests/Fixtures/not_readable.yml | 18 + .../yaml/Tests/Fixtures/sfMergeKey.yml | 8 +- .../vendor/symfony/yaml/Tests/InlineTest.php | 108 +- .../vendor/symfony/yaml/Tests/ParserTest.php | 475 +- .../physioassist/vendor/symfony/yaml/Yaml.php | 39 +- .../vendor/symfony/yaml/composer.json | 9 +- 560 files changed, 17020 insertions(+), 11101 deletions(-) create mode 100644 wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php create mode 100644 wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php create mode 100644 wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php create mode 100644 wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php create mode 100644 wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandFinished.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandStarting.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheEventMutex.php delete mode 100644 wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheMutex.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheSchedulingMutex.php rename wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/{Mutex.php => EventMutex.php} (71%) create mode 100644 wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/SchedulingMutex.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/container/EntryNotFoundException.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Lock.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/LockProvider.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/LockTimeoutException.php delete mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Logging/Log.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Redis/Connection.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Redis/LimiterTimeoutException.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Support/Responsable.php create mode 100755 wp-content/themes/physioassist/vendor/illuminate/contracts/Translation/Loader.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Validation/ImplicitRule.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/contracts/Validation/Rule.php rename wp-content/themes/physioassist/vendor/illuminate/{view/Engines/EngineInterface.php => contracts/View/Engine.php} (77%) delete mode 100644 wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedHandler.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/filesystem/Cache.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/support/Carbon.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/support/InteractsWithTime.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/support/Optional.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/support/ProcessUtils.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/support/Traits/Localizable.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesHelpers.php create mode 100644 wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesJson.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/build.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gu.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/kk.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ps.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Translator.php create mode 100644 wp-content/themes/physioassist/vendor/nesbot/carbon/src/JsonSerializable.php delete mode 100755 wp-content/themes/physioassist/vendor/paragonie/random_compat/build-phar.sh delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/composer.json delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/byte_safe_strings.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/cast_to_int.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/error_polyfill.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_int.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/other/build_phar.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/psalm-autoload.php delete mode 100644 wp-content/themes/physioassist/vendor/paragonie/random_compat/psalm.xml create mode 100644 wp-content/themes/physioassist/vendor/psr/container/.gitignore create mode 100644 wp-content/themes/physioassist/vendor/psr/container/LICENSE create mode 100644 wp-content/themes/physioassist/vendor/psr/container/README.md create mode 100644 wp-content/themes/physioassist/vendor/psr/container/composer.json create mode 100644 wp-content/themes/physioassist/vendor/psr/container/src/ContainerExceptionInterface.php create mode 100644 wp-content/themes/physioassist/vendor/psr/container/src/ContainerInterface.php create mode 100644 wp-content/themes/physioassist/vendor/psr/container/src/NotFoundExceptionInterface.php create mode 100644 wp-content/themes/physioassist/vendor/psr/simple-cache/.editorconfig create mode 100644 wp-content/themes/physioassist/vendor/psr/simple-cache/LICENSE.md create mode 100644 wp-content/themes/physioassist/vendor/psr/simple-cache/README.md create mode 100644 wp-content/themes/physioassist/vendor/psr/simple-cache/composer.json create mode 100644 wp-content/themes/physioassist/vendor/psr/simple-cache/src/CacheException.php create mode 100644 wp-content/themes/physioassist/vendor/psr/simple-cache/src/CacheInterface.php create mode 100644 wp-content/themes/physioassist/vendor/psr/simple-cache/src/InvalidArgumentException.php rename wp-content/themes/physioassist/vendor/{paragonie/random_compat/LICENSE => roots/sage-installer/LICENSE.md} (59%) create mode 100644 wp-content/themes/physioassist/vendor/roots/sage-installer/README.md delete mode 100644 wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/FontAwesome.php delete mode 100644 wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/stubs/FontAwesome/styles/autoload/_fontawesome.scss create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php delete mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleExceptionEvent.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestTiti.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestToto.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_linebreaks.txt delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Exception/ContextErrorException.php delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/README.md delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.m4 delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.w32 delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/php_symfony_debug.h delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/symfony_debug.c delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/001.phpt delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002.phpt delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002_1.phpt delete mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/003.phpt create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/InternalClass.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/InternalInterface.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/InternalTrait.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/InternalTrait2.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/Throwing.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/debug_class_loader.phpt create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt create mode 100644 wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt delete mode 100644 wp-content/themes/physioassist/vendor/symfony/finder/Exception/ExceptionInterface.php delete mode 100644 wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FilterIterator.php delete mode 100644 wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/FilterIteratorTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslatorPass.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpExtractor.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpStringTokenParser.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Formatter/ChoiceMessageFormatterInterface.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatter.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatterInterface.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReader.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReaderInterface.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationPassTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/Extractor/PhpExtractorTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/Formatter/MessageFormatterTest.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/resource.format.engine create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/this.is.a.template.format.engine create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/translation.html.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-multi-segment-unit.xlf create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-notes-meta.xlf create mode 100644 wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriterInterface.php create mode 100644 wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block_leading_space_in_first_line.yml create mode 100644 wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/not_readable.yml diff --git a/wp-content/themes/physioassist/composer.lock b/wp-content/themes/physioassist/composer.lock index 19b09e45..af19864a 100644 --- a/wp-content/themes/physioassist/composer.lock +++ b/wp-content/themes/physioassist/composer.lock @@ -9,16 +9,16 @@ "packages": [ { "name": "brain/hierarchy", - "version": "2.3.0", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/Brain-WP/Hierarchy.git", - "reference": "adb52da233e586051a577ef5eabe2c537df785d5" + "reference": "239f9bbe49ff6ad1199bbcad308d2c7977bee25a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Brain-WP/Hierarchy/zipball/adb52da233e586051a577ef5eabe2c537df785d5", - "reference": "adb52da233e586051a577ef5eabe2c537df785d5", + "url": "https://api.github.com/repos/Brain-WP/Hierarchy/zipball/239f9bbe49ff6ad1199bbcad308d2c7977bee25a", + "reference": "239f9bbe49ff6ad1199bbcad308d2c7977bee25a", "shasum": "" }, "require": { @@ -61,20 +61,20 @@ "keywords": [ "wordpress" ], - "time": "2016-09-15 13:33:53" + "time": "2017-12-28 17:16:07" }, { "name": "composer/installers", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b" + "reference": "049797d727261bf27f2690430d935067710049c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", - "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", + "url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2", + "reference": "049797d727261bf27f2690430d935067710049c2", "shasum": "" }, "require": { @@ -86,7 +86,7 @@ }, "require-dev": { "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" + "phpunit/phpunit": "^4.8.36" }, "type": "composer-plugin", "extra": { @@ -157,15 +157,18 @@ "lavalite", "lithium", "magento", + "majima", "mako", "mediawiki", "modulework", + "modx", "moodle", "osclass", "phpbb", "piwik", "ppi", "puppet", + "pxcms", "reindex", "roundcube", "shopware", @@ -178,24 +181,24 @@ "zend", "zikula" ], - "time": "2017-08-09 07:53:48" + "time": "2017-12-29 09:13:20" }, { "name": "doctrine/inflector", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^6.2" @@ -203,7 +206,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -245,7 +248,7 @@ "singularize", "string" ], - "time": "2017-07-22 12:18:28" + "time": "2018-01-09 20:05:19" }, { "name": "hassankhan/config", @@ -306,27 +309,27 @@ }, { "name": "illuminate/config", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9" + "reference": "e8158dff3189deed846c84c66c60fa68c21ee579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/8fe700aa596bc623d347e4578041fbda7a44c3d9", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9", + "url": "https://api.github.com/repos/illuminate/config/zipball/e8158dff3189deed846c84c66c60fa68c21ee579", + "reference": "e8158dff3189deed846c84c66c60fa68c21ee579", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -346,30 +349,31 @@ ], "description": "The Illuminate Config package.", "homepage": "https://laravel.com", - "time": "2017-02-04 20:27:32" + "time": "2017-11-07 20:23:51" }, { "name": "illuminate/container", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6" + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/c5b8a02a34a52c307f16922334c355c5eef725a6", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6", + "url": "https://api.github.com/repos/illuminate/container/zipball/4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "php": "^7.1.3", + "psr/container": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -389,29 +393,31 @@ ], "description": "The Illuminate Container package.", "homepage": "https://laravel.com", - "time": "2017-05-24 14:15:53" + "time": "2018-01-21 02:13:38" }, { "name": "illuminate/contracts", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0" + "reference": "6a11fbccbc7da16a85fcd1d4b08e51b5658de0d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/31f0193eb14aa3ee07841dc254081425616e79f0", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/6a11fbccbc7da16a85fcd1d4b08e51b5658de0d4", + "reference": "6a11fbccbc7da16a85fcd1d4b08e51b5658de0d4", "shasum": "" }, "require": { - "php": ">=5.6.4" + "php": "^7.1.3", + "psr/container": "~1.0", + "psr/simple-cache": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -431,32 +437,32 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2017-04-19 20:17:43" + "time": "2018-05-08 13:22:33" }, { "name": "illuminate/events", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6" + "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/ebdca3b0305e9fc954afb9e422c4559482cd11e6", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6", + "url": "https://api.github.com/repos/illuminate/events/zipball/b6e73ed40478cef2ef98d5ddb27f333291606cea", + "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -476,37 +482,39 @@ ], "description": "The Illuminate Events package.", "homepage": "https://laravel.com", - "time": "2017-05-02 12:57:00" + "time": "2018-02-26 19:00:55" }, { "name": "illuminate/filesystem", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda" + "reference": "a4ca4a9c2f969ec227748ab334693144995ba0ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/e0ee832f625fbfadb816a972655b1a66af1a5bda", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/a4ca4a9c2f969ec227748ab334693144995ba0ce", + "reference": "a4ca4a9c2f969ec227748ab334693144995ba0ce", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/finder": "~3.2" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/finder": "~4.0" }, "suggest": { "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -526,41 +534,41 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2017-05-18 14:37:58" + "time": "2018-05-02 16:10:37" }, { "name": "illuminate/support", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d" + "reference": "6e84d4140310246ace38fdb0909da5b2fb22eadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/a42393b56d0ec75f55e760f2a47bcf85a17a278d", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d", + "url": "https://api.github.com/repos/illuminate/support/zipball/6e84d4140310246ace38fdb0909da5b2fb22eadf", + "reference": "6e84d4140310246ace38fdb0909da5b2fb22eadf", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", + "doctrine/inflector": "~1.1", "ext-mbstring": "*", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "nesbot/carbon": "^1.24.1", + "php": "^7.1.3" }, - "replace": { - "tightenco/collect": "self.version" + "conflict": { + "tightenco/collect": "<5.5.33" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." + "illuminate/filesystem": "Required to use the composer class (5.6.*).", + "symfony/process": "Required to use the composer class (~4.0).", + "symfony/var-dumper": "Required to use the dd function (~4.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -583,35 +591,35 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2017-06-15 12:35:32" + "time": "2018-05-07 14:12:37" }, { "name": "illuminate/view", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75" + "reference": "54eaf45ee7946d8f8cde13d5e89c5ea2e997040d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", + "url": "https://api.github.com/repos/illuminate/view/zipball/54eaf45ee7946d8f8cde13d5e89c5ea2e997040d", + "reference": "54eaf45ee7946d8f8cde13d5e89c5ea2e997040d", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/events": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/debug": "~3.2" + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/events": "5.6.*", + "illuminate/filesystem": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/debug": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -631,7 +639,7 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2017-06-07 13:32:57" + "time": "2018-04-03 12:56:35" }, { "name": "log1x/blade-svg-sage", @@ -671,6 +679,54 @@ "homepage": "https://github.com/log1x/blade-svg-sage", "time": "2018-02-06 19:18:31" }, + { + "name": "nesbot/carbon", + "version": "1.27.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "^4.8.35 || ^5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2018-04-23 09:02:57" + }, { "name": "nothingworks/blade-svg", "version": "v0.2.2", @@ -722,33 +778,32 @@ "time": "2017-08-13 20:55:40" }, { - "name": "paragonie/random_compat", - "version": "v2.0.10", + "name": "psr/container", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "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." + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "files": [ - "lib/random.php" - ] + "psr-4": { + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -756,18 +811,20 @@ ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "csprng", - "pseudorandom", - "random" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2017-03-13 16:27:32" + "time": "2017-02-14 16:28:37" }, { "name": "psr/log", @@ -816,24 +873,72 @@ ], "time": "2016-10-10 12:19:37" }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23 01:57:42" + }, { "name": "roots/sage-lib", - "version": "9.0.0-beta.4", + "version": "9.0.1", "source": { "type": "git", "url": "https://github.com/roots/sage-lib.git", - "reference": "71ed6e54e831fd1ced5bae028f0515d277e8c1c1" + "reference": "36573cd93b8109633c953e3f05b9f7d654bad885" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/sage-lib/zipball/71ed6e54e831fd1ced5bae028f0515d277e8c1c1", - "reference": "71ed6e54e831fd1ced5bae028f0515d277e8c1c1", + "url": "https://api.github.com/repos/roots/sage-lib/zipball/36573cd93b8109633c953e3f05b9f7d654bad885", + "reference": "36573cd93b8109633c953e3f05b9f7d654bad885", "shasum": "" }, "require": { "composer/installers": "~1.0", - "illuminate/config": "~5.4", - "illuminate/view": "~5.4", + "illuminate/config": "~5.6", + "illuminate/view": "~5.6", "php": ">=7" }, "require-dev": { @@ -866,7 +971,7 @@ "keywords": [ "wordpress" ], - "time": "2017-08-11 23:38:23" + "time": "2018-04-25 17:24:31" }, { "name": "soberwp/controller", @@ -922,32 +1027,32 @@ }, { "name": "symfony/debug", - "version": "v3.3.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13" + "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13", + "url": "https://api.github.com/repos/symfony/debug/zipball/e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e", + "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -974,29 +1079,29 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-07-28 15:27:31" + "time": "2018-04-30 16:59:37" }, { "name": "symfony/finder", - "version": "v3.3.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1023,27 +1128,157 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-06-01 21:01:25" + "time": "2018-04-04 05:10:37" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.8.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "3296adf6a6454a050679cde90f95350ad604b171" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "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" + ], + "time": "2018-04-26 10:06:28" + }, + { + "name": "symfony/translation", + "version": "v4.0.9", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/ad3abf08eb3450491d8d76513100ef58194cd13e", + "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "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 Translation Component", + "homepage": "https://symfony.com", + "time": "2018-04-30 01:23:47" }, { "name": "symfony/yaml", - "version": "v3.3.6", + "version": "v3.4.9", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" + "reference": "033cfa61ef06ee0847e056e530201842b6e926c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", + "url": "https://api.github.com/repos/symfony/yaml/zipball/033cfa61ef06ee0847e056e530201842b6e926c3", + "reference": "033cfa61ef06ee0847e056e530201842b6e926c3", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/console": "<3.4" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "~3.4|~4.0" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -1051,7 +1286,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1078,7 +1313,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-07-23 12:43:26" + "time": "2018-04-08 08:21:29" }, { "name": "wikimedia/relpath", @@ -1127,34 +1362,33 @@ "packages-dev": [ { "name": "illuminate/console", - "version": "v5.4.27", + "version": "v5.6.21", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "bdc5c6f53cb474e2aeec46b6a9999fcedfb62a4e" + "reference": "80fda6b3fddc07e81351260fa21e92496fc13b7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/bdc5c6f53cb474e2aeec46b6a9999fcedfb62a4e", - "reference": "bdc5c6f53cb474e2aeec46b6a9999fcedfb62a4e", + "url": "https://api.github.com/repos/illuminate/console/zipball/80fda6b3fddc07e81351260fa21e92496fc13b7e", + "reference": "80fda6b3fddc07e81351260fa21e92496fc13b7e", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4", - "symfony/console": "~3.2" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/console": "~4.0" }, "suggest": { + "dragonmantank/cron-expression": "Required to use scheduling component (~2.0).", "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", - "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", - "symfony/process": "Required to use scheduling component (~3.2)." + "symfony/process": "Required to use scheduling component (~4.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -1174,78 +1408,25 @@ ], "description": "The Illuminate Console package.", "homepage": "https://laravel.com", - "time": "2017-06-10 13:11:18" - }, - { - "name": "nesbot/carbon", - "version": "1.22.1", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6 || ~3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~4.0 || ~5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2017-01-16 07:55:07" + "time": "2018-05-02 14:47:56" }, { "name": "roots/sage-installer", - "version": "1.3.1", + "version": "1.3.6", "source": { "type": "git", "url": "https://github.com/roots/sage-installer.git", - "reference": "dca019cfa6f1f2cb2e155dfc6574829b80c689b7" + "reference": "e811ab937a36b321ea88ec6000ab3d5019b8f2b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/sage-installer/zipball/dca019cfa6f1f2cb2e155dfc6574829b80c689b7", - "reference": "dca019cfa6f1f2cb2e155dfc6574829b80c689b7", + "url": "https://api.github.com/repos/roots/sage-installer/zipball/e811ab937a36b321ea88ec6000ab3d5019b8f2b1", + "reference": "e811ab937a36b321ea88ec6000ab3d5019b8f2b1", "shasum": "" }, "require": { - "illuminate/console": "~5.4", - "illuminate/filesystem": "~5.4", + "illuminate/console": "~5.6", + "illuminate/filesystem": "~5.6", "symfony/process": "~3.3" }, "require-dev": { @@ -1276,9 +1457,8 @@ "homepage": "https://github.com/qwp6t" } ], - "description": "Sage installer.", + "description": "Sage starter theme installer", "keywords": [ - "FontAwesome", "bootstrap", "foundation", "sage", @@ -1286,7 +1466,7 @@ "theme", "wordpress" ], - "time": "2017-08-12 00:16:45" + "time": "2018-04-25 17:45:56" }, { "name": "squizlabs/php_codesniffer", @@ -1368,45 +1548,44 @@ }, { "name": "symfony/console", - "version": "v3.3.6", + "version": "v4.0.9", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201" + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b0878233cb5c4391347e5495089c7af11b8e6201", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201", + "url": "https://api.github.com/repos/symfony/console/zipball/3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" }, "suggest": { - "psr/log": "For using the console logger", + "psr/log-implementation": "For using the console logger", "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1433,88 +1612,29 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-07-29 21:27:59" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5-dev" - } - }, - "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" - ], - "time": "2017-06-14 15:44:48" + "time": "2018-04-30 01:23:47" }, { "name": "symfony/process", - "version": "v3.3.6", + "version": "v3.4.9", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a" + "reference": "4b7d64e852886319e93ddfdecff0d744ab87658b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/07432804942b9f6dd7b7377faf9920af5f95d70a", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a", + "url": "https://api.github.com/repos/symfony/process/zipball/4b7d64e852886319e93ddfdecff0d744ab87658b", + "reference": "4b7d64e852886319e93ddfdecff0d744ab87658b", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1541,72 +1661,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-07-13 13:05:09" - }, - { - "name": "symfony/translation", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3", - "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<2.8", - "symfony/yaml": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/intl": "^2.8.18|^3.2.5", - "symfony/yaml": "~3.3" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "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 Translation Component", - "homepage": "https://symfony.com", - "time": "2017-06-24 16:45:30" + "time": "2018-04-03 05:22:50" } ], "aliases": [], diff --git a/wp-content/themes/physioassist/resources/assets/styles/layouts/footer.styl b/wp-content/themes/physioassist/resources/assets/styles/layouts/footer.styl index 32a1e887..04625a08 100644 --- a/wp-content/themes/physioassist/resources/assets/styles/layouts/footer.styl +++ b/wp-content/themes/physioassist/resources/assets/styles/layouts/footer.styl @@ -77,10 +77,16 @@ $breakpoint-footer-cols-1 = 650px // When to break to 1 col view li:not(:last-of-type) constrain(margin-right, 1.25vw) - img + svg display: inline-block width: 50px height: auto + * + transition: all 0.1s ease-out + + &:hover + * + fill: $colors.light-blue &-signup a @@ -107,3 +113,6 @@ $breakpoint-footer-cols-1 = 650px // When to break to 1 col view font-size: 11px padding: r(40px) padding-bottom: 0 + + a + color: #fff diff --git a/wp-content/themes/physioassist/resources/views/partials/footer.blade.php b/wp-content/themes/physioassist/resources/views/partials/footer.blade.php index 6d779ccf..f5db3c4f 100644 --- a/wp-content/themes/physioassist/resources/views/partials/footer.blade.php +++ b/wp-content/themes/physioassist/resources/views/partials/footer.blade.php @@ -10,9 +10,9 @@ diff --git a/wp-content/themes/physioassist/vendor/autoload.php b/wp-content/themes/physioassist/vendor/autoload.php index 80833e63..faaba897 100644 --- a/wp-content/themes/physioassist/vendor/autoload.php +++ b/wp-content/themes/physioassist/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit42eb17074963c60ab53fe9b8f4e9f075::getLoader(); +return ComposerAutoloaderInit37569206a6c3ede43e64eb047cb7f858::getLoader(); diff --git a/wp-content/themes/physioassist/vendor/brain/hierarchy/src/Branch/BranchPostTypeArchive.php b/wp-content/themes/physioassist/vendor/brain/hierarchy/src/Branch/BranchPostTypeArchive.php index b73971e6..96fbe166 100644 --- a/wp-content/themes/physioassist/vendor/brain/hierarchy/src/Branch/BranchPostTypeArchive.php +++ b/wp-content/themes/physioassist/vendor/brain/hierarchy/src/Branch/BranchPostTypeArchive.php @@ -50,7 +50,7 @@ final class BranchPostTypeArchive implements BranchInterface private function postType(\WP_Query $query) { $type = $query->get('post_type'); - is_array($type) and $type = reset($post_type); + is_array($type) and $type = reset($type); $object = get_post_type_object($type); (is_object($object) && $object->has_archive) or $type = ''; diff --git a/wp-content/themes/physioassist/vendor/composer/autoload_files.php b/wp-content/themes/physioassist/vendor/composer/autoload_files.php index d5b657dc..38c0484e 100644 --- a/wp-content/themes/physioassist/vendor/composer/autoload_files.php +++ b/wp-content/themes/physioassist/vendor/composer/autoload_files.php @@ -6,9 +6,8 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', - '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', '4d945db823e5f6ca6dd83ad1f5fbcc43' => $vendorDir . '/wikimedia/relpath/src/RelPath/RelPath.php', '6513700b70192b7dfd0e5e9fc8082cf3' => $vendorDir . '/wikimedia/relpath/src/Wikimedia/RelPath.php', '7840a5c52edd823fb593e3c5547a8fbf' => $vendorDir . '/nothingworks/blade-svg/src/helpers.php', diff --git a/wp-content/themes/physioassist/vendor/composer/autoload_psr4.php b/wp-content/themes/physioassist/vendor/composer/autoload_psr4.php index bec4447f..5d49936d 100644 --- a/wp-content/themes/physioassist/vendor/composer/autoload_psr4.php +++ b/wp-content/themes/physioassist/vendor/composer/autoload_psr4.php @@ -17,7 +17,9 @@ return array( 'Sober\\Controller\\' => array($vendorDir . '/soberwp/controller/src'), 'Roots\\Sage\\Installer\\' => array($vendorDir . '/roots/sage-installer/src'), 'Roots\\Sage\\' => array($vendorDir . '/roots/sage-lib'), + 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), + 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), 'Noodlehaus\\' => array($vendorDir . '/hassankhan/config/src'), 'Illuminate\\View\\' => array($vendorDir . '/illuminate/view'), 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/support'), @@ -29,8 +31,8 @@ return array( 'Illuminate\\Config\\' => array($vendorDir . '/illuminate/config'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib/Doctrine/Common/Inflector'), 'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'), - 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), 'Brain\\Hierarchy\\' => array($vendorDir . '/brain/hierarchy/src'), 'BladeSvg\\' => array($vendorDir . '/nothingworks/blade-svg/src'), 'App\\' => array($baseDir . '/app'), + '' => array($vendorDir . '/nesbot/carbon/src'), ); diff --git a/wp-content/themes/physioassist/vendor/composer/autoload_real.php b/wp-content/themes/physioassist/vendor/composer/autoload_real.php index 2d1df6dd..972f5225 100644 --- a/wp-content/themes/physioassist/vendor/composer/autoload_real.php +++ b/wp-content/themes/physioassist/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit42eb17074963c60ab53fe9b8f4e9f075 +class ComposerAutoloaderInit37569206a6c3ede43e64eb047cb7f858 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit42eb17074963c60ab53fe9b8f4e9f075 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit42eb17074963c60ab53fe9b8f4e9f075', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit37569206a6c3ede43e64eb047cb7f858', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit42eb17074963c60ab53fe9b8f4e9f075', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit37569206a6c3ede43e64eb047cb7f858', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION'); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit37569206a6c3ede43e64eb047cb7f858::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInit42eb17074963c60ab53fe9b8f4e9f075 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit37569206a6c3ede43e64eb047cb7f858::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire42eb17074963c60ab53fe9b8f4e9f075($fileIdentifier, $file); + composerRequire37569206a6c3ede43e64eb047cb7f858($fileIdentifier, $file); } return $loader; } } -function composerRequire42eb17074963c60ab53fe9b8f4e9f075($fileIdentifier, $file) +function composerRequire37569206a6c3ede43e64eb047cb7f858($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/wp-content/themes/physioassist/vendor/composer/autoload_static.php b/wp-content/themes/physioassist/vendor/composer/autoload_static.php index 298bbc76..3a933027 100644 --- a/wp-content/themes/physioassist/vendor/composer/autoload_static.php +++ b/wp-content/themes/physioassist/vendor/composer/autoload_static.php @@ -4,12 +4,11 @@ namespace Composer\Autoload; -class ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075 +class ComposerStaticInit37569206a6c3ede43e64eb047cb7f858 { public static $files = array ( - '5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php', - '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '72579e7bd17821bb1321b87411366eae' => __DIR__ . '/..' . '/illuminate/support/helpers.php', '4d945db823e5f6ca6dd83ad1f5fbcc43' => __DIR__ . '/..' . '/wikimedia/relpath/src/RelPath/RelPath.php', '6513700b70192b7dfd0e5e9fc8082cf3' => __DIR__ . '/..' . '/wikimedia/relpath/src/Wikimedia/RelPath.php', '7840a5c52edd823fb593e3c5547a8fbf' => __DIR__ . '/..' . '/nothingworks/blade-svg/src/helpers.php', @@ -38,7 +37,9 @@ class ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075 ), 'P' => array ( + 'Psr\\SimpleCache\\' => 16, 'Psr\\Log\\' => 8, + 'Psr\\Container\\' => 14, ), 'N' => array ( @@ -62,7 +63,6 @@ class ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075 'C' => array ( 'Composer\\Installers\\' => 20, - 'Carbon\\' => 7, ), 'B' => array ( @@ -120,10 +120,18 @@ class ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075 array ( 0 => __DIR__ . '/..' . '/roots/sage-lib', ), + 'Psr\\SimpleCache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/simple-cache/src', + ), 'Psr\\Log\\' => array ( 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', ), + 'Psr\\Container\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/container/src', + ), 'Noodlehaus\\' => array ( 0 => __DIR__ . '/..' . '/hassankhan/config/src', @@ -168,10 +176,6 @@ class ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075 array ( 0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers', ), - 'Carbon\\' => - array ( - 0 => __DIR__ . '/..' . '/nesbot/carbon/src/Carbon', - ), 'Brain\\Hierarchy\\' => array ( 0 => __DIR__ . '/..' . '/brain/hierarchy/src', @@ -186,6 +190,10 @@ class ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075 ), ); + public static $fallbackDirsPsr4 = array ( + 0 => __DIR__ . '/..' . '/nesbot/carbon/src', + ); + public static $classMap = array ( 'Generic_Sniffs_Arrays_DisallowLongArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowLongArraySyntaxSniff.php', 'Generic_Sniffs_Arrays_DisallowShortArraySyntaxSniff' => __DIR__ . '/..' . '/squizlabs/php_codesniffer/CodeSniffer/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php', @@ -444,9 +452,10 @@ class ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit42eb17074963c60ab53fe9b8f4e9f075::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit37569206a6c3ede43e64eb047cb7f858::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit37569206a6c3ede43e64eb047cb7f858::$prefixDirsPsr4; + $loader->fallbackDirsPsr4 = ComposerStaticInit37569206a6c3ede43e64eb047cb7f858::$fallbackDirsPsr4; + $loader->classMap = ComposerStaticInit37569206a6c3ede43e64eb047cb7f858::$classMap; }, null, ClassLoader::class); } diff --git a/wp-content/themes/physioassist/vendor/composer/installed.json b/wp-content/themes/physioassist/vendor/composer/installed.json index 35a31fec..98f9fb5b 100644 --- a/wp-content/themes/physioassist/vendor/composer/installed.json +++ b/wp-content/themes/physioassist/vendor/composer/installed.json @@ -1,17 +1,17 @@ [ { "name": "composer/installers", - "version": "v1.4.0", - "version_normalized": "1.4.0.0", + "version": "v1.5.0", + "version_normalized": "1.5.0.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b" + "reference": "049797d727261bf27f2690430d935067710049c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", - "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", + "url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2", + "reference": "049797d727261bf27f2690430d935067710049c2", "shasum": "" }, "require": { @@ -23,9 +23,9 @@ }, "require-dev": { "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" + "phpunit/phpunit": "^4.8.36" }, - "time": "2017-08-09 07:53:48", + "time": "2017-12-29 09:13:20", "type": "composer-plugin", "extra": { "class": "Composer\\Installers\\Plugin", @@ -96,15 +96,18 @@ "lavalite", "lithium", "magento", + "majima", "mako", "mediawiki", "modulework", + "modx", "moodle", "osclass", "phpbb", "piwik", "ppi", "puppet", + "pxcms", "reindex", "roundcube", "shopware", @@ -119,36 +122,47 @@ ] }, { - "name": "paragonie/random_compat", - "version": "v2.0.10", - "version_normalized": "2.0.10.0", + "name": "brain/hierarchy", + "version": "2.3.1", + "version_normalized": "2.3.1.0", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "url": "https://github.com/Brain-WP/Hierarchy.git", + "reference": "239f9bbe49ff6ad1199bbcad308d2c7977bee25a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/Brain-WP/Hierarchy/zipball/239f9bbe49ff6ad1199bbcad308d2c7977bee25a", + "reference": "239f9bbe49ff6ad1199bbcad308d2c7977bee25a", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "antecedent/patchwork": "~1.3.0", + "brain/monkey": "~1.2", + "gmazzap/andrew": "~1.0", + "mockery/mockery": "0.9.3", + "phpunit/phpunit": "~4.8", + "symfony/finder": "~2.7.0" }, "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + "symfony/finder": "Allows loading of templates using Symfony finder component." }, - "time": "2017-03-13 16:27:32", + "time": "2017-12-28 17:16:07", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev", + "dev-dev": "2.0.x-dev" + } + }, "installation-source": "dist", "autoload": { - "files": [ - "lib/random.php" - ] + "psr-4": { + "Brain\\Hierarchy\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -156,48 +170,57 @@ ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "Giuseppe Mazzapica", + "email": "giuseppe.mazzapica@gmail.com" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "No-dependencies package that embodies WordPress template hierarchy", "keywords": [ - "csprng", - "pseudorandom", - "random" + "wordpress" ] }, { - "name": "illuminate/contracts", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "name": "symfony/yaml", + "version": "v3.4.9", + "version_normalized": "3.4.9.0", "source": { "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0" + "url": "https://github.com/symfony/yaml.git", + "reference": "033cfa61ef06ee0847e056e530201842b6e926c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/31f0193eb14aa3ee07841dc254081425616e79f0", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0", + "url": "https://api.github.com/repos/symfony/yaml/zipball/033cfa61ef06ee0847e056e530201842b6e926c3", + "reference": "033cfa61ef06ee0847e056e530201842b6e926c3", "shasum": "" }, "require": { - "php": ">=5.6.4" + "php": "^5.5.9|>=7.0.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, - "time": "2017-04-19 20:17:43", + "time": "2018-04-08 08:21:29", "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "3.4-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Illuminate\\Contracts\\": "" - } + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -205,45 +228,49 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com" + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com" }, { - "name": "doctrine/inflector", - "version": "v1.2.0", - "version_normalized": "1.2.0.0", + "name": "hassankhan/config", + "version": "0.10.0", + "version_normalized": "0.10.0.0", "source": { "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" + "url": "https://github.com/hassankhan/config.git", + "reference": "06ac500348af033f1a2e44dc357ca86282626d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", + "url": "https://api.github.com/repos/hassankhan/config/zipball/06ac500348af033f1a2e44dc357ca86282626d4a", + "reference": "06ac500348af033f1a2e44dc357ca86282626d4a", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "~4.0", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "~2.2" }, - "time": "2017-07-22 12:18:28", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } + "suggest": { + "symfony/yaml": "~2.5" }, + "time": "2016-02-11 16:21:17", + "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Noodlehaus\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -252,79 +279,60 @@ ], "authors": [ { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" + "name": "Hassan Khan", + "homepage": "http://hassankhan.me/", + "role": "Developer" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files", + "homepage": "http://hassankhan.me/config/", "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" + "config", + "configuration", + "ini", + "json", + "microphp", + "unframework", + "xml", + "yaml", + "yml" ] }, { - "name": "illuminate/support", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "name": "soberwp/controller", + "version": "9.0.0-beta.4", + "version_normalized": "9.0.0.0-beta4", "source": { "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d" + "url": "https://github.com/soberwp/controller.git", + "reference": "2b6c8450f4a3100b16bfc482c825d89422b6adc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/a42393b56d0ec75f55e760f2a47bcf85a17a278d", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d", + "url": "https://api.github.com/repos/soberwp/controller/zipball/2b6c8450f4a3100b16bfc482c825d89422b6adc6", + "reference": "2b6c8450f4a3100b16bfc482c825d89422b6adc6", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", - "ext-mbstring": "*", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" - }, - "replace": { - "tightenco/collect": "self.version" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." + "brain/hierarchy": "^2.3", + "composer/installers": "~1.0", + "hassankhan/config": "^0.10.0", + "php": ">=5.6.0", + "symfony/yaml": "^3.2" }, - "time": "2017-06-15 12:35:32", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.4-dev" - } + "require-dev": { + "squizlabs/php_codesniffer": "2.*" }, + "time": "2017-08-22 17:35:30", + "type": "package", "installation-source": "dist", "autoload": { "psr-4": { - "Illuminate\\Support\\": "" + "Sober\\Controller\\": "src/", + "Sober\\Controller\\Module\\": "src/Module/" }, "files": [ - "helpers.php" + "controller.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -333,44 +341,53 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Darren Jacoby", + "email": "darren@jacoby.co.za", + "homepage": "https://github.com/darrenjacoby" } ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com" + "description": "WordPress package to enable a basic controller when using Blade with Sage 9", + "homepage": "https://github.com/soberwp", + "keywords": [ + "wordpress" + ] }, { - "name": "illuminate/container", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.8.0", + "version_normalized": "1.8.0.0", "source": { "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "3296adf6a6454a050679cde90f95350ad604b171" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/c5b8a02a34a52c307f16922334c355c5eef725a6", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", + "reference": "3296adf6a6454a050679cde90f95350ad604b171", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "php": ">=5.6.4" + "php": ">=5.3.3" }, - "time": "2017-05-24 14:15:53", + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2018-04-26 10:06:28", "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "1.8-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Illuminate\\Container\\": "" - } + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -378,46 +395,76 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "The Illuminate Container package.", - "homepage": "https://laravel.com" + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ] }, { - "name": "illuminate/events", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "name": "symfony/translation", + "version": "v4.0.9", + "version_normalized": "4.0.9.0", "source": { "type": "git", - "url": "https://github.com/illuminate/events.git", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6" + "url": "https://github.com/symfony/translation.git", + "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/ebdca3b0305e9fc954afb9e422c4559482cd11e6", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6", + "url": "https://api.github.com/repos/symfony/translation/zipball/ad3abf08eb3450491d8d76513100ef58194cd13e", + "reference": "ad3abf08eb3450491d8d76513100ef58194cd13e", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" }, - "time": "2017-05-02 12:57:00", + "time": "2018-04-30 01:23:47", "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "4.0-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Illuminate\\Events\\": "" - } + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -425,42 +472,46 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "The Illuminate Events package.", - "homepage": "https://laravel.com" + "description": "Symfony Translation Component", + "homepage": "https://symfony.com" }, { - "name": "psr/log", - "version": "1.0.2", - "version_normalized": "1.0.2.0", + "name": "nesbot/carbon", + "version": "1.27.0", + "version_normalized": "1.27.0.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, - "time": "2016-10-10 12:19:37", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } + "require-dev": { + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "^4.8.35 || ^5.7" }, + "time": "2018-04-23 09:02:57", + "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -469,58 +520,49 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", "keywords": [ - "log", - "psr", - "psr-3" + "date", + "datetime", + "time" ] }, { - "name": "symfony/debug", - "version": "v3.3.6", - "version_normalized": "3.3.6.0", + "name": "psr/simple-cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { - "php": ">=5.5.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "php": ">=5.3.0" }, - "time": "2017-07-28 15:27:31", + "time": "2017-10-23 01:57:42", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "1.0.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Psr\\SimpleCache\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -528,50 +570,49 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com" + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ] }, { - "name": "symfony/finder", - "version": "v3.3.6", - "version_normalized": "3.3.6.0", + "name": "psr/container", + "version": "1.0.0", + "version_normalized": "1.0.0.0", "source": { "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.0" }, - "time": "2017-06-01 21:01:25", + "time": "2017-02-14 16:28:37", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "1.0.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -579,54 +620,51 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com" + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ] }, { - "name": "illuminate/filesystem", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "name": "illuminate/contracts", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", "source": { "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda" + "url": "https://github.com/illuminate/contracts.git", + "reference": "6a11fbccbc7da16a85fcd1d4b08e51b5658de0d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/e0ee832f625fbfadb816a972655b1a66af1a5bda", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/6a11fbccbc7da16a85fcd1d4b08e51b5658de0d4", + "reference": "6a11fbccbc7da16a85fcd1d4b08e51b5658de0d4", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/finder": "~3.2" + "php": "^7.1.3", + "psr/container": "~1.0", + "psr/simple-cache": "~1.0" }, - "suggest": { - "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." - }, - "time": "2017-05-18 14:37:58", + "time": "2018-05-08 13:22:33", "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Illuminate\\Filesystem\\": "" + "Illuminate\\Contracts\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -639,46 +677,124 @@ "email": "taylor@laravel.com" } ], - "description": "The Illuminate Filesystem package.", + "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com" }, { - "name": "illuminate/view", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "name": "doctrine/inflector", + "version": "v1.3.0", + "version_normalized": "1.3.0.0", "source": { "type": "git", - "url": "https://github.com/illuminate/view.git", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75" + "url": "https://github.com/doctrine/inflector.git", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/events": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/debug": "~3.2" - }, - "time": "2017-06-07 13:32:57", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "time": "2018-01-09 20:05:19", "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "1.3.x-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Illuminate\\View\\": "" + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ] + }, + { + "name": "illuminate/support", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "6e84d4140310246ace38fdb0909da5b2fb22eadf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/6e84d4140310246ace38fdb0909da5b2fb22eadf", + "reference": "6e84d4140310246ace38fdb0909da5b2fb22eadf", + "shasum": "" + }, + "require": { + "doctrine/inflector": "~1.1", + "ext-mbstring": "*", + "illuminate/contracts": "5.6.*", + "nesbot/carbon": "^1.24.1", + "php": "^7.1.3" + }, + "conflict": { + "tightenco/collect": "<5.5.33" + }, + "suggest": { + "illuminate/filesystem": "Required to use the composer class (5.6.*).", + "symfony/process": "Required to use the composer class (~4.0).", + "symfony/var-dumper": "Required to use the dd function (~4.0)." + }, + "time": "2018-05-07 14:12:37", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" } }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -689,34 +805,34 @@ "email": "taylor@laravel.com" } ], - "description": "The Illuminate View package.", + "description": "The Illuminate Support package.", "homepage": "https://laravel.com" }, { "name": "illuminate/config", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9" + "reference": "e8158dff3189deed846c84c66c60fa68c21ee579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/8fe700aa596bc623d347e4578041fbda7a44c3d9", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9", + "url": "https://api.github.com/repos/illuminate/config/zipball/e8158dff3189deed846c84c66c60fa68c21ee579", + "reference": "e8158dff3189deed846c84c66c60fa68c21ee579", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" }, - "time": "2017-02-04 20:27:32", + "time": "2017-11-07 20:23:51", "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "installation-source": "dist", @@ -739,35 +855,34 @@ "homepage": "https://laravel.com" }, { - "name": "roots/sage-lib", - "version": "9.0.0-beta.4", - "version_normalized": "9.0.0.0-beta4", + "name": "psr/log", + "version": "1.0.2", + "version_normalized": "1.0.2.0", "source": { "type": "git", - "url": "https://github.com/roots/sage-lib.git", - "reference": "71ed6e54e831fd1ced5bae028f0515d277e8c1c1" + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/sage-lib/zipball/71ed6e54e831fd1ced5bae028f0515d277e8c1c1", - "reference": "71ed6e54e831fd1ced5bae028f0515d277e8c1c1", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", "shasum": "" }, "require": { - "composer/installers": "~1.0", - "illuminate/config": "~5.4", - "illuminate/view": "~5.4", - "php": ">=7" - }, - "require-dev": { - "squizlabs/php_codesniffer": "~3.0" + "php": ">=5.3.0" }, - "time": "2017-08-11 23:38:23", + "time": "2016-10-10 12:19:37", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "installation-source": "dist", "autoload": { "psr-4": { - "Roots\\Sage\\": "" + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -776,57 +891,54 @@ ], "authors": [ { - "name": "Ben Word", - "email": "ben@benword.com", - "homepage": "https://github.com/retlehs" - }, - { - "name": "QWp6t", - "email": "hi@qwp6t.me", - "homepage": "https://github.com/qwp6t" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Library files for Sage Starter Theme", - "homepage": "https://roots.io/sage/", + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", "keywords": [ - "wordpress" + "log", + "psr", + "psr-3" ] }, { - "name": "symfony/yaml", - "version": "v3.3.6", - "version_normalized": "3.3.6.0", + "name": "symfony/debug", + "version": "v4.0.9", + "version_normalized": "4.0.9.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed" + "url": "https://github.com/symfony/debug.git", + "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/ddc23324e6cfe066f3dd34a37ff494fa80b617ed", - "reference": "ddc23324e6cfe066f3dd34a37ff494fa80b617ed", + "url": "https://api.github.com/repos/symfony/debug/zipball/e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e", + "reference": "e1d57cdb357e5b10f5fdacbb0b86689c0a435e6e", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3", + "psr/log": "~1.0" }, - "require-dev": { - "symfony/console": "~2.8|~3.0" + "conflict": { + "symfony/http-kernel": "<3.4" }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" + "require-dev": { + "symfony/http-kernel": "~3.4|~4.0" }, - "time": "2017-07-23 12:43:26", + "time": "2018-04-30 16:59:37", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Component\\Debug\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -846,42 +958,42 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Symfony Debug Component", "homepage": "https://symfony.com" }, { - "name": "hassankhan/config", - "version": "0.10.0", - "version_normalized": "0.10.0.0", + "name": "symfony/finder", + "version": "v4.0.9", + "version_normalized": "4.0.9.0", "source": { "type": "git", - "url": "https://github.com/hassankhan/config.git", - "reference": "06ac500348af033f1a2e44dc357ca86282626d4a" + "url": "https://github.com/symfony/finder.git", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hassankhan/config/zipball/06ac500348af033f1a2e44dc357ca86282626d4a", - "reference": "06ac500348af033f1a2e44dc357ca86282626d4a", + "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", "shasum": "" }, "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "scrutinizer/ocular": "~1.1", - "squizlabs/php_codesniffer": "~2.2" - }, - "suggest": { - "symfony/yaml": "~2.5" + "php": "^7.1.3" }, - "time": "2016-02-11 16:21:17", + "time": "2018-04-04 05:10:37", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, "installation-source": "dist", "autoload": { "psr-4": { - "Noodlehaus\\": "src" - } + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -889,66 +1001,56 @@ ], "authors": [ { - "name": "Hassan Khan", - "homepage": "http://hassankhan.me/", - "role": "Developer" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files", - "homepage": "http://hassankhan.me/config/", - "keywords": [ - "config", - "configuration", - "ini", - "json", - "microphp", - "unframework", - "xml", - "yaml", - "yml" - ] + "description": "Symfony Finder Component", + "homepage": "https://symfony.com" }, { - "name": "brain/hierarchy", - "version": "2.3.0", - "version_normalized": "2.3.0.0", + "name": "illuminate/filesystem", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", "source": { "type": "git", - "url": "https://github.com/Brain-WP/Hierarchy.git", - "reference": "adb52da233e586051a577ef5eabe2c537df785d5" + "url": "https://github.com/illuminate/filesystem.git", + "reference": "a4ca4a9c2f969ec227748ab334693144995ba0ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Brain-WP/Hierarchy/zipball/adb52da233e586051a577ef5eabe2c537df785d5", - "reference": "adb52da233e586051a577ef5eabe2c537df785d5", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/a4ca4a9c2f969ec227748ab334693144995ba0ce", + "reference": "a4ca4a9c2f969ec227748ab334693144995ba0ce", "shasum": "" }, "require": { - "php": ">=5.5" - }, - "require-dev": { - "antecedent/patchwork": "~1.3.0", - "brain/monkey": "~1.2", - "gmazzap/andrew": "~1.0", - "mockery/mockery": "0.9.3", - "phpunit/phpunit": "~4.8", - "symfony/finder": "~2.7.0" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/finder": "~4.0" }, "suggest": { - "symfony/finder": "Allows loading of templates using Symfony finder component." + "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." }, - "time": "2016-09-15 13:33:53", + "time": "2018-05-02 16:10:37", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev", - "dev-dev": "2.0.x-dev" + "dev-master": "5.6-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Brain\\Hierarchy\\": "src/" + "Illuminate\\Filesystem\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -957,105 +1059,45 @@ ], "authors": [ { - "name": "Giuseppe Mazzapica", - "email": "giuseppe.mazzapica@gmail.com" - } - ], - "description": "No-dependencies package that embodies WordPress template hierarchy", - "keywords": [ - "wordpress" - ] - }, - { - "name": "soberwp/controller", - "version": "9.0.0-beta.4", - "version_normalized": "9.0.0.0-beta4", - "source": { - "type": "git", - "url": "https://github.com/soberwp/controller.git", - "reference": "2b6c8450f4a3100b16bfc482c825d89422b6adc6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/soberwp/controller/zipball/2b6c8450f4a3100b16bfc482c825d89422b6adc6", - "reference": "2b6c8450f4a3100b16bfc482c825d89422b6adc6", - "shasum": "" - }, - "require": { - "brain/hierarchy": "^2.3", - "composer/installers": "~1.0", - "hassankhan/config": "^0.10.0", - "php": ">=5.6.0", - "symfony/yaml": "^3.2" - }, - "require-dev": { - "squizlabs/php_codesniffer": "2.*" - }, - "time": "2017-08-22 17:35:30", - "type": "package", - "installation-source": "dist", - "autoload": { - "psr-4": { - "Sober\\Controller\\": "src/", - "Sober\\Controller\\Module\\": "src/Module/" - }, - "files": [ - "controller.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Darren Jacoby", - "email": "darren@jacoby.co.za", - "homepage": "https://github.com/darrenjacoby" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "description": "WordPress package to enable a basic controller when using Blade with Sage 9", - "homepage": "https://github.com/soberwp", - "keywords": [ - "wordpress" - ] + "description": "The Illuminate Filesystem package.", + "homepage": "https://laravel.com" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.5.0", - "version_normalized": "1.5.0.0", + "name": "illuminate/container", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" + "url": "https://github.com/illuminate/container.git", + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", - "reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", + "url": "https://api.github.com/repos/illuminate/container/zipball/4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", "shasum": "" }, "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" + "illuminate/contracts": "5.6.*", + "php": "^7.1.3", + "psr/container": "~1.0" }, - "time": "2017-06-14 15:44:48", + "time": "2018-01-21 02:13:38", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "5.6-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] + "Illuminate\\Container\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1063,73 +1105,46 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ] + "description": "The Illuminate Container package.", + "homepage": "https://laravel.com" }, { - "name": "symfony/translation", - "version": "v3.3.6", - "version_normalized": "3.3.6.0", + "name": "illuminate/events", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", "source": { "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3" + "url": "https://github.com/illuminate/events.git", + "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3", - "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3", + "url": "https://api.github.com/repos/illuminate/events/zipball/b6e73ed40478cef2ef98d5ddb27f333291606cea", + "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/config": "<2.8", - "symfony/yaml": "<3.3" + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/intl": "^2.8.18|^3.2.5", - "symfony/yaml": "~3.3" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "time": "2017-06-24 16:45:30", + "time": "2018-02-26 19:00:55", "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "5.6-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Illuminate\\Events\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1137,51 +1152,48 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com" + "description": "The Illuminate Events package.", + "homepage": "https://laravel.com" }, { - "name": "nesbot/carbon", - "version": "1.22.1", - "version_normalized": "1.22.1.0", + "name": "illuminate/view", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", "source": { "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc" + "url": "https://github.com/illuminate/view.git", + "reference": "54eaf45ee7946d8f8cde13d5e89c5ea2e997040d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", + "url": "https://api.github.com/repos/illuminate/view/zipball/54eaf45ee7946d8f8cde13d5e89c5ea2e997040d", + "reference": "54eaf45ee7946d8f8cde13d5e89c5ea2e997040d", "shasum": "" }, "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6 || ~3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~4.0 || ~5.0" - }, - "time": "2017-01-16 07:55:07", + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/events": "5.6.*", + "illuminate/filesystem": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/debug": "~4.0" + }, + "time": "2018-04-03 12:56:35", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.23-dev" + "dev-master": "5.6-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Carbon\\": "src/Carbon/" + "Illuminate\\View\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1190,52 +1202,44 @@ ], "authors": [ { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "description": "A simple API extension for DateTime.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ] + "description": "The Illuminate View package.", + "homepage": "https://laravel.com" }, { - "name": "symfony/process", - "version": "v3.3.6", - "version_normalized": "3.3.6.0", + "name": "roots/sage-lib", + "version": "9.0.1", + "version_normalized": "9.0.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a" + "url": "https://github.com/roots/sage-lib.git", + "reference": "36573cd93b8109633c953e3f05b9f7d654bad885" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/07432804942b9f6dd7b7377faf9920af5f95d70a", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a", + "url": "https://api.github.com/repos/roots/sage-lib/zipball/36573cd93b8109633c953e3f05b9f7d654bad885", + "reference": "36573cd93b8109633c953e3f05b9f7d654bad885", "shasum": "" }, "require": { - "php": ">=5.5.9" + "composer/installers": "~1.0", + "illuminate/config": "~5.6", + "illuminate/view": "~5.6", + "php": ">=7" }, - "time": "2017-07-13 13:05:09", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } + "require-dev": { + "squizlabs/php_codesniffer": "~3.0" }, + "time": "2018-04-25 17:24:31", + "type": "library", "installation-source": "dist", "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Roots\\Sage\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1243,69 +1247,52 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Ben Word", + "email": "ben@benword.com", + "homepage": "https://github.com/retlehs" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "QWp6t", + "email": "hi@qwp6t.me", + "homepage": "https://github.com/qwp6t" } ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com" + "description": "Library files for Sage Starter Theme", + "homepage": "https://roots.io/sage/", + "keywords": [ + "wordpress" + ] }, { - "name": "symfony/console", - "version": "v3.3.6", - "version_normalized": "3.3.6.0", + "name": "wikimedia/relpath", + "version": "2.1.1", + "version_normalized": "2.1.1.0", "source": { "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201" + "url": "https://github.com/wikimedia/RelPath.git", + "reference": "35e701ff16abf461bb8676a9d9177f86fa0b2c94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b0878233cb5c4391347e5495089c7af11b8e6201", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201", + "url": "https://api.github.com/repos/wikimedia/RelPath/zipball/35e701ff16abf461bb8676a9d9177f86fa0b2c94", + "reference": "35e701ff16abf461bb8676a9d9177f86fa0b2c94", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.3" + "php": ">=5.5.9" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/filesystem": "", - "symfony/process": "" + "jakub-onderka/php-parallel-lint": "^0.9.0.0", + "mediawiki/mediawiki-codesniffer": "15.0.0", + "phpunit/phpunit": "^4.8.9.0" }, - "time": "2017-07-29 21:27:59", + "time": "2018-01-18 21:23:40", "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, "installation-source": "dist", "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "src/RelPath/RelPath.php", + "src/Wikimedia/RelPath.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1314,56 +1301,53 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Ori Livneh", + "email": "ori@wikimedia.org" } ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com" + "description": "Compute a relative filepath between two paths.", + "homepage": "https://www.mediawiki.org/wiki/RelPath" }, { - "name": "illuminate/console", - "version": "v5.4.27", - "version_normalized": "5.4.27.0", + "name": "nothingworks/blade-svg", + "version": "v0.2.2", + "version_normalized": "0.2.2.0", "source": { "type": "git", - "url": "https://github.com/illuminate/console.git", - "reference": "bdc5c6f53cb474e2aeec46b6a9999fcedfb62a4e" + "url": "https://github.com/adamwathan/blade-svg.git", + "reference": "fad56a6e5fb970e55b9745e547106ca09273fe24" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/bdc5c6f53cb474e2aeec46b6a9999fcedfb62a4e", - "reference": "bdc5c6f53cb474e2aeec46b6a9999fcedfb62a4e", + "url": "https://api.github.com/repos/adamwathan/blade-svg/zipball/fad56a6e5fb970e55b9745e547106ca09273fe24", + "reference": "fad56a6e5fb970e55b9745e547106ca09273fe24", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "php": ">=5.6.4", - "symfony/console": "~3.2" + "illuminate/filesystem": "^5.3", + "illuminate/support": "^5.3" }, - "suggest": { - "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", - "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", - "symfony/process": "Required to use scheduling component (~3.2)." + "require-dev": { + "mockery/mockery": "^0.9.5", + "phpunit/phpunit": "^5.5" }, - "time": "2017-06-10 13:11:18", + "time": "2017-08-13 20:55:40", "type": "library", "extra": { - "branch-alias": { - "dev-master": "5.4-dev" + "laravel": { + "providers": [ + "BladeSvg\\BladeSvgServiceProvider" + ] } }, "installation-source": "dist", "autoload": { "psr-4": { - "Illuminate\\Console\\": "" - } + "BladeSvg\\": "src/" + }, + "files": [ + "src/helpers.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1371,46 +1355,38 @@ ], "authors": [ { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" + "name": "Adam Wathan", + "email": "adam.wathan@gmail.com" } - ], - "description": "The Illuminate Console package.", - "homepage": "https://laravel.com" + ] }, { - "name": "roots/sage-installer", - "version": "1.3.1", - "version_normalized": "1.3.1.0", + "name": "log1x/blade-svg-sage", + "version": "v1.0.6", + "version_normalized": "1.0.6.0", "source": { "type": "git", - "url": "https://github.com/roots/sage-installer.git", - "reference": "dca019cfa6f1f2cb2e155dfc6574829b80c689b7" + "url": "https://github.com/Log1x/blade-svg-sage.git", + "reference": "c41f1180d1eab3ea1040eb8bb2d02082bccc9c20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/roots/sage-installer/zipball/dca019cfa6f1f2cb2e155dfc6574829b80c689b7", - "reference": "dca019cfa6f1f2cb2e155dfc6574829b80c689b7", + "url": "https://api.github.com/repos/Log1x/blade-svg-sage/zipball/c41f1180d1eab3ea1040eb8bb2d02082bccc9c20", + "reference": "c41f1180d1eab3ea1040eb8bb2d02082bccc9c20", "shasum": "" }, "require": { - "illuminate/console": "~5.4", - "illuminate/filesystem": "~5.4", - "symfony/process": "~3.3" - }, - "require-dev": { - "squizlabs/php_codesniffer": "~3.0" + "nothingworks/blade-svg": "^0.2.1", + "wikimedia/relpath": "^2.1" }, - "time": "2017-08-12 00:16:45", - "bin": [ - "bin/sage" - ], - "type": "library", + "time": "2018-02-06 19:18:31", + "type": "package", "installation-source": "dist", "autoload": { - "psr-4": { - "Roots\\Sage\\Installer\\": "src/" - } + "files": [ + "src/helpers.php", + "src/blade-svg-sage.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1418,26 +1394,11 @@ ], "authors": [ { - "name": "Ben Word", - "email": "ben@benword.com", - "homepage": "https://github.com/retlehs" - }, - { - "name": "QWp6t", - "email": "hi@qwp6t.me", - "homepage": "https://github.com/qwp6t" + "name": "Brandon Nifong", + "email": "brandon@tendency.me" } ], - "description": "Sage installer.", - "keywords": [ - "FontAwesome", - "bootstrap", - "foundation", - "sage", - "tachyons", - "theme", - "wordpress" - ] + "homepage": "https://github.com/log1x/blade-svg-sage" }, { "name": "squizlabs/php_codesniffer", @@ -1520,35 +1481,37 @@ ] }, { - "name": "wikimedia/relpath", - "version": "2.1.1", - "version_normalized": "2.1.1.0", + "name": "symfony/process", + "version": "v3.4.9", + "version_normalized": "3.4.9.0", "source": { "type": "git", - "url": "https://github.com/wikimedia/RelPath.git", - "reference": "35e701ff16abf461bb8676a9d9177f86fa0b2c94" + "url": "https://github.com/symfony/process.git", + "reference": "4b7d64e852886319e93ddfdecff0d744ab87658b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wikimedia/RelPath/zipball/35e701ff16abf461bb8676a9d9177f86fa0b2c94", - "reference": "35e701ff16abf461bb8676a9d9177f86fa0b2c94", + "url": "https://api.github.com/repos/symfony/process/zipball/4b7d64e852886319e93ddfdecff0d744ab87658b", + "reference": "4b7d64e852886319e93ddfdecff0d744ab87658b", "shasum": "" }, "require": { - "php": ">=5.5.9" - }, - "require-dev": { - "jakub-onderka/php-parallel-lint": "^0.9.0.0", - "mediawiki/mediawiki-codesniffer": "15.0.0", - "phpunit/phpunit": "^4.8.9.0" + "php": "^5.5.9|>=7.0.8" }, - "time": "2018-01-18 21:23:40", + "time": "2018-04-03 05:22:50", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" + } + }, "installation-source": "dist", "autoload": { - "files": [ - "src/RelPath/RelPath.php", - "src/Wikimedia/RelPath.php" + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1557,52 +1520,68 @@ ], "authors": [ { - "name": "Ori Livneh", - "email": "ori@wikimedia.org" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Compute a relative filepath between two paths.", - "homepage": "https://www.mediawiki.org/wiki/RelPath" + "description": "Symfony Process Component", + "homepage": "https://symfony.com" }, { - "name": "nothingworks/blade-svg", - "version": "v0.2.2", - "version_normalized": "0.2.2.0", + "name": "symfony/console", + "version": "v4.0.9", + "version_normalized": "4.0.9.0", "source": { "type": "git", - "url": "https://github.com/adamwathan/blade-svg.git", - "reference": "fad56a6e5fb970e55b9745e547106ca09273fe24" + "url": "https://github.com/symfony/console.git", + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/adamwathan/blade-svg/zipball/fad56a6e5fb970e55b9745e547106ca09273fe24", - "reference": "fad56a6e5fb970e55b9745e547106ca09273fe24", + "url": "https://api.github.com/repos/symfony/console/zipball/3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", + "reference": "3e820bc2c520a87ca209ad8fa961c97f42e0b4ae", "shasum": "" }, "require": { - "illuminate/filesystem": "^5.3", - "illuminate/support": "^5.3" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" }, "require-dev": { - "mockery/mockery": "^0.9.5", - "phpunit/phpunit": "^5.5" + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" }, - "time": "2017-08-13 20:55:40", + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "time": "2018-04-30 01:23:47", "type": "library", "extra": { - "laravel": { - "providers": [ - "BladeSvg\\BladeSvgServiceProvider" - ] + "branch-alias": { + "dev-master": "4.0-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "BladeSvg\\": "src/" + "Symfony\\Component\\Console\\": "" }, - "files": [ - "src/helpers.php" + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1611,38 +1590,55 @@ ], "authors": [ { - "name": "Adam Wathan", - "email": "adam.wathan@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } - ] + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com" }, { - "name": "log1x/blade-svg-sage", - "version": "v1.0.6", - "version_normalized": "1.0.6.0", + "name": "illuminate/console", + "version": "v5.6.21", + "version_normalized": "5.6.21.0", "source": { "type": "git", - "url": "https://github.com/Log1x/blade-svg-sage.git", - "reference": "c41f1180d1eab3ea1040eb8bb2d02082bccc9c20" + "url": "https://github.com/illuminate/console.git", + "reference": "80fda6b3fddc07e81351260fa21e92496fc13b7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Log1x/blade-svg-sage/zipball/c41f1180d1eab3ea1040eb8bb2d02082bccc9c20", - "reference": "c41f1180d1eab3ea1040eb8bb2d02082bccc9c20", + "url": "https://api.github.com/repos/illuminate/console/zipball/80fda6b3fddc07e81351260fa21e92496fc13b7e", + "reference": "80fda6b3fddc07e81351260fa21e92496fc13b7e", "shasum": "" }, "require": { - "nothingworks/blade-svg": "^0.2.1", - "wikimedia/relpath": "^2.1" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/console": "~4.0" + }, + "suggest": { + "dragonmantank/cron-expression": "Required to use scheduling component (~2.0).", + "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", + "symfony/process": "Required to use scheduling component (~4.0)." + }, + "time": "2018-05-02 14:47:56", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.6-dev" + } }, - "time": "2018-02-06 19:18:31", - "type": "package", "installation-source": "dist", "autoload": { - "files": [ - "src/helpers.php", - "src/blade-svg-sage.php" - ] + "psr-4": { + "Illuminate\\Console\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1650,10 +1646,71 @@ ], "authors": [ { - "name": "Brandon Nifong", - "email": "brandon@tendency.me" + "name": "Taylor Otwell", + "email": "taylor@laravel.com" } ], - "homepage": "https://github.com/log1x/blade-svg-sage" + "description": "The Illuminate Console package.", + "homepage": "https://laravel.com" + }, + { + "name": "roots/sage-installer", + "version": "1.3.6", + "version_normalized": "1.3.6.0", + "source": { + "type": "git", + "url": "https://github.com/roots/sage-installer.git", + "reference": "e811ab937a36b321ea88ec6000ab3d5019b8f2b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/roots/sage-installer/zipball/e811ab937a36b321ea88ec6000ab3d5019b8f2b1", + "reference": "e811ab937a36b321ea88ec6000ab3d5019b8f2b1", + "shasum": "" + }, + "require": { + "illuminate/console": "~5.6", + "illuminate/filesystem": "~5.6", + "symfony/process": "~3.3" + }, + "require-dev": { + "squizlabs/php_codesniffer": "~3.0" + }, + "time": "2018-04-25 17:45:56", + "bin": [ + "bin/sage" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Roots\\Sage\\Installer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ben Word", + "email": "ben@benword.com", + "homepage": "https://github.com/retlehs" + }, + { + "name": "QWp6t", + "email": "hi@qwp6t.me", + "homepage": "https://github.com/qwp6t" + } + ], + "description": "Sage starter theme installer", + "keywords": [ + "bootstrap", + "foundation", + "sage", + "tachyons", + "theme", + "wordpress" + ] } ] diff --git a/wp-content/themes/physioassist/vendor/composer/installers/.travis.yml b/wp-content/themes/physioassist/vendor/composer/installers/.travis.yml index 931191dd..eca55df3 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/.travis.yml +++ b/wp-content/themes/physioassist/vendor/composer/installers/.travis.yml @@ -13,6 +13,7 @@ php: - 5.6 - 7.0 - 7.1 + - 7.2 - hhvm - nightly diff --git a/wp-content/themes/physioassist/vendor/composer/installers/CHANGELOG.md b/wp-content/themes/physioassist/vendor/composer/installers/CHANGELOG.md index 357a7ded..c32a76ce 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/CHANGELOG.md +++ b/wp-content/themes/physioassist/vendor/composer/installers/CHANGELOG.md @@ -2,6 +2,23 @@ ## [Unreleased] +## v1.5.0 - 2017-12-29 +### Added +* Added WordPress dropin support. +* Added new types supported for Eliasis. +* Added support for Phoenix CMS. +* Added MODX installer. +* Added Majima instaler. +* Added SiteDirect installer. +* Added support optional prefix in OctoberCMS installers. +* Added PHP 7.2 support. + +### Changed +* Changed remove packages, see [#348](https://github.com/composer/installers/pull/348). + +### Fixed +* Fixed code style, removed unused imports. + ## v1.4.0 - 2017-08-09 ### Added * Installer for eZ Platform. diff --git a/wp-content/themes/physioassist/vendor/composer/installers/README.md b/wp-content/themes/physioassist/vendor/composer/installers/README.md index b77dbe38..7f488b9d 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/README.md +++ b/wp-content/themes/physioassist/vendor/composer/installers/README.md @@ -53,7 +53,7 @@ is not needed to install packages with these frameworks: | Dolibarr | `dolibarr-module` | Drupal | `drupal-core`
`drupal-module`
`drupal-theme`

`drupal-library`
`drupal-profile`
`drupal-drush` | Elgg | `elgg-plugin` -| Eliasis | `eliasis-module` +| Eliasis | `eliasis-component`
`eliasis-module`
`eliasis-plugin`
`eliasis-template` | ExpressionEngine 3 | `ee3-addon`
`ee3-theme` | eZ Platform | `ezplatform-assets`
`ezplatform-meta-assets` | FuelPHP v1.x | `fuel-module`
`fuel-package`
`fuel-theme` @@ -72,9 +72,11 @@ is not needed to install packages with these frameworks: | Lavalite | `lavalite-theme`
`lavalite-package` | Lithium | **`lithium-library`
`lithium-source`** | Magento | `magento-library`
`magento-skin`
`magento-theme` +| majima | `majima-plugin` | Mako | `mako-package` | Mautic | `mautic-plugin`
`mautic-theme` | Maya | `maya-module` +| MODX | `modx-extra` | MODX Evo | `modxevo-snippet`
`modxevo-plugin`
`modxevo-module`
`modxevo-template`
`modxevo-lib` | MediaWiki | `mediawiki-extension` | October | **`october-module`
`october-plugin`
`october-theme`** @@ -96,6 +98,7 @@ is not needed to install packages with these frameworks: | Roundcube | `roundcube-plugin` | shopware | `shopware-backend-plugin`
`shopware-core-plugin`
`shopware-frontend-plugin`
`shopware-theme`
`shopware-plugin`
`shopware-frontend-theme` | SilverStripe | `silverstripe-module`
`silverstripe-theme` +| SiteDirect | `sitedirect-module`
`sitedirect-plugin` | SMF | `smf-module`
`smf-theme` | SyDES | `sydes-module`
`sydes-theme` | symfony1 | **`symfony1-plugin`** @@ -106,7 +109,7 @@ is not needed to install packages with these frameworks: | Vanilla | `vanilla-plugin`
`vanilla-theme` | Vgmcp | `vgmcp-bundle`
`vgmcp-theme` | Wolf CMS | `wolfcms-plugin` -| WordPress | `wordpress-plugin`
`wordpress-theme`

`wordpress-muplugin` +| WordPress | `wordpress-plugin`
`wordpress-theme`

`wordpress-muplugin`
`wordpress-dropin` | YAWIK | `yawik-module` | Zend | `zend-library`
`zend-extra`
`zend-module` | Zikula | `zikula-module`
`zikula-theme` diff --git a/wp-content/themes/physioassist/vendor/composer/installers/composer.json b/wp-content/themes/physioassist/vendor/composer/installers/composer.json index 0a7477d1..6de40853 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/composer.json +++ b/wp-content/themes/physioassist/vendor/composer/installers/composer.json @@ -37,9 +37,11 @@ "Lavalite", "Lithium", "Magento", + "majima", "Mako", "Mautic", "Maya", + "MODX", "MODX Evo", "MediaWiki", "OXID", @@ -47,6 +49,7 @@ "MODULEWork", "Moodle", "Piwik", + "pxcms", "phpBB", "Plentymarkets", "PPI", @@ -94,7 +97,7 @@ }, "require-dev": { "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" + "phpunit/phpunit": "^4.8.36" }, "scripts": { "test": "phpunit" diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php index 96e987a2..6352beb1 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php @@ -2,7 +2,6 @@ namespace Composer\Installers; use Composer\DependencyResolver\Pool; -use Composer\Package\PackageInterface; class CakePHPInstaller extends BaseInstaller { diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php index 2be4e3cb..6f3dc97b 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php @@ -4,6 +4,9 @@ namespace Composer\Installers; class EliasisInstaller extends BaseInstaller { protected $locations = array( - 'module' => 'modules/{$name}/' + 'component' => 'components/{$name}/', + 'module' => 'modules/{$name}/', + 'plugin' => 'plugins/{$name}/', + 'template' => 'templates/{$name}/', ); } diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/Installer.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/Installer.php index 8356b8c9..a9d49f34 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/Installer.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/Installer.php @@ -54,18 +54,21 @@ class Installer extends LibraryInstaller 'lavalite' => 'LavaLiteInstaller', 'lithium' => 'LithiumInstaller', 'magento' => 'MagentoInstaller', + 'majima' => 'MajimaInstaller', 'mako' => 'MakoInstaller', 'maya' => 'MayaInstaller', 'mautic' => 'MauticInstaller', 'mediawiki' => 'MediaWikiInstaller', 'microweber' => 'MicroweberInstaller', 'modulework' => 'MODULEWorkInstaller', + 'modx' => 'ModxInstaller', 'modxevo' => 'MODXEvoInstaller', 'moodle' => 'MoodleInstaller', 'october' => 'OctoberInstaller', 'ontowiki' => 'OntoWikiInstaller', 'oxid' => 'OxidInstaller', 'osclass' => 'OsclassInstaller', + 'pxcms' => 'PxcmsInstaller', 'phpbb' => 'PhpBBInstaller', 'pimcore' => 'PimcoreInstaller', 'piwik' => 'PiwikInstaller', @@ -79,6 +82,7 @@ class Installer extends LibraryInstaller 'reindex' => 'ReIndexInstaller', 'roundcube' => 'RoundcubeInstaller', 'shopware' => 'ShopwareInstaller', + 'sitedirect' => 'SiteDirectInstaller', 'silverstripe' => 'SilverStripeInstaller', 'smf' => 'SMFInstaller', 'sydes' => 'SyDESInstaller', @@ -120,14 +124,9 @@ class Installer extends LibraryInstaller public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package) { - if (!$repo->hasPackage($package)) { - throw new \InvalidArgumentException('Package is not installed: '.$package); - } - - $repo->removePackage($package); - - $installPath = $this->getInstallPath($package); - $this->io->write(sprintf('Deleting %s - %s', $installPath, $this->filesystem->removeDirectory($installPath) ? 'deleted' : 'not deleted')); + parent::uninstall($repo, $package); + $installPath = $this->getPackageBasePath($package); + $this->io->write(sprintf('Deleting %s - %s', $installPath, !file_exists($installPath) ? 'deleted' : 'not deleted')); } /** diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php new file mode 100644 index 00000000..e463756f --- /dev/null +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php @@ -0,0 +1,37 @@ + 'plugins/{$name}/', + ); + + /** + * Transforms the names + * @param array $vars + * @return array + */ + public function inflectPackageVars($vars) + { + return $this->correctPluginName($vars); + } + + /** + * Change hyphenated names to camelcase + * @param array $vars + * @return array + */ + private function correctPluginName($vars) + { + $camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) { + return strtoupper($matches[0][1]); + }, $vars['name']); + $vars['name'] = ucfirst($camelCasedName); + return $vars; + } +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php new file mode 100644 index 00000000..0ee140ab --- /dev/null +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php @@ -0,0 +1,12 @@ + 'core/packages/{$name}/' + ); +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php index 6bf53fd1..93b25de5 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php @@ -32,15 +32,15 @@ class OctoberInstaller extends BaseInstaller protected function inflectPluginVars($vars) { - $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']); + $vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']); return $vars; } protected function inflectThemeVars($vars) { - $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); + $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']); return $vars; } -} \ No newline at end of file +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php new file mode 100644 index 00000000..65510580 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php @@ -0,0 +1,63 @@ + 'app/Modules/{$name}/', + 'theme' => 'themes/{$name}/', + ); + + /** + * Format package name. + * + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + if ($vars['type'] === 'pxcms-module') { + return $this->inflectModuleVars($vars); + } + + if ($vars['type'] === 'pxcms-theme') { + return $this->inflectThemeVars($vars); + } + + return $vars; + } + + /** + * For package type pxcms-module, cut off a trailing '-plugin' if present. + * + * return string + */ + protected function inflectModuleVars($vars) + { + $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) + $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module- + $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module + $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s + $vars['name'] = ucwords($vars['name']); // make module name camelcased + + return $vars; + } + + + /** + * For package type pxcms-module, cut off a trailing '-plugin' if present. + * + * return string + */ + protected function inflectThemeVars($vars) + { + $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) + $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme- + $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme + $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s + $vars['name'] = ucwords($vars['name']); // make module name camelcased + + return $vars; + } +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php index d0193cba..7d20d27a 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php @@ -25,9 +25,9 @@ class ShopwareInstaller extends BaseInstaller { if ($vars['type'] === 'shopware-theme') { return $this->correctThemeName($vars); - } else { - return $this->correctPluginName($vars); } + + return $this->correctPluginName($vars); } /** diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php index 17ca543a..81910e9f 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php @@ -28,9 +28,8 @@ class SilverStripeInstaller extends BaseInstaller && version_compare($package->getVersion(), '2.999.999') < 0 ) { return $this->templatePath($this->locations['module'], array('name' => 'sapphire')); - } else { - return parent::getInstallPath($package, $frameworkType); } + return parent::getInstallPath($package, $frameworkType); } } diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php new file mode 100644 index 00000000..762d94c6 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php @@ -0,0 +1,25 @@ + 'modules/{$vendor}/{$name}/', + 'plugin' => 'plugins/{$vendor}/{$name}/' + ); + + public function inflectPackageVars($vars) + { + return $this->parseVars($vars); + } + + protected function parseVars($vars) + { + $vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor']; + $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); + $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); + + return $vars; + } +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php index b03219c6..91c46ad9 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php @@ -7,5 +7,6 @@ class WordPressInstaller extends BaseInstaller 'plugin' => 'wp-content/plugins/{$name}/', 'theme' => 'wp-content/themes/{$name}/', 'muplugin' => 'wp-content/mu-plugins/{$name}/', + 'dropin' => 'wp-content/{$name}/', ); } diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php index f6e83410..3fff1003 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php @@ -4,8 +4,9 @@ namespace Composer\Installers\Test; use Composer\Installers\AsgardInstaller; use Composer\Package\Package; use Composer\Composer; +use PHPUnit\Framework\TestCase; -class AsgardInstallerTest extends \PHPUnit_Framework_TestCase +class AsgardInstallerTest extends TestCase { /** * @var AsgardInstaller diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php index e909bb42..7fe8fcbb 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/BitrixInstallerTest.php @@ -3,7 +3,6 @@ namespace Composer\Installers\Test; use Composer\Installers\BitrixInstaller; -use Composer\Package\PackageInterface; use Composer\Package\Package; use Composer\Composer; @@ -73,4 +72,4 @@ class BitrixInstallerTest extends TestCase ), ); } -} \ No newline at end of file +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php index 523e8476..46b02769 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/CakePHPInstallerTest.php @@ -6,7 +6,6 @@ use Composer\Repository\RepositoryManager; use Composer\Repository\InstalledArrayRepository; use Composer\Package\Package; use Composer\Package\RootPackage; -use Composer\Package\Link; use Composer\Package\Version\VersionParser; use Composer\Composer; use Composer\Config; diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php index 9e385e6a..fc1d6717 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/DokuWikiInstallerTest.php @@ -4,8 +4,9 @@ namespace Composer\Installers\Test; use Composer\Installers\DokuWikiInstaller; use Composer\Package\Package; use Composer\Composer; +use PHPUnit\Framework\TestCase as BaseTestCase; -class DokuWikiInstallerTest extends \PHPUnit_Framework_TestCase +class DokuWikiInstallerTest extends BaseTestCase { /** * @var DokuWikiInstaller diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php index cec3e455..75b402b6 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php @@ -123,7 +123,10 @@ class InstallerTest extends TestCase array('ee2-theme', true), array('ee2-addon', true), array('elgg-plugin', true), + array('eliasis-component', true), array('eliasis-module', true), + array('eliasis-plugin', true), + array('eliasis-template', true), array('ezplatform-assets', true), array('ezplatform-meta-assets', true), array('fuel-module', true), @@ -149,7 +152,9 @@ class InstallerTest extends TestCase array('lavalite-package', true), array('lithium-library', true), array('magento-library', true), + array('majima-plugin', true), array('mako-package', true), + array('modx-extra', true), array('modxevo-snippet', true), array('modxevo-plugin', true), array('modxevo-module', true), @@ -163,6 +168,8 @@ class InstallerTest extends TestCase array('october-module', true), array('october-plugin', true), array('piwik-plugin', true), + array('pxcms-module', true), + array('pxcms-theme', true), array('phpbb-extension', true), array('pimcore-plugin', true), array('plentymarkets-plugin', true), @@ -277,7 +284,10 @@ class InstallerTest extends TestCase array('drupal-profile', 'profiles/my_module/', 'shama/my_module'), array('drupal-drush', 'drush/my_module/', 'shama/my_module'), array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'), + array('eliasis-component', 'components/my_component/', 'shama/my_component'), array('eliasis-module', 'modules/my_module/', 'shama/my_module'), + array('eliasis-plugin', 'plugins/my_plugin/', 'shama/my_plugin'), + array('eliasis-template', 'templates/my_template/', 'shama/my_template'), array('ee3-addon', 'system/user/addons/ee_theme/', 'author/ee_theme'), array('ee3-theme', 'themes/user/ee_package/', 'author/ee_package'), array('ee2-addon', 'system/expressionengine/third_party/ee_theme/', 'author/ee_theme'), @@ -311,6 +321,8 @@ class InstallerTest extends TestCase array('lavalite-package', 'packages/my_group/my_package/', 'my_group/my_package'), array('lithium-library', 'libraries/li3_test/', 'user/li3_test'), array('magento-library', 'lib/foo/', 'test/foo'), + array('majima-plugin', 'plugins/MyPlugin/', 'shama/my-plugin'), + array('modx-extra', 'core/packages/extra/', 'vendor/extra'), array('modxevo-snippet', 'assets/snippets/my_snippet/', 'shama/my_snippet'), array('modxevo-plugin', 'assets/plugins/my_plugin/', 'shama/my_plugin'), array('modxevo-module', 'assets/modules/my_module/', 'shama/my_module'), @@ -332,6 +344,10 @@ class InstallerTest extends TestCase array('piwik-plugin', 'plugins/VisitSummary/', 'shama/visit-summary'), array('prestashop-module', 'modules/a-module/', 'vendor/a-module'), array('prestashop-theme', 'themes/a-theme/', 'vendor/a-theme'), + array('pxcms-module', 'app/Modules/Foo/', 'vendor/module-foo'), + array('pxcms-module', 'app/Modules/Foo/', 'vendor/pxcms-foo'), + array('pxcms-theme', 'themes/Foo/', 'vendor/theme-foo'), + array('pxcms-theme', 'themes/Foo/', 'vendor/pxcms-foo'), array('phpbb-extension', 'ext/test/foo/', 'test/foo'), array('phpbb-style', 'styles/foo/', 'test/foo'), array('phpbb-language', 'language/foo/', 'test/foo'), @@ -525,7 +541,7 @@ class InstallerTest extends TestCase $package = new Package('foo', '1.0.0', '1.0.0'); $installer = $this->getMock('Composer\Installers\Installer', array('getInstallPath'), array($this->io, $this->composer)); - $installer->expects($this->once())->method('getInstallPath')->with($package)->will($this->returnValue(sys_get_temp_dir().'/foo')); + $installer->expects($this->atLeastOnce())->method('getInstallPath')->with($package)->will($this->returnValue(sys_get_temp_dir().'/foo')); $repo = $this->getMock('Composer\Repository\InstalledRepositoryInterface'); $repo->expects($this->once())->method('hasPackage')->with($package)->will($this->returnValue(true)); diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php index f800c611..1e57696f 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MayaInstallerTest.php @@ -4,8 +4,9 @@ namespace Composer\Installers\Test; use Composer\Installers\MayaInstaller; use Composer\Package\Package; use Composer\Composer; +use PHPUnit\Framework\TestCase as BaseTestCase; -class MayaInstallerTest extends \PHPUnit_Framework_TestCase +class MayaInstallerTest extends BaseTestCase { /** * @var MayaInstaller diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php index 3675e188..a51c0bb2 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/MediaWikiInstallerTest.php @@ -4,8 +4,9 @@ namespace Composer\Installers\Test; use Composer\Installers\MediaWikiInstaller; use Composer\Package\Package; use Composer\Composer; +use PHPUnit\Framework\TestCase as BaseTestCase; -class MediaWikiInstallerTest extends \PHPUnit_Framework_TestCase +class MediaWikiInstallerTest extends BaseTestCase { /** * @var MediaWikiInstaller diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php index fd427cdc..6e615c77 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OctoberInstallerTest.php @@ -4,8 +4,9 @@ namespace Composer\Installers\Test; use Composer\Installers\OctoberInstaller; use Composer\Package\Package; use Composer\Composer; +use PHPUnit\Framework\TestCase as BaseTestCase; -class OctoberInstallerTest extends \PHPUnit_Framework_TestCase +class OctoberInstallerTest extends BaseTestCase { /** * @var OctoberInstaller @@ -63,4 +64,4 @@ class OctoberInstallerTest extends \PHPUnit_Framework_TestCase ), ); } -} \ No newline at end of file +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php index 24c498c8..9558a6b2 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/OntoWikiInstallerTest.php @@ -2,14 +2,13 @@ namespace Composer\Installers\Test; use Composer\Installers\OntoWikiInstaller; -use Composer\Package\Package; -use Composer\Composer; +use PHPUnit\Framework\TestCase as BaseTestCase; /** * Test for the OntoWikiInstaller * code was taken from DokuWikiInstaller */ -class OntoWikiInstallerTest extends \PHPUnit_Framework_TestCase +class OntoWikiInstallerTest extends BaseTestCase { /** * @var OntoWikiInstaller diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php new file mode 100644 index 00000000..e36210d5 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SiteDirectInstallerTest.php @@ -0,0 +1,120 @@ +package = new Package('sitedirect/some_name', '1.0.9', '1.0'); + $this->installer = new SiteDirectInstaller( + $this->package, + new Composer() + ); + + } + + /** + * @dataProvider dataProvider + */ + public function testInflectPackageVars($data, $expected) + { + $result = $this->installer->inflectPackageVars($data); + $this->assertEquals($result, $expected); + } + + /** + * @dataProvider dataProvider + */ + public function testInstallPath($data, $expected) + { + $result = $this->installer->inflectPackageVars($data); + $path = $this->createPackage($data); + + // use $result to get the proper capitalization for the vendor path + $expectedPath = "modules/{$result['vendor']}/{$result['name']}/"; + $notExpectedPath = "modules/{$data['vendor']}/{$data['name']}/"; + $this->assertEquals($expectedPath, $path); + $this->assertNotEquals($notExpectedPath, $path); + } + + /** + * @param $data + * @return string + */ + private function createPackage($data) + { + $fullName = "{$data['vendor']}/{$data['name']}"; + + $package = new Package($fullName, '1.0', '1.0'); + $package->setType('sitedirect-module'); + $installer = new SiteDirectInstaller($package, new Composer()); + + $path = $installer->getInstallPath($package, 'sitedirect'); + return $path; + } + + public function dataProvider() + { + return array( + array( + 'data' => array( + 'name' => 'kernel', + 'vendor' => 'sitedirect', + 'type' => 'sitedirect-module', + ), + 'expected' => array( + 'name' => 'Kernel', + 'vendor' => 'SiteDirect', + 'type' => 'sitedirect-module', + ) + ), + array( + 'data' => array( + 'name' => 'that_guy', + 'vendor' => 'whatGuy', + 'type' => 'sitedirect-module', + ), + 'expected' => array( + 'name' => 'ThatGuy', + 'vendor' => 'whatGuy', + 'type' => 'sitedirect-module', + ) + ), + array( + 'data' => array( + 'name' => 'checkout', + 'vendor' => 'someVendor', + 'type' => 'sitedirect-plugin', + ), + 'expected' => array( + 'name' => 'Checkout', + 'vendor' => 'someVendor', + 'type' => 'sitedirect-plugin', + ) + ), + array( + 'data' => array( + 'name' => 'checkout', + 'vendor' => 'siteDirect', + 'type' => 'sitedirect-plugin', + ), + 'expected' => array( + 'name' => 'Checkout', + 'vendor' => 'SiteDirect', + 'type' => 'sitedirect-plugin', + ) + ), + ); + } +} diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php index 1521fbf3..f1d120e5 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/SyDESInstallerTest.php @@ -4,8 +4,9 @@ namespace Composer\Installers\Test; use Composer\Installers\SyDESInstaller; use Composer\Package\Package; use Composer\Composer; +use PHPUnit\Framework\TestCase as BaseTestCase; -class SyDESInstallerTest extends \PHPUnit_Framework_TestCase +class SyDESInstallerTest extends BaseTestCase { /** * @var SyDESInstaller diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php index 6418a03b..0e3e7319 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/TestCase.php @@ -17,8 +17,9 @@ use Composer\Package\Package; use Composer\Package\AliasPackage; use Composer\Package\LinkConstraint\VersionConstraint; use Composer\Util\Filesystem; +use PHPUnit\Framework\TestCase as BaseTestCase; -abstract class TestCase extends \PHPUnit_Framework_TestCase +abstract class TestCase extends BaseTestCase { private static $parser; diff --git a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php index 8b33ab81..1a91588d 100644 --- a/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php +++ b/wp-content/themes/physioassist/vendor/composer/installers/tests/Composer/Installers/Test/VgmcpInstallerTest.php @@ -4,8 +4,9 @@ namespace Composer\Installers\Test; use Composer\Installers\VgmcpInstaller; use Composer\Package\Package; use Composer\Composer; +use PHPUnit\Framework\TestCase as BaseTestCase; -class VgmcpInstallerTest extends \PHPUnit_Framework_TestCase +class VgmcpInstallerTest extends BaseTestCase { /** * @var VgmcpInstaller diff --git a/wp-content/themes/physioassist/vendor/doctrine/inflector/composer.json b/wp-content/themes/physioassist/vendor/doctrine/inflector/composer.json index e06b6494..2189ff17 100644 --- a/wp-content/themes/physioassist/vendor/doctrine/inflector/composer.json +++ b/wp-content/themes/physioassist/vendor/doctrine/inflector/composer.json @@ -13,7 +13,7 @@ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"} ], "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^6.2" @@ -22,11 +22,11 @@ "psr-4": { "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" } }, "autoload-dev": { - "psr-4": { "Doctrine\\Tests\\Common\\Inflector\\": "tests/Doctrine/Common/Inflector" } + "psr-4": { "Doctrine\\Tests\\Common\\Inflector\\": "tests/Doctrine/Tests/Common/Inflector" } }, "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } } } diff --git a/wp-content/themes/physioassist/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/wp-content/themes/physioassist/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php index 3a951af8..f9067a02 100644 --- a/wp-content/themes/physioassist/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php +++ b/wp-content/themes/physioassist/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -38,7 +38,7 @@ class Inflector /** * Plural inflector rules. * - * @var array + * @var string[][] */ private static $plural = array( 'rules' => array( @@ -53,6 +53,7 @@ class Inflector '/(?:([^f])fe|([lr])f)$/i' => '\1\2ves', '/sis$/i' => 'ses', '/([ti])um$/i' => '\1a', + '/(c)riterion$/i' => '\1riteria', '/(p)erson$/i' => '\1eople', '/(m)an$/i' => '\1en', '/(c)hild$/i' => '\1hildren', @@ -100,6 +101,7 @@ class Inflector 'ganglion' => 'ganglions', 'genie' => 'genies', 'genus' => 'genera', + 'goose' => 'geese', 'graffito' => 'graffiti', 'hippopotamus' => 'hippopotami', 'hoof' => 'hoofs', @@ -138,6 +140,7 @@ class Inflector 'tornado' => 'tornadoes', 'trilby' => 'trilbys', 'turf' => 'turfs', + 'valve' => 'valves', 'volcano' => 'volcanoes', ) ); @@ -145,7 +148,7 @@ class Inflector /** * Singular inflector rules. * - * @var array + * @var string[][] */ private static $singular = array( 'rules' => array( @@ -174,9 +177,11 @@ class Inflector '/(hive)s$/i' => '\1', '/(drive)s$/i' => '\1', '/(dive)s$/i' => '\1', + '/(olive)s$/i' => '\1', '/([^fo])ves$/i' => '\1fe', '/(^analy)ses$/i' => '\1sis', '/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', + '/(c)riteria$/i' => '\1riterion', '/([ti])a$/i' => '\1um', '/(p)eople$/i' => '\1\2erson', '/(m)en$/i' => '\1an', @@ -196,21 +201,27 @@ class Inflector '.*pox', '.*sheep', '.*ss', + 'data', 'police', 'pants', 'clothes', ), 'irregular' => array( - 'caches' => 'cache', - 'criteria' => 'criterion', - 'curves' => 'curve', - 'emphases' => 'emphasis', - 'foes' => 'foe', - 'hoaxes' => 'hoax', - 'media' => 'medium', - 'neuroses' => 'neurosis', - 'waves' => 'wave', - 'oases' => 'oasis', + 'abuses' => 'abuse', + 'avalanches' => 'avalanche', + 'caches' => 'cache', + 'criteria' => 'criterion', + 'curves' => 'curve', + 'emphases' => 'emphasis', + 'foes' => 'foe', + 'geese' => 'goose', + 'graves' => 'grave', + 'hoaxes' => 'hoax', + 'media' => 'medium', + 'neuroses' => 'neurosis', + 'waves' => 'wave', + 'oases' => 'oasis', + 'valves' => 'valve', ) ); @@ -220,18 +231,18 @@ class Inflector * @var array */ private static $uninflected = array( - 'Amoyese', 'bison', 'Borghese', 'bream', 'breeches', 'britches', 'buffalo', 'cantus', - 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'Congoese', 'contretemps', 'corps', - 'debris', 'diabetes', 'djinn', 'eland', 'elk', 'equipment', 'Faroese', 'flounder', - 'Foochowese', 'Furniture', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti', - 'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', - 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'Luggage', 'mackerel', 'Maltese', '.*?media', - 'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', - 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', - 'proceedings', 'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', - 'sea[- ]bass', 'series', 'Shavese', 'shears', 'siemens', 'species', 'staff', 'swine', - 'testes', 'trousers', 'trout', 'tuna', 'Vermontese', 'Wenchowese', 'whiting', - 'wildebeest', 'Yengeese' + '.*?media', 'Amoyese', 'audio', 'bison', 'Borghese', 'bream', 'breeches', + 'britches', 'buffalo', 'cantus', 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'compensation', 'Congoese', + 'contretemps', 'coreopsis', 'corps', 'data', 'debris', 'deer', 'diabetes', 'djinn', 'education', 'eland', + 'elk', 'emoji', 'equipment', 'evidence', 'Faroese', 'feedback', 'fish', 'flounder', 'Foochowese', + 'Furniture', 'furniture', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'gold', + 'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', 'jackanapes', 'jedi', + 'Kiplingese', 'knowledge', 'Kongoese', 'love', 'Lucchese', 'Luggage', 'mackerel', 'Maltese', 'metadata', + 'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', 'nutrition', 'offspring', + 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'plankton', 'pliers', 'pokemon', 'police', 'Portuguese', + 'proceedings', 'rabies', 'rain', 'rhinoceros', 'rice', 'salmon', 'Sarawakese', 'scissors', 'sea[- ]bass', + 'series', 'Shavese', 'shears', 'sheep', 'siemens', 'species', 'staff', 'swine', 'traffic', + 'trousers', 'trout', 'tuna', 'us', 'Vermontese', 'Wenchowese', 'wheat', 'whiting', 'wildebeest', 'Yengeese' ); /** @@ -250,36 +261,24 @@ class Inflector /** * Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'. - * - * @param string $word The word to tableize. - * - * @return string The tableized word. */ - public static function tableize($word) + public static function tableize(string $word) : string { return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word)); } /** * Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'. - * - * @param string $word The word to classify. - * - * @return string The classified word. */ - public static function classify($word) + public static function classify(string $word) : string { - return str_replace(' ', '', ucwords(strtr($word, '_-', ' '))); + return str_replace([' ', '_', '-'], '', ucwords($word, ' _-')); } /** * Camelizes a word. This uses the classify() method and turns the first character to lowercase. - * - * @param string $word The word to camelize. - * - * @return string The camelized word. */ - public static function camelize($word) + public static function camelize(string $word) : string { return lcfirst(self::classify($word)); } @@ -288,7 +287,7 @@ class Inflector * Uppercases words with configurable delimeters between words. * * Takes a string and capitalizes all of the words, like PHP's built-in - * ucwords function. This extends that behavior, however, by allowing the + * ucwords function. This extends that behavior, however, by allowing the * word delimeters to be configured, rather than only separating on * whitespace. * @@ -309,24 +308,16 @@ class Inflector * * @return string The string with all delimeter-separated words capitalized. */ - public static function ucwords($string, $delimiters = " \n\t\r\0\x0B-") + public static function ucwords(string $string, string $delimiters = " \n\t\r\0\x0B-") : string { - return preg_replace_callback( - '/[^' . preg_quote($delimiters, '/') . ']+/', - function($matches) { - return ucfirst($matches[0]); - }, - $string - ); + return ucwords($string, $delimiters); } /** * Clears Inflectors inflected value caches, and resets the inflection * rules to the initial values. - * - * @return void */ - public static function reset() + public static function reset() : void { if (empty(self::$initialState)) { self::$initialState = get_class_vars('Inflector'); @@ -335,7 +326,7 @@ class Inflector } foreach (self::$initialState as $key => $val) { - if ($key != 'initialState') { + if ($key !== 'initialState') { self::${$key} = $val; } } @@ -355,14 +346,14 @@ class Inflector * )); * }}} * - * @param string $type The type of inflection, either 'plural' or 'singular' - * @param array $rules An array of rules to be added. - * @param boolean $reset If true, will unset default inflections for all - * new rules that are being defined in $rules. + * @param string $type The type of inflection, either 'plural' or 'singular' + * @param array|iterable $rules An array of rules to be added. + * @param boolean $reset If true, will unset default inflections for all + * new rules that are being defined in $rules. * * @return void */ - public static function rules($type, $rules, $reset = false) + public static function rules(string $type, iterable $rules, bool $reset = false) : void { foreach ($rules as $rule => $pattern) { if ( ! is_array($pattern)) { @@ -400,7 +391,7 @@ class Inflector * * @return string The word in plural form. */ - public static function pluralize($word) + public static function pluralize(string $word) : string { if (isset(self::$cache['pluralize'][$word])) { return self::$cache['pluralize'][$word]; @@ -420,7 +411,7 @@ class Inflector } if (preg_match('/(.*)\\b(' . self::$plural['cacheIrregular'] . ')$/i', $word, $regs)) { - self::$cache['pluralize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1); + self::$cache['pluralize'][$word] = $regs[1] . $word[0] . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1); return self::$cache['pluralize'][$word]; } @@ -447,7 +438,7 @@ class Inflector * * @return string The word in singular form. */ - public static function singularize($word) + public static function singularize(string $word) : string { if (isset(self::$cache['singularize'][$word])) { return self::$cache['singularize'][$word]; @@ -468,12 +459,12 @@ class Inflector } if (!isset(self::$singular['cacheUninflected']) || !isset(self::$singular['cacheIrregular'])) { - self::$singular['cacheUninflected'] = '(?:' . join('|', self::$singular['merged']['uninflected']) . ')'; - self::$singular['cacheIrregular'] = '(?:' . join('|', array_keys(self::$singular['merged']['irregular'])) . ')'; + self::$singular['cacheUninflected'] = '(?:' . implode('|', self::$singular['merged']['uninflected']) . ')'; + self::$singular['cacheIrregular'] = '(?:' . implode('|', array_keys(self::$singular['merged']['irregular'])) . ')'; } if (preg_match('/(.*)\\b(' . self::$singular['cacheIrregular'] . ')$/i', $word, $regs)) { - self::$cache['singularize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1); + self::$cache['singularize'][$word] = $regs[1] . $word[0] . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1); return self::$cache['singularize'][$word]; } diff --git a/wp-content/themes/physioassist/vendor/illuminate/config/Repository.php b/wp-content/themes/physioassist/vendor/illuminate/config/Repository.php index 2c00686a..56644eba 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/config/Repository.php +++ b/wp-content/themes/physioassist/vendor/illuminate/config/Repository.php @@ -40,15 +40,40 @@ class Repository implements ArrayAccess, ConfigContract /** * Get the specified configuration value. * - * @param string $key + * @param array|string $key * @param mixed $default * @return mixed */ public function get($key, $default = null) { + if (is_array($key)) { + return $this->getMany($key); + } + return Arr::get($this->items, $key, $default); } + /** + * Get many configuration values. + * + * @param array $keys + * @return array + */ + public function getMany($keys) + { + $config = []; + + foreach ($keys as $key => $default) { + if (is_numeric($key)) { + list($key, $default) = [$default, null]; + } + + $config[$key] = Arr::get($this->items, $key, $default); + } + + return $config; + } + /** * Set a given configuration value. * diff --git a/wp-content/themes/physioassist/vendor/illuminate/config/composer.json b/wp-content/themes/physioassist/vendor/illuminate/config/composer.json index 69ab6e77..f79f6f56 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/config/composer.json +++ b/wp-content/themes/physioassist/vendor/illuminate/config/composer.json @@ -14,9 +14,9 @@ } ], "require": { - "php": ">=5.6.4", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*" + "php": "^7.1.3", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*" }, "autoload": { "psr-4": { @@ -25,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "config": { diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Application.php b/wp-content/themes/physioassist/vendor/illuminate/console/Application.php index d004c741..aa3ac182 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Application.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Application.php @@ -3,15 +3,20 @@ namespace Illuminate\Console; use Closure; +use Illuminate\Support\ProcessUtils; use Illuminate\Contracts\Events\Dispatcher; -use Symfony\Component\Process\ProcessUtils; use Illuminate\Contracts\Container\Container; +use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Process\PhpExecutableFinder; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\ConsoleOutput; use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Application as SymfonyApplication; use Symfony\Component\Console\Command\Command as SymfonyCommand; +use Symfony\Component\Console\Exception\CommandNotFoundException; use Illuminate\Contracts\Console\Application as ApplicationContract; class Application extends SymfonyApplication implements ApplicationContract @@ -37,6 +42,13 @@ class Application extends SymfonyApplication implements ApplicationContract */ protected static $bootstrappers = []; + /** + * The Event Dispatcher. + * + * @var \Illuminate\Contracts\Events\Dispatcher + */ + protected $events; + /** * Create a new Artisan console application. * @@ -50,14 +62,39 @@ class Application extends SymfonyApplication implements ApplicationContract parent::__construct('Laravel Framework', $version); $this->laravel = $laravel; + $this->events = $events; $this->setAutoExit(false); $this->setCatchExceptions(false); - $events->dispatch(new Events\ArtisanStarting($this)); + $this->events->dispatch(new Events\ArtisanStarting($this)); $this->bootstrap(); } + /** + * {@inheritdoc} + */ + public function run(InputInterface $input = null, OutputInterface $output = null) + { + $commandName = $this->getCommandName( + $input = $input ?: new ArgvInput + ); + + $this->events->fire( + new Events\CommandStarting( + $commandName, $input, $output = $output ?: new ConsoleOutput + ) + ); + + $exitCode = parent::run($input, $output); + + $this->events->fire( + new Events\CommandFinished($commandName, $input, $output, $exitCode) + ); + + return $exitCode; + } + /** * Determine the proper PHP executable. * @@ -112,7 +149,7 @@ class Application extends SymfonyApplication implements ApplicationContract } } - /* + /** * Clear the console application bootstrappers. * * @return void @@ -127,18 +164,26 @@ class Application extends SymfonyApplication implements ApplicationContract * * @param string $command * @param array $parameters - * @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer + * @param \Symfony\Component\Console\Output\OutputInterface|null $outputBuffer * @return int */ public function call($command, array $parameters = [], $outputBuffer = null) { - $parameters = collect($parameters)->prepend($command); + if (is_subclass_of($command, SymfonyCommand::class)) { + $command = $this->laravel->make($command)->getName(); + } + + if (! $this->has($command)) { + throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $command)); + } + + array_unshift($parameters, $command); $this->lastOutput = $outputBuffer ?: new BufferedOutput; $this->setCatchExceptions(false); - $result = $this->run(new ArrayInput($parameters->toArray()), $this->lastOutput); + $result = $this->run(new ArrayInput($parameters), $this->lastOutput); $this->setCatchExceptions(true); @@ -152,7 +197,9 @@ class Application extends SymfonyApplication implements ApplicationContract */ public function output() { - return $this->lastOutput ? $this->lastOutput->fetch() : ''; + return $this->lastOutput && method_exists($this->lastOutput, 'fetch') + ? $this->lastOutput->fetch() + : ''; } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Command.php b/wp-content/themes/physioassist/vendor/illuminate/console/Command.php index 0ae9662f..4d7367f8 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Command.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Command.php @@ -2,6 +2,7 @@ namespace Illuminate\Console; +use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Support\Arrayable; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\ArrayInput; @@ -15,6 +16,8 @@ use Symfony\Component\Console\Command\Command as SymfonyCommand; class Command extends SymfonyCommand { + use Macroable; + /** * The Laravel application instance. * @@ -177,9 +180,7 @@ class Command extends SymfonyCommand */ protected function execute(InputInterface $input, OutputInterface $output) { - $method = method_exists($this, 'handle') ? 'handle' : 'fire'; - - return $this->laravel->call([$this, $method]); + return $this->laravel->call([$this, 'handle']); } /** @@ -194,7 +195,7 @@ class Command extends SymfonyCommand $arguments['command'] = $command; return $this->getApplication()->find($command)->run( - new ArrayInput($arguments), $this->output + $this->createInputFromArguments($arguments), $this->output ); } @@ -210,10 +211,25 @@ class Command extends SymfonyCommand $arguments['command'] = $command; return $this->getApplication()->find($command)->run( - new ArrayInput($arguments), new NullOutput + $this->createInputFromArguments($arguments), new NullOutput ); } + /** + * Create an input instance from the given arguments. + * + * @param array $arguments + * @return \Symfony\Component\Console\Input\ArrayInput + */ + protected function createInputFromArguments(array $arguments) + { + return tap(new ArrayInput($arguments), function ($input) { + if ($input->hasParameterOption(['--no-interaction'], true)) { + $input->setInteractive(false); + } + }); + } + /** * Determine if the given argument is present. * @@ -228,7 +244,7 @@ class Command extends SymfonyCommand /** * Get the value of a command argument. * - * @param string $key + * @param string|null $key * @return string|array */ public function argument($key = null) @@ -264,7 +280,7 @@ class Command extends SymfonyCommand /** * Get the value of a command option. * - * @param string $key + * @param string|null $key * @return string|array */ public function option($key = null) @@ -302,7 +318,7 @@ class Command extends SymfonyCommand * Prompt the user for input. * * @param string $question - * @param string $default + * @param string|null $default * @return string */ public function ask($question, $default = null) @@ -315,7 +331,7 @@ class Command extends SymfonyCommand * * @param string $question * @param array $choices - * @param string $default + * @param string|null $default * @return string */ public function anticipate($question, array $choices, $default = null) @@ -328,7 +344,7 @@ class Command extends SymfonyCommand * * @param string $question * @param array $choices - * @param string $default + * @param string|null $default * @return string */ public function askWithCompletion($question, array $choices, $default = null) @@ -361,9 +377,9 @@ class Command extends SymfonyCommand * * @param string $question * @param array $choices - * @param string $default - * @param mixed $attempts - * @param bool $multiple + * @param string|null $default + * @param mixed|null $attempts + * @param bool|null $multiple * @return string */ public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null) @@ -380,10 +396,11 @@ class Command extends SymfonyCommand * * @param array $headers * @param \Illuminate\Contracts\Support\Arrayable|array $rows - * @param string $style + * @param string $tableStyle + * @param array $columnStyles * @return void */ - public function table(array $headers, $rows, $style = 'default') + public function table($headers, $rows, $tableStyle = 'default', array $columnStyles = []) { $table = new Table($this->output); @@ -391,7 +408,13 @@ class Command extends SymfonyCommand $rows = $rows->toArray(); } - $table->setHeaders($headers)->setRows($rows)->setStyle($style)->render(); + $table->setHeaders((array) $headers)->setRows($rows)->setStyle($tableStyle); + + foreach ($columnStyles as $columnIndex => $columnStyle) { + $table->setColumnStyle($columnIndex, $columnStyle); + } + + $table->render(); } /** @@ -487,7 +510,7 @@ class Command extends SymfonyCommand $this->comment('* '.$string.' *'); $this->comment(str_repeat('*', strlen($string) + 12)); - $this->output->writeln(''); + $this->output->newLine(); } /** @@ -504,7 +527,7 @@ class Command extends SymfonyCommand /** * Get the verbosity level in terms of Symfony's OutputInterface level. * - * @param string|int $level + * @param string|int|null $level * @return int */ protected function parseVerbosity($level = null) diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandFinished.php b/wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandFinished.php new file mode 100644 index 00000000..ef066af3 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandFinished.php @@ -0,0 +1,54 @@ +input = $input; + $this->output = $output; + $this->command = $command; + $this->exitCode = $exitCode; + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandStarting.php b/wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandStarting.php new file mode 100644 index 00000000..c6238b5d --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Events/CommandStarting.php @@ -0,0 +1,45 @@ +input = $input; + $this->output = $output; + $this->command = $command; + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/GeneratorCommand.php b/wp-content/themes/physioassist/vendor/illuminate/console/GeneratorCommand.php index c9522e7f..32d26e9e 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/GeneratorCommand.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/GeneratorCommand.php @@ -47,7 +47,7 @@ abstract class GeneratorCommand extends Command * * @return bool|null */ - public function fire() + public function handle() { $name = $this->qualifyClass($this->getNameInput()); @@ -56,7 +56,9 @@ abstract class GeneratorCommand extends Command // First we will check to see if the class already exists. If it does, we don't want // to create the class and overwrite the user's code. So, we will bail out so the // code is untouched. Otherwise, we will continue generating this class' files. - if ($this->alreadyExists($this->getNameInput())) { + if ((! $this->hasOption('force') || + ! $this->option('force')) && + $this->alreadyExists($this->getNameInput())) { $this->error($this->type.' already exists!'); return false; @@ -80,6 +82,8 @@ abstract class GeneratorCommand extends Command */ protected function qualifyClass($name) { + $name = ltrim($name, '\\/'); + $rootNamespace = $this->rootNamespace(); if (Str::startsWith($name, $rootNamespace)) { @@ -123,7 +127,7 @@ abstract class GeneratorCommand extends Command */ protected function getPath($name) { - $name = str_replace_first($this->rootNamespace(), '', $name); + $name = Str::replaceFirst($this->rootNamespace(), '', $name); return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php'; } @@ -166,8 +170,8 @@ abstract class GeneratorCommand extends Command protected function replaceNamespace(&$stub, $name) { $stub = str_replace( - ['DummyNamespace', 'DummyRootNamespace'], - [$this->getNamespace($name), $this->rootNamespace()], + ['DummyNamespace', 'DummyRootNamespace', 'NamespacedDummyUserModel'], + [$this->getNamespace($name), $this->rootNamespace(), config('auth.providers.users.model')], $stub ); diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Parser.php b/wp-content/themes/physioassist/vendor/illuminate/console/Parser.php index 4ccc88dc..92753119 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Parser.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Parser.php @@ -89,6 +89,8 @@ class Parser return new InputArgument(trim($token, '*'), InputArgument::IS_ARRAY | InputArgument::REQUIRED, $description); case Str::endsWith($token, '?'): return new InputArgument(trim($token, '?'), InputArgument::OPTIONAL, $description); + case preg_match('/(.+)\=\*(.+)/', $token, $matches): + return new InputArgument($matches[1], InputArgument::IS_ARRAY, $description, preg_split('/,\s?/', $matches[2])); case preg_match('/(.+)\=(.+)/', $token, $matches): return new InputArgument($matches[1], InputArgument::OPTIONAL, $description, $matches[2]); default: @@ -120,6 +122,8 @@ class Parser return new InputOption(trim($token, '='), $shortcut, InputOption::VALUE_OPTIONAL, $description); case Str::endsWith($token, '=*'): return new InputOption(trim($token, '=*'), $shortcut, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, $description); + case preg_match('/(.+)\=\*(.+)/', $token, $matches): + return new InputOption($matches[1], $shortcut, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, $description, preg_split('/,\s?/', $matches[2])); case preg_match('/(.+)\=(.+)/', $token, $matches): return new InputOption($matches[1], $shortcut, InputOption::VALUE_OPTIONAL, $description, $matches[2]); default: @@ -137,6 +141,6 @@ class Parser { $parts = preg_split('/\s+:\s+/', trim($token), 2); - return count($parts) === 2 ? $parts : [$token, null]; + return count($parts) === 2 ? $parts : [$token, '']; } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheEventMutex.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheEventMutex.php new file mode 100644 index 00000000..4eaaf052 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheEventMutex.php @@ -0,0 +1,81 @@ +cache = $cache; + } + + /** + * Attempt to obtain an event mutex for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return bool + */ + public function create(Event $event) + { + return $this->cache->store($this->store)->add( + $event->mutexName(), true, $event->expiresAt + ); + } + + /** + * Determine if an event mutex exists for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return bool + */ + public function exists(Event $event) + { + return $this->cache->store($this->store)->has($event->mutexName()); + } + + /** + * Clear the event mutex for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return void + */ + public function forget(Event $event) + { + $this->cache->store($this->store)->forget($event->mutexName()); + } + + /** + * Specify the cache store that should be used. + * + * @param string $store + * @return $this + */ + public function useStore($store) + { + $this->store = $store; + + return $this; + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheMutex.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheMutex.php deleted file mode 100644 index 6ad96cfc..00000000 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheMutex.php +++ /dev/null @@ -1,59 +0,0 @@ -cache = $cache; - } - - /** - * Attempt to obtain a mutex for the given event. - * - * @param \Illuminate\Console\Scheduling\Event $event - * @return bool - */ - public function create(Event $event) - { - return $this->cache->add($event->mutexName(), true, 1440); - } - - /** - * Determine if a mutex exists for the given event. - * - * @param \Illuminate\Console\Scheduling\Event $event - * @return bool - */ - public function exists(Event $event) - { - return $this->cache->has($event->mutexName()); - } - - /** - * Clear the mutex for the given event. - * - * @param \Illuminate\Console\Scheduling\Event $event - * @return void - */ - public function forget(Event $event) - { - $this->cache->forget($event->mutexName()); - } -} diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheSchedulingMutex.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheSchedulingMutex.php new file mode 100644 index 00000000..dfa20348 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CacheSchedulingMutex.php @@ -0,0 +1,75 @@ +cache = $cache; + } + + /** + * Attempt to obtain a scheduling mutex for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @param \DateTimeInterface $time + * @return bool + */ + public function create(Event $event, DateTimeInterface $time) + { + return $this->cache->store($this->store)->add( + $event->mutexName().$time->format('Hi'), true, 60 + ); + } + + /** + * Determine if a scheduling mutex exists for the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @param \DateTimeInterface $time + * @return bool + */ + public function exists(Event $event, DateTimeInterface $time) + { + return $this->cache->store($this->store)->has( + $event->mutexName().$time->format('Hi') + ); + } + + /** + * Specify the cache store that should be used. + * + * @param string $store + * @return $this + */ + public function useStore($store) + { + $this->store = $store; + + return $this; + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CallbackEvent.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CallbackEvent.php index 4d0a8b6e..1b54a1aa 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CallbackEvent.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CallbackEvent.php @@ -25,14 +25,14 @@ class CallbackEvent extends Event /** * Create a new event instance. * - * @param \Illuminate\Console\Scheduling\Mutex $mutex + * @param \Illuminate\Console\Scheduling\EventMutex $mutex * @param string $callback * @param array $parameters * @return void * * @throws \InvalidArgumentException */ - public function __construct(Mutex $mutex, $callback, array $parameters = []) + public function __construct(EventMutex $mutex, $callback, array $parameters = []) { if (! is_string($callback) && ! is_callable($callback)) { throw new InvalidArgumentException( @@ -60,23 +60,29 @@ class CallbackEvent extends Event return; } - register_shutdown_function(function () { - $this->removeMutex(); + $pid = getmypid(); + + register_shutdown_function(function () use ($pid) { + if ($pid === getmypid()) { + $this->removeMutex(); + } }); + parent::callBeforeCallbacks($container); + try { $response = $container->call($this->callback, $this->parameters); } finally { $this->removeMutex(); - } - parent::callAfterCallbacks($container); + parent::callAfterCallbacks($container); + } return $response; } /** - * Remove the mutex file from disk. + * Clear the mutex for the event. * * @return void */ @@ -90,11 +96,12 @@ class CallbackEvent extends Event /** * Do not allow the event to overlap each other. * + * @param int $expiresAt * @return $this * * @throws \LogicException */ - public function withoutOverlapping() + public function withoutOverlapping($expiresAt = 1440) { if (! isset($this->description)) { throw new LogicException( @@ -102,11 +109,35 @@ class CallbackEvent extends Event ); } + $this->withoutOverlapping = true; + + $this->expiresAt = $expiresAt; + return $this->skip(function () { return $this->mutex->exists($this); }); } + /** + * Allow the event to only run on one server for each cron expression. + * + * @return $this + * + * @throws \LogicException + */ + public function onOneServer() + { + if (! isset($this->description)) { + throw new LogicException( + "A scheduled event name is required to only run on one server. Use the 'name' method before 'onOneServer'." + ); + } + + $this->onOneServer = true; + + return $this; + } + /** * Get the mutex name for the scheduled command. * diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CommandBuilder.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CommandBuilder.php index acf60dd6..df7cdf61 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CommandBuilder.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/CommandBuilder.php @@ -3,7 +3,7 @@ namespace Illuminate\Console\Scheduling; use Illuminate\Console\Application; -use Symfony\Component\Process\ProcessUtils; +use Illuminate\Support\ProcessUtils; class CommandBuilder { @@ -17,9 +17,9 @@ class CommandBuilder { if ($event->runInBackground) { return $this->buildBackgroundCommand($event); - } else { - return $this->buildForegroundCommand($event); } + + return $this->buildForegroundCommand($event); } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Event.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Event.php index d48b93de..41c1c82b 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Event.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Event.php @@ -3,8 +3,9 @@ namespace Illuminate\Console\Scheduling; use Closure; -use Carbon\Carbon; use Cron\CronExpression; +use Illuminate\Support\Arr; +use Illuminate\Support\Carbon; use GuzzleHttp\Client as HttpClient; use Illuminate\Contracts\Mail\Mailer; use Symfony\Component\Process\Process; @@ -27,7 +28,7 @@ class Event * * @var string */ - public $expression = '* * * * * *'; + public $expression = '* * * * *'; /** * The timezone the date should be evaluated on. @@ -64,6 +65,20 @@ class Event */ public $withoutOverlapping = false; + /** + * Indicates if the command should only be allowed to run on one server for each cron expression. + * + * @var bool + */ + public $onOneServer = false; + + /** + * The amount of time the mutex should be valid. + * + * @var int + */ + public $expiresAt = 1440; + /** * Indicates if the command should run in background. * @@ -121,9 +136,9 @@ class Event public $description; /** - * The mutex implementation. + * The event mutex implementation. * - * @var \Illuminate\Console\Scheduling\Mutex + * @var \Illuminate\Console\Scheduling\EventMutex */ public $mutex; @@ -134,7 +149,7 @@ class Event * @param string $command * @return void */ - public function __construct(Mutex $mutex, $command) + public function __construct(EventMutex $mutex, $command) { $this->mutex = $mutex; $this->command = $command; @@ -363,7 +378,7 @@ class Event { $this->ensureOutputIsBeingCapturedForEmail(); - $addresses = is_array($addresses) ? $addresses : func_get_args(); + $addresses = Arr::wrap($addresses); return $this->then(function (Mailer $mailer) use ($addresses, $onlyIfOutputExists) { $this->emailOutput($mailer, $addresses, $onlyIfOutputExists); @@ -427,7 +442,7 @@ class Event return $this->description; } - return 'Scheduled Job Output'; + return "Scheduled Job Output For [{$this->command}]"; } /** @@ -443,6 +458,18 @@ class Event }); } + /** + * Register a callback to ping a given URL before the job runs if the given condition is true. + * + * @param bool $value + * @param string $url + * @return $this + */ + public function pingBeforeIf($value, $url) + { + return $value ? $this->pingBefore($url) : $this; + } + /** * Register a callback to ping a given URL after the job runs. * @@ -456,6 +483,18 @@ class Event }); } + /** + * Register a callback to ping a given URL after the job runs if the given condition is true. + * + * @param bool $value + * @param string $url + * @return $this + */ + public function thenPingIf($value, $url) + { + return $value ? $this->thenPing($url) : $this; + } + /** * State that the command should run in background. * @@ -509,12 +548,15 @@ class Event /** * Do not allow the event to overlap each other. * + * @param int $expiresAt * @return $this */ - public function withoutOverlapping() + public function withoutOverlapping($expiresAt = 1440) { $this->withoutOverlapping = true; + $this->expiresAt = $expiresAt; + return $this->then(function () { $this->mutex->forget($this); })->skip(function () { @@ -522,15 +564,29 @@ class Event }); } + /** + * Allow the event to only run on one server for each cron expression. + * + * @return $this + */ + public function onOneServer() + { + $this->onOneServer = true; + + return $this; + } + /** * Register a callback to further filter the schedule. * - * @param \Closure $callback + * @param \Closure|bool $callback * @return $this */ - public function when(Closure $callback) + public function when($callback) { - $this->filters[] = $callback; + $this->filters[] = is_callable($callback) ? $callback : function () use ($callback) { + return $callback; + }; return $this; } @@ -538,12 +594,14 @@ class Event /** * Register a callback to further filter the schedule. * - * @param \Closure $callback + * @param \Closure|bool $callback * @return $this */ - public function skip(Closure $callback) + public function skip($callback) { - $this->rejects[] = $callback; + $this->rejects[] = is_callable($callback) ? $callback : function () use ($callback) { + return $callback; + }; return $this; } @@ -629,11 +687,11 @@ class Event * @param \DateTime|string $currentTime * @param int $nth * @param bool $allowCurrentDate - * @return \Carbon\Carbon + * @return \Illuminate\Support\Carbon */ public function nextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false) { - return Carbon::instance($nextDue = CronExpression::factory( + return Carbon::instance(CronExpression::factory( $this->getExpression() )->getNextRunDate($currentTime, $nth, $allowCurrentDate)); } @@ -649,12 +707,12 @@ class Event } /** - * Set the mutex implementation to be used. + * Set the event mutex implementation to be used. * - * @param \Illuminate\Console\Scheduling\Mutex $mutex + * @param \Illuminate\Console\Scheduling\EventMutex $mutex * @return $this */ - public function preventOverlapsUsing(Mutex $mutex) + public function preventOverlapsUsing(EventMutex $mutex) { $this->mutex = $mutex; diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Mutex.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/EventMutex.php similarity index 71% rename from wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Mutex.php rename to wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/EventMutex.php index 47ca939e..1840e242 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Mutex.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/EventMutex.php @@ -2,10 +2,10 @@ namespace Illuminate\Console\Scheduling; -interface Mutex +interface EventMutex { /** - * Attempt to obtain a mutex for the given event. + * Attempt to obtain an event mutex for the given event. * * @param \Illuminate\Console\Scheduling\Event $event * @return bool @@ -13,7 +13,7 @@ interface Mutex public function create(Event $event); /** - * Determine if a mutex exists for the given event. + * Determine if an event mutex exists for the given event. * * @param \Illuminate\Console\Scheduling\Event $event * @return bool @@ -21,7 +21,7 @@ interface Mutex public function exists(Event $event); /** - * Clear the mutex for the given event. + * Clear the event mutex for the given event. * * @param \Illuminate\Console\Scheduling\Event $event * @return void diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ManagesFrequencies.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ManagesFrequencies.php index b80f6d9a..073e1897 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ManagesFrequencies.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ManagesFrequencies.php @@ -2,7 +2,7 @@ namespace Illuminate\Console\Scheduling; -use Carbon\Carbon; +use Illuminate\Support\Carbon; trait ManagesFrequencies { @@ -53,12 +53,64 @@ trait ManagesFrequencies private function inTimeInterval($startTime, $endTime) { return function () use ($startTime, $endTime) { - $now = Carbon::now()->getTimestamp(); - - return $now >= strtotime($startTime) && $now <= strtotime($endTime); + return Carbon::now($this->timezone)->between( + Carbon::parse($startTime, $this->timezone), + Carbon::parse($endTime, $this->timezone), + true + ); }; } + /** + * Schedule the event to run every minute. + * + * @return $this + */ + public function everyMinute() + { + return $this->spliceIntoPosition(1, '*'); + } + + /** + * Schedule the event to run every five minutes. + * + * @return $this + */ + public function everyFiveMinutes() + { + return $this->spliceIntoPosition(1, '*/5'); + } + + /** + * Schedule the event to run every ten minutes. + * + * @return $this + */ + public function everyTenMinutes() + { + return $this->spliceIntoPosition(1, '*/10'); + } + + /** + * Schedule the event to run every fifteen minutes. + * + * @return $this + */ + public function everyFifteenMinutes() + { + return $this->spliceIntoPosition(1, '*/15'); + } + + /** + * Schedule the event to run every thirty minutes. + * + * @return $this + */ + public function everyThirtyMinutes() + { + return $this->spliceIntoPosition(1, '0,30'); + } + /** * Schedule the event to run hourly. * @@ -274,69 +326,45 @@ trait ManagesFrequencies } /** - * Schedule the event to run quarterly. + * Schedule the event to run twice monthly. * + * @param int $first + * @param int $second * @return $this */ - public function quarterly() + public function twiceMonthly($first = 1, $second = 16) { + $days = $first.','.$second; + return $this->spliceIntoPosition(1, 0) - ->spliceIntoPosition(2, 0) - ->spliceIntoPosition(3, 1) - ->spliceIntoPosition(4, '*/3'); + ->spliceIntoPosition(2, 0) + ->spliceIntoPosition(3, $days); } /** - * Schedule the event to run yearly. + * Schedule the event to run quarterly. * * @return $this */ - public function yearly() + public function quarterly() { return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, 0) ->spliceIntoPosition(3, 1) - ->spliceIntoPosition(4, 1); + ->spliceIntoPosition(4, '1-12/3'); } /** - * Schedule the event to run every minute. - * - * @return $this - */ - public function everyMinute() - { - return $this->spliceIntoPosition(1, '*'); - } - - /** - * Schedule the event to run every five minutes. - * - * @return $this - */ - public function everyFiveMinutes() - { - return $this->spliceIntoPosition(1, '*/5'); - } - - /** - * Schedule the event to run every ten minutes. - * - * @return $this - */ - public function everyTenMinutes() - { - return $this->spliceIntoPosition(1, '*/10'); - } - - /** - * Schedule the event to run every thirty minutes. + * Schedule the event to run yearly. * * @return $this */ - public function everyThirtyMinutes() + public function yearly() { - return $this->spliceIntoPosition(1, '0,30'); + return $this->spliceIntoPosition(1, 0) + ->spliceIntoPosition(2, 0) + ->spliceIntoPosition(3, 1) + ->spliceIntoPosition(4, 1); } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Schedule.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Schedule.php index 54e6f99d..be99741f 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Schedule.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/Schedule.php @@ -2,9 +2,11 @@ namespace Illuminate\Console\Scheduling; +use DateTimeInterface; use Illuminate\Console\Application; use Illuminate\Container\Container; -use Symfony\Component\Process\ProcessUtils; +use Illuminate\Support\ProcessUtils; +use Illuminate\Contracts\Queue\ShouldQueue; class Schedule { @@ -16,14 +18,21 @@ class Schedule protected $events = []; /** - * The mutex implementation. + * The event mutex implementation. * - * @var \Illuminate\Console\Scheduling\Mutex + * @var \Illuminate\Console\Scheduling\EventMutex */ - protected $mutex; + protected $eventMutex; /** - * Create a new event instance. + * The scheduling mutex implementation. + * + * @var \Illuminate\Console\Scheduling\SchedulingMutex + */ + protected $schedulingMutex; + + /** + * Create a new schedule instance. * * @return void */ @@ -31,9 +40,13 @@ class Schedule { $container = Container::getInstance(); - $this->mutex = $container->bound(Mutex::class) - ? $container->make(Mutex::class) - : $container->make(CacheMutex::class); + $this->eventMutex = $container->bound(EventMutex::class) + ? $container->make(EventMutex::class) + : $container->make(CacheEventMutex::class); + + $this->schedulingMutex = $container->bound(SchedulingMutex::class) + ? $container->make(SchedulingMutex::class) + : $container->make(CacheSchedulingMutex::class); } /** @@ -41,12 +54,12 @@ class Schedule * * @param string|callable $callback * @param array $parameters - * @return \Illuminate\Console\Scheduling\Event + * @return \Illuminate\Console\Scheduling\CallbackEvent */ public function call($callback, array $parameters = []) { $this->events[] = $event = new CallbackEvent( - $this->mutex, $callback, $parameters + $this->eventMutex, $callback, $parameters ); return $event; @@ -74,12 +87,19 @@ class Schedule * Add a new job callback event to the schedule. * * @param object|string $job - * @return \Illuminate\Console\Scheduling\Event + * @param string|null $queue + * @return \Illuminate\Console\Scheduling\CallbackEvent */ - public function job($job) + public function job($job, $queue = null) { - return $this->call(function () use ($job) { - dispatch(is_string($job) ? resolve($job) : $job); + return $this->call(function () use ($job, $queue) { + $job = is_string($job) ? resolve($job) : $job; + + if ($job instanceof ShouldQueue) { + dispatch($job)->onQueue($queue); + } else { + dispatch_now($job); + } })->name(is_string($job) ? $job : get_class($job)); } @@ -96,7 +116,7 @@ class Schedule $command .= ' '.$this->compileParameters($parameters); } - $this->events[] = $event = new Event($this->mutex, $command); + $this->events[] = $event = new Event($this->eventMutex, $command); return $event; } @@ -122,11 +142,23 @@ class Schedule })->implode(' '); } + /** + * Determine if the server is allowed to run this event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @param \DateTimeInterface $time + * @return bool + */ + public function serverShouldRun(Event $event, DateTimeInterface $time) + { + return $this->schedulingMutex->create($event, $time); + } + /** * Get all of the events on the schedule that are due. * * @param \Illuminate\Contracts\Foundation\Application $app - * @return array + * @return \Illuminate\Support\Collection */ public function dueEvents($app) { @@ -142,4 +174,23 @@ class Schedule { return $this->events; } + + /** + * Specify the cache store that should be used to store mutexes. + * + * @param string $store + * @return $this + */ + public function useCache($store) + { + if ($this->eventMutex instanceof CacheEventMutex) { + $this->eventMutex->useStore($store); + } + + if ($this->schedulingMutex instanceof CacheSchedulingMutex) { + $this->schedulingMutex->useStore($store); + } + + return $this; + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleFinishCommand.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleFinishCommand.php index f22a0c5b..f697ea81 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleFinishCommand.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleFinishCommand.php @@ -52,7 +52,7 @@ class ScheduleFinishCommand extends Command * * @return void */ - public function fire() + public function handle() { collect($this->schedule->events())->filter(function ($value) { return $value->mutexName() == $this->argument('id'); diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleRunCommand.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleRunCommand.php index 8bf7c902..21695438 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleRunCommand.php +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/ScheduleRunCommand.php @@ -2,6 +2,7 @@ namespace Illuminate\Console\Scheduling; +use Illuminate\Support\Carbon; use Illuminate\Console\Command; class ScheduleRunCommand extends Command @@ -27,6 +28,20 @@ class ScheduleRunCommand extends Command */ protected $schedule; + /** + * The 24 hour timestamp this scheduler command started running. + * + * @var \Illuminate\Support\Carbon; + */ + protected $startedAt; + + /** + * Check if any events ran. + * + * @var bool + */ + protected $eventsRan = false; + /** * Create a new command instance. * @@ -37,6 +52,8 @@ class ScheduleRunCommand extends Command { $this->schedule = $schedule; + $this->startedAt = Carbon::now(); + parent::__construct(); } @@ -45,24 +62,54 @@ class ScheduleRunCommand extends Command * * @return void */ - public function fire() + public function handle() { - $eventsRan = false; - foreach ($this->schedule->dueEvents($this->laravel) as $event) { if (! $event->filtersPass($this->laravel)) { continue; } - $this->line('Running scheduled command: '.$event->getSummaryForDisplay()); - - $event->run($this->laravel); + if ($event->onOneServer) { + $this->runSingleServerEvent($event); + } else { + $this->runEvent($event); + } - $eventsRan = true; + $this->eventsRan = true; } - if (! $eventsRan) { + if (! $this->eventsRan) { $this->info('No scheduled commands are ready to run.'); } } + + /** + * Run the given single server event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return void + */ + protected function runSingleServerEvent($event) + { + if ($this->schedule->serverShouldRun($event, $this->startedAt)) { + $this->runEvent($event); + } else { + $this->line('Skipping command (has already run on another server): '.$event->getSummaryForDisplay()); + } + } + + /** + * Run the given event. + * + * @param \Illuminate\Console\Scheduling\Event $event + * @return void + */ + protected function runEvent($event) + { + $this->line('Running scheduled command: '.$event->getSummaryForDisplay()); + + $event->run($this->laravel); + + $this->eventsRan = true; + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/SchedulingMutex.php b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/SchedulingMutex.php new file mode 100644 index 00000000..ab4e87da --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/console/Scheduling/SchedulingMutex.php @@ -0,0 +1,26 @@ +=5.6.4", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "nesbot/carbon": "~1.20", - "symfony/console": "~3.2" + "php": "^7.1.3", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "symfony/console": "~4.0" }, "autoload": { "psr-4": { @@ -27,13 +26,13 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "suggest": { + "dragonmantank/cron-expression": "Required to use scheduling component (~2.0).", "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", - "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", - "symfony/process": "Required to use scheduling component (~3.2)." + "symfony/process": "Required to use scheduling component (~4.0)." }, "config": { "sort-packages": true diff --git a/wp-content/themes/physioassist/vendor/illuminate/container/BoundMethod.php b/wp-content/themes/physioassist/vendor/illuminate/container/BoundMethod.php index d422ea4b..0dfd6fdc 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/container/BoundMethod.php +++ b/wp-content/themes/physioassist/vendor/illuminate/container/BoundMethod.php @@ -103,7 +103,7 @@ class BoundMethod /** * Get all dependencies for a given method. * - * @param \Illuminate\Container\Container + * @param \Illuminate\Container\Container $container * @param callable|string $callback * @param array $parameters * @return array diff --git a/wp-content/themes/physioassist/vendor/illuminate/container/Container.php b/wp-content/themes/physioassist/vendor/illuminate/container/Container.php index 0945cb01..b75e734b 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/container/Container.php +++ b/wp-content/themes/physioassist/vendor/illuminate/container/Container.php @@ -155,6 +155,14 @@ class Container implements ArrayAccess, ContainerContract $this->isAlias($abstract); } + /** + * {@inheritdoc} + */ + public function has($id) + { + return $this->bound($id); + } + /** * Determine if the given abstract type has been resolved. * @@ -198,7 +206,7 @@ class Container implements ArrayAccess, ContainerContract /** * Register a binding with the container. * - * @param string|array $abstract + * @param string $abstract * @param \Closure|string|null $concrete * @param bool $shared * @return void @@ -245,7 +253,7 @@ class Container implements ArrayAccess, ContainerContract return $container->build($concrete); } - return $container->makeWith($concrete, $parameters); + return $container->make($concrete, $parameters); }; } @@ -263,13 +271,28 @@ class Container implements ArrayAccess, ContainerContract /** * Bind a callback to resolve with Container::call. * - * @param string $method + * @param array|string $method * @param \Closure $callback * @return void */ public function bindMethod($method, $callback) { - $this->methodBindings[$method] = $callback; + $this->methodBindings[$this->parseBindMethod($method)] = $callback; + } + + /** + * Get the method to be bound in class@method format. + * + * @param array|string $method + * @return string + */ + protected function parseBindMethod($method) + { + if (is_array($method)) { + return $method[0].'@'.$method[1]; + } + + return $method; } /** @@ -315,7 +338,7 @@ class Container implements ArrayAccess, ContainerContract /** * Register a shared binding in the container. * - * @param string|array $abstract + * @param string $abstract * @param \Closure|string|null $concrete * @return void */ @@ -355,7 +378,7 @@ class Container implements ArrayAccess, ContainerContract * * @param string $abstract * @param mixed $instance - * @return void + * @return mixed */ public function instance($abstract, $instance) { @@ -373,6 +396,8 @@ class Container implements ArrayAccess, ContainerContract if ($isBound) { $this->rebound($abstract); } + + return $instance; } /** @@ -553,26 +578,39 @@ class Container implements ArrayAccess, ContainerContract } /** - * Resolve the given type with the given parameter overrides. + * An alias function name for make(). * * @param string $abstract * @param array $parameters * @return mixed */ - public function makeWith($abstract, array $parameters) + public function makeWith($abstract, array $parameters = []) { - return $this->resolve($abstract, $parameters); + return $this->make($abstract, $parameters); } /** * Resolve the given type from the container. * * @param string $abstract + * @param array $parameters * @return mixed */ - public function make($abstract) + public function make($abstract, array $parameters = []) + { + return $this->resolve($abstract, $parameters); + } + + /** + * {@inheritdoc} + */ + public function get($id) { - return $this->resolve($abstract); + if ($this->has($id)) { + return $this->resolve($id); + } + + throw new EntryNotFoundException; } /** @@ -785,7 +823,7 @@ class Container implements ArrayAccess, ContainerContract // If the class is null, it means the dependency is a string or some other // primitive type which we can not resolve since it is not a class and // we will just bomb out with an error since we have no-where to go. - $results[] = is_null($class = $dependency->getClass()) + $results[] = is_null($dependency->getClass()) ? $this->resolvePrimitive($dependency) : $this->resolveClass($dependency); } @@ -794,7 +832,7 @@ class Container implements ArrayAccess, ContainerContract } /** - * Determine if the given dependency has a parameter override from makeWith. + * Determine if the given dependency has a parameter override. * * @param \ReflectionParameter $dependency * @return bool @@ -913,7 +951,7 @@ class Container implements ArrayAccess, ContainerContract /** * Register a new resolving callback. * - * @param string $abstract + * @param \Closure|string $abstract * @param \Closure|null $callback * @return void */ @@ -933,8 +971,8 @@ class Container implements ArrayAccess, ContainerContract /** * Register a new after resolving callback for all types. * - * @param string $abstract - * @param \Closure|null $callback + * @param \Closure|string $abstract + * @param \Closure|null $callback * @return void */ public function afterResolving($abstract, Closure $callback = null) diff --git a/wp-content/themes/physioassist/vendor/illuminate/container/EntryNotFoundException.php b/wp-content/themes/physioassist/vendor/illuminate/container/EntryNotFoundException.php new file mode 100644 index 00000000..42669214 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/container/EntryNotFoundException.php @@ -0,0 +1,11 @@ +=5.6.4", - "illuminate/contracts": "5.4.*" + "php": "^7.1.3", + "illuminate/contracts": "5.6.*", + "psr/container": "~1.0" }, "autoload": { "psr-4": { @@ -24,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "config": { diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Auth/Access/Gate.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Auth/Access/Gate.php index 9d838908..2021b573 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Auth/Access/Gate.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Auth/Access/Gate.php @@ -65,13 +65,22 @@ interface Gate public function denies($ability, $arguments = []); /** - * Determine if the given ability should be granted. + * Determine if all of the given abilities should be granted for the current user. * - * @param string $ability + * @param iterable|string $abilities * @param array|mixed $arguments * @return bool */ - public function check($ability, $arguments = []); + public function check($abilities, $arguments = []); + + /** + * Determine if any one of the given abilities should be granted for the current user. + * + * @param iterable|string $abilities + * @param array|mixed $arguments + * @return bool + */ + public function any($abilities, $arguments = []); /** * Determine if the given ability should be granted for the current user. @@ -101,4 +110,11 @@ interface Gate * @return static */ public function forUser($user); + + /** + * Get all of the defined abilities. + * + * @return array + */ + public function abilities(); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/Factory.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/Factory.php index 1d3a7374..384c2d02 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/Factory.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/Factory.php @@ -7,7 +7,7 @@ interface Factory /** * Get a broadcaster implementation by name. * - * @param string $name + * @param string|null $name * @return void */ public function connection($name = null); diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php index bdabc08e..b051e3be 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Broadcasting/ShouldBroadcast.php @@ -2,12 +2,14 @@ namespace Illuminate\Contracts\Broadcasting; +use Illuminate\Broadcasting\Channel; + interface ShouldBroadcast { /** * Get the channels the event should broadcast on. * - * @return array + * @return Channel|Channel[] */ public function broadcastOn(); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Bus/Dispatcher.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Bus/Dispatcher.php index 3370ad3d..12ed2226 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Bus/Dispatcher.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Bus/Dispatcher.php @@ -21,6 +21,22 @@ interface Dispatcher */ public function dispatchNow($command, $handler = null); + /** + * Determine if the given command has a handler. + * + * @param mixed $command + * @return bool + */ + public function hasCommandHandler($command); + + /** + * Retrieve the handler for a command. + * + * @param mixed $command + * @return bool|mixed + */ + public function getCommandHandler($command); + /** * Set the pipes commands should be piped through before dispatching. * @@ -28,4 +44,12 @@ interface Dispatcher * @return $this */ public function pipeThrough(array $pipes); + + /** + * Map a command to a handler. + * + * @param array $map + * @return $this + */ + public function map(array $map); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Factory.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Factory.php index b3337294..3924662d 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Factory.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Factory.php @@ -8,7 +8,7 @@ interface Factory * Get a cache store instance by name. * * @param string|null $name - * @return mixed + * @return \Illuminate\Contracts\Cache\Repository */ public function store($name = null); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Lock.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Lock.php new file mode 100644 index 00000000..ee7dddc1 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Cache/Lock.php @@ -0,0 +1,30 @@ +id = $id; $this->class = $class; + $this->relations = $relations; + $this->connection = $connection; } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Filesystem/Filesystem.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Filesystem/Filesystem.php index 164f9b1c..69a189c1 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Filesystem/Filesystem.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Filesystem/Filesystem.php @@ -41,10 +41,10 @@ interface Filesystem * * @param string $path * @param string|resource $contents - * @param string $visibility + * @param mixed $options * @return bool */ - public function put($path, $contents, $visibility = null); + public function put($path, $contents, $options = []); /** * Get the visibility for the given path. diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Foundation/Application.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Foundation/Application.php index d888c8cc..810f929b 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Foundation/Application.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Foundation/Application.php @@ -27,6 +27,20 @@ interface Application extends Container */ public function environment(); + /** + * Determine if the application is running in the console. + * + * @return bool + */ + public function runningInConsole(); + + /** + * Determine if the application is running unit tests. + * + * @return bool + */ + public function runningUnitTests(); + /** * Determine if the application is currently down for maintenance. * @@ -55,7 +69,7 @@ interface Application extends Container * Register a deferred provider and service. * * @param string $provider - * @param string $service + * @param string|null $service * @return void */ public function registerDeferredProvider($provider, $service = null); @@ -89,4 +103,11 @@ interface Application extends Container * @return string */ public function getCachedServicesPath(); + + /** + * Get the path to the cached packages.php file. + * + * @return string + */ + public function getCachedPackagesPath(); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Hashing/Hasher.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Hashing/Hasher.php index 3310136e..8771c7c6 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Hashing/Hasher.php +++ b/wp-content/themes/physioassist/vendor/illuminate/contracts/Hashing/Hasher.php @@ -4,6 +4,14 @@ namespace Illuminate\Contracts\Hashing; interface Hasher { + /** + * Get information about the given hashed value. + * + * @param string $hashedValue + * @return array + */ + public function info($hashedValue); + /** * Hash the given value. * diff --git a/wp-content/themes/physioassist/vendor/illuminate/contracts/Logging/Log.php b/wp-content/themes/physioassist/vendor/illuminate/contracts/Logging/Log.php deleted file mode 100644 index 5ecb9f8b..00000000 --- a/wp-content/themes/physioassist/vendor/illuminate/contracts/Logging/Log.php +++ /dev/null @@ -1,98 +0,0 @@ -=5.6.4" + "php": "^7.1.3", + "psr/container": "~1.0", + "psr/simple-cache": "~1.0" }, "autoload": { "psr-4": { @@ -23,7 +25,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "config": { diff --git a/wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedHandler.php b/wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedHandler.php deleted file mode 100644 index 4a21b64a..00000000 --- a/wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedHandler.php +++ /dev/null @@ -1,86 +0,0 @@ -container = $container; - } - - /** - * Handle the queued job. - * - * @param \Illuminate\Contracts\Queue\Job $job - * @param array $data - * @return void - */ - public function call(Job $job, array $data) - { - $handler = $this->setJobInstanceIfNecessary( - $job, $this->container->make($data['class']) - ); - - call_user_func_array( - [$handler, $data['method']], unserialize($data['data']) - ); - - if (! $job->isDeletedOrReleased()) { - $job->delete(); - } - } - - /** - * Set the job instance of the given class if necessary. - * - * @param \Illuminate\Contracts\Queue\Job $job - * @param mixed $instance - * @return mixed - */ - protected function setJobInstanceIfNecessary(Job $job, $instance) - { - if (in_array(InteractsWithQueue::class, class_uses_recursive(get_class($instance)))) { - $instance->setJob($job); - } - - return $instance; - } - - /** - * Call the failed method on the job instance. - * - * The event instance and the exception will be passed. - * - * @param array $data - * @param \Exception $e - * @return void - */ - public function failed(array $data, $e) - { - $handler = $this->container->make($data['class']); - - $parameters = array_merge(unserialize($data['data']), [$e]); - - if (method_exists($handler, 'failed')) { - call_user_func_array([$handler, 'failed'], $parameters); - } - } -} diff --git a/wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedListener.php b/wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedListener.php index 381d5043..a66b4f99 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedListener.php +++ b/wp-content/themes/physioassist/vendor/illuminate/events/CallQueuedListener.php @@ -39,6 +39,13 @@ class CallQueuedListener implements ShouldQueue */ public $tries; + /** + * The timestamp indicating when the job should timeout. + * + * @var int + */ + public $timeoutAt; + /** * The number of seconds the job can run before timing out. * @@ -138,4 +145,16 @@ class CallQueuedListener implements ShouldQueue { return $this->class; } + + /** + * Prepare the instance for cloning. + * + * @return void + */ + public function __clone() + { + $this->data = array_map(function ($data) { + return is_object($data) ? clone $data : $data; + }, $this->data); + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/events/Dispatcher.php b/wp-content/themes/physioassist/vendor/illuminate/events/Dispatcher.php index 841f3326..be3561b5 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/events/Dispatcher.php +++ b/wp-content/themes/physioassist/vendor/illuminate/events/Dispatcher.php @@ -4,6 +4,7 @@ namespace Illuminate\Events; use Exception; use ReflectionClass; +use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Container\Container; use Illuminate\Contracts\Queue\ShouldQueue; @@ -35,6 +36,13 @@ class Dispatcher implements DispatcherContract */ protected $wildcards = []; + /** + * The cached wildcard listeners. + * + * @var array + */ + protected $wildcardsCache = []; + /** * The queue resolver instance. * @@ -81,6 +89,8 @@ class Dispatcher implements DispatcherContract protected function setupWildcardListen($event, $listener) { $this->wildcards[$event][] = $this->makeListener($listener, true); + + $this->wildcardsCache = []; } /** @@ -231,7 +241,7 @@ class Dispatcher implements DispatcherContract list($payload, $event) = [[$event], get_class($event)]; } - return [$event, array_wrap($payload)]; + return [$event, Arr::wrap($payload)]; } /** @@ -278,10 +288,11 @@ class Dispatcher implements DispatcherContract */ public function getListeners($eventName) { - $listeners = isset($this->listeners[$eventName]) ? $this->listeners[$eventName] : []; + $listeners = $this->listeners[$eventName] ?? []; $listeners = array_merge( - $listeners, $this->getWildcardListeners($eventName) + $listeners, + $this->wildcardsCache[$eventName] ?? $this->getWildcardListeners($eventName) ); return class_exists($eventName, false) @@ -305,7 +316,7 @@ class Dispatcher implements DispatcherContract } } - return $wildcards; + return $this->wildcardsCache[$eventName] = $wildcards; } /** @@ -331,7 +342,7 @@ class Dispatcher implements DispatcherContract /** * Register an event listener with the dispatcher. * - * @param string|\Closure $listener + * @param \Closure|string $listener * @param bool $wildcard * @return \Closure */ @@ -344,9 +355,9 @@ class Dispatcher implements DispatcherContract return function ($event, $payload) use ($listener, $wildcard) { if ($wildcard) { return $listener($event, $payload); - } else { - return $listener(...array_values($payload)); } + + return $listener(...array_values($payload)); }; } @@ -362,11 +373,11 @@ class Dispatcher implements DispatcherContract return function ($event, $payload) use ($listener, $wildcard) { if ($wildcard) { return call_user_func($this->createClassCallable($listener), $event, $payload); - } else { - return call_user_func_array( - $this->createClassCallable($listener), $payload - ); } + + return call_user_func_array( + $this->createClassCallable($listener), $payload + ); }; } @@ -382,9 +393,9 @@ class Dispatcher implements DispatcherContract if ($this->handlerShouldBeQueued($class)) { return $this->createQueuedHandlerCallable($class, $method); - } else { - return [$this->container->make($class), $method]; } + + return [$this->container->make($class), $method]; } /** @@ -429,29 +440,26 @@ class Dispatcher implements DispatcherContract return is_object($a) ? clone $a : $a; }, func_get_args()); - if (method_exists($class, 'queue')) { - $this->callQueueMethodOnHandler($class, $method, $arguments); - } else { + if ($this->handlerWantsToBeQueued($class, $arguments)) { $this->queueHandler($class, $method, $arguments); } }; } /** - * Call the queue method on the handler class. + * Determine if the event handler wants to be queued. * * @param string $class - * @param string $method * @param array $arguments - * @return void + * @return bool */ - protected function callQueueMethodOnHandler($class, $method, $arguments) + protected function handlerWantsToBeQueued($class, $arguments) { - $handler = (new ReflectionClass($class))->newInstanceWithoutConstructor(); + if (method_exists($class, 'shouldQueue')) { + return $this->container->make($class)->shouldQueue($arguments[0]); + } - $handler->queue($this->resolveQueue(), 'Illuminate\Events\CallQueuedHandler@call', [ - 'class' => $class, 'method' => $method, 'data' => serialize($arguments), - ]); + return true; } /** @@ -467,10 +475,10 @@ class Dispatcher implements DispatcherContract list($listener, $job) = $this->createListenerAndJob($class, $method, $arguments); $connection = $this->resolveQueue()->connection( - isset($listener->connection) ? $listener->connection : null + $listener->connection ?? null ); - $queue = isset($listener->queue) ? $listener->queue : null; + $queue = $listener->queue ?? null; isset($listener->delay) ? $connection->laterOn($queue, $listener->delay, $job) @@ -489,23 +497,25 @@ class Dispatcher implements DispatcherContract { $listener = (new ReflectionClass($class))->newInstanceWithoutConstructor(); - return [$listener, $this->propogateListenerOptions( + return [$listener, $this->propagateListenerOptions( $listener, new CallQueuedListener($class, $method, $arguments) )]; } /** - * Propogate listener options to the job. + * Propagate listener options to the job. * * @param mixed $listener * @param mixed $job * @return mixed */ - protected function propogateListenerOptions($listener, $job) + protected function propagateListenerOptions($listener, $job) { return tap($job, function ($job) use ($listener) { - $job->tries = isset($listener->tries) ? $listener->tries : null; - $job->timeout = isset($listener->timeout) ? $listener->timeout : null; + $job->tries = $listener->tries ?? null; + $job->timeout = $listener->timeout ?? null; + $job->timeoutAt = method_exists($listener, 'retryUntil') + ? $listener->retryUntil() : null; }); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/events/composer.json b/wp-content/themes/physioassist/vendor/illuminate/events/composer.json index a5ed9158..ceca4850 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/events/composer.json +++ b/wp-content/themes/physioassist/vendor/illuminate/events/composer.json @@ -14,10 +14,10 @@ } ], "require": { - "php": ">=5.6.4", - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*" + "php": "^7.1.3", + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*" }, "autoload": { "psr-4": { @@ -26,7 +26,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "config": { diff --git a/wp-content/themes/physioassist/vendor/illuminate/filesystem/Cache.php b/wp-content/themes/physioassist/vendor/illuminate/filesystem/Cache.php new file mode 100644 index 00000000..deb5fe5d --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/filesystem/Cache.php @@ -0,0 +1,77 @@ +key = $key; + $this->repository = $repository; + + if (! is_null($expire)) { + $this->expire = (int) ceil($expire / 60); + } + } + + /** + * Load the cache. + * + * @return void + */ + public function load() + { + $contents = $this->repository->get($this->key); + + if (! is_null($contents)) { + $this->setFromStorage($contents); + } + } + + /** + * Persist the cache. + * + * @return void + */ + public function save() + { + $contents = $this->getForStorage(); + + if (! is_null($this->expire)) { + $this->repository->put($this->key, $contents, $this->expire); + } else { + $this->repository->forever($this->key, $contents); + } + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/filesystem/Filesystem.php b/wp-content/themes/physioassist/vendor/illuminate/filesystem/Filesystem.php index 9589c0f0..65bd61ba 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/filesystem/Filesystem.php +++ b/wp-content/themes/physioassist/vendor/illuminate/filesystem/Filesystem.php @@ -381,22 +381,15 @@ class Filesystem * Get an array of all files in a directory. * * @param string $directory - * @return array + * @param bool $hidden + * @return \Symfony\Component\Finder\SplFileInfo[] */ - public function files($directory) + public function files($directory, $hidden = false) { - $glob = glob($directory.DIRECTORY_SEPARATOR.'*'); - - if ($glob === false) { - return []; - } - - // To get the appropriate files, we'll simply glob the directory and filter - // out any "files" that are not truly files so we do not end up with any - // directories in our list, but only true files within the directory. - return array_filter($glob, function ($file) { - return filetype($file) == 'file'; - }); + return iterator_to_array( + Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory)->depth(0)->sortByName(), + false + ); } /** @@ -404,11 +397,14 @@ class Filesystem * * @param string $directory * @param bool $hidden - * @return array + * @return \Symfony\Component\Finder\SplFileInfo[] */ public function allFiles($directory, $hidden = false) { - return iterator_to_array(Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory), false); + return iterator_to_array( + Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory)->sortByName(), + false + ); } /** @@ -421,7 +417,7 @@ class Filesystem { $directories = []; - foreach (Finder::create()->in($directory)->directories()->depth(0) as $dir) { + foreach (Finder::create()->in($directory)->directories()->depth(0)->sortByName() as $dir) { $directories[] = $dir->getPathname(); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemAdapter.php b/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemAdapter.php index 45017399..66c65af8 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemAdapter.php +++ b/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemAdapter.php @@ -6,18 +6,25 @@ use RuntimeException; use Illuminate\Http\File; use Illuminate\Support\Str; use InvalidArgumentException; +use Illuminate\Support\Carbon; use Illuminate\Http\UploadedFile; use Illuminate\Support\Collection; use League\Flysystem\AdapterInterface; use PHPUnit\Framework\Assert as PHPUnit; use League\Flysystem\FilesystemInterface; use League\Flysystem\AwsS3v3\AwsS3Adapter; +use League\Flysystem\Cached\CachedAdapter; use League\Flysystem\FileNotFoundException; +use League\Flysystem\Rackspace\RackspaceAdapter; use League\Flysystem\Adapter\Local as LocalAdapter; +use Symfony\Component\HttpFoundation\StreamedResponse; use Illuminate\Contracts\Filesystem\Cloud as CloudFilesystemContract; use Illuminate\Contracts\Filesystem\Filesystem as FilesystemContract; use Illuminate\Contracts\Filesystem\FileNotFoundException as ContractFileNotFoundException; +/** + * @mixin \League\Flysystem\FilesystemInterface + */ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract { /** @@ -75,6 +82,17 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract return $this->driver->has($path); } + /** + * Get the full path for the file at the given "short" path. + * + * @param string $path + * @return string + */ + public function path($path) + { + return $this->driver->getAdapter()->getPathPrefix().$path; + } + /** * Get the contents of a file. * @@ -92,19 +110,62 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract } } + /** + * Create a streamed response for a given file. + * + * @param string $path + * @param string|null $name + * @param array|null $headers + * @param string|null $disposition + * @return \Symfony\Component\HttpFoundation\StreamedResponse + */ + public function response($path, $name = null, array $headers = [], $disposition = 'inline') + { + $response = new StreamedResponse; + + $disposition = $response->headers->makeDisposition($disposition, $name ?? basename($path)); + + $response->headers->replace($headers + [ + 'Content-Type' => $this->mimeType($path), + 'Content-Length' => $this->size($path), + 'Content-Disposition' => $disposition, + ]); + + $response->setCallback(function () use ($path) { + $stream = $this->driver->readStream($path); + fpassthru($stream); + fclose($stream); + }); + + return $response; + } + + /** + * Create a streamed download response for a given file. + * + * @param string $path + * @param string|null $name + * @param array|null $headers + * @return \Symfony\Component\HttpFoundation\StreamedResponse + */ + public function download($path, $name = null, array $headers = []) + { + return $this->response($path, $name, $headers, 'attachment'); + } + /** * Write the contents of a file. * * @param string $path * @param string|resource $contents - * @param array $options + * @param mixed $options * @return bool */ public function put($path, $contents, $options = []) { - if (is_string($options)) { - $options = ['visibility' => $options]; - } + $options = is_string($options) + ? ['visibility' => $options] + : (array) $options; // If the given contents is actually a file or uploaded file instance than we will // automatically store the file using a stream. This provides a convenient path @@ -312,10 +373,18 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract { $adapter = $this->driver->getAdapter(); + if ($adapter instanceof CachedAdapter) { + $adapter = $adapter->getAdapter(); + } + if (method_exists($adapter, 'getUrl')) { return $adapter->getUrl($path); + } elseif (method_exists($this->driver, 'getUrl')) { + return $this->driver->getUrl($path); } elseif ($adapter instanceof AwsS3Adapter) { return $this->getAwsUrl($adapter, $path); + } elseif ($adapter instanceof RackspaceAdapter) { + return $this->getRackspaceUrl($adapter, $path); } elseif ($adapter instanceof LocalAdapter) { return $this->getLocalUrl($path); } else { @@ -332,11 +401,30 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract */ protected function getAwsUrl($adapter, $path) { + // If an explicit base URL has been set on the disk configuration then we will use + // it as the base URL instead of the default path. This allows the developer to + // have full control over the base path for this filesystem's generated URLs. + if (! is_null($url = $this->driver->getConfig()->get('url'))) { + return $this->concatPathToUrl($url, $adapter->getPathPrefix().$path); + } + return $adapter->getClient()->getObjectUrl( $adapter->getBucket(), $adapter->getPathPrefix().$path ); } + /** + * Get the URL for the file at the given path. + * + * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter + * @param string $path + * @return string + */ + protected function getRackspaceUrl($adapter, $path) + { + return (string) $adapter->getContainer()->getObject($path)->getPublicUrl(); + } + /** * Get the URL for the file at the given path. * @@ -351,7 +439,7 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract // it as the base URL instead of the default path. This allows the developer to // have full control over the base path for this filesystem's generated URLs. if ($config->has('url')) { - return rtrim($config->get('url'), '/').'/'.ltrim($path, '/'); + return $this->concatPathToUrl($config->get('url'), $path); } $path = '/storage/'.$path; @@ -361,11 +449,91 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract // are really supposed to use. We will remove the public from this path here. if (Str::contains($path, '/storage/public/')) { return Str::replaceFirst('/public/', '/', $path); + } + + return $path; + } + + /** + * Get a temporary URL for the file at the given path. + * + * @param string $path + * @param \DateTimeInterface $expiration + * @param array $options + * @return string + */ + public function temporaryUrl($path, $expiration, array $options = []) + { + $adapter = $this->driver->getAdapter(); + + if ($adapter instanceof CachedAdapter) { + $adapter = $adapter->getAdapter(); + } + + if (method_exists($adapter, 'getTemporaryUrl')) { + return $adapter->getTemporaryUrl($path, $expiration, $options); + } elseif ($adapter instanceof AwsS3Adapter) { + return $this->getAwsTemporaryUrl($adapter, $path, $expiration, $options); + } elseif ($adapter instanceof RackspaceAdapter) { + return $this->getRackspaceTemporaryUrl($adapter, $path, $expiration, $options); } else { - return $path; + throw new RuntimeException('This driver does not support creating temporary URLs.'); } } + /** + * Get a temporary URL for the file at the given path. + * + * @param \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter + * @param string $path + * @param \DateTimeInterface $expiration + * @param array $options + * @return string + */ + public function getAwsTemporaryUrl($adapter, $path, $expiration, $options) + { + $client = $adapter->getClient(); + + $command = $client->getCommand('GetObject', array_merge([ + 'Bucket' => $adapter->getBucket(), + 'Key' => $adapter->getPathPrefix().$path, + ], $options)); + + return (string) $client->createPresignedRequest( + $command, $expiration + )->getUri(); + } + + /** + * Get a temporary URL for the file at the given path. + * + * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter + * @param string $path + * @param \DateTimeInterface $expiration + * @param array $options + * @return string + */ + public function getRackspaceTemporaryUrl($adapter, $path, $expiration, $options) + { + return $adapter->getContainer()->getObject($path)->getTemporaryUrl( + Carbon::now()->diffInSeconds($expiration), + $options['method'] ?? 'GET', + $options['forcePublicUrl'] ?? true + ); + } + + /** + * Concatenate a path to a URL. + * + * @param string $url + * @param string $path + * @return string + */ + protected function concatPathToUrl($url, $path) + { + return rtrim($url, '/').'/'.ltrim($path, '/'); + } + /** * Get an array of all files in a directory. * @@ -438,6 +606,20 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract return $this->driver->deleteDir($directory); } + /** + * Flush the Flysystem cache. + * + * @return void + */ + public function flushCache() + { + $adapter = $this->driver->getAdapter(); + + if ($adapter instanceof CachedAdapter) { + $adapter->getCache()->flush(); + } + } + /** * Get the Flysystem driver. * @@ -485,7 +667,7 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract return AdapterInterface::VISIBILITY_PRIVATE; } - throw new InvalidArgumentException('Unknown visibility: '.$visibility); + throw new InvalidArgumentException("Unknown visibility: {$visibility}"); } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemManager.php b/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemManager.php index db194298..fece2199 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemManager.php +++ b/wp-content/themes/physioassist/vendor/illuminate/filesystem/FilesystemManager.php @@ -8,14 +8,20 @@ use OpenCloud\Rackspace; use Illuminate\Support\Arr; use InvalidArgumentException; use League\Flysystem\AdapterInterface; +use League\Flysystem\Sftp\SftpAdapter; use League\Flysystem\FilesystemInterface; +use League\Flysystem\Cached\CachedAdapter; use League\Flysystem\Filesystem as Flysystem; use League\Flysystem\Adapter\Ftp as FtpAdapter; use League\Flysystem\Rackspace\RackspaceAdapter; use League\Flysystem\Adapter\Local as LocalAdapter; use League\Flysystem\AwsS3v3\AwsS3Adapter as S3Adapter; +use League\Flysystem\Cached\Storage\Memory as MemoryStore; use Illuminate\Contracts\Filesystem\Factory as FactoryContract; +/** + * @mixin \Illuminate\Contracts\Filesystem\Filesystem + */ class FilesystemManager implements FactoryContract { /** @@ -94,7 +100,7 @@ class FilesystemManager implements FactoryContract */ protected function get($name) { - return isset($this->disks[$name]) ? $this->disks[$name] : $this->resolve($name); + return $this->disks[$name] ?? $this->resolve($name); } /** @@ -147,9 +153,9 @@ class FilesystemManager implements FactoryContract */ public function createLocalDriver(array $config) { - $permissions = isset($config['permissions']) ? $config['permissions'] : []; + $permissions = $config['permissions'] ?? []; - $links = Arr::get($config, 'links') === 'skip' + $links = ($config['links'] ?? null) === 'skip' ? LocalAdapter::SKIP_LINKS : LocalAdapter::DISALLOW_LINKS; @@ -166,12 +172,21 @@ class FilesystemManager implements FactoryContract */ public function createFtpDriver(array $config) { - $ftpConfig = Arr::only($config, [ - 'host', 'username', 'password', 'port', 'root', 'passive', 'ssl', 'timeout', - ]); + return $this->adapt($this->createFlysystem( + new FtpAdapter($config), $config + )); + } + /** + * Create an instance of the sftp driver. + * + * @param array $config + * @return \Illuminate\Contracts\Filesystem\Filesystem + */ + public function createSftpDriver(array $config) + { return $this->adapt($this->createFlysystem( - new FtpAdapter($ftpConfig), $config + new SftpAdapter($config), $config )); } @@ -185,9 +200,9 @@ class FilesystemManager implements FactoryContract { $s3Config = $this->formatS3Config($config); - $root = isset($s3Config['root']) ? $s3Config['root'] : null; + $root = $s3Config['root'] ?? null; - $options = isset($config['options']) ? $config['options'] : []; + $options = $config['options'] ?? []; return $this->adapt($this->createFlysystem( new S3Adapter(new S3Client($s3Config), $s3Config['bucket'], $root, $options), $config @@ -223,7 +238,7 @@ class FilesystemManager implements FactoryContract 'username' => $config['username'], 'apiKey' => $config['key'], ]); - $root = isset($config['root']) ? $config['root'] : null; + $root = $config['root'] ?? null; return $this->adapt($this->createFlysystem( new RackspaceAdapter($this->getRackspaceContainer($client, $config), $root), $config @@ -239,7 +254,7 @@ class FilesystemManager implements FactoryContract */ protected function getRackspaceContainer(Rackspace $client, array $config) { - $urlType = Arr::get($config, 'url_type'); + $urlType = $config['url_type'] ?? null; $store = $client->objectStoreService('cloudFiles', $config['region'], $urlType); @@ -251,15 +266,42 @@ class FilesystemManager implements FactoryContract * * @param \League\Flysystem\AdapterInterface $adapter * @param array $config - * @return \League\Flysystem\FlysystemInterface + * @return \League\Flysystem\FilesystemInterface */ protected function createFlysystem(AdapterInterface $adapter, array $config) { + $cache = Arr::pull($config, 'cache'); + $config = Arr::only($config, ['visibility', 'disable_asserts', 'url']); + if ($cache) { + $adapter = new CachedAdapter($adapter, $this->createCacheStore($cache)); + } + return new Flysystem($adapter, count($config) > 0 ? $config : null); } + /** + * Create a cache store instance. + * + * @param mixed $config + * @return \League\Flysystem\Cached\CacheInterface + * + * @throws \InvalidArgumentException + */ + protected function createCacheStore($config) + { + if ($config === true) { + return new MemoryStore; + } + + return new Cache( + $this->app['cache']->store($config['store']), + $config['prefix'] ?? 'flysystem', + $config['expire'] ?? null + ); + } + /** * Adapt the filesystem implementation. * @@ -314,6 +356,21 @@ class FilesystemManager implements FactoryContract return $this->app['config']['filesystems.cloud']; } + /** + * Unset the given disk instances. + * + * @param array|string $disk + * @return $this + */ + public function forgetDisk($disk) + { + foreach ((array) $disk as $diskName) { + unset($this->disks[$diskName]); + } + + return $this; + } + /** * Register a custom driver creator Closure. * diff --git a/wp-content/themes/physioassist/vendor/illuminate/filesystem/composer.json b/wp-content/themes/physioassist/vendor/illuminate/filesystem/composer.json index 2dc0f7a3..041413ab 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/filesystem/composer.json +++ b/wp-content/themes/physioassist/vendor/illuminate/filesystem/composer.json @@ -14,10 +14,10 @@ } ], "require": { - "php": ">=5.6.4", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "symfony/finder": "~3.2" + "php": "^7.1.3", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "symfony/finder": "~4.0" }, "autoload": { "psr-4": { @@ -26,13 +26,15 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "suggest": { "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." }, "config": { "sort-packages": true diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Arr.php b/wp-content/themes/physioassist/vendor/illuminate/support/Arr.php index c6bf4567..616c030c 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Arr.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Arr.php @@ -3,6 +3,7 @@ namespace Illuminate\Support; use ArrayAccess; +use InvalidArgumentException; use Illuminate\Support\Traits\Macroable; class Arr @@ -68,13 +69,23 @@ class Arr */ public static function crossJoin(...$arrays) { - return array_reduce($arrays, function ($results, $array) { - return static::collapse(array_map(function ($parent) use ($array) { - return array_map(function ($item) use ($parent) { - return array_merge($parent, [$item]); - }, $array); - }, $results)); - }, [[]]); + $results = [[]]; + + foreach ($arrays as $index => $array) { + $append = []; + + foreach ($results as $product) { + foreach ($array as $item) { + $product[$index] = $item; + + $append[] = $product; + } + } + + $results = $append; + } + + return $results; } /** @@ -111,7 +122,7 @@ class Arr } /** - * Get all of the given array except for a specified array of items. + * Get all of the given array except for a specified array of keys. * * @param array $array * @param array|string $keys @@ -195,17 +206,21 @@ class Arr */ public static function flatten($array, $depth = INF) { - return array_reduce($array, function ($result, $item) use ($depth) { + $result = []; + + foreach ($array as $item) { $item = $item instanceof Collection ? $item->all() : $item; if (! is_array($item)) { - return array_merge($result, [$item]); + $result[] = $item; } elseif ($depth === 1) { - return array_merge($result, array_values($item)); + $result = array_merge($result, array_values($item)); } else { - return array_merge($result, static::flatten($item, $depth - 1)); + $result = array_merge($result, static::flatten($item, $depth - 1)); } - }, []); + } + + return $result; } /** @@ -274,6 +289,10 @@ class Arr return $array[$key]; } + if (strpos($key, '.') === false) { + return $array[$key] ?? value($default); + } + foreach (explode('.', $key) as $segment) { if (static::accessible($array) && static::exists($array, $segment)) { $array = $array[$segment]; @@ -379,6 +398,10 @@ class Arr } else { $itemKey = data_get($item, $key); + if (is_object($itemKey) && method_exists($itemKey, '__toString')) { + $itemKey = (string) $itemKey; + } + $results[$itemKey] = $itemValue; } } @@ -438,6 +461,46 @@ class Arr return $value; } + /** + * Get one or a specified number of random values from an array. + * + * @param array $array + * @param int|null $number + * @return mixed + * + * @throws \InvalidArgumentException + */ + public static function random($array, $number = null) + { + $requested = is_null($number) ? 1 : $number; + + $count = count($array); + + if ($requested > $count) { + throw new InvalidArgumentException( + "You requested {$requested} items, but there are only {$count} items available." + ); + } + + if (is_null($number)) { + return $array[array_rand($array)]; + } + + if ((int) $number === 0) { + return []; + } + + $keys = array_rand($array, $number); + + $results = []; + + foreach ((array) $keys as $key) { + $results[] = $array[$key]; + } + + return $results; + } + /** * Set an array item to a given value using "dot" notation. * @@ -478,11 +541,20 @@ class Arr * Shuffle the given array and return the result. * * @param array $array + * @param int|null $seed * @return array */ - public static function shuffle($array) + public static function shuffle($array, $seed = null) { - shuffle($array); + if (is_null($seed)) { + shuffle($array); + } else { + srand($seed); + + usort($array, function () { + return rand(-1, 1); + }); + } return $array; } @@ -491,10 +563,10 @@ class Arr * Sort the array using the given callback or "dot" notation. * * @param array $array - * @param callable|string $callback + * @param callable|string|null $callback * @return array */ - public static function sort($array, $callback) + public static function sort($array, $callback = null) { return Collection::make($array)->sortBy($callback)->all(); } @@ -535,13 +607,17 @@ class Arr } /** - * If the given value is not an array, wrap it in one. + * If the given value is not an array and not null, wrap it in one. * * @param mixed $value * @return array */ public static function wrap($value) { + if (is_null($value)) { + return []; + } + return ! is_array($value) ? [$value] : $value; } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Carbon.php b/wp-content/themes/physioassist/vendor/illuminate/support/Carbon.php new file mode 100644 index 00000000..db1bdbef --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Carbon.php @@ -0,0 +1,48 @@ +all() : $value; + } + /** * Create a new collection by invoking the callback a given amount of times. * - * @param int $amount + * @param int $number * @param callable $callback * @return static */ - public static function times($amount, callable $callback = null) + public static function times($number, callable $callback = null) { - if ($amount < 1) { + if ($number < 1) { return new static; } if (is_null($callback)) { - return new static(range(1, $amount)); + return new static(range(1, $number)); } - return (new static(range(1, $amount)))->map($callback); + return (new static(range(1, $number)))->map($callback); } /** @@ -126,7 +175,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return; } - $values = with(isset($key) ? $this->pluck($key) : $this) + $values = (isset($key) ? $this->pluck($key) : $this) ->sort()->values(); $middle = (int) ($count / 2); @@ -193,19 +242,15 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate { if (func_num_args() == 1) { if ($this->useAsCallable($key)) { - return ! is_null($this->first($key)); + $placeholder = new stdClass; + + return $this->first($key, $placeholder) !== $placeholder; } return in_array($key, $this->items); } - if (func_num_args() == 2) { - $value = $operator; - - $operator = '='; - } - - return $this->contains($this->operatorForWhere($key, $operator, $value)); + return $this->contains($this->operatorForWhere(...func_get_args())); } /** @@ -243,6 +288,34 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate )); } + /** + * Dump the collection and end the script. + * + * @return void + */ + public function dd(...$args) + { + call_user_func_array([$this, 'dump'], $args); + + die(1); + } + + /** + * Dump the collection. + * + * @return $this + */ + public function dump() + { + (new static(func_get_args())) + ->push($this) + ->each(function ($item) { + (new Dumper)->dump($item); + }); + + return $this; + } + /** * Get the items in the collection that are not present in the given items. * @@ -254,6 +327,18 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_diff($this->items, $this->getArrayableItems($items))); } + /** + * Get the items in the collection that are not present in the given items. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffUsing($items, callable $callback) + { + return new static(array_udiff($this->items, $this->getArrayableItems($items), $callback)); + } + /** * Get the items in the collection whose keys and values are not present in the given items. * @@ -265,6 +350,18 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_diff_assoc($this->items, $this->getArrayableItems($items))); } + /** + * Get the items in the collection whose keys and values are not present in the given items. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffAssocUsing($items, callable $callback) + { + return new static(array_diff_uassoc($this->items, $this->getArrayableItems($items), $callback)); + } + /** * Get the items in the collection whose keys are not present in the given items. * @@ -276,6 +373,18 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_diff_key($this->items, $this->getArrayableItems($items))); } + /** + * Get the items in the collection whose keys are not present in the given items. + * + * @param mixed $items + * @param callable $callback + * @return static + */ + public function diffKeysUsing($items, callable $callback) + { + return new static(array_diff_ukey($this->items, $this->getArrayableItems($items), $callback)); + } + /** * Execute a callback over each item. * @@ -301,7 +410,9 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function eachSpread(callable $callback) { - return $this->each(function ($chunk) use ($callback) { + return $this->each(function ($chunk, $key) use ($callback) { + $chunk[] = $key; + return $callback(...$chunk); }); } @@ -328,24 +439,22 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return true; } - if (func_num_args() == 2) { - $value = $operator; - - $operator = '='; - } - - return $this->every($this->operatorForWhere($key, $operator, $value)); + return $this->every($this->operatorForWhere(...func_get_args())); } /** * Get all items except for those with the specified keys. * - * @param mixed $keys + * @param \Illuminate\Support\Collection|mixed $keys * @return static */ public function except($keys) { - $keys = is_array($keys) ? $keys : func_get_args(); + if ($keys instanceof self) { + $keys = $keys->all(); + } elseif (! is_array($keys)) { + $keys = func_get_args(); + } return new static(Arr::except($this->items, $keys)); } @@ -376,14 +485,27 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate public function when($value, callable $callback, callable $default = null) { if ($value) { - return $callback($this); + return $callback($this, $value); } elseif ($default) { - return $default($this); + return $default($this, $value); } return $this; } + /** + * Apply the callback if the value is falsy. + * + * @param bool $value + * @param callable $callback + * @param callable $default + * @return mixed + */ + public function unless($value, callable $callback, callable $default = null) + { + return $this->when(! $value, $callback, $default); + } + /** * Filter items by the given key value pair. * @@ -394,13 +516,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function where($key, $operator, $value = null) { - if (func_num_args() == 2) { - $value = $operator; - - $operator = '='; - } - - return $this->filter($this->operatorForWhere($key, $operator, $value)); + return $this->filter($this->operatorForWhere(...func_get_args())); } /** @@ -411,11 +527,25 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate * @param mixed $value * @return \Closure */ - protected function operatorForWhere($key, $operator, $value) + protected function operatorForWhere($key, $operator, $value = null) { + if (func_num_args() == 2) { + $value = $operator; + + $operator = '='; + } + return function ($item) use ($key, $operator, $value) { $retrieved = data_get($item, $key); + $strings = array_filter([$retrieved, $value], function ($value) { + return is_string($value) || (is_object($value) && method_exists($value, '__toString')); + }); + + if (count($strings) < 2 && count(array_filter([$retrieved, $value], 'is_object')) == 1) { + return in_array($operator, ['!=', '<>', '!==']); + } + switch ($operator) { default: case '=': @@ -502,6 +632,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return $this->whereNotIn($key, $values, true); } + /** + * Filter the items, removing any items that don't match the given type. + * + * @param string $type + * @return static + */ + public function whereInstanceOf($type) + { + return $this->filter(function ($value) use ($type) { + return $value instanceof $type; + }); + } + /** * Get the first item from the collection. * @@ -514,6 +657,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return Arr::first($this->items, $callback, $default); } + /** + * Get the first item by the given key value pair. + * + * @param string $key + * @param mixed $operator + * @param mixed $value + * @return static + */ + public function firstWhere($key, $operator, $value = null) + { + return $this->first($this->operatorForWhere(...func_get_args())); + } + /** * Get a flattened array of the items in the collection. * @@ -575,6 +731,12 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function groupBy($groupBy, $preserveKeys = false) { + if (is_array($groupBy)) { + $nextGroups = $groupBy; + + $groupBy = array_shift($nextGroups); + } + $groupBy = $this->valueRetriever($groupBy); $results = []; @@ -597,7 +759,13 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate } } - return new static($results); + $result = new static($results); + + if (! empty($nextGroups)) { + return $result->map->groupBy($nextGroups, $preserveKeys); + } + + return $result; } /** @@ -633,7 +801,15 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function has($key) { - return $this->offsetExists($key); + $keys = is_array($key) ? $key : func_get_args(); + + foreach ($keys as $value) { + if (! $this->offsetExists($value)) { + return false; + } + } + + return true; } /** @@ -665,6 +841,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_intersect($this->items, $this->getArrayableItems($items))); } + /** + * Intersect the collection with the given items by key. + * + * @param mixed $items + * @return static + */ + public function intersectByKeys($items) + { + return new static(array_intersect_key( + $this->items, $this->getArrayableItems($items) + )); + } + /** * Determine if the collection is empty or not. * @@ -753,11 +942,42 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function mapSpread(callable $callback) { - return $this->map(function ($chunk) use ($callback) { + return $this->map(function ($chunk, $key) use ($callback) { + $chunk[] = $key; + return $callback(...$chunk); }); } + /** + * Run a dictionary map over the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + * @return static + */ + public function mapToDictionary(callable $callback) + { + $dictionary = []; + + foreach ($this->items as $key => $item) { + $pair = $callback($item, $key); + + $key = key($pair); + + $value = reset($pair); + + if (! isset($dictionary[$key])) { + $dictionary[$key] = []; + } + + $dictionary[$key][] = $value; + } + + return new static($dictionary); + } + /** * Run a grouping map over the items. * @@ -768,13 +988,9 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function mapToGroups(callable $callback) { - $groups = $this->map($callback)->reduce(function ($groups, $pair) { - $groups[key($pair)][] = reset($pair); + $groups = $this->mapToDictionary($callback); - return $groups; - }, []); - - return (new static($groups))->map([$this, 'make']); + return $groups->map([$this, 'make']); } /** @@ -811,6 +1027,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return $this->map($callback)->collapse(); } + /** + * Map the values into a new class. + * + * @param string $class + * @return static + */ + public function mapInto($class) + { + return $this->map(function ($value, $key) use ($class) { + return new $class($value, $key); + }); + } + /** * Get the max value of a given key. * @@ -918,6 +1147,10 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static($this->items); } + if ($keys instanceof self) { + $keys = $keys->all(); + } + $keys = is_array($keys) ? $keys : func_get_args(); return new static(Arr::only($this->items, $keys)); @@ -932,23 +1165,29 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function forPage($page, $perPage) { - return $this->slice(($page - 1) * $perPage, $perPage); + $offset = max(0, ($page - 1) * $perPage); + + return $this->slice($offset, $perPage); } /** * Partition the collection into two arrays using the given callback or key. * - * @param callable|string $callback + * @param callable|string $key + * @param mixed $operator + * @param mixed $value * @return static */ - public function partition($callback) + public function partition($key, $operator = null, $value = null) { $partitions = [new static, new static]; - $callback = $this->valueRetriever($callback); + $callback = func_num_args() == 1 + ? $this->valueRetriever($key) + : $this->operatorForWhere(...func_get_args()); foreach ($this->items as $key => $item) { - $partitions[(int) ! $callback($item)][$key] = $item; + $partitions[(int) ! $callback($item, $key)][$key] = $item; } return new static($partitions); @@ -1005,8 +1244,8 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate /** * Push all of the given items onto the collection. * - * @param \Traversable $source - * @return self + * @param \Traversable|array $source + * @return $this */ public function concat($source) { @@ -1046,28 +1285,20 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate } /** - * Get one or more items randomly from the collection. + * Get one or a specified number of items randomly from the collection. * - * @param int|null $amount + * @param int|null $number * @return mixed * * @throws \InvalidArgumentException */ - public function random($amount = 1) + public function random($number = null) { - if ($amount > ($count = $this->count())) { - throw new InvalidArgumentException("You requested {$amount} items, but there are only {$count} items in the collection."); + if (is_null($number)) { + return Arr::random($this->items); } - $keys = array_rand($this->items, $amount); - - if (count(func_get_args()) == 0) { - return $this->items[$keys]; - } - - $keys = array_wrap($keys); - - return new static(array_intersect_key($this->items, array_flip($keys))); + return new static(Arr::random($this->items, $number)); } /** @@ -1151,19 +1382,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function shuffle($seed = null) { - $items = $this->items; - - if (is_null($seed)) { - shuffle($items); - } else { - srand($seed); - - usort($items, function () { - return rand(-1, 1); - }); - } - - return new static($items); + return new static(Arr::shuffle($this->items, $seed)); } /** @@ -1255,7 +1474,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate } $descending ? arsort($results, $options) - : asort($results, $options); + : asort($results, $options); // Once we have sorted all of the keys in the array, we will loop through them // and grab the corresponding model so we can set the underlying items list @@ -1279,6 +1498,33 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return $this->sortBy($callback, $options, true); } + /** + * Sort the collection keys. + * + * @param int $options + * @param bool $descending + * @return static + */ + public function sortKeys($options = SORT_REGULAR, $descending = false) + { + $items = $this->items; + + $descending ? krsort($items, $options) : ksort($items, $options); + + return new static($items); + } + + /** + * Sort the collection keys in descending order. + * + * @param int $options + * @return static + */ + public function sortKeysDesc($options = SORT_REGULAR) + { + return $this->sortKeys($options, true); + } + /** * Splice a portion of the underlying collection array. * @@ -1365,10 +1611,6 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function unique($key = null, $strict = false) { - if (is_null($key)) { - return new static(array_unique($this->items, SORT_REGULAR)); - } - $callback = $this->valueRetriever($key); $exists = []; @@ -1442,6 +1684,18 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(call_user_func_array('array_map', $params)); } + /** + * Pad collection to the specified length with a value. + * + * @param int $size + * @param mixed $value + * @return static + */ + public function pad($size, $value) + { + return new static(array_pad($this->items, $size, $value)); + } + /** * Get the collection of items as a plain array. * @@ -1468,9 +1722,9 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return json_decode($value->toJson(), true); } elseif ($value instanceof Arrayable) { return $value->toArray(); - } else { - return $value; } + + return $value; }, $this->items); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Composer.php b/wp-content/themes/physioassist/vendor/illuminate/support/Composer.php index b0eaa923..bc76aeb2 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Composer.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Composer.php @@ -4,7 +4,6 @@ namespace Illuminate\Support; use Illuminate\Filesystem\Filesystem; use Symfony\Component\Process\Process; -use Symfony\Component\Process\ProcessUtils; use Symfony\Component\Process\PhpExecutableFinder; class Composer diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Debug/Dumper.php b/wp-content/themes/physioassist/vendor/illuminate/support/Debug/Dumper.php index 0c84a8b1..7442343f 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Debug/Dumper.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Debug/Dumper.php @@ -16,7 +16,7 @@ class Dumper public function dump($value) { if (class_exists(CliDumper::class)) { - $dumper = 'cli' === PHP_SAPI ? new CliDumper : new HtmlDumper; + $dumper = in_array(PHP_SAPI, ['cli', 'phpdbg']) ? new CliDumper : new HtmlDumper; $dumper->dump((new VarCloner)->cloneVar($value)); } else { diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Artisan.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Artisan.php index e957a2f2..8be0b5c7 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Artisan.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Artisan.php @@ -6,7 +6,7 @@ use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract; /** * @method static int handle(\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output = null) - * @method static int call(string $command, array $parameters = []) + * @method static int call(string $command, array $parameters = [], $outputBuffer = null) * @method static int queue(string $command, array $parameters = []) * @method static array all() * @method static string output() diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Blade.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Blade.php index b016a46c..241f6c6a 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Blade.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Blade.php @@ -3,6 +3,23 @@ namespace Illuminate\Support\Facades; /** + * @method static void compile($path = null) + * @method static string getPath() + * @method static void setPath($path) + * @method static string compileString($value) + * @method static string stripParentheses($expression) + * @method static void extend(callable $compiler) + * @method static array getExtensions() + * @method static void if($name, callable $callback) + * @method static bool check($name, ...$parameters) + * @method static void component($path, $alias = null) + * @method static void include($path, $alias = null) + * @method static void directive($name, callable $handler) + * @method static array getCustomDirectives() + * @method static void setEchoFormat($format) + * @method static void withDoubleEncoding() + * @method static void withoutDoubleEncoding() + * * @see \Illuminate\View\Compilers\BladeCompiler */ class Blade extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Broadcast.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Broadcast.php index 81af9321..f9e8bcb8 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Broadcast.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Broadcast.php @@ -5,6 +5,8 @@ namespace Illuminate\Support\Facades; use Illuminate\Contracts\Broadcasting\Factory as BroadcastingFactoryContract; /** + * @method static void connection($name = null); + * * @see \Illuminate\Contracts\Broadcasting\Factory */ class Broadcast extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Bus.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Bus.php index eeebac4f..9bbd4901 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Bus.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Bus.php @@ -6,6 +6,13 @@ use Illuminate\Support\Testing\Fakes\BusFake; use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContract; /** + * @method static mixed dispatch($command) + * @method static mixed dispatchNow($command, $handler = null) + * @method static bool hasCommandHandler($command) + * @method static bool|mixed getCommandHandler($command) + * @method static \Illuminate\Contracts\Bus\Dispatcher pipeThrough(array $pipes) + * @method static \Illuminate\Contracts\Bus\Dispatcher map(array $map) + * * @see \Illuminate\Contracts\Bus\Dispatcher */ class Bus extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cache.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cache.php index 2e32301f..6be6f13d 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cache.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cache.php @@ -3,6 +3,21 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Contracts\Cache\Repository store(string|null $name = null) + * @method static bool has(string $key) + * @method static mixed get(string $key, mixed $default = null) + * @method static mixed pull(string $key, mixed $default = null) + * @method static void put(string $key, $value, \DateTimeInterface|\DateInterval|float|int $minutes) + * @method static bool add(string $key, $value, \DateTimeInterface|\DateInterval|float|int $minutes) + * @method static int|bool increment(string $key, $value = 1) + * @method static int|bool decrement(string $key, $value = 1) + * @method static void forever(string $key, $value) + * @method static mixed remember(string $key, \DateTimeInterface|\DateInterval|float|int $minutes, \Closure $callback) + * @method static mixed sear(string $key, \Closure $callback) + * @method static mixed rememberForever(string $key, \Closure $callback) + * @method static bool forget(string $key) + * @method static \Illuminate\Contracts\Cache\Store getStore() + * * @see \Illuminate\Cache\CacheManager * @see \Illuminate\Cache\Repository */ diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Config.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Config.php index 3eb4fdf3..e1fa74ab 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Config.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Config.php @@ -3,6 +3,13 @@ namespace Illuminate\Support\Facades; /** + * @method static bool has($key) + * @method static mixed get($key, $default = null) + * @method static array all() + * @method static void set($key, $value = null) + * @method static void prepend($key, $value) + * @method static void push($key, $value) + * * @see \Illuminate\Config\Repository */ class Config extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cookie.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cookie.php index bbcd5a30..c9f89b35 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cookie.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Cookie.php @@ -3,6 +3,10 @@ namespace Illuminate\Support\Facades; /** + * @method static void queue(...$parameters) + * @method static unqueue($name) + * @method static array getQueuedCookies() + * * @see \Illuminate\Cookie\CookieJar */ class Cookie extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Crypt.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Crypt.php index 0eef08d1..84317c37 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Crypt.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Crypt.php @@ -3,6 +3,9 @@ namespace Illuminate\Support\Facades; /** + * @method static string encrypt(string $value, bool $serialize = true) + * @method static string decrypt(string $payload, bool $unserialize = true) + * * @see \Illuminate\Encryption\Encrypter */ class Crypt extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/DB.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/DB.php index 0369128e..93df8236 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/DB.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/DB.php @@ -3,6 +3,27 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Database\ConnectionInterface connection(string $name = null) + * @method static string getDefaultConnection() + * @method static void setDefaultConnection(string $name) + * @method static \Illuminate\Database\Query\Builder table(string $table) + * @method static \Illuminate\Database\Query\Expression raw($value) + * @method static mixed selectOne(string $query, array $bindings = []) + * @method static array select(string $query, array $bindings = []) + * @method static bool insert(string $query, array $bindings = []) + * @method static int update(string $query, array $bindings = []) + * @method static int delete(string $query, array $bindings = []) + * @method static bool statement(string $query, array $bindings = []) + * @method static int affectingStatement(string $query, array $bindings = []) + * @method static bool unprepared(string $query) + * @method static array prepareBindings(array $bindings) + * @method static mixed transaction(\Closure $callback, int $attempts = 1) + * @method static void beginTransaction() + * @method static void commit() + * @method static void rollBack() + * @method static int transactionLevel() + * @method static array pretend(\Closure $callback) + * * @see \Illuminate\Database\DatabaseManager * @see \Illuminate\Database\Connection */ diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Event.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Event.php index 525cce34..92938a5d 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Event.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Event.php @@ -6,6 +6,16 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Testing\Fakes\EventFake; /** + * @method static void listen(string | array $events, $listener) + * @method static bool hasListeners(string $eventName) + * @method static void subscribe(object | string $subscriber) + * @method static array|null until(string | object $event, $payload = []) + * @method static array|null dispatch(string | object $event, $payload = [], bool $halt = false) + * @method static void push(string $event, array $payload = []) + * @method static void flush(string $event) + * @method static void forget(string $event) + * @method static void forgetPushed() + * * @see \Illuminate\Events\Dispatcher */ class Event extends Facade @@ -13,11 +23,12 @@ class Event extends Facade /** * Replace the bound instance with a fake. * + * @param array|string $eventsToFake * @return void */ - public static function fake() + public static function fake($eventsToFake = []) { - static::swap($fake = new EventFake); + static::swap($fake = new EventFake(static::getFacadeRoot(), $eventsToFake)); Model::setEventDispatcher($fake); } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/File.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/File.php index 0f81bf62..ff0290d5 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/File.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/File.php @@ -3,6 +3,42 @@ namespace Illuminate\Support\Facades; /** + * @method static bool exists(string $path) + * @method static string get(string $path, bool $lock = false) + * @method static string sharedGet(string $path) + * @method static mixed getRequire(string $path) + * @method static mixed requireOnce(string $file) + * @method static string hash(string $path) + * @method static int put(string $path, string $contents, bool $lock = false) + * @method static int prepend(string $path, string $data) + * @method static int append(string $path, string $data) + * @method static mixed chmod(string $path, int $mode = null) + * @method static bool delete(string|array $paths) + * @method static bool move(string $path, string $target) + * @method static bool copy(string $path, string $target) + * @method static void link(string $target, string $link) + * @method static string name(string $path) + * @method static string basename(string $path) + * @method static string dirname(string $path) + * @method static string extension(string $path) + * @method static string type(string $path) + * @method static string|false mimeType(string $path) + * @method static int size(string $path) + * @method static int lastModified(string $path) + * @method static bool isDirectory(string $directory) + * @method static bool isReadable(string $path) + * @method static bool isWritable(string $path) + * @method static bool isFile(string $file) + * @method static array glob(string $pattern, int $flags = 0) + * @method static \Symfony\Component\Finder\SplFileInfo[] files(string $directory, bool $hidden = false) + * @method static \Symfony\Component\Finder\SplFileInfo[] allFiles(string $directory, bool $hidden = false) + * @method static array directories(string $directory) + * @method static bool makeDirectory(string $path, int $mode = 0755, bool $recursive = false, bool $force = false) + * @method static bool moveDirectory(string $from, string $to, bool $overwrite = false) + * @method static bool copyDirectory(string $directory, string $destination, int $options = null) + * @method static bool deleteDirectory(string $directory, bool $preserve = false) + * @method static bool cleanDirectory(string $directory) + * * @see \Illuminate\Filesystem\Filesystem */ class File extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Gate.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Gate.php index 62977c63..aa67e6dd 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Gate.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Gate.php @@ -5,6 +5,20 @@ namespace Illuminate\Support\Facades; use Illuminate\Contracts\Auth\Access\Gate as GateContract; /** + * @method static bool has(string $ability) + * @method static \Illuminate\Contracts\Auth\Access\Gate define(string $ability, callable | string $callback) + * @method static \Illuminate\Contracts\Auth\Access\Gate policy(string $class, string $policy) + * @method static \Illuminate\Contracts\Auth\Access\Gate before(callable $callback) + * @method static \Illuminate\Contracts\Auth\Access\Gate after(callable $callback) + * @method static bool allows(string $ability, array | mixed $arguments = []) + * @method static bool denies(string $ability, array | mixed $arguments = []) + * @method static bool check(iterable | string $abilities, array | mixed $arguments = []) + * @method static bool any(iterable | string $abilities, array | mixed $arguments = []) + * @method static \Illuminate\Auth\Access\Response authorize(string $ability, array | mixed $arguments = []) + * @method static mixed getPolicyFor(object | string $class) + * @method static \Illuminate\Contracts\Auth\Access\Gate forUser(\Illuminate\Contracts\Auth\Authenticatable | mixed $user) + * @method static array abilities() + * * @see \Illuminate\Contracts\Auth\Access\Gate */ class Gate extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Hash.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Hash.php index 84864254..98db2227 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Hash.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Hash.php @@ -3,6 +3,11 @@ namespace Illuminate\Support\Facades; /** + * @method static array info(string $hashedValue) + * @method static string make(string $value, array $options = []) + * @method static bool check(string $value, string $hashedValue, array $options = []) + * @method static bool needsRehash(string $hashedValue, array $options = []) + * * @see \Illuminate\Hashing\BcryptHasher */ class Hash extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Input.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Input.php index 35f52d56..7402b544 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Input.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Input.php @@ -3,6 +3,45 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Http\Request instance() + * @method static string method() + * @method static string root() + * @method static string url() + * @method static string fullUrl() + * @method static string fullUrlWithQuery(array $query) + * @method static string path() + * @method static string decodedPath() + * @method static string|null segment(int $index, string|null $default = null) + * @method static array segments() + * @method static bool is(...$patterns) + * @method static bool routeIs(...$patterns) + * @method static bool fullUrlIs(...$patterns) + * @method static bool ajax() + * @method static bool pjax() + * @method static bool secure() + * @method static string ip() + * @method static array ips() + * @method static string userAgent() + * @method static \Illuminate\Http\Request merge(array $input) + * @method static \Illuminate\Http\Request replace(array $input) + * @method static \Symfony\Component\HttpFoundation\ParameterBag|mixed json(string $key = null, $default = null) + * @method static \Illuminate\Session\Store session() + * @method static \Illuminate\Session\Store|null getSession() + * @method static void setLaravelSession(\Illuminate\Contracts\Session\Session $session) + * @method static mixed user(string|null $guard = null) + * @method static \Illuminate\Routing\Route|object|string route(string|null $param = null) + * @method static string fingerprint() + * @method static \Illuminate\Http\Request setJson(\Symfony\Component\HttpFoundation\ParameterBag $json) + * @method static \Closure getUserResolver() + * @method static \Illuminate\Http\Request setUserResolver(\Closure $callback) + * @method static \Closure getRouteResolver() + * @method static \Illuminate\Http\Request setRouteResolver(\Closure $callback) + * @method static array toArray() + * @method static bool offsetExists(string $offset) + * @method static mixed offsetGet(string $offset) + * @method static void offsetSet(string $offset, $value) + * @method static void offsetUnset(string $offset) + * * @see \Illuminate\Http\Request */ class Input extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Lang.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Lang.php index e5862b99..297a739a 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Lang.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Lang.php @@ -3,6 +3,11 @@ namespace Illuminate\Support\Facades; /** + * @method static mixed trans(string $key, array $replace = [], string $locale = null) + * @method static string transChoice(string $key, int | array | \Countable $number, array $replace = [], string $locale = null) + * @method static string getLocale() + * @method static void setLocale(string $locale) + * * @see \Illuminate\Translation\Translator */ class Lang extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Log.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Log.php index b10e0647..9250e875 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Log.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Log.php @@ -5,7 +5,17 @@ namespace Illuminate\Support\Facades; use Psr\Log\LoggerInterface; /** - * @see \Illuminate\Log\Writer + * @method static void emergency(string $message, array $context = []) + * @method static void alert(string $message, array $context = []) + * @method static void critical(string $message, array $context = []) + * @method static void error(string $message, array $context = []) + * @method static void warning(string $message, array $context = []) + * @method static void notice(string $message, array $context = []) + * @method static void info(string $message, array $context = []) + * @method static void debug(string $message, array $context = []) + * @method static void log($level, string $message, array $context = []) + * + * @see \Illuminate\Log\Logger */ class Log extends Facade { diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Mail.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Mail.php index f5140c47..8bfa67be 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Mail.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Mail.php @@ -5,6 +5,14 @@ namespace Illuminate\Support\Facades; use Illuminate\Support\Testing\Fakes\MailFake; /** + * @method static \Illuminate\Mail\PendingMail to($users) + * @method static \Illuminate\Mail\PendingMail bcc($users) + * @method static void raw(string $text, $callback) + * @method static void send(string|array|\Illuminate\Contracts\Mail\Mailable $view, array $data = [], \Closure|string $callback = null) + * @method static array failures() + * @method static mixed queue(string|array|\Illuminate\Contracts\Mail\Mailable $view, string $queue = null) + * @method static mixed later(\DateTimeInterface|\DateInterval|int $delay, string|array|\Illuminate\Contracts\Mail\Mailable $view, string $queue = null) + * * @see \Illuminate\Mail\Mailer */ class Mail extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Notification.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Notification.php index 268d2045..d13ec82a 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Notification.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Notification.php @@ -3,9 +3,14 @@ namespace Illuminate\Support\Facades; use Illuminate\Notifications\ChannelManager; +use Illuminate\Notifications\AnonymousNotifiable; use Illuminate\Support\Testing\Fakes\NotificationFake; /** + * @method static void send(\Illuminate\Support\Collection|array|mixed $notifiables, $notification) + * @method static void sendNow(\Illuminate\Support\Collection|array|mixed $notifiables, $notification) + * @method static mixed channel(string|null $name = null) + * * @see \Illuminate\Notifications\ChannelManager */ class Notification extends Facade @@ -13,11 +18,25 @@ class Notification extends Facade /** * Replace the bound instance with a fake. * - * @return void + * @return \Illuminate\Support\Testing\Fakes\NotificationFake */ public static function fake() { - static::swap(new NotificationFake); + static::swap($fake = new NotificationFake); + + return $fake; + } + + /** + * Begin sending a notification to an anonymous notifiable. + * + * @param string $channel + * @param mixed $route + * @return \Illuminate\Notifications\AnonymousNotifiable + */ + public static function route($channel, $route) + { + return (new AnonymousNotifiable)->route($channel, $route); } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Password.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Password.php index 6ebea841..c291b97f 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Password.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Password.php @@ -3,6 +3,11 @@ namespace Illuminate\Support\Facades; /** + * @method static string sendResetLink(array $credentials) + * @method static mixed reset(array $credentials, \Closure $callback) + * @method static void validator(\Closure $callback) + * @method static bool validateNewPassword(array $credentials) + * * @see \Illuminate\Auth\Passwords\PasswordBroker */ class Password extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Queue.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Queue.php index 647312f2..1f57ba0f 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Queue.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Queue.php @@ -5,6 +5,17 @@ namespace Illuminate\Support\Facades; use Illuminate\Support\Testing\Fakes\QueueFake; /** + * @method static int size(string $queue = null) + * @method static mixed push(string|object $job, string $data = '', $queue = null) + * @method static mixed pushOn(string $queue, string|object $job, $data = '') + * @method static mixed pushRaw(string $payload, string $queue = null, array $options = []) + * @method static mixed later(\DateTimeInterface|\DateInterval|int $delay, string|object $job, $data = '', string $queue = null) + * @method static mixed laterOn(string $queue, \DateTimeInterface|\DateInterval|int $delay, string|object $job, $data = '') + * @method static mixed bulk(array $jobs, $data = '', string $queue = null) + * @method static \Illuminate\Contracts\Queue\Job|null pop(string $queue = null) + * @method static string getConnectionName() + * @method static \Illuminate\Contracts\Queue\Queue setConnectionName(string $name) + * * @see \Illuminate\Queue\QueueManager * @see \Illuminate\Queue\Queue */ diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redirect.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redirect.php index 647a7c31..0138bd9b 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redirect.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redirect.php @@ -3,6 +3,19 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Http\RedirectResponse home(int $status = 302) + * @method static \Illuminate\Http\RedirectResponse back(int $status = 302, array $headers = [], $fallback = false) + * @method static \Illuminate\Http\RedirectResponse refresh(int $status = 302, array $headers = []) + * @method static \Illuminate\Http\RedirectResponse guest(string $path, int $status = 302, array $headers = [], bool $secure = null) + * @method static intended(string $default = '/', int $status = 302, array $headers = [], bool $secure = null) + * @method static \Illuminate\Http\RedirectResponse to(string $path, int $status = 302, array $headers = [], bool $secure = null) + * @method static \Illuminate\Http\RedirectResponse away(string $path, int $status = 302, array $headers = []) + * @method static \Illuminate\Http\RedirectResponse secure(string $path, int $status = 302, array $headers = []) + * @method static \Illuminate\Http\RedirectResponse route(string $route, array $parameters = [], int $status = 302, array $headers = []) + * @method static \Illuminate\Http\RedirectResponse action(string $action, array $parameters = [], int $status = 302, array $headers = []) + * @method static \Illuminate\Routing\UrlGenerator getUrlGenerator() + * @method static void setSession(\Illuminate\Session\Store $session) + * * @see \Illuminate\Routing\Redirector */ class Redirect extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redis.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redis.php index a7491ba5..f0fc8e1b 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redis.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Redis.php @@ -3,6 +3,8 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Redis\Connections\Connection connection(string $name = null) + * * @see \Illuminate\Redis\RedisManager * @see \Illuminate\Contracts\Redis\Factory */ diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Request.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Request.php index 5cb12f4e..95e482e1 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Request.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Request.php @@ -3,6 +3,45 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Http\Request instance() + * @method static string method() + * @method static string root() + * @method static string url() + * @method static string fullUrl() + * @method static string fullUrlWithQuery(array $query) + * @method static string path() + * @method static string decodedPath() + * @method static string|null segment(int $index, string|null $default = null) + * @method static array segments() + * @method static bool is(...$patterns) + * @method static bool routeIs(...$patterns) + * @method static bool fullUrlIs(...$patterns) + * @method static bool ajax() + * @method static bool pjax() + * @method static bool secure() + * @method static string ip() + * @method static array ips() + * @method static string userAgent() + * @method static \Illuminate\Http\Request merge(array $input) + * @method static \Illuminate\Http\Request replace(array $input) + * @method static \Symfony\Component\HttpFoundation\ParameterBag|mixed json(string $key = null, $default = null) + * @method static \Illuminate\Session\Store session() + * @method static \Illuminate\Session\Store|null getSession() + * @method static void setLaravelSession(\Illuminate\Contracts\Session\Session $session) + * @method static mixed user(string|null $guard = null) + * @method static \Illuminate\Routing\Route|object|string route(string|null $param = null) + * @method static string fingerprint() + * @method static \Illuminate\Http\Request setJson(\Symfony\Component\HttpFoundation\ParameterBag $json) + * @method static \Closure getUserResolver() + * @method static \Illuminate\Http\Request setUserResolver(\Closure $callback) + * @method static \Closure getRouteResolver() + * @method static \Illuminate\Http\Request setRouteResolver(\Closure $callback) + * @method static array toArray() + * @method static bool offsetExists(string $offset) + * @method static mixed offsetGet(string $offset) + * @method static void offsetSet(string $offset, $value) + * @method static void offsetUnset(string $offset) + * * @see \Illuminate\Http\Request */ class Request extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Response.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Response.php index 2bbf02b0..d6aaa427 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Response.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Response.php @@ -5,6 +5,19 @@ namespace Illuminate\Support\Facades; use Illuminate\Contracts\Routing\ResponseFactory as ResponseFactoryContract; /** + * @method static \Illuminate\Http\Response make(string $content = '', int $status = 200, array $headers = []) + * @method static \Illuminate\Http\Response view(string $view, array $data = [], int $status = 200, array $headers = []) + * @method static \Illuminate\Http\JsonResponse json(string | array $data = [], int $status = 200, array $headers = [], int $options = 0) + * @method static \Illuminate\Http\JsonResponse jsonp(string $callback, string | array $data = [], int $status = 200, array $headers = [], int $options = 0) + * @method static \Symfony\Component\HttpFoundation\StreamedResponse stream(\Closure $callback, int $status = 200, array $headers = []) + * @method static \Symfony\Component\HttpFoundation\StreamedResponse streamDownload(\Closure $callback, string | null $name = null, array $headers = [], string | null $disposition = 'attachment') + * @method static \Symfony\Component\HttpFoundation\BinaryFileResponse download(\SplFileInfo | string $file, string | null $name = null, array $headers = [], string | null $disposition = 'attachment') + * @method static \Illuminate\Http\RedirectResponse redirectTo(string $path, int $status = 302, array $headers = [], bool | null $secure = null) + * @method static \Illuminate\Http\RedirectResponse redirectToRoute(string $route, array $parameters = [], int $status = 302, array $headers = []) + * @method static \Illuminate\Http\RedirectResponse redirectToAction(string $action, array $parameters = [], int $status = 302, array $headers = []) + * @method static \Illuminate\Http\RedirectResponse redirectGuest(string $path, int $status = 302, array $headers = [], bool | null $secure = null) + * @method static \Illuminate\Http\RedirectResponse redirectToIntended(string $default = '/', int $status = 302, array $headers = [], bool | null $secure = null) + * * @see \Illuminate\Contracts\Routing\ResponseFactory */ class Response extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Route.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Route.php index 7d26cf67..a894c604 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Route.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Route.php @@ -3,20 +3,31 @@ namespace Illuminate\Support\Facades; /** - * @method static \Illuminate\Routing\Route get(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route post(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route put(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route delete(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route patch(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route options(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route any(string $uri, \Closure|array|string $action) - * @method static \Illuminate\Routing\Route match(array|string $methods, string $uri, \Closure|array|string $action) - * @method static void resource(string $name, string $controller, array $options = []) - * @method static void apiResource(string $name, string $controller, array $options = []) - * @method static void group(array $attributes, \Closure $callback) - * @method static \Illuminate\Routing\Route middleware(array|string|null $middleware) - * @method static \Illuminate\Routing\Route substituteBindings(\Illuminate\Routing\Route $route) - * @method static void substituteImplicitBindings(\Illuminate\Routing\Route $route) + * @method static \Illuminate\Routing\Route get(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route post(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route put(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route delete(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route patch(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route options(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route any(string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\Route match(array|string $methods, string $uri, \Closure|array|string|null $action = null) + * @method static \Illuminate\Routing\RouteRegistrar prefix(string $prefix) + * @method static \Illuminate\Routing\PendingResourceRegistration resource(string $name, string $controller, array $options = []) + * @method static \Illuminate\Routing\PendingResourceRegistration apiResource(string $name, string $controller, array $options = []) + * @method static \Illuminate\Routing\RouteRegistrar middleware(array|string|null $middleware) + * @method static \Illuminate\Routing\Route substituteBindings(\Illuminate\Support\Facades\Route $route) + * @method static void substituteImplicitBindings(\Illuminate\Support\Facades\Route $route) + * @method static \Illuminate\Routing\RouteRegistrar as(string $value) + * @method static \Illuminate\Routing\RouteRegistrar domain(string $value) + * @method static \Illuminate\Routing\RouteRegistrar name(string $value) + * @method static \Illuminate\Routing\RouteRegistrar namespace(string $value) + * @method static \Illuminate\Routing\Router|\Illuminate\Routing\RouteRegistrar group(array|\Closure|string $attributes, \Closure|string $routes) + * @method static \Illuminate\Routing\Route redirect(string $uri, string $destination, int $status = 301) + * @method static \Illuminate\Routing\Route view(string $uri, string $view, array $data = []) + * @method static void bind(string $key, string|callable $binder) + * @method static \Illuminate\Routing\Route current() + * @method static string|null currentRouteName() + * @method static string|null currentRouteAction() * * @see \Illuminate\Routing\Router */ diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Schema.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Schema.php index 3a92dc73..31748e15 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Schema.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Schema.php @@ -3,6 +3,12 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Database\Schema\Builder create(string $table, \Closure $callback) + * @method static \Illuminate\Database\Schema\Builder drop(string $table) + * @method static \Illuminate\Database\Schema\Builder dropIfExists(string $table) + * @method static \Illuminate\Database\Schema\Builder table(string $table, \Closure $callback) + * @method static void defaultStringLength(int $length) + * * @see \Illuminate\Database\Schema\Builder */ class Schema extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Session.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Session.php index bc9b5fd9..3b0be943 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Session.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Session.php @@ -3,6 +3,28 @@ namespace Illuminate\Support\Facades; /** + * @method static string getName() + * @method static string getId() + * @method static void setId(string $id) + * @method static bool start() + * @method static bool save() + * @method static array all() + * @method static bool exists(string|array $key) + * @method static bool has(string|array $key) + * @method static mixed get(string $key, $default = null) + * @method static void put(string|array $key, $value = null) + * @method static string token() + * @method static mixed remove(string $key) + * @method static void forget(string|array $keys) + * @method static void flush() + * @method static bool migrate(bool $destroy = false) + * @method static bool isStarted() + * @method static string|null previousUrl() + * @method static void setPreviousUrl(string $url) + * @method static \SessionHandlerInterface getHandler() + * @method static bool handlerNeedsRequest() + * @method static void setRequestOnHandler(\Illuminate\Http\Request $request) + * * @see \Illuminate\Session\SessionManager * @see \Illuminate\Session\Store */ diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Storage.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Storage.php index 485abaa7..5bcbfd65 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Storage.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Storage.php @@ -5,18 +5,23 @@ namespace Illuminate\Support\Facades; use Illuminate\Filesystem\Filesystem; /** + * @method static \Illuminate\Contracts\Filesystem\Filesystem disk(string $name = null) + * * @see \Illuminate\Filesystem\FilesystemManager */ class Storage extends Facade { /** - * Replace the given disk with a local, testing disk. + * Replace the given disk with a local testing disk. + * + * @param string|null $disk * - * @param string $disk * @return void */ - public static function fake($disk) + public static function fake($disk = null) { + $disk = $disk ?: self::$app['config']->get('filesystems.default'); + (new Filesystem)->cleanDirectory( $root = storage_path('framework/testing/disks/'.$disk) ); @@ -24,6 +29,21 @@ class Storage extends Facade static::set($disk, self::createLocalDriver(['root' => $root])); } + /** + * Replace the given disk with a persistent local testing disk. + * + * @param string|null $disk + * @return void + */ + public static function persistentFake($disk = null) + { + $disk = $disk ?: self::$app['config']->get('filesystems.default'); + + static::set($disk, self::createLocalDriver([ + 'root' => storage_path('framework/testing/disks/'.$disk), + ])); + } + /** * Get the registered name of the component. * diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/URL.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/URL.php index e17414bc..8be4ee9f 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/URL.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/URL.php @@ -3,6 +3,14 @@ namespace Illuminate\Support\Facades; /** + * @method static string current() + * @method static string to(string $path, $extra = [], bool $secure = null) + * @method static string secure(string $path, array $parameters = []) + * @method static string asset(string $path, bool $secure = null) + * @method static string route(string $name, $parameters = [], bool $absolute = true) + * @method static string action(string $action, $parameters = [], bool $absolute = true) + * @method static \Illuminate\Contracts\Routing\UrlGenerator setRootControllerNamespace(string $rootNamespace) + * * @see \Illuminate\Routing\UrlGenerator */ class URL extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Validator.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Validator.php index e3e1ba4d..1579c266 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Validator.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/Validator.php @@ -3,6 +3,11 @@ namespace Illuminate\Support\Facades; /** + * @method static \Illuminate\Contracts\Validation\Validator make(array $data, array $rules, array $messages = [], array $customAttributes = []) + * @method static void extend(string $rule, \Closure | string $extension, string $message = null) + * @method static void extendImplicit(string $rule, \Closure | string $extension, string $message = null) + * @method static void replacer(string $rule, \Closure | string $replacer) + * * @see \Illuminate\Validation\Factory */ class Validator extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/View.php b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/View.php index 9de57c32..688596e5 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Facades/View.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Facades/View.php @@ -3,6 +3,15 @@ namespace Illuminate\Support\Facades; /** + * @method static bool exists(string $view) + * @method static \Illuminate\Contracts\View\View file(string $path, array $data = [], array $mergeData = []) + * @method static \Illuminate\Contracts\View\View make(string $view, array $data = [], array $mergeData = []) + * @method static mixed share(array | string $key, $value = null) + * @method static array composer(array | string $views, \Closure | string $callback) + * @method static array creator(array | string $views, \Closure | string $callback) + * @method static \Illuminate\Contracts\View\Factory addNamespace(string $namespace, string | array $hints) + * @method static \Illuminate\Contracts\View\Factory replaceNamespace(string $namespace, string | array $hints) + * * @see \Illuminate\View\Factory */ class View extends Facade diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Fluent.php b/wp-content/themes/physioassist/vendor/illuminate/support/Fluent.php index f404cf8f..c34a5d76 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Fluent.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Fluent.php @@ -94,7 +94,7 @@ class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable */ public function offsetExists($offset) { - return isset($this->{$offset}); + return isset($this->attributes[$offset]); } /** @@ -105,7 +105,7 @@ class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable */ public function offsetGet($offset) { - return $this->{$offset}; + return $this->get($offset); } /** @@ -117,7 +117,7 @@ class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable */ public function offsetSet($offset, $value) { - $this->{$offset} = $value; + $this->attributes[$offset] = $value; } /** @@ -128,7 +128,7 @@ class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable */ public function offsetUnset($offset) { - unset($this->{$offset}); + unset($this->attributes[$offset]); } /** @@ -165,7 +165,7 @@ class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable */ public function __set($key, $value) { - $this->attributes[$key] = $value; + $this->offsetSet($key, $value); } /** @@ -176,7 +176,7 @@ class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable */ public function __isset($key) { - return isset($this->attributes[$key]); + return $this->offsetExists($key); } /** @@ -187,6 +187,6 @@ class Fluent implements ArrayAccess, Arrayable, Jsonable, JsonSerializable */ public function __unset($key) { - unset($this->attributes[$key]); + $this->offsetUnset($key); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/HigherOrderCollectionProxy.php b/wp-content/themes/physioassist/vendor/illuminate/support/HigherOrderCollectionProxy.php index f9024316..7a781a02 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/HigherOrderCollectionProxy.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/HigherOrderCollectionProxy.php @@ -2,6 +2,9 @@ namespace Illuminate\Support; +/** + * @mixin \Illuminate\Support\Collection + */ class HigherOrderCollectionProxy { /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/InteractsWithTime.php b/wp-content/themes/physioassist/vendor/illuminate/support/InteractsWithTime.php new file mode 100644 index 00000000..19ed3f24 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/support/InteractsWithTime.php @@ -0,0 +1,64 @@ +parseDateInterval($delay); + + return $delay instanceof DateTimeInterface + ? max(0, $delay->getTimestamp() - $this->currentTime()) + : (int) $delay; + } + + /** + * Get the "available at" UNIX timestamp. + * + * @param \DateTimeInterface|\DateInterval|int $delay + * @return int + */ + protected function availableAt($delay = 0) + { + $delay = $this->parseDateInterval($delay); + + return $delay instanceof DateTimeInterface + ? $delay->getTimestamp() + : Carbon::now()->addSeconds($delay)->getTimestamp(); + } + + /** + * If the given value is an interval, convert it to a DateTime instance. + * + * @param \DateTimeInterface|\DateInterval|int $delay + * @return \DateTimeInterface|int + */ + protected function parseDateInterval($delay) + { + if ($delay instanceof DateInterval) { + $delay = Carbon::now()->add($delay); + } + + return $delay; + } + + /** + * Get the current system time as a UNIX timestamp. + * + * @return int + */ + protected function currentTime() + { + return Carbon::now()->getTimestamp(); + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Manager.php b/wp-content/themes/physioassist/vendor/illuminate/support/Manager.php index 592776c2..4196fe0e 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Manager.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Manager.php @@ -56,6 +56,12 @@ abstract class Manager { $driver = $driver ?: $this->getDefaultDriver(); + if (is_null($driver)) { + throw new InvalidArgumentException(sprintf( + 'Unable to resolve NULL driver for [%s].', static::class + )); + } + // If the given driver has not been created before, we will create the instances // here and cache it so we can return it next time very quickly. If there is // already a driver created by this name, we'll just return that instance. diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/MessageBag.php b/wp-content/themes/physioassist/vendor/illuminate/support/MessageBag.php index 657b8acf..da2c31e2 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/MessageBag.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/MessageBag.php @@ -34,7 +34,8 @@ class MessageBag implements Arrayable, Countable, Jsonable, JsonSerializable, Me public function __construct(array $messages = []) { foreach ($messages as $key => $value) { - $this->messages[$key] = (array) $value; + $this->messages[$key] = $value instanceof Arrayable + ? $value->toArray() : (array) $value; } } @@ -321,6 +322,16 @@ class MessageBag implements Arrayable, Countable, Jsonable, JsonSerializable, Me return ! $this->any(); } + /** + * Determine if the message bag has any messages. + * + * @return bool + */ + public function isNotEmpty() + { + return $this->any(); + } + /** * Determine if the message bag has any messages. * diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/NamespacedItemResolver.php b/wp-content/themes/physioassist/vendor/illuminate/support/NamespacedItemResolver.php index cdf6cf9b..fea32753 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/NamespacedItemResolver.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/NamespacedItemResolver.php @@ -56,18 +56,14 @@ class NamespacedItemResolver // just pulling an entire group out of the array and not a single item. $group = $segments[0]; - if (count($segments) == 1) { - return [null, $group, null]; - } - // If there is more than one segment in this group, it means we are pulling // a specific item out of a group and will need to return this item name // as well as the group so we know which item to pull from the arrays. - else { - $item = implode('.', array_slice($segments, 1)); + $item = count($segments) === 1 + ? null + : implode('.', array_slice($segments, 1)); - return [null, $group, $item]; - } + return [null, $group, $item]; } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Optional.php b/wp-content/themes/physioassist/vendor/illuminate/support/Optional.php new file mode 100644 index 00000000..fc9f528a --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Optional.php @@ -0,0 +1,129 @@ +value = $value; + } + + /** + * Dynamically access a property on the underlying object. + * + * @param string $key + * @return mixed + */ + public function __get($key) + { + if (is_object($this->value)) { + return $this->value->{$key} ?? null; + } + } + + /** + * Dynamically check a property exists on the underlying object. + * + * @param $name + * @return bool + */ + public function __isset($name) + { + if (is_object($this->value)) { + return isset($this->value->{$name}); + } + + if (is_array($this->value) || $this->value instanceof \ArrayObject) { + return isset($this->value[$name]); + } + + return false; + } + + /** + * Determine if an item exists at an offset. + * + * @param mixed $key + * @return bool + */ + public function offsetExists($key) + { + return Arr::accessible($this->value) && Arr::exists($this->value, $key); + } + + /** + * Get an item at a given offset. + * + * @param mixed $key + * @return mixed + */ + public function offsetGet($key) + { + return Arr::get($this->value, $key); + } + + /** + * Set the item at a given offset. + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + if (Arr::accessible($this->value)) { + $this->value[$key] = $value; + } + } + + /** + * Unset the item at a given offset. + * + * @param string $key + * @return void + */ + public function offsetUnset($key) + { + if (Arr::accessible($this->value)) { + unset($this->value[$key]); + } + } + + /** + * Dynamically pass a method to the underlying object. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $parameters) + { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + + if (is_object($this->value)) { + return $this->value->{$method}(...$parameters); + } + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Pluralizer.php b/wp-content/themes/physioassist/vendor/illuminate/support/Pluralizer.php index 4d845aa8..6cc55ad7 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Pluralizer.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Pluralizer.php @@ -14,6 +14,7 @@ class Pluralizer public static $uncountable = [ 'audio', 'bison', + 'cattle', 'chassis', 'compensation', 'coreopsis', @@ -24,11 +25,14 @@ class Pluralizer 'equipment', 'evidence', 'feedback', + 'firmware', 'fish', 'furniture', 'gold', + 'hardware', 'information', 'jedi', + 'kin', 'knowledge', 'love', 'metadata', @@ -44,6 +48,7 @@ class Pluralizer 'rice', 'series', 'sheep', + 'software', 'species', 'swine', 'traffic', diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/ProcessUtils.php b/wp-content/themes/physioassist/vendor/illuminate/support/ProcessUtils.php new file mode 100644 index 00000000..1caa9e16 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/support/ProcessUtils.php @@ -0,0 +1,69 @@ +app->resourcePath().'/views/vendor/'.$namespace)) { - $this->app['view']->addNamespace($namespace, $appPath); + if (is_array($this->app->config['view']['paths'])) { + foreach ($this->app->config['view']['paths'] as $viewPath) { + if (is_dir($appPath = $viewPath.'/vendor/'.$namespace)) { + $this->app['view']->addNamespace($namespace, $appPath); + } + } } $this->app['view']->addNamespace($namespace, $path); @@ -100,6 +104,17 @@ abstract class ServiceProvider $this->app['translator']->addNamespace($namespace, $path); } + /** + * Register a JSON translation file path. + * + * @param string $path + * @return void + */ + protected function loadJsonTranslationsFrom($path) + { + $this->app['translator']->addJsonPath($path); + } + /** * Register a database migration path. * @@ -203,7 +218,7 @@ abstract class ServiceProvider } /** - * Get the paths for the provdider and group. + * Get the paths for the provider and group. * * @param string $provider * @param string $group @@ -218,6 +233,26 @@ abstract class ServiceProvider return []; } + /** + * Get the service providers available for publishing. + * + * @return array + */ + public static function publishableProviders() + { + return array_keys(static::$publishes); + } + + /** + * Get the groups available for publishing. + * + * @return array + */ + public static function publishableGroups() + { + return array_keys(static::$publishGroups); + } + /** * Register the package's custom Artisan commands. * @@ -262,16 +297,4 @@ abstract class ServiceProvider { return $this->defer; } - - /** - * Get a list of files that should be compiled for the package. - * - * @deprecated - * - * @return array - */ - public static function compiles() - { - return []; - } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Str.php b/wp-content/themes/physioassist/vendor/illuminate/support/Str.php index cee495dd..1953cab5 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Str.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Str.php @@ -2,7 +2,11 @@ namespace Illuminate\Support; +use Ramsey\Uuid\Uuid; +use Ramsey\Uuid\UuidFactory; use Illuminate\Support\Traits\Macroable; +use Ramsey\Uuid\Generator\CombGenerator; +use Ramsey\Uuid\Codec\TimestampFirstCombCodec; class Str { @@ -38,27 +42,24 @@ class Str */ public static function after($subject, $search) { - if ($search == '') { - return $subject; - } - - $pos = strpos($subject, $search); - - if ($pos === false) { - return $subject; - } - - return substr($subject, $pos + strlen($search)); + return $search === '' ? $subject : array_reverse(explode($search, $subject, 2))[0]; } /** * Transliterate a UTF-8 value to ASCII. * * @param string $value + * @param string $language * @return string */ - public static function ascii($value) + public static function ascii($value, $language = 'en') { + $languageSpecific = static::languageSpecificCharsArray($language); + + if (! is_null($languageSpecific)) { + $value = str_replace($languageSpecific[0], $languageSpecific[1], $value); + } + foreach (static::charsArray() as $key => $val) { $value = str_replace($val, $key, $value); } @@ -66,6 +67,18 @@ class Str return preg_replace('/[^\x20-\x7E]/u', '', $value); } + /** + * Get the portion of a string before a given value. + * + * @param string $subject + * @param string $search + * @return string + */ + public static function before($subject, $search) + { + return $search === '' ? $subject : explode($search, $subject)[0]; + } + /** * Convert a value to camel case. * @@ -91,7 +104,7 @@ class Str public static function contains($haystack, $needles) { foreach ((array) $needles as $needle) { - if ($needle != '' && mb_strpos($haystack, $needle) !== false) { + if ($needle !== '' && mb_strpos($haystack, $needle) !== false) { return true; } } @@ -134,24 +147,39 @@ class Str /** * Determine if a given string matches a given pattern. * - * @param string $pattern + * @param string|array $pattern * @param string $value * @return bool */ public static function is($pattern, $value) { - if ($pattern == $value) { - return true; + $patterns = Arr::wrap($pattern); + + if (empty($patterns)) { + return false; } - $pattern = preg_quote($pattern, '#'); + foreach ($patterns as $pattern) { + // If the given value is an exact match we can of course return true right + // from the beginning. Otherwise, we will translate asterisks and do an + // actual pattern match against the two strings to see if they match. + if ($pattern == $value) { + return true; + } + + $pattern = preg_quote($pattern, '#'); + + // Asterisks are translated into zero-or-more regular expression wildcards + // to make it convenient to check if the strings starts with the given + // pattern such as "library/*", making any string check convenient. + $pattern = str_replace('\*', '.*', $pattern); - // Asterisks are translated into zero-or-more regular expression wildcards - // to make it convenient to check if the strings starts with the given - // pattern such as "library/*", making any string check convenient. - $pattern = str_replace('\*', '.*', $pattern); + if (preg_match('#^'.$pattern.'\z#u', $value) === 1) { + return true; + } + } - return (bool) preg_match('#^'.$pattern.'\z#u', $value); + return false; } /** @@ -273,27 +301,6 @@ class Str return $string; } - /** - * Generate a "random" alpha-numeric string. - * - * Should not be considered sufficient for cryptography, etc. - * - * @deprecated since version 5.3. Use the "random" method directly. - * - * @param int $length - * @return string - */ - public static function quickRandom($length = 16) - { - if (PHP_MAJOR_VERSION > 5) { - return static::random($length); - } - - $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; - - return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); - } - /** * Replace a given value in the string sequentially with an array. * @@ -353,6 +360,20 @@ class Str return $subject; } + /** + * Begin a string with a single instance of a given value. + * + * @param string $value + * @param string $prefix + * @return string + */ + public static function start($value, $prefix) + { + $quoted = preg_quote($prefix, '/'); + + return $prefix.preg_replace('/^(?:'.$quoted.')+/u', '', $value); + } + /** * Convert the given string to upper-case. * @@ -391,17 +412,21 @@ class Str * * @param string $title * @param string $separator + * @param string $language * @return string */ - public static function slug($title, $separator = '-') + public static function slug($title, $separator = '-', $language = 'en') { - $title = static::ascii($title); + $title = static::ascii($title, $language); // Convert all dashes/underscores into separator $flip = $separator == '-' ? '_' : '-'; $title = preg_replace('!['.preg_quote($flip).']+!u', $separator, $title); + // Replace @ with the word 'at' + $title = str_replace('@', $separator.'at'.$separator, $title); + // Remove all characters that are not the separator, letters, numbers, or whitespace. $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title)); @@ -427,7 +452,7 @@ class Str } if (! ctype_lower($value)) { - $value = preg_replace('/\s+/u', '', $value); + $value = preg_replace('/\s+/u', '', ucwords($value)); $value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value)); } @@ -445,7 +470,7 @@ class Str public static function startsWith($haystack, $needles) { foreach ((array) $needles as $needle) { - if ($needle != '' && substr($haystack, 0, strlen($needle)) === (string) $needle) { + if ($needle !== '' && substr($haystack, 0, strlen($needle)) === (string) $needle) { return true; } } @@ -496,12 +521,43 @@ class Str return static::upper(static::substr($string, 0, 1)).static::substr($string, 1); } + /** + * Generate a UUID (version 4). + * + * @return \Ramsey\Uuid\UuidInterface + */ + public static function uuid() + { + return Uuid::uuid4(); + } + + /** + * Generate a time-ordered UUID (version 4). + * + * @return \Ramsey\Uuid\UuidInterface + */ + public static function orderedUuid() + { + $factory = new UuidFactory; + + $factory->setRandomGenerator(new CombGenerator( + $factory->getRandomGenerator(), + $factory->getNumberConverter() + )); + + $factory->setCodec(new TimestampFirstCombCodec( + $factory->getUuidBuilder() + )); + + return $factory->uuid4(); + } + /** * Returns the replacements for the ascii method. * * Note: Adapted from Stringy\Stringy. * - * @see https://github.com/danielstjules/Stringy/blob/2.3.1/LICENSE.txt + * @see https://github.com/danielstjules/Stringy/blob/3.1.0/LICENSE.txt * * @return array */ @@ -514,46 +570,45 @@ class Str } return $charsArray = [ - '0' => ['°', '₀', '۰'], - '1' => ['¹', '₁', '۱'], - '2' => ['²', '₂', '۲'], - '3' => ['³', '₃', '۳'], - '4' => ['⁴', '₄', '۴', '٤'], - '5' => ['⁵', '₅', '۵', '٥'], - '6' => ['⁶', '₆', '۶', '٦'], - '7' => ['⁷', '₇', '۷'], - '8' => ['⁸', '₈', '۸'], - '9' => ['⁹', '₉', '۹'], - 'a' => ['à', 'á', 'ả', 'ã', 'ạ', 'ă', 'ắ', 'ằ', 'ẳ', 'ẵ', 'ặ', 'â', 'ấ', 'ầ', 'ẩ', 'ẫ', 'ậ', 'ā', 'ą', 'å', 'α', 'ά', 'ἀ', 'ἁ', 'ἂ', 'ἃ', 'ἄ', 'ἅ', 'ἆ', 'ἇ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ὰ', 'ά', 'ᾰ', 'ᾱ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'а', 'أ', 'အ', 'ာ', 'ါ', 'ǻ', 'ǎ', 'ª', 'ა', 'अ', 'ا'], - 'b' => ['б', 'β', 'Ъ', 'Ь', 'ب', 'ဗ', 'ბ'], - 'c' => ['ç', 'ć', 'č', 'ĉ', 'ċ'], - 'd' => ['ď', 'ð', 'đ', 'ƌ', 'ȡ', 'ɖ', 'ɗ', 'ᵭ', 'ᶁ', 'ᶑ', 'д', 'δ', 'د', 'ض', 'ဍ', 'ဒ', 'დ'], - 'e' => ['é', 'è', 'ẻ', 'ẽ', 'ẹ', 'ê', 'ế', 'ề', 'ể', 'ễ', 'ệ', 'ë', 'ē', 'ę', 'ě', 'ĕ', 'ė', 'ε', 'έ', 'ἐ', 'ἑ', 'ἒ', 'ἓ', 'ἔ', 'ἕ', 'ὲ', 'έ', 'е', 'ё', 'э', 'є', 'ə', 'ဧ', 'ေ', 'ဲ', 'ე', 'ए', 'إ', 'ئ'], - 'f' => ['ф', 'φ', 'ف', 'ƒ', 'ფ'], - 'g' => ['ĝ', 'ğ', 'ġ', 'ģ', 'г', 'ґ', 'γ', 'ဂ', 'გ', 'گ'], - 'h' => ['ĥ', 'ħ', 'η', 'ή', 'ح', 'ه', 'ဟ', 'ှ', 'ჰ'], - 'i' => ['í', 'ì', 'ỉ', 'ĩ', 'ị', 'î', 'ï', 'ī', 'ĭ', 'į', 'ı', 'ι', 'ί', 'ϊ', 'ΐ', 'ἰ', 'ἱ', 'ἲ', 'ἳ', 'ἴ', 'ἵ', 'ἶ', 'ἷ', 'ὶ', 'ί', 'ῐ', 'ῑ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'і', 'ї', 'и', 'ဣ', 'ိ', 'ီ', 'ည်', 'ǐ', 'ი', 'इ'], - 'j' => ['ĵ', 'ј', 'Ј', 'ჯ', 'ج'], - 'k' => ['ķ', 'ĸ', 'к', 'κ', 'Ķ', 'ق', 'ك', 'က', 'კ', 'ქ', 'ک'], - 'l' => ['ł', 'ľ', 'ĺ', 'ļ', 'ŀ', 'л', 'λ', 'ل', 'လ', 'ლ'], - 'm' => ['м', 'μ', 'م', 'မ', 'მ'], - 'n' => ['ñ', 'ń', 'ň', 'ņ', 'ʼn', 'ŋ', 'ν', 'н', 'ن', 'န', 'ნ'], - 'o' => ['ó', 'ò', 'ỏ', 'õ', 'ọ', 'ô', 'ố', 'ồ', 'ổ', 'ỗ', 'ộ', 'ơ', 'ớ', 'ờ', 'ở', 'ỡ', 'ợ', 'ø', 'ō', 'ő', 'ŏ', 'ο', 'ὀ', 'ὁ', 'ὂ', 'ὃ', 'ὄ', 'ὅ', 'ὸ', 'ό', 'о', 'و', 'θ', 'ို', 'ǒ', 'ǿ', 'º', 'ო', 'ओ'], - 'p' => ['п', 'π', 'ပ', 'პ', 'پ'], - 'q' => ['ყ'], - 'r' => ['ŕ', 'ř', 'ŗ', 'р', 'ρ', 'ر', 'რ'], - 's' => ['ś', 'š', 'ş', 'с', 'σ', 'ș', 'ς', 'س', 'ص', 'စ', 'ſ', 'ს'], - 't' => ['ť', 'ţ', 'т', 'τ', 'ț', 'ت', 'ط', 'ဋ', 'တ', 'ŧ', 'თ', 'ტ'], - 'u' => ['ú', 'ù', 'ủ', 'ũ', 'ụ', 'ư', 'ứ', 'ừ', 'ử', 'ữ', 'ự', 'û', 'ū', 'ů', 'ű', 'ŭ', 'ų', 'µ', 'у', 'ဉ', 'ု', 'ူ', 'ǔ', 'ǖ', 'ǘ', 'ǚ', 'ǜ', 'უ', 'उ'], - 'v' => ['в', 'ვ', 'ϐ'], - 'w' => ['ŵ', 'ω', 'ώ', 'ဝ', 'ွ'], - 'x' => ['χ', 'ξ'], - 'y' => ['ý', 'ỳ', 'ỷ', 'ỹ', 'ỵ', 'ÿ', 'ŷ', 'й', 'ы', 'υ', 'ϋ', 'ύ', 'ΰ', 'ي', 'ယ'], - 'z' => ['ź', 'ž', 'ż', 'з', 'ζ', 'ز', 'ဇ', 'ზ'], + '0' => ['°', '₀', '۰', '0'], + '1' => ['¹', '₁', '۱', '1'], + '2' => ['²', '₂', '۲', '2'], + '3' => ['³', '₃', '۳', '3'], + '4' => ['⁴', '₄', '۴', '٤', '4'], + '5' => ['⁵', '₅', '۵', '٥', '5'], + '6' => ['⁶', '₆', '۶', '٦', '6'], + '7' => ['⁷', '₇', '۷', '7'], + '8' => ['⁸', '₈', '۸', '8'], + '9' => ['⁹', '₉', '۹', '9'], + 'a' => ['à', 'á', 'ả', 'ã', 'ạ', 'ă', 'ắ', 'ằ', 'ẳ', 'ẵ', 'ặ', 'â', 'ấ', 'ầ', 'ẩ', 'ẫ', 'ậ', 'ā', 'ą', 'å', 'α', 'ά', 'ἀ', 'ἁ', 'ἂ', 'ἃ', 'ἄ', 'ἅ', 'ἆ', 'ἇ', 'ᾀ', 'ᾁ', 'ᾂ', 'ᾃ', 'ᾄ', 'ᾅ', 'ᾆ', 'ᾇ', 'ὰ', 'ά', 'ᾰ', 'ᾱ', 'ᾲ', 'ᾳ', 'ᾴ', 'ᾶ', 'ᾷ', 'а', 'أ', 'အ', 'ာ', 'ါ', 'ǻ', 'ǎ', 'ª', 'ა', 'अ', 'ا', 'a', 'ä'], + 'b' => ['б', 'β', 'ب', 'ဗ', 'ბ', 'b'], + 'c' => ['ç', 'ć', 'č', 'ĉ', 'ċ', 'c'], + 'd' => ['ď', 'ð', 'đ', 'ƌ', 'ȡ', 'ɖ', 'ɗ', 'ᵭ', 'ᶁ', 'ᶑ', 'д', 'δ', 'د', 'ض', 'ဍ', 'ဒ', 'დ', 'd'], + 'e' => ['é', 'è', 'ẻ', 'ẽ', 'ẹ', 'ê', 'ế', 'ề', 'ể', 'ễ', 'ệ', 'ë', 'ē', 'ę', 'ě', 'ĕ', 'ė', 'ε', 'έ', 'ἐ', 'ἑ', 'ἒ', 'ἓ', 'ἔ', 'ἕ', 'ὲ', 'έ', 'е', 'ё', 'э', 'є', 'ə', 'ဧ', 'ေ', 'ဲ', 'ე', 'ए', 'إ', 'ئ', 'e'], + 'f' => ['ф', 'φ', 'ف', 'ƒ', 'ფ', 'f'], + 'g' => ['ĝ', 'ğ', 'ġ', 'ģ', 'г', 'ґ', 'γ', 'ဂ', 'გ', 'گ', 'g'], + 'h' => ['ĥ', 'ħ', 'η', 'ή', 'ح', 'ه', 'ဟ', 'ှ', 'ჰ', 'h'], + 'i' => ['í', 'ì', 'ỉ', 'ĩ', 'ị', 'î', 'ï', 'ī', 'ĭ', 'į', 'ı', 'ι', 'ί', 'ϊ', 'ΐ', 'ἰ', 'ἱ', 'ἲ', 'ἳ', 'ἴ', 'ἵ', 'ἶ', 'ἷ', 'ὶ', 'ί', 'ῐ', 'ῑ', 'ῒ', 'ΐ', 'ῖ', 'ῗ', 'і', 'ї', 'и', 'ဣ', 'ိ', 'ီ', 'ည်', 'ǐ', 'ი', 'इ', 'ی', 'i'], + 'j' => ['ĵ', 'ј', 'Ј', 'ჯ', 'ج', 'j'], + 'k' => ['ķ', 'ĸ', 'к', 'κ', 'Ķ', 'ق', 'ك', 'က', 'კ', 'ქ', 'ک', 'k'], + 'l' => ['ł', 'ľ', 'ĺ', 'ļ', 'ŀ', 'л', 'λ', 'ل', 'လ', 'ლ', 'l'], + 'm' => ['м', 'μ', 'م', 'မ', 'მ', 'm'], + 'n' => ['ñ', 'ń', 'ň', 'ņ', 'ʼn', 'ŋ', 'ν', 'н', 'ن', 'န', 'ნ', 'n'], + 'o' => ['ó', 'ò', 'ỏ', 'õ', 'ọ', 'ô', 'ố', 'ồ', 'ổ', 'ỗ', 'ộ', 'ơ', 'ớ', 'ờ', 'ở', 'ỡ', 'ợ', 'ø', 'ō', 'ő', 'ŏ', 'ο', 'ὀ', 'ὁ', 'ὂ', 'ὃ', 'ὄ', 'ὅ', 'ὸ', 'ό', 'о', 'و', 'θ', 'ို', 'ǒ', 'ǿ', 'º', 'ო', 'ओ', 'o', 'ö'], + 'p' => ['п', 'π', 'ပ', 'პ', 'پ', 'p'], + 'q' => ['ყ', 'q'], + 'r' => ['ŕ', 'ř', 'ŗ', 'р', 'ρ', 'ر', 'რ', 'r'], + 's' => ['ś', 'š', 'ş', 'с', 'σ', 'ș', 'ς', 'س', 'ص', 'စ', 'ſ', 'ს', 's'], + 't' => ['ť', 'ţ', 'т', 'τ', 'ț', 'ت', 'ط', 'ဋ', 'တ', 'ŧ', 'თ', 'ტ', 't'], + 'u' => ['ú', 'ù', 'ủ', 'ũ', 'ụ', 'ư', 'ứ', 'ừ', 'ử', 'ữ', 'ự', 'û', 'ū', 'ů', 'ű', 'ŭ', 'ų', 'µ', 'у', 'ဉ', 'ု', 'ူ', 'ǔ', 'ǖ', 'ǘ', 'ǚ', 'ǜ', 'უ', 'उ', 'u', 'ў', 'ü'], + 'v' => ['в', 'ვ', 'ϐ', 'v'], + 'w' => ['ŵ', 'ω', 'ώ', 'ဝ', 'ွ', 'w'], + 'x' => ['χ', 'ξ', 'x'], + 'y' => ['ý', 'ỳ', 'ỷ', 'ỹ', 'ỵ', 'ÿ', 'ŷ', 'й', 'ы', 'υ', 'ϋ', 'ύ', 'ΰ', 'ي', 'ယ', 'y'], + 'z' => ['ź', 'ž', 'ż', 'з', 'ζ', 'ز', 'ဇ', 'ზ', 'z'], 'aa' => ['ع', 'आ', 'آ'], - 'ae' => ['ä', 'æ', 'ǽ'], + 'ae' => ['æ', 'ǽ'], 'ai' => ['ऐ'], - 'at' => ['@'], 'ch' => ['ч', 'ჩ', 'ჭ', 'چ'], 'dj' => ['ђ', 'đ'], 'dz' => ['џ', 'ძ'], @@ -580,53 +635,84 @@ class Str 'yu' => ['ю'], 'zh' => ['ж', 'ჟ', 'ژ'], '(c)' => ['©'], - 'A' => ['Á', 'À', 'Ả', 'Ã', 'Ạ', 'Ă', 'Ắ', 'Ằ', 'Ẳ', 'Ẵ', 'Ặ', 'Â', 'Ấ', 'Ầ', 'Ẩ', 'Ẫ', 'Ậ', 'Å', 'Ā', 'Ą', 'Α', 'Ά', 'Ἀ', 'Ἁ', 'Ἂ', 'Ἃ', 'Ἄ', 'Ἅ', 'Ἆ', 'Ἇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'Ᾰ', 'Ᾱ', 'Ὰ', 'Ά', 'ᾼ', 'А', 'Ǻ', 'Ǎ'], - 'B' => ['Б', 'Β', 'ब'], - 'C' => ['Ç', 'Ć', 'Č', 'Ĉ', 'Ċ'], - 'D' => ['Ď', 'Ð', 'Đ', 'Ɖ', 'Ɗ', 'Ƌ', 'ᴅ', 'ᴆ', 'Д', 'Δ'], - 'E' => ['É', 'È', 'Ẻ', 'Ẽ', 'Ẹ', 'Ê', 'Ế', 'Ề', 'Ể', 'Ễ', 'Ệ', 'Ë', 'Ē', 'Ę', 'Ě', 'Ĕ', 'Ė', 'Ε', 'Έ', 'Ἐ', 'Ἑ', 'Ἒ', 'Ἓ', 'Ἔ', 'Ἕ', 'Έ', 'Ὲ', 'Е', 'Ё', 'Э', 'Є', 'Ə'], - 'F' => ['Ф', 'Φ'], - 'G' => ['Ğ', 'Ġ', 'Ģ', 'Г', 'Ґ', 'Γ'], - 'H' => ['Η', 'Ή', 'Ħ'], - 'I' => ['Í', 'Ì', 'Ỉ', 'Ĩ', 'Ị', 'Î', 'Ï', 'Ī', 'Ĭ', 'Į', 'İ', 'Ι', 'Ί', 'Ϊ', 'Ἰ', 'Ἱ', 'Ἳ', 'Ἴ', 'Ἵ', 'Ἶ', 'Ἷ', 'Ῐ', 'Ῑ', 'Ὶ', 'Ί', 'И', 'І', 'Ї', 'Ǐ', 'ϒ'], - 'K' => ['К', 'Κ'], - 'L' => ['Ĺ', 'Ł', 'Л', 'Λ', 'Ļ', 'Ľ', 'Ŀ', 'ल'], - 'M' => ['М', 'Μ'], - 'N' => ['Ń', 'Ñ', 'Ň', 'Ņ', 'Ŋ', 'Н', 'Ν'], - 'O' => ['Ó', 'Ò', 'Ỏ', 'Õ', 'Ọ', 'Ô', 'Ố', 'Ồ', 'Ổ', 'Ỗ', 'Ộ', 'Ơ', 'Ớ', 'Ờ', 'Ở', 'Ỡ', 'Ợ', 'Ø', 'Ō', 'Ő', 'Ŏ', 'Ο', 'Ό', 'Ὀ', 'Ὁ', 'Ὂ', 'Ὃ', 'Ὄ', 'Ὅ', 'Ὸ', 'Ό', 'О', 'Θ', 'Ө', 'Ǒ', 'Ǿ'], - 'P' => ['П', 'Π'], - 'R' => ['Ř', 'Ŕ', 'Р', 'Ρ', 'Ŗ'], - 'S' => ['Ş', 'Ŝ', 'Ș', 'Š', 'Ś', 'С', 'Σ'], - 'T' => ['Ť', 'Ţ', 'Ŧ', 'Ț', 'Т', 'Τ'], - 'U' => ['Ú', 'Ù', 'Ủ', 'Ũ', 'Ụ', 'Ư', 'Ứ', 'Ừ', 'Ử', 'Ữ', 'Ự', 'Û', 'Ū', 'Ů', 'Ű', 'Ŭ', 'Ų', 'У', 'Ǔ', 'Ǖ', 'Ǘ', 'Ǚ', 'Ǜ'], - 'V' => ['В'], - 'W' => ['Ω', 'Ώ', 'Ŵ'], - 'X' => ['Χ', 'Ξ'], - 'Y' => ['Ý', 'Ỳ', 'Ỷ', 'Ỹ', 'Ỵ', 'Ÿ', 'Ῠ', 'Ῡ', 'Ὺ', 'Ύ', 'Ы', 'Й', 'Υ', 'Ϋ', 'Ŷ'], - 'Z' => ['Ź', 'Ž', 'Ż', 'З', 'Ζ'], - 'AE' => ['Ä', 'Æ', 'Ǽ'], - 'CH' => ['Ч'], - 'DJ' => ['Ђ'], - 'DZ' => ['Џ'], - 'GX' => ['Ĝ'], - 'HX' => ['Ĥ'], - 'IJ' => ['IJ'], - 'JX' => ['Ĵ'], - 'KH' => ['Х'], - 'LJ' => ['Љ'], - 'NJ' => ['Њ'], - 'OE' => ['Ö', 'Œ'], - 'PS' => ['Ψ'], - 'SH' => ['Ш'], - 'SHCH' => ['Щ'], - 'SS' => ['ẞ'], - 'TH' => ['Þ'], - 'TS' => ['Ц'], - 'UE' => ['Ü'], - 'YA' => ['Я'], - 'YU' => ['Ю'], - 'ZH' => ['Ж'], - ' ' => ["\xC2\xA0", "\xE2\x80\x80", "\xE2\x80\x81", "\xE2\x80\x82", "\xE2\x80\x83", "\xE2\x80\x84", "\xE2\x80\x85", "\xE2\x80\x86", "\xE2\x80\x87", "\xE2\x80\x88", "\xE2\x80\x89", "\xE2\x80\x8A", "\xE2\x80\xAF", "\xE2\x81\x9F", "\xE3\x80\x80"], + 'A' => ['Á', 'À', 'Ả', 'Ã', 'Ạ', 'Ă', 'Ắ', 'Ằ', 'Ẳ', 'Ẵ', 'Ặ', 'Â', 'Ấ', 'Ầ', 'Ẩ', 'Ẫ', 'Ậ', 'Å', 'Ā', 'Ą', 'Α', 'Ά', 'Ἀ', 'Ἁ', 'Ἂ', 'Ἃ', 'Ἄ', 'Ἅ', 'Ἆ', 'Ἇ', 'ᾈ', 'ᾉ', 'ᾊ', 'ᾋ', 'ᾌ', 'ᾍ', 'ᾎ', 'ᾏ', 'Ᾰ', 'Ᾱ', 'Ὰ', 'Ά', 'ᾼ', 'А', 'Ǻ', 'Ǎ', 'A', 'Ä'], + 'B' => ['Б', 'Β', 'ब', 'B'], + 'C' => ['Ç', 'Ć', 'Č', 'Ĉ', 'Ċ', 'C'], + 'D' => ['Ď', 'Ð', 'Đ', 'Ɖ', 'Ɗ', 'Ƌ', 'ᴅ', 'ᴆ', 'Д', 'Δ', 'D'], + 'E' => ['É', 'È', 'Ẻ', 'Ẽ', 'Ẹ', 'Ê', 'Ế', 'Ề', 'Ể', 'Ễ', 'Ệ', 'Ë', 'Ē', 'Ę', 'Ě', 'Ĕ', 'Ė', 'Ε', 'Έ', 'Ἐ', 'Ἑ', 'Ἒ', 'Ἓ', 'Ἔ', 'Ἕ', 'Έ', 'Ὲ', 'Е', 'Ё', 'Э', 'Є', 'Ə', 'E'], + 'F' => ['Ф', 'Φ', 'F'], + 'G' => ['Ğ', 'Ġ', 'Ģ', 'Г', 'Ґ', 'Γ', 'G'], + 'H' => ['Η', 'Ή', 'Ħ', 'H'], + 'I' => ['Í', 'Ì', 'Ỉ', 'Ĩ', 'Ị', 'Î', 'Ï', 'Ī', 'Ĭ', 'Į', 'İ', 'Ι', 'Ί', 'Ϊ', 'Ἰ', 'Ἱ', 'Ἳ', 'Ἴ', 'Ἵ', 'Ἶ', 'Ἷ', 'Ῐ', 'Ῑ', 'Ὶ', 'Ί', 'И', 'І', 'Ї', 'Ǐ', 'ϒ', 'I'], + 'J' => ['J'], + 'K' => ['К', 'Κ', 'K'], + 'L' => ['Ĺ', 'Ł', 'Л', 'Λ', 'Ļ', 'Ľ', 'Ŀ', 'ल', 'L'], + 'M' => ['М', 'Μ', 'M'], + 'N' => ['Ń', 'Ñ', 'Ň', 'Ņ', 'Ŋ', 'Н', 'Ν', 'N'], + 'O' => ['Ó', 'Ò', 'Ỏ', 'Õ', 'Ọ', 'Ô', 'Ố', 'Ồ', 'Ổ', 'Ỗ', 'Ộ', 'Ơ', 'Ớ', 'Ờ', 'Ở', 'Ỡ', 'Ợ', 'Ø', 'Ō', 'Ő', 'Ŏ', 'Ο', 'Ό', 'Ὀ', 'Ὁ', 'Ὂ', 'Ὃ', 'Ὄ', 'Ὅ', 'Ὸ', 'Ό', 'О', 'Θ', 'Ө', 'Ǒ', 'Ǿ', 'O', 'Ö'], + 'P' => ['П', 'Π', 'P'], + 'Q' => ['Q'], + 'R' => ['Ř', 'Ŕ', 'Р', 'Ρ', 'Ŗ', 'R'], + 'S' => ['Ş', 'Ŝ', 'Ș', 'Š', 'Ś', 'С', 'Σ', 'S'], + 'T' => ['Ť', 'Ţ', 'Ŧ', 'Ț', 'Т', 'Τ', 'T'], + 'U' => ['Ú', 'Ù', 'Ủ', 'Ũ', 'Ụ', 'Ư', 'Ứ', 'Ừ', 'Ử', 'Ữ', 'Ự', 'Û', 'Ū', 'Ů', 'Ű', 'Ŭ', 'Ų', 'У', 'Ǔ', 'Ǖ', 'Ǘ', 'Ǚ', 'Ǜ', 'U', 'Ў', 'Ü'], + 'V' => ['В', 'V'], + 'W' => ['Ω', 'Ώ', 'Ŵ', 'W'], + 'X' => ['Χ', 'Ξ', 'X'], + 'Y' => ['Ý', 'Ỳ', 'Ỷ', 'Ỹ', 'Ỵ', 'Ÿ', 'Ῠ', 'Ῡ', 'Ὺ', 'Ύ', 'Ы', 'Й', 'Υ', 'Ϋ', 'Ŷ', 'Y'], + 'Z' => ['Ź', 'Ž', 'Ż', 'З', 'Ζ', 'Z'], + 'AE' => ['Æ', 'Ǽ'], + 'Ch' => ['Ч'], + 'Dj' => ['Ђ'], + 'Dz' => ['Џ'], + 'Gx' => ['Ĝ'], + 'Hx' => ['Ĥ'], + 'Ij' => ['IJ'], + 'Jx' => ['Ĵ'], + 'Kh' => ['Х'], + 'Lj' => ['Љ'], + 'Nj' => ['Њ'], + 'Oe' => ['Œ'], + 'Ps' => ['Ψ'], + 'Sh' => ['Ш'], + 'Shch' => ['Щ'], + 'Ss' => ['ẞ'], + 'Th' => ['Þ'], + 'Ts' => ['Ц'], + 'Ya' => ['Я'], + 'Yu' => ['Ю'], + 'Zh' => ['Ж'], + ' ' => ["\xC2\xA0", "\xE2\x80\x80", "\xE2\x80\x81", "\xE2\x80\x82", "\xE2\x80\x83", "\xE2\x80\x84", "\xE2\x80\x85", "\xE2\x80\x86", "\xE2\x80\x87", "\xE2\x80\x88", "\xE2\x80\x89", "\xE2\x80\x8A", "\xE2\x80\xAF", "\xE2\x81\x9F", "\xE3\x80\x80", "\xEF\xBE\xA0"], ]; } + + /** + * Returns the language specific replacements for the ascii method. + * + * Note: Adapted from Stringy\Stringy. + * + * @see https://github.com/danielstjules/Stringy/blob/3.1.0/LICENSE.txt + * + * @param string $language + * @return array|null + */ + protected static function languageSpecificCharsArray($language) + { + static $languageSpecific; + + if (! isset($languageSpecific)) { + $languageSpecific = [ + 'bg' => [ + ['х', 'Х', 'щ', 'Щ', 'ъ', 'Ъ', 'ь', 'Ь'], + ['h', 'H', 'sht', 'SHT', 'a', 'А', 'y', 'Y'], + ], + 'de' => [ + ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü'], + ['ae', 'oe', 'ue', 'AE', 'OE', 'UE'], + ], + ]; + } + + return $languageSpecific[$language] ?? null; + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/BusFake.php b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/BusFake.php index a90fedb9..b42491e4 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/BusFake.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/BusFake.php @@ -18,17 +18,36 @@ class BusFake implements Dispatcher * Assert if a job was dispatched based on a truth-test callback. * * @param string $command - * @param callable|null $callback + * @param callable|int|null $callback * @return void */ public function assertDispatched($command, $callback = null) { + if (is_numeric($callback)) { + return $this->assertDispatchedTimes($command, $callback); + } + PHPUnit::assertTrue( $this->dispatched($command, $callback)->count() > 0, "The expected [{$command}] job was not dispatched." ); } + /** + * Assert if a job was pushed a number of times. + * + * @param string $command + * @param int $times + * @return void + */ + protected function assertDispatchedTimes($command, $times = 1) + { + PHPUnit::assertTrue( + ($count = $this->dispatched($command)->count()) === $times, + "The expected [{$command}] job was pushed {$count} times instead of {$times} times." + ); + } + /** * Determine if a job was dispatched based on a truth-test callback. * @@ -110,4 +129,37 @@ class BusFake implements Dispatcher { // } + + /** + * Determine if the given command has a handler. + * + * @param mixed $command + * @return bool + */ + public function hasCommandHandler($command) + { + return false; + } + + /** + * Retrieve the handler for a command. + * + * @param mixed $command + * @return mixed + */ + public function getCommandHandler($command) + { + return false; + } + + /** + * Map a command to a handler. + * + * @param array $map + * @return $this + */ + public function map(array $map) + { + return $this; + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/EventFake.php b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/EventFake.php index e21f666d..edbb90eb 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/EventFake.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/EventFake.php @@ -2,33 +2,81 @@ namespace Illuminate\Support\Testing\Fakes; +use Illuminate\Support\Arr; use PHPUnit\Framework\Assert as PHPUnit; use Illuminate\Contracts\Events\Dispatcher; class EventFake implements Dispatcher { /** - * All of the events that have been dispatched keyed by type. + * The original event dispatcher. + * + * @var \Illuminate\Contracts\Events\Dispatcher + */ + protected $dispatcher; + + /** + * The event types that should be intercepted instead of dispatched. + * + * @var array + */ + protected $eventsToFake; + + /** + * All of the events that have been intercepted keyed by type. * * @var array */ protected $events = []; + /** + * Create a new event fake instance. + * + * @param \Illuminate\Contracts\Events\Dispatcher $dispatcher + * @param array|string $eventsToFake + * @return void + */ + public function __construct(Dispatcher $dispatcher, $eventsToFake = []) + { + $this->dispatcher = $dispatcher; + + $this->eventsToFake = Arr::wrap($eventsToFake); + } + /** * Assert if an event was dispatched based on a truth-test callback. * * @param string $event - * @param callable|null $callback + * @param callable|int|null $callback * @return void */ public function assertDispatched($event, $callback = null) { + if (is_int($callback)) { + return $this->assertDispatchedTimes($event, $callback); + } + PHPUnit::assertTrue( $this->dispatched($event, $callback)->count() > 0, "The expected [{$event}] event was not dispatched." ); } + /** + * Assert if a event was dispatched a number of times. + * + * @param string $event + * @param int $times + * @return void + */ + public function assertDispatchedTimes($event, $times = 1) + { + PHPUnit::assertTrue( + ($count = $this->dispatched($event)->count()) === $times, + "The expected [{$event}] event was dispatched {$count} times instead of {$times} times." + ); + } + /** * Determine if an event was dispatched based on a truth-test callback. * @@ -159,7 +207,22 @@ class EventFake implements Dispatcher { $name = is_object($event) ? get_class($event) : (string) $event; - $this->events[$name][] = func_get_args(); + if ($this->shouldFakeEvent($name)) { + $this->events[$name][] = func_get_args(); + } else { + $this->dispatcher->dispatch($event, $payload, $halt); + } + } + + /** + * Determine if an event should be faked or actually dispatched. + * + * @param string $eventName + * @return bool + */ + protected function shouldFakeEvent($eventName) + { + return empty($this->eventsToFake) || in_array($eventName, $this->eventsToFake); } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/MailFake.php b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/MailFake.php index 338f2195..0d11c086 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/MailFake.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/MailFake.php @@ -5,6 +5,7 @@ namespace Illuminate\Support\Testing\Fakes; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Contracts\Mail\Mailable; use PHPUnit\Framework\Assert as PHPUnit; +use Illuminate\Contracts\Queue\ShouldQueue; class MailFake implements Mailer { @@ -15,21 +16,47 @@ class MailFake implements Mailer */ protected $mailables = []; + /** + * All of the mailables that have been queued. + * + * @var array + */ + protected $queuedMailables = []; + /** * Assert if a mailable was sent based on a truth-test callback. * * @param string $mailable - * @param callable|null $callback + * @param callable|int|null $callback * @return void */ public function assertSent($mailable, $callback = null) { + if (is_numeric($callback)) { + return $this->assertSentTimes($mailable, $callback); + } + PHPUnit::assertTrue( $this->sent($mailable, $callback)->count() > 0, "The expected [{$mailable}] mailable was not sent." ); } + /** + * Assert if a mailable was sent a number of times. + * + * @param string $mailable + * @param int $times + * @return void + */ + protected function assertSentTimes($mailable, $times = 1) + { + PHPUnit::assertTrue( + ($count = $this->sent($mailable)->count()) === $times, + "The expected [{$mailable}] mailable was sent {$count} times instead of {$times} times." + ); + } + /** * Determine if a mailable was not sent based on a truth-test callback. * @@ -55,6 +82,65 @@ class MailFake implements Mailer PHPUnit::assertEmpty($this->mailables, 'Mailables were sent unexpectedly.'); } + /** + * Assert if a mailable was queued based on a truth-test callback. + * + * @param string $mailable + * @param callable|int|null $callback + * @return void + */ + public function assertQueued($mailable, $callback = null) + { + if (is_numeric($callback)) { + return $this->assertQueuedTimes($mailable, $callback); + } + + PHPUnit::assertTrue( + $this->queued($mailable, $callback)->count() > 0, + "The expected [{$mailable}] mailable was not queued." + ); + } + + /** + * Assert if a mailable was queued a number of times. + * + * @param string $mailable + * @param int $times + * @return void + */ + protected function assertQueuedTimes($mailable, $times = 1) + { + PHPUnit::assertTrue( + ($count = $this->queued($mailable)->count()) === $times, + "The expected [{$mailable}] mailable was queued {$count} times instead of {$times} times." + ); + } + + /** + * Determine if a mailable was not queued based on a truth-test callback. + * + * @param string $mailable + * @param callable|null $callback + * @return void + */ + public function assertNotQueued($mailable, $callback = null) + { + PHPUnit::assertTrue( + $this->queued($mailable, $callback)->count() === 0, + "The unexpected [{$mailable}] mailable was queued." + ); + } + + /** + * Assert that no mailables were queued. + * + * @return void + */ + public function assertNothingQueued() + { + PHPUnit::assertEmpty($this->queuedMailables, 'Mailables were queued unexpectedly.'); + } + /** * Get all of the mailables matching a truth-test callback. * @@ -88,6 +174,39 @@ class MailFake implements Mailer return $this->mailablesOf($mailable)->count() > 0; } + /** + * Get all of the queued mailables matching a truth-test callback. + * + * @param string $mailable + * @param callable|null $callback + * @return \Illuminate\Support\Collection + */ + public function queued($mailable, $callback = null) + { + if (! $this->hasQueued($mailable)) { + return collect(); + } + + $callback = $callback ?: function () { + return true; + }; + + return $this->queuedMailablesOf($mailable)->filter(function ($mailable) use ($callback) { + return $callback($mailable); + }); + } + + /** + * Determine if the given mailable has been queued. + * + * @param string $mailable + * @return bool + */ + public function hasQueued($mailable) + { + return $this->queuedMailablesOf($mailable)->count() > 0; + } + /** * Get all of the mailed mailables for a given type. * @@ -101,6 +220,19 @@ class MailFake implements Mailer }); } + /** + * Get all of the mailed mailables for a given type. + * + * @param string $type + * @return \Illuminate\Support\Collection + */ + protected function queuedMailablesOf($type) + { + return collect($this->queuedMailables)->filter(function ($mailable) use ($type) { + return $mailable instanceof $type; + }); + } + /** * Begin the process of mailing a mailable class instance. * @@ -149,6 +281,10 @@ class MailFake implements Mailer return; } + if ($view instanceof ShouldQueue) { + return $this->queue($view, $data, $callback); + } + $this->mailables[] = $view; } @@ -156,14 +292,16 @@ class MailFake implements Mailer * Queue a new e-mail message for sending. * * @param string|array $view - * @param array $data - * @param \Closure|string $callback * @param string|null $queue * @return mixed */ - public function queue($view, array $data = [], $callback = null, $queue = null) + public function queue($view, $queue = null) { - $this->send($view); + if (! $view instanceof Mailable) { + return; + } + + $this->queuedMailables[] = $view; } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/NotificationFake.php b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/NotificationFake.php index 63050c58..b610932b 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/NotificationFake.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/NotificationFake.php @@ -6,8 +6,9 @@ use Ramsey\Uuid\Uuid; use Illuminate\Support\Collection; use PHPUnit\Framework\Assert as PHPUnit; use Illuminate\Contracts\Notifications\Factory as NotificationFactory; +use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher; -class NotificationFake implements NotificationFactory +class NotificationFake implements NotificationFactory, NotificationDispatcher { /** * All of the notifications that have been sent. @@ -34,12 +35,32 @@ class NotificationFake implements NotificationFactory return; } + if (is_numeric($callback)) { + return $this->assertSentToTimes($notifiable, $notification, $callback); + } + PHPUnit::assertTrue( $this->sent($notifiable, $notification, $callback)->count() > 0, "The expected [{$notification}] notification was not sent." ); } + /** + * Assert if a notification was sent a number of times. + * + * @param mixed $notifiable + * @param string $notification + * @param int $times + * @return void + */ + public function assertSentToTimes($notifiable, $notification, $times = 1) + { + PHPUnit::assertTrue( + ($count = $this->sent($notifiable, $notification)->count()) === $times, + "The expected [{$notification}] notification was sent {$count} times instead of {$times} times." + ); + } + /** * Determine if a notification was sent based on a truth-test callback. * @@ -64,6 +85,16 @@ class NotificationFake implements NotificationFactory ); } + /** + * Assert that no notifications were sent. + * + * @return void + */ + public function assertNothingSent() + { + PHPUnit::assertEmpty($this->notifications, 'Notifications were sent unexpectedly.'); + } + /** * Get all of the notifications matching a truth-test callback. * @@ -143,11 +174,14 @@ class NotificationFake implements NotificationFactory } foreach ($notifiables as $notifiable) { - $notification->id = Uuid::uuid4()->toString(); + if (! $notification->id) { + $notification->id = Uuid::uuid4()->toString(); + } $this->notifications[get_class($notifiable)][$notifiable->getKey()][get_class($notification)][] = [ 'notification' => $notification, 'channels' => $notification->via($notifiable), + 'notifiable' => $notifiable, ]; } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/PendingMailFake.php b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/PendingMailFake.php index 0baa9d2a..e344fcfb 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/PendingMailFake.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/PendingMailFake.php @@ -21,7 +21,7 @@ class PendingMailFake extends PendingMail /** * Send a new mailable message instance. * - * @param Mailable $mailable + * @param \Illuminate\Mail\Mailable $mailable * @return mixed */ public function send(Mailable $mailable) @@ -32,7 +32,7 @@ class PendingMailFake extends PendingMail /** * Send a mailable message immediately. * - * @param Mailable $mailable + * @param \Illuminate\Mail\Mailable $mailable * @return mixed */ public function sendNow(Mailable $mailable) @@ -43,11 +43,11 @@ class PendingMailFake extends PendingMail /** * Push the given mailable onto the queue. * - * @param Mailable $mailable + * @param \Illuminate\Mail\Mailable $mailable * @return mixed */ public function queue(Mailable $mailable) { - return $this->sendNow($mailable); + return $this->mailer->queue($this->fill($mailable)); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/QueueFake.php b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/QueueFake.php index 4da24c8e..960a776e 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/QueueFake.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Testing/Fakes/QueueFake.php @@ -19,17 +19,36 @@ class QueueFake extends QueueManager implements Queue * Assert if a job was pushed based on a truth-test callback. * * @param string $job - * @param callable|null $callback + * @param callable|int|null $callback * @return void */ public function assertPushed($job, $callback = null) { + if (is_numeric($callback)) { + return $this->assertPushedTimes($job, $callback); + } + PHPUnit::assertTrue( $this->pushed($job, $callback)->count() > 0, "The expected [{$job}] job was not pushed." ); } + /** + * Assert if a job was pushed a number of times. + * + * @param string $job + * @param int $times + * @return void + */ + protected function assertPushedTimes($job, $times = 1) + { + PHPUnit::assertTrue( + ($count = $this->pushed($job)->count()) === $times, + "The expected [{$job}] job was pushed {$count} times instead of {$times} times." + ); + } + /** * Assert if a job was pushed based on a truth-test callback. * @@ -49,6 +68,90 @@ class QueueFake extends QueueManager implements Queue }); } + /** + * Assert if a job was pushed with chained jobs based on a truth-test callback. + * + * @param string $job + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + public function assertPushedWithChain($job, $expectedChain = [], $callback = null) + { + PHPUnit::assertTrue( + $this->pushed($job, $callback)->isNotEmpty(), + "The expected [{$job}] job was not pushed." + ); + + PHPUnit::assertTrue( + collect($expectedChain)->isNotEmpty(), + 'The expected chain can not be empty.' + ); + + $this->isChainOfObjects($expectedChain) + ? $this->assertPushedWithChainOfObjects($job, $expectedChain, $callback) + : $this->assertPushedWithChainOfClasses($job, $expectedChain, $callback); + } + + /** + * Assert if a job was pushed with chained jobs based on a truth-test callback. + * + * @param string $job + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + protected function assertPushedWithChainOfObjects($job, $expectedChain, $callback) + { + $chain = collect($expectedChain)->map(function ($job) { + return serialize($job); + })->all(); + + PHPUnit::assertTrue( + $this->pushed($job, $callback)->filter(function ($job) use ($chain) { + return $job->chained == $chain; + })->isNotEmpty(), + 'The expected chain was not pushed.' + ); + } + + /** + * Assert if a job was pushed with chained jobs based on a truth-test callback. + * + * @param string $job + * @param array $expectedChain + * @param callable|null $callback + * @return void + */ + protected function assertPushedWithChainOfClasses($job, $expectedChain, $callback) + { + $matching = $this->pushed($job, $callback)->map->chained->map(function ($chain) { + return collect($chain)->map(function ($job) { + return get_class(unserialize($job)); + }); + })->filter(function ($chain) use ($expectedChain) { + return $chain->all() === $expectedChain; + }); + + PHPUnit::assertTrue( + $matching->isNotEmpty(), 'The expected chain was not pushed.' + ); + } + + /** + * Determine if the given chain is entirely composed of objects. + * + * @param array $chain + * @return bool + */ + protected function isChainOfObjects($chain) + { + return collect($chain)->count() == collect($chain) + ->filter(function ($job) { + return is_object($job); + })->count(); + } + /** * Determine if a job was pushed based on a truth-test callback. * @@ -64,6 +167,16 @@ class QueueFake extends QueueManager implements Queue ); } + /** + * Assert that no jobs were pushed. + * + * @return void + */ + public function assertNothingPushed() + { + PHPUnit::assertEmpty($this->jobs, 'Jobs were pushed unexpectedly.'); + } + /** * Get all of the jobs matching a truth-test callback. * @@ -116,7 +229,7 @@ class QueueFake extends QueueManager implements Queue */ public function size($queue = null) { - return 0; + return count($this->jobs); } /** @@ -210,8 +323,8 @@ class QueueFake extends QueueManager implements Queue */ public function bulk($jobs, $data = '', $queue = null) { - foreach ($this->jobs as $job) { - $this->push($job); + foreach ($jobs as $job) { + $this->push($job, $data, $queue); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Traits/Localizable.php b/wp-content/themes/physioassist/vendor/illuminate/support/Traits/Localizable.php new file mode 100644 index 00000000..b2699620 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Traits/Localizable.php @@ -0,0 +1,31 @@ +getLocale(); + + try { + $translator->setLocale($locale); + + return $callback(); + } finally { + $translator->setLocale($original); + } + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/Traits/Macroable.php b/wp-content/themes/physioassist/vendor/illuminate/support/Traits/Macroable.php index 2c103d4f..ff0d534f 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/Traits/Macroable.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/Traits/Macroable.php @@ -3,6 +3,8 @@ namespace Illuminate\Support\Traits; use Closure; +use ReflectionClass; +use ReflectionMethod; use BadMethodCallException; trait Macroable @@ -17,15 +19,36 @@ trait Macroable /** * Register a custom macro. * - * @param string $name - * @param callable $macro + * @param string $name + * @param object|callable $macro + * * @return void */ - public static function macro($name, callable $macro) + public static function macro($name, $macro) { static::$macros[$name] = $macro; } + /** + * Mix another object into the class. + * + * @param object $mixin + * @return void + * @throws \ReflectionException + */ + public static function mixin($mixin) + { + $methods = (new ReflectionClass($mixin))->getMethods( + ReflectionMethod::IS_PUBLIC | ReflectionMethod::IS_PROTECTED + ); + + foreach ($methods as $method) { + $method->setAccessible(true); + + static::macro($method->name, $method->invoke($mixin)); + } + } + /** * Checks if macro is registered. * @@ -49,7 +72,9 @@ trait Macroable public static function __callStatic($method, $parameters) { if (! static::hasMacro($method)) { - throw new BadMethodCallException("Method {$method} does not exist."); + throw new BadMethodCallException(sprintf( + 'Method %s::%s does not exist.', static::class, $method + )); } if (static::$macros[$method] instanceof Closure) { @@ -71,13 +96,17 @@ trait Macroable public function __call($method, $parameters) { if (! static::hasMacro($method)) { - throw new BadMethodCallException("Method {$method} does not exist."); + throw new BadMethodCallException(sprintf( + 'Method %s::%s does not exist.', static::class, $method + )); } - if (static::$macros[$method] instanceof Closure) { - return call_user_func_array(static::$macros[$method]->bindTo($this, static::class), $parameters); + $macro = static::$macros[$method]; + + if ($macro instanceof Closure) { + return call_user_func_array($macro->bindTo($this, static::class), $parameters); } - return call_user_func_array(static::$macros[$method], $parameters); + return call_user_func_array($macro, $parameters); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/ViewErrorBag.php b/wp-content/themes/physioassist/vendor/illuminate/support/ViewErrorBag.php index d5e9c7ef..0f273b5b 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/ViewErrorBag.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/ViewErrorBag.php @@ -5,6 +5,9 @@ namespace Illuminate\Support; use Countable; use Illuminate\Contracts\Support\MessageBag as MessageBagContract; +/** + * @mixin \Illuminate\Contracts\Support\MessageBag + */ class ViewErrorBag implements Countable { /** @@ -114,4 +117,14 @@ class ViewErrorBag implements Countable { $this->put($key, $value); } + + /** + * Convert the default bag to its string representation. + * + * @return string + */ + public function __toString() + { + return (string) $this->getBag('default'); + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/composer.json b/wp-content/themes/physioassist/vendor/illuminate/support/composer.json index 56d92d42..7441582c 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/support/composer.json +++ b/wp-content/themes/physioassist/vendor/illuminate/support/composer.json @@ -14,14 +14,14 @@ } ], "require": { - "php": ">=5.6.4", + "php": "^7.1.3", "ext-mbstring": "*", - "doctrine/inflector": "~1.0", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0" + "doctrine/inflector": "~1.1", + "illuminate/contracts": "5.6.*", + "nesbot/carbon": "^1.24.1" }, - "replace": { - "tightenco/collect": "self.version" + "conflict": { + "tightenco/collect": "<5.5.33" }, "autoload": { "psr-4": { @@ -33,13 +33,13 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." + "illuminate/filesystem": "Required to use the composer class (5.6.*).", + "symfony/process": "Required to use the composer class (~4.0).", + "symfony/var-dumper": "Required to use the dd function (~4.0)." }, "config": { "sort-packages": true diff --git a/wp-content/themes/physioassist/vendor/illuminate/support/helpers.php b/wp-content/themes/physioassist/vendor/illuminate/support/helpers.php index 66d1d9d2..e10e30af 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/support/helpers.php +++ b/wp-content/themes/physioassist/vendor/illuminate/support/helpers.php @@ -2,6 +2,7 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; +use Illuminate\Support\Optional; use Illuminate\Support\Collection; use Illuminate\Support\Debug\Dumper; use Illuminate\Contracts\Support\Htmlable; @@ -87,7 +88,7 @@ if (! function_exists('array_dot')) { if (! function_exists('array_except')) { /** - * Get all of the given array except for a specified array of items. + * Get all of the given array except for a specified array of keys. * * @param array $array * @param array|string $keys @@ -245,6 +246,20 @@ if (! function_exists('array_pull')) { } } +if (! function_exists('array_random')) { + /** + * Get a random value from an array. + * + * @param array $array + * @param int|null $num + * @return mixed + */ + function array_random($array, $num = null) + { + return Arr::random($array, $num); + } +} + if (! function_exists('array_set')) { /** * Set an array item to a given value using "dot" notation. @@ -267,10 +282,10 @@ if (! function_exists('array_sort')) { * Sort the array by the given callback or attribute name. * * @param array $array - * @param callable|string $callback + * @param callable|string|null $callback * @return array */ - function array_sort($array, $callback) + function array_sort($array, $callback = null) { return Arr::sort($array, $callback); } @@ -316,6 +331,35 @@ if (! function_exists('array_wrap')) { } } +if (! function_exists('blank')) { + /** + * Determine if the given value is "blank". + * + * @param mixed $value + * @return bool + */ + function blank($value) + { + if (is_null($value)) { + return true; + } + + if (is_string($value)) { + return trim($value) === ''; + } + + if (is_numeric($value) || is_bool($value)) { + return false; + } + + if ($value instanceof Countable) { + return count($value) === 0; + } + + return empty($value); + } +} + if (! function_exists('camel_case')) { /** * Convert a value to camel case. @@ -359,7 +403,7 @@ if (! function_exists('class_uses_recursive')) { $results = []; - foreach (array_merge([$class => $class], class_parents($class)) as $class) { + foreach (array_reverse(class_parents($class)) + [$class => $class] as $class) { $results += trait_uses_recursive($class); } @@ -504,7 +548,7 @@ if (! function_exists('dd')) { /** * Dump the passed variables and end the script. * - * @param mixed + * @param mixed $args * @return void */ function dd(...$args) @@ -522,15 +566,16 @@ if (! function_exists('e')) { * Escape HTML special characters in a string. * * @param \Illuminate\Contracts\Support\Htmlable|string $value + * @param bool $doubleEncode * @return string */ - function e($value) + function e($value, $doubleEncode = true) { if ($value instanceof Htmlable) { return $value->toHtml(); } - return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); + return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', $doubleEncode); } } @@ -579,7 +624,7 @@ if (! function_exists('env')) { return; } - if (strlen($value) > 1 && Str::startsWith($value, '"') && Str::endsWith($value, '"')) { + if (($valueLength = strlen($value)) > 1 && $value[0] === '"' && $value[$valueLength - 1] === '"') { return substr($value, 1, -1); } @@ -587,6 +632,19 @@ if (! function_exists('env')) { } } +if (! function_exists('filled')) { + /** + * Determine if a value is "filled". + * + * @param mixed $value + * @return bool + */ + function filled($value) + { + return ! blank($value); + } +} + if (! function_exists('head')) { /** * Get the first element of an array. Useful for method chaining. @@ -653,6 +711,24 @@ if (! function_exists('object_get')) { } } +if (! function_exists('optional')) { + /** + * Provide access to optional objects. + * + * @param mixed $value + * @param callable|null $callback + * @return mixed + */ + function optional($value = null, callable $callback = null) + { + if (is_null($callback)) { + return new Optional($value); + } elseif (! is_null($value)) { + return $callback($value); + } + } +} + if (! function_exists('preg_replace_array')) { /** * Replace a given pattern with each value in the array in sequentially. @@ -748,6 +824,20 @@ if (! function_exists('str_after')) { } } +if (! function_exists('str_before')) { + /** + * Get the portion of a string before a given value. + * + * @param string $subject + * @param string $search + * @return string + */ + function str_before($subject, $search) + { + return Str::before($subject, $search); + } +} + if (! function_exists('str_contains')) { /** * Determine if a given string contains a given substring. @@ -780,7 +870,7 @@ if (! function_exists('str_is')) { /** * Determine if a given string matches a given pattern. * - * @param string $pattern + * @param string|array $pattern * @param string $value * @return bool */ @@ -898,11 +988,26 @@ if (! function_exists('str_slug')) { * * @param string $title * @param string $separator + * @param string $language + * @return string + */ + function str_slug($title, $separator = '-', $language = 'en') + { + return Str::slug($title, $separator, $language); + } +} + +if (! function_exists('str_start')) { + /** + * Begin a string with a single instance of a given value. + * + * @param string $value + * @param string $prefix * @return string */ - function str_slug($title, $separator = '-') + function str_start($value, $prefix) { - return Str::slug($title, $separator); + return Str::start($value, $prefix); } } @@ -939,6 +1044,46 @@ if (! function_exists('tap')) { } } +if (! function_exists('throw_if')) { + /** + * Throw the given exception if the given condition is true. + * + * @param mixed $condition + * @param \Throwable|string $exception + * @param array ...$parameters + * @return mixed + * @throws \Throwable + */ + function throw_if($condition, $exception, ...$parameters) + { + if ($condition) { + throw (is_string($exception) ? new $exception(...$parameters) : $exception); + } + + return $condition; + } +} + +if (! function_exists('throw_unless')) { + /** + * Throw the given exception unless the given condition is true. + * + * @param mixed $condition + * @param \Throwable|string $exception + * @param array ...$parameters + * @return mixed + * @throws \Throwable + */ + function throw_unless($condition, $exception, ...$parameters) + { + if (! $condition) { + throw (is_string($exception) ? new $exception(...$parameters) : $exception); + } + + return $condition; + } +} + if (! function_exists('title_case')) { /** * Convert a value to title case. @@ -971,6 +1116,29 @@ if (! function_exists('trait_uses_recursive')) { } } +if (! function_exists('transform')) { + /** + * Transform the given value if it is present. + * + * @param mixed $value + * @param callable $callback + * @param mixed $default + * @return mixed|null + */ + function transform($value, callable $callback, $default = null) + { + if (filled($value)) { + return $callback($value); + } + + if (is_callable($default)) { + return $default($value); + } + + return $default; + } +} + if (! function_exists('value')) { /** * Return the default value of the given value. @@ -998,13 +1166,14 @@ if (! function_exists('windows_os')) { if (! function_exists('with')) { /** - * Return the given object. Useful for chaining. + * Return the given value, optionally passed through the given callback. * - * @param mixed $object + * @param mixed $value + * @param callable|null $callback * @return mixed */ - function with($object) + function with($value, callable $callback = null) { - return $object; + return is_null($callback) ? $value : $callback($value); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/BladeCompiler.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/BladeCompiler.php index e11731e8..f53bf1fc 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/BladeCompiler.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/BladeCompiler.php @@ -12,8 +12,10 @@ class BladeCompiler extends Compiler implements CompilerInterface Concerns\CompilesComponents, Concerns\CompilesConditionals, Concerns\CompilesEchos, + Concerns\CompilesHelpers, Concerns\CompilesIncludes, Concerns\CompilesInjections, + Concerns\CompilesJson, Concerns\CompilesLayouts, Concerns\CompilesLoops, Concerns\CompilesRawPhp, @@ -30,12 +32,17 @@ class BladeCompiler extends Compiler implements CompilerInterface /** * All custom "directive" handlers. * - * This was implemented as a more usable "extend" in 5.1. - * * @var array */ protected $customDirectives = []; + /** + * All custom "condition" handlers. + * + * @var array + */ + protected $conditions = []; + /** * The file currently being compiled. * @@ -91,18 +98,11 @@ class BladeCompiler extends Compiler implements CompilerInterface protected $footer = []; /** - * Placeholder to temporary mark the position of verbatim blocks. - * - * @var string - */ - protected $verbatimPlaceholder = '@__verbatim__@'; - - /** - * Array to temporary store the verbatim blocks found in the template. + * Array to temporary store the raw blocks found in the template. * * @var array */ - protected $verbatimBlocks = []; + protected $rawBlocks = []; /** * Compile the view at the given path. @@ -152,14 +152,18 @@ class BladeCompiler extends Compiler implements CompilerInterface */ public function compileString($value) { - $result = ''; - if (strpos($value, '@verbatim') !== false) { $value = $this->storeVerbatimBlocks($value); } $this->footer = []; + if (strpos($value, '@php') !== false) { + $value = $this->storePhpBlocks($value); + } + + $result = ''; + // Here we will loop through all of the tokens returned by the Zend lexer and // parse each one into the corresponding valid PHP. We will then have this // template as the correctly rendered PHP that can be rendered natively. @@ -167,8 +171,8 @@ class BladeCompiler extends Compiler implements CompilerInterface $result .= is_array($token) ? $this->parseToken($token) : $token; } - if (! empty($this->verbatimBlocks)) { - $result = $this->restoreVerbatimBlocks($result); + if (! empty($this->rawBlocks)) { + $result = $this->restoreRawContent($result); } // If there are any footer lines that need to get added to a template we will @@ -190,29 +194,64 @@ class BladeCompiler extends Compiler implements CompilerInterface protected function storeVerbatimBlocks($value) { return preg_replace_callback('/(?verbatimBlocks[] = $matches[1]; + return $this->storeRawBlock($matches[1]); + }, $value); + } - return $this->verbatimPlaceholder; + /** + * Store the PHP blocks and replace them with a temporary placeholder. + * + * @param string $value + * @return string + */ + protected function storePhpBlocks($value) + { + return preg_replace_callback('/(?storeRawBlock(""); }, $value); } + /** + * Store a raw block and return a unique raw placeholder. + * + * @param string $value + * @return string + */ + protected function storeRawBlock($value) + { + return $this->getRawPlaceholder( + array_push($this->rawBlocks, $value) - 1 + ); + } + /** * Replace the raw placeholders with the original code stored in the raw blocks. * * @param string $result * @return string */ - protected function restoreVerbatimBlocks($result) + protected function restoreRawContent($result) { - $result = preg_replace_callback('/'.preg_quote($this->verbatimPlaceholder).'/', function () { - return array_shift($this->verbatimBlocks); + $result = preg_replace_callback('/'.$this->getRawPlaceholder('(\d+)').'/', function ($matches) { + return $this->rawBlocks[$matches[1]]; }, $result); - $this->verbatimBlocks = []; + $this->rawBlocks = []; return $result; } + /** + * Get a placeholder to temporary mark the position of raw blocks. + * + * @param int|string $replace + * @return string + */ + protected function getRawPlaceholder($replace) + { + return str_replace('#', $replace, '@__raw_block_#__@'); + } + /** * Add the stored footers onto the given content. * @@ -345,6 +384,86 @@ class BladeCompiler extends Compiler implements CompilerInterface return $this->extensions; } + /** + * Register an "if" statement directive. + * + * @param string $name + * @param callable $callback + * @return void + */ + public function if($name, callable $callback) + { + $this->conditions[$name] = $callback; + + $this->directive($name, function ($expression) use ($name) { + return $expression + ? "" + : ""; + }); + + $this->directive('else'.$name, function ($expression) use ($name) { + return $expression + ? "" + : ""; + }); + + $this->directive('end'.$name, function () { + return ''; + }); + } + + /** + * Check the result of a condition. + * + * @param string $name + * @param array $parameters + * @return bool + */ + public function check($name, ...$parameters) + { + return call_user_func($this->conditions[$name], ...$parameters); + } + + /** + * Register a component alias directive. + * + * @param string $path + * @param string $alias + * @return void + */ + public function component($path, $alias = null) + { + $alias = $alias ?: array_last(explode('.', $path)); + + $this->directive($alias, function ($expression) use ($path) { + return $expression + ? "startComponent('{$path}', {$expression}); ?>" + : "startComponent('{$path}'); ?>"; + }); + + $this->directive('end'.$alias, function ($expression) { + return 'renderComponent(); ?>'; + }); + } + + /** + * Register an include alias directive. + * + * @param string $path + * @param string $alias + * @return void + */ + public function include($path, $alias = null) + { + $alias = $alias ?: array_last(explode('.', $path)); + + $this->directive($alias, function ($expression) use ($path) { + $expression = $this->stripParentheses($expression) ?: '[]'; + + return "make('{$path}', {$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + }); + } + /** * Register a handler for custom directives. * @@ -377,4 +496,24 @@ class BladeCompiler extends Compiler implements CompilerInterface { $this->echoFormat = $format; } + + /** + * Set the "echo" format to double encode entities. + * + * @return void + */ + public function withDoubleEncoding() + { + $this->setEchoFormat('e(%s, true)'); + } + + /** + * Set the "echo" format to not double encode entities. + * + * @return void + */ + public function withoutDoubleEncoding() + { + $this->setEchoFormat('e(%s, false)'); + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php index 22977a0a..d592ef17 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesConditionals.php @@ -4,6 +4,85 @@ namespace Illuminate\View\Compilers\Concerns; trait CompilesConditionals { + /** + * Identifier for the first case in switch statement. + * + * @var bool + */ + protected $firstCaseInSwitch = true; + + /** + * Compile the if-auth statements into valid PHP. + * + * @param string|null $guard + * @return string + */ + protected function compileAuth($guard = null) + { + $guard = is_null($guard) ? '()' : $guard; + + return "guard{$guard}->check()): ?>"; + } + + /** + * Compile the else-auth statements into valid PHP. + * + * @param string|null $guard + * @return string + */ + protected function compileElseAuth($guard = null) + { + $guard = is_null($guard) ? '()' : $guard; + + return "guard{$guard}->check()): ?>"; + } + + /** + * Compile the end-auth statements into valid PHP. + * + * @return string + */ + protected function compileEndAuth() + { + return ''; + } + + /** + * Compile the if-guest statements into valid PHP. + * + * @param string|null $guard + * @return string + */ + protected function compileGuest($guard = null) + { + $guard = is_null($guard) ? '()' : $guard; + + return "guard{$guard}->guest()): ?>"; + } + + /** + * Compile the else-guest statements into valid PHP. + * + * @param string|null $guard + * @return string + */ + protected function compileElseGuest($guard = null) + { + $guard = is_null($guard) ? '()' : $guard; + + return "guard{$guard}->guest()): ?>"; + } + + /** + * Compile the end-guest statements into valid PHP. + * + * @return string + */ + protected function compileEndGuest() + { + return ''; + } + /** * Compile the has-section statements into valid PHP. * @@ -98,4 +177,54 @@ trait CompilesConditionals { return ''; } + + /** + * Compile the switch statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileSwitch($expression) + { + $this->firstCaseInSwitch = true; + + return "firstCaseInSwitch) { + $this->firstCaseInSwitch = false; + + return "case {$expression}: ?>"; + } + + return ""; + } + + /** + * Compile the default statements in switch case into valid PHP. + * + * @return string + */ + protected function compileDefault() + { + return ''; + } + + /** + * Compile the end switch statements into valid PHP. + * + * @return string + */ + protected function compileEndSwitch() + { + return ''; + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php index a7b48871..018f90b8 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesEchos.php @@ -100,6 +100,6 @@ trait CompilesEchos */ public function compileEchoDefaults($value) { - return preg_replace('/^(?=\$)(.+?)(?:\s+or\s+)(.+?)$/s', 'isset($1) ? $1 : $2', $value); + return preg_replace('/^(?=\$)(.+?)(?:\s+or\s+)(.+?)$/si', 'isset($1) ? $1 : $2', $value); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesHelpers.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesHelpers.php new file mode 100644 index 00000000..979cadc5 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesHelpers.php @@ -0,0 +1,49 @@ +'; + } + + /** + * Compile the "dd" statements into valid PHP. + * + * @param string $arguments + * @return string + */ + protected function compileDd($arguments) + { + return ""; + } + + /** + * Compile the "dump" statements into valid PHP. + * + * @param string $arguments + * @return string + */ + protected function compileDump($arguments) + { + return ""; + } + + /** + * Compile the method statements into valid PHP. + * + * @param string $method + * @return string + */ + protected function compileMethod($method) + { + return ""; + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesIncludes.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesIncludes.php index 595f70cd..417d4ef6 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesIncludes.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesIncludes.php @@ -44,7 +44,7 @@ trait CompilesIncludes /** * Compile the include-when statements into valid PHP. * - * @param string $expression + * @param string $expression * @return string */ protected function compileIncludeWhen($expression) @@ -53,4 +53,17 @@ trait CompilesIncludes return "renderWhen($expression, array_except(get_defined_vars(), array('__data', '__path'))); ?>"; } + + /** + * Compile the include-first statements into valid PHP. + * + * @param string $expression + * @return string + */ + protected function compileIncludeFirst($expression) + { + $expression = $this->stripParentheses($expression); + + return "first({$expression}, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>"; + } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesJson.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesJson.php new file mode 100644 index 00000000..cf343e97 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesJson.php @@ -0,0 +1,30 @@ +stripParentheses($expression)); + + $options = isset($parts[1]) ? trim($parts[1]) : $this->encodingOptions; + + $depth = isset($parts[2]) ? trim($parts[2]) : 512; + + return ""; + } +} diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesRawPhp.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesRawPhp.php index b49a386e..41c7edfd 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesRawPhp.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesRawPhp.php @@ -12,17 +12,11 @@ trait CompilesRawPhp */ protected function compilePhp($expression) { - return $expression ? "" : '"; + } - /** - * Compile end-php statements into valid PHP. - * - * @return string - */ - protected function compileEndphp() - { - return ' ?>'; + return '@php'; } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesTranslations.php b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesTranslations.php index 37c61e86..feb7e651 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesTranslations.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Compilers/Concerns/CompilesTranslations.php @@ -16,9 +16,9 @@ trait CompilesTranslations return 'startTranslation(); ?>'; } elseif ($expression[1] === '[') { return "startTranslation{$expression}; ?>"; - } else { - return "getFromJson{$expression}; ?>"; } + + return "getFromJson{$expression}; ?>"; } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesEvents.php b/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesEvents.php index 427609e7..f3d7717c 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesEvents.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesEvents.php @@ -176,7 +176,7 @@ trait ManagesEvents */ public function callComposer(ViewContract $view) { - $this->events->fire('composing: '.$view->name(), [$view]); + $this->events->dispatch('composing: '.$view->name(), [$view]); } /** @@ -187,6 +187,6 @@ trait ManagesEvents */ public function callCreator(ViewContract $view) { - $this->events->fire('creating: '.$view->name(), [$view]); + $this->events->dispatch('creating: '.$view->name(), [$view]); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLayouts.php b/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLayouts.php index 1224ee82..6f492d19 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLayouts.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLayouts.php @@ -3,6 +3,7 @@ namespace Illuminate\View\Concerns; use InvalidArgumentException; +use Illuminate\Contracts\View\View; trait ManagesLayouts { @@ -23,7 +24,7 @@ trait ManagesLayouts /** * The parent placeholder for the request. * - * @var string + * @var mixed */ protected static $parentPlaceholder = []; @@ -41,7 +42,7 @@ trait ManagesLayouts $this->sectionStack[] = $section; } } else { - $this->extendSection($section, e($content)); + $this->extendSection($section, $content instanceof View ? $content : e($content)); } } @@ -54,7 +55,7 @@ trait ManagesLayouts */ public function inject($section, $content) { - return $this->startSection($section, $content); + $this->startSection($section, $content); } /** @@ -143,7 +144,7 @@ trait ManagesLayouts */ public function yieldContent($section, $default = '') { - $sectionContent = $default; + $sectionContent = $default instanceof View ? $default : e($default); if (isset($this->sections[$section])) { $sectionContent = $this->sections[$section]; @@ -191,7 +192,7 @@ trait ManagesLayouts */ public function getSection($name, $default = null) { - return isset($this->getSections()[$name]) ? $this->getSections()[$name] : $default; + return $this->getSections()[$name] ?? $default; } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLoops.php b/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLoops.php index 305a1ccf..5f50b247 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLoops.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Concerns/ManagesLoops.php @@ -29,7 +29,7 @@ trait ManagesLoops $this->loopsStack[] = [ 'iteration' => 0, 'index' => 0, - 'remaining' => isset($length) ? $length : null, + 'remaining' => $length ?? null, 'count' => $length, 'first' => true, 'last' => isset($length) ? $length == 1 : null, diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Engines/EngineResolver.php b/wp-content/themes/physioassist/vendor/illuminate/view/Engines/EngineResolver.php index 3a9f2e19..436ac8b0 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Engines/EngineResolver.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Engines/EngineResolver.php @@ -38,10 +38,10 @@ class EngineResolver } /** - * Resolver an engine instance by name. + * Resolve an engine instance by name. * * @param string $engine - * @return \Illuminate\View\Engines\EngineInterface + * @return \Illuminate\Contracts\View\Engine * @throws \InvalidArgumentException */ public function resolve($engine) @@ -54,6 +54,6 @@ class EngineResolver return $this->resolved[$engine] = call_user_func($this->resolvers[$engine]); } - throw new InvalidArgumentException("Engine $engine not found."); + throw new InvalidArgumentException("Engine [{$engine}] not found."); } } diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Engines/FileEngine.php b/wp-content/themes/physioassist/vendor/illuminate/view/Engines/FileEngine.php index e9ec85d8..360b5438 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Engines/FileEngine.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Engines/FileEngine.php @@ -2,7 +2,9 @@ namespace Illuminate\View\Engines; -class FileEngine implements EngineInterface +use Illuminate\Contracts\View\Engine; + +class FileEngine implements Engine { /** * Get the evaluated contents of the view. diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Engines/PhpEngine.php b/wp-content/themes/physioassist/vendor/illuminate/view/Engines/PhpEngine.php index 1b2a3837..4209e58b 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Engines/PhpEngine.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Engines/PhpEngine.php @@ -4,9 +4,10 @@ namespace Illuminate\View\Engines; use Exception; use Throwable; +use Illuminate\Contracts\View\Engine; use Symfony\Component\Debug\Exception\FatalThrowableError; -class PhpEngine implements EngineInterface +class PhpEngine implements Engine { /** * Get the evaluated contents of the view. diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/Factory.php b/wp-content/themes/physioassist/vendor/illuminate/view/Factory.php index 238e0c67..42072cfd 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/view/Factory.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/Factory.php @@ -138,6 +138,27 @@ class Factory implements FactoryContract }); } + /** + * Get the first view that actually exists from the given list. + * + * @param array $views + * @param array $data + * @param array $mergeData + * @return \Illuminate\Contracts\View\View + */ + public function first(array $views, $data = [], $mergeData = []) + { + $view = collect($views)->first(function ($view) { + return $this->exists($view); + }); + + if (! $view) { + throw new InvalidArgumentException('None of the views in the given array exist.'); + } + + return $this->make($view, $data, $mergeData); + } + /** * Get the rendered content of the view based on a given condition. * @@ -248,14 +269,14 @@ class Factory implements FactoryContract * Get the appropriate view engine for the given path. * * @param string $path - * @return \Illuminate\View\Engines\EngineInterface + * @return \Illuminate\Contracts\View\Engine * * @throws \InvalidArgumentException */ public function getEngineFromPath($path) { if (! $extension = $this->getExtension($path)) { - throw new InvalidArgumentException("Unrecognized extension in file: $path"); + throw new InvalidArgumentException("Unrecognized extension in file: {$path}"); } $engine = $this->extensions[$extension]; diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/FileViewFinder.php b/wp-content/themes/physioassist/vendor/illuminate/view/FileViewFinder.php index cf6bb8ef..38de0cc2 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/view/FileViewFinder.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/FileViewFinder.php @@ -105,7 +105,7 @@ class FileViewFinder implements ViewFinderInterface $segments = explode(static::HINT_PATH_DELIMITER, $name); if (count($segments) != 2) { - throw new InvalidArgumentException("View [$name] has an invalid name."); + throw new InvalidArgumentException("View [{$name}] has an invalid name."); } if (! isset($this->hints[$segments[0]])) { @@ -134,7 +134,7 @@ class FileViewFinder implements ViewFinderInterface } } - throw new InvalidArgumentException("View [$name] not found."); + throw new InvalidArgumentException("View [{$name}] not found."); } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/View.php b/wp-content/themes/physioassist/vendor/illuminate/view/View.php index a4390063..629b71a1 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/view/View.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/View.php @@ -8,14 +8,19 @@ use ArrayAccess; use BadMethodCallException; use Illuminate\Support\Str; use Illuminate\Support\MessageBag; +use Illuminate\Contracts\View\Engine; +use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Support\Renderable; -use Illuminate\View\Engines\EngineInterface; use Illuminate\Contracts\Support\MessageProvider; use Illuminate\Contracts\View\View as ViewContract; class View implements ArrayAccess, ViewContract { + use Macroable { + __call as macroCall; + } + /** * The view factory instance. * @@ -26,7 +31,7 @@ class View implements ArrayAccess, ViewContract /** * The engine implementation. * - * @var \Illuminate\View\Engines\EngineInterface + * @var \Illuminate\Contracts\View\Engine */ protected $engine; @@ -55,13 +60,13 @@ class View implements ArrayAccess, ViewContract * Create a new view instance. * * @param \Illuminate\View\Factory $factory - * @param \Illuminate\View\Engines\EngineInterface $engine + * @param \Illuminate\Contracts\View\Engine $engine * @param string $view * @param string $path * @param mixed $data * @return void */ - public function __construct(Factory $factory, EngineInterface $engine, $view, $path, $data = []) + public function __construct(Factory $factory, Engine $engine, $view, $path, $data = []) { $this->view = $view; $this->path = $path; @@ -158,7 +163,7 @@ class View implements ArrayAccess, ViewContract /** * Get the sections of the rendered view. * - * @return array + * @return string */ public function renderSections() { @@ -287,7 +292,7 @@ class View implements ArrayAccess, ViewContract /** * Get the view's rendering engine. * - * @return \Illuminate\View\Engines\EngineInterface + * @return \Illuminate\Contracts\View\Engine */ public function getEngine() { @@ -395,11 +400,17 @@ class View implements ArrayAccess, ViewContract */ public function __call($method, $parameters) { + if (static::hasMacro($method)) { + return $this->macroCall($method, $parameters); + } + if (! Str::startsWith($method, 'with')) { - throw new BadMethodCallException("Method [$method] does not exist on view."); + throw new BadMethodCallException(sprintf( + 'Method %s::%s does not exist.', static::class, $method + )); } - return $this->with(Str::snake(substr($method, 4)), $parameters[0]); + return $this->with(Str::camel(substr($method, 4)), $parameters[0]); } /** diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/ViewServiceProvider.php b/wp-content/themes/physioassist/vendor/illuminate/view/ViewServiceProvider.php index 660f97a2..fa88136a 100755 --- a/wp-content/themes/physioassist/vendor/illuminate/view/ViewServiceProvider.php +++ b/wp-content/themes/physioassist/vendor/illuminate/view/ViewServiceProvider.php @@ -40,19 +40,32 @@ class ViewServiceProvider extends ServiceProvider $finder = $app['view.finder']; - $env = new Factory($resolver, $finder, $app['events']); + $factory = $this->createFactory($resolver, $finder, $app['events']); // We will also set the container instance on this view environment since the // view composers may be classes registered in the container, which allows // for great testable, flexible composers for the application developer. - $env->setContainer($app); + $factory->setContainer($app); - $env->share('app', $app); + $factory->share('app', $app); - return $env; + return $factory; }); } + /** + * Create a new Factory Instance. + * + * @param \Illuminate\View\Engines\EngineResolver $resolver + * @param \Illuminate\View\ViewFinderInterface $finder + * @param \Illuminate\Contracts\Events\Dispatcher $events + * @return \Illuminate\View\Factory + */ + protected function createFactory($resolver, $finder, $events) + { + return new Factory($resolver, $finder, $events); + } + /** * Register the view finder implementation. * diff --git a/wp-content/themes/physioassist/vendor/illuminate/view/composer.json b/wp-content/themes/physioassist/vendor/illuminate/view/composer.json index 8450fcdb..c82d2e0e 100644 --- a/wp-content/themes/physioassist/vendor/illuminate/view/composer.json +++ b/wp-content/themes/physioassist/vendor/illuminate/view/composer.json @@ -14,13 +14,13 @@ } ], "require": { - "php": ">=5.6.4", - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/events": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "symfony/debug": "~3.2" + "php": "^7.1.3", + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/events": "5.6.*", + "illuminate/filesystem": "5.6.*", + "illuminate/support": "5.6.*", + "symfony/debug": "~4.0" }, "autoload": { "psr-4": { @@ -29,7 +29,7 @@ }, "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "config": { diff --git a/wp-content/themes/physioassist/vendor/log1x/blade-svg-sage/src/helpers.php b/wp-content/themes/physioassist/vendor/log1x/blade-svg-sage/src/helpers.php index 31ff544f..9a685d8f 100644 --- a/wp-content/themes/physioassist/vendor/log1x/blade-svg-sage/src/helpers.php +++ b/wp-content/themes/physioassist/vendor/log1x/blade-svg-sage/src/helpers.php @@ -71,7 +71,7 @@ function get_icon_sage_path($icon) $icon_path_rel = RelPath::getRelativePath($icon_path_abs, get_svg_path()); // 6. Final icon path without extension expected - $icon_imgpath_noext = pathinfo($icon_path_rel, PATHINFO_FILENAME); + $icon_imgpath_noext = substr($icon_path_rel, 0, strrpos($icon_path_rel, '.')); return $icon_imgpath_noext; } diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/.php_cs.dist b/wp-content/themes/physioassist/vendor/nesbot/carbon/.php_cs.dist index ff8b56f0..f731e3ad 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/.php_cs.dist +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/.php_cs.dist @@ -3,20 +3,20 @@ use PhpCsFixer\Config; use PhpCsFixer\Finder; -$rules = [ +$rules = array( '@PSR2' => true, - 'array_syntax' => [ + 'array_syntax' => array( 'syntax' => 'long', - ], - 'binary_operator_spaces' => [ + ), + 'binary_operator_spaces' => array( 'align_double_arrow' => false, 'align_equals' => false, - ], + ), 'blank_line_before_return' => true, 'cast_spaces' => true, - 'concat_space' => [ + 'concat_space' => array( 'spacing' => 'none', - ], + ), 'ereg_to_preg' => true, 'method_separation' => true, 'no_blank_lines_after_phpdoc' => true, @@ -30,9 +30,9 @@ $rules = [ 'phpdoc_indent' => true, 'phpdoc_inline_tag' => true, 'phpdoc_no_access' => true, - 'phpdoc_no_alias_tag' => [ + 'phpdoc_no_alias_tag' => array( 'type' => 'var', - ], + ), 'phpdoc_no_package' => true, 'phpdoc_order' => true, 'phpdoc_scalar' => true, @@ -49,9 +49,12 @@ $rules = [ 'trailing_comma_in_multiline_array' => true, 'trim_array_spaces' => true, 'unary_operator_spaces' => true, -]; + 'line_ending' => true, + 'blank_line_after_namespace' => true, + 'no_unused_imports' => true, +); return Config::create()->setRules($rules) ->setFinder(Finder::create()->in(__DIR__)) ->setUsingCache(true) - ->setRiskyAllowed(true); \ No newline at end of file + ->setRiskyAllowed(true); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/build.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/build.php new file mode 100644 index 00000000..3cb0b5be --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/build.php @@ -0,0 +1,87 @@ +open($archive, ZipArchive::CREATE | ZipArchive::OVERWRITE); + + foreach (array('src', 'vendor', 'Carbon') as $directory) { + if (is_dir($directory)) { + $directory = realpath($directory); + $base = dirname($directory); + + $files = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($directory), + RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($files as $name => $file) { + if (!$file->isDir()) { + $filePath = $file->getRealPath(); + + $zip->addFile($filePath, substr($filePath, strlen($base) + 1)); + } + } + } + } + + $autoload = 'autoload.php'; + file_put_contents($autoload, "addFile($autoload, $autoload); + $zip->close(); + unlink($autoload); + + shell_exec('git checkout .'); + shell_exec("git checkout $currentBranch"); + shell_exec("git branch -d $branch"); + shell_exec('git stash pop'); + shell_exec('composer update --no-interaction'); +} + +exit(0); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/composer.json b/wp-content/themes/physioassist/vendor/nesbot/carbon/composer.json index 63d576d1..3ce2fbd5 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/composer.json +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/composer.json @@ -21,16 +21,16 @@ } ], "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6 || ~3.0" + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~4.0 || ~5.0" + "phpunit/phpunit": "^4.8.35 || ^5.7" }, "autoload": { "psr-4": { - "Carbon\\": "src/Carbon/" + "": "src/" } }, "autoload-dev": { @@ -38,17 +38,16 @@ "Tests\\": "tests/" } }, - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, "config": { "sort-packages": true }, "scripts": { - "test": "./vendor/bin/phpunit; ./vendor/bin/php-cs-fixer fix -v --diff --dry-run;", - "phpunit": "./vendor/bin/phpunit;", - "phpcs": "./vendor/bin/php-cs-fixer fix -v --diff --dry-run;" + "test": [ + "@phpunit", + "@phpcs" + ], + "phpunit": "phpunit --verbose --coverage-clover=coverage.xml", + "phpcs": "php-cs-fixer fix -v --diff --dry-run", + "phpstan": "phpstan analyse --configuration phpstan.neon --level 3 src tests" } } diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/readme.md b/wp-content/themes/physioassist/vendor/nesbot/carbon/readme.md index 57836c3a..5e9d1ccb 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/readme.md +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/readme.md @@ -6,6 +6,7 @@ [![StyleCI](https://styleci.io/repos/5724990/shield?style=flat)](https://styleci.io/repos/5724990) [![codecov.io](https://codecov.io/github/briannesbitt/Carbon/coverage.svg?branch=master)](https://codecov.io/github/briannesbitt/Carbon?branch=master) [![PHP-Eye](https://php-eye.com/badge/nesbot/carbon/tested.svg?style=flat)](https://php-eye.com/package/nesbot/carbon) +[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan) A simple PHP API extension for DateTime. [http://carbon.nesbot.com](http://carbon.nesbot.com) @@ -16,7 +17,7 @@ printf("Right now is %s", Carbon::now()->toDateTimeString()); printf("Right now in Vancouver is %s", Carbon::now('America/Vancouver')); //implicit __toString() $tomorrow = Carbon::now()->addDay(); $lastWeek = Carbon::now()->subWeek(); -$nextSummerOlympics = Carbon::createFromDate(2012)->addYears(4); +$nextSummerOlympics = Carbon::createFromDate(2016)->addYears(4); $officialDate = Carbon::now()->toRfc2822String(); @@ -24,13 +25,13 @@ $howOldAmI = Carbon::createFromDate(1975, 5, 21)->age; $noonTodayLondonTime = Carbon::createFromTime(12, 0, 0, 'Europe/London'); -$worldWillEnd = Carbon::createFromDate(2012, 12, 21, 'GMT'); +$internetWillBlowUpOn = Carbon::create(2038, 01, 19, 3, 14, 7, 'GMT'); -// Don't really want to die so mock now +// Don't really want this to happen so mock now Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1)); // comparisons are always done in UTC -if (Carbon::now()->gte($worldWillEnd)) { +if (Carbon::now()->gte($internetWillBlowUpOn)) { die(); } @@ -74,6 +75,7 @@ printf("Now: %s", Carbon::now()); ``` + ### Without Composer Why are you not using [composer](http://getcomposer.org/)? Download [Carbon.php](https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Carbon.php) from the repo and save the file into your project path somewhere. @@ -89,4 +91,4 @@ printf("Now: %s", Carbon::now()); ## Docs -[http://carbon.nesbot.com/docs](http://carbon.nesbot.com/docs) \ No newline at end of file +[http://carbon.nesbot.com/docs](http://carbon.nesbot.com/docs) diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Carbon.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Carbon.php index d537e0b0..36928acb 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Carbon.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Carbon.php @@ -15,10 +15,10 @@ use Carbon\Exceptions\InvalidDateException; use Closure; use DatePeriod; use DateTime; +use DateTimeInterface; use DateTimeZone; use InvalidArgumentException; -use Symfony\Component\Translation\Loader\ArrayLoader; -use Symfony\Component\Translation\Translator; +use JsonSerializable; use Symfony\Component\Translation\TranslatorInterface; /** @@ -36,8 +36,10 @@ use Symfony\Component\Translation\TranslatorInterface; * @property \DateTimeZone $tz alias of timezone * @property-read int $micro * @property-read int $dayOfWeek 0 (for Sunday) through 6 (for Saturday) + * @property-read int $dayOfWeekIso 1 (for Monday) through 7 (for Sunday) * @property-read int $dayOfYear 0 through 365 * @property-read int $weekOfMonth 1 through 5 + * @property-read int $weekNumberInMonth 1 through 5 * @property-read int $weekOfYear ISO-8601 week number of year, weeks starting on Monday * @property-read int $daysInMonth number of days in the given month * @property-read int $age does a diffInYears() with default parameters @@ -50,8 +52,13 @@ use Symfony\Component\Translation\TranslatorInterface; * @property-read string $timezoneName * @property-read string $tzName */ -class Carbon extends DateTime +class Carbon extends DateTime implements JsonSerializable { + const NO_ZERO_DIFF = 01; + const JUST_NOW = 02; + const ONE_DAY_WORDS = 04; + const TWO_DAY_WORDS = 010; + /** * The day constants. */ @@ -78,26 +85,6 @@ class Carbon extends DateTime self::SATURDAY => 'Saturday', ); - /** - * Terms used to detect if a time passed is a relative date. - * - * This is here for testing purposes. - * - * @var array - */ - protected static $relativeKeywords = array( - '+', - '-', - 'ago', - 'first', - 'last', - 'next', - 'this', - 'today', - 'tomorrow', - 'yesterday', - ); - /** * Number of X in Y. */ @@ -111,6 +98,13 @@ class Carbon extends DateTime const MINUTES_PER_HOUR = 60; const SECONDS_PER_MINUTE = 60; + /** + * RFC7231 DateTime format. + * + * @var string + */ + const RFC7231_FORMAT = 'D, d M Y H:i:s \G\M\T'; + /** * Default format to use for __toString method when type juggling occurs. * @@ -118,6 +112,20 @@ class Carbon extends DateTime */ const DEFAULT_TO_STRING_FORMAT = 'Y-m-d H:i:s'; + /** + * Format for converting mocked time, includes microseconds. + * + * @var string + */ + const MOCK_DATETIME_FORMAT = 'Y-m-d H:i:s.u'; + + /** + * Customizable PHP_INT_SIZE override. + * + * @var int + */ + public static $PHPIntSize = PHP_INT_SIZE; + /** * Format to use for __toString method when type juggling occurs. * @@ -149,6 +157,61 @@ class Carbon extends DateTime self::SUNDAY, ); + /** + * Midday/noon hour. + * + * @var int + */ + protected static $midDayAt = 12; + + /** + * Format regex patterns. + * + * @var array + */ + protected static $regexFormats = array( + 'd' => '(3[01]|[12][0-9]|0[1-9])', + 'D' => '([a-zA-Z]{3})', + 'j' => '([123][0-9]|[1-9])', + 'l' => '([a-zA-Z]{2,})', + 'N' => '([1-7])', + 'S' => '([a-zA-Z]{2})', + 'w' => '([0-6])', + 'z' => '(36[0-5]|3[0-5][0-9]|[12][0-9]{2}|[1-9]?[0-9])', + 'W' => '(5[012]|[1-4][0-9]|[1-9])', + 'F' => '([a-zA-Z]{2,})', + 'm' => '(1[012]|0[1-9])', + 'M' => '([a-zA-Z]{3})', + 'n' => '(1[012]|[1-9])', + 't' => '(2[89]|3[01])', + 'L' => '(0|1)', + 'o' => '([1-9][0-9]{0,4})', + 'Y' => '([1-9][0-9]{0,4})', + 'y' => '([0-9]{2})', + 'a' => '(am|pm)', + 'A' => '(AM|PM)', + 'B' => '([0-9]{3})', + 'g' => '(1[012]|[1-9])', + 'G' => '(2[0-3]|1?[0-9])', + 'h' => '(1[012]|0[1-9])', + 'H' => '(2[0-3]|[01][0-9])', + 'i' => '([0-5][0-9])', + 's' => '([0-5][0-9])', + 'u' => '([0-9]{1,6})', + 'v' => '([0-9]{1,3})', + 'e' => '([a-zA-Z]{1,5})|([a-zA-Z]*\/[a-zA-Z]*)', + 'I' => '(0|1)', + 'O' => '([\+\-](1[012]|0[0-9])[0134][05])', + 'P' => '([\+\-](1[012]|0[0-9]):[0134][05])', + 'T' => '([a-zA-Z]{1,5})', + 'Z' => '(-?[1-5]?[0-9]{1,4})', + 'U' => '([0-9]*)', + + // The formats below are combinations of the above formats. + 'c' => '(([1-9][0-9]{0,4})\-(1[012]|0[1-9])\-(3[01]|[12][0-9]|0[1-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])[\+\-](1[012]|0[0-9]):([0134][05]))', // Y-m-dTH:i:sP + 'r' => '(([a-zA-Z]{3}), ([123][0-9]|[1-9]) ([a-zA-Z]{3}) ([1-9][0-9]{0,4}) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9]) [\+\-](1[012]|0[0-9])([0134][05]))', // D, j M Y H:i:s O + ); + /** * A test Carbon instance to be returned when now instances are created. * @@ -170,6 +233,20 @@ class Carbon extends DateTime */ protected static $lastErrors; + /** + * The custom Carbon JSON serializer. + * + * @var callable|null + */ + protected static $serializer; + + /** + * The registered string macros. + * + * @var array + */ + protected static $localMacros = array(); + /** * Will UTF8 encoding be used to print localized date/time ? * @@ -177,13 +254,88 @@ class Carbon extends DateTime */ protected static $utf8 = false; - /* + /** + * Add microseconds to now on PHP < 7.1 and 7.1.3. true by default. + * + * @var bool + */ + protected static $microsecondsFallback = true; + + /** * Indicates if months should be calculated with overflow. * * @var bool */ protected static $monthsOverflow = true; + /** + * Indicates if years should be calculated with overflow. + * + * @var bool + */ + protected static $yearsOverflow = true; + + /** + * Options for diffForHumans(). + * + * @var int + */ + protected static $humanDiffOptions = self::NO_ZERO_DIFF; + + /** + * @param int $humanDiffOptions + */ + public static function setHumanDiffOptions($humanDiffOptions) + { + static::$humanDiffOptions = $humanDiffOptions; + } + + /** + * @param int $humanDiffOption + */ + public static function enableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() | $humanDiffOption; + } + + /** + * @param int $humanDiffOption + */ + public static function disableHumanDiffOption($humanDiffOption) + { + static::$humanDiffOptions = static::getHumanDiffOptions() & ~$humanDiffOption; + } + + /** + * @return int + */ + public static function getHumanDiffOptions() + { + return static::$humanDiffOptions; + } + + /** + * Add microseconds to now on PHP < 7.1 and 7.1.3 if set to true, + * let microseconds to 0 on those PHP versions if false. + * + * @param bool $microsecondsFallback + */ + public static function useMicrosecondsFallback($microsecondsFallback = true) + { + static::$microsecondsFallback = $microsecondsFallback; + } + + /** + * Return true if microseconds fallback on PHP < 7.1 and 7.1.3 is + * enabled. false if disabled. + * + * @return bool + */ + public static function isMicrosecondsFallbackEnabled() + { + return static::$microsecondsFallback; + } + /** * Indicates if months should be calculated with overflow. * @@ -216,6 +368,38 @@ class Carbon extends DateTime return static::$monthsOverflow; } + /** + * Indicates if years should be calculated with overflow. + * + * @param bool $yearsOverflow + * + * @return void + */ + public static function useYearsOverflow($yearsOverflow = true) + { + static::$yearsOverflow = $yearsOverflow; + } + + /** + * Reset the month overflow behavior. + * + * @return void + */ + public static function resetYearsOverflow() + { + static::$yearsOverflow = true; + } + + /** + * Get the month overflow behavior. + * + * @return bool + */ + public static function shouldOverflowYears() + { + return static::$yearsOverflow; + } + /** * Creates a DateTimeZone from a string, DateTimeZone or integer offset. * @@ -272,11 +456,9 @@ class Carbon extends DateTime { // If the class has a test now set and we are trying to create a now() // instance then override as required - if (static::hasTestNow() && (empty($time) || $time === 'now' || static::hasRelativeKeywords($time))) { + $isNow = empty($time) || $time === 'now'; + if (static::hasTestNow() && ($isNow || static::hasRelativeKeywords($time))) { $testInstance = clone static::getTestNow(); - if (static::hasRelativeKeywords($time)) { - $testInstance->modify($time); - } //shift the time according to the given time zone if ($tz !== null && $tz !== static::getTestNow()->getTimezone()) { @@ -285,26 +467,57 @@ class Carbon extends DateTime $tz = $testInstance->getTimezone(); } - $time = $testInstance->toDateTimeString(); + if (static::hasRelativeKeywords($time)) { + $testInstance->modify($time); + } + + $time = $testInstance->format(static::MOCK_DATETIME_FORMAT); } - parent::__construct($time, static::safeCreateDateTimeZone($tz)); + $timezone = static::safeCreateDateTimeZone($tz); + // @codeCoverageIgnoreStart + if ($isNow && !isset($testInstance) && static::isMicrosecondsFallbackEnabled() && ( + version_compare(PHP_VERSION, '7.1.0-dev', '<') + || + version_compare(PHP_VERSION, '7.1.3-dev', '>=') && version_compare(PHP_VERSION, '7.1.4-dev', '<') + ) + ) { + // Get microseconds from microtime() if "now" asked and PHP < 7.1 and PHP 7.1.3 if fallback enabled. + list($microTime, $timeStamp) = explode(' ', microtime()); + $dateTime = new DateTime('now', $timezone); + $dateTime->setTimestamp($timeStamp); // Use the timestamp returned by microtime as now can happen in the next second + $time = $dateTime->format(static::DEFAULT_TO_STRING_FORMAT).substr($microTime, 1, 7); + } + // @codeCoverageIgnoreEnd + + // Work-around for PHP bug https://bugs.php.net/bug.php?id=67127 + if (strpos((string) .1, '.') === false) { + $locale = setlocale(LC_NUMERIC, '0'); + setlocale(LC_NUMERIC, 'C'); + } + parent::__construct($time, $timezone); + if (isset($locale)) { + setlocale(LC_NUMERIC, $locale); + } + static::setLastErrors(parent::getLastErrors()); } /** * Create a Carbon instance from a DateTime one. * - * @param \DateTime $dt + * @param \DateTime|\DateTimeInterface $date * * @return static */ - public static function instance(DateTime $dt) + public static function instance($date) { - if ($dt instanceof static) { - return clone $dt; + if ($date instanceof static) { + return clone $date; } - return new static($dt->format('Y-m-d H:i:s.u'), $dt->getTimezone()); + static::expectDateTime($date); + + return new static($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); } /** @@ -345,7 +558,7 @@ class Carbon extends DateTime */ public static function today($tz = null) { - return static::now($tz)->startOfDay(); + return static::parse('today', $tz); } /** @@ -357,7 +570,7 @@ class Carbon extends DateTime */ public static function tomorrow($tz = null) { - return static::today($tz)->addDay(); + return static::parse('tomorrow', $tz); } /** @@ -369,7 +582,7 @@ class Carbon extends DateTime */ public static function yesterday($tz = null) { - return static::today($tz)->subDay(); + return static::parse('yesterday', $tz); } /** @@ -379,9 +592,9 @@ class Carbon extends DateTime */ public static function maxValue() { - if (PHP_INT_SIZE === 4) { - // 32 bit (and additionally Windows 64 bit) - return static::createFromTimestamp(PHP_INT_MAX); + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(PHP_INT_MAX); // @codeCoverageIgnore } // 64 bit @@ -395,9 +608,9 @@ class Carbon extends DateTime */ public static function minValue() { - if (PHP_INT_SIZE === 4) { - // 32 bit (and additionally Windows 64 bit) - return static::createFromTimestamp(~PHP_INT_MAX); + if (self::$PHPIntSize === 4) { + // 32 bit + return static::createFromTimestamp(~PHP_INT_MAX); // @codeCoverageIgnore } // 64 bit @@ -424,11 +637,13 @@ class Carbon extends DateTime * @param int|null $second * @param \DateTimeZone|string|null $tz * + * @throws \InvalidArgumentException + * * @return static */ public static function create($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) { - $now = static::hasTestNow() ? static::getTestNow()->getTimestamp() : time(); + $now = static::hasTestNow() ? static::getTestNow() : static::now($tz); $defaults = array_combine(array( 'year', @@ -437,7 +652,7 @@ class Carbon extends DateTime 'hour', 'minute', 'second', - ), explode('-', date('Y-n-j-G-i-s', $now))); + ), explode('-', $now->format('Y-n-j-G-i-s'))); $year = $year === null ? $defaults['year'] : $year; $month = $month === null ? $defaults['month'] : $month; @@ -494,7 +709,7 @@ class Carbon extends DateTime * @param int|null $second * @param \DateTimeZone|string|null $tz * - * @throws \Carbon\Exceptions\InvalidDateException + * @throws \Carbon\Exceptions\InvalidDateException|\InvalidArgumentException * * @return static */ @@ -515,13 +730,15 @@ class Carbon extends DateTime } } - $instance = static::create($year, $month, 1, $hour, $minute, $second, $tz); + $instance = static::create($year, $month, $day, $hour, $minute, $second, $tz); - if ($day !== null && $day > $instance->daysInMonth) { - throw new InvalidDateException('day', $day); + foreach (array_reverse($fields) as $field => $range) { + if ($$field !== null && (!is_int($$field) || $$field !== $instance->$field)) { + throw new InvalidDateException($field, $$field); + } } - return $instance->day($day); + return $instance; } /** @@ -532,6 +749,8 @@ class Carbon extends DateTime * @param int|null $day * @param \DateTimeZone|string|null $tz * + * @throws \InvalidArgumentException + * * @return static */ public static function createFromDate($year = null, $month = null, $day = null, $tz = null) @@ -539,6 +758,21 @@ class Carbon extends DateTime return static::create($year, $month, $day, null, null, null, $tz); } + /** + * Create a Carbon instance from just a date. The time portion is set to midnight. + * + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createMidnightDate($year = null, $month = null, $day = null, $tz = null) + { + return static::create($year, $month, $day, 0, 0, 0, $tz); + } + /** * Create a Carbon instance from just a time. The date portion is set to today. * @@ -547,6 +781,8 @@ class Carbon extends DateTime * @param int|null $second * @param \DateTimeZone|string|null $tz * + * @throws \InvalidArgumentException + * * @return static */ public static function createFromTime($hour = null, $minute = null, $second = null, $tz = null) @@ -555,9 +791,8 @@ class Carbon extends DateTime } /** - * Create a Carbon instance from a specific format. + * Create a Carbon instance from a time string. The date portion is set to today. * - * @param string $format * @param string $time * @param \DateTimeZone|string|null $tz * @@ -565,18 +800,37 @@ class Carbon extends DateTime * * @return static */ + public static function createFromTimeString($time, $tz = null) + { + return static::today($tz)->setTimeFromTimeString($time); + } + + /** + * Create a Carbon instance from a specific format. + * + * @param string $format Datetime format + * @param string $time + * @param \DateTimeZone|string|null $tz + * + * @throws InvalidArgumentException + * + * @return static + */ public static function createFromFormat($format, $time, $tz = null) { if ($tz !== null) { - $dt = parent::createFromFormat($format, $time, static::safeCreateDateTimeZone($tz)); + $date = parent::createFromFormat($format, $time, static::safeCreateDateTimeZone($tz)); } else { - $dt = parent::createFromFormat($format, $time); + $date = parent::createFromFormat($format, $time); } - static::setLastErrors($lastErrors = parent::getLastErrors()); + $lastErrors = parent::getLastErrors(); + + if ($date instanceof DateTime || $date instanceof DateTimeInterface) { + $instance = static::instance($date); + $instance::setLastErrors($lastErrors); - if ($dt instanceof DateTime) { - return static::instance($dt); + return $instance; } throw new InvalidArgumentException(implode(PHP_EOL, $lastErrors['errors'])); @@ -612,7 +866,21 @@ class Carbon extends DateTime */ public static function createFromTimestamp($timestamp, $tz = null) { - return static::now($tz)->setTimestamp($timestamp); + return static::today($tz)->setTimestamp($timestamp); + } + + /** + * Create a Carbon instance from a timestamp in milliseconds. + * + * @param int $timestamp + * @param \DateTimeZone|string|null $tz + * + * @return static + */ + public static function createFromTimestampMs($timestamp, $tz = null) + { + return static::createFromFormat('U.u', sprintf('%F', $timestamp / 1000)) + ->setTimezone($tz); } /** @@ -637,6 +905,56 @@ class Carbon extends DateTime return clone $this; } + /** + * Returns a present instance in the same timezone. + * + * @return static + */ + public function nowWithSameTz() + { + return static::now($this->getTimezone()); + } + + /** + * Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface. + * + * @param mixed $date + * + * @throws \InvalidArgumentException + */ + protected static function expectDateTime($date) + { + if (!$date instanceof DateTime && !$date instanceof DateTimeInterface) { + throw new InvalidArgumentException( + 'Expected null, string, DateTime or DateTimeInterface, '. + (is_object($date) ? get_class($date) : gettype($date)).' given' + ); + } + } + + /** + * Return the Carbon instance passed through, a now instance in the same timezone + * if null given or parse the input if string given. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * + * @return static + */ + protected function resolveCarbon($date = null) + { + if (!$date) { + return $this->nowWithSameTz(); + } + + if (is_string($date)) { + return static::parse($date, $this->getTimezone()); + } + + static::expectDateTime($date); + + return $date instanceof self ? $date : static::instance($date); + } + /////////////////////////////////////////////////////////////////// ///////////////////////// GETTERS AND SETTERS ///////////////////// /////////////////////////////////////////////////////////////////// @@ -652,27 +970,33 @@ class Carbon extends DateTime */ public function __get($name) { + static $formats = array( + 'year' => 'Y', + 'yearIso' => 'o', + 'month' => 'n', + 'day' => 'j', + 'hour' => 'G', + 'minute' => 'i', + 'second' => 's', + 'micro' => 'u', + 'dayOfWeek' => 'w', + 'dayOfWeekIso' => 'N', + 'dayOfYear' => 'z', + 'weekOfYear' => 'W', + 'daysInMonth' => 't', + 'timestamp' => 'U', + ); + switch (true) { - case array_key_exists($name, $formats = array( - 'year' => 'Y', - 'yearIso' => 'o', - 'month' => 'n', - 'day' => 'j', - 'hour' => 'G', - 'minute' => 'i', - 'second' => 's', - 'micro' => 'u', - 'dayOfWeek' => 'w', - 'dayOfYear' => 'z', - 'weekOfYear' => 'W', - 'daysInMonth' => 't', - 'timestamp' => 'U', - )): + case isset($formats[$name]): return (int) $this->format($formats[$name]); case $name === 'weekOfMonth': return (int) ceil($this->day / static::DAYS_PER_WEEK); + case $name === 'weekNumberInMonth': + return (int) ceil(($this->day + $this->copy()->startOfMonth()->dayOfWeek - 1) / static::DAYS_PER_WEEK); + case $name === 'age': return $this->diffInYears(); @@ -730,6 +1054,8 @@ class Carbon extends DateTime * @param string|int|\DateTimeZone $value * * @throws \InvalidArgumentException + * + * @return void */ public function __set($name, $value) { @@ -889,13 +1215,11 @@ class Carbon extends DateTime */ public function setTimeFromTimeString($time) { - $time = explode(':', $time); - - $hour = $time[0]; - $minute = isset($time[1]) ? $time[1] : 0; - $second = isset($time[2]) ? $time[2] : 0; + if (strpos($time, ':') === false) { + $time .= ':0'; + } - return $this->setTime($hour, $minute, $second); + return $this->modify($time); } /** @@ -943,7 +1267,54 @@ class Carbon extends DateTime */ public function setTimezone($value) { - return parent::setTimezone(static::safeCreateDateTimeZone($value)); + parent::setTimezone(static::safeCreateDateTimeZone($value)); + // https://bugs.php.net/bug.php?id=72338 + // just workaround on this bug + $this->getTimestamp(); + + return $this; + } + + /** + * Set the year, month, and date for this instance to that of the passed instance. + * + * @param \Carbon\Carbon|\DateTimeInterface $date + * + * @return static + */ + public function setDateFrom($date) + { + $date = static::instance($date); + + $this->setDate($date->year, $date->month, $date->day); + + return $this; + } + + /** + * Set the hour, day, and time for this instance to that of the passed instance. + * + * @param \Carbon\Carbon|\DateTimeInterface $date + * + * @return static + */ + public function setTimeFrom($date) + { + $date = static::instance($date); + + $this->setTime($date->hour, $date->minute, $date->second); + + return $this; + } + + /** + * Get the days of the week + * + * @return array + */ + public static function getDays() + { + return static::$days; } /////////////////////////////////////////////////////////////////// @@ -963,7 +1334,9 @@ class Carbon extends DateTime /** * Set the first day of week * - * @param int + * @param int $day week start day + * + * @return void */ public static function setWeekStartsAt($day) { @@ -983,7 +1356,9 @@ class Carbon extends DateTime /** * Set the last day of week * - * @param int + * @param int $day + * + * @return void */ public static function setWeekEndsAt($day) { @@ -1003,22 +1378,46 @@ class Carbon extends DateTime /** * Set weekend days * - * @param array + * @param array $days + * + * @return void */ public static function setWeekendDays($days) { static::$weekendDays = $days; } - /////////////////////////////////////////////////////////////////// - ///////////////////////// TESTING AIDS //////////////////////////// - /////////////////////////////////////////////////////////////////// - /** - * Set a Carbon instance (real or mock) to be returned when a "now" - * instance is created. The provided instance will be returned - * specifically under the following conditions: - * - A call to the static now() method, ex. Carbon::now() + * get midday/noon hour + * + * @return int + */ + public static function getMidDayAt() + { + return static::$midDayAt; + } + + /** + * Set midday/noon hour + * + * @param int $hour midday hour + * + * @return void + */ + public static function setMidDayAt($hour) + { + static::$midDayAt = $hour; + } + + /////////////////////////////////////////////////////////////////// + ///////////////////////// TESTING AIDS //////////////////////////// + /////////////////////////////////////////////////////////////////// + + /** + * Set a Carbon instance (real or mock) to be returned when a "now" + * instance is created. The provided instance will be returned + * specifically under the following conditions: + * - A call to the static now() method, ex. Carbon::now() * - When a null (or blank string) is passed to the constructor or parse(), ex. new Carbon(null) * - When the string "now" is passed to the constructor or parse(), ex. new Carbon('now') * - When a string containing the desired time is passed to Carbon::parse(). @@ -1029,6 +1428,7 @@ class Carbon extends DateTime * To clear the test instance call this method using the default * parameter of null. * + * @param \Carbon\Carbon|null $testNow real or mock Carbon instance * @param \Carbon\Carbon|string|null $testNow */ public static function setTestNow($testNow = null) @@ -1059,25 +1459,24 @@ class Carbon extends DateTime } /** - * Determine if there is a relative keyword in the time string, this is to - * create dates relative to now for test instances. e.g.: next tuesday + * Determine if a time string will produce a relative date. * * @param string $time * - * @return bool true if there is a keyword, otherwise false + * @return bool true if time match a relative date, false if absolute or invalid time string */ public static function hasRelativeKeywords($time) { - // skip common format with a '-' in it - if (preg_match('/\d{4}-\d{1,2}-\d{1,2}/', $time) !== 1) { - foreach (static::$relativeKeywords as $keyword) { - if (stripos($time, $keyword) !== false) { - return true; - } - } + if (strtotime($time) === false) { + return false; } - return false; + $date1 = new DateTime('2000-01-01T00:00:00Z'); + $date1->modify($time); + $date2 = new DateTime('2001-12-25T00:00:00Z'); + $date2->modify($time); + + return $date1 != $date2; } /////////////////////////////////////////////////////////////////// @@ -1092,9 +1491,7 @@ class Carbon extends DateTime protected static function translator() { if (static::$translator === null) { - static::$translator = new Translator('en'); - static::$translator->addLoader('array', new ArrayLoader()); - static::setLocale('en'); + static::$translator = Translator::get(); } return static::$translator; @@ -1114,6 +1511,8 @@ class Carbon extends DateTime * Set the translator instance to use * * @param \Symfony\Component\Translation\TranslatorInterface $translator + * + * @return void */ public static function setTranslator(TranslatorInterface $translator) { @@ -1133,25 +1532,13 @@ class Carbon extends DateTime /** * Set the current translator locale and indicate if the source locale file exists * - * @param string $locale + * @param string $locale locale ex. en * * @return bool */ public static function setLocale($locale) { - $locale = preg_replace_callback('/\b([a-z]{2})[-_](?:([a-z]{4})[-_])?([a-z]{2})\b/', function ($matches) { - return $matches[1].'_'.(!empty($matches[2]) ? ucfirst($matches[2]).'_' : '').strtoupper($matches[3]); - }, strtolower($locale)); - - if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) { - static::translator()->setLocale($locale); - // Ensure the locale has been loaded. - static::translator()->addResource('array', require $filename, $locale); - - return true; - } - - return false; + return static::translator()->setLocale($locale) !== false; } /////////////////////////////////////////////////////////////////// @@ -1178,19 +1565,20 @@ class Carbon extends DateTime */ public function formatLocalized($format) { - // Check for Windows to find and replace the %e - // modifier correctly + // Check for Windows to find and replace the %e modifier correctly. if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - $format = preg_replace('#(?toDateTimeString())); return static::$utf8 ? utf8_encode($formatted) : $formatted; } /** * Reset the format used to the default when type juggling a Carbon instance to a string + * + * @return void */ public static function resetToStringFormat() { @@ -1201,6 +1589,8 @@ class Carbon extends DateTime * Set the default format used when type juggling a Carbon instance to a string * * @param string $format + * + * @return void */ public static function setToStringFormat($format) { @@ -1307,6 +1697,16 @@ class Carbon extends DateTime return $this->format(static::RFC822); } + /** + * Convert the instance to UTC and return as Zulu ISO8601 + * + * @return string + */ + public function toIso8601ZuluString() + { + return $this->copy()->setTimezone('UTC')->format('Y-m-d\TH:i:s\Z'); + } + /** * Format the instance as RFC850 * @@ -1377,6 +1777,41 @@ class Carbon extends DateTime return $this->format(static::W3C); } + /** + * Format the instance as RFC7231 + * + * @return string + */ + public function toRfc7231String() + { + return $this->copy() + ->setTimezone('GMT') + ->format(static::RFC7231_FORMAT); + } + + /** + * Get default array representation + * + * @return array + */ + public function toArray() + { + return array( + 'year' => $this->year, + 'month' => $this->month, + 'day' => $this->day, + 'dayOfWeek' => $this->dayOfWeek, + 'dayOfYear' => $this->dayOfYear, + 'hour' => $this->hour, + 'minute' => $this->minute, + 'second' => $this->second, + 'micro' => $this->micro, + 'timestamp' => $this->timestamp, + 'formatted' => $this->format(self::DEFAULT_TO_STRING_FORMAT), + 'timezone' => $this->timezone, + ); + } + /////////////////////////////////////////////////////////////////// ////////////////////////// COMPARISONS //////////////////////////// /////////////////////////////////////////////////////////////////// @@ -1384,263 +1819,263 @@ class Carbon extends DateTime /** * Determines if the instance is equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function eq(Carbon $dt) + public function eq($date) { - return $this == $dt; + return $this == $date; } /** * Determines if the instance is equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see eq() * * @return bool */ - public function equalTo(Carbon $dt) + public function equalTo($date) { - return $this->eq($dt); + return $this->eq($date); } /** * Determines if the instance is not equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function ne(Carbon $dt) + public function ne($date) { - return !$this->eq($dt); + return !$this->eq($date); } /** * Determines if the instance is not equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see ne() * * @return bool */ - public function notEqualTo(Carbon $dt) + public function notEqualTo($date) { - return $this->ne($dt); + return $this->ne($date); } /** * Determines if the instance is greater (after) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function gt(Carbon $dt) + public function gt($date) { - return $this > $dt; + return $this > $date; } /** * Determines if the instance is greater (after) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see gt() * * @return bool */ - public function greaterThan(Carbon $dt) + public function greaterThan($date) { - return $this->gt($dt); + return $this->gt($date); } /** * Determines if the instance is greater (after) than or equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function gte(Carbon $dt) + public function gte($date) { - return $this >= $dt; + return $this >= $date; } /** * Determines if the instance is greater (after) than or equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see gte() * * @return bool */ - public function greaterThanOrEqualTo(Carbon $dt) + public function greaterThanOrEqualTo($date) { - return $this->gte($dt); + return $this->gte($date); } /** * Determines if the instance is less (before) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function lt(Carbon $dt) + public function lt($date) { - return $this < $dt; + return $this < $date; } /** * Determines if the instance is less (before) than another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lt() * * @return bool */ - public function lessThan(Carbon $dt) + public function lessThan($date) { - return $this->lt($dt); + return $this->lt($date); } /** * Determines if the instance is less (before) or equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return bool */ - public function lte(Carbon $dt) + public function lte($date) { - return $this <= $dt; + return $this <= $date; } /** * Determines if the instance is less (before) or equal to another * - * @param Carbon $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see lte() * * @return bool */ - public function lessThanOrEqualTo(Carbon $dt) + public function lessThanOrEqualTo($date) { - return $this->lte($dt); + return $this->lte($date); } /** * Determines if the instance is between two others * - * @param Carbon $dt1 - * @param Carbon $dt2 - * @param bool $equal Indicates if a > and < comparison should be used or <= or >= + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 + * @param bool $equal Indicates if a > and < comparison should be used or <= or >= * * @return bool */ - public function between(Carbon $dt1, Carbon $dt2, $equal = true) + public function between($date1, $date2, $equal = true) { - if ($dt1->gt($dt2)) { - $temp = $dt1; - $dt1 = $dt2; - $dt2 = $temp; + if ($date1->gt($date2)) { + $temp = $date1; + $date1 = $date2; + $date2 = $temp; } if ($equal) { - return $this->gte($dt1) && $this->lte($dt2); + return $this->gte($date1) && $this->lte($date2); } - return $this->gt($dt1) && $this->lt($dt2); + return $this->gt($date1) && $this->lt($date2); } /** * Get the closest date from the instance. * - * @param Carbon $dt1 - * @param Carbon $dt2 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ - public function closest(Carbon $dt1, Carbon $dt2) + public function closest($date1, $date2) { - return $this->diffInSeconds($dt1) < $this->diffInSeconds($dt2) ? $dt1 : $dt2; + return $this->diffInSeconds($date1) < $this->diffInSeconds($date2) ? $date1 : $date2; } /** * Get the farthest date from the instance. * - * @param Carbon $dt1 - * @param Carbon $dt2 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date1 + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date2 * * @return static */ - public function farthest(Carbon $dt1, Carbon $dt2) + public function farthest($date1, $date2) { - return $this->diffInSeconds($dt1) > $this->diffInSeconds($dt2) ? $dt1 : $dt2; + return $this->diffInSeconds($date1) > $this->diffInSeconds($date2) ? $date1 : $date2; } /** * Get the minimum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return static */ - public function min(Carbon $dt = null) + public function min($date = null) { - $dt = $dt ?: static::now($this->getTimezone()); + $date = $this->resolveCarbon($date); - return $this->lt($dt) ? $this : $dt; + return $this->lt($date) ? $this : $date; } /** * Get the minimum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see min() * * @return static */ - public function minimum(Carbon $dt = null) + public function minimum($date = null) { - return $this->min($dt); + return $this->min($date); } /** * Get the maximum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @return static */ - public function max(Carbon $dt = null) + public function max($date = null) { - $dt = $dt ?: static::now($this->getTimezone()); + $date = $this->resolveCarbon($date); - return $this->gt($dt) ? $this : $dt; + return $this->gt($date) ? $this : $date; } /** * Get the maximum instance between a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|mixed $date * * @see max() * * @return static */ - public function maximum(Carbon $dt = null) + public function maximum($date = null) { - return $this->max($dt); + return $this->max($date); } /** @@ -1680,7 +2115,7 @@ class Carbon extends DateTime */ public function isToday() { - return $this->toDateString() === static::now($this->getTimezone())->toDateString(); + return $this->toDateString() === $this->nowWithSameTz()->toDateString(); } /** @@ -1700,7 +2135,7 @@ class Carbon extends DateTime */ public function isNextWeek() { - return $this->weekOfYear === static::now($this->getTimezone())->addWeek()->weekOfYear; + return $this->weekOfYear === $this->nowWithSameTz()->addWeek()->weekOfYear; } /** @@ -1710,7 +2145,27 @@ class Carbon extends DateTime */ public function isLastWeek() { - return $this->weekOfYear === static::now($this->getTimezone())->subWeek()->weekOfYear; + return $this->weekOfYear === $this->nowWithSameTz()->subWeek()->weekOfYear; + } + + /** + * Determines if the instance is within the next quarter + * + * @return bool + */ + public function isNextQuarter() + { + return $this->quarter === $this->nowWithSameTz()->addQuarter()->quarter; + } + + /** + * Determines if the instance is within the last quarter + * + * @return bool + */ + public function isLastQuarter() + { + return $this->quarter === $this->nowWithSameTz()->subQuarter()->quarter; } /** @@ -1720,7 +2175,7 @@ class Carbon extends DateTime */ public function isNextMonth() { - return $this->month === static::now($this->getTimezone())->addMonthNoOverflow()->month; + return $this->month === $this->nowWithSameTz()->addMonthNoOverflow()->month; } /** @@ -1730,7 +2185,7 @@ class Carbon extends DateTime */ public function isLastMonth() { - return $this->month === static::now($this->getTimezone())->subMonthNoOverflow()->month; + return $this->month === $this->nowWithSameTz()->subMonthNoOverflow()->month; } /** @@ -1740,7 +2195,7 @@ class Carbon extends DateTime */ public function isNextYear() { - return $this->year === static::now($this->getTimezone())->addYear()->year; + return $this->year === $this->nowWithSameTz()->addYear()->year; } /** @@ -1750,7 +2205,7 @@ class Carbon extends DateTime */ public function isLastYear() { - return $this->year === static::now($this->getTimezone())->subYear()->year; + return $this->year === $this->nowWithSameTz()->subYear()->year; } /** @@ -1760,7 +2215,7 @@ class Carbon extends DateTime */ public function isFuture() { - return $this->gt(static::now($this->getTimezone())); + return $this->gt($this->nowWithSameTz()); } /** @@ -1770,7 +2225,7 @@ class Carbon extends DateTime */ public function isPast() { - return $this->lt(static::now($this->getTimezone())); + return $this->lt($this->nowWithSameTz()); } /** @@ -1795,19 +2250,23 @@ class Carbon extends DateTime return static::create($this->year, 12, 28, 0, 0, 0, $this->tz)->weekOfYear === 53; } - /* + /** * Compares the formatted values of the two dates. * - * @param string $format The date formats to compare. - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. + * @param string $format The date formats to compare. + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @throws \InvalidArgumentException * * @return bool */ - public function isSameAs($format, Carbon $dt = null) + public function isSameAs($format, $date = null) { - $dt = $dt ?: static::now($this->tz); + $date = $date ?: static::now($this->tz); + + static::expectDateTime($date); - return $this->format($format) === $dt->format($format); + return $this->format($format) === $date->format($format); } /** @@ -1823,13 +2282,40 @@ class Carbon extends DateTime /** * Checks if the passed in date is in the same year as the instance year. * - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * + * @return bool + */ + public function isSameYear($date = null) + { + return $this->isSameAs('Y', $date); + } + + /** + * Determines if the instance is in the current month + * + * @return bool + */ + public function isCurrentQuarter() + { + return $this->isSameQuarter(); + } + + /** + * Checks if the passed in date is in the same quarter as the instance quarter (and year if needed). + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. + * @param bool $ofSameYear Check if it is the same month in the same year. * * @return bool */ - public function isSameYear(Carbon $dt = null) + public function isSameQuarter($date = null, $ofSameYear = false) { - return $this->isSameAs('Y', $dt); + $date = $date ? static::instance($date) : static::now($this->tz); + + static::expectDateTime($date); + + return $this->quarter === $date->quarter && (!$ofSameYear || $this->isSameYear($date)); } /** @@ -1843,30 +2329,119 @@ class Carbon extends DateTime } /** - * Checks if the passed in date is in the same month as the instance month (and year if needed). + * Checks if the passed in date is in the same month as the instance´s month. + * + * Note that this defaults to only comparing the month while ignoring the year. + * To test if it is the same exact month of the same year, pass in true as the second parameter. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * @param bool $ofSameYear Check if it is the same month in the same year. + * + * @return bool + */ + public function isSameMonth($date = null, $ofSameYear = false) + { + return $this->isSameAs($ofSameYear ? 'Y-m' : 'm', $date); + } + + /** + * Determines if the instance is in the current day. + * + * @return bool + */ + public function isCurrentDay() + { + return $this->isSameDay(); + } + + /** + * Checks if the passed in date is the same exact day as the instance´s day. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameDay($date = null) + { + return $this->isSameAs('Y-m-d', $date); + } + + /** + * Determines if the instance is in the current hour. + * + * @return bool + */ + public function isCurrentHour() + { + return $this->isSameHour(); + } + + /** + * Checks if the passed in date is the same exact hour as the instance´s hour. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameHour($date = null) + { + return $this->isSameAs('Y-m-d H', $date); + } + + /** + * Determines if the instance is in the current minute. + * + * @return bool + */ + public function isCurrentMinute() + { + return $this->isSameMinute(); + } + + /** + * Checks if the passed in date is the same exact minute as the instance´s minute. * - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. - * @param bool $ofSameYear Check if it is the same month in the same year. + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameMinute($date = null) + { + return $this->isSameAs('Y-m-d H:i', $date); + } + + /** + * Determines if the instance is in the current second. * * @return bool */ - public function isSameMonth(Carbon $dt = null, $ofSameYear = false) + public function isCurrentSecond() { - $format = $ofSameYear ? 'Y-m' : 'm'; + return $this->isSameSecond(); + } - return $this->isSameAs($format, $dt); + /** + * Checks if the passed in date is the same exact second as the instance´s second. + * + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use the current date. + * + * @return bool + */ + public function isSameSecond($date = null) + { + return $this->isSameAs('Y-m-d H:i:s', $date); } /** - * Checks if the passed in date is the same day as the instance current day. + * Checks if this day is a specific day of the week. * - * @param \Carbon\Carbon $dt + * @param int $dayOfWeek * * @return bool */ - public function isSameDay(Carbon $dt) + public function isDayOfWeek($dayOfWeek) { - return $this->toDateString() === $dt->toDateString(); + return $this->dayOfWeek === $dayOfWeek; } /** @@ -1939,196 +2514,340 @@ class Carbon extends DateTime return $this->dayOfWeek === static::SATURDAY; } - /////////////////////////////////////////////////////////////////// - /////////////////// ADDITIONS AND SUBTRACTIONS //////////////////// - /////////////////////////////////////////////////////////////////// - /** - * Add years to the instance. Positive $value travel forward while - * negative $value travel into the past. + * Check if its the birthday. Compares the date/month values of the two dates. * - * @param int $value + * @param \Carbon\Carbon|\DateTimeInterface|null $date The instance to compare with or null to use current day. * - * @return static + * @return bool */ - public function addYears($value) + public function isBirthday($date = null) { - return $this->modify((int) $value.' year'); + return $this->isSameAs('md', $date); } /** - * Add a year to the instance - * - * @param int $value + * Check if today is the last day of the Month * - * @return static + * @return bool */ - public function addYear($value = 1) + public function isLastOfMonth() { - return $this->addYears($value); + return $this->day === $this->daysInMonth; } /** - * Remove a year from the instance + * Checks if the (date)time string is in a given format. * - * @param int $value + * @param string $date + * @param string $format * - * @return static + * @return bool */ - public function subYear($value = 1) + public static function hasFormat($date, $format) { - return $this->subYears($value); + try { + // Try to create a DateTime object. Throws an InvalidArgumentException if the provided time string + // doesn't match the format in any way. + static::createFromFormat($format, $date); + + // createFromFormat() is known to handle edge cases silently. + // E.g. "1975-5-1" (Y-n-j) will still be parsed correctly when "Y-m-d" is supplied as the format. + // To ensure we're really testing against our desired format, perform an additional regex validation. + $regex = strtr( + preg_quote($format, '/'), + static::$regexFormats + ); + + return (bool) preg_match('/^'.$regex.'$/', $date); + } catch (InvalidArgumentException $e) { + } + + return false; } + /////////////////////////////////////////////////////////////////// + /////////////////// ADDITIONS AND SUBTRACTIONS //////////////////// + /////////////////////////////////////////////////////////////////// + /** - * Remove years from the instance. + * Add centuries to the instance. Positive $value travels forward while + * negative $value travels into the past. * * @param int $value * * @return static */ - public function subYears($value) + public function addCenturies($value) { - return $this->addYears(-1 * $value); + return $this->addYears(static::YEARS_PER_CENTURY * $value); } /** - * Add quarters to the instance. Positive $value travels forward while - * negative $value travels into the past. + * Add a century to the instance * * @param int $value * * @return static */ - public function addQuarters($value) + public function addCentury($value = 1) { - return $this->addMonths(static::MONTHS_PER_QUARTER * $value); + return $this->addCenturies($value); } /** - * Add a quarter to the instance + * Remove centuries from the instance * * @param int $value * * @return static */ - public function addQuarter($value = 1) + public function subCenturies($value) { - return $this->addQuarters($value); + return $this->addCenturies(-1 * $value); } /** - * Remove a quarter from the instance + * Remove a century from the instance * * @param int $value * * @return static */ - public function subQuarter($value = 1) + public function subCentury($value = 1) { - return $this->subQuarters($value); + return $this->subCenturies($value); } /** - * Remove quarters from the instance + * Add years to the instance. Positive $value travel forward while + * negative $value travel into the past. * * @param int $value * * @return static */ - public function subQuarters($value) + public function addYears($value) { - return $this->addQuarters(-1 * $value); + if ($this->shouldOverflowYears()) { + return $this->addYearsWithOverflow($value); + } + + return $this->addYearsNoOverflow($value); } /** - * Add centuries to the instance. Positive $value travels forward while - * negative $value travels into the past. + * Add a year to the instance * * @param int $value * * @return static */ - public function addCenturies($value) + public function addYear($value = 1) { - return $this->addYears(static::YEARS_PER_CENTURY * $value); + return $this->addYears($value); } /** - * Add a century to the instance + * Add years to the instance with no overflow of months + * Positive $value travel forward while + * negative $value travel into the past. * * @param int $value * * @return static */ - public function addCentury($value = 1) + public function addYearsNoOverflow($value) { - return $this->addCenturies($value); + return $this->addMonthsNoOverflow($value * static::MONTHS_PER_YEAR); } /** - * Remove a century from the instance + * Add year with overflow months set to false * * @param int $value * * @return static */ - public function subCentury($value = 1) + public function addYearNoOverflow($value = 1) { - return $this->subCenturies($value); + return $this->addYearsNoOverflow($value); } /** - * Remove centuries from the instance + * Add years to the instance. + * Positive $value travel forward while + * negative $value travel into the past. * * @param int $value * * @return static */ - public function subCenturies($value) + public function addYearsWithOverflow($value) { - return $this->addCenturies(-1 * $value); + return $this->modify((int) $value.' year'); } /** - * Add months to the instance. Positive $value travels forward while - * negative $value travels into the past. + * Add year with overflow. * * @param int $value * * @return static */ - public function addMonths($value) + public function addYearWithOverflow($value = 1) { - if (static::shouldOverflowMonths()) { - return $this->addMonthsWithOverflow($value); - } - - return $this->addMonthsNoOverflow($value); + return $this->addYearsWithOverflow($value); } /** - * Add a month to the instance + * Remove years from the instance. * * @param int $value * * @return static */ - public function addMonth($value = 1) + public function subYears($value) { - return $this->addMonths($value); + return $this->addYears(-1 * $value); } /** - * Remove a month from the instance + * Remove a year from the instance * * @param int $value * * @return static */ - public function subMonth($value = 1) + public function subYear($value = 1) { - return $this->subMonths($value); + return $this->subYears($value); + } + + /** + * Remove years from the instance with no month overflow. + * + * @param int $value + * + * @return static + */ + public function subYearsNoOverflow($value) + { + return $this->subMonthsNoOverflow($value * static::MONTHS_PER_YEAR); + } + + /** + * Remove year from the instance with no month overflow + * + * @param int $value + * + * @return static + */ + public function subYearNoOverflow($value = 1) + { + return $this->subYearsNoOverflow($value); + } + + /** + * Remove years from the instance. + * + * @param int $value + * + * @return static + */ + public function subYearsWithOverflow($value) + { + return $this->subMonthsWithOverflow($value * static::MONTHS_PER_YEAR); + } + + /** + * Remove year from the instance. + * + * @param int $value + * + * @return static + */ + public function subYearWithOverflow($value = 1) + { + return $this->subYearsWithOverflow($value); + } + + /** + * Add quarters to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addQuarters($value) + { + return $this->addMonths(static::MONTHS_PER_QUARTER * $value); + } + + /** + * Add a quarter to the instance + * + * @param int $value + * + * @return static + */ + public function addQuarter($value = 1) + { + return $this->addQuarters($value); + } + + /** + * Remove quarters from the instance + * + * @param int $value + * + * @return static + */ + public function subQuarters($value) + { + return $this->addQuarters(-1 * $value); + } + + /** + * Remove a quarter from the instance + * + * @param int $value + * + * @return static + */ + public function subQuarter($value = 1) + { + return $this->subQuarters($value); + } + + /** + * Add months to the instance. Positive $value travels forward while + * negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addMonths($value) + { + if (static::shouldOverflowMonths()) { + return $this->addMonthsWithOverflow($value); + } + + return $this->addMonthsNoOverflow($value); + } + + /** + * Add a month to the instance + * + * @param int $value + * + * @return static + */ + public function addMonth($value = 1) + { + return $this->addMonths($value); } /** @@ -2143,6 +2862,18 @@ class Carbon extends DateTime return $this->addMonths(-1 * $value); } + /** + * Remove a month from the instance + * + * @param int $value + * + * @return static + */ + public function subMonth($value = 1) + { + return $this->subMonths($value); + } + /** * Add months to the instance. Positive $value travels forward while * negative $value travels into the past. @@ -2169,27 +2900,27 @@ class Carbon extends DateTime } /** - * Remove a month from the instance + * Remove months from the instance * * @param int $value * * @return static */ - public function subMonthWithOverflow($value = 1) + public function subMonthsWithOverflow($value) { - return $this->subMonthsWithOverflow($value); + return $this->addMonthsWithOverflow(-1 * $value); } /** - * Remove months from the instance + * Remove a month from the instance * * @param int $value * * @return static */ - public function subMonthsWithOverflow($value) + public function subMonthWithOverflow($value = 1) { - return $this->addMonthsWithOverflow(-1 * $value); + return $this->subMonthsWithOverflow($value); } /** @@ -2226,27 +2957,27 @@ class Carbon extends DateTime } /** - * Remove a month with no overflow from the instance + * Remove months with no overflow from the instance * * @param int $value * * @return static */ - public function subMonthNoOverflow($value = 1) + public function subMonthsNoOverflow($value) { - return $this->subMonthsNoOverflow($value); + return $this->addMonthsNoOverflow(-1 * $value); } /** - * Remove months with no overflow from the instance + * Remove a month with no overflow from the instance * * @param int $value * * @return static */ - public function subMonthsNoOverflow($value) + public function subMonthNoOverflow($value = 1) { - return $this->addMonthsNoOverflow(-1 * $value); + return $this->subMonthsNoOverflow($value); } /** @@ -2275,27 +3006,27 @@ class Carbon extends DateTime } /** - * Remove a day from the instance + * Remove days from the instance * * @param int $value * * @return static */ - public function subDay($value = 1) + public function subDays($value) { - return $this->subDays($value); + return $this->addDays(-1 * $value); } /** - * Remove days from the instance + * Remove a day from the instance * * @param int $value * * @return static */ - public function subDays($value) + public function subDay($value = 1) { - return $this->addDays(-1 * $value); + return $this->subDays($value); } /** @@ -2308,7 +3039,7 @@ class Carbon extends DateTime */ public function addWeekdays($value) { - // fix for https://bugs.php.net/bug.php?id=54909 + // Fix for weekday bug https://bugs.php.net/bug.php?id=54909 $t = $this->toTimeString(); $this->modify((int) $value.' weekday'); @@ -2327,6 +3058,18 @@ class Carbon extends DateTime return $this->addWeekdays($value); } + /** + * Remove weekdays from the instance + * + * @param int $value + * + * @return static + */ + public function subWeekdays($value) + { + return $this->addWeekdays(-1 * $value); + } + /** * Remove a weekday from the instance * @@ -2340,187 +3083,322 @@ class Carbon extends DateTime } /** - * Remove weekdays from the instance + * Add weeks to the instance. Positive $value travels forward while + * negative $value travels into the past. * * @param int $value * * @return static */ - public function subWeekdays($value) + public function addWeeks($value) { - return $this->addWeekdays(-1 * $value); + return $this->modify((int) $value.' week'); } /** - * Add weeks to the instance. Positive $value travels forward while + * Add a week to the instance + * + * @param int $value + * + * @return static + */ + public function addWeek($value = 1) + { + return $this->addWeeks($value); + } + + /** + * Remove weeks to the instance + * + * @param int $value + * + * @return static + */ + public function subWeeks($value) + { + return $this->addWeeks(-1 * $value); + } + + /** + * Remove a week from the instance + * + * @param int $value + * + * @return static + */ + public function subWeek($value = 1) + { + return $this->subWeeks($value); + } + + /** + * Add hours to the instance. Positive $value travels forward while * negative $value travels into the past. * * @param int $value * * @return static */ - public function addWeeks($value) + public function addHours($value) + { + return $this->modify((int) $value.' hour'); + } + + /** + * Add hours to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addRealHours($value) + { + return $this->addRealMinutes($value * static::MINUTES_PER_HOUR); + } + + /** + * Add an hour to the instance. + * + * @param int $value + * + * @return static + */ + public function addHour($value = 1) + { + return $this->addHours($value); + } + + /** + * Add an hour to the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function addRealHour($value = 1) + { + return $this->addRealHours($value); + } + + /** + * Remove hours from the instance. + * + * @param int $value + * + * @return static + */ + public function subHours($value) + { + return $this->addHours(-1 * $value); + } + + /** + * Remove hours from the instance using timestamp. + * + * @param int $value + * + * @return static + */ + public function subRealHours($value) + { + return $this->addRealHours(-1 * $value); + } + + /** + * Remove an hour from the instance. + * + * @param int $value + * + * @return static + */ + public function subHour($value = 1) + { + return $this->subHours($value); + } + + /** + * Remove an hour from the instance. + * + * @param int $value + * + * @return static + */ + public function subRealHour($value = 1) + { + return $this->subRealHours($value); + } + + /** + * Add minutes to the instance using timestamp. Positive $value + * travels forward while negative $value travels into the past. + * + * @param int $value + * + * @return static + */ + public function addMinutes($value) { - return $this->modify((int) $value.' week'); + return $this->modify((int) $value.' minute'); } /** - * Add a week to the instance + * Add minutes to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. * * @param int $value * * @return static */ - public function addWeek($value = 1) + public function addRealMinutes($value) { - return $this->addWeeks($value); + return $this->addRealSeconds($value * static::SECONDS_PER_MINUTE); } /** - * Remove a week from the instance + * Add a minute to the instance. * * @param int $value * * @return static */ - public function subWeek($value = 1) + public function addMinute($value = 1) { - return $this->subWeeks($value); + return $this->addMinutes($value); } /** - * Remove weeks to the instance + * Add a minute to the instance using timestamp. * * @param int $value * * @return static */ - public function subWeeks($value) + public function addRealMinute($value = 1) { - return $this->addWeeks(-1 * $value); + return $this->addRealMinutes($value); } /** - * Add hours to the instance. Positive $value travels forward while - * negative $value travels into the past. + * Remove a minute from the instance. * * @param int $value * * @return static */ - public function addHours($value) + public function subMinute($value = 1) { - return $this->modify((int) $value.' hour'); + return $this->subMinutes($value); } /** - * Add an hour to the instance + * Remove a minute from the instance using timestamp. * * @param int $value * * @return static */ - public function addHour($value = 1) + public function subRealMinute($value = 1) { - return $this->addHours($value); + return $this->addRealMinutes(-1 * $value); } /** - * Remove an hour from the instance + * Remove minutes from the instance. * * @param int $value * * @return static */ - public function subHour($value = 1) + public function subMinutes($value) { - return $this->subHours($value); + return $this->addMinutes(-1 * $value); } /** - * Remove hours from the instance + * Remove a minute from the instance using timestamp. * * @param int $value * * @return static */ - public function subHours($value) + public function subRealMinutes($value = 1) { - return $this->addHours(-1 * $value); + return $this->subRealMinute($value); } /** - * Add minutes to the instance. Positive $value travels forward while + * Add seconds to the instance. Positive $value travels forward while * negative $value travels into the past. * * @param int $value * * @return static */ - public function addMinutes($value) + public function addSeconds($value) { - return $this->modify((int) $value.' minute'); + return $this->modify((int) $value.' second'); } /** - * Add a minute to the instance + * Add seconds to the instance using timestamp. Positive $value travels + * forward while negative $value travels into the past. * * @param int $value * * @return static */ - public function addMinute($value = 1) + public function addRealSeconds($value) { - return $this->addMinutes($value); + return $this->setTimestamp($this->getTimestamp() + $value); } /** - * Remove a minute from the instance + * Add a second to the instance. * * @param int $value * * @return static */ - public function subMinute($value = 1) + public function addSecond($value = 1) { - return $this->subMinutes($value); + return $this->addSeconds($value); } /** - * Remove minutes from the instance + * Add a second to the instance using timestamp. * * @param int $value * * @return static */ - public function subMinutes($value) + public function addRealSecond($value = 1) { - return $this->addMinutes(-1 * $value); + return $this->addRealSeconds($value); } /** - * Add seconds to the instance. Positive $value travels forward while - * negative $value travels into the past. + * Remove seconds from the instance. * * @param int $value * * @return static */ - public function addSeconds($value) + public function subSeconds($value) { - return $this->modify((int) $value.' second'); + return $this->addSeconds(-1 * $value); } /** - * Add a second to the instance + * Remove seconds from the instance using timestamp. * * @param int $value * * @return static */ - public function addSecond($value = 1) + public function subRealSeconds($value) { - return $this->addSeconds($value); + return $this->addRealSeconds(-1 * $value); } /** @@ -2536,121 +3414,130 @@ class Carbon extends DateTime } /** - * Remove seconds from the instance + * Remove a second from the instance using timestamp. * * @param int $value * * @return static */ - public function subSeconds($value) + public function subRealSecond($value = 1) { - return $this->addSeconds(-1 * $value); + return $this->subRealSeconds($value); } /////////////////////////////////////////////////////////////////// /////////////////////////// DIFFERENCES /////////////////////////// /////////////////////////////////////////////////////////////////// + /** + * Get the difference as a CarbonInterval instance + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return CarbonInterval + */ + public function diffAsCarbonInterval($date = null, $absolute = true) + { + return CarbonInterval::instance($this->diff($this->resolveCarbon($date), $absolute)); + } + /** * Get the difference in years * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInYears(Carbon $dt = null, $abs = true) + public function diffInYears($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); - - return (int) $this->diff($dt, $abs)->format('%r%y'); + return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%y'); } /** * Get the difference in months * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInMonths(Carbon $dt = null, $abs = true) + public function diffInMonths($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); + $date = $this->resolveCarbon($date); - return $this->diffInYears($dt, $abs) * static::MONTHS_PER_YEAR + (int) $this->diff($dt, $abs)->format('%r%m'); + return $this->diffInYears($date, $absolute) * static::MONTHS_PER_YEAR + (int) $this->diff($date, $absolute)->format('%r%m'); } /** * Get the difference in weeks * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInWeeks(Carbon $dt = null, $abs = true) + public function diffInWeeks($date = null, $absolute = true) { - return (int) ($this->diffInDays($dt, $abs) / static::DAYS_PER_WEEK); + return (int) ($this->diffInDays($date, $absolute) / static::DAYS_PER_WEEK); } /** * Get the difference in days * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInDays(Carbon $dt = null, $abs = true) + public function diffInDays($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); - - return (int) $this->diff($dt, $abs)->format('%r%a'); + return (int) $this->diff($this->resolveCarbon($date), $absolute)->format('%r%a'); } /** * Get the difference in days using a filter closure * - * @param Closure $callback - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param Closure $callback + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInDaysFiltered(Closure $callback, Carbon $dt = null, $abs = true) + public function diffInDaysFiltered(Closure $callback, $date = null, $absolute = true) { - return $this->diffFiltered(CarbonInterval::day(), $callback, $dt, $abs); + return $this->diffFiltered(CarbonInterval::day(), $callback, $date, $absolute); } /** * Get the difference in hours using a filter closure * - * @param Closure $callback - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param Closure $callback + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInHoursFiltered(Closure $callback, Carbon $dt = null, $abs = true) + public function diffInHoursFiltered(Closure $callback, $date = null, $absolute = true) { - return $this->diffFiltered(CarbonInterval::hour(), $callback, $dt, $abs); + return $this->diffFiltered(CarbonInterval::hour(), $callback, $date, $absolute); } /** * Get the difference by the given interval using a filter closure * - * @param CarbonInterval $ci An interval to traverse by - * @param Closure $callback - * @param Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param CarbonInterval $ci An interval to traverse by + * @param Closure $callback + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffFiltered(CarbonInterval $ci, Closure $callback, Carbon $dt = null, $abs = true) + public function diffFiltered(CarbonInterval $ci, Closure $callback, $date = null, $absolute = true) { $start = $this; - $end = $dt ?: static::now($this->getTimezone()); + $end = $this->resolveCarbon($date); $inverse = false; if ($end < $start) { @@ -2660,85 +3547,130 @@ class Carbon extends DateTime } $period = new DatePeriod($start, $ci, $end); - $vals = array_filter(iterator_to_array($period), function (DateTime $date) use ($callback) { + $values = array_filter(iterator_to_array($period), function ($date) use ($callback) { return call_user_func($callback, Carbon::instance($date)); }); - $diff = count($vals); + $diff = count($values); - return $inverse && !$abs ? -$diff : $diff; + return $inverse && !$absolute ? -$diff : $diff; } /** * Get the difference in weekdays * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInWeekdays(Carbon $dt = null, $abs = true) + public function diffInWeekdays($date = null, $absolute = true) { return $this->diffInDaysFiltered(function (Carbon $date) { return $date->isWeekday(); - }, $dt, $abs); + }, $date, $absolute); } /** * Get the difference in weekend days using a filter * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInWeekendDays(Carbon $dt = null, $abs = true) + public function diffInWeekendDays($date = null, $absolute = true) { return $this->diffInDaysFiltered(function (Carbon $date) { return $date->isWeekend(); - }, $dt, $abs); + }, $date, $absolute); + } + + /** + * Get the difference in hours. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInHours($date = null, $absolute = true) + { + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + } + + /** + * Get the difference in hours using timestamps. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInRealHours($date = null, $absolute = true) + { + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + } + + /** + * Get the difference in minutes. + * + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference + * + * @return int + */ + public function diffInMinutes($date = null, $absolute = true) + { + return (int) ($this->diffInSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); } /** - * Get the difference in hours + * Get the difference in minutes using timestamps. * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInHours(Carbon $dt = null, $abs = true) + public function diffInRealMinutes($date = null, $absolute = true) { - return (int) ($this->diffInSeconds($dt, $abs) / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR); + return (int) ($this->diffInRealSeconds($date, $absolute) / static::SECONDS_PER_MINUTE); } /** - * Get the difference in minutes + * Get the difference in seconds. * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInMinutes(Carbon $dt = null, $abs = true) + public function diffInSeconds($date = null, $absolute = true) { - return (int) ($this->diffInSeconds($dt, $abs) / static::SECONDS_PER_MINUTE); + $diff = $this->diff($this->resolveCarbon($date)); + $value = $diff->days * static::HOURS_PER_DAY * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE + + $diff->h * static::MINUTES_PER_HOUR * static::SECONDS_PER_MINUTE + + $diff->i * static::SECONDS_PER_MINUTE + + $diff->s; + + return $absolute || !$diff->invert ? $value : -$value; } /** - * Get the difference in seconds + * Get the difference in seconds using timestamps. * - * @param \Carbon\Carbon|null $dt - * @param bool $abs Get the absolute of the difference + * @param \Carbon\Carbon|\DateTimeInterface|string|null $date + * @param bool $absolute Get the absolute of the difference * * @return int */ - public function diffInSeconds(Carbon $dt = null, $abs = true) + public function diffInRealSeconds($date = null, $absolute = true) { - $dt = $dt ?: static::now($this->getTimezone()); - $value = $dt->getTimestamp() - $this->getTimestamp(); + $date = $this->resolveCarbon($date); + $value = $date->getTimestamp() - $this->getTimestamp(); - return $abs ? abs($value) : $value; + return $absolute ? abs($value) : $value; } /** @@ -2752,7 +3684,7 @@ class Carbon extends DateTime } /** - * The number of seconds until 23:23:59. + * The number of seconds until 23:59:59. * * @return int */ @@ -2783,61 +3715,83 @@ class Carbon extends DateTime * @param Carbon|null $other * @param bool $absolute removes time difference modifiers ago, after, etc * @param bool $short displays short format of time units + * @param int $parts displays number of parts in the interval * * @return string */ - public function diffForHumans(Carbon $other = null, $absolute = false, $short = false) + public function diffForHumans($other = null, $absolute = false, $short = false, $parts = 1) { $isNow = $other === null; + $interval = array(); + + $parts = min(6, max(1, (int) $parts)); + $count = 1; + $unit = $short ? 's' : 'second'; if ($isNow) { - $other = static::now($this->getTimezone()); + $other = $this->nowWithSameTz(); + } elseif (!$other instanceof DateTime && !$other instanceof DateTimeInterface) { + $other = static::parse($other); } $diffInterval = $this->diff($other); - switch (true) { - case $diffInterval->y > 0: - $unit = $short ? 'y' : 'year'; - $count = $diffInterval->y; - break; - - case $diffInterval->m > 0: - $unit = $short ? 'm' : 'month'; - $count = $diffInterval->m; - break; + $diffIntervalArray = array( + array('value' => $diffInterval->y, 'unit' => 'year', 'unitShort' => 'y'), + array('value' => $diffInterval->m, 'unit' => 'month', 'unitShort' => 'm'), + array('value' => $diffInterval->d, 'unit' => 'day', 'unitShort' => 'd'), + array('value' => $diffInterval->h, 'unit' => 'hour', 'unitShort' => 'h'), + array('value' => $diffInterval->i, 'unit' => 'minute', 'unitShort' => 'min'), + array('value' => $diffInterval->s, 'unit' => 'second', 'unitShort' => 's'), + ); - case $diffInterval->d > 0: - $unit = $short ? 'd' : 'day'; - $count = $diffInterval->d; + foreach ($diffIntervalArray as $diffIntervalData) { + if ($diffIntervalData['value'] > 0) { + $unit = $short ? $diffIntervalData['unitShort'] : $diffIntervalData['unit']; + $count = $diffIntervalData['value']; - if ($count >= static::DAYS_PER_WEEK) { + if ($diffIntervalData['unit'] === 'day' && $count >= static::DAYS_PER_WEEK) { $unit = $short ? 'w' : 'week'; $count = (int) ($count / static::DAYS_PER_WEEK); - } - break; - case $diffInterval->h > 0: - $unit = $short ? 'h' : 'hour'; - $count = $diffInterval->h; - break; + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); - case $diffInterval->i > 0: - $unit = $short ? 'min' : 'minute'; - $count = $diffInterval->i; - break; + // get the count days excluding weeks (might be zero) + $numOfDaysCount = (int) ($diffIntervalData['value'] - ($count * static::DAYS_PER_WEEK)); - default: - $count = $diffInterval->s; - $unit = $short ? 's' : 'second'; + if ($numOfDaysCount > 0 && count($interval) < $parts) { + $unit = $short ? 'd' : 'day'; + $count = $numOfDaysCount; + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); + } + } else { + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); + } + } + + // break the loop after we get the required number of parts in array + if (count($interval) >= $parts) { break; + } } - if ($count === 0) { - $count = 1; + if (count($interval) === 0) { + if ($isNow && static::getHumanDiffOptions() & self::JUST_NOW) { + $key = 'diff_now'; + $translation = static::translator()->trans($key); + if ($translation !== $key) { + return $translation; + } + } + $count = static::getHumanDiffOptions() & self::NO_ZERO_DIFF ? 1 : 0; + $unit = $short ? 's' : 'second'; + $interval[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); } - $time = static::translator()->transChoice($unit, $count, array(':count' => $count)); + // join the interval parts by a space + $time = implode(' ', $interval); + + unset($diffIntervalArray, $interval); if ($absolute) { return $time; @@ -2847,10 +3801,29 @@ class Carbon extends DateTime $transId = $isNow ? ($isFuture ? 'from_now' : 'ago') : ($isFuture ? 'after' : 'before'); - // Some langs have special pluralization for past and future tense. - $tryKeyExists = $unit.'_'.$transId; - if ($tryKeyExists !== static::translator()->transChoice($tryKeyExists, $count)) { - $time = static::translator()->transChoice($tryKeyExists, $count, array(':count' => $count)); + if ($parts === 1) { + if ($isNow && $unit === 'day') { + if ($count === 1 && static::getHumanDiffOptions() & self::ONE_DAY_WORDS) { + $key = $isFuture ? 'diff_tomorrow' : 'diff_yesterday'; + $translation = static::translator()->trans($key); + if ($translation !== $key) { + return $translation; + } + } + if ($count === 2 && static::getHumanDiffOptions() & self::TWO_DAY_WORDS) { + $key = $isFuture ? 'diff_after_tomorrow' : 'diff_before_yesterday'; + $translation = static::translator()->trans($key); + if ($translation !== $key) { + return $translation; + } + } + } + // Some langs have special pluralization for past and future tense. + $key = $unit.'_'.$transId; + $count = isset($count) ? $count : 1; + if ($key !== static::translator()->transChoice($key, $count)) { + $time = static::translator()->transChoice($key, $count, array(':count' => $count)); + } } return static::translator()->trans($transId, array(':time' => $time)); @@ -2861,23 +3834,23 @@ class Carbon extends DateTime /////////////////////////////////////////////////////////////////// /** - * Resets the time to 00:00:00 + * Resets the time to 00:00:00 start of day * * @return static */ public function startOfDay() { - return $this->setTime(0, 0, 0); + return $this->modify('00:00:00.000000'); } /** - * Resets the time to 23:59:59 + * Resets the time to 23:59:59 end of day * * @return static */ public function endOfDay() { - return $this->setTime(23, 59, 59); + return $this->modify('23.59.59.999999'); } /** @@ -2887,7 +3860,7 @@ class Carbon extends DateTime */ public function startOfMonth() { - return $this->setDateTime($this->year, $this->month, 1, 0, 0, 0); + return $this->setDate($this->year, $this->month, 1)->startOfDay(); } /** @@ -2897,7 +3870,7 @@ class Carbon extends DateTime */ public function endOfMonth() { - return $this->setDateTime($this->year, $this->month, $this->daysInMonth, 23, 59, 59); + return $this->setDate($this->year, $this->month, $this->daysInMonth)->endOfDay(); } /** @@ -2909,7 +3882,7 @@ class Carbon extends DateTime { $month = ($this->quarter - 1) * static::MONTHS_PER_QUARTER + 1; - return $this->setDateTime($this->year, $month, 1, 0, 0, 0); + return $this->setDate($this->year, $month, 1)->startOfDay(); } /** @@ -2929,7 +3902,7 @@ class Carbon extends DateTime */ public function startOfYear() { - return $this->setDateTime($this->year, 1, 1, 0, 0, 0); + return $this->setDate($this->year, 1, 1)->startOfDay(); } /** @@ -2939,7 +3912,7 @@ class Carbon extends DateTime */ public function endOfYear() { - return $this->setDateTime($this->year, 12, 31, 23, 59, 59); + return $this->setDate($this->year, 12, 31)->endOfDay(); } /** @@ -2951,7 +3924,7 @@ class Carbon extends DateTime { $year = $this->year - $this->year % static::YEARS_PER_DECADE; - return $this->setDateTime($year, 1, 1, 0, 0, 0); + return $this->setDate($year, 1, 1)->startOfDay(); } /** @@ -2963,7 +3936,7 @@ class Carbon extends DateTime { $year = $this->year - $this->year % static::YEARS_PER_DECADE + static::YEARS_PER_DECADE - 1; - return $this->setDateTime($year, 12, 31, 23, 59, 59); + return $this->setDate($year, 12, 31)->endOfDay(); } /** @@ -2975,7 +3948,7 @@ class Carbon extends DateTime { $year = $this->year - ($this->year - 1) % static::YEARS_PER_CENTURY; - return $this->setDateTime($year, 1, 1, 0, 0, 0); + return $this->setDate($year, 1, 1)->startOfDay(); } /** @@ -2987,7 +3960,7 @@ class Carbon extends DateTime { $year = $this->year - 1 - ($this->year - 1) % static::YEARS_PER_CENTURY + static::YEARS_PER_CENTURY; - return $this->setDateTime($year, 12, 31, 23, 59, 59); + return $this->setDate($year, 12, 31)->endOfDay(); } /** @@ -3018,6 +3991,56 @@ class Carbon extends DateTime return $this->endOfDay(); } + /** + * Modify to start of current hour, minutes and seconds become 0 + * + * @return static + */ + public function startOfHour() + { + return $this->setTime($this->hour, 0, 0); + } + + /** + * Modify to end of current hour, minutes and seconds become 59 + * + * @return static + */ + public function endOfHour() + { + return $this->setTime($this->hour, 59, 59); + } + + /** + * Modify to start of current minute, seconds become 0 + * + * @return static + */ + public function startOfMinute() + { + return $this->setTime($this->hour, $this->minute, 0); + } + + /** + * Modify to end of current minute, seconds become 59 + * + * @return static + */ + public function endOfMinute() + { + return $this->setTime($this->hour, $this->minute, 59); + } + + /** + * Modify to midday, default to self::$midDayAt + * + * @return static + */ + public function midDay() + { + return $this->setTime(self::$midDayAt, 0, 0); + } + /** * Modify to the next occurrence of a given day of the week. * If no dayOfWeek is provided, modify to the next occurrence @@ -3043,7 +4066,7 @@ class Carbon extends DateTime * @param bool $weekday * @param bool $forward * - * @return static + * @return $this */ private function nextOrPreviousDay($weekday = true, $forward = true) { @@ -3069,7 +4092,7 @@ class Carbon extends DateTime /** * Go backward to the previous weekday. * - * @return static + * @return $this */ public function previousWeekday() { @@ -3079,7 +4102,7 @@ class Carbon extends DateTime /** * Go forward to the next weekend day. * - * @return static + * @return $this */ public function nextWeekendDay() { @@ -3089,7 +4112,7 @@ class Carbon extends DateTime /** * Go backward to the previous weekend day. * - * @return static + * @return $this */ public function previousWeekendDay() { @@ -3170,11 +4193,11 @@ class Carbon extends DateTime */ public function nthOfMonth($nth, $dayOfWeek) { - $dt = $this->copy()->firstOfMonth(); - $check = $dt->format('Y-m'); - $dt->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + $date = $this->copy()->firstOfMonth(); + $check = $date->format('Y-m'); + $date->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return $dt->format('Y-m') === $check ? $this->modify($dt) : false; + return $date->format('Y-m') === $check ? $this->modify($date) : false; } /** @@ -3183,7 +4206,7 @@ class Carbon extends DateTime * first day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3198,7 +4221,7 @@ class Carbon extends DateTime * last day of the current quarter. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3220,12 +4243,12 @@ class Carbon extends DateTime */ public function nthOfQuarter($nth, $dayOfWeek) { - $dt = $this->copy()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); - $lastMonth = $dt->month; - $year = $dt->year; - $dt->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + $date = $this->copy()->day(1)->month($this->quarter * static::MONTHS_PER_QUARTER); + $lastMonth = $date->month; + $year = $date->year; + $date->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return ($lastMonth < $dt->month || $year !== $dt->year) ? false : $this->modify($dt); + return ($lastMonth < $date->month || $year !== $date->year) ? false : $this->modify($date); } /** @@ -3234,7 +4257,7 @@ class Carbon extends DateTime * first day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3249,7 +4272,7 @@ class Carbon extends DateTime * last day of the current year. Use the supplied constants * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int|null $dayOfWeek + * @param int|null $dayOfWeek day of the week default null * * @return static */ @@ -3271,85 +4294,207 @@ class Carbon extends DateTime */ public function nthOfYear($nth, $dayOfWeek) { - $dt = $this->copy()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); + $date = $this->copy()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return $this->year === $dt->year ? $this->modify($dt) : false; + return $this->year === $date->year ? $this->modify($date) : false; } /** * Modify the current instance to the average of a given instance (default now) and the current instance. * - * @param \Carbon\Carbon|null $dt + * @param \Carbon\Carbon|\DateTimeInterface|null $date * * @return static */ - public function average(Carbon $dt = null) + public function average($date = null) { - $dt = $dt ?: static::now($this->getTimezone()); + return $this->addSeconds((int) ($this->diffInSeconds($this->resolveCarbon($date), false) / 2)); + } + + /////////////////////////////////////////////////////////////////// + /////////////////////////// SERIALIZATION ///////////////////////// + /////////////////////////////////////////////////////////////////// - return $this->addSeconds((int) ($this->diffInSeconds($dt, false) / 2)); + /** + * Return a serialized string of the instance. + * + * @return string + */ + public function serialize() + { + return serialize($this); } /** - * Check if its the birthday. Compares the date/month values of the two dates. + * Create an instance from a serialized string. * - * @param \Carbon\Carbon|null $dt The instance to compare with or null to use current day. + * @param string $value * - * @return bool + * @throws \InvalidArgumentException + * + * @return static */ - public function isBirthday(Carbon $dt = null) + public static function fromSerialized($value) { - return $this->isSameAs('md', $dt); + $instance = @unserialize($value); + + if (!$instance instanceof static) { + throw new InvalidArgumentException('Invalid serialized value.'); + } + + return $instance; } /** - * Consider the timezone when modifying the instance. + * The __set_state handler. * - * @param string $modify + * @param array $array * * @return static */ - public function modify($modify) + public static function __set_state($array) + { + return static::instance(parent::__set_state($array)); + } + + /** + * Prepare the object for JSON serialization. + * + * @return array|string + */ + public function jsonSerialize() { - if ($this->local) { - return parent::modify($modify); + if (static::$serializer) { + return call_user_func(static::$serializer, $this); } - $timezone = $this->getTimezone(); - $this->setTimezone('UTC'); - $instance = parent::modify($modify); - $this->setTimezone($timezone); + $carbon = $this; - return $instance; + return call_user_func(function () use ($carbon) { + return get_object_vars($carbon); + }); } /** - * Return a serialized string of the instance. + * JSON serialize all Carbon instances using the given callback. * - * @return string + * @param callable $callback + * + * @return void */ - public function serialize() + public static function serializeUsing($callback) { - return serialize($this); + static::$serializer = $callback; } + /////////////////////////////////////////////////////////////////// + /////////////////////////////// MACRO ///////////////////////////// + /////////////////////////////////////////////////////////////////// + /** - * Create an instance form a serialized string. + * Register a custom macro. * - * @param string $value + * @param string $name + * @param object|callable $macro * - * @throws \InvalidArgumentException + * @return void + */ + public static function macro($name, $macro) + { + static::$localMacros[$name] = $macro; + } + + /** + * Mix another object into the class. * - * @return static + * @param object $mixin + * + * @throws \ReflectionException + * + * @return void */ - public static function fromSerialized($value) + public static function mixin($mixin) { - $instance = @unserialize($value); + $reflection = new \ReflectionClass($mixin); + $methods = $reflection->getMethods( + \ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED + ); - if (!$instance instanceof static) { - throw new InvalidArgumentException('Invalid serialized value.'); + foreach ($methods as $method) { + $method->setAccessible(true); + + static::macro($method->name, $method->invoke($mixin)); } + } - return $instance; + /** + * Checks if macro is registered. + * + * @param string $name + * + * @return bool + */ + public static function hasMacro($name) + { + return isset(static::$localMacros[$name]); + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method + * @param array $parameters + * + * @throws \BadMethodCallException + * + * @return mixed + */ + public static function __callStatic($method, $parameters) + { + if (!static::hasMacro($method)) { + throw new \BadMethodCallException("Method $method does not exist."); + } + + if (static::$localMacros[$method] instanceof Closure && method_exists('Closure', 'bind')) { + return call_user_func_array(Closure::bind(static::$localMacros[$method], null, get_called_class()), $parameters); + } + + return call_user_func_array(static::$localMacros[$method], $parameters); + } + + /** + * Dynamically handle calls to the class. + * + * @param string $method + * @param array $parameters + * + * @throws \BadMethodCallException|\ReflectionException + * + * @return mixed + */ + public function __call($method, $parameters) + { + if (!static::hasMacro($method)) { + throw new \BadMethodCallException("Method $method does not exist."); + } + + $macro = static::$localMacros[$method]; + + $reflexion = new \ReflectionFunction($macro); + $reflectionParameters = $reflexion->getParameters(); + $expectedCount = count($reflectionParameters); + $actualCount = count($parameters); + if ($expectedCount > $actualCount && $reflectionParameters[$expectedCount - 1]->name === 'self') { + for ($i = $actualCount; $i < $expectedCount - 1; $i++) { + $parameters[] = $reflectionParameters[$i]->getDefaultValue(); + } + $parameters[] = $this; + } + + if ($macro instanceof Closure && method_exists($macro, 'bindTo')) { + return call_user_func_array($macro->bindTo($this, get_class($this)), $parameters); + } + + return call_user_func_array($macro, $parameters); } } diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php index 514ca6e8..9f8ab043 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -13,8 +13,6 @@ namespace Carbon; use DateInterval; use InvalidArgumentException; -use Symfony\Component\Translation\Loader\ArrayLoader; -use Symfony\Component\Translation\Translator; use Symfony\Component\Translation\TranslatorInterface; /** @@ -47,21 +45,21 @@ use Symfony\Component\Translation\TranslatorInterface; * @method static CarbonInterval minute($minutes = 1) Alias for minutes() * @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds. * @method static CarbonInterval second($seconds = 1) Alias for seconds() - * @method CarbonInterval years() years($years = 1) Set the years portion of the current interval. - * @method CarbonInterval year() year($years = 1) Alias for years(). - * @method CarbonInterval months() months($months = 1) Set the months portion of the current interval. - * @method CarbonInterval month() month($months = 1) Alias for months(). - * @method CarbonInterval weeks() weeks($weeks = 1) Set the weeks portion of the current interval. Will overwrite dayz value. - * @method CarbonInterval week() week($weeks = 1) Alias for weeks(). - * @method CarbonInterval days() days($days = 1) Set the days portion of the current interval. - * @method CarbonInterval dayz() dayz($days = 1) Alias for days(). - * @method CarbonInterval day() day($days = 1) Alias for days(). - * @method CarbonInterval hours() hours($hours = 1) Set the hours portion of the current interval. - * @method CarbonInterval hour() hour($hours = 1) Alias for hours(). - * @method CarbonInterval minutes() minutes($minutes = 1) Set the minutes portion of the current interval. - * @method CarbonInterval minute() minute($minutes = 1) Alias for minutes(). - * @method CarbonInterval seconds() seconds($seconds = 1) Set the seconds portion of the current interval. - * @method CarbonInterval second() second($seconds = 1) Alias for seconds(). + * @method CarbonInterval years($years = 1) Set the years portion of the current interval. + * @method CarbonInterval year($years = 1) Alias for years(). + * @method CarbonInterval months($months = 1) Set the months portion of the current interval. + * @method CarbonInterval month($months = 1) Alias for months(). + * @method CarbonInterval weeks($weeks = 1) Set the weeks portion of the current interval. Will overwrite dayz value. + * @method CarbonInterval week($weeks = 1) Alias for weeks(). + * @method CarbonInterval days($days = 1) Set the days portion of the current interval. + * @method CarbonInterval dayz($days = 1) Alias for days(). + * @method CarbonInterval day($days = 1) Alias for days(). + * @method CarbonInterval hours($hours = 1) Set the hours portion of the current interval. + * @method CarbonInterval hour($hours = 1) Alias for hours(). + * @method CarbonInterval minutes($minutes = 1) Set the minutes portion of the current interval. + * @method CarbonInterval minute($minutes = 1) Alias for minutes(). + * @method CarbonInterval seconds($seconds = 1) Set the seconds portion of the current interval. + * @method CarbonInterval second($seconds = 1) Alias for seconds(). */ class CarbonInterval extends DateInterval { @@ -86,7 +84,7 @@ class CarbonInterval extends DateInterval /** * Before PHP 5.4.20/5.5.4 instead of FALSE days will be set to -99999 when the interval instance - * was created by DateTime:diff(). + * was created by DateTime::diff(). */ const PHP_DAYS_FALSE = -99999; @@ -119,27 +117,31 @@ class CarbonInterval extends DateInterval */ public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null) { - $spec = static::PERIOD_PREFIX; + $spec = $years; - $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; - $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; + if (!is_string($spec) || floatval($years) || preg_match('/^[0-9.]/', $years)) { + $spec = static::PERIOD_PREFIX; - $specDays = 0; - $specDays += $weeks > 0 ? $weeks * Carbon::DAYS_PER_WEEK : 0; - $specDays += $days > 0 ? $days : 0; + $spec .= $years > 0 ? $years.static::PERIOD_YEARS : ''; + $spec .= $months > 0 ? $months.static::PERIOD_MONTHS : ''; - $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; + $specDays = 0; + $specDays += $weeks > 0 ? $weeks * Carbon::DAYS_PER_WEEK : 0; + $specDays += $days > 0 ? $days : 0; - if ($hours > 0 || $minutes > 0 || $seconds > 0) { - $spec .= static::PERIOD_TIME_PREFIX; - $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; - $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; - $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; - } + $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; + + if ($hours > 0 || $minutes > 0 || $seconds > 0) { + $spec .= static::PERIOD_TIME_PREFIX; + $spec .= $hours > 0 ? $hours.static::PERIOD_HOURS : ''; + $spec .= $minutes > 0 ? $minutes.static::PERIOD_MINUTES : ''; + $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; + } - if ($spec === static::PERIOD_PREFIX) { - // Allow the zero interval. - $spec .= '0'.static::PERIOD_YEARS; + if ($spec === static::PERIOD_PREFIX) { + // Allow the zero interval. + $spec .= '0'.static::PERIOD_YEARS; + } } parent::__construct($spec); @@ -213,6 +215,117 @@ class CarbonInterval extends DateInterval } } + /** + * Creates a CarbonInterval from string + * + * Format: + * + * Suffix | Unit | Example | DateInterval expression + * -------|---------|---------|------------------------ + * y | years | 1y | P1Y + * mo | months | 3mo | P3M + * w | weeks | 2w | P2W + * d | days | 28d | P28D + * h | hours | 4h | PT4H + * m | minutes | 12m | PT12M + * s | seconds | 59s | PT59S + * + * e. g. `1w 3d 4h 32m 23s` is converted to 10 days 4 hours 32 minutes and 23 seconds. + * + * Special cases: + * - An empty string will return a zero interval + * - Fractions are allowed for weeks, days, hours and minutes and will be converted + * and rounded to the next smaller value (caution: 0.5w = 4d) + * + * @param string $intervalDefinition + * + * @return static + */ + public static function fromString($intervalDefinition) + { + if (empty($intervalDefinition)) { + return new static(0); + } + + $years = 0; + $months = 0; + $weeks = 0; + $days = 0; + $hours = 0; + $minutes = 0; + $seconds = 0; + + $pattern = '/(\d+(?:\.\d+)?)\h*([^\d\h]*)/i'; + preg_match_all($pattern, $intervalDefinition, $parts, PREG_SET_ORDER); + while ($match = array_shift($parts)) { + list($part, $value, $unit) = $match; + $intValue = intval($value); + $fraction = floatval($value) - $intValue; + switch (strtolower($unit)) { + case 'year': + case 'years': + case 'y': + $years += $intValue; + break; + + case 'month': + case 'months': + case 'mo': + $months += $intValue; + break; + + case 'week': + case 'weeks': + case 'w': + $weeks += $intValue; + if ($fraction != 0) { + $parts[] = array(null, $fraction * Carbon::DAYS_PER_WEEK, 'd'); + } + break; + + case 'day': + case 'days': + case 'd': + $days += $intValue; + if ($fraction != 0) { + $parts[] = array(null, $fraction * Carbon::HOURS_PER_DAY, 'h'); + } + break; + + case 'hour': + case 'hours': + case 'h': + $hours += $intValue; + if ($fraction != 0) { + $parts[] = array(null, $fraction * Carbon::MINUTES_PER_HOUR, 'm'); + } + break; + + case 'minute': + case 'minutes': + case 'm': + $minutes += $intValue; + if ($fraction != 0) { + $seconds += round($fraction * Carbon::SECONDS_PER_MINUTE); + } + break; + + case 'second': + case 'seconds': + case 's': + $seconds += $intValue; + break; + + default: + throw new InvalidArgumentException( + sprintf('Invalid part %s in definition %s', $part, $intervalDefinition) + ); + } + } + + return new static($years, $months, $weeks, $days, $hours, $minutes, $seconds); + } + /** * Create a CarbonInterval instance from a DateInterval one. Can not instance * DateInterval objects created from DateTime::diff() as you can't externally @@ -220,19 +333,12 @@ class CarbonInterval extends DateInterval * * @param DateInterval $di * - * @throws \InvalidArgumentException - * * @return static */ public static function instance(DateInterval $di) { - if (static::wasCreatedFromDiff($di)) { - throw new InvalidArgumentException('Can not instance a DateInterval object created from DateTime::diff().'); - } - - $instance = new static($di->y, $di->m, 0, $di->d, $di->h, $di->i, $di->s); + $instance = new static(static::getDateIntervalSpec($di)); $instance->invert = $di->invert; - $instance->days = $di->days; return $instance; } @@ -249,9 +355,7 @@ class CarbonInterval extends DateInterval protected static function translator() { if (static::$translator === null) { - static::$translator = new Translator('en'); - static::$translator->addLoader('array', new ArrayLoader()); - static::setLocale('en'); + static::$translator = Translator::get(); } return static::$translator; @@ -294,10 +398,7 @@ class CarbonInterval extends DateInterval */ public static function setLocale($locale) { - static::translator()->setLocale($locale); - - // Ensure the locale has been loaded. - static::translator()->addResource('array', require __DIR__.'/Lang/'.$locale.'.php', $locale); + return static::translator()->setLocale($locale) !== false; } /////////////////////////////////////////////////////////////////// @@ -478,7 +579,7 @@ class CarbonInterval extends DateInterval $parts = array(); foreach ($periods as $unit => $count) { if ($count > 0) { - array_push($parts, static::translator()->transChoice($unit, $count, array(':count' => $count))); + $parts[] = static::translator()->transChoice($unit, $count, array(':count' => $count)); } } @@ -521,22 +622,48 @@ class CarbonInterval extends DateInterval } /** - * Get the interval_spec string + * Multiply current instance given number of times + * + * @param float $factor + * + * @return $this + */ + public function times($factor) + { + if ($factor < 0) { + $this->invert = $this->invert ? 0 : 1; + $factor = -$factor; + } + + $this->years = round($this->years * $factor); + $this->months = round($this->months * $factor); + $this->dayz = round($this->dayz * $factor); + $this->hours = round($this->hours * $factor); + $this->minutes = round($this->minutes * $factor); + $this->seconds = round($this->seconds * $factor); + + return $this; + } + + /** + * Get the interval_spec string of a date interval + * + * @param DateInterval $interval * * @return string */ - public function spec() + public static function getDateIntervalSpec(DateInterval $interval) { $date = array_filter(array( - static::PERIOD_YEARS => $this->y, - static::PERIOD_MONTHS => $this->m, - static::PERIOD_DAYS => $this->d, + static::PERIOD_YEARS => $interval->y, + static::PERIOD_MONTHS => $interval->m, + static::PERIOD_DAYS => $interval->d, )); $time = array_filter(array( - static::PERIOD_HOURS => $this->h, - static::PERIOD_MINUTES => $this->i, - static::PERIOD_SECONDS => $this->s, + static::PERIOD_HOURS => $interval->h, + static::PERIOD_MINUTES => $interval->i, + static::PERIOD_SECONDS => $interval->s, )); $specString = static::PERIOD_PREFIX; @@ -554,4 +681,49 @@ class CarbonInterval extends DateInterval return $specString === static::PERIOD_PREFIX ? 'PT0S' : $specString; } + + /** + * Get the interval_spec string + * + * @return string + */ + public function spec() + { + return static::getDateIntervalSpec($this); + } + + /** + * Comparing 2 date intervals + * + * @param DateInterval $a + * @param DateInterval $b + * + * @return int + */ + public static function compareDateIntervals(DateInterval $a, DateInterval $b) + { + $current = Carbon::now(); + $passed = $current->copy()->add($b); + $current->add($a); + + if ($current < $passed) { + return -1; + } elseif ($current > $passed) { + return 1; + } + + return 0; + } + + /** + * Comparing with passed interval + * + * @param DateInterval $interval + * + * @return int + */ + public function compare(DateInterval $interval) + { + return static::compareDateIntervals($this, $interval); + } } diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/af.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/af.php index a8610d6d..5cf6a8d9 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/af.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/af.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 jaar|:count jare', - 'y' => '1 jaar|:count jare', - 'month' => '1 maand|:count maande', - 'm' => '1 maand|:count maande', - 'week' => '1 week|:count weke', - 'w' => '1 week|:count weke', - 'day' => '1 dag|:count dae', - 'd' => '1 dag|:count dae', - 'hour' => '1 uur|:count ure', - 'h' => '1 uur|:count ure', - 'minute' => '1 minuut|:count minute', - 'min' => '1 minuut|:count minute', - 'second' => '1 sekond|:count sekondes', - 's' => '1 sekond|:count sekondes', + 'year' => ':count jaar|:count jare', + 'y' => ':count jaar|:count jare', + 'month' => ':count maand|:count maande', + 'm' => ':count maand|:count maande', + 'week' => ':count week|:count weke', + 'w' => ':count week|:count weke', + 'day' => ':count dag|:count dae', + 'd' => ':count dag|:count dae', + 'hour' => ':count uur|:count ure', + 'h' => ':count uur|:count ure', + 'minute' => ':count minuut|:count minute', + 'min' => ':count minuut|:count minute', + 'second' => ':count sekond|:count sekondes', + 's' => ':count sekond|:count sekondes', 'ago' => ':time terug', 'from_now' => ':time van nou af', 'after' => ':time na', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar.php index 253cf503..de8f6b85 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar.php @@ -14,8 +14,8 @@ return array( 'y' => '{0}سنة|{1}سنة|{2}سنتين|[3,10]:count سنوات|[11,Inf]:count سنة', 'month' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر', 'm' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر', - 'week' => '{0}إسبوع|{1}إسبوع|{2}إسبوعين|[3,10]:count أسابيع|[11,Inf]:count إسبوع', - 'w' => '{0}إسبوع|{1}إسبوع|{2}إسبوعين|[3,10]:count أسابيع|[11,Inf]:count إسبوع', + 'week' => '{0}أسبوع|{1}أسبوع|{2}أسبوعين|[3,10]:count أسابيع|[11,Inf]:count أسبوع', + 'w' => '{0}أسبوع|{1}أسبوع|{2}أسبوعين|[3,10]:count أسابيع|[11,Inf]:count أسبوع', 'day' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم', 'd' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم', 'hour' => '{0}ساعة|{1}ساعة|{2}ساعتين|[3,10]:count ساعات|[11,Inf]:count ساعة', @@ -25,7 +25,7 @@ return array( 'second' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية', 's' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية', 'ago' => 'منذ :time', - 'from_now' => 'من الآن :time', + 'from_now' => ':time من الآن', 'after' => 'بعد :time', 'before' => 'قبل :time', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php new file mode 100644 index 00000000..846ae024 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ar_Shakl.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '[0,1] سَنَة|{2} سَنَتَيْن|[3,10]:count سَنَوَات|[11,Inf]:count سَنَة', + 'y' => '[0,1] سَنَة|{2} سَنَتَيْن|[3,10]:count سَنَوَات|[11,Inf]:count سَنَة', + 'month' => '[0,1] شَهْرَ|{2} شَهْرَيْن|[3,10]:count أَشْهُر|[11,Inf]:count شَهْرَ', + 'm' => '[0,1] شَهْرَ|{2} شَهْرَيْن|[3,10]:count أَشْهُر|[11,Inf]:count شَهْرَ', + 'week' => '[0,1] أُسْبُوع|{2} أُسْبُوعَيْن|[3,10]:count أَسَابِيع|[11,Inf]:count أُسْبُوع', + 'w' => '[0,1] أُسْبُوع|{2} أُسْبُوعَيْن|[3,10]:count أَسَابِيع|[11,Inf]:count أُسْبُوع', + 'day' => '[0,1] يَوْم|{2} يَوْمَيْن|[3,10]:count أَيَّام|[11,Inf] يَوْم', + 'd' => '[0,1] يَوْم|{2} يَوْمَيْن|[3,10]:count أَيَّام|[11,Inf] يَوْم', + 'hour' => '[0,1] سَاعَة|{2} سَاعَتَيْن|[3,10]:count سَاعَات|[11,Inf]:count سَاعَة', + 'h' => '[0,1] سَاعَة|{2} سَاعَتَيْن|[3,10]:count سَاعَات|[11,Inf]:count سَاعَة', + 'minute' => '[0,1] دَقِيقَة|{2} دَقِيقَتَيْن|[3,10]:count دَقَائِق|[11,Inf]:count دَقِيقَة', + 'min' => '[0,1] دَقِيقَة|{2} دَقِيقَتَيْن|[3,10]:count دَقَائِق|[11,Inf]:count دَقِيقَة', + 'second' => '[0,1] ثَانِيَة|{2} ثَانِيَتَيْن|[3,10]:count ثَوَان|[11,Inf]:count ثَانِيَة', + 's' => '[0,1] ثَانِيَة|{2} ثَانِيَتَيْن|[3,10]:count ثَوَان|[11,Inf]:count ثَانِيَة', + 'ago' => 'مُنْذُ :time', + 'from_now' => 'مِنَ الْآن :time', + 'after' => 'بَعْدَ :time', + 'before' => 'قَبْلَ :time', +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/az.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/az.php index e4f3789a..d567c63c 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/az.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/az.php @@ -24,8 +24,8 @@ return array( 'min' => ':count dəqiqə', 'second' => ':count saniyə', 's' => ':count saniyə', - 'ago' => ':time öncə', + 'ago' => ':time əvvəl', 'from_now' => ':time sonra', 'after' => ':time sonra', - 'before' => ':time öncə', + 'before' => ':time əvvəl', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/bg.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/bg.php index 309934b5..d9e510be 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/bg.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/bg.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 година|:count години', - 'y' => '1 година|:count години', - 'month' => '1 месец|:count месеца', - 'm' => '1 месец|:count месеца', - 'week' => '1 седмица|:count седмици', - 'w' => '1 седмица|:count седмици', - 'day' => '1 ден|:count дни', - 'd' => '1 ден|:count дни', - 'hour' => '1 час|:count часа', - 'h' => '1 час|:count часа', - 'minute' => '1 минута|:count минути', - 'm' => '1 минута|:count минути', - 'second' => '1 секунда|:count секунди', - 's' => '1 секунда|:count секунди', + 'year' => ':count година|:count години', + 'y' => ':count година|:count години', + 'month' => ':count месец|:count месеца', + 'm' => ':count месец|:count месеца', + 'week' => ':count седмица|:count седмици', + 'w' => ':count седмица|:count седмици', + 'day' => ':count ден|:count дни', + 'd' => ':count ден|:count дни', + 'hour' => ':count час|:count часа', + 'h' => ':count час|:count часа', + 'minute' => ':count минута|:count минути', + 'min' => ':count минута|:count минути', + 'second' => ':count секунда|:count секунди', + 's' => ':count секунда|:count секунди', 'ago' => 'преди :time', 'from_now' => ':time от сега', 'after' => 'след :time', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ca.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ca.php index 91262e76..0e5435fd 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ca.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ca.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 any|:count anys', - 'y' => '1 any|:count anys', - 'month' => '1 mes|:count mesos', - 'm' => '1 mes|:count mesos', - 'week' => '1 setmana|:count setmanes', - 'w' => '1 setmana|:count setmanes', - 'day' => '1 dia|:count dies', - 'd' => '1 dia|:count dies', - 'hour' => '1 hora|:count hores', - 'h' => '1 hora|:count hores', - 'minute' => '1 minut|:count minuts', - 'min' => '1 minut|:count minuts', - 'second' => '1 segon|:count segons', - 's' => '1 segon|:count segons', + 'year' => ':count any|:count anys', + 'y' => ':count any|:count anys', + 'month' => ':count mes|:count mesos', + 'm' => ':count mes|:count mesos', + 'week' => ':count setmana|:count setmanes', + 'w' => ':count setmana|:count setmanes', + 'day' => ':count dia|:count dies', + 'd' => ':count dia|:count dies', + 'hour' => ':count hora|:count hores', + 'h' => ':count hora|:count hores', + 'minute' => ':count minut|:count minuts', + 'min' => ':count minut|:count minuts', + 'second' => ':count segon|:count segons', + 's' => ':count segon|:count segons', 'ago' => 'fa :time', 'from_now' => 'dins de :time', 'after' => ':time després', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php index f4aba76c..a447ce29 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cs.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 rok|:count roky|:count let', - 'y' => '1 rok|:count roky|:count let', - 'month' => '1 měsíc|:count měsíce|:count měsíců', - 'm' => '1 měsíc|:count měsíce|:count měsíců', - 'week' => '1 týden|:count týdny|:count týdnů', - 'w' => '1 týden|:count týdny|:count týdnů', - 'day' => '1 den|:count dny|:count dní', - 'd' => '1 den|:count dny|:count dní', - 'hour' => '1 hodinu|:count hodiny|:count hodin', - 'h' => '1 hodinu|:count hodiny|:count hodin', - 'minute' => '1 minutu|:count minuty|:count minut', - 'min' => '1 minutu|:count minuty|:count minut', - 'second' => '1 sekundu|:count sekundy|:count sekund', - 's' => '1 sekundu|:count sekundy|:count sekund', + 'year' => ':count rok|:count roky|:count let', + 'y' => ':count rok|:count roky|:count let', + 'month' => ':count měsíc|:count měsíce|:count měsíců', + 'm' => ':count měsíc|:count měsíce|:count měsíců', + 'week' => ':count týden|:count týdny|:count týdnů', + 'w' => ':count týden|:count týdny|:count týdnů', + 'day' => ':count den|:count dny|:count dní', + 'd' => ':count den|:count dny|:count dní', + 'hour' => ':count hodinu|:count hodiny|:count hodin', + 'h' => ':count hodinu|:count hodiny|:count hodin', + 'minute' => ':count minutu|:count minuty|:count minut', + 'min' => ':count minutu|:count minuty|:count minut', + 'second' => ':count sekundu|:count sekundy|:count sekund', + 's' => ':count sekundu|:count sekundy|:count sekund', 'ago' => ':time nazpět', 'from_now' => 'za :time', 'after' => ':time později', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php new file mode 100644 index 00000000..c93750e2 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/cy.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +return array( + 'year' => '1 flwyddyn|:count blynedd', + 'y' => ':countbl', + 'month' => '1 mis|:count fis', + 'm' => ':countmi', + 'week' => ':count wythnos', + 'w' => ':countw', + 'day' => ':count diwrnod', + 'd' => ':countd', + 'hour' => ':count awr', + 'h' => ':counth', + 'minute' => ':count munud', + 'min' => ':countm', + 'second' => ':count eiliad', + 's' => ':counts', + 'ago' => ':time yn ôl', + 'from_now' => ':time o hyn ymlaen', + 'after' => ':time ar ôl', + 'before' => ':time o\'r blaen', +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/da.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/da.php index 67104741..86507b0f 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/da.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/da.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 år|:count år', - 'y' => '1 år|:count år', - 'month' => '1 måned|:count måneder', - 'm' => '1 måned|:count måneder', - 'week' => '1 uge|:count uger', - 'w' => '1 uge|:count uger', - 'day' => '1 dag|:count dage', - 'd' => '1 dag|:count dage', - 'hour' => '1 time|:count timer', - 'h' => '1 time|:count timer', - 'minute' => '1 minut|:count minutter', - 'min' => '1 minut|:count minutter', - 'second' => '1 sekund|:count sekunder', - 's' => '1 sekund|:count sekunder', + 'year' => ':count år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count måned|:count måneder', + 'm' => ':count måned|:count måneder', + 'week' => ':count uge|:count uger', + 'w' => ':count uge|:count uger', + 'day' => ':count dag|:count dage', + 'd' => ':count dag|:count dage', + 'hour' => ':count time|:count timer', + 'h' => ':count time|:count timer', + 'minute' => ':count minut|:count minutter', + 'min' => ':count minut|:count minutter', + 'second' => ':count sekund|:count sekunder', + 's' => ':count sekund|:count sekunder', 'ago' => ':time siden', 'from_now' => 'om :time', 'after' => ':time efter', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/de.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/de.php index d1c572ac..37a2439d 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/de.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/de.php @@ -10,31 +10,31 @@ */ return array( - 'year' => '1 Jahr|:count Jahre', - 'y' => '1J|:countJ', - 'month' => '1 Monat|:count Monate', - 'm' => '1Mon|:countMon', - 'week' => '1 Woche|:count Wochen', - 'w' => '1Wo|:countWo', - 'day' => '1 Tag|:count Tage', - 'd' => '1Tg|:countTg', - 'hour' => '1 Stunde|:count Stunden', - 'h' => '1Std|:countStd', - 'minute' => '1 Minute|:count Minuten', - 'min' => '1Min|:countMin', - 'second' => '1 Sekunde|:count Sekunden', - 's' => '1Sek|:countSek', + 'year' => ':count Jahr|:count Jahre', + 'y' => ':countJ|:countJ', + 'month' => ':count Monat|:count Monate', + 'm' => ':countMon|:countMon', + 'week' => ':count Woche|:count Wochen', + 'w' => ':countWo|:countWo', + 'day' => ':count Tag|:count Tage', + 'd' => ':countTg|:countTg', + 'hour' => ':count Stunde|:count Stunden', + 'h' => ':countStd|:countStd', + 'minute' => ':count Minute|:count Minuten', + 'min' => ':countMin|:countMin', + 'second' => ':count Sekunde|:count Sekunden', + 's' => ':countSek|:countSek', 'ago' => 'vor :time', 'from_now' => 'in :time', 'after' => ':time später', 'before' => ':time zuvor', - 'year_from_now' => '1 Jahr|:count Jahren', - 'month_from_now' => '1 Monat|:count Monaten', - 'week_from_now' => '1 Woche|:count Wochen', - 'day_from_now' => '1 Tag|:count Tagen', - 'year_ago' => '1 Jahr|:count Jahren', - 'month_ago' => '1 Monat|:count Monaten', - 'week_ago' => '1 Woche|:count Wochen', - 'day_ago' => '1 Tag|:count Tagen', + 'year_from_now' => ':count Jahr|:count Jahren', + 'month_from_now' => ':count Monat|:count Monaten', + 'week_from_now' => ':count Woche|:count Wochen', + 'day_from_now' => ':count Tag|:count Tagen', + 'year_ago' => ':count Jahr|:count Jahren', + 'month_ago' => ':count Monat|:count Monaten', + 'week_ago' => ':count Woche|:count Wochen', + 'day_ago' => ':count Tag|:count Tagen', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php new file mode 100644 index 00000000..e3c50b39 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/dv_MV.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', + 'y' => '{0}އަހަރެއް|[1,Inf]:count އަހަރު', + 'month' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', + 'm' => '{0}މައްސަރެއް|[1,Inf]:count މަސް', + 'week' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', + 'w' => '{0}ހަފްތާއެއް|[1,Inf]:count ހަފްތާ', + 'day' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', + 'd' => '{0}ދުވަސް|[1,Inf]:count ދުވަސް', + 'hour' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', + 'h' => '{0}ގަޑިއިރެއް|[1,Inf]:count ގަޑި', + 'minute' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', + 'min' => '{0}މިނެޓެއް|[1,Inf]:count މިނެޓް', + 'second' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', + 's' => '{0}ސިކުންތެއް|[1,Inf]:count ސިކުންތު', + 'ago' => ':time ކުރިން', + 'from_now' => ':time ފަހުން', + 'after' => ':time ފަހުން', + 'before' => ':time ކުރި', +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/el.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/el.php index 6028074d..16b3f442 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/el.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/el.php @@ -10,22 +10,22 @@ */ return array( - 'year' => '1 χρόνος|:count χρόνια', - 'y' => '1 χρόνος|:count χρόνια', - 'month' => '1 μήνας|:count μήνες', - 'm' => '1 μήνας|:count μήνες', - 'week' => '1 εβδομάδα|:count εβδομάδες', - 'w' => '1 εβδομάδα|:count εβδομάδες', - 'day' => '1 μέρα|:count μέρες', - 'd' => '1 μέρα|:count μέρες', - 'hour' => '1 ώρα|:count ώρες', - 'h' => '1 ώρα|:count ώρες', - 'minute' => '1 λεπτό|:count λεπτά', - 'min' => '1 λεπτό|:count λεπτά', - 'second' => '1 δευτερόλεπτο|:count δευτερόλεπτα', - 's' => '1 δευτερόλεπτο|:count δευτερόλεπτα', - 'ago' => 'πρίν απο :time', - 'from_now' => 'σε :time απο τώρα', + 'year' => ':count χρόνος|:count χρόνια', + 'y' => ':count χρόνος|:count χρόνια', + 'month' => ':count μήνας|:count μήνες', + 'm' => ':count μήνας|:count μήνες', + 'week' => ':count εβδομάδα|:count εβδομάδες', + 'w' => ':count εβδομάδα|:count εβδομάδες', + 'day' => ':count μέρα|:count μέρες', + 'd' => ':count μέρα|:count μέρες', + 'hour' => ':count ώρα|:count ώρες', + 'h' => ':count ώρα|:count ώρες', + 'minute' => ':count λεπτό|:count λεπτά', + 'min' => ':count λεπτό|:count λεπτά', + 'second' => ':count δευτερόλεπτο|:count δευτερόλεπτα', + 's' => ':count δευτερόλεπτο|:count δευτερόλεπτα', + 'ago' => 'πριν από :time', + 'from_now' => 'σε :time από τώρα', 'after' => ':time μετά', - 'before' => ':time πρίν', + 'before' => ':time πριν', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/en.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/en.php index 181c59be..9df236ac 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/en.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/en.php @@ -10,22 +10,27 @@ */ return array( - 'year' => '1 year|:count years', - 'y' => '1yr|:countyrs', - 'month' => '1 month|:count months', - 'm' => '1mo|:countmos', - 'week' => '1 week|:count weeks', - 'w' => '1w|:countw', - 'day' => '1 day|:count days', - 'd' => '1d|:countd', - 'hour' => '1 hour|:count hours', - 'h' => '1h|:counth', - 'minute' => '1 minute|:count minutes', - 'min' => '1m|:countm', - 'second' => '1 second|:count seconds', - 's' => '1s|:counts', + 'year' => ':count year|:count years', + 'y' => ':countyr|:countyrs', + 'month' => ':count month|:count months', + 'm' => ':countmo|:countmos', + 'week' => ':count week|:count weeks', + 'w' => ':countw|:countw', + 'day' => ':count day|:count days', + 'd' => ':countd|:countd', + 'hour' => ':count hour|:count hours', + 'h' => ':counth|:counth', + 'minute' => ':count minute|:count minutes', + 'min' => ':countm|:countm', + 'second' => ':count second|:count seconds', + 's' => ':counts|:counts', 'ago' => ':time ago', 'from_now' => ':time from now', 'after' => ':time after', 'before' => ':time before', + 'diff_now' => 'just now', + 'diff_yesterday' => 'yesterday', + 'diff_tomorrow' => 'tomorrow', + 'diff_before_yesterday' => 'before yesterday', + 'diff_after_tomorrow' => 'after tomorrow', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/eo.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/eo.php index ff1f5311..c5b90b3e 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/eo.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/eo.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 jaro|:count jaroj', - 'y' => '1 jaro|:count jaroj', - 'month' => '1 monato|:count monatoj', - 'm' => '1 monato|:count monatoj', - 'week' => '1 semajno|:count semajnoj', - 'w' => '1 semajno|:count semajnoj', - 'day' => '1 tago|:count tagoj', - 'd' => '1 tago|:count tagoj', - 'hour' => '1 horo|:count horoj', - 'h' => '1 horo|:count horoj', - 'minute' => '1 minuto|:count minutoj', - 'min' => '1 minuto|:count minutoj', - 'second' => '1 sekundo|:count sekundoj', - 's' => '1 sekundo|:count sekundoj', + 'year' => ':count jaro|:count jaroj', + 'y' => ':count jaro|:count jaroj', + 'month' => ':count monato|:count monatoj', + 'm' => ':count monato|:count monatoj', + 'week' => ':count semajno|:count semajnoj', + 'w' => ':count semajno|:count semajnoj', + 'day' => ':count tago|:count tagoj', + 'd' => ':count tago|:count tagoj', + 'hour' => ':count horo|:count horoj', + 'h' => ':count horo|:count horoj', + 'minute' => ':count minuto|:count minutoj', + 'min' => ':count minuto|:count minutoj', + 'second' => ':count sekundo|:count sekundoj', + 's' => ':count sekundo|:count sekundoj', 'ago' => 'antaŭ :time', 'from_now' => 'je :time', 'after' => ':time poste', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/es.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/es.php index fb0aff19..1ad82cea 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/es.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/es.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 año|:count años', - 'y' => '1 año|:count años', - 'month' => '1 mes|:count meses', - 'm' => '1 mes|:count meses', - 'week' => '1 semana|:count semanas', - 'w' => '1 semana|:count semanas', - 'day' => '1 día|:count días', - 'd' => '1 día|:count días', - 'hour' => '1 hora|:count horas', - 'h' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'min' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', - 's' => '1 segundo|:count segundos', + 'year' => ':count año|:count años', + 'y' => ':count año|:count años', + 'month' => ':count mes|:count meses', + 'm' => ':count mes|:count meses', + 'week' => ':count semana|:count semanas', + 'w' => ':count semana|:count semanas', + 'day' => ':count día|:count días', + 'd' => ':count día|:count días', + 'hour' => ':count hora|:count horas', + 'h' => ':count hora|:count horas', + 'minute' => ':count minuto|:count minutos', + 'min' => ':count minuto|:count minutos', + 'second' => ':count segundo|:count segundos', + 's' => ':count segundo|:count segundos', 'ago' => 'hace :time', 'from_now' => 'dentro de :time', 'after' => ':time después', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/et.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/et.php index 70d682de..2d9291e0 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/et.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/et.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 aasta|:count aastat', - 'y' => '1 aasta|:count aastat', - 'month' => '1 kuu|:count kuud', - 'm' => '1 kuu|:count kuud', - 'week' => '1 nädal|:count nädalat', - 'w' => '1 nädal|:count nädalat', - 'day' => '1 päev|:count päeva', - 'd' => '1 päev|:count päeva', - 'hour' => '1 tund|:count tundi', - 'h' => '1 tund|:count tundi', - 'minute' => '1 minut|:count minutit', - 'min' => '1 minut|:count minutit', - 'second' => '1 sekund|:count sekundit', - 's' => '1 sekund|:count sekundit', + 'year' => ':count aasta|:count aastat', + 'y' => ':count aasta|:count aastat', + 'month' => ':count kuu|:count kuud', + 'm' => ':count kuu|:count kuud', + 'week' => ':count nädal|:count nädalat', + 'w' => ':count nädal|:count nädalat', + 'day' => ':count päev|:count päeva', + 'd' => ':count päev|:count päeva', + 'hour' => ':count tund|:count tundi', + 'h' => ':count tund|:count tundi', + 'minute' => ':count minut|:count minutit', + 'min' => ':count minut|:count minutit', + 'second' => ':count sekund|:count sekundit', + 's' => ':count sekund|:count sekundit', 'ago' => ':time tagasi', 'from_now' => ':time pärast', 'after' => ':time pärast', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fi.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fi.php index 46794fa5..48188044 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fi.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fi.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 vuosi|:count vuotta', - 'y' => '1 vuosi|:count vuotta', - 'month' => '1 kuukausi|:count kuukautta', - 'm' => '1 kuukausi|:count kuukautta', - 'week' => '1 viikko|:count viikkoa', - 'w' => '1 viikko|:count viikkoa', - 'day' => '1 päivä|:count päivää', - 'd' => '1 päivä|:count päivää', - 'hour' => '1 tunti|:count tuntia', - 'h' => '1 tunti|:count tuntia', - 'minute' => '1 minuutti|:count minuuttia', - 'min' => '1 minuutti|:count minuuttia', - 'second' => '1 sekunti|:count sekuntia', - 's' => '1 sekunti|:count sekuntia', + 'year' => ':count vuosi|:count vuotta', + 'y' => ':count vuosi|:count vuotta', + 'month' => ':count kuukausi|:count kuukautta', + 'm' => ':count kuukausi|:count kuukautta', + 'week' => ':count viikko|:count viikkoa', + 'w' => ':count viikko|:count viikkoa', + 'day' => ':count päivä|:count päivää', + 'd' => ':count päivä|:count päivää', + 'hour' => ':count tunti|:count tuntia', + 'h' => ':count tunti|:count tuntia', + 'minute' => ':count minuutti|:count minuuttia', + 'min' => ':count minuutti|:count minuuttia', + 'second' => ':count sekunti|:count sekuntia', + 's' => ':count sekunti|:count sekuntia', 'ago' => ':time sitten', 'from_now' => ':time tästä hetkestä', 'after' => ':time sen jälkeen', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fo.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fo.php index d4d68232..d91104b7 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fo.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fo.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 ár|:count ár', - 'y' => '1 ár|:count ár', - 'month' => '1 mánaður|:count mánaðir', - 'm' => '1 mánaður|:count mánaðir', - 'week' => '1 vika|:count vikur', - 'w' => '1 vika|:count vikur', - 'day' => '1 dag|:count dagar', - 'd' => '1 dag|:count dagar', - 'hour' => '1 tími|:count tímar', - 'h' => '1 tími|:count tímar', - 'minute' => '1 minutt|:count minuttir', - 'min' => '1 minutt|:count minuttir', - 'second' => '1 sekund|:count sekundir', - 's' => '1 sekund|:count sekundir', + 'year' => ':count ár|:count ár', + 'y' => ':count ár|:count ár', + 'month' => ':count mánaður|:count mánaðir', + 'm' => ':count mánaður|:count mánaðir', + 'week' => ':count vika|:count vikur', + 'w' => ':count vika|:count vikur', + 'day' => ':count dag|:count dagar', + 'd' => ':count dag|:count dagar', + 'hour' => ':count tími|:count tímar', + 'h' => ':count tími|:count tímar', + 'minute' => ':count minutt|:count minuttir', + 'min' => ':count minutt|:count minuttir', + 'second' => ':count sekund|:count sekundir', + 's' => ':count sekund|:count sekundir', 'ago' => ':time síðan', 'from_now' => 'um :time', 'after' => ':time aftaná', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php index be79738c..d68ab95b 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/fr.php @@ -10,22 +10,27 @@ */ return array( - 'year' => '1 an|:count ans', - 'y' => '1 an|:count ans', + 'year' => ':count an|:count ans', + 'y' => ':count an|:count ans', 'month' => ':count mois', 'm' => ':count mois', - 'week' => '1 semaine|:count semaines', - 'w' => '1 semaine|:count semaines', - 'day' => '1 jour|:count jours', - 'd' => '1 jour|:count jours', - 'hour' => '1 heure|:count heures', - 'h' => '1 heure|:count heures', - 'minute' => '1 minute|:count minutes', - 'min' => '1 minute|:count minutes', - 'second' => '1 seconde|:count secondes', - 's' => '1 seconde|:count secondes', + 'week' => ':count semaine|:count semaines', + 'w' => ':count sem.|:count sem.', + 'day' => ':count jour|:count jours', + 'd' => ':count j.|:count j.', + 'hour' => ':count heure|:count heures', + 'h' => ':count h|:count h.', + 'minute' => ':count minute|:count minutes', + 'min' => ':count min.|:count min.', + 'second' => ':count seconde|:count secondes', + 's' => ':count sec.|:count sec.', 'ago' => 'il y a :time', 'from_now' => 'dans :time', 'after' => ':time après', 'before' => ':time avant', + 'diff_now' => "à l'instant", + 'diff_yesterday' => 'hier', + 'diff_tomorrow' => 'demain', + 'diff_before_yesterday' => 'avant-hier', + 'diff_after_tomorrow' => 'après-demain', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gl.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gl.php index 609bf752..cd22a31e 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gl.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gl.php @@ -10,13 +10,13 @@ */ return array( - 'year' => '1 ano|:count anos', - 'month' => '1 mes|:count meses', - 'week' => '1 semana|:count semanas', - 'day' => '1 día|:count días', - 'hour' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', + 'year' => ':count ano|:count anos', + 'month' => ':count mes|:count meses', + 'week' => ':count semana|:count semanas', + 'day' => ':count día|:count días', + 'hour' => ':count hora|:count horas', + 'minute' => ':count minuto|:count minutos', + 'second' => ':count segundo|:count segundos', 'ago' => 'fai :time', 'from_now' => 'dentro de :time', 'after' => ':time despois', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gu.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gu.php new file mode 100644 index 00000000..7759dfcb --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/gu.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count વર્ષ|:count વર્ષો', + 'y' => ':countવર્ષ|:countવર્ષો', + 'month' => ':count મહિનો|:count મહિના', + 'm' => ':countમહિનો|:countમહિના', + 'week' => ':count અઠવાડિયું|:count અઠવાડિયા', + 'w' => ':countઅઠ.|:countઅઠ.', + 'day' => ':count દિવસ|:count દિવસો', + 'd' => ':countદિ.|:countદિ.', + 'hour' => ':count કલાક|:count કલાકો', + 'h' => ':countક.|:countક.', + 'minute' => ':count મિનિટ|:count મિનિટ', + 'min' => ':countમિ.|:countમિ.', + 'second' => ':count સેકેન્ડ|:count સેકેન્ડ', + 's' => ':countસે.|:countસે.', + 'ago' => ':time પહેલા', + 'from_now' => ':time અત્યારથી', + 'after' => ':time પછી', + 'before' => ':time પહેલા', +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/hy.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/hy.php index 4b4545d7..d2665f27 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/hy.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/hy.php @@ -11,21 +11,21 @@ return array( 'year' => ':count տարի', - 'y' => ':count տարի', + 'y' => ':countտ', 'month' => ':count ամիս', - 'm' => ':count ամիս', + 'm' => ':countամ', 'week' => ':count շաբաթ', - 'w' => ':count շաբաթ', + 'w' => ':countշ', 'day' => ':count օր', - 'd' => ':count օր', + 'd' => ':countօր', 'hour' => ':count ժամ', - 'h' => ':count ժամ', + 'h' => ':countժ', 'minute' => ':count րոպե', - 'min' => ':count րոպե', - 'second' => ':count վայրկյան', - 's' => ':count վայրկյան', + 'min' => ':countր', + 'second' => ':count վարկյան', + 's' => ':countվրկ', 'ago' => ':time առաջ', - 'from_now' => ':time հետո', + 'from_now' => ':time ներկա պահից', 'after' => ':time հետո', 'before' => ':time առաջ', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/it.php index 19eedafa..70bc6d7b 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/it.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/it.php @@ -10,22 +10,27 @@ */ return array( - 'year' => '1 anno|:count anni', - 'y' => '1 anno|:count anni', - 'month' => '1 mese|:count mesi', - 'm' => '1 mese|:count mesi', - 'week' => '1 settimana|:count settimane', - 'w' => '1 settimana|:count settimane', - 'day' => '1 giorno|:count giorni', - 'd' => '1 giorno|:count giorni', - 'hour' => '1 ora|:count ore', - 'h' => '1 ora|:count ore', - 'minute' => '1 minuto|:count minuti', - 'min' => '1 minuto|:count minuti', - 'second' => '1 secondo|:count secondi', - 's' => '1 secondo|:count secondi', + 'year' => ':count anno|:count anni', + 'y' => ':count anno|:count anni', + 'month' => ':count mese|:count mesi', + 'm' => ':count mese|:count mesi', + 'week' => ':count settimana|:count settimane', + 'w' => ':count settimana|:count settimane', + 'day' => ':count giorno|:count giorni', + 'd' => ':count giorno|:count giorni', + 'hour' => ':count ora|:count ore', + 'h' => ':count ora|:count ore', + 'minute' => ':count minuto|:count minuti', + 'min' => ':count minuto|:count minuti', + 'second' => ':count secondo|:count secondi', + 's' => ':count secondo|:count secondi', 'ago' => ':time fa', - 'from_now' => ':time da adesso', + 'from_now' => 'tra :time', 'after' => ':time dopo', 'before' => ':time prima', + 'diff_now' => 'proprio ora', + 'diff_yesterday' => 'ieri', + 'diff_tomorrow' => 'domani', + 'diff_before_yesterday' => "l'altro ieri", + 'diff_after_tomorrow' => 'dopodomani', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ja.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ja.php index c12c1994..71195475 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ja.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ja.php @@ -10,22 +10,22 @@ */ return array( - 'year' => ':count 年', - 'y' => ':count 年', - 'month' => ':count ヶ月', - 'm' => ':count ヶ月', - 'week' => ':count 週間', - 'w' => ':count 週間', - 'day' => ':count 日', - 'd' => ':count 日', - 'hour' => ':count 時間', - 'h' => ':count 時間', - 'minute' => ':count 分', - 'min' => ':count 分', - 'second' => ':count 秒', - 's' => ':count 秒', - 'ago' => ':time 前', - 'from_now' => '今から :time', - 'after' => ':time 後', - 'before' => ':time 前', + 'year' => ':count年', + 'y' => ':count年', + 'month' => ':countヶ月', + 'm' => ':countヶ月', + 'week' => ':count週間', + 'w' => ':count週間', + 'day' => ':count日', + 'd' => ':count日', + 'hour' => ':count時間', + 'h' => ':count時間', + 'minute' => ':count分', + 'min' => ':count分', + 'second' => ':count秒', + 's' => ':count秒', + 'ago' => ':time前', + 'from_now' => '今から:time', + 'after' => ':time後', + 'before' => ':time前', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/kk.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/kk.php new file mode 100644 index 00000000..8d113afe --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/kk.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +return array( + 'year' => ':count жыл', + 'y' => ':count жыл', + 'month' => ':count ай', + 'm' => ':count ай', + 'week' => ':count апта', + 'w' => ':count апта', + 'day' => ':count күн', + 'd' => ':count күн', + 'hour' => ':count сағат', + 'h' => ':count сағат', + 'minute' => ':count минут', + 'min' => ':count минут', + 'second' => ':count секунд', + 's' => ':count секунд', + 'ago' => ':time бұрын', + 'from_now' => ':time кейін', + 'after' => ':time кейін', + 'before' => ':time бұрын', +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mk.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mk.php index 51e661d6..c5ec12df 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mk.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mk.php @@ -10,13 +10,13 @@ */ return array( - 'year' => '1 година|:count години', - 'month' => '1 месец|:count месеци', - 'week' => '1 седмица|:count седмици', - 'day' => '1 ден|:count дена', - 'hour' => '1 час|:count часа', - 'minute' => '1 минута|:count минути', - 'second' => '1 секунда|:count секунди', + 'year' => ':count година|:count години', + 'month' => ':count месец|:count месеци', + 'week' => ':count седмица|:count седмици', + 'day' => ':count ден|:count дена', + 'hour' => ':count час|:count часа', + 'minute' => ':count минута|:count минути', + 'second' => ':count секунда|:count секунди', 'ago' => 'пред :time', 'from_now' => ':time од сега', 'after' => 'по :time', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php new file mode 100644 index 00000000..b26dce55 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/mn.php @@ -0,0 +1,62 @@ + + * + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @translator Batmandakh Erdenebileg + */ + +return array( + 'year' => ':count жил', + 'y' => ':count жил', + 'month' => ':count сар', + 'm' => ':count сар', + 'week' => ':count долоо хоног', + 'w' => ':count долоо хоног', + 'day' => ':count өдөр', + 'd' => ':count өдөр', + 'hour' => ':count цаг', + 'h' => ':countц', + 'minute' => ':count минут', + 'min' => ':countм', + 'second' => ':count секунд', + 's' => ':countс', + + 'ago' => ':timeн өмнө', + 'year_ago' => ':count жилий', + 'month_ago' => ':count сары', + 'day_ago' => ':count хоногий', + 'hour_ago' => ':count цагий', + 'minute_ago' => ':count минуты', + 'second_ago' => ':count секунды', + + 'from_now' => 'одоогоос :time', + 'year_from_now' => ':count жилийн дараа', + 'month_from_now' => ':count сарын дараа', + 'day_from_now' => ':count хоногийн дараа', + 'hour_from_now' => ':count цагийн дараа', + 'minute_from_now' => ':count минутын дараа', + 'second_from_now' => ':count секундын дараа', + + // Does it required to make translation for before, after as follows? hmm, I think we've made it with ago and from now keywords already. Anyway, I've included it just in case of undesired action... + 'after' => ':timeн дараа', + 'year_after' => ':count жилий', + 'month_after' => ':count сары', + 'day_after' => ':count хоногий', + 'hour_after' => ':count цагий', + 'minute_after' => ':count минуты', + 'second_after' => ':count секунды', + 'before' => ':timeн өмнө', + 'year_before' => ':count жилий', + 'month_before' => ':count сары', + 'day_before' => ':count хоногий', + 'hour_before' => ':count цагий', + 'minute_before' => ':count минуты', + 'second_before' => ':count секунды', +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/nl.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/nl.php index a398ca9d..0430ccca 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/nl.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/nl.php @@ -12,18 +12,18 @@ return array( 'year' => ':count jaar', 'y' => ':count jaar', - 'month' => '1 maand|:count maanden', - 'm' => '1 maand|:count maanden', - 'week' => '1 week|:count weken', - 'w' => '1 week|:count weken', - 'day' => '1 dag|:count dagen', - 'd' => '1 dag|:count dagen', + 'month' => ':count maand|:count maanden', + 'm' => ':count maand|:count maanden', + 'week' => ':count week|:count weken', + 'w' => ':count week|:count weken', + 'day' => ':count dag|:count dagen', + 'd' => ':count dag|:count dagen', 'hour' => ':count uur', 'h' => ':count uur', - 'minute' => '1 minuut|:count minuten', - 'min' => '1 minuut|:count minuten', - 'second' => '1 seconde|:count seconden', - 's' => '1 seconde|:count seconden', + 'minute' => ':count minuut|:count minuten', + 'min' => ':count minuut|:count minuten', + 'second' => ':count seconde|:count seconden', + 's' => ':count seconde|:count seconden', 'ago' => ':time geleden', 'from_now' => 'over :time', 'after' => ':time later', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/no.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/no.php index 178fbdcd..3c193177 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/no.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/no.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 år|:count år', - 'y' => '1 år|:count år', - 'month' => '1 måned|:count måneder', - 'm' => '1 måned|:count måneder', - 'week' => '1 uke|:count uker', - 'w' => '1 uke|:count uker', - 'day' => '1 dag|:count dager', - 'd' => '1 dag|:count dager', - 'hour' => '1 time|:count timer', - 'h' => '1 time|:count timer', - 'minute' => '1 minutt|:count minutter', - 'min' => '1 minutt|:count minutter', - 'second' => '1 sekund|:count sekunder', - 's' => '1 sekund|:count sekunder', + 'year' => ':count år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count måned|:count måneder', + 'm' => ':count måned|:count måneder', + 'week' => ':count uke|:count uker', + 'w' => ':count uke|:count uker', + 'day' => ':count dag|:count dager', + 'd' => ':count dag|:count dager', + 'hour' => ':count time|:count timer', + 'h' => ':count time|:count timer', + 'minute' => ':count minutt|:count minutter', + 'min' => ':count minutt|:count minutter', + 'second' => ':count sekund|:count sekunder', + 's' => ':count sekund|:count sekunder', 'ago' => ':time siden', 'from_now' => 'om :time', 'after' => ':time etter', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php index bca2d7fb..32267233 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pl.php @@ -10,22 +10,22 @@ */ return array( - 'year' => '1 rok|:count lata|:count lat', - 'y' => '1 rok|:count lata|:count lat', - 'month' => '1 miesiąc|:count miesiące|:count miesięcy', - 'm' => '1 miesiąc|:count miesiące|:count miesięcy', - 'week' => '1 tydzień|:count tygodnie|:count tygodni', - 'w' => '1 tydzień|:count tygodnie|:count tygodni', - 'day' => '1 dzień|:count dni|:count dni', - 'd' => '1 dzień|:count dni|:count dni', - 'hour' => '1 godzina|:count godziny|:count godzin', - 'h' => '1 godzina|:count godziny|:count godzin', - 'minute' => '1 minuta|:count minuty|:count minut', - 'min' => '1 minuta|:count minuty|:count minut', - 'second' => '1 sekunda|:count sekundy|:count sekund', - 's' => '1 sekunda|:count sekundy|:count sekund', + 'year' => ':count rok|:count lata|:count lat', + 'y' => ':count rok|:count lata|:count lat', + 'month' => ':count miesiąc|:count miesiące|:count miesięcy', + 'm' => ':count miesiąc|:count miesiące|:count miesięcy', + 'week' => ':count tydzień|:count tygodnie|:count tygodni', + 'w' => ':count tydzień|:count tygodnie|:count tygodni', + 'day' => ':count dzień|:count dni|:count dni', + 'd' => ':count dzień|:count dni|:count dni', + 'hour' => ':count godzina|:count godziny|:count godzin', + 'h' => ':count godzina|:count godziny|:count godzin', + 'minute' => ':count minuta|:count minuty|:count minut', + 'min' => ':count minuta|:count minuty|:count minut', + 'second' => ':count sekunda|:count sekundy|:count sekund', + 's' => ':count sekunda|:count sekundy|:count sekund', 'ago' => ':time temu', 'from_now' => ':time od teraz', - 'after' => ':time przed', - 'before' => ':time po', + 'after' => ':time po', + 'before' => ':time przed', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ps.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ps.php new file mode 100644 index 00000000..15c3296e --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/ps.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => ':count کال|:count کاله', + 'y' => ':countکال|:countکاله', + 'month' => ':count مياشت|:count مياشتي', + 'm' => ':countمياشت|:countمياشتي', + 'week' => ':count اونۍ|:count اونۍ', + 'w' => ':countاونۍ|:countاونۍ', + 'day' => ':count ورځ|:count ورځي', + 'd' => ':countورځ|:countورځي', + 'hour' => ':count ساعت|:count ساعته', + 'h' => ':countساعت|:countساعته', + 'minute' => ':count دقيقه|:count دقيقې', + 'min' => ':countدقيقه|:countدقيقې', + 'second' => ':count ثانيه|:count ثانيې', + 's' => ':countثانيه|:countثانيې', + 'ago' => ':time دمخه', + 'from_now' => ':time له اوس څخه', + 'after' => ':time وروسته', + 'before' => ':time دمخه', +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt.php index f1706487..392b1215 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 ano|:count anos', - 'y' => '1 ano|:count anos', - 'month' => '1 mês|:count meses', - 'm' => '1 mês|:count meses', - 'week' => '1 semana|:count semanas', - 'w' => '1 semana|:count semanas', - 'day' => '1 dia|:count dias', - 'd' => '1 dia|:count dias', - 'hour' => '1 hora|:count horas', - 'h' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'min' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', - 's' => '1 segundo|:count segundos', + 'year' => ':count ano|:count anos', + 'y' => ':count ano|:count anos', + 'month' => ':count mês|:count meses', + 'm' => ':count mês|:count meses', + 'week' => ':count semana|:count semanas', + 'w' => ':count semana|:count semanas', + 'day' => ':count dia|:count dias', + 'd' => ':count dia|:count dias', + 'hour' => ':count hora|:count horas', + 'h' => ':count hora|:count horas', + 'minute' => ':count minuto|:count minutos', + 'min' => ':count minuto|:count minutos', + 'second' => ':count segundo|:count segundos', + 's' => ':count segundo|:count segundos', 'ago' => ':time atrás', 'from_now' => 'em :time', 'after' => ':time depois', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php index f9cbdc7a..22d12201 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 ano|:count anos', - 'y' => '1 ano|:count anos', - 'month' => '1 mês|:count meses', - 'm' => '1 mês|:count meses', - 'week' => '1 semana|:count semanas', - 'w' => '1 semana|:count semanas', - 'day' => '1 dia|:count dias', - 'd' => '1 dia|:count dias', - 'hour' => '1 hora|:count horas', - 'h' => '1 hora|:count horas', - 'minute' => '1 minuto|:count minutos', - 'min' => '1 minuto|:count minutos', - 'second' => '1 segundo|:count segundos', - 's' => '1 segundo|:count segundos', + 'year' => ':count ano|:count anos', + 'y' => ':count ano|:count anos', + 'month' => ':count mês|:count meses', + 'm' => ':count mês|:count meses', + 'week' => ':count semana|:count semanas', + 'w' => ':count semana|:count semanas', + 'day' => ':count dia|:count dias', + 'd' => ':count dia|:count dias', + 'hour' => ':count hora|:count horas', + 'h' => ':count hora|:count horas', + 'minute' => ':count minuto|:count minutos', + 'min' => ':count minuto|:count minutos', + 'second' => ':count segundo|:count segundos', + 's' => ':count segundo|:count segundos', 'ago' => 'há :time', 'from_now' => 'em :time', 'after' => 'após :time', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php index 45c8f76d..61013448 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sk.php @@ -26,6 +26,13 @@ return array( 's' => 'sekundu|:count sekundy|:count sekúnd', 'ago' => 'pred :time', 'from_now' => 'za :time', - 'after' => ':time neskôr', + 'after' => 'o :time neskôr', 'before' => ':time predtým', + 'year_ago' => 'rokom|:count rokmi|:count rokmi', + 'month_ago' => 'mesiacom|:count mesiacmi|:count mesiacmi', + 'week_ago' => 'týždňom|:count týždňami|:count týždňami', + 'day_ago' => 'dňom|:count dňami|:count dňami', + 'hour_ago' => 'hodinou|:count hodinami|:count hodinami', + 'minute_ago' => 'minútou|:count minútami|:count minútami', + 'second_ago' => 'sekundou|:count sekundami|:count sekundami', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sq.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sq.php index 41be2513..6e138a04 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sq.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sq.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 vit|:count vjet', - 'y' => '1 vit|:count vjet', - 'month' => '1 muaj|:count muaj', - 'm' => '1 muaj|:count muaj', - 'week' => '1 javë|:count javë', - 'w' => '1 javë|:count javë', - 'day' => '1 ditë|:count ditë', - 'd' => '1 ditë|:count ditë', - 'hour' => '1 orë|:count orë', - 'h' => '1 orë|:count orë', - 'minute' => '1 minutë|:count minuta', - 'min' => '1 minutë|:count minuta', - 'second' => '1 sekondë|:count sekonda', - 's' => '1 sekondë|:count sekonda', + 'year' => ':count vit|:count vjet', + 'y' => ':count vit|:count vjet', + 'month' => ':count muaj|:count muaj', + 'm' => ':count muaj|:count muaj', + 'week' => ':count javë|:count javë', + 'w' => ':count javë|:count javë', + 'day' => ':count ditë|:count ditë', + 'd' => ':count ditë|:count ditë', + 'hour' => ':count orë|:count orë', + 'h' => ':count orë|:count orë', + 'minute' => ':count minutë|:count minuta', + 'min' => ':count minutë|:count minuta', + 'second' => ':count sekondë|:count sekonda', + 's' => ':count sekondë|:count sekonda', 'ago' => ':time më parë', 'from_now' => ':time nga tani', 'after' => ':time pas', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr.php index 70915a27..5a106421 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr.php @@ -28,4 +28,10 @@ return array( 'from_now' => ':time od sada', 'after' => 'nakon :time', 'before' => 'pre :time', + + 'year_from_now' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', + 'year_ago' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', + + 'week_from_now' => '{1} :count nedelju|{2,3,4} :count nedelje|[5,Inf[ :count nedelja', + 'week_ago' => '{1} :count nedelju|{2,3,4} :count nedelje|[5,Inf[ :count nedelja', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php new file mode 100644 index 00000000..e0596f8d --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_Cyrl.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count године|[0,Inf[ :count година', + 'y' => ':count г.', + 'month' => '{1} :count месец|{2,3,4}:count месеца|[5,Inf[ :count месеци', + 'm' => ':count м.', + 'week' => '{1} :count недеља|{2,3,4}:count недеље|[5,Inf[ :count недеља', + 'w' => ':count нед.', + 'day' => '{1,21,31} :count дан|[2,Inf[ :count дана', + 'd' => ':count д.', + 'hour' => '{1,21} :count сат|{2,3,4,22,23,24}:count сата|[5,Inf[ :count сати', + 'h' => ':count ч.', + 'minute' => '{1,21,31,41,51} :count минут|[2,Inf[ :count минута', + 'min' => ':count мин.', + 'second' => '{1,21,31,41,51} :count секунд|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count секунде|[5,Inf[:count секунди', + 's' => ':count сек.', + 'ago' => 'пре :time', + 'from_now' => 'за :time', + 'after' => ':time након', + 'before' => ':time пре', + + 'year_from_now' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година', + 'year_ago' => '{1,21,31,41,51} :count годину|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count године|[5,Inf[ :count година', + + 'week_from_now' => '{1} :count недељу|{2,3,4} :count недеље|[5,Inf[ :count недеља', + 'week_ago' => '{1} :count недељу|{2,3,4} :count недеље|[5,Inf[ :count недеља', + +); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php index d0aaee37..7ebf6f04 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sr_ME.php @@ -9,30 +9,4 @@ * file that was distributed with this source code. */ -return array( - 'year' => '{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count godine|[0,Inf[ :count godina', - 'y' => ':count g.', - 'month' => '{1} :count mjesec|{2,3,4}:count mjeseca|[5,Inf[ :count mjeseci', - 'm' => ':count mj.', - 'week' => '{1} :count nedjelja|{2,3,4}:count nedjelje|[5,Inf[ :count nedjelja', - 'w' => ':count ned.', - 'day' => '{1,21,31} :count dan|[2,Inf[ :count dana', - 'd' => ':count d.', - 'hour' => '{1,21} :count sat|{2,3,4,22,23,24}:count sata|[5,Inf[ :count sati', - 'h' => ':count č.', - 'minute' => '{1,21,31,41,51} :count minut|[2,Inf[ :count minuta', - 'min' => ':count min.', - 'second' => '{1,21,31,41,51} :count sekund|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54}:count sekunde|[5,Inf[:count sekundi', - 's' => ':count sek.', - 'ago' => 'prije :time', - 'from_now' => 'za :time', - 'after' => ':time nakon', - 'before' => ':time prije', - - 'year_from_now' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', - 'year_ago' => '{1,21,31,41,51} :count godinu|{2,3,4,22,23,24,32,33,34,42,43,44,52,53,54} :count godine|[5,Inf[ :count godina', - - 'week_from_now' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja', - 'week_ago' => '{1} :count nedjelju|{2,3,4} :count nedjelje|[5,Inf[ :count nedjelja', - -); +return require __DIR__.'/sr_Latn_ME.php'; diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php index 6bebf7b8..89a03b43 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/sv.php @@ -10,20 +10,20 @@ */ return array( - 'year' => '1 år|:count år', - 'y' => '1 år|:count år', - 'month' => '1 månad|:count månader', - 'm' => '1 månad|:count månader', - 'week' => '1 vecka|:count veckor', - 'w' => '1 vecka|:count veckor', - 'day' => '1 dag|:count dagar', - 'd' => '1 dag|:count dagar', - 'hour' => '1 timme|:count timmar', - 'h' => '1 timme|:count timmar', - 'minute' => '1 minut|:count minuter', - 'min' => '1 minut|:count minuter', - 'second' => '1 sekund|:count sekunder', - 's' => '1 sekund|:count sekunder', + 'year' => ':count år|:count år', + 'y' => ':count år|:count år', + 'month' => ':count månad|:count månader', + 'm' => ':count månad|:count månader', + 'week' => ':count vecka|:count veckor', + 'w' => ':count vecka|:count veckor', + 'day' => ':count dag|:count dagar', + 'd' => ':count dag|:count dagar', + 'hour' => ':count timme|:count timmar', + 'h' => ':count timme|:count timmar', + 'minute' => ':count minut|:count minuter', + 'min' => ':count minut|:count minuter', + 'second' => ':count sekund|:count sekunder', + 's' => ':count sekund|:count sekunder', 'ago' => ':time sedan', 'from_now' => 'om :time', 'after' => ':time efter', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/th.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/th.php index c4c402ef..88bb4ac4 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/th.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/th.php @@ -10,22 +10,22 @@ */ return array( - 'year' => '1 ปี|:count ปี', - 'y' => '1 ปี|:count ปี', - 'month' => '1 เดือน|:count เดือน', - 'm' => '1 เดือน|:count เดือน', - 'week' => '1 สัปดาห์|:count สัปดาห์', - 'w' => '1 สัปดาห์|:count สัปดาห์', - 'day' => '1 วัน|:count วัน', - 'd' => '1 วัน|:count วัน', - 'hour' => '1 ชั่วโมง|:count ชั่วโมง', - 'h' => '1 ชั่วโมง|:count ชั่วโมง', - 'minute' => '1 นาที|:count นาที', - 'min' => '1 นาที|:count นาที', - 'second' => '1 วินาที|:count วินาที', - 's' => '1 วินาที|:count วินาที', - 'ago' => ':time ที่แล้ว', - 'from_now' => ':time จากนี้', - 'after' => 'หลัง:time', - 'before' => 'ก่อน:time', + 'year' => ':count ปี', + 'y' => ':count ปี', + 'month' => ':count เดือน', + 'm' => ':count เดือน', + 'week' => ':count สัปดาห์', + 'w' => ':count สัปดาห์', + 'day' => ':count วัน', + 'd' => ':count วัน', + 'hour' => ':count ชั่วโมง', + 'h' => ':count ชั่วโมง', + 'minute' => ':count นาที', + 'min' => ':count นาที', + 'second' => ':count วินาที', + 's' => ':count วินาที', + 'ago' => ':timeที่แล้ว', + 'from_now' => ':timeต่อจากนี้', + 'after' => ':timeหลังจากนี้', + 'before' => ':timeก่อน', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php index aeebca3d..eaba601b 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uk.php @@ -24,7 +24,7 @@ return array( 'min' => ':count хвилину|:count хвилини|:count хвилин', 'second' => ':count секунду|:count секунди|:count секунд', 's' => ':count секунду|:count секунди|:count секунд', - 'ago' => ':time назад', + 'ago' => ':time тому', 'from_now' => 'через :time', 'after' => ':time після', 'before' => ':time до', diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uz.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uz.php index c997f29d..1cb6f713 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uz.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/uz.php @@ -10,22 +10,22 @@ */ return array( - 'year' => ':count yil|:count yil|:count yil', - 'y' => ':count yil|:count yil|:count yil', - 'month' => ':count oy|:count oy|:count oylar', - 'm' => ':count oy|:count oy|:count oylar', - 'week' => ':count hafta|:count hafta|:count hafta', - 'w' => ':count hafta|:count hafta|:count hafta', - 'day' => ':count kun|:count kun|:count kun', - 'd' => ':count kun|:count kun|:count kun', - 'hour' => ':count soat|:count soat|:count soat', - 'h' => ':count soat|:count soat|:count soat', - 'minute' => ':count minut|:count minut|:count minut', - 'min' => ':count minut|:count minut|:count minut', - 'second' => ':count sekund|:count sekund|:count sekund', - 's' => ':count sekund|:count sekund|:count sekund', + 'year' => ':count yil', + 'y' => ':count yil', + 'month' => ':count oy', + 'm' => ':count oy', + 'week' => ':count hafta', + 'w' => ':count hafta', + 'day' => ':count kun', + 'd' => ':count kun', + 'hour' => ':count soat', + 'h' => ':count soat', + 'minute' => ':count daqiqa', + 'min' => ':count daq', + 'second' => ':count soniya', + 's' => ':count s', 'ago' => ':time avval', - 'from_now' => ':time keyin', + 'from_now' => ':time dan keyin', 'after' => ':time keyin', 'before' => ':time oldin', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php index 6c1d417f..c848723b 100644 --- a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php @@ -10,22 +10,22 @@ */ return array( - 'year' => ':count 年', - 'y' => ':count 年', - 'month' => ':count 月', - 'm' => ':count 月', - 'week' => ':count 周', - 'w' => ':count 周', - 'day' => ':count 天', - 'd' => ':count 天', - 'hour' => ':count 小時', - 'h' => ':count 小時', - 'minute' => ':count 分鐘', - 'min' => ':count 分鐘', - 'second' => ':count 秒', - 's' => ':count 秒', + 'year' => ':count年', + 'y' => ':count年', + 'month' => ':count月', + 'm' => ':count月', + 'week' => ':count週', + 'w' => ':count週', + 'day' => ':count天', + 'd' => ':count天', + 'hour' => ':count小時', + 'h' => ':count小時', + 'minute' => ':count分鐘', + 'min' => ':count分鐘', + 'second' => ':count秒', + 's' => ':count秒', 'ago' => ':time前', - 'from_now' => '距現在 :time', + 'from_now' => '距現在:time', 'after' => ':time後', 'before' => ':time前', ); diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Translator.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Translator.php new file mode 100644 index 00000000..12115b00 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/Carbon/Translator.php @@ -0,0 +1,143 @@ +addLoader('array', new Translation\Loader\ArrayLoader()); + parent::__construct($locale, $formatter, $cacheDir, $debug); + } + + /** + * Reset messages of a locale (all locale if no locale passed). + * Remove custom messages and reload initial messages from matching + * file in Lang directory. + * + * @param string|null $locale + * + * @return bool + */ + public function resetMessages($locale = null) + { + if ($locale === null) { + static::$messages = array(); + + return true; + } + + if (file_exists($filename = __DIR__.'/Lang/'.$locale.'.php')) { + static::$messages[$locale] = require $filename; + $this->addResource('array', static::$messages[$locale], $locale); + + return true; + } + + return false; + } + + /** + * Init messages language from matching file in Lang directory. + * + * @param string $locale + * + * @return bool + */ + protected function loadMessagesFromFile($locale) + { + if (isset(static::$messages[$locale])) { + return true; + } + + return $this->resetMessages($locale); + } + + /** + * Set messages of a locale and take file first if present. + * + * @param string $locale + * @param array $messages + * + * @return $this + */ + public function setMessages($locale, $messages) + { + $this->loadMessagesFromFile($locale); + $this->addResource('array', $messages, $locale); + static::$messages[$locale] = array_merge( + isset(static::$messages[$locale]) ? static::$messages[$locale] : array(), + $messages + ); + + return $this; + } + + /** + * Get messages of a locale, if none given, return all the + * languages. + * + * @param string|null $locale + * + * @return array + */ + public function getMessages($locale = null) + { + return $locale === null ? static::$messages : static::$messages[$locale]; + } + + /** + * Set the current translator locale and indicate if the source locale file exists + * + * @param string $locale locale ex. en + * + * @return bool + */ + public function setLocale($locale) + { + $locale = preg_replace_callback('/[-_]([a-z]{2,})/', function ($matches) { + // _2-letters is a region, _3+-letters is a variant + return '_'.call_user_func(strlen($matches[1]) > 2 ? 'ucfirst' : 'strtoupper', $matches[1]); + }, strtolower($locale)); + + if ($this->loadMessagesFromFile($locale)) { + parent::setLocale($locale); + + return true; + } + + return false; + } +} diff --git a/wp-content/themes/physioassist/vendor/nesbot/carbon/src/JsonSerializable.php b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/JsonSerializable.php new file mode 100644 index 00000000..b678e736 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/nesbot/carbon/src/JsonSerializable.php @@ -0,0 +1,16 @@ +json_encode, + * which is a value of any type other than a resource. + * + * @since 5.4.0 + */ + public function jsonSerialize(); +} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/build-phar.sh b/wp-content/themes/physioassist/vendor/paragonie/random_compat/build-phar.sh deleted file mode 100755 index b4a5ba31..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/build-phar.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) ) - -php -dphar.readonly=0 "$basedir/other/build_phar.php" $* \ No newline at end of file diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/composer.json b/wp-content/themes/physioassist/vendor/paragonie/random_compat/composer.json deleted file mode 100644 index 1c5978c6..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/composer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "paragonie/random_compat", - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "random", - "pseudorandom" - ], - "license": "MIT", - "type": "library", - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "support": { - "issues": "https://github.com/paragonie/random_compat/issues", - "email": "info@paragonie.com", - "source": "https://github.com/paragonie/random_compat" - }, - "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." - }, - "autoload": { - "files": [ - "lib/random.php" - ] - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey deleted file mode 100644 index eb50ebfc..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN PUBLIC KEY----- -MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm -pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p -+h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc ------END PUBLIC KEY----- diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc deleted file mode 100644 index 6a1d7f30..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.22 (MingW32) - -iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip -QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg -1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW -NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA -NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV -JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74= -=B6+8 ------END PGP SIGNATURE----- diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/byte_safe_strings.php deleted file mode 100644 index 3de86b22..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/byte_safe_strings.php +++ /dev/null @@ -1,181 +0,0 @@ - RandomCompat_strlen($binary_string)) { - return ''; - } - - return (string) mb_substr($binary_string, $start, $length, '8bit'); - } - - } else { - - /** - * substr() implementation that isn't brittle to mbstring.func_overload - * - * This version just uses the default substr() - * - * @param string $binary_string - * @param int $start - * @param int $length (optional) - * - * @throws TypeError - * - * @return string - */ - function RandomCompat_substr($binary_string, $start, $length = null) - { - if (!is_string($binary_string)) { - throw new TypeError( - 'RandomCompat_substr(): First argument should be a string' - ); - } - - if (!is_int($start)) { - throw new TypeError( - 'RandomCompat_substr(): Second argument should be an integer' - ); - } - - if ($length !== null) { - if (!is_int($length)) { - throw new TypeError( - 'RandomCompat_substr(): Third argument should be an integer, or omitted' - ); - } - - return (string) substr($binary_string, $start, $length); - } - - return (string) substr($binary_string, $start); - } - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/cast_to_int.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/cast_to_int.php deleted file mode 100644 index be7388df..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/cast_to_int.php +++ /dev/null @@ -1,74 +0,0 @@ - operators might accidentally let a float - * through. - * - * @param int|float $number The number we want to convert to an int - * @param boolean $fail_open Set to true to not throw an exception - * - * @return float|int - * - * @throws TypeError - */ - function RandomCompat_intval($number, $fail_open = false) - { - if (is_int($number) || is_float($number)) { - $number += 0; - } elseif (is_numeric($number)) { - $number += 0; - } - - if ( - is_float($number) - && - $number > ~PHP_INT_MAX - && - $number < PHP_INT_MAX - ) { - $number = (int) $number; - } - - if (is_int($number)) { - return (int) $number; - } elseif (!$fail_open) { - throw new TypeError( - 'Expected an integer.' - ); - } - return $number; - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/error_polyfill.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/error_polyfill.php deleted file mode 100644 index 6a91990c..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/error_polyfill.php +++ /dev/null @@ -1,49 +0,0 @@ -= 70000) { - return; -} - -if (!defined('RANDOM_COMPAT_READ_BUFFER')) { - define('RANDOM_COMPAT_READ_BUFFER', 8); -} - -$RandomCompatDIR = dirname(__FILE__); - -require_once $RandomCompatDIR . '/byte_safe_strings.php'; -require_once $RandomCompatDIR . '/cast_to_int.php'; -require_once $RandomCompatDIR . '/error_polyfill.php'; - -if (!is_callable('random_bytes')) { - /** - * PHP 5.2.0 - 5.6.x way to implement random_bytes() - * - * We use conditional statements here to define the function in accordance - * to the operating environment. It's a micro-optimization. - * - * In order of preference: - * 1. Use libsodium if available. - * 2. fread() /dev/urandom if available (never on Windows) - * 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM) - * 4. COM('CAPICOM.Utilities.1')->GetRandom() - * - * See RATIONALE.md for our reasoning behind this particular order - */ - if (extension_loaded('libsodium')) { - // See random_bytes_libsodium.php - if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) { - require_once $RandomCompatDIR . '/random_bytes_libsodium.php'; - } elseif (method_exists('Sodium', 'randombytes_buf')) { - require_once $RandomCompatDIR . '/random_bytes_libsodium_legacy.php'; - } - } - - /** - * Reading directly from /dev/urandom: - */ - if (DIRECTORY_SEPARATOR === '/') { - // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast - // way to exclude Windows. - $RandomCompatUrandom = true; - $RandomCompat_basedir = ini_get('open_basedir'); - - if (!empty($RandomCompat_basedir)) { - $RandomCompat_open_basedir = explode( - PATH_SEPARATOR, - strtolower($RandomCompat_basedir) - ); - $RandomCompatUrandom = (array() !== array_intersect( - array('/dev', '/dev/', '/dev/urandom'), - $RandomCompat_open_basedir - )); - $RandomCompat_open_basedir = null; - } - - if ( - !is_callable('random_bytes') - && - $RandomCompatUrandom - && - @is_readable('/dev/urandom') - ) { - // Error suppression on is_readable() in case of an open_basedir - // or safe_mode failure. All we care about is whether or not we - // can read it at this point. If the PHP environment is going to - // panic over trying to see if the file can be read in the first - // place, that is not helpful to us here. - - // See random_bytes_dev_urandom.php - require_once $RandomCompatDIR . '/random_bytes_dev_urandom.php'; - } - // Unset variables after use - $RandomCompat_basedir = null; - } else { - $RandomCompatUrandom = false; - } - - /** - * mcrypt_create_iv() - * - * We only want to use mcypt_create_iv() if: - * - * - random_bytes() hasn't already been defined - * - the mcrypt extensions is loaded - * - One of these two conditions is true: - * - We're on Windows (DIRECTORY_SEPARATOR !== '/') - * - We're not on Windows and /dev/urandom is readabale - * (i.e. we're not in a chroot jail) - * - Special case: - * - If we're not on Windows, but the PHP version is between - * 5.6.10 and 5.6.12, we don't want to use mcrypt. It will - * hang indefinitely. This is bad. - * - If we're on Windows, we want to use PHP >= 5.3.7 or else - * we get insufficient entropy errors. - */ - if ( - !is_callable('random_bytes') - && - // Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be. - (DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307) - && - // Prevent this code from hanging indefinitely on non-Windows; - // see https://bugs.php.net/bug.php?id=69833 - ( - DIRECTORY_SEPARATOR !== '/' || - (PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613) - ) - && - extension_loaded('mcrypt') - ) { - // See random_bytes_mcrypt.php - require_once $RandomCompatDIR . '/random_bytes_mcrypt.php'; - } - $RandomCompatUrandom = null; - - /** - * This is a Windows-specific fallback, for when the mcrypt extension - * isn't loaded. - */ - if ( - !is_callable('random_bytes') - && - extension_loaded('com_dotnet') - && - class_exists('COM') - ) { - $RandomCompat_disabled_classes = preg_split( - '#\s*,\s*#', - strtolower(ini_get('disable_classes')) - ); - - if (!in_array('com', $RandomCompat_disabled_classes)) { - try { - $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); - if (method_exists($RandomCompatCOMtest, 'GetRandom')) { - // See random_bytes_com_dotnet.php - require_once $RandomCompatDIR . '/random_bytes_com_dotnet.php'; - } - } catch (com_exception $e) { - // Don't try to use it. - } - } - $RandomCompat_disabled_classes = null; - $RandomCompatCOMtest = null; - } - - /** - * throw new Exception - */ - if (!is_callable('random_bytes')) { - /** - * We don't have any more options, so let's throw an exception right now - * and hope the developer won't let it fail silently. - * - * @param mixed $length - * @return void - * @throws Exception - */ - function random_bytes($length) - { - unset($length); // Suppress "variable not used" warnings. - throw new Exception( - 'There is no suitable CSPRNG installed on your system' - ); - } - } -} - -if (!is_callable('random_int')) { - require_once $RandomCompatDIR . '/random_int.php'; -} - -$RandomCompatDIR = null; diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php deleted file mode 100644 index fc1926e5..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +++ /dev/null @@ -1,88 +0,0 @@ -GetRandom($bytes, 0)); - if (RandomCompat_strlen($buf) >= $bytes) { - /** - * Return our random entropy buffer here: - */ - return RandomCompat_substr($buf, 0, $bytes); - } - ++$execCount; - } while ($execCount < $bytes); - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} \ No newline at end of file diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php deleted file mode 100644 index df5b9152..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +++ /dev/null @@ -1,167 +0,0 @@ - 0); - - /** - * Is our result valid? - */ - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - /** - * Return our random entropy buffer here: - */ - return $buf; - } - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Error reading from source device' - ); - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php deleted file mode 100644 index 4af1a242..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ /dev/null @@ -1,88 +0,0 @@ - 2147483647) { - $buf = ''; - for ($i = 0; $i < $bytes; $i += 1073741824) { - $n = ($bytes - $i) > 1073741824 - ? 1073741824 - : $bytes - $i; - $buf .= \Sodium\randombytes_buf($n); - } - } else { - $buf = \Sodium\randombytes_buf($bytes); - } - - if ($buf !== false) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php deleted file mode 100644 index 02160b91..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php +++ /dev/null @@ -1,92 +0,0 @@ - 2147483647) { - for ($i = 0; $i < $bytes; $i += 1073741824) { - $n = ($bytes - $i) > 1073741824 - ? 1073741824 - : $bytes - $i; - $buf .= Sodium::randombytes_buf($n); - } - } else { - $buf .= Sodium::randombytes_buf($bytes); - } - - if (is_string($buf)) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } - } - - /** - * If we reach here, PHP has failed us. - */ - throw new Exception( - 'Could not gather sufficient random data' - ); - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php deleted file mode 100644 index aac9c013..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +++ /dev/null @@ -1,77 +0,0 @@ - operators might accidentally let a float - * through. - */ - - try { - $min = RandomCompat_intval($min); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $min must be an integer' - ); - } - - try { - $max = RandomCompat_intval($max); - } catch (TypeError $ex) { - throw new TypeError( - 'random_int(): $max must be an integer' - ); - } - - /** - * Now that we've verified our weak typing system has given us an integer, - * let's validate the logic then we can move forward with generating random - * integers along a given range. - */ - if ($min > $max) { - throw new Error( - 'Minimum value must be less than or equal to the maximum value' - ); - } - - if ($max === $min) { - return $min; - } - - /** - * Initialize variables to 0 - * - * We want to store: - * $bytes => the number of random bytes we need - * $mask => an integer bitmask (for use with the &) operator - * so we can minimize the number of discards - */ - $attempts = $bits = $bytes = $mask = $valueShift = 0; - - /** - * At this point, $range is a positive number greater than 0. It might - * overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to - * a float and we will lose some precision. - */ - $range = $max - $min; - - /** - * Test for integer overflow: - */ - if (!is_int($range)) { - - /** - * Still safely calculate wider ranges. - * Provided by @CodesInChaos, @oittaa - * - * @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435 - * - * We use ~0 as a mask in this case because it generates all 1s - * - * @ref https://eval.in/400356 (32-bit) - * @ref http://3v4l.org/XX9r5 (64-bit) - */ - $bytes = PHP_INT_SIZE; - $mask = ~0; - - } else { - - /** - * $bits is effectively ceil(log($range, 2)) without dealing with - * type juggling - */ - while ($range > 0) { - if ($bits % 8 === 0) { - ++$bytes; - } - ++$bits; - $range >>= 1; - $mask = $mask << 1 | 1; - } - $valueShift = $min; - } - - $val = 0; - /** - * Now that we have our parameters set up, let's begin generating - * random integers until one falls between $min and $max - */ - do { - /** - * The rejection probability is at most 0.5, so this corresponds - * to a failure probability of 2^-128 for a working RNG - */ - if ($attempts > 128) { - throw new Exception( - 'random_int: RNG is broken - too many rejections' - ); - } - - /** - * Let's grab the necessary number of random bytes - */ - $randomByteString = random_bytes($bytes); - - /** - * Let's turn $randomByteString into an integer - * - * This uses bitwise operators (<< and |) to build an integer - * out of the values extracted from ord() - * - * Example: [9F] | [6D] | [32] | [0C] => - * 159 + 27904 + 3276800 + 201326592 => - * 204631455 - */ - $val &= 0; - for ($i = 0; $i < $bytes; ++$i) { - $val |= ord($randomByteString[$i]) << ($i * 8); - } - - /** - * Apply mask - */ - $val &= $mask; - $val += $valueShift; - - ++$attempts; - /** - * If $val overflows to a floating point number, - * ... or is larger than $max, - * ... or smaller than $min, - * then try again. - */ - } while (!is_int($val) || $val > $max || $val < $min); - - return (int)$val; - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/other/build_phar.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/other/build_phar.php deleted file mode 100644 index 70ef4b2e..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/other/build_phar.php +++ /dev/null @@ -1,57 +0,0 @@ -buildFromDirectory(dirname(__DIR__).'/lib'); -rename( - dirname(__DIR__).'/lib/index.php', - dirname(__DIR__).'/lib/random.php' -); - -/** - * If we pass an (optional) path to a private key as a second argument, we will - * sign the Phar with OpenSSL. - * - * If you leave this out, it will produce an unsigned .phar! - */ -if ($argc > 1) { - if (!@is_readable($argv[1])) { - echo 'Could not read the private key file:', $argv[1], "\n"; - exit(255); - } - $pkeyFile = file_get_contents($argv[1]); - - $private = openssl_get_privatekey($pkeyFile); - if ($private !== false) { - $pkey = ''; - openssl_pkey_export($private, $pkey); - $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); - - /** - * Save the corresponding public key to the file - */ - if (!@is_readable($dist.'/random_compat.phar.pubkey')) { - $details = openssl_pkey_get_details($private); - file_put_contents( - $dist.'/random_compat.phar.pubkey', - $details['key'] - ); - } - } else { - echo 'An error occurred reading the private key from OpenSSL.', "\n"; - exit(255); - } -} diff --git a/wp-content/themes/physioassist/vendor/paragonie/random_compat/psalm-autoload.php b/wp-content/themes/physioassist/vendor/paragonie/random_compat/psalm-autoload.php deleted file mode 100644 index d71d1b81..00000000 --- a/wp-content/themes/physioassist/vendor/paragonie/random_compat/psalm-autoload.php +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - - - diff --git a/wp-content/themes/physioassist/vendor/psr/container/.gitignore b/wp-content/themes/physioassist/vendor/psr/container/.gitignore new file mode 100644 index 00000000..b2395aa0 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/container/.gitignore @@ -0,0 +1,3 @@ +composer.lock +composer.phar +/vendor/ diff --git a/wp-content/themes/physioassist/vendor/psr/container/LICENSE b/wp-content/themes/physioassist/vendor/psr/container/LICENSE new file mode 100644 index 00000000..2877a489 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/container/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2016 container-interop +Copyright (c) 2016 PHP Framework Interoperability Group + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/wp-content/themes/physioassist/vendor/psr/container/README.md b/wp-content/themes/physioassist/vendor/psr/container/README.md new file mode 100644 index 00000000..084f6df5 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/container/README.md @@ -0,0 +1,5 @@ +# PSR Container + +This repository holds all interfaces/classes/traits related to [PSR-11](https://github.com/container-interop/fig-standards/blob/master/proposed/container.md). + +Note that this is not a container implementation of its own. See the specification for more details. diff --git a/wp-content/themes/physioassist/vendor/psr/container/composer.json b/wp-content/themes/physioassist/vendor/psr/container/composer.json new file mode 100644 index 00000000..b8ee0126 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/container/composer.json @@ -0,0 +1,27 @@ +{ + "name": "psr/container", + "type": "library", + "description": "Common Container Interface (PHP FIG PSR-11)", + "keywords": ["psr", "psr-11", "container", "container-interop", "container-interface"], + "homepage": "https://github.com/php-fig/container", + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/wp-content/themes/physioassist/vendor/psr/container/src/ContainerExceptionInterface.php b/wp-content/themes/physioassist/vendor/psr/container/src/ContainerExceptionInterface.php new file mode 100644 index 00000000..d35c6b4d --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/container/src/ContainerExceptionInterface.php @@ -0,0 +1,13 @@ + Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. diff --git a/wp-content/themes/physioassist/vendor/psr/simple-cache/README.md b/wp-content/themes/physioassist/vendor/psr/simple-cache/README.md new file mode 100644 index 00000000..43641d17 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/simple-cache/README.md @@ -0,0 +1,8 @@ +PHP FIG Simple Cache PSR +======================== + +This repository holds all interfaces related to PSR-16. + +Note that this is not a cache implementation of its own. It is merely an interface that describes a cache implementation. See [the specification](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-16-simple-cache.md) for more details. + +You can find implementations of the specification by looking for packages providing the [psr/simple-cache-implementation](https://packagist.org/providers/psr/simple-cache-implementation) virtual package. diff --git a/wp-content/themes/physioassist/vendor/psr/simple-cache/composer.json b/wp-content/themes/physioassist/vendor/psr/simple-cache/composer.json new file mode 100644 index 00000000..2978fa55 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/simple-cache/composer.json @@ -0,0 +1,25 @@ +{ + "name": "psr/simple-cache", + "description": "Common interfaces for simple caching", + "keywords": ["psr", "psr-16", "cache", "simple-cache", "caching"], + "license": "MIT", + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + } +} diff --git a/wp-content/themes/physioassist/vendor/psr/simple-cache/src/CacheException.php b/wp-content/themes/physioassist/vendor/psr/simple-cache/src/CacheException.php new file mode 100644 index 00000000..eba53815 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/simple-cache/src/CacheException.php @@ -0,0 +1,10 @@ + value pairs. Cache keys that do not exist or are stale will have $default as value. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function getMultiple($keys, $default = null); + + /** + * Persists a set of key => value pairs in the cache, with an optional TTL. + * + * @param iterable $values A list of key => value pairs for a multiple-set operation. + * @param null|int|\DateInterval $ttl Optional. The TTL value of this item. If no value is sent and + * the driver supports TTL then the library may set a default value + * for it or let the driver take care of that. + * + * @return bool True on success and false on failure. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $values is neither an array nor a Traversable, + * or if any of the $values are not a legal value. + */ + public function setMultiple($values, $ttl = null); + + /** + * Deletes multiple cache items in a single operation. + * + * @param iterable $keys A list of string-based keys to be deleted. + * + * @return bool True if the items were successfully removed. False if there was an error. + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if $keys is neither an array nor a Traversable, + * or if any of the $keys are not a legal value. + */ + public function deleteMultiple($keys); + + /** + * Determines whether an item is present in the cache. + * + * NOTE: It is recommended that has() is only to be used for cache warming type purposes + * and not to be used within your live applications operations for get/set, as this method + * is subject to a race condition where your has() will return true and immediately after, + * another script can remove it making the state of your app out of date. + * + * @param string $key The cache item key. + * + * @return bool + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * MUST be thrown if the $key string is not a legal value. + */ + public function has($key); +} diff --git a/wp-content/themes/physioassist/vendor/psr/simple-cache/src/InvalidArgumentException.php b/wp-content/themes/physioassist/vendor/psr/simple-cache/src/InvalidArgumentException.php new file mode 100644 index 00000000..6a9524a2 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/psr/simple-cache/src/InvalidArgumentException.php @@ -0,0 +1,13 @@ +=5.6.4", - "symfony/console": "~3.2" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/console": "~4.0" }, "suggest": { + "dragonmantank/cron-expression": "Required to use scheduling component (~2.0).", "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).", - "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", - "symfony/process": "Required to use scheduling component (~3.2)." + "symfony/process": "Required to use scheduling component (~4.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -122,29 +121,31 @@ ], "description": "The Illuminate Console package.", "homepage": "https://laravel.com", - "time": "2017-06-10T13:11:18+00:00" + "time": "2018-04-07T17:05:26+00:00" }, { "name": "illuminate/contracts", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0" + "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/31f0193eb14aa3ee07841dc254081425616e79f0", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/322ec80498b3bf85bc4025d028e130a9b50242b9", + "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9", "shasum": "" }, "require": { - "php": ">=5.6.4" + "php": "^7.1.3", + "psr/container": "~1.0", + "psr/simple-cache": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -164,37 +165,39 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2017-04-19T20:17:43+00:00" + "time": "2018-04-07T17:05:26+00:00" }, { "name": "illuminate/filesystem", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda" + "reference": "c9ab9376076cedd88a374d7281d62b619634d578" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/e0ee832f625fbfadb816a972655b1a66af1a5bda", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/c9ab9376076cedd88a374d7281d62b619634d578", + "reference": "c9ab9376076cedd88a374d7281d62b619634d578", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/finder": "~3.2" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/finder": "~4.0" }, "suggest": { "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -214,41 +217,41 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2017-05-18T14:37:58+00:00" + "time": "2018-04-06T13:15:37+00:00" }, { "name": "illuminate/support", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d" + "reference": "cc8d6f5cef3a901de6bb7d1b362102a6db001085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/a42393b56d0ec75f55e760f2a47bcf85a17a278d", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d", + "url": "https://api.github.com/repos/illuminate/support/zipball/cc8d6f5cef3a901de6bb7d1b362102a6db001085", + "reference": "cc8d6f5cef3a901de6bb7d1b362102a6db001085", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", + "doctrine/inflector": "~1.1", "ext-mbstring": "*", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "nesbot/carbon": "^1.24.1", + "php": "^7.1.3" }, - "replace": { - "tightenco/collect": "self.version" + "conflict": { + "tightenco/collect": "<5.5.33" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." + "illuminate/filesystem": "Required to use the composer class (5.6.*).", + "symfony/process": "Required to use the composer class (~4.0).", + "symfony/var-dumper": "Required to use the dd function (~4.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -271,39 +274,34 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2017-06-15T12:35:32+00:00" + "time": "2018-04-17T12:26:47+00:00" }, { "name": "nesbot/carbon", - "version": "1.22.1", + "version": "1.27.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc" + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", - "reference": "7cdf42c0b1cc763ab7e4c33c47a24e27c66bfccc", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9", "shasum": "" }, "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6 || ~3.0" + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "~2", - "phpunit/phpunit": "~4.0 || ~5.0" + "phpunit/phpunit": "^4.8.35 || ^5.7" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.23-dev" - } - }, "autoload": { "psr-4": { - "Carbon\\": "src/Carbon/" + "": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -324,36 +322,35 @@ "datetime", "time" ], - "time": "2017-01-16T07:55:07+00:00" + "time": "2018-04-23T09:02:57+00:00" }, { - "name": "paragonie/random_compat", - "version": "v2.0.10", + "name": "psr/container", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", "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." + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "files": [ - "lib/random.php" - ] + "psr-4": { + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -361,31 +358,33 @@ ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "csprng", - "pseudorandom", - "random" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2017-03-13T16:27:32+00:00" + "time": "2017-02-14T16:28:37+00:00" }, { - "name": "psr/log", - "version": "1.0.2", + "name": "psr/simple-cache", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", "shasum": "" }, "require": { @@ -399,7 +398,7 @@ }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\SimpleCache\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -412,56 +411,56 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Common interfaces for simple caching", "keywords": [ - "log", + "cache", + "caching", "psr", - "psr-3" + "psr-16", + "simple-cache" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2017-10-23T01:57:42+00:00" }, { "name": "symfony/console", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201" + "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/b0878233cb5c4391347e5495089c7af11b8e6201", - "reference": "b0878233cb5c4391347e5495089c7af11b8e6201", + "url": "https://api.github.com/repos/symfony/console/zipball/aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", + "reference": "aad9a6fe47319f22748fd764f52d3a7ca6fa6b64", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/debug": "~2.8|~3.0", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -488,85 +487,29 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-07-29T21:27:59+00:00" - }, - { - "name": "symfony/debug", - "version": "v3.3.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "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 Debug Component", - "homepage": "https://symfony.com", - "time": "2017-07-28T15:27:31+00:00" + "time": "2018-04-03T05:24:00+00:00" }, { "name": "symfony/finder", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -593,20 +536,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-06-01T21:01:25+00:00" + "time": "2018-04-04T05:10:37+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.4.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", - "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", "shasum": "" }, "require": { @@ -618,7 +561,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.7-dev" } }, "autoload": { @@ -652,29 +595,29 @@ "portable", "shim" ], - "time": "2017-06-09T14:24:12+00:00" + "time": "2018-01-30T19:27:44+00:00" }, { "name": "symfony/process", - "version": "v3.3.6", + "version": "v3.4.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a" + "reference": "4b7d64e852886319e93ddfdecff0d744ab87658b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/07432804942b9f6dd7b7377faf9920af5f95d70a", - "reference": "07432804942b9f6dd7b7377faf9920af5f95d70a", + "url": "https://api.github.com/repos/symfony/process/zipball/4b7d64e852886319e93ddfdecff0d744ab87658b", + "reference": "4b7d64e852886319e93ddfdecff0d744ab87658b", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -701,35 +644,38 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-07-13T13:05:09+00:00" + "time": "2018-04-03T05:22:50+00:00" }, { "name": "symfony/translation", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3" + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3", - "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3", + "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/config": "<2.8", - "symfony/yaml": "<3.3" + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.8|~3.0", - "symfony/intl": "^2.8.18|^3.2.5", - "symfony/yaml": "~3.3" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "psr/log": "To use logging capability in translator", @@ -739,7 +685,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -766,22 +712,22 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-06-24T16:45:30+00:00" + "time": "2018-02-22T10:50:29+00:00" } ], "packages-dev": [ { "name": "squizlabs/php_codesniffer", - "version": "3.0.2", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "c7594a88ae75401e8f8d0bd4deb8431b39045c51" + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/c7594a88ae75401e8f8d0bd4deb8431b39045c51", - "reference": "c7594a88ae75401e8f8d0bd4deb8431b39045c51", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4842476c434e375f9d3182ff7b89059583aa8b27", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27", "shasum": "" }, "require": { @@ -791,7 +737,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ "bin/phpcs", @@ -819,7 +765,7 @@ "phpcs", "standards" ], - "time": "2017-07-18T01:12:32+00:00" + "time": "2018-02-20T21:35:23+00:00" } ], "aliases": [], diff --git a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/Command.php b/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/Command.php index 88e76d86..042745ed 100644 --- a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/Command.php +++ b/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/Command.php @@ -16,7 +16,7 @@ abstract class Command extends BaseCommand /** @var \Throwable Catchable error thrown during construction. */ protected $configError; - /** @var string Path to theme root folder, e.g., /srv/www/example.dev/current/web/app/themes/sage */ + /** @var string Path to theme root folder, e.g., /srv/www/example.test/current/web/app/themes/sage */ protected $root; /** {@inheritdoc} */ diff --git a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/PresetCommand.php b/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/PresetCommand.php index b9f8d61f..88ec1c7c 100644 --- a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/PresetCommand.php +++ b/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Console/Commands/PresetCommand.php @@ -6,7 +6,6 @@ use Illuminate\Filesystem\Filesystem; use InvalidArgumentException; use Roots\Sage\Installer\Presets\Bootstrap; use Roots\Sage\Installer\Presets\Bulma; -use Roots\Sage\Installer\Presets\FontAwesome; use Roots\Sage\Installer\Presets\Foundation; use Roots\Sage\Installer\Presets\None; use Roots\Sage\Installer\Presets\Preset; @@ -43,20 +42,12 @@ class PresetCommand extends Command 'Confirm overwriting files', null ); - $this->addOption( - 'fontawesome', - 'F', - InputOption::VALUE_NONE, - 'Install Font-Awesome', - null - ); } /** {@inheritdoc} */ protected function interact(InputInterface $input, OutputInterface $output) { $this->framework(); - $this->fontAwesome(); } /** {@inheritdoc} */ @@ -72,16 +63,12 @@ class PresetCommand extends Command return; } $preset->handle(); - $this->extras(); $this->info('Done.'); $this->comment('Please run `yarn && yarn build` to compile your fresh scaffolding.'); - } - - protected function extras() - { - if ($this->option('fontawesome')) { - (new FontAwesome($this->root))->handle(); - } + $this->comment(''); + $this->comment('Help support our open-source development efforts by contributing to Sage on OpenCollective:'); + $this->comment('https://opencollective.com/sage'); + $this->comment('Join us on the Roots Community Slack when you become a supporter!'); } protected function framework() @@ -95,14 +82,6 @@ class PresetCommand extends Command $this->input->setArgument('framework', $this->presets->slugs()[$framework]); } - protected function fontAwesome() - { - $installFontAwesome = $this->option('fontawesome') - ?: $this->confirm('Do you want to install Font Awesome?'); - - $this->input->setOption('fontawesome', $installFontAwesome); - } - /** * Confirm overwriting files * diff --git a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/Bootstrap.php b/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/Bootstrap.php index 068adaea..93183b0a 100644 --- a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/Bootstrap.php +++ b/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/Bootstrap.php @@ -7,8 +7,8 @@ class Bootstrap extends Preset /** {@inheritdoc} */ protected function updatePackagesArray(array $packages) { - $packages['dependencies']['bootstrap'] = '^4.0.0-beta'; - $packages['dependencies']['popper.js'] = '~1.11'; + $packages['dependencies']['bootstrap'] = 'v4.1.0'; + $packages['dependencies']['popper.js'] = '^1.14.3'; return $packages; } } diff --git a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/FontAwesome.php b/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/FontAwesome.php deleted file mode 100644 index c7a88c33..00000000 --- a/wp-content/themes/physioassist/vendor/roots/sage-installer/src/Presets/FontAwesome.php +++ /dev/null @@ -1,15 +0,0 @@ - 'Sage Starter Theme', 'URI' => 'https://roots.io/sage/', 'Description' => 'Sage is a WordPress starter theme.', - 'Version' => '9.0.0', + 'Version' => '9.0.1', 'Author' => 'Roots', 'Author URI' => 'https://roots.io/' ]; - + public function __construct($stylesheet = '') { $this->headers = new Collection($this->headers); $this->stylesheet = $stylesheet ?: getcwd().'/resources/style.css'; } - + public function getCurrentHeaders() { $this->content = file_get_contents($this->stylesheet); diff --git a/wp-content/themes/physioassist/vendor/roots/sage-lib/Config.php b/wp-content/themes/physioassist/vendor/roots/sage-lib/Config.php index 75ae5983..a5c3555f 100644 --- a/wp-content/themes/physioassist/vendor/roots/sage-lib/Config.php +++ b/wp-content/themes/physioassist/vendor/roots/sage-lib/Config.php @@ -4,4 +4,5 @@ namespace Roots\Sage; class Config extends \Illuminate\Config\Repository { + protected static $instance; } diff --git a/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.json b/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.json index af179e27..e63006e5 100644 --- a/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.json +++ b/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.json @@ -30,8 +30,8 @@ "require": { "php": ">=7", "composer/installers": "~1.0", - "illuminate/view": "~5.4", - "illuminate/config": "~5.4" + "illuminate/view": "~5.6", + "illuminate/config": "~5.6" }, "require-dev": { "squizlabs/php_codesniffer": "~3.0" diff --git a/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.lock b/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.lock index 19caa344..4ba3982d 100644 --- a/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.lock +++ b/wp-content/themes/physioassist/vendor/roots/sage-lib/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "cebd394669ff4718bcfc1a092d3dc63f", + "content-hash": "8dcadb1a070fc044aa0770fd18116d7e", "packages": [ { "name": "composer/installers", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/composer/installers.git", - "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b" + "reference": "049797d727261bf27f2690430d935067710049c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", - "reference": "9ce17fb70e9a38dd8acff0636a29f5cf4d575c1b", + "url": "https://api.github.com/repos/composer/installers/zipball/049797d727261bf27f2690430d935067710049c2", + "reference": "049797d727261bf27f2690430d935067710049c2", "shasum": "" }, "require": { @@ -29,7 +29,7 @@ }, "require-dev": { "composer/composer": "1.0.*@dev", - "phpunit/phpunit": "4.1.*" + "phpunit/phpunit": "^4.8.36" }, "type": "composer-plugin", "extra": { @@ -100,15 +100,18 @@ "lavalite", "lithium", "magento", + "majima", "mako", "mediawiki", "modulework", + "modx", "moodle", "osclass", "phpbb", "piwik", "ppi", "puppet", + "pxcms", "reindex", "roundcube", "shopware", @@ -121,24 +124,24 @@ "zend", "zikula" ], - "time": "2017-08-09T07:53:48+00:00" + "time": "2017-12-29T09:13:20+00:00" }, { "name": "doctrine/inflector", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^6.2" @@ -146,7 +149,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -188,31 +191,31 @@ "singularize", "string" ], - "time": "2017-07-22T12:18:28+00:00" + "time": "2018-01-09T20:05:19+00:00" }, { "name": "illuminate/config", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9" + "reference": "e8158dff3189deed846c84c66c60fa68c21ee579" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/8fe700aa596bc623d347e4578041fbda7a44c3d9", - "reference": "8fe700aa596bc623d347e4578041fbda7a44c3d9", + "url": "https://api.github.com/repos/illuminate/config/zipball/e8158dff3189deed846c84c66c60fa68c21ee579", + "reference": "e8158dff3189deed846c84c66c60fa68c21ee579", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -232,30 +235,31 @@ ], "description": "The Illuminate Config package.", "homepage": "https://laravel.com", - "time": "2017-02-04T20:27:32+00:00" + "time": "2017-11-07T20:23:51+00:00" }, { "name": "illuminate/container", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6" + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/c5b8a02a34a52c307f16922334c355c5eef725a6", - "reference": "c5b8a02a34a52c307f16922334c355c5eef725a6", + "url": "https://api.github.com/repos/illuminate/container/zipball/4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", + "reference": "4a42d667a05ec6d31f05b532cdac7e8e68e5ea2a", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "php": "^7.1.3", + "psr/container": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -275,29 +279,31 @@ ], "description": "The Illuminate Container package.", "homepage": "https://laravel.com", - "time": "2017-05-24T14:15:53+00:00" + "time": "2018-01-21T02:13:38+00:00" }, { "name": "illuminate/contracts", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0" + "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/31f0193eb14aa3ee07841dc254081425616e79f0", - "reference": "31f0193eb14aa3ee07841dc254081425616e79f0", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/322ec80498b3bf85bc4025d028e130a9b50242b9", + "reference": "322ec80498b3bf85bc4025d028e130a9b50242b9", "shasum": "" }, "require": { - "php": ">=5.6.4" + "php": "^7.1.3", + "psr/container": "~1.0", + "psr/simple-cache": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -317,32 +323,32 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2017-04-19T20:17:43+00:00" + "time": "2018-04-07T17:05:26+00:00" }, { "name": "illuminate/events", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6" + "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/ebdca3b0305e9fc954afb9e422c4559482cd11e6", - "reference": "ebdca3b0305e9fc954afb9e422c4559482cd11e6", + "url": "https://api.github.com/repos/illuminate/events/zipball/b6e73ed40478cef2ef98d5ddb27f333291606cea", + "reference": "b6e73ed40478cef2ef98d5ddb27f333291606cea", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4" + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -362,37 +368,39 @@ ], "description": "The Illuminate Events package.", "homepage": "https://laravel.com", - "time": "2017-05-02T12:57:00+00:00" + "time": "2018-02-26T19:00:55+00:00" }, { "name": "illuminate/filesystem", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda" + "reference": "c9ab9376076cedd88a374d7281d62b619634d578" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/e0ee832f625fbfadb816a972655b1a66af1a5bda", - "reference": "e0ee832f625fbfadb816a972655b1a66af1a5bda", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/c9ab9376076cedd88a374d7281d62b619634d578", + "reference": "c9ab9376076cedd88a374d7281d62b619634d578", "shasum": "" }, "require": { - "illuminate/contracts": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/finder": "~3.2" + "illuminate/contracts": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/finder": "~4.0" }, "suggest": { "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." + "league/flysystem-cached-adapter": "Required to use the Flysystem cache (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", + "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (~1.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -412,41 +420,41 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2017-05-18T14:37:58+00:00" + "time": "2018-04-06T13:15:37+00:00" }, { "name": "illuminate/support", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d" + "reference": "cc8d6f5cef3a901de6bb7d1b362102a6db001085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/a42393b56d0ec75f55e760f2a47bcf85a17a278d", - "reference": "a42393b56d0ec75f55e760f2a47bcf85a17a278d", + "url": "https://api.github.com/repos/illuminate/support/zipball/cc8d6f5cef3a901de6bb7d1b362102a6db001085", + "reference": "cc8d6f5cef3a901de6bb7d1b362102a6db001085", "shasum": "" }, "require": { - "doctrine/inflector": "~1.0", + "doctrine/inflector": "~1.1", "ext-mbstring": "*", - "illuminate/contracts": "5.4.*", - "paragonie/random_compat": "~1.4|~2.0", - "php": ">=5.6.4" + "illuminate/contracts": "5.6.*", + "nesbot/carbon": "^1.24.1", + "php": "^7.1.3" }, - "replace": { - "tightenco/collect": "self.version" + "conflict": { + "tightenco/collect": "<5.5.33" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (5.2.*).", - "symfony/process": "Required to use the composer class (~3.2).", - "symfony/var-dumper": "Required to use the dd function (~3.2)." + "illuminate/filesystem": "Required to use the composer class (5.6.*).", + "symfony/process": "Required to use the composer class (~4.0).", + "symfony/var-dumper": "Required to use the dd function (~4.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -469,35 +477,35 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2017-06-15T12:35:32+00:00" + "time": "2018-04-17T12:26:47+00:00" }, { "name": "illuminate/view", - "version": "v5.4.27", + "version": "v5.6.17", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75" + "reference": "54eaf45ee7946d8f8cde13d5e89c5ea2e997040d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", - "reference": "423652ea1c4c4c2f6494bd6b8cfb6eb943c5ba75", + "url": "https://api.github.com/repos/illuminate/view/zipball/54eaf45ee7946d8f8cde13d5e89c5ea2e997040d", + "reference": "54eaf45ee7946d8f8cde13d5e89c5ea2e997040d", "shasum": "" }, "require": { - "illuminate/container": "5.4.*", - "illuminate/contracts": "5.4.*", - "illuminate/events": "5.4.*", - "illuminate/filesystem": "5.4.*", - "illuminate/support": "5.4.*", - "php": ">=5.6.4", - "symfony/debug": "~3.2" + "illuminate/container": "5.6.*", + "illuminate/contracts": "5.6.*", + "illuminate/events": "5.6.*", + "illuminate/filesystem": "5.6.*", + "illuminate/support": "5.6.*", + "php": "^7.1.3", + "symfony/debug": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.6-dev" } }, "autoload": { @@ -517,36 +525,83 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2017-06-07T13:32:57+00:00" + "time": "2018-04-03T12:56:35+00:00" }, { - "name": "paragonie/random_compat", - "version": "v2.0.10", + "name": "nesbot/carbon", + "version": "1.27.0", "source": { "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d" + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d", - "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ef81c39b67200dcd7401c24363dcac05ac3a4fe9", + "reference": "ef81c39b67200dcd7401c24363dcac05ac3a4fe9", "shasum": "" }, "require": { - "php": ">=5.2.0" + "php": ">=5.3.9", + "symfony/translation": "~2.6 || ~3.0 || ~4.0" }, "require-dev": { - "phpunit/phpunit": "4.*|5.*" + "friendsofphp/php-cs-fixer": "~2", + "phpunit/phpunit": "^4.8.35 || ^5.7" }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + "type": "library", + "autoload": { + "psr-4": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ], + "time": "2018-04-23T09:02:57+00:00" + }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, "autoload": { - "files": [ - "lib/random.php" - ] + "psr-4": { + "Psr\\Container\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -554,18 +609,20 @@ ], "authors": [ { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "csprng", - "pseudorandom", - "random" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2017-03-13T16:27:32+00:00" + "time": "2017-02-14T16:28:37+00:00" }, { "name": "psr/log", @@ -614,34 +671,82 @@ ], "time": "2016-10-10T12:19:37+00:00" }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" + }, { "name": "symfony/debug", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13" + "reference": "5961d02d48828671f5d8a7805e06579d692f6ede" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/7c13ae8ce1e2adbbd574fc39de7be498e1284e13", - "reference": "7c13ae8ce1e2adbbd574fc39de7be498e1284e13", + "url": "https://api.github.com/repos/symfony/debug/zipball/5961d02d48828671f5d8a7805e06579d692f6ede", + "reference": "5961d02d48828671f5d8a7805e06579d692f6ede", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -668,29 +773,29 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-07-28T15:27:31+00:00" + "time": "2018-04-03T05:24:00+00:00" }, { "name": "symfony/finder", - "version": "v3.3.6", + "version": "v4.0.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4" + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4", - "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4", + "url": "https://api.github.com/repos/symfony/finder/zipball/ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", + "reference": "ca27c02b7a3fef4828c998c2ff9ba7aae1641c49", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -717,22 +822,149 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-06-01T21:01:25+00:00" + "time": "2018-04-04T05:10:37+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.7.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" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.7-dev" + } + }, + "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" + ], + "time": "2018-01-30T19:27:44+00:00" + }, + { + "name": "symfony/translation", + "version": "v4.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/e20a9b7f9f62cb33a11638b345c248e7d510c938", + "reference": "e20a9b7f9f62cb33a11638b345c248e7d510c938", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "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 Translation Component", + "homepage": "https://symfony.com", + "time": "2018-02-22T10:50:29+00:00" } ], "packages-dev": [ { "name": "squizlabs/php_codesniffer", - "version": "3.0.2", + "version": "3.2.3", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "c7594a88ae75401e8f8d0bd4deb8431b39045c51" + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/c7594a88ae75401e8f8d0bd4deb8431b39045c51", - "reference": "c7594a88ae75401e8f8d0bd4deb8431b39045c51", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/4842476c434e375f9d3182ff7b89059583aa8b27", + "reference": "4842476c434e375f9d3182ff7b89059583aa8b27", "shasum": "" }, "require": { @@ -742,7 +974,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" }, "bin": [ "bin/phpcs", @@ -770,7 +1002,7 @@ "phpcs", "standards" ], - "time": "2017-07-18T01:12:32+00:00" + "time": "2018-02-20T21:35:23+00:00" } ], "aliases": [], diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Application.php b/wp-content/themes/physioassist/vendor/symfony/console/Application.php index 8fa8bf5e..00e941f1 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Application.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Application.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Console; +use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; use Symfony\Component\Console\Exception\ExceptionInterface; use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Helper\DebugFormatterHelper; @@ -35,10 +36,10 @@ use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleExceptionEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; use Symfony\Component\Console\Exception\CommandNotFoundException; use Symfony\Component\Console\Exception\LogicException; +use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -64,6 +65,7 @@ class Application private $runningCommand; private $name; private $version; + private $commandLoader; private $catchExceptions = true; private $autoExit = true; private $definition; @@ -72,23 +74,18 @@ class Application private $terminal; private $defaultCommand; private $singleCommand; + private $initialized; /** * @param string $name The name of the application * @param string $version The version of the application */ - public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') + public function __construct(string $name = 'UNKNOWN', string $version = 'UNKNOWN') { $this->name = $name; $this->version = $version; $this->terminal = new Terminal(); $this->defaultCommand = 'list'; - $this->helperSet = $this->getDefaultHelperSet(); - $this->definition = $this->getDefaultInputDefinition(); - - foreach ($this->getDefaultCommands() as $command) { - $this->add($command); - } } public function setDispatcher(EventDispatcherInterface $dispatcher) @@ -96,12 +93,14 @@ class Application $this->dispatcher = $dispatcher; } + public function setCommandLoader(CommandLoaderInterface $commandLoader) + { + $this->commandLoader = $commandLoader; + } + /** * Runs the current application. * - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code * * @throws \Exception When running fails. Bypass this when {@link setCatchExceptions()}. @@ -119,31 +118,35 @@ class Application $output = new ConsoleOutput(); } - if (null !== $this->dispatcher && $this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) { - @trigger_error(sprintf('The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead.'), E_USER_DEPRECATED); + $renderException = function ($e) use ($output) { + if (!$e instanceof \Exception) { + $e = class_exists(FatalThrowableError::class) ? new FatalThrowableError($e) : new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine()); + } + if ($output instanceof ConsoleOutputInterface) { + $this->renderException($e, $output->getErrorOutput()); + } else { + $this->renderException($e, $output); + } + }; + if ($phpHandler = set_exception_handler($renderException)) { + restore_exception_handler(); + if (!is_array($phpHandler) || !$phpHandler[0] instanceof ErrorHandler) { + $debugHandler = true; + } elseif ($debugHandler = $phpHandler[0]->setExceptionHandler($renderException)) { + $phpHandler[0]->setExceptionHandler($debugHandler); + } } $this->configureIO($input, $output); try { - $e = null; $exitCode = $this->doRun($input, $output); - } catch (\Exception $x) { - $e = $x; - } catch (\Throwable $x) { - $e = new FatalThrowableError($x); - } - - if (null !== $e) { - if (!$this->catchExceptions || !$x instanceof \Exception) { - throw $x; + } catch (\Exception $e) { + if (!$this->catchExceptions) { + throw $e; } - if ($output instanceof ConsoleOutputInterface) { - $this->renderException($e, $output->getErrorOutput()); - } else { - $this->renderException($e, $output); - } + $renderException($e); $exitCode = $e->getCode(); if (is_numeric($exitCode)) { @@ -154,6 +157,20 @@ class Application } else { $exitCode = 1; } + } finally { + // if the exception handler changed, keep it + // otherwise, unregister $renderException + if (!$phpHandler) { + if (set_exception_handler($renderException) === $renderException) { + restore_exception_handler(); + } + restore_exception_handler(); + } elseif (!$debugHandler) { + $finalHandler = $phpHandler[0]->setExceptionHandler(null); + if ($finalHandler !== $renderException) { + $phpHandler[0]->setExceptionHandler($finalHandler); + } + } } if ($this->autoExit) { @@ -170,9 +187,6 @@ class Application /** * Runs the current application. * - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code */ public function doRun(InputInterface $input, OutputInterface $output) @@ -195,30 +209,29 @@ class Application if (!$name) { $name = $this->defaultCommand; - $this->definition->setArguments(array_merge( - $this->definition->getArguments(), + $definition = $this->getDefinition(); + $definition->setArguments(array_merge( + $definition->getArguments(), array( - 'command' => new InputArgument('command', InputArgument::OPTIONAL, $this->definition->getArgument('command')->getDescription(), $name), + 'command' => new InputArgument('command', InputArgument::OPTIONAL, $definition->getArgument('command')->getDescription(), $name), ) )); } try { - $e = $this->runningCommand = null; + $this->runningCommand = null; // the command name MUST be the first element of the input $command = $this->find($name); - } catch (\Exception $e) { } catch (\Throwable $e) { - } - if (null !== $e) { if (null !== $this->dispatcher) { $event = new ConsoleErrorEvent($input, $output, $e); $this->dispatcher->dispatch(ConsoleEvents::ERROR, $event); - $e = $event->getError(); if (0 === $event->getExitCode()) { return 0; } + + $e = $event->getError(); } throw $e; @@ -231,11 +244,6 @@ class Application return $exitCode; } - /** - * Set a helper set to be used with the command. - * - * @param HelperSet $helperSet The helper set - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -248,14 +256,13 @@ class Application */ public function getHelperSet() { + if (!$this->helperSet) { + $this->helperSet = $this->getDefaultHelperSet(); + } + return $this->helperSet; } - /** - * Set an input definition to be used with this application. - * - * @param InputDefinition $definition The input definition - */ public function setDefinition(InputDefinition $definition) { $this->definition = $definition; @@ -268,6 +275,10 @@ class Application */ public function getDefinition() { + if (!$this->definition) { + $this->definition = $this->getDefaultInputDefinition(); + } + if ($this->singleCommand) { $inputDefinition = $this->definition; $inputDefinition->setArguments(); @@ -418,12 +429,12 @@ class Application * If a command with the same name already exists, it will be overridden. * If the command is not enabled it will not be added. * - * @param Command $command A Command object - * * @return Command|null The registered command if enabled or null */ public function add(Command $command) { + $this->init(); + $command->setApplication($this); if (!$command->isEnabled()) { @@ -436,6 +447,10 @@ class Application throw new LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command))); } + if (!$command->getName()) { + throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($command))); + } + $this->commands[$command->getName()] = $command; foreach ($command->getAliases() as $alias) { @@ -456,7 +471,9 @@ class Application */ public function get($name) { - if (!isset($this->commands[$name])) { + $this->init(); + + if (!$this->has($name)) { throw new CommandNotFoundException(sprintf('The command "%s" does not exist.', $name)); } @@ -483,7 +500,9 @@ class Application */ public function has($name) { - return isset($this->commands[$name]); + $this->init(); + + return isset($this->commands[$name]) || ($this->commandLoader && $this->commandLoader->has($name) && $this->add($this->commandLoader->get($name))); } /** @@ -560,11 +579,19 @@ class Application */ public function find($name) { - $allCommands = array_keys($this->commands); + $this->init(); + + $aliases = array(); + $allCommands = $this->commandLoader ? array_merge($this->commandLoader->getNames(), array_keys($this->commands)) : array_keys($this->commands); $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name); $commands = preg_grep('{^'.$expr.'}', $allCommands); - if (empty($commands) || count(preg_grep('{^'.$expr.'$}', $commands)) < 1) { + if (empty($commands)) { + $commands = preg_grep('{^'.$expr.'}i', $allCommands); + } + + // if no commands matched or we just matched namespaces + if (empty($commands) || count(preg_grep('{^'.$expr.'$}i', $commands)) < 1) { if (false !== $pos = strrpos($name, ':')) { // check if a namespace exists and contains commands $this->findNamespace(substr($name, 0, $pos)); @@ -586,15 +613,16 @@ class Application // filter out aliases for commands which are already on the list if (count($commands) > 1) { - $commandList = $this->commands; - $commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands) { - $commandName = $commandList[$nameOrAlias]->getName(); + $commandList = $this->commandLoader ? array_merge(array_flip($this->commandLoader->getNames()), $this->commands) : $this->commands; + $commands = array_unique(array_filter($commands, function ($nameOrAlias) use ($commandList, $commands, &$aliases) { + $commandName = $commandList[$nameOrAlias] instanceof Command ? $commandList[$nameOrAlias]->getName() : $nameOrAlias; + $aliases[$nameOrAlias] = $commandName; return $commandName === $nameOrAlias || !in_array($commandName, $commands); - }); + })); } - $exact = in_array($name, $commands, true); + $exact = in_array($name, $commands, true) || isset($aliases[$name]); if (count($commands) > 1 && !$exact) { $usableWidth = $this->terminal->getWidth() - 10; $abbrevs = array_values($commands); @@ -603,6 +631,9 @@ class Application $maxLen = max(Helper::strlen($abbrev), $maxLen); } $abbrevs = array_map(function ($cmd) use ($commandList, $usableWidth, $maxLen) { + if (!$commandList[$cmd] instanceof Command) { + return $cmd; + } $abbrev = str_pad($cmd, $maxLen, ' ').' '.$commandList[$cmd]->getDescription(); return Helper::strlen($abbrev) > $usableWidth ? Helper::substr($abbrev, 0, $usableWidth - 3).'...' : $abbrev; @@ -626,8 +657,21 @@ class Application */ public function all($namespace = null) { + $this->init(); + if (null === $namespace) { - return $this->commands; + if (!$this->commandLoader) { + return $this->commands; + } + + $commands = $this->commands; + foreach ($this->commandLoader->getNames() as $name) { + if (!isset($commands[$name]) && $this->has($name)) { + $commands[$name] = $this->get($name); + } + } + + return $commands; } $commands = array(); @@ -637,6 +681,14 @@ class Application } } + if ($this->commandLoader) { + foreach ($this->commandLoader->getNames() as $name) { + if (!isset($commands[$name]) && $namespace === $this->extractNamespace($name, substr_count($namespace, ':') + 1) && $this->has($name)) { + $commands[$name] = $this->get($name); + } + } + } + return $commands; } @@ -662,30 +714,33 @@ class Application /** * Renders a caught exception. - * - * @param \Exception $e An exception instance - * @param OutputInterface $output An OutputInterface instance */ public function renderException(\Exception $e, OutputInterface $output) { $output->writeln('', OutputInterface::VERBOSITY_QUIET); - do { - $title = sprintf( - ' [%s%s] ', - get_class($e), - $output->isVerbose() && 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : '' - ); + $this->doRenderException($e, $output); - $len = Helper::strlen($title); + if (null !== $this->runningCommand) { + $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET); + $output->writeln('', OutputInterface::VERBOSITY_QUIET); + } + } - $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : PHP_INT_MAX; - // HHVM only accepts 32 bits integer in str_split, even when PHP_INT_MAX is a 64 bit integer: https://github.com/facebook/hhvm/issues/1327 - if (defined('HHVM_VERSION') && $width > 1 << 31) { - $width = 1 << 31; + protected function doRenderException(\Exception $e, OutputInterface $output) + { + do { + $message = trim($e->getMessage()); + if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $title = sprintf(' [%s%s] ', get_class($e), 0 !== ($code = $e->getCode()) ? ' ('.$code.')' : ''); + $len = Helper::strlen($title); + } else { + $len = 0; } + + $width = $this->terminal->getWidth() ? $this->terminal->getWidth() - 1 : PHP_INT_MAX; $lines = array(); - foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) { + foreach ('' !== $message ? preg_split('/\r?\n/', $message) : array() as $line) { foreach ($this->splitStringByWidth($line, $width - 4) as $line) { // pre-format lines to get the right string length $lineLength = Helper::strlen($line) + 4; @@ -696,8 +751,13 @@ class Application } $messages = array(); + if (!$e instanceof ExceptionInterface || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $messages[] = sprintf('%s', OutputFormatter::escape(sprintf('In %s line %s:', basename($e->getFile()) ?: 'n/a', $e->getLine() ?: 'n/a'))); + } $messages[] = $emptyLine = sprintf('%s', str_repeat(' ', $len)); - $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::strlen($title)))); + if ('' === $message || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { + $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - Helper::strlen($title)))); + } foreach ($lines as $line) { $messages[] = sprintf(' %s %s', OutputFormatter::escape($line[0]), str_repeat(' ', $len - $line[1])); } @@ -711,12 +771,6 @@ class Application // exception related properties $trace = $e->getTrace(); - array_unshift($trace, array( - 'function' => '', - 'file' => $e->getFile() !== null ? $e->getFile() : 'n/a', - 'line' => $e->getLine() !== null ? $e->getLine() : 'n/a', - 'args' => array(), - )); for ($i = 0, $count = count($trace); $i < $count; ++$i) { $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; @@ -731,82 +785,10 @@ class Application $output->writeln('', OutputInterface::VERBOSITY_QUIET); } } while ($e = $e->getPrevious()); - - if (null !== $this->runningCommand) { - $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName())), OutputInterface::VERBOSITY_QUIET); - $output->writeln('', OutputInterface::VERBOSITY_QUIET); - } - } - - /** - * Tries to figure out the terminal width in which this application runs. - * - * @return int|null - * - * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. - */ - protected function getTerminalWidth() - { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); - - return $this->terminal->getWidth(); - } - - /** - * Tries to figure out the terminal height in which this application runs. - * - * @return int|null - * - * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. - */ - protected function getTerminalHeight() - { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); - - return $this->terminal->getHeight(); - } - - /** - * Tries to figure out the terminal dimensions based on the current environment. - * - * @return array Array containing width and height - * - * @deprecated since version 3.2, to be removed in 4.0. Create a Terminal instance instead. - */ - public function getTerminalDimensions() - { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Create a Terminal instance instead.', __METHOD__), E_USER_DEPRECATED); - - return array($this->terminal->getWidth(), $this->terminal->getHeight()); - } - - /** - * Sets terminal dimensions. - * - * Can be useful to force terminal dimensions for functional tests. - * - * @param int $width The width - * @param int $height The height - * - * @return $this - * - * @deprecated since version 3.2, to be removed in 4.0. Set the COLUMNS and LINES env vars instead. - */ - public function setTerminalDimensions($width, $height) - { - @trigger_error(sprintf('%s is deprecated as of 3.2 and will be removed in 4.0. Set the COLUMNS and LINES env vars instead.', __METHOD__), E_USER_DEPRECATED); - - putenv('COLUMNS='.$width); - putenv('LINES='.$height); - - return $this; } /** * Configures the input and output instances based on the user arguments and options. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function configureIO(InputInterface $input, OutputInterface $output) { @@ -825,29 +807,42 @@ class Application $inputStream = $input->getStream(); } - // This check ensures that calling QuestionHelper::setInputStream() works - // To be removed in 4.0 (in the same time as QuestionHelper::setInputStream) - if (!$inputStream && $this->getHelperSet()->has('question')) { - $inputStream = $this->getHelperSet()->get('question')->getInputStream(false); - } - if (!@posix_isatty($inputStream) && false === getenv('SHELL_INTERACTIVE')) { $input->setInteractive(false); } } + switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) { + case -1: $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); break; + case 1: $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); break; + case 2: $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); break; + case 3: $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); break; + default: $shellVerbosity = 0; break; + } + if (true === $input->hasParameterOption(array('--quiet', '-q'), true)) { $output->setVerbosity(OutputInterface::VERBOSITY_QUIET); - $input->setInteractive(false); + $shellVerbosity = -1; } else { - if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || $input->getParameterOption('--verbose', false, true) === 3) { + if ($input->hasParameterOption('-vvv', true) || $input->hasParameterOption('--verbose=3', true) || 3 === $input->getParameterOption('--verbose', false, true)) { $output->setVerbosity(OutputInterface::VERBOSITY_DEBUG); - } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || $input->getParameterOption('--verbose', false, true) === 2) { + $shellVerbosity = 3; + } elseif ($input->hasParameterOption('-vv', true) || $input->hasParameterOption('--verbose=2', true) || 2 === $input->getParameterOption('--verbose', false, true)) { $output->setVerbosity(OutputInterface::VERBOSITY_VERY_VERBOSE); + $shellVerbosity = 2; } elseif ($input->hasParameterOption('-v', true) || $input->hasParameterOption('--verbose=1', true) || $input->hasParameterOption('--verbose', true) || $input->getParameterOption('--verbose', false, true)) { $output->setVerbosity(OutputInterface::VERBOSITY_VERBOSE); + $shellVerbosity = 1; } } + + if (-1 === $shellVerbosity) { + $input->setInteractive(false); + } + + putenv('SHELL_VERBOSITY='.$shellVerbosity); + $_ENV['SHELL_VERBOSITY'] = $shellVerbosity; + $_SERVER['SHELL_VERBOSITY'] = $shellVerbosity; } /** @@ -856,10 +851,6 @@ class Application * If an event dispatcher has been attached to the application, * events are also dispatched during the life-cycle of the command. * - * @param Command $command A Command instance - * @param InputInterface $input An Input instance - * @param OutputInterface $output An Output instance - * * @return int 0 if everything went fine, or an error code */ protected function doRunCommand(Command $command, InputInterface $input, OutputInterface $output) @@ -893,19 +884,7 @@ class Application } else { $exitCode = ConsoleCommandEvent::RETURN_CODE_DISABLED; } - } catch (\Exception $e) { } catch (\Throwable $e) { - } - if (null !== $e) { - if ($this->dispatcher->hasListeners(ConsoleEvents::EXCEPTION)) { - $x = $e instanceof \Exception ? $e : new FatalThrowableError($e); - $event = new ConsoleExceptionEvent($command, $input, $output, $x, $x->getCode()); - $this->dispatcher->dispatch(ConsoleEvents::EXCEPTION, $event); - - if ($x !== $event->getException()) { - $e = $event->getException(); - } - } $event = new ConsoleErrorEvent($input, $output, $e, $command); $this->dispatcher->dispatch(ConsoleEvents::ERROR, $event); $e = $event->getError(); @@ -928,8 +907,6 @@ class Application /** * Gets the name of the command based on input. * - * @param InputInterface $input The input interface - * * @return string The command name */ protected function getCommandName(InputInterface $input) @@ -1016,8 +993,8 @@ class Application * Finds alternative of $name among $collection, * if nothing is found in $collection, try in $abbrevs. * - * @param string $name The string - * @param array|\Traversable $collection The collection + * @param string $name The string + * @param iterable $collection The collection * * @return string[] A sorted array of similar string */ @@ -1107,9 +1084,8 @@ class Application $lines[] = str_pad($line, $width); $line = $char; } - if ('' !== $line) { - $lines[] = count($lines) ? str_pad($line, $width) : $line; - } + + $lines[] = count($lines) ? str_pad($line, $width) : $line; mb_convert_variables($encoding, 'utf8', $lines); @@ -1139,4 +1115,16 @@ class Application return $namespaces; } + + private function init() + { + if ($this->initialized) { + return; + } + $this->initialized = true; + + foreach ($this->getDefaultCommands() as $command) { + $this->add($command); + } + } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/CHANGELOG.md b/wp-content/themes/physioassist/vendor/symfony/console/CHANGELOG.md index f8539491..2437748a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/CHANGELOG.md +++ b/wp-content/themes/physioassist/vendor/symfony/console/CHANGELOG.md @@ -1,6 +1,28 @@ CHANGELOG ========= +4.0.0 +----- + + * `OutputFormatter` throws an exception when unknown options are used + * removed `QuestionHelper::setInputStream()/getInputStream()` + * removed `Application::getTerminalWidth()/getTerminalHeight()` and + `Application::setTerminalDimensions()/getTerminalDimensions()` +* removed `ConsoleExceptionEvent` +* removed `ConsoleEvents::EXCEPTION` + +3.4.0 +----- + + * added `SHELL_VERBOSITY` env var to control verbosity + * added `CommandLoaderInterface`, `FactoryCommandLoader` and PSR-11 + `ContainerCommandLoader` for commands lazy-loading + * added a case-insensitive command name matching fallback + * added static `Command::$defaultName/getDefaultName()`, allowing for + commands to be registered at compile time in the application command loader. + Setting the `$defaultName` property avoids the need for filling the `command` + attribute on the `console.command` tag when using `AddConsoleCommandPass`. + 3.3.0 ----- @@ -12,6 +34,7 @@ CHANGELOG * deprecated console.exception event in favor of console.error * added ability to handle `CommandNotFoundException` through the `console.error` event +* deprecated default validation in `SymfonyQuestionHelper::ask` 3.2.0 ------ diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Command/Command.php b/wp-content/themes/physioassist/vendor/symfony/console/Command/Command.php index 08a74c3b..f42ee945 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Command/Command.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Command/Command.php @@ -29,6 +29,11 @@ use Symfony\Component\Console\Exception\LogicException; */ class Command { + /** + * @var string|null The default command name + */ + protected static $defaultName; + private $application; private $name; private $processTitle; @@ -46,25 +51,30 @@ class Command private $helperSet; /** - * Constructor. - * + * @return string|null The default command name or null when no default name is set + */ + public static function getDefaultName() + { + $class = get_called_class(); + $r = new \ReflectionProperty($class, 'defaultName'); + + return $class === $r->class ? static::$defaultName : null; + } + + /** * @param string|null $name The name of the command; passing null means it must be set in configure() * * @throws LogicException When the command name is empty */ - public function __construct($name = null) + public function __construct(string $name = null) { $this->definition = new InputDefinition(); - if (null !== $name) { + if (null !== $name || null !== $name = static::getDefaultName()) { $this->setName($name); } $this->configure(); - - if (!$this->name) { - throw new LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this))); - } } /** @@ -77,11 +87,6 @@ class Command $this->ignoreValidationErrors = true; } - /** - * Sets the application instance for this command. - * - * @param Application $application An Application instance - */ public function setApplication(Application $application = null) { $this->application = $application; @@ -92,11 +97,6 @@ class Command } } - /** - * Sets the helper set. - * - * @param HelperSet $helperSet A HelperSet instance - */ public function setHelperSet(HelperSet $helperSet) { $this->helperSet = $helperSet; @@ -150,9 +150,6 @@ class Command * execute() method, you set the code to execute by passing * a Closure to the setCode() method. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * * @return null|int null or 0 if everything went fine, or an error code * * @throws LogicException When this abstract method is not implemented @@ -170,9 +167,6 @@ class Command * This method is executed before the InputDefinition is validated. * This means that this is the only place where the command can * interactively ask for values of missing required arguments. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function interact(InputInterface $input, OutputInterface $output) { @@ -183,9 +177,6 @@ class Command * * This is mainly useful when a lot of commands extends one main command * where some things need to be initialized based on the input arguments and options. - * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance */ protected function initialize(InputInterface $input, OutputInterface $output) { @@ -198,9 +189,6 @@ class Command * setCode() method or by overriding the execute() method * in a sub-class. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * * @return int The command exit code * * @throws \Exception When binding input fails. Bypass this by calling {@link ignoreValidationErrors()}. @@ -286,15 +274,7 @@ class Command if ($code instanceof \Closure) { $r = new \ReflectionFunction($code); if (null === $r->getClosureThis()) { - if (\PHP_VERSION_ID < 70000) { - // Bug in PHP5: https://bugs.php.net/bug.php?id=64761 - // This means that we cannot bind static closures and therefore we must - // ignore any errors here. There is no way to test if the closure is - // bindable. - $code = @\Closure::bind($code, $this); - } else { - $code = \Closure::bind($code, $this); - } + $code = \Closure::bind($code, $this); } } @@ -475,7 +455,7 @@ class Command } /** - * @return bool Whether the command should be publicly shown or not. + * @return bool whether the command should be publicly shown or not */ public function isHidden() { @@ -656,11 +636,9 @@ class Command * * It must be non-empty and parts can optionally be separated by ":". * - * @param string $name - * * @throws InvalidArgumentException When the name is invalid */ - private function validateName($name) + private function validateName(string $name) { if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { throw new InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Command/HelpCommand.php b/wp-content/themes/physioassist/vendor/symfony/console/Command/HelpCommand.php index b8fd911a..112679b3 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Command/HelpCommand.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Command/HelpCommand.php @@ -56,11 +56,6 @@ EOF ; } - /** - * Sets the command. - * - * @param Command $command The command to set - */ public function setCommand(Command $command) { $this->command = $command; diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Command/LockableTrait.php b/wp-content/themes/physioassist/vendor/symfony/console/Command/LockableTrait.php index 95597705..6c634ce4 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Command/LockableTrait.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Command/LockableTrait.php @@ -13,7 +13,10 @@ namespace Symfony\Component\Console\Command; use Symfony\Component\Console\Exception\LogicException; use Symfony\Component\Console\Exception\RuntimeException; -use Symfony\Component\Filesystem\LockHandler; +use Symfony\Component\Lock\Factory; +use Symfony\Component\Lock\Lock; +use Symfony\Component\Lock\Store\FlockStore; +use Symfony\Component\Lock\Store\SemaphoreStore; /** * Basic lock feature for commands. @@ -22,7 +25,8 @@ use Symfony\Component\Filesystem\LockHandler; */ trait LockableTrait { - private $lockHandler; + /** @var Lock */ + private $lock; /** * Locks a command. @@ -31,18 +35,23 @@ trait LockableTrait */ private function lock($name = null, $blocking = false) { - if (!class_exists(LockHandler::class)) { - throw new RuntimeException('To enable the locking feature you must install the symfony/filesystem component.'); + if (!class_exists(SemaphoreStore::class)) { + throw new RuntimeException('To enable the locking feature you must install the symfony/lock component.'); } - if (null !== $this->lockHandler) { + if (null !== $this->lock) { throw new LogicException('A lock is already in place.'); } - $this->lockHandler = new LockHandler($name ?: $this->getName()); + if (SemaphoreStore::isSupported()) { + $store = new SemaphoreStore(); + } else { + $store = new FlockStore(); + } - if (!$this->lockHandler->lock($blocking)) { - $this->lockHandler = null; + $this->lock = (new Factory($store))->createLock($name ?: $this->getName()); + if (!$this->lock->acquire($blocking)) { + $this->lock = null; return false; } @@ -55,9 +64,9 @@ trait LockableTrait */ private function release() { - if ($this->lockHandler) { - $this->lockHandler->release(); - $this->lockHandler = null; + if ($this->lock) { + $this->lock->release(); + $this->lock = null; } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php new file mode 100644 index 00000000..9462996f --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php @@ -0,0 +1,37 @@ + + */ +interface CommandLoaderInterface +{ + /** + * Loads a command. + * + * @param string $name + * + * @return Command + * + * @throws CommandNotFoundException + */ + public function get($name); + + /** + * Checks if a command exists. + * + * @param string $name + * + * @return bool + */ + public function has($name); + + /** + * @return string[] All registered command names + */ + public function getNames(); +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php new file mode 100644 index 00000000..753ad0fb --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php @@ -0,0 +1,55 @@ + + */ +class ContainerCommandLoader implements CommandLoaderInterface +{ + private $container; + private $commandMap; + + /** + * @param ContainerInterface $container A container from which to load command services + * @param array $commandMap An array with command names as keys and service ids as values + */ + public function __construct(ContainerInterface $container, array $commandMap) + { + $this->container = $container; + $this->commandMap = $commandMap; + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + if (!$this->has($name)) { + throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); + } + + return $this->container->get($this->commandMap[$name]); + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); + } + + /** + * {@inheritdoc} + */ + public function getNames() + { + return array_keys($this->commandMap); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php new file mode 100644 index 00000000..d9c20557 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\CommandLoader; + +use Symfony\Component\Console\Exception\CommandNotFoundException; + +/** + * A simple command loader using factories to instantiate commands lazily. + * + * @author Maxime Steinhausser + */ +class FactoryCommandLoader implements CommandLoaderInterface +{ + private $factories; + + /** + * @param callable[] $factories Indexed by command names + */ + public function __construct(array $factories) + { + $this->factories = $factories; + } + + /** + * {@inheritdoc} + */ + public function has($name) + { + return isset($this->factories[$name]); + } + + /** + * {@inheritdoc} + */ + public function get($name) + { + if (!isset($this->factories[$name])) { + throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); + } + + $factory = $this->factories[$name]; + + return $factory(); + } + + /** + * {@inheritdoc} + */ + public function getNames() + { + return array_keys($this->factories); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/ConsoleEvents.php b/wp-content/themes/physioassist/vendor/symfony/console/ConsoleEvents.php index 7f7d4a3f..4975643a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/ConsoleEvents.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/ConsoleEvents.php @@ -24,8 +24,6 @@ final class ConsoleEvents * before they are handled to the command. * * @Event("Symfony\Component\Console\Event\ConsoleCommandEvent") - * - * @var string */ const COMMAND = 'console.command'; @@ -34,26 +32,9 @@ final class ConsoleEvents * executed by the console. * * @Event("Symfony\Component\Console\Event\ConsoleTerminateEvent") - * - * @var string */ const TERMINATE = 'console.terminate'; - /** - * The EXCEPTION event occurs when an uncaught exception appears - * while executing Command#run(). - * - * This event allows you to deal with the exception or - * to modify the thrown exception. - * - * @Event("Symfony\Component\Console\Event\ConsoleExceptionEvent") - * - * @var string - * - * @deprecated The console.exception event is deprecated since version 3.3 and will be removed in 4.0. Use the console.error event instead. - */ - const EXCEPTION = 'console.exception'; - /** * The ERROR event occurs when an uncaught exception or error appears. * @@ -61,8 +42,6 @@ final class ConsoleEvents * to modify the thrown exception. * * @Event("Symfony\Component\Console\Event\ConsoleErrorEvent") - * - * @var string */ const ERROR = 'console.error'; } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php b/wp-content/themes/physioassist/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php index d0626be1..bf14ba2d 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/DependencyInjection/AddConsoleCommandPass.php @@ -12,9 +12,12 @@ namespace Symfony\Component\Console\DependencyInjection; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\CommandLoader\ContainerCommandLoader; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; +use Symfony\Component\DependencyInjection\TypedReference; /** * Registers console commands. @@ -23,34 +26,73 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; */ class AddConsoleCommandPass implements CompilerPassInterface { + private $commandLoaderServiceId; + private $commandTag; + + public function __construct(string $commandLoaderServiceId = 'console.command_loader', string $commandTag = 'console.command') + { + $this->commandLoaderServiceId = $commandLoaderServiceId; + $this->commandTag = $commandTag; + } + public function process(ContainerBuilder $container) { - $commandServices = $container->findTaggedServiceIds('console.command', true); + $commandServices = $container->findTaggedServiceIds($this->commandTag, true); + $lazyCommandMap = array(); + $lazyCommandRefs = array(); $serviceIds = array(); foreach ($commandServices as $id => $tags) { $definition = $container->getDefinition($id); $class = $container->getParameterBag()->resolveValue($definition->getClass()); - if (!$r = $container->getReflectionClass($class)) { - throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); - } - if (!$r->isSubclassOf(Command::class)) { - throw new InvalidArgumentException(sprintf('The service "%s" tagged "console.command" must be a subclass of "%s".', $id, Command::class)); + if (isset($tags[0]['command'])) { + $commandName = $tags[0]['command']; + } else { + if (!$r = $container->getReflectionClass($class)) { + throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id)); + } + if (!$r->isSubclassOf(Command::class)) { + throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must be a subclass of "%s".', $id, $this->commandTag, Command::class)); + } + $commandName = $class::getDefaultName(); } - $commandId = 'console.command.'.strtolower(str_replace('\\', '_', $class)); - if ($container->hasAlias($commandId) || isset($serviceIds[$commandId])) { - $commandId = $commandId.'_'.$id; + if (null === $commandName) { + if (!$definition->isPublic() || $definition->isPrivate()) { + $commandId = 'console.command.public_alias.'.$id; + $container->setAlias($commandId, $id)->setPublic(true); + $id = $commandId; + } + $serviceIds[] = $id; + + continue; } - if (!$definition->isPublic()) { - $container->setAlias($commandId, $id); - $id = $commandId; + + unset($tags[0]); + $lazyCommandMap[$commandName] = $id; + $lazyCommandRefs[$id] = new TypedReference($id, $class); + $aliases = array(); + + foreach ($tags as $tag) { + if (isset($tag['command'])) { + $aliases[] = $tag['command']; + $lazyCommandMap[$tag['command']] = $id; + } } - $serviceIds[$commandId] = $id; + $definition->addMethodCall('setName', array($commandName)); + + if ($aliases) { + $definition->addMethodCall('setAliases', array($aliases)); + } } + $container + ->register($this->commandLoaderServiceId, ContainerCommandLoader::class) + ->setPublic(true) + ->setArguments(array(ServiceLocatorTagPass::register($container, $lazyCommandRefs), $lazyCommandMap)); + $container->setParameter('console.command.ids', $serviceIds); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/ApplicationDescription.php b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/ApplicationDescription.php index a9740fe0..5d347786 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/ApplicationDescription.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/ApplicationDescription.php @@ -24,15 +24,9 @@ class ApplicationDescription { const GLOBAL_NAMESPACE = '_global'; - /** - * @var Application - */ private $application; - - /** - * @var null|string - */ private $namespace; + private $showHidden; /** * @var array @@ -49,19 +43,7 @@ class ApplicationDescription */ private $aliases; - /** - * @var bool - */ - private $showHidden; - - /** - * Constructor. - * - * @param Application $application - * @param string|null $namespace - * @param bool $showHidden - */ - public function __construct(Application $application, $namespace = null, $showHidden = false) + public function __construct(Application $application, string $namespace = null, bool $showHidden = false) { $this->application = $application; $this->namespace = $namespace; @@ -136,12 +118,7 @@ class ApplicationDescription } } - /** - * @param array $commands - * - * @return array - */ - private function sortCommands(array $commands) + private function sortCommands(array $commands): array { $namespacedCommands = array(); $globalCommands = array(); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/Descriptor.php b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/Descriptor.php index 50dd86ce..fe169cb4 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/Descriptor.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/Descriptor.php @@ -73,9 +73,6 @@ abstract class Descriptor implements DescriptorInterface /** * Describes an InputArgument instance. * - * @param InputArgument $argument - * @param array $options - * * @return string|mixed */ abstract protected function describeInputArgument(InputArgument $argument, array $options = array()); @@ -83,9 +80,6 @@ abstract class Descriptor implements DescriptorInterface /** * Describes an InputOption instance. * - * @param InputOption $option - * @param array $options - * * @return string|mixed */ abstract protected function describeInputOption(InputOption $option, array $options = array()); @@ -93,9 +87,6 @@ abstract class Descriptor implements DescriptorInterface /** * Describes an InputDefinition instance. * - * @param InputDefinition $definition - * @param array $options - * * @return string|mixed */ abstract protected function describeInputDefinition(InputDefinition $definition, array $options = array()); @@ -103,9 +94,6 @@ abstract class Descriptor implements DescriptorInterface /** * Describes a Command instance. * - * @param Command $command - * @param array $options - * * @return string|mixed */ abstract protected function describeCommand(Command $command, array $options = array()); @@ -113,9 +101,6 @@ abstract class Descriptor implements DescriptorInterface /** * Describes an Application instance. * - * @param Application $application - * @param array $options - * * @return string|mixed */ abstract protected function describeApplication(Application $application, array $options = array()); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/DescriptorInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/DescriptorInterface.php index 3929b6d9..5d3339a9 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/DescriptorInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/DescriptorInterface.php @@ -21,7 +21,7 @@ use Symfony\Component\Console\Output\OutputInterface; interface DescriptorInterface { /** - * Describes an InputArgument instance. + * Describes an object if supported. * * @param OutputInterface $output * @param object $object diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/JsonDescriptor.php b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/JsonDescriptor.php index 453577cd..f60323be 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/JsonDescriptor.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/JsonDescriptor.php @@ -93,9 +93,6 @@ class JsonDescriptor extends Descriptor /** * Writes data as json. * - * @param array $data - * @param array $options - * * @return array|string */ private function writeData(array $data, array $options) @@ -104,8 +101,6 @@ class JsonDescriptor extends Descriptor } /** - * @param InputArgument $argument - * * @return array */ private function getInputArgumentData(InputArgument $argument) @@ -120,15 +115,13 @@ class JsonDescriptor extends Descriptor } /** - * @param InputOption $option - * * @return array */ private function getInputOptionData(InputOption $option) { return array( 'name' => '--'.$option->getName(), - 'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '', + 'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '', 'accept_value' => $option->acceptValue(), 'is_value_required' => $option->isValueRequired(), 'is_multiple' => $option->isArray(), @@ -138,8 +131,6 @@ class JsonDescriptor extends Descriptor } /** - * @param InputDefinition $definition - * * @return array */ private function getInputDefinitionData(InputDefinition $definition) @@ -158,8 +149,6 @@ class JsonDescriptor extends Descriptor } /** - * @param Command $command - * * @return array */ private function getCommandData(Command $command) diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/MarkdownDescriptor.php b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/MarkdownDescriptor.php index 106bff51..d52ba553 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/MarkdownDescriptor.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/MarkdownDescriptor.php @@ -70,7 +70,7 @@ class MarkdownDescriptor extends Descriptor { $name = '--'.$option->getName(); if ($option->getShortcut()) { - $name .= '|-'.implode('|-', explode('|', $option->getShortcut())).''; + $name .= '|-'.str_replace('|', '|-', $option->getShortcut()).''; } $this->write( diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/TextDescriptor.php b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/TextDescriptor.php index ddb97b60..ac848184 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/TextDescriptor.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/TextDescriptor.php @@ -143,7 +143,7 @@ class TextDescriptor extends Descriptor $this->writeText('Usage:', $options); foreach (array_merge(array($command->getSynopsis(true)), $command->getAliases(), $command->getUsages()) as $usage) { $this->writeText("\n"); - $this->writeText(' '.$usage, $options); + $this->writeText(' '.OutputFormatter::escape($usage), $options); } $this->writeText("\n"); @@ -252,12 +252,8 @@ class TextDescriptor extends Descriptor /** * Formats command aliases to show them in the command description. - * - * @param Command $command - * - * @return string */ - private function getCommandAliasesText($command) + private function getCommandAliasesText(Command $command): string { $text = ''; $aliases = $command->getAliases(); @@ -273,10 +269,8 @@ class TextDescriptor extends Descriptor * Formats input option/argument default value. * * @param mixed $default - * - * @return string */ - private function formatDefaultValue($default) + private function formatDefaultValue($default): string { if (INF === $default) { return 'INF'; @@ -297,10 +291,8 @@ class TextDescriptor extends Descriptor /** * @param (Command|string)[] $commands - * - * @return int */ - private function getColumnWidth(array $commands) + private function getColumnWidth(array $commands): int { $widths = array(); @@ -320,10 +312,8 @@ class TextDescriptor extends Descriptor /** * @param InputOption[] $options - * - * @return int */ - private function calculateTotalWidthForOptions($options) + private function calculateTotalWidthForOptions(array $options): int { $totalWidth = 0; foreach ($options as $option) { diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/XmlDescriptor.php b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/XmlDescriptor.php index 03a26cc8..a2eaca3b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/XmlDescriptor.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Descriptor/XmlDescriptor.php @@ -27,8 +27,6 @@ use Symfony\Component\Console\Input\InputOption; class XmlDescriptor extends Descriptor { /** - * @param InputDefinition $definition - * * @return \DOMDocument */ public function getInputDefinitionDocument(InputDefinition $definition) @@ -50,8 +48,6 @@ class XmlDescriptor extends Descriptor } /** - * @param Command $command - * * @return \DOMDocument */ public function getCommandDocument(Command $command) @@ -95,9 +91,9 @@ class XmlDescriptor extends Descriptor $dom = new \DOMDocument('1.0', 'UTF-8'); $dom->appendChild($rootXml = $dom->createElement('symfony')); - if ($application->getName() !== 'UNKNOWN') { + if ('UNKNOWN' !== $application->getName()) { $rootXml->setAttribute('name', $application->getName()); - if ($application->getVersion() !== 'UNKNOWN') { + if ('UNKNOWN' !== $application->getVersion()) { $rootXml->setAttribute('version', $application->getVersion()); } } @@ -173,9 +169,6 @@ class XmlDescriptor extends Descriptor /** * Appends document children to parent node. - * - * @param \DOMNode $parentNode - * @param \DOMNode $importedParent */ private function appendDocument(\DOMNode $parentNode, \DOMNode $importedParent) { @@ -187,8 +180,6 @@ class XmlDescriptor extends Descriptor /** * Writes DOM document. * - * @param \DOMDocument $dom - * * @return \DOMDocument|string */ private function writeDocument(\DOMDocument $dom) @@ -197,12 +188,7 @@ class XmlDescriptor extends Descriptor $this->write($dom->saveXML()); } - /** - * @param InputArgument $argument - * - * @return \DOMDocument - */ - private function getInputArgumentDocument(InputArgument $argument) + private function getInputArgumentDocument(InputArgument $argument): \DOMDocument { $dom = new \DOMDocument('1.0', 'UTF-8'); @@ -223,12 +209,7 @@ class XmlDescriptor extends Descriptor return $dom; } - /** - * @param InputOption $option - * - * @return \DOMDocument - */ - private function getInputOptionDocument(InputOption $option) + private function getInputOptionDocument(InputOption $option): \DOMDocument { $dom = new \DOMDocument('1.0', 'UTF-8'); @@ -237,7 +218,7 @@ class XmlDescriptor extends Descriptor $pos = strpos($option->getShortcut(), '|'); if (false !== $pos) { $objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos)); - $objectXML->setAttribute('shortcuts', '-'.implode('|-', explode('|', $option->getShortcut()))); + $objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut())); } else { $objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : ''); } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleCommandEvent.php b/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleCommandEvent.php index 92adf1ef..2f517c1d 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleCommandEvent.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleCommandEvent.php @@ -25,8 +25,6 @@ class ConsoleCommandEvent extends ConsoleEvent /** * Indicates if the command should be run or skipped. - * - * @var bool */ private $commandShouldRun = true; diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleErrorEvent.php b/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleErrorEvent.php index 49edb723..3665da77 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleErrorEvent.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleErrorEvent.php @@ -12,7 +12,6 @@ namespace Symfony\Component\Console\Event; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -26,58 +25,34 @@ final class ConsoleErrorEvent extends ConsoleEvent private $error; private $exitCode; - public function __construct(InputInterface $input, OutputInterface $output, $error, Command $command = null) + public function __construct(InputInterface $input, OutputInterface $output, \Throwable $error, Command $command = null) { parent::__construct($command, $input, $output); - $this->setError($error); + $this->error = $error; } - /** - * Returns the thrown error/exception. - * - * @return \Throwable - */ - public function getError() + public function getError(): \Throwable { return $this->error; } - /** - * Replaces the thrown error/exception. - * - * @param \Throwable $error - */ - public function setError($error) + public function setError(\Throwable $error): void { - if (!$error instanceof \Throwable && !$error instanceof \Exception) { - throw new InvalidArgumentException(sprintf('The error passed to ConsoleErrorEvent must be an instance of \Throwable or \Exception, "%s" was passed instead.', is_object($error) ? get_class($error) : gettype($error))); - } - $this->error = $error; } - /** - * Sets the exit code. - * - * @param int $exitCode The command exit code - */ - public function setExitCode($exitCode) + public function setExitCode(int $exitCode): void { - $this->exitCode = (int) $exitCode; + $this->exitCode = $exitCode; $r = new \ReflectionProperty($this->error, 'code'); $r->setAccessible(true); $r->setValue($this->error, $this->exitCode); } - /** - * Gets the exit code. - * - * @return int The command exit code - */ - public function getExitCode() + public function getExitCode(): int { - return null !== $this->exitCode ? $this->exitCode : ($this->error->getCode() ?: 1); + return null !== $this->exitCode ? $this->exitCode : (is_int($this->error->getCode()) && 0 !== $this->error->getCode() ? $this->error->getCode() : 1); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleExceptionEvent.php b/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleExceptionEvent.php deleted file mode 100644 index a31797fa..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleExceptionEvent.php +++ /dev/null @@ -1,71 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\Event; - -@trigger_error(sprintf('The "%s" class is deprecated since version 3.3 and will be removed in 4.0. Use the ConsoleErrorEvent instead.', ConsoleExceptionEvent::class), E_USER_DEPRECATED); - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; - -/** - * Allows to handle exception thrown in a command. - * - * @author Fabien Potencier - * - * @deprecated since version 3.3, to be removed in 4.0. Use ConsoleErrorEvent instead. - */ -class ConsoleExceptionEvent extends ConsoleEvent -{ - private $exception; - private $exitCode; - - public function __construct(Command $command, InputInterface $input, OutputInterface $output, \Exception $exception, $exitCode) - { - parent::__construct($command, $input, $output); - - $this->setException($exception); - $this->exitCode = (int) $exitCode; - } - - /** - * Returns the thrown exception. - * - * @return \Exception The thrown exception - */ - public function getException() - { - return $this->exception; - } - - /** - * Replaces the thrown exception. - * - * This exception will be thrown if no response is set in the event. - * - * @param \Exception $exception The thrown exception - */ - public function setException(\Exception $exception) - { - $this->exception = $exception; - } - - /** - * Gets the exit code. - * - * @return int The command exit code - */ - public function getExitCode() - { - return $this->exitCode; - } -} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleTerminateEvent.php b/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleTerminateEvent.php index b6a5d7c0..ff0c749d 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleTerminateEvent.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Event/ConsoleTerminateEvent.php @@ -22,14 +22,9 @@ use Symfony\Component\Console\Output\OutputInterface; */ class ConsoleTerminateEvent extends ConsoleEvent { - /** - * The exit code of the command. - * - * @var int - */ private $exitCode; - public function __construct(Command $command, InputInterface $input, OutputInterface $output, $exitCode) + public function __construct(Command $command, InputInterface $input, OutputInterface $output, int $exitCode) { parent::__construct($command, $input, $output); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/EventListener/ErrorListener.php b/wp-content/themes/physioassist/vendor/symfony/console/EventListener/ErrorListener.php index 8e35d97d..909d6ea3 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/EventListener/ErrorListener.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/EventListener/ErrorListener.php @@ -40,10 +40,10 @@ class ErrorListener implements EventSubscriberInterface $error = $event->getError(); if (!$inputString = $this->getInputString($event)) { - return $this->logger->error('An error occurred while using the console. Message: "{message}"', array('error' => $error, 'message' => $error->getMessage())); + return $this->logger->error('An error occurred while using the console. Message: "{message}"', array('exception' => $error, 'message' => $error->getMessage())); } - $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', array('error' => $error, 'command' => $inputString, 'message' => $error->getMessage())); + $this->logger->error('Error thrown while running command "{command}". Message: "{message}"', array('exception' => $error, 'command' => $inputString, 'message' => $error->getMessage())); } public function onConsoleTerminate(ConsoleTerminateEvent $event) @@ -59,10 +59,10 @@ class ErrorListener implements EventSubscriberInterface } if (!$inputString = $this->getInputString($event)) { - return $this->logger->error('The console exited with code "{code}"', array('code' => $exitCode)); + return $this->logger->debug('The console exited with code "{code}"', array('code' => $exitCode)); } - $this->logger->error('Command "{command}" exited with code "{code}"', array('command' => $inputString, 'code' => $exitCode)); + $this->logger->debug('Command "{command}" exited with code "{code}"', array('command' => $inputString, 'code' => $exitCode)); } public static function getSubscribedEvents() diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Exception/CommandNotFoundException.php b/wp-content/themes/physioassist/vendor/symfony/console/Exception/CommandNotFoundException.php index 54f1a5b0..2f6e644b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Exception/CommandNotFoundException.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Exception/CommandNotFoundException.php @@ -21,12 +21,12 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce private $alternatives; /** - * @param string $message Exception message to throw - * @param array $alternatives List of similar defined names - * @param int $code Exception code - * @param Exception $previous previous exception used for the exception chaining + * @param string $message Exception message to throw + * @param array $alternatives List of similar defined names + * @param int $code Exception code + * @param \Exception $previous Previous exception used for the exception chaining */ - public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null) + public function __construct(string $message, array $alternatives = array(), int $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatter.php b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatter.php index d32f0915..a78bd952 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatter.php @@ -52,7 +52,8 @@ class OutputFormatter implements OutputFormatterInterface if ('\\' === substr($text, -1)) { $len = strlen($text); $text = rtrim($text, '\\'); - $text .= str_repeat('<<', $len - strlen($text)); + $text = str_replace("\0", '', $text); + $text .= str_repeat("\0", $len - strlen($text)); } return $text; @@ -64,9 +65,9 @@ class OutputFormatter implements OutputFormatterInterface * @param bool $decorated Whether this formatter should actually decorate strings * @param OutputFormatterStyleInterface[] $styles Array of "name => FormatterStyle" instances */ - public function __construct($decorated = false, array $styles = array()) + public function __construct(bool $decorated = false, array $styles = array()) { - $this->decorated = (bool) $decorated; + $this->decorated = $decorated; $this->setStyle('error', new OutputFormatterStyle('white', 'red')); $this->setStyle('info', new OutputFormatterStyle('green')); @@ -167,8 +168,8 @@ class OutputFormatter implements OutputFormatterInterface $output .= $this->applyCurrentStyle(substr($message, $offset)); - if (false !== strpos($output, '<<')) { - return strtr($output, array('\\<' => '<', '<<' => '\\')); + if (false !== strpos($output, "\0")) { + return strtr($output, array("\0" => '\\', '\\<' => '<')); } return str_replace('\\<', '<', $output); @@ -185,11 +186,9 @@ class OutputFormatter implements OutputFormatterInterface /** * Tries to create new style instance from string. * - * @param string $string - * - * @return OutputFormatterStyle|false false if string is not format string + * @return OutputFormatterStyle|false False if string is not format string */ - private function createStyleFromString($string) + private function createStyleFromString(string $string) { if (isset($this->styles[$string])) { return $this->styles[$string]; @@ -211,13 +210,7 @@ class OutputFormatter implements OutputFormatterInterface preg_match_all('([^,;]+)', $match[1], $options); $options = array_shift($options); foreach ($options as $option) { - try { - $style->setOption($option); - } catch (\InvalidArgumentException $e) { - @trigger_error(sprintf('Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "%s".', $e->getMessage()), E_USER_DEPRECATED); - - return false; - } + $style->setOption($option); } } else { return false; @@ -229,12 +222,8 @@ class OutputFormatter implements OutputFormatterInterface /** * Applies current style from stack to text, if must be applied. - * - * @param string $text Input text - * - * @return string Styled text */ - private function applyCurrentStyle($text) + private function applyCurrentStyle(string $text): string { return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyle.php b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyle.php index c7c6b4a0..900f2ef3 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyle.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyle.php @@ -61,7 +61,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface * @param string|null $background The style background color name * @param array $options The style options */ - public function __construct($foreground = null, $background = null, array $options = array()) + public function __construct(string $foreground = null, string $background = null, array $options = array()) { if (null !== $foreground) { $this->setForeground($foreground); @@ -172,9 +172,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface } /** - * Sets multiple style options at once. - * - * @param array $options + * {@inheritdoc} */ public function setOptions(array $options) { diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php index c36fda80..4c7dc413 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleInterface.php @@ -48,8 +48,6 @@ interface OutputFormatterStyleInterface /** * Sets multiple style options at once. - * - * @param array $options */ public function setOptions(array $options); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php index 0a531d29..bf0beb70 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Formatter/OutputFormatterStyleStack.php @@ -23,16 +23,8 @@ class OutputFormatterStyleStack */ private $styles; - /** - * @var OutputFormatterStyleInterface - */ private $emptyStyle; - /** - * Constructor. - * - * @param OutputFormatterStyleInterface|null $emptyStyle - */ public function __construct(OutputFormatterStyleInterface $emptyStyle = null) { $this->emptyStyle = $emptyStyle ?: new OutputFormatterStyle(); @@ -49,8 +41,6 @@ class OutputFormatterStyleStack /** * Pushes a style in the stack. - * - * @param OutputFormatterStyleInterface $style */ public function push(OutputFormatterStyleInterface $style) { @@ -60,8 +50,6 @@ class OutputFormatterStyleStack /** * Pops a style from the stack. * - * @param OutputFormatterStyleInterface|null $style - * * @return OutputFormatterStyleInterface * * @throws InvalidArgumentException When style tags incorrectly nested @@ -102,8 +90,6 @@ class OutputFormatterStyleStack } /** - * @param OutputFormatterStyleInterface $emptyStyle - * * @return $this */ public function setEmptyStyle(OutputFormatterStyleInterface $emptyStyle) diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/DescriptorHelper.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/DescriptorHelper.php index 300e6455..6f5c8183 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/DescriptorHelper.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/DescriptorHelper.php @@ -31,9 +31,6 @@ class DescriptorHelper extends Helper */ private $descriptors = array(); - /** - * Constructor. - */ public function __construct() { $this diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/Helper.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/Helper.php index 44bc2da2..0954bad6 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/Helper.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/Helper.php @@ -23,9 +23,7 @@ abstract class Helper implements HelperInterface protected $helperSet = null; /** - * Sets the helper set associated with this helper. - * - * @param HelperSet $helperSet A HelperSet instance + * {@inheritdoc} */ public function setHelperSet(HelperSet $helperSet = null) { @@ -33,9 +31,7 @@ abstract class Helper implements HelperInterface } /** - * Gets the helper set associated with this helper. - * - * @return HelperSet|null + * {@inheritdoc} */ public function getHelperSet() { diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperInterface.php index 5a923e0a..1ce82358 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperInterface.php @@ -20,8 +20,6 @@ interface HelperInterface { /** * Sets the helper set associated with this helper. - * - * @param HelperSet $helperSet A HelperSet instance */ public function setHelperSet(HelperSet $helperSet = null); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperSet.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperSet.php index 6f12b39d..24ce18fb 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperSet.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/HelperSet.php @@ -28,8 +28,6 @@ class HelperSet implements \IteratorAggregate private $command; /** - * Constructor. - * * @param Helper[] $helpers An array of helper */ public function __construct(array $helpers = array()) @@ -85,11 +83,6 @@ class HelperSet implements \IteratorAggregate return $this->helpers[$name]; } - /** - * Sets the command associated with this helper set. - * - * @param Command $command A Command instance - */ public function setCommand(Command $command = null) { $this->command = $command; diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProcessHelper.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProcessHelper.php index 2c46a2c3..82935bae 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProcessHelper.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProcessHelper.php @@ -15,7 +15,6 @@ use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; -use Symfony\Component\Process\ProcessBuilder; /** * The ProcessHelper class provides helpers to run external processes. @@ -44,9 +43,7 @@ class ProcessHelper extends Helper $formatter = $this->getHelperSet()->get('debug_formatter'); - if (is_array($cmd)) { - $process = ProcessBuilder::create($cmd)->getProcess(); - } elseif ($cmd instanceof Process) { + if ($cmd instanceof Process) { $process = $cmd; } else { $process = new Process($cmd); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressBar.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressBar.php index 31c49ef7..7c0c09a9 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressBar.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressBar.php @@ -24,7 +24,6 @@ use Symfony\Component\Console\Terminal; */ final class ProgressBar { - // options private $barWidth = 28; private $barChar; private $emptyBarChar = '-'; @@ -32,10 +31,6 @@ final class ProgressBar private $format; private $internalFormat; private $redrawFreq = 1; - - /** - * @var OutputInterface - */ private $output; private $step = 0; private $max; @@ -55,7 +50,7 @@ final class ProgressBar * @param OutputInterface $output An OutputInterface instance * @param int $max Maximum steps (0 if unknown) */ - public function __construct(OutputInterface $output, $max = 0) + public function __construct(OutputInterface $output, int $max = 0) { if ($output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); @@ -84,7 +79,7 @@ final class ProgressBar * @param string $name The placeholder name (including the delimiter char like %) * @param callable $callable A PHP callable */ - public static function setPlaceholderFormatterDefinition($name, callable $callable) + public static function setPlaceholderFormatterDefinition(string $name, callable $callable): void { if (!self::$formatters) { self::$formatters = self::initPlaceholderFormatters(); @@ -100,7 +95,7 @@ final class ProgressBar * * @return callable|null A PHP callable */ - public static function getPlaceholderFormatterDefinition($name) + public static function getPlaceholderFormatterDefinition(string $name): ?callable { if (!self::$formatters) { self::$formatters = self::initPlaceholderFormatters(); @@ -117,7 +112,7 @@ final class ProgressBar * @param string $name The format name * @param string $format A format string */ - public static function setFormatDefinition($name, $format) + public static function setFormatDefinition(string $name, string $format): void { if (!self::$formats) { self::$formats = self::initFormats(); @@ -133,7 +128,7 @@ final class ProgressBar * * @return string|null A format string */ - public static function getFormatDefinition($name) + public static function getFormatDefinition(string $name): ?string { if (!self::$formats) { self::$formats = self::initFormats(); @@ -152,102 +147,57 @@ final class ProgressBar * @param string $message The text to associate with the placeholder * @param string $name The name of the placeholder */ - public function setMessage($message, $name = 'message') + public function setMessage(string $message, string $name = 'message') { $this->messages[$name] = $message; } - public function getMessage($name = 'message') + public function getMessage(string $name = 'message') { return $this->messages[$name]; } - /** - * Gets the progress bar start time. - * - * @return int The progress bar start time - */ - public function getStartTime() + public function getStartTime(): int { return $this->startTime; } - /** - * Gets the progress bar maximal steps. - * - * @return int The progress bar max steps - */ - public function getMaxSteps() + public function getMaxSteps(): int { return $this->max; } - /** - * Gets the current step position. - * - * @return int The progress bar step - */ - public function getProgress() + public function getProgress(): int { return $this->step; } - /** - * Gets the progress bar step width. - * - * @return int The progress bar step width - */ - private function getStepWidth() + private function getStepWidth(): int { return $this->stepWidth; } - /** - * Gets the current progress bar percent. - * - * @return float The current progress bar percent - */ - public function getProgressPercent() + public function getProgressPercent(): float { return $this->percent; } - /** - * Sets the progress bar width. - * - * @param int $size The progress bar size - */ - public function setBarWidth($size) + public function setBarWidth(int $size) { - $this->barWidth = max(1, (int) $size); + $this->barWidth = max(1, $size); } - /** - * Gets the progress bar width. - * - * @return int The progress bar size - */ - public function getBarWidth() + public function getBarWidth(): int { return $this->barWidth; } - /** - * Sets the bar character. - * - * @param string $char A character - */ - public function setBarCharacter($char) + public function setBarCharacter(string $char) { $this->barChar = $char; } - /** - * Gets the bar character. - * - * @return string A character - */ - public function getBarCharacter() + public function getBarCharacter(): string { if (null === $this->barChar) { return $this->max ? '=' : $this->emptyBarChar; @@ -256,52 +206,27 @@ final class ProgressBar return $this->barChar; } - /** - * Sets the empty bar character. - * - * @param string $char A character - */ - public function setEmptyBarCharacter($char) + public function setEmptyBarCharacter(string $char) { $this->emptyBarChar = $char; } - /** - * Gets the empty bar character. - * - * @return string A character - */ - public function getEmptyBarCharacter() + public function getEmptyBarCharacter(): string { return $this->emptyBarChar; } - /** - * Sets the progress bar character. - * - * @param string $char A character - */ - public function setProgressCharacter($char) + public function setProgressCharacter(string $char) { $this->progressChar = $char; } - /** - * Gets the progress bar character. - * - * @return string A character - */ - public function getProgressCharacter() + public function getProgressCharacter(): string { return $this->progressChar; } - /** - * Sets the progress bar format. - * - * @param string $format The format - */ - public function setFormat($format) + public function setFormat(string $format) { $this->format = null; $this->internalFormat = $format; @@ -312,9 +237,9 @@ final class ProgressBar * * @param int|float $freq The frequency in steps */ - public function setRedrawFrequency($freq) + public function setRedrawFrequency(int $freq) { - $this->redrawFreq = max((int) $freq, 1); + $this->redrawFreq = max($freq, 1); } /** @@ -322,7 +247,7 @@ final class ProgressBar * * @param int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged */ - public function start($max = null) + public function start(int $max = null) { $this->startTime = time(); $this->step = 0; @@ -340,30 +265,21 @@ final class ProgressBar * * @param int $step Number of steps to advance */ - public function advance($step = 1) + public function advance(int $step = 1) { $this->setProgress($this->step + $step); } /** * Sets whether to overwrite the progressbar, false for new line. - * - * @param bool $overwrite */ - public function setOverwrite($overwrite) + public function setOverwrite(bool $overwrite) { - $this->overwrite = (bool) $overwrite; + $this->overwrite = $overwrite; } - /** - * Sets the current progress. - * - * @param int $step The current progress - */ - public function setProgress($step) + public function setProgress(int $step) { - $step = (int) $step; - if ($this->max && $step > $this->max) { $this->max = $step; } elseif ($step < 0) { @@ -382,7 +298,7 @@ final class ProgressBar /** * Finishes the progress output. */ - public function finish() + public function finish(): void { if (!$this->max) { $this->max = $this->step; @@ -399,7 +315,7 @@ final class ProgressBar /** * Outputs the current progress string. */ - public function display() + public function display(): void { if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) { return; @@ -419,7 +335,7 @@ final class ProgressBar * while a progress bar is running. * Call display() to show the progress bar again. */ - public function clear() + public function clear(): void { if (!$this->overwrite) { return; @@ -432,12 +348,7 @@ final class ProgressBar $this->overwrite(''); } - /** - * Sets the progress bar format. - * - * @param string $format The format - */ - private function setRealFormat($format) + private function setRealFormat(string $format) { // try to use the _nomax variant if available if (!$this->max && null !== self::getFormatDefinition($format.'_nomax')) { @@ -451,23 +362,16 @@ final class ProgressBar $this->formatLineCount = substr_count($this->format, "\n"); } - /** - * Sets the progress bar maximal steps. - * - * @param int $max The progress bar max steps - */ - private function setMaxSteps($max) + private function setMaxSteps(int $max) { - $this->max = max(0, (int) $max); - $this->stepWidth = $this->max ? Helper::strlen($this->max) : 4; + $this->max = max(0, $max); + $this->stepWidth = $this->max ? Helper::strlen((string) $this->max) : 4; } /** * Overwrites a previous message to the output. - * - * @param string $message The message */ - private function overwrite($message) + private function overwrite(string $message): void { if ($this->overwrite) { if (!$this->firstRun) { @@ -491,7 +395,7 @@ final class ProgressBar $this->output->write($message); } - private function determineBestFormat() + private function determineBestFormat(): string { switch ($this->output->getVerbosity()) { // OutputInterface::VERBOSITY_QUIET: display is disabled anyway @@ -506,7 +410,7 @@ final class ProgressBar } } - private static function initPlaceholderFormatters() + private static function initPlaceholderFormatters(): array { return array( 'bar' => function (ProgressBar $bar, OutputInterface $output) { @@ -563,7 +467,7 @@ final class ProgressBar ); } - private static function initFormats() + private static function initFormats(): array { return array( 'normal' => ' %current%/%max% [%bar%] %percent:3s%%', @@ -580,10 +484,7 @@ final class ProgressBar ); } - /** - * @return string - */ - private function buildLine() + private function buildLine(): string { $regex = "{%([a-z\-_]+)(?:\:([^%]+))?%}i"; $callback = function ($matches) { diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressIndicator.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressIndicator.php index d441accd..e6094647 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressIndicator.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/ProgressIndicator.php @@ -39,7 +39,7 @@ class ProgressIndicator * @param int $indicatorChangeInterval Change interval in milliseconds * @param array|null $indicatorValues Animated indicator characters */ - public function __construct(OutputInterface $output, $format = null, $indicatorChangeInterval = 100, $indicatorValues = null) + public function __construct(OutputInterface $output, string $format = null, int $indicatorChangeInterval = 100, array $indicatorValues = null) { $this->output = $output; @@ -219,10 +219,8 @@ class ProgressIndicator /** * Overwrites a previous message to the output. - * - * @param string $message The message */ - private function overwrite($message) + private function overwrite(string $message) { if ($this->output->isDecorated()) { $this->output->write("\x0D\x1B[2K"); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/QuestionHelper.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/QuestionHelper.php index 0801e1d9..46e1383e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/QuestionHelper.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/QuestionHelper.php @@ -11,13 +11,13 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Exception\RuntimeException; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\StreamableInputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; -use Symfony\Component\Console\Formatter\OutputFormatterStyle; use Symfony\Component\Console\Question\Question; use Symfony\Component\Console\Question\ChoiceQuestion; @@ -35,10 +35,6 @@ class QuestionHelper extends Helper /** * Asks a question to the user. * - * @param InputInterface $input An InputInterface instance - * @param OutputInterface $output An OutputInterface instance - * @param Question $question The question to ask - * * @return mixed The user answer * * @throws RuntimeException If there is no data to read in the input stream @@ -50,6 +46,12 @@ class QuestionHelper extends Helper } if (!$input->isInteractive()) { + if ($question instanceof ChoiceQuestion) { + $choices = $question->getChoices(); + + return $choices[$question->getDefault()]; + } + return $question->getDefault(); } @@ -68,46 +70,6 @@ class QuestionHelper extends Helper return $this->validateAttempts($interviewer, $output, $question); } - /** - * Sets the input stream to read from when interacting with the user. - * - * This is mainly useful for testing purpose. - * - * @deprecated since version 3.2, to be removed in 4.0. Use - * StreamableInputInterface::setStream() instead. - * - * @param resource $stream The input stream - * - * @throws InvalidArgumentException In case the stream is not a resource - */ - public function setInputStream($stream) - { - @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use %s::setStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED); - - if (!is_resource($stream)) { - throw new InvalidArgumentException('Input stream must be a valid resource.'); - } - - $this->inputStream = $stream; - } - - /** - * Returns the helper's input stream. - * - * @deprecated since version 3.2, to be removed in 4.0. Use - * StreamableInputInterface::getStream() instead. - * - * @return resource - */ - public function getInputStream() - { - if (0 === func_num_args() || func_get_arg(0)) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.2 and will be removed in 4.0. Use %s::getStream() instead.', __METHOD__, StreamableInputInterface::class), E_USER_DEPRECATED); - } - - return $this->inputStream; - } - /** * {@inheritdoc} */ @@ -127,9 +89,6 @@ class QuestionHelper extends Helper /** * Asks the question to the user. * - * @param OutputInterface $output - * @param Question $question - * * @return bool|mixed|null|string * * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden @@ -161,7 +120,7 @@ class QuestionHelper extends Helper $ret = trim($ret); } } else { - $ret = trim($this->autocomplete($output, $question, $inputStream)); + $ret = trim($this->autocomplete($output, $question, $inputStream, is_array($autocomplete) ? $autocomplete : iterator_to_array($autocomplete, false))); } $ret = strlen($ret) > 0 ? $ret : $question->getDefault(); @@ -175,9 +134,6 @@ class QuestionHelper extends Helper /** * Outputs the question prompt. - * - * @param OutputInterface $output - * @param Question $question */ protected function writePrompt(OutputInterface $output, Question $question) { @@ -202,9 +158,6 @@ class QuestionHelper extends Helper /** * Outputs an error message. - * - * @param OutputInterface $output - * @param \Exception $error */ protected function writeError(OutputInterface $output, \Exception $error) { @@ -223,12 +176,9 @@ class QuestionHelper extends Helper * @param OutputInterface $output * @param Question $question * @param resource $inputStream - * - * @return string */ - private function autocomplete(OutputInterface $output, Question $question, $inputStream) + private function autocomplete(OutputInterface $output, Question $question, $inputStream, array $autocomplete): string { - $autocomplete = $question->getAutocompleterValues(); $ret = ''; $i = 0; @@ -256,7 +206,7 @@ class QuestionHelper extends Helper $output->write("\033[1D"); } - if ($i === 0) { + if (0 === $i) { $ofs = -1; $matches = $autocomplete; $numMatches = count($matches); @@ -311,7 +261,7 @@ class QuestionHelper extends Helper foreach ($autocomplete as $value) { // If typed characters match the beginning chunk of value (e.g. [AcmeDe]moBundle) - if (0 === strpos($value, $ret) && $i !== strlen($value)) { + if (0 === strpos($value, $ret)) { $matches[$numMatches++] = $value; } } @@ -324,7 +274,7 @@ class QuestionHelper extends Helper // Save cursor position $output->write("\0337"); // Write highlighted text - $output->write(''.substr($matches[$ofs], $i).''); + $output->write(''.OutputFormatter::escapeTrailingBackslash(substr($matches[$ofs], $i)).''); // Restore cursor position $output->write("\0338"); } @@ -342,11 +292,9 @@ class QuestionHelper extends Helper * @param OutputInterface $output An Output instance * @param resource $inputStream The handler resource * - * @return string The answer - * * @throws RuntimeException In case the fallback is deactivated and the response cannot be hidden */ - private function getHiddenResponse(OutputInterface $output, $inputStream) + private function getHiddenResponse(OutputInterface $output, $inputStream): string { if ('\\' === DIRECTORY_SEPARATOR) { $exe = __DIR__.'/../Resources/bin/hiddeninput.exe'; @@ -386,7 +334,7 @@ class QuestionHelper extends Helper } if (false !== $shell = $this->getShell()) { - $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword'; + $readCmd = 'csh' === $shell ? 'set mypassword = $<' : 'read -r mypassword'; $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); $value = rtrim(shell_exec($command)); $output->writeln(''); @@ -457,10 +405,8 @@ class QuestionHelper extends Helper /** * Returns whether Stty is available or not. - * - * @return bool */ - private function hasSttyAvailable() + private function hasSttyAvailable(): bool { if (null !== self::$stty) { return self::$stty; @@ -468,6 +414,6 @@ class QuestionHelper extends Helper exec('stty 2>&1', $output, $exitcode); - return self::$stty = $exitcode === 0; + return self::$stty = 0 === $exitcode; } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/SymfonyQuestionHelper.php index 25e094a0..79016b9f 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/SymfonyQuestionHelper.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Console\Helper; -use Symfony\Component\Console\Exception\LogicException; -use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; use Symfony\Component\Console\Question\ConfirmationQuestion; @@ -27,28 +25,6 @@ use Symfony\Component\Console\Formatter\OutputFormatter; */ class SymfonyQuestionHelper extends QuestionHelper { - /** - * {@inheritdoc} - */ - public function ask(InputInterface $input, OutputInterface $output, Question $question) - { - $validator = $question->getValidator(); - $question->setValidator(function ($value) use ($validator) { - if (null !== $validator) { - $value = $validator($value); - } else { - // make required - if (!is_array($value) && !is_bool($value) && 0 === strlen($value)) { - throw new LogicException('A value is required.'); - } - } - - return $value; - }); - - return parent::ask($input, $output, $question); - } - /** * {@inheritdoc} */ diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/Table.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/Table.php index 574e9b46..12ef96eb 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/Table.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/Table.php @@ -26,29 +26,23 @@ class Table { /** * Table headers. - * - * @var array */ private $headers = array(); /** * Table rows. - * - * @var array */ private $rows = array(); /** * Column widths cache. - * - * @var array */ private $effectiveColumnWidths = array(); /** * Number of columns cache. * - * @var array + * @var int */ private $numberOfColumns; @@ -269,6 +263,7 @@ class Table * Renders table to output. * * Example: + * * +---------------+-----------------------+------------------+ * | ISBN | Title | Author | * +---------------+-----------------------+------------------+ @@ -276,6 +271,7 @@ class Table * | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | * | 960-425-059-0 | The Lord of the Rings | J. R. R. Tolkien | * +---------------+-----------------------+------------------+ + * */ public function render() { @@ -309,7 +305,7 @@ class Table /** * Renders horizontal header separator. * - * Example: +-----+-----------+-------+ + * Example: +-----+-----------+-------+ */ private function renderRowSeparator() { @@ -340,12 +336,9 @@ class Table /** * Renders table row. * - * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | - * - * @param array $row - * @param string $cellFormat + * Example: | 9971-5-0210-0 | A Tale of Two Cities | Charles Dickens | */ - private function renderRow(array $row, $cellFormat) + private function renderRow(array $row, string $cellFormat) { if (empty($row)) { return; @@ -361,12 +354,8 @@ class Table /** * Renders table cell with padding. - * - * @param array $row - * @param int $column - * @param string $cellFormat */ - private function renderCell(array $row, $column, $cellFormat) + private function renderCell(array $row, int $column, string $cellFormat) { $cell = isset($row[$column]) ? $row[$column] : ''; $width = $this->effectiveColumnWidths[$column]; @@ -454,15 +443,15 @@ class Table /** * fill rows that contains rowspan > 1. * - * @param array $rows - * @param int $line - * - * @return array + * @throws InvalidArgumentException */ - private function fillNextRows($rows, $line) + private function fillNextRows(array $rows, int $line): array { $unmergedRows = array(); foreach ($rows[$line] as $column => $cell) { + if (null !== $cell && !$cell instanceof TableCell && !is_scalar($cell) && !(is_object($cell) && method_exists($cell, '__toString'))) { + throw new InvalidArgumentException(sprintf('A cell must be a TableCell, a scalar or an object implementing __toString, %s given.', gettype($cell))); + } if ($cell instanceof TableCell && $cell->getRowspan() > 1) { $nbLines = $cell->getRowspan() - 1; $lines = array($cell); @@ -509,10 +498,6 @@ class Table /** * fill cells for a row that contains colspan > 1. - * - * @param array $row - * - * @return array */ private function fillCells($row) { @@ -530,13 +515,7 @@ class Table return $newRow ?: $row; } - /** - * @param array $rows - * @param int $line - * - * @return array - */ - private function copyRow($rows, $line) + private function copyRow(array $rows, int $line): array { $row = $rows[$line]; foreach ($row as $cellKey => $cellValue) { @@ -551,12 +530,8 @@ class Table /** * Gets number of columns by row. - * - * @param array $row - * - * @return int */ - private function getNumberOfColumns(array $row) + private function getNumberOfColumns(array $row): int { $columns = count($row); foreach ($row as $column) { @@ -568,12 +543,8 @@ class Table /** * Gets list of columns for the given row. - * - * @param array $row - * - * @return array */ - private function getRowColumns($row) + private function getRowColumns(array $row): array { $columns = range(0, $this->numberOfColumns - 1); foreach ($row as $cellKey => $cell) { @@ -588,10 +559,8 @@ class Table /** * Calculates columns widths. - * - * @param array $rows */ - private function calculateColumnsWidth($rows) + private function calculateColumnsWidth(array $rows) { for ($column = 0; $column < $this->numberOfColumns; ++$column) { $lengths = array(); @@ -620,25 +589,12 @@ class Table } } - /** - * Gets column width. - * - * @return int - */ - private function getColumnSeparatorWidth() + private function getColumnSeparatorWidth(): int { return strlen(sprintf($this->style->getBorderFormat(), $this->style->getVerticalBorderChar())); } - /** - * Gets cell width. - * - * @param array $row - * @param int $column - * - * @return int - */ - private function getCellWidth(array $row, $column) + private function getCellWidth(array $row, int $column): int { $cellWidth = 0; diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableCell.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableCell.php index a3064fc0..f800fb44 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableCell.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableCell.php @@ -18,29 +18,14 @@ use Symfony\Component\Console\Exception\InvalidArgumentException; */ class TableCell { - /** - * @var string - */ private $value; - - /** - * @var array - */ private $options = array( 'rowspan' => 1, 'colspan' => 1, ); - /** - * @param string $value - * @param array $options - */ - public function __construct($value = '', array $options = array()) + public function __construct(string $value = '', array $options = array()) { - if (is_numeric($value) && !is_string($value)) { - $value = (string) $value; - } - $this->value = $value; // check option names diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableSeparator.php b/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableSeparator.php index 8cc73e69..c7b8dc9c 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableSeparator.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Helper/TableSeparator.php @@ -18,9 +18,6 @@ namespace Symfony\Component\Console\Helper; */ class TableSeparator extends TableCell { - /** - * @param array $options - */ public function __construct(array $options = array()) { parent::__construct('', $options); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/ArgvInput.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/ArgvInput.php index 9264daab..edeabdbf 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/ArgvInput.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/ArgvInput.php @@ -44,8 +44,6 @@ class ArgvInput extends Input private $parsed; /** - * Constructor. - * * @param array|null $argv An array of parameters from the CLI (in the argv format) * @param InputDefinition|null $definition A InputDefinition instance */ @@ -148,11 +146,6 @@ class ArgvInput extends Input if (false !== $pos = strpos($name, '=')) { if (0 === strlen($value = substr($name, $pos + 1))) { - // if no value after "=" then substr() returns "" since php7 only, false before - // see http://php.net/manual/fr/migration70.incompatible.php#119151 - if (\PHP_VERSION_ID < 70000 && false === $value) { - $value = ''; - } array_unshift($this->parsed, $value); } $this->addLongOption(substr($name, 0, $pos), $value); @@ -280,11 +273,15 @@ class ArgvInput extends Input $values = (array) $values; foreach ($this->tokens as $token) { - if ($onlyParams && $token === '--') { + if ($onlyParams && '--' === $token) { return false; } foreach ($values as $value) { - if ($token === $value || 0 === strpos($token, $value.'=')) { + // Options with values: + // For long options, test for '--option=' at beginning + // For short options, test for '-o' at beginning + $leading = 0 === strpos($value, '--') ? $value.'=' : $value; + if ($token === $value || '' !== $leading && 0 === strpos($token, $leading)) { return true; } } @@ -303,18 +300,21 @@ class ArgvInput extends Input while (0 < count($tokens)) { $token = array_shift($tokens); - if ($onlyParams && $token === '--') { + if ($onlyParams && '--' === $token) { return false; } foreach ($values as $value) { - if ($token === $value || 0 === strpos($token, $value.'=')) { - if (false !== $pos = strpos($token, '=')) { - return substr($token, $pos + 1); - } - + if ($token === $value) { return array_shift($tokens); } + // Options with values: + // For long options, test for '--option=' at beginning + // For short options, test for '-o' at beginning + $leading = 0 === strpos($value, '--') ? $value.'=' : $value; + if ('' !== $leading && 0 === strpos($token, $leading)) { + return substr($token, strlen($leading)); + } } } @@ -333,7 +333,7 @@ class ArgvInput extends Input return $match[1].$this->escapeToken($match[2]); } - if ($token && $token[0] !== '-') { + if ($token && '-' !== $token[0]) { return $this->escapeToken($token); } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/ArrayInput.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/ArrayInput.php index 434ec024..4d9797ba 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/ArrayInput.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/ArrayInput.php @@ -27,12 +27,6 @@ class ArrayInput extends Input { private $parameters; - /** - * Constructor. - * - * @param array $parameters An array of parameters - * @param InputDefinition|null $definition A InputDefinition instance - */ public function __construct(array $parameters, InputDefinition $definition = null) { $this->parameters = $parameters; @@ -66,7 +60,7 @@ class ArrayInput extends Input $v = $k; } - if ($onlyParams && $v === '--') { + if ($onlyParams && '--' === $v) { return false; } @@ -86,7 +80,7 @@ class ArrayInput extends Input $values = (array) $values; foreach ($this->parameters as $k => $v) { - if ($onlyParams && ($k === '--' || (is_int($k) && $v === '--'))) { + if ($onlyParams && ('--' === $k || (is_int($k) && '--' === $v))) { return false; } @@ -112,9 +106,15 @@ class ArrayInput extends Input $params = array(); foreach ($this->parameters as $param => $val) { if ($param && '-' === $param[0]) { - $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); + if (is_array($val)) { + foreach ($val as $v) { + $params[] = $param.('' != $v ? '='.$this->escapeToken($v) : ''); + } + } else { + $params[] = $param.('' != $val ? '='.$this->escapeToken($val) : ''); + } } else { - $params[] = $this->escapeToken($val); + $params[] = is_array($val) ? implode(' ', array_map(array($this, 'escapeToken'), $val)) : $this->escapeToken($val); } } @@ -127,7 +127,7 @@ class ArrayInput extends Input protected function parse() { foreach ($this->parameters as $key => $value) { - if ($key === '--') { + if ('--' === $key) { return; } if (0 === strpos($key, '--')) { diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/Input.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/Input.php index 244e7d4e..41413252 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/Input.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/Input.php @@ -27,20 +27,12 @@ use Symfony\Component\Console\Exception\RuntimeException; */ abstract class Input implements InputInterface, StreamableInputInterface { - /** - * @var InputDefinition - */ protected $definition; protected $stream; protected $options = array(); protected $arguments = array(); protected $interactive = true; - /** - * Constructor. - * - * @param InputDefinition|null $definition A InputDefinition instance - */ public function __construct(InputDefinition $definition = null) { if (null === $definition) { diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputArgument.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputArgument.php index 048ee4ff..b5cbbaf1 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputArgument.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputArgument.php @@ -31,8 +31,6 @@ class InputArgument private $description; /** - * Constructor. - * * @param string $name The argument name * @param int $mode The argument mode: self::REQUIRED or self::OPTIONAL * @param string $description A description text @@ -40,11 +38,11 @@ class InputArgument * * @throws InvalidArgumentException When argument mode is not valid */ - public function __construct($name, $mode = null, $description = '', $default = null) + public function __construct(string $name, int $mode = null, string $description = '', $default = null) { if (null === $mode) { $mode = self::OPTIONAL; - } elseif (!is_int($mode) || $mode > 7 || $mode < 1) { + } elseif ($mode > 7 || $mode < 1) { throw new InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputDefinition.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputDefinition.php index 85b778b2..d5b99ab3 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputDefinition.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputDefinition.php @@ -36,8 +36,6 @@ class InputDefinition private $shortcuts; /** - * Constructor. - * * @param array $definition An array of InputArgument and InputOption instance */ public function __construct(array $definition = array()) @@ -47,8 +45,6 @@ class InputDefinition /** * Sets the definition of the input. - * - * @param array $definition The definition array */ public function setDefinition(array $definition) { @@ -95,10 +91,6 @@ class InputDefinition } /** - * Adds an InputArgument object. - * - * @param InputArgument $argument An InputArgument object - * * @throws LogicException When incorrect argument is given */ public function addArgument(InputArgument $argument) @@ -232,10 +224,6 @@ class InputDefinition } /** - * Adds an InputOption object. - * - * @param InputOption $option An InputOption object - * * @throws LogicException When option given already exist */ public function addOption(InputOption $option) @@ -318,7 +306,7 @@ class InputDefinition /** * Gets an InputOption by shortcut. * - * @param string $shortcut the Shortcut name + * @param string $shortcut The Shortcut name * * @return InputOption An InputOption object */ diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputInterface.php index bc664664..43810f7a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputInterface.php @@ -24,7 +24,7 @@ interface InputInterface /** * Returns the first argument from the raw parameters (not parsed). * - * @return string The value of the first argument or null otherwise + * @return string|null The value of the first argument or null otherwise */ public function getFirstArgument(); @@ -33,6 +33,8 @@ interface InputInterface * * This method is to be used to introspect the input parameters * before they have been validated. It must be used carefully. + * Does not necessarily return the correct result for short options + * when multiple flags are combined in the same option. * * @param string|array $values The values to look for in the raw parameters (can be an array) * @param bool $onlyParams Only check real parameters, skip those following an end of options (--) signal @@ -46,6 +48,8 @@ interface InputInterface * * This method is to be used to introspect the input parameters * before they have been validated. It must be used carefully. + * Does not necessarily return the correct result for short options + * when multiple flags are combined in the same option. * * @param string|array $values The value(s) to look for in the raw parameters (can be an array) * @param mixed $default The default value to return if no result is found @@ -57,8 +61,6 @@ interface InputInterface /** * Binds the current Input instance with the given arguments and options. - * - * @param InputDefinition $definition A InputDefinition instance */ public function bind(InputDefinition $definition); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputOption.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputOption.php index f08c5f26..184e369b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/InputOption.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/InputOption.php @@ -33,8 +33,6 @@ class InputOption private $description; /** - * Constructor. - * * @param string $name The option name * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts * @param int $mode The option mode: One of the VALUE_* constants @@ -43,7 +41,7 @@ class InputOption * * @throws InvalidArgumentException If option mode is invalid or incompatible */ - public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null) + public function __construct(string $name, $shortcut = null, int $mode = null, string $description = '', $default = null) { if (0 === strpos($name, '--')) { $name = substr($name, 2); @@ -72,7 +70,7 @@ class InputOption if (null === $mode) { $mode = self::VALUE_NONE; - } elseif (!is_int($mode) || $mode > 15 || $mode < 1) { + } elseif ($mode > 15 || $mode < 1) { throw new InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); } @@ -195,11 +193,9 @@ class InputOption /** * Checks whether the given option equals this one. * - * @param InputOption $option option to compare - * * @return bool */ - public function equals(InputOption $option) + public function equals(self $option) { return $option->getName() === $this->getName() && $option->getShortcut() === $this->getShortcut() diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Input/StringInput.php b/wp-content/themes/physioassist/vendor/symfony/console/Input/StringInput.php index 9ce02174..d1394ece 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Input/StringInput.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Input/StringInput.php @@ -28,11 +28,9 @@ class StringInput extends ArgvInput const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\')'; /** - * Constructor. - * - * @param string $input An array of parameters from the CLI (in the argv format) + * @param string $input A string representing the parameters from the CLI */ - public function __construct($input) + public function __construct(string $input) { parent::__construct(array()); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/LICENSE b/wp-content/themes/physioassist/vendor/symfony/console/LICENSE index 17d16a13..21d7fb9e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/LICENSE +++ b/wp-content/themes/physioassist/vendor/symfony/console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Logger/ConsoleLogger.php b/wp-content/themes/physioassist/vendor/symfony/console/Logger/ConsoleLogger.php index 208575ce..9f07e1fb 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Logger/ConsoleLogger.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Logger/ConsoleLogger.php @@ -29,13 +29,7 @@ class ConsoleLogger extends AbstractLogger const INFO = 'info'; const ERROR = 'error'; - /** - * @var OutputInterface - */ private $output; - /** - * @var array - */ private $verbosityLevelMap = array( LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL, LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL, @@ -46,9 +40,6 @@ class ConsoleLogger extends AbstractLogger LogLevel::INFO => OutputInterface::VERBOSITY_VERY_VERBOSE, LogLevel::DEBUG => OutputInterface::VERBOSITY_DEBUG, ); - /** - * @var array - */ private $formatLevelMap = array( LogLevel::EMERGENCY => self::ERROR, LogLevel::ALERT => self::ERROR, @@ -61,11 +52,6 @@ class ConsoleLogger extends AbstractLogger ); private $errored = false; - /** - * @param OutputInterface $output - * @param array $verbosityLevelMap - * @param array $formatLevelMap - */ public function __construct(OutputInterface $output, array $verbosityLevelMap = array(), array $formatLevelMap = array()) { $this->output = $output; @@ -85,7 +71,7 @@ class ConsoleLogger extends AbstractLogger $output = $this->output; // Write to the error output if necessary and available - if ($this->formatLevelMap[$level] === self::ERROR) { + if (self::ERROR === $this->formatLevelMap[$level]) { if ($this->output instanceof ConsoleOutputInterface) { $output = $output->getErrorOutput(); } @@ -101,6 +87,8 @@ class ConsoleLogger extends AbstractLogger /** * Returns true when any messages have been logged at error levels. + * + * @return bool */ public function hasErrored() { @@ -111,23 +99,26 @@ class ConsoleLogger extends AbstractLogger * Interpolates context values into the message placeholders. * * @author PHP Framework Interoperability Group - * - * @param string $message - * @param array $context - * - * @return string */ - private function interpolate($message, array $context) + private function interpolate(string $message, array $context): string { - // build a replacement array with braces around the context keys - $replace = array(); + if (false === strpos($message, '{')) { + return $message; + } + + $replacements = array(); foreach ($context as $key => $val) { - if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { - $replace[sprintf('{%s}', $key)] = $val; + if (null === $val || is_scalar($val) || (\is_object($val) && method_exists($val, '__toString'))) { + $replacements["{{$key}}"] = $val; + } elseif ($val instanceof \DateTimeInterface) { + $replacements["{{$key}}"] = $val->format(\DateTime::RFC3339); + } elseif (\is_object($val)) { + $replacements["{{$key}}"] = '[object '.\get_class($val).']'; + } else { + $replacements["{{$key}}"] = '['.\gettype($val).']'; } } - // interpolate replacement values into the message and return - return strtr($message, $replace); + return strtr($message, $replacements); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Output/BufferedOutput.php b/wp-content/themes/physioassist/vendor/symfony/console/Output/BufferedOutput.php index 205b02f5..8afc8931 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Output/BufferedOutput.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Output/BufferedOutput.php @@ -16,9 +16,6 @@ namespace Symfony\Component\Console\Output; */ class BufferedOutput extends Output { - /** - * @var string - */ private $buffer = ''; /** diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutput.php b/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutput.php index 007f3f01..cff6cd5a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutput.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutput.php @@ -29,19 +29,14 @@ use Symfony\Component\Console\Formatter\OutputFormatterInterface; */ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface { - /** - * @var StreamOutput - */ private $stderr; /** - * Constructor. - * * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) */ - public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) + public function __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) { parent::__construct($this->openOutputStream(), $verbosity, $decorated, $formatter); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutputInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutputInterface.php index 5eb4fc7a..b44ea7e0 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutputInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Output/ConsoleOutputInterface.php @@ -26,10 +26,5 @@ interface ConsoleOutputInterface extends OutputInterface */ public function getErrorOutput(); - /** - * Sets the OutputInterface used for errors. - * - * @param OutputInterface $error - */ public function setErrorOutput(OutputInterface $error); } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Output/Output.php b/wp-content/themes/physioassist/vendor/symfony/console/Output/Output.php index c12015cc..20635a5f 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Output/Output.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Output/Output.php @@ -33,13 +33,11 @@ abstract class Output implements OutputInterface private $formatter; /** - * Constructor. - * * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) * @param bool $decorated Whether to decorate messages * @param OutputFormatterInterface|null $formatter Output formatter instance (null to use default OutputFormatter) */ - public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = false, OutputFormatterInterface $formatter = null) + public function __construct(?int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = false, OutputFormatterInterface $formatter = null) { $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity; $this->formatter = $formatter ?: new OutputFormatter(); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Output/OutputInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/Output/OutputInterface.php index a291ca7d..cddfbb49 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Output/OutputInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Output/OutputInterface.php @@ -103,11 +103,6 @@ interface OutputInterface */ public function isDecorated(); - /** - * Sets output formatter. - * - * @param OutputFormatterInterface $formatter - */ public function setFormatter(OutputFormatterInterface $formatter); /** diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Output/StreamOutput.php b/wp-content/themes/physioassist/vendor/symfony/console/Output/StreamOutput.php index 22b29aa1..476b2fa0 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Output/StreamOutput.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Output/StreamOutput.php @@ -33,8 +33,6 @@ class StreamOutput extends Output private $stream; /** - * Constructor. - * * @param resource $stream A stream resource * @param int $verbosity The verbosity level (one of the VERBOSITY constants in OutputInterface) * @param bool|null $decorated Whether to decorate messages (null for auto-guessing) @@ -42,7 +40,7 @@ class StreamOutput extends Output * * @throws InvalidArgumentException When first argument is not a real stream */ - public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) + public function __construct($stream, int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null, OutputFormatterInterface $formatter = null) { if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) { throw new InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); @@ -85,21 +83,34 @@ class StreamOutput extends Output * * Colorization is disabled if not supported by the stream: * - * - Windows != 10.0.10586 without Ansicon, ConEmu or Mintty - * - non tty consoles + * This is tricky on Windows, because Cygwin, Msys2 etc emulate pseudo + * terminals via named pipes, so we can only check the environment. + * + * Reference: Composer\XdebugHandler\Process::supportsColor + * https://github.com/composer/xdebug-handler * * @return bool true if the stream supports colorization, false otherwise */ protected function hasColorSupport() { if (DIRECTORY_SEPARATOR === '\\') { - return - '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD + return (function_exists('sapi_windows_vt100_support') + && @sapi_windows_vt100_support($this->stream)) || false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } - return function_exists('posix_isatty') && @posix_isatty($this->stream); + if (function_exists('stream_isatty')) { + return @stream_isatty($this->stream); + } + + if (function_exists('posix_isatty')) { + return @posix_isatty($this->stream); + } + + $stat = @fstat($this->stream); + // Check if formatted mode is S_IFCHR + return $stat ? 0020000 === ($stat['mode'] & 0170000) : false; } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Question/ChoiceQuestion.php b/wp-content/themes/physioassist/vendor/symfony/console/Question/ChoiceQuestion.php index 5815e2b0..b66f2c68 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Question/ChoiceQuestion.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Question/ChoiceQuestion.php @@ -26,13 +26,11 @@ class ChoiceQuestion extends Question private $errorMessage = 'Value "%s" is invalid'; /** - * Constructor. - * * @param string $question The question to ask to the user * @param array $choices The list of available choices * @param mixed $default The default answer to return */ - public function __construct($question, array $choices, $default = null) + public function __construct(string $question, array $choices, $default = null) { if (!$choices) { throw new \LogicException('Choice question must have at least 1 choice available.'); @@ -123,12 +121,7 @@ class ChoiceQuestion extends Question return $this; } - /** - * Returns the default answer validator. - * - * @return callable - */ - private function getDefaultValidator() + private function getDefaultValidator(): callable { $choices = $this->choices; $errorMessage = $this->errorMessage; diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Question/ConfirmationQuestion.php b/wp-content/themes/physioassist/vendor/symfony/console/Question/ConfirmationQuestion.php index 29d98879..7a15e5af 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Question/ConfirmationQuestion.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Question/ConfirmationQuestion.php @@ -21,15 +21,13 @@ class ConfirmationQuestion extends Question private $trueAnswerRegex; /** - * Constructor. - * * @param string $question The question to ask to the user * @param bool $default The default answer to return, true or false * @param string $trueAnswerRegex A regex to match the "yes" answer */ - public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i') + public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') { - parent::__construct($question, (bool) $default); + parent::__construct($question, $default); $this->trueAnswerRegex = $trueAnswerRegex; $this->setNormalizer($this->getDefaultNormalizer()); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Question/Question.php b/wp-content/themes/physioassist/vendor/symfony/console/Question/Question.php index 6425cc54..68399854 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Question/Question.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Question/Question.php @@ -31,12 +31,10 @@ class Question private $normalizer; /** - * Constructor. - * * @param string $question The question to ask to the user * @param mixed $default The default answer to return if the user enters nothing */ - public function __construct($question, $default = null) + public function __construct(string $question, $default = null) { $this->question = $question; $this->default = $default; @@ -119,7 +117,7 @@ class Question /** * Gets values for the autocompleter. * - * @return null|array|\Traversable + * @return null|iterable */ public function getAutocompleterValues() { @@ -129,7 +127,7 @@ class Question /** * Sets values for the autocompleter. * - * @param null|array|\Traversable $values + * @param null|iterable $values * * @return $this * @@ -142,10 +140,8 @@ class Question $values = $this->isAssoc($values) ? array_merge(array_keys($values), array_values($values)) : array_values($values); } - if (null !== $values && !is_array($values)) { - if (!$values instanceof \Traversable || !$values instanceof \Countable) { - throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.'); - } + if (null !== $values && !is_array($values) && !$values instanceof \Traversable) { + throw new InvalidArgumentException('Autocompleter values can be either an array, `null` or a `Traversable` object.'); } if ($this->hidden) { @@ -190,7 +186,7 @@ class Question * * @return $this * - * @throws InvalidArgumentException In case the number of attempts is invalid. + * @throws InvalidArgumentException in case the number of attempts is invalid */ public function setMaxAttempts($attempts) { diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Style/OutputStyle.php b/wp-content/themes/physioassist/vendor/symfony/console/Style/OutputStyle.php index 1274a98d..ad886411 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Style/OutputStyle.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Style/OutputStyle.php @@ -25,9 +25,6 @@ abstract class OutputStyle implements OutputInterface, StyleInterface { private $output; - /** - * @param OutputInterface $output - */ public function __construct(OutputInterface $output) { $this->output = $output; diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Style/StyleInterface.php b/wp-content/themes/physioassist/vendor/symfony/console/Style/StyleInterface.php index 2448547f..475c268f 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Style/StyleInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Style/StyleInterface.php @@ -34,8 +34,6 @@ interface StyleInterface /** * Formats a list. - * - * @param array $elements */ public function listing(array $elements); @@ -83,9 +81,6 @@ interface StyleInterface /** * Formats a table. - * - * @param array $headers - * @param array $rows */ public function table(array $headers, array $rows); @@ -96,7 +91,7 @@ interface StyleInterface * @param string|null $default * @param callable|null $validator * - * @return string + * @return mixed */ public function ask($question, $default = null, $validator = null); @@ -106,7 +101,7 @@ interface StyleInterface * @param string $question * @param callable|null $validator * - * @return string + * @return mixed */ public function askHidden($question, $validator = null); @@ -127,7 +122,7 @@ interface StyleInterface * @param array $choices * @param string|int|null $default * - * @return string + * @return mixed */ public function choice($question, array $choices, $default = null); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Style/SymfonyStyle.php b/wp-content/themes/physioassist/vendor/symfony/console/Style/SymfonyStyle.php index a8679617..311d0675 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Style/SymfonyStyle.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Style/SymfonyStyle.php @@ -40,10 +40,6 @@ class SymfonyStyle extends OutputStyle private $lineLength; private $bufferedOutput; - /** - * @param InputInterface $input - * @param OutputInterface $output - */ public function __construct(InputInterface $input, OutputInterface $output) { $this->input = $input; @@ -283,9 +279,7 @@ class SymfonyStyle extends OutputStyle } /** - * @param Question $question - * - * @return string + * @return mixed */ public function askQuestion(Question $question) { @@ -344,10 +338,7 @@ class SymfonyStyle extends OutputStyle return new self($this->input, $this->getErrorOutput()); } - /** - * @return ProgressBar - */ - private function getProgressBar() + private function getProgressBar(): ProgressBar { if (!$this->progressBar) { throw new RuntimeException('The ProgressBar is not started.'); @@ -356,18 +347,20 @@ class SymfonyStyle extends OutputStyle return $this->progressBar; } - private function autoPrependBlock() + private function autoPrependBlock(): void { $chars = substr(str_replace(PHP_EOL, "\n", $this->bufferedOutput->fetch()), -2); if (!isset($chars[0])) { - return $this->newLine(); //empty history, so we should start with a new line. + $this->newLine(); //empty history, so we should start with a new line. + + return; } //Prepend new line for each non LF chars (This means no blank line was output before) $this->newLine(2 - substr_count($chars, "\n")); } - private function autoPrependText() + private function autoPrependText(): void { $fetched = $this->bufferedOutput->fetch(); //Prepend new line if last char isn't EOL: @@ -376,7 +369,7 @@ class SymfonyStyle extends OutputStyle } } - private function reduceBuffer($messages) + private function reduceBuffer($messages): array { // We need to know if the two last chars are PHP_EOL // Preserve the last 4 chars inserted (PHP_EOL on windows is two chars) in the history buffer @@ -385,7 +378,7 @@ class SymfonyStyle extends OutputStyle }, array_merge(array($this->bufferedOutput->fetch()), (array) $messages)); } - private function createBlock($messages, $type = null, $style = null, $prefix = ' ', $padding = false, $escape = false) + private function createBlock(iterable $messages, string $type = null, string $style = null, string $prefix = ' ', bool $padding = false, bool $escape = false) { $indentLength = 0; $prefixLength = Helper::strlenWithoutDecoration($this->getFormatter(), $prefix); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tester/CommandTester.php b/wp-content/themes/physioassist/vendor/symfony/console/Tester/CommandTester.php index 0bb1603c..39723b26 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tester/CommandTester.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tester/CommandTester.php @@ -31,11 +31,6 @@ class CommandTester private $inputs = array(); private $statusCode; - /** - * Constructor. - * - * @param Command $command A Command instance to test - */ public function __construct(Command $command) { $this->command = $command; @@ -137,8 +132,8 @@ class CommandTester /** * Sets the user inputs. * - * @param array An array of strings representing each input - * passed to the command input stream. + * @param array $inputs An array of strings representing each input + * passed to the command input stream * * @return CommandTester */ diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/ApplicationTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/ApplicationTest.php index 6c060256..e9432c52 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/ApplicationTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/ApplicationTest.php @@ -13,6 +13,9 @@ namespace Symfony\Component\Console\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\CommandLoader\FactoryCommandLoader; +use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\FormatterHelper; use Symfony\Component\Console\Input\ArgvInput; @@ -28,9 +31,9 @@ use Symfony\Component\Console\Output\StreamOutput; use Symfony\Component\Console\Tester\ApplicationTester; use Symfony\Component\Console\Event\ConsoleCommandEvent; use Symfony\Component\Console\Event\ConsoleErrorEvent; -use Symfony\Component\Console\Event\ConsoleExceptionEvent; use Symfony\Component\Console\Event\ConsoleTerminateEvent; use Symfony\Component\Console\Exception\CommandNotFoundException; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\EventDispatcher\EventDispatcher; class ApplicationTest extends TestCase @@ -47,10 +50,14 @@ class ApplicationTest extends TestCase require_once self::$fixturesPath.'/Foo3Command.php'; require_once self::$fixturesPath.'/Foo4Command.php'; require_once self::$fixturesPath.'/Foo5Command.php'; + require_once self::$fixturesPath.'/FooSameCaseUppercaseCommand.php'; + require_once self::$fixturesPath.'/FooSameCaseLowercaseCommand.php'; require_once self::$fixturesPath.'/FoobarCommand.php'; require_once self::$fixturesPath.'/BarBucCommand.php'; require_once self::$fixturesPath.'/FooSubnamespaced1Command.php'; require_once self::$fixturesPath.'/FooSubnamespaced2Command.php'; + require_once self::$fixturesPath.'/TestTiti.php'; + require_once self::$fixturesPath.'/TestToto.php'; } protected function normalizeLineBreaks($text) @@ -115,6 +122,25 @@ class ApplicationTest extends TestCase $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); } + public function testAllWithCommandLoader() + { + $application = new Application(); + $commands = $application->all(); + $this->assertInstanceOf('Symfony\\Component\\Console\\Command\\HelpCommand', $commands['help'], '->all() returns the registered commands'); + + $application->add(new \FooCommand()); + $commands = $application->all('foo'); + $this->assertCount(1, $commands, '->all() takes a namespace as its first argument'); + + $application->setCommandLoader(new FactoryCommandLoader(array( + 'foo:bar1' => function () { return new \Foo1Command(); }, + ))); + $commands = $application->all('foo'); + $this->assertCount(2, $commands, '->all() takes a namespace as its first argument'); + $this->assertInstanceOf(\FooCommand::class, $commands['foo:bar'], '->all() returns the registered commands'); + $this->assertInstanceOf(\Foo1Command::class, $commands['foo:bar1'], '->all() returns the registered commands'); + } + public function testRegister() { $application = new Application(); @@ -167,6 +193,30 @@ class ApplicationTest extends TestCase $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $command, '->get() returns the help command if --help is provided as the input'); } + public function testHasGetWithCommandLoader() + { + $application = new Application(); + $this->assertTrue($application->has('list'), '->has() returns true if a named command is registered'); + $this->assertFalse($application->has('afoobar'), '->has() returns false if a named command is not registered'); + + $application->add($foo = new \FooCommand()); + $this->assertTrue($application->has('afoobar'), '->has() returns true if an alias is registered'); + $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns a command by name'); + $this->assertEquals($foo, $application->get('afoobar'), '->get() returns a command by alias'); + + $application->setCommandLoader(new FactoryCommandLoader(array( + 'foo:bar1' => function () { return new \Foo1Command(); }, + ))); + + $this->assertTrue($application->has('afoobar'), '->has() returns true if an instance is registered for an alias even with command loader'); + $this->assertEquals($foo, $application->get('foo:bar'), '->get() returns an instance by name even with command loader'); + $this->assertEquals($foo, $application->get('afoobar'), '->get() returns an instance by alias even with command loader'); + $this->assertTrue($application->has('foo:bar1'), '->has() returns true for commands registered in the loader'); + $this->assertInstanceOf(\Foo1Command::class, $foo1 = $application->get('foo:bar1'), '->get() returns a command by name from the command loader'); + $this->assertTrue($application->has('afoobar1'), '->has() returns true for commands registered in the loader'); + $this->assertEquals($foo1, $application->get('afoobar1'), '->get() returns a command by name from the command loader'); + } + public function testSilentHelp() { $application = new Application(); @@ -234,6 +284,14 @@ class ApplicationTest extends TestCase $application->findNamespace('f'); } + public function testFindNonAmbiguous() + { + $application = new Application(); + $application->add(new \TestTiti()); + $application->add(new \TestToto()); + $this->assertEquals('test-toto', $application->find('test')->getName()); + } + /** * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException * @expectedExceptionMessage There are no commands defined in the "bar" namespace. @@ -270,6 +328,55 @@ class ApplicationTest extends TestCase $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); } + public function testFindCaseSensitiveFirst() + { + $application = new Application(); + $application->add(new \FooSameCaseUppercaseCommand()); + $application->add(new \FooSameCaseLowercaseCommand()); + + $this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:B'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseUppercaseCommand', $application->find('f:BAR'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation is the correct case'); + } + + public function testFindCaseInsensitiveAsFallback() + { + $application = new Application(); + $application->add(new \FooSameCaseLowercaseCommand()); + + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:b'), '->find() returns a command if the abbreviation is the correct case'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('f:B'), '->find() will fallback to case insensitivity'); + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will fallback to case insensitivity'); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + * @expectedExceptionMessage Command "FoO:BaR" is ambiguous + */ + public function testFindCaseInsensitiveSuggestions() + { + $application = new Application(); + $application->add(new \FooSameCaseLowercaseCommand()); + $application->add(new \FooSameCaseUppercaseCommand()); + + $this->assertInstanceOf('FooSameCaseLowercaseCommand', $application->find('FoO:BaR'), '->find() will find two suggestions with case insensitivity'); + } + + public function testFindWithCommandLoader() + { + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader(array( + 'foo:bar' => $f = function () { return new \FooCommand(); }, + ))); + + $this->assertInstanceOf('FooCommand', $application->find('foo:bar'), '->find() returns a command if its name exists'); + $this->assertInstanceOf('Symfony\Component\Console\Command\HelpCommand', $application->find('h'), '->find() returns a command if its name exists'); + $this->assertInstanceOf('FooCommand', $application->find('f:bar'), '->find() returns a command if the abbreviation for the namespace exists'); + $this->assertInstanceOf('FooCommand', $application->find('f:b'), '->find() returns a command if the abbreviation for the namespace and the command name exist'); + $this->assertInstanceOf('FooCommand', $application->find('a'), '->find() returns a command if the abbreviation exists for an alias'); + } + /** * @dataProvider provideAmbiguousAbbreviations */ @@ -353,8 +460,8 @@ class ApplicationTest extends TestCase public function provideInvalidCommandNamesSingle() { return array( - array('foo3:baR'), - array('foO3:bar'), + array('foo3:barr'), + array('fooo3:bar'), ); } @@ -620,10 +727,10 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $tester->run(array('command' => 'foo'), array('decorated' => true, 'capture_stderr_separately' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth1decorated.txt', $tester->getErrorOutput(true), '->renderException() renders a pretty exceptions with previous exceptions'); $application = new Application(); $application->setAutoExit(false); @@ -633,7 +740,7 @@ class ApplicationTest extends TestCase }); $tester = new ApplicationTester($application); $tester->run(array('command' => 'foo'), array('decorated' => false, 'capture_stderr_separately' => true)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_doublewidth2.txt', $tester->getErrorOutput(true), '->renderException() wraps messages when they are bigger than the terminal'); putenv('COLUMNS=120'); } @@ -648,10 +755,26 @@ class ApplicationTest extends TestCase $tester = new ApplicationTester($application); $tester->run(array('command' => 'foo'), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting'); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_escapeslines.txt', $tester->getDisplay(true), '->renderException() escapes lines containing formatting'); putenv('COLUMNS=120'); } + public function testRenderExceptionLineBreaks() + { + $application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(array('getTerminalWidth'))->getMock(); + $application->setAutoExit(false); + $application->expects($this->any()) + ->method('getTerminalWidth') + ->will($this->returnValue(120)); + $application->register('foo')->setCode(function () { + throw new \InvalidArgumentException("\n\nline 1 with extra spaces \nline 2\n\nline 4\n"); + }); + $tester = new ApplicationTester($application); + + $tester->run(array('command' => 'foo'), array('decorated' => false)); + $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks'); + } + public function testRun() { $application = new Application(); @@ -1108,36 +1231,6 @@ class ApplicationTest extends TestCase $this->assertEquals(1, $tester->getStatusCode()); } - /** - * @group legacy - * @expectedDeprecation The "ConsoleEvents::EXCEPTION" event is deprecated since Symfony 3.3 and will be removed in 4.0. Listen to the "ConsoleEvents::ERROR" event instead. - */ - public function testLegacyExceptionListenersAreStillTriggered() - { - $dispatcher = $this->getDispatcher(); - $dispatcher->addListener('console.exception', function (ConsoleExceptionEvent $event) { - $event->getOutput()->write('caught.'); - - $event->setException(new \RuntimeException('replaced in caught.')); - }); - - $application = new Application(); - $application->setDispatcher($dispatcher); - $application->setAutoExit(false); - - $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { - throw new \RuntimeException('foo'); - }); - - $tester = new ApplicationTester($application); - $tester->run(array('command' => 'foo')); - $this->assertContains('before.caught.error.after.', $tester->getDisplay()); - $this->assertContains('replaced in caught.', $tester->getDisplay()); - } - - /** - * @requires PHP 7 - */ public function testErrorIsRethrownIfNotHandledByConsoleErrorEvent() { $application = new Application(); @@ -1288,24 +1381,6 @@ class ApplicationTest extends TestCase $this->assertEquals('some test value', $extraValue); } - /** - * @group legacy - */ - public function testTerminalDimensions() - { - $application = new Application(); - $originalDimensions = $application->getTerminalDimensions(); - $this->assertCount(2, $originalDimensions); - - $width = 80; - if ($originalDimensions[0] == $width) { - $width = 100; - } - - $application->setTerminalDimensions($width, 80); - $this->assertSame(array($width, 80), $application->getTerminalDimensions()); - } - public function testSetRunCustomDefaultCommand() { $command = new \FooCommand(); @@ -1378,6 +1453,60 @@ class ApplicationTest extends TestCase $this->assertEquals($tester->getInput()->isInteractive(), @posix_isatty($inputStream)); } + public function testRunLazyCommandService() + { + $container = new ContainerBuilder(); + $container->addCompilerPass(new AddConsoleCommandPass()); + $container + ->register('lazy-command', LazyCommand::class) + ->addTag('console.command', array('command' => 'lazy:command')) + ->addTag('console.command', array('command' => 'lazy:alias')) + ->addTag('console.command', array('command' => 'lazy:alias2')); + $container->compile(); + + $application = new Application(); + $application->setCommandLoader($container->get('console.command_loader')); + $application->setAutoExit(false); + + $tester = new ApplicationTester($application); + + $tester->run(array('command' => 'lazy:command')); + $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); + + $tester->run(array('command' => 'lazy:alias')); + $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); + + $tester->run(array('command' => 'lazy:alias2')); + $this->assertSame("lazy-command called\n", $tester->getDisplay(true)); + + $command = $application->get('lazy:command'); + $this->assertSame(array('lazy:alias', 'lazy:alias2'), $command->getAliases()); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + */ + public function testGetDisabledLazyCommand() + { + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $application->get('disabled'); + } + + public function testHasReturnsFalseForDisabledLazyCommand() + { + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $this->assertFalse($application->has('disabled')); + } + + public function testAllExcludesDisabledLazyCommand() + { + $application = new Application(); + $application->setCommandLoader(new FactoryCommandLoader(array('disabled' => function () { return new DisabledCommand(); }))); + $this->assertArrayNotHasKey('disabled', $application->all()); + } + protected function getDispatcher($skipCommand = false) { $dispatcher = new EventDispatcher(); @@ -1404,9 +1533,6 @@ class ApplicationTest extends TestCase return $dispatcher; } - /** - * @requires PHP 7 - */ public function testErrorIsRethrownIfNotHandledByConsoleErrorEventWithCatchingEnabled() { $application = new Application(); @@ -1426,6 +1552,41 @@ class ApplicationTest extends TestCase $this->assertSame($e->getMessage(), 'Class \'UnknownClass\' not found'); } } + + /** + * @expectedException \RuntimeException + * @expectedExceptionMessage foo + */ + public function testThrowingErrorListener() + { + $dispatcher = $this->getDispatcher(); + $dispatcher->addListener('console.error', function (ConsoleErrorEvent $event) { + throw new \RuntimeException('foo'); + }); + + $dispatcher->addListener('console.command', function () { + throw new \RuntimeException('bar'); + }); + + $application = new Application(); + $application->setDispatcher($dispatcher); + $application->setAutoExit(false); + $application->setCatchExceptions(false); + + $application->register('foo')->setCode(function (InputInterface $input, OutputInterface $output) { + $output->write('foo.'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo')); + } + + protected function tearDown() + { + putenv('SHELL_VERBOSITY'); + unset($_ENV['SHELL_VERBOSITY']); + unset($_SERVER['SHELL_VERBOSITY']); + } } class CustomApplication extends Application @@ -1465,3 +1626,19 @@ class CustomDefaultCommandApplication extends Application $this->setDefaultCommand($command->getName()); } } + +class LazyCommand extends Command +{ + public function execute(InputInterface $input, OutputInterface $output) + { + $output->writeln('lazy-command called'); + } +} + +class DisabledCommand extends Command +{ + public function isEnabled() + { + return false; + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/CommandTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/CommandTest.php index 93b4721c..0e516321 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/CommandTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/CommandTest.php @@ -46,7 +46,7 @@ class CommandTest extends TestCase */ public function testCommandNameCannotBeEmpty() { - new Command(); + (new Application())->add(new Command()); } public function testSetApplication() @@ -392,13 +392,7 @@ class CommandTest extends TestCase $tester = new CommandTester($command); $tester->execute(array()); - if (\PHP_VERSION_ID < 70000) { - // Cannot bind static closures in PHP 5 - $this->assertEquals('interact called'.PHP_EOL.'not bound'.PHP_EOL, $tester->getDisplay()); - } else { - // Can bind static closures in PHP 7 - $this->assertEquals('interact called'.PHP_EOL.'bound'.PHP_EOL, $tester->getDisplay()); - } + $this->assertEquals('interact called'.PHP_EOL.'bound'.PHP_EOL, $tester->getDisplay()); } private static function createClosure() diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/LockableTraitTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/LockableTraitTest.php index d45da73b..f5d62d73 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/LockableTraitTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Command/LockableTraitTest.php @@ -13,7 +13,9 @@ namespace Symfony\Component\Console\Tests\Command; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Tester\CommandTester; -use Symfony\Component\Filesystem\LockHandler; +use Symfony\Component\Lock\Factory; +use Symfony\Component\Lock\Store\FlockStore; +use Symfony\Component\Lock\Store\SemaphoreStore; class LockableTraitTest extends TestCase { @@ -39,8 +41,14 @@ class LockableTraitTest extends TestCase { $command = new \FooLockCommand(); - $lock = new LockHandler($command->getName()); - $lock->lock(); + if (SemaphoreStore::isSupported()) { + $store = new SemaphoreStore(); + } else { + $store = new FlockStore(); + } + + $lock = (new Factory($store))->createLock($command->getName()); + $lock->acquire(); $tester = new CommandTester($command); $this->assertSame(1, $tester->execute(array())); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php new file mode 100644 index 00000000..78eefd24 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/ContainerCommandLoaderTest.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\CommandLoader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\CommandLoader\ContainerCommandLoader; +use Symfony\Component\DependencyInjection\ServiceLocator; + +class ContainerCommandLoaderTest extends TestCase +{ + public function testHas() + { + $loader = new ContainerCommandLoader(new ServiceLocator(array( + 'foo-service' => function () { return new Command('foo'); }, + 'bar-service' => function () { return new Command('bar'); }, + )), array('foo' => 'foo-service', 'bar' => 'bar-service')); + + $this->assertTrue($loader->has('foo')); + $this->assertTrue($loader->has('bar')); + $this->assertFalse($loader->has('baz')); + } + + public function testGet() + { + $loader = new ContainerCommandLoader(new ServiceLocator(array( + 'foo-service' => function () { return new Command('foo'); }, + 'bar-service' => function () { return new Command('bar'); }, + )), array('foo' => 'foo-service', 'bar' => 'bar-service')); + + $this->assertInstanceOf(Command::class, $loader->get('foo')); + $this->assertInstanceOf(Command::class, $loader->get('bar')); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + */ + public function testGetUnknownCommandThrows() + { + (new ContainerCommandLoader(new ServiceLocator(array()), array()))->get('unknown'); + } + + public function testGetCommandNames() + { + $loader = new ContainerCommandLoader(new ServiceLocator(array( + 'foo-service' => function () { return new Command('foo'); }, + 'bar-service' => function () { return new Command('bar'); }, + )), array('foo' => 'foo-service', 'bar' => 'bar-service')); + + $this->assertSame(array('foo', 'bar'), $loader->getNames()); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php new file mode 100644 index 00000000..5ee6cd1e --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/CommandLoader/FactoryCommandLoaderTest.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Console\Tests\CommandLoader; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\CommandLoader\FactoryCommandLoader; + +class FactoryCommandLoaderTest extends TestCase +{ + public function testHas() + { + $loader = new FactoryCommandLoader(array( + 'foo' => function () { return new Command('foo'); }, + 'bar' => function () { return new Command('bar'); }, + )); + + $this->assertTrue($loader->has('foo')); + $this->assertTrue($loader->has('bar')); + $this->assertFalse($loader->has('baz')); + } + + public function testGet() + { + $loader = new FactoryCommandLoader(array( + 'foo' => function () { return new Command('foo'); }, + 'bar' => function () { return new Command('bar'); }, + )); + + $this->assertInstanceOf(Command::class, $loader->get('foo')); + $this->assertInstanceOf(Command::class, $loader->get('bar')); + } + + /** + * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException + */ + public function testGetUnknownCommandThrows() + { + (new FactoryCommandLoader(array()))->get('unknown'); + } + + public function testGetCommandNames() + { + $loader = new FactoryCommandLoader(array( + 'foo' => function () { return new Command('foo'); }, + 'bar' => function () { return new Command('bar'); }, + )); + + $this->assertSame(array('foo', 'bar'), $loader->getNames()); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php index 0cf46317..2a0136d7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/DependencyInjection/AddConsoleCommandPassTest.php @@ -12,11 +12,13 @@ namespace Symfony\Component\Console\Tests\DependencyInjection; use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\CommandLoader\ContainerCommandLoader; use Symfony\Component\Console\DependencyInjection\AddConsoleCommandPass; use Symfony\Component\Console\Command\Command; +use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; -use Symfony\Component\HttpKernel\Bundle\Bundle; +use Symfony\Component\DependencyInjection\TypedReference; class AddConsoleCommandPassTest extends TestCase { @@ -29,28 +31,81 @@ class AddConsoleCommandPassTest extends TestCase $container->addCompilerPass(new AddConsoleCommandPass()); $container->setParameter('my-command.class', 'Symfony\Component\Console\Tests\DependencyInjection\MyCommand'); + $id = 'my-command'; $definition = new Definition('%my-command.class%'); $definition->setPublic($public); $definition->addTag('console.command'); - $container->setDefinition('my-command', $definition); + $container->setDefinition($id, $definition); $container->compile(); - $alias = 'console.command.symfony_component_console_tests_dependencyinjection_mycommand'; + $alias = 'console.command.public_alias.my-command'; if ($public) { $this->assertFalse($container->hasAlias($alias)); - $id = 'my-command'; } else { - $id = $alias; // The alias is replaced by a Definition by the ReplaceAliasByActualDefinitionPass // in case the original service is private - $this->assertFalse($container->hasDefinition('my-command')); + $this->assertFalse($container->hasDefinition($id)); $this->assertTrue($container->hasDefinition($alias)); } $this->assertTrue($container->hasParameter('console.command.ids')); - $this->assertSame(array($alias => $id), $container->getParameter('console.command.ids')); + $this->assertSame(array($public ? $id : $alias), $container->getParameter('console.command.ids')); + } + + public function testProcessRegistersLazyCommands() + { + $container = new ContainerBuilder(); + $command = $container + ->register('my-command', MyCommand::class) + ->setPublic(false) + ->addTag('console.command', array('command' => 'my:command')) + ->addTag('console.command', array('command' => 'my:alias')) + ; + + (new AddConsoleCommandPass())->process($container); + + $commandLoader = $container->getDefinition('console.command_loader'); + $commandLocator = $container->getDefinition((string) $commandLoader->getArgument(0)); + + $this->assertSame(ContainerCommandLoader::class, $commandLoader->getClass()); + $this->assertSame(array('my:command' => 'my-command', 'my:alias' => 'my-command'), $commandLoader->getArgument(1)); + $this->assertEquals(array(array('my-command' => new ServiceClosureArgument(new TypedReference('my-command', MyCommand::class)))), $commandLocator->getArguments()); + $this->assertSame(array(), $container->getParameter('console.command.ids')); + $this->assertSame(array(array('setName', array('my:command')), array('setAliases', array(array('my:alias')))), $command->getMethodCalls()); + } + + public function testProcessFallsBackToDefaultName() + { + $container = new ContainerBuilder(); + $container + ->register('with-default-name', NamedCommand::class) + ->setPublic(false) + ->addTag('console.command') + ; + + $pass = new AddConsoleCommandPass(); + $pass->process($container); + + $commandLoader = $container->getDefinition('console.command_loader'); + $commandLocator = $container->getDefinition((string) $commandLoader->getArgument(0)); + + $this->assertSame(ContainerCommandLoader::class, $commandLoader->getClass()); + $this->assertSame(array('default' => 'with-default-name'), $commandLoader->getArgument(1)); + $this->assertEquals(array(array('with-default-name' => new ServiceClosureArgument(new TypedReference('with-default-name', NamedCommand::class)))), $commandLocator->getArguments()); + $this->assertSame(array(), $container->getParameter('console.command.ids')); + + $container = new ContainerBuilder(); + $container + ->register('with-default-name', NamedCommand::class) + ->setPublic(false) + ->addTag('console.command', array('command' => 'new-name')) + ; + + $pass->process($container); + + $this->assertSame(array('new-name' => 'with-default-name'), $container->getDefinition('console.command_loader')->getArgument(1)); } public function visibilityProvider() @@ -112,10 +167,9 @@ class AddConsoleCommandPassTest extends TestCase (new AddConsoleCommandPass())->process($container); - $alias1 = 'console.command.symfony_component_console_tests_dependencyinjection_mycommand'; - $alias2 = $alias1.'_my-command2'; - $this->assertTrue($container->hasAlias($alias1)); - $this->assertTrue($container->hasAlias($alias2)); + $aliasPrefix = 'console.command.public_alias.'; + $this->assertTrue($container->hasAlias($aliasPrefix.'my-command1')); + $this->assertTrue($container->hasAlias($aliasPrefix.'my-command2')); } } @@ -123,6 +177,7 @@ class MyCommand extends Command { } -class ExtensionPresentBundle extends Bundle +class NamedCommand extends Command { + protected static $defaultName = 'default'; } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php index c857a97d..3794a266 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/EventListener/ErrorListenerTest.php @@ -34,7 +34,7 @@ class ErrorListenerTest extends TestCase $logger ->expects($this->once()) ->method('error') - ->with('Error thrown while running command "{command}". Message: "{message}"', array('error' => $error, 'command' => 'test:run --foo=baz buzz', 'message' => 'An error occurred')) + ->with('Error thrown while running command "{command}". Message: "{message}"', array('exception' => $error, 'command' => 'test:run --foo=baz buzz', 'message' => 'An error occurred')) ; $listener = new ErrorListener($logger); @@ -49,7 +49,7 @@ class ErrorListenerTest extends TestCase $logger ->expects($this->once()) ->method('error') - ->with('An error occurred while using the console. Message: "{message}"', array('error' => $error, 'message' => 'An error occurred')) + ->with('An error occurred while using the console. Message: "{message}"', array('exception' => $error, 'message' => 'An error occurred')) ; $listener = new ErrorListener($logger); @@ -61,7 +61,7 @@ class ErrorListenerTest extends TestCase $logger = $this->getLogger(); $logger ->expects($this->once()) - ->method('error') + ->method('debug') ->with('Command "{command}" exited with code "{code}"', array('command' => 'test:run', 'code' => 255)) ; @@ -74,7 +74,7 @@ class ErrorListenerTest extends TestCase $logger = $this->getLogger(); $logger ->expects($this->never()) - ->method('error') + ->method('debug') ; $listener = new ErrorListener($logger); @@ -97,7 +97,7 @@ class ErrorListenerTest extends TestCase $logger = $this->getLogger(); $logger ->expects($this->exactly(3)) - ->method('error') + ->method('debug') ->with('Command "{command}" exited with code "{code}"', array('command' => 'test:run --foo=bar', 'code' => 255)) ; @@ -112,7 +112,7 @@ class ErrorListenerTest extends TestCase $logger = $this->getLogger(); $logger ->expects($this->once()) - ->method('error') + ->method('debug') ->with('Command "{command}" exited with code "{code}"', array('command' => 'test:run', 'code' => 255)) ; diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php new file mode 100644 index 00000000..c875be0c --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseLowercaseCommand.php @@ -0,0 +1,11 @@ +setName('foo:bar')->setDescription('foo:bar command'); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php new file mode 100644 index 00000000..75c8d002 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/FooSameCaseUppercaseCommand.php @@ -0,0 +1,11 @@ +setName('foo:BAR')->setDescription('foo:BAR command'); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestTiti.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestTiti.php new file mode 100644 index 00000000..72e29d2a --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestTiti.php @@ -0,0 +1,21 @@ +setName('test-titi') + ->setDescription('The test:titi command') + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->write('test-titi'); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestToto.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestToto.php new file mode 100644 index 00000000..f14805db --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/TestToto.php @@ -0,0 +1,22 @@ +setName('test-toto') + ->setDescription('The test-toto command') + ->setAliases(array('test')) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output) + { + $output->write('test-toto'); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception1.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception1.txt index 919cec42..1df5bd64 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception1.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception1.txt @@ -1,6 +1,5 @@ - - [Symfony\Component\Console\Exception\CommandNotFoundException] - Command "foo" is not defined. - + + Command "foo" is not defined. + diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception2.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception2.txt index 64561715..932063d7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception2.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception2.txt @@ -1,8 +1,7 @@ - - [Symfony\Component\Console\Exception\InvalidOptionException] - The "--foo" option does not exist. - + + The "--foo" option does not exist. + list [--raw] [--format FORMAT] [--] [] diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt index f41925f5..5366b84f 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt @@ -1,16 +1,16 @@ +In Foo3Command.php line 26: - [Exception] Third exception comment +In Foo3Command.php line 23: - [Exception] Second exception comment +In Foo3Command.php line 21: - [Exception] First exception

this is html

diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt index 5adccdd7..59937092 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt @@ -1,16 +1,16 @@ +In Foo3Command.php line 26:   - [Exception]   Third exception comment    +In Foo3Command.php line 23:   - [Exception]   Second exception comment    +In Foo3Command.php line 21:   - [Exception]   First exception

this is html

   diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt index cb080e9c..548a13e5 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt @@ -1,7 +1,6 @@ - - [Symfony\Component\Console\Exception\CommandNotFoundException] - Command "foo" is not define - d. - + + Command "foo" is not define + d. + diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt index 1ba5f8fd..4677c18e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt @@ -1,6 +1,6 @@ +In ApplicationTest.php line %d: - [Exception] エラーメッセージ diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt index 20644251..33d32655 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt @@ -1,6 +1,6 @@ +In ApplicationTest.php line %d:   - [Exception]   エラーメッセージ    diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt index e41fcfcf..2ee72e22 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt @@ -1,6 +1,6 @@ +In ApplicationTest.php line %d: - [Exception] コマンドの実行中にエラーが 発生しました。 diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_escapeslines.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_escapeslines.txt index cf79b37a..ff7b7b39 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_escapeslines.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_escapeslines.txt @@ -1,6 +1,6 @@ +In ApplicationTest.php line %d: - [Exception] dont break here < info>! diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_linebreaks.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_linebreaks.txt new file mode 100644 index 00000000..0e5c4b16 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/application_renderexception_linebreaks.txt @@ -0,0 +1,11 @@ + +In ApplicationTest.php line %d: + + line 1 with extra spaces + line 2 + + line 4 + + +foo + diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_2.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_2.txt index cad9cb45..2864c7bd 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_2.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_2.txt @@ -1,7 +1,7 @@ Usage: - descriptor:command2 [options] [--] - descriptor:command2 -o|--option_name - descriptor:command2 + descriptor:command2 [options] [--] \ + descriptor:command2 -o|--option_name \ + descriptor:command2 \ Arguments: argument_name diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_mbstring.txt b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_mbstring.txt index 969a0652..cde457dc 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_mbstring.txt +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Fixtures/command_mbstring.txt @@ -1,7 +1,7 @@ Usage: - descriptor:åèä [options] [--] - descriptor:åèä -o|--option_name - descriptor:åèä + descriptor:åèä [options] [--] \ + descriptor:åèä -o|--option_name \ + descriptor:åèä \ Arguments: argument_åèä diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php index 4b11028b..c1addbab 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php @@ -28,6 +28,9 @@ class OutputFormatterTest extends TestCase $formatter = new OutputFormatter(true); $this->assertEquals('fooformat('foo\\assertEquals('foo << bar', $formatter->format('foo << bar')); + $this->assertEquals('foo << bar \\', $formatter->format('foo << bar \\')); + $this->assertEquals("foo << \033[32mbar \\ baz\033[39m \\", $formatter->format('foo << bar \\ baz \\')); $this->assertEquals('some info', $formatter->format('\\some info\\')); $this->assertEquals('\\some info\\', OutputFormatter::escape('some info')); @@ -193,17 +196,6 @@ class OutputFormatterTest extends TestCase ); } - /** - * @group legacy - * @dataProvider provideInlineStyleTagsWithUnknownOptions - * @expectedDeprecation Unknown style options are deprecated since version 3.2 and will be removed in 4.0. Exception "Invalid option specified: "%s". Expected one of (bold, underscore, blink, reverse, conceal)". - */ - public function testInlineStyleOptionsUnknownAreDeprecated($tag, $option) - { - $formatter = new OutputFormatter(true); - $formatter->format($tag); - } - public function provideInlineStyleTagsWithUnknownOptions() { return array( diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php index 8069bccc..eb619539 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/ProcessHelperTest.php @@ -17,7 +17,6 @@ use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Output\StreamOutput; use Symfony\Component\Console\Helper\ProcessHelper; use Symfony\Component\Process\Process; -use Symfony\Component\Process\ProcessBuilder; class ProcessHelperTest extends TestCase { @@ -85,8 +84,8 @@ EOT; EOT; $errorMessage = 'An error occurred'; - $args = new ProcessBuilder(array('php', '-r', 'echo 42;')); - $args = $args->getProcess()->getCommandLine(); + $args = new Process(array('php', '-r', 'echo 42;')); + $args = $args->getCommandLine(); $successOutputProcessDebug = str_replace("'php' '-r' 'echo 42;'", $args, $successOutputProcessDebug); return array( diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php index 3d19e800..ea5268ca 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php @@ -83,6 +83,10 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $question->setMultiselect(true); $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + + $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, 0); + // We are supposed to get the default value since we are not in interactive mode + $this->assertEquals('Superman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream, true), $this->createOutputInterface(), $question)); } public function testAsk() @@ -153,6 +157,68 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $this->assertEquals('AsseticBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); } + public function testAskWithAutocompleteWithExactMatch() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + $inputStream = $this->getInputStream("b\n"); + + $possibleChoices = array( + 'a' => 'berlin', + 'b' => 'copenhagen', + 'c' => 'amsterdam', + ); + + $dialog = new QuestionHelper(); + $dialog->setHelperSet(new HelperSet(array(new FormatterHelper()))); + + $question = new ChoiceQuestion('Please select a city', $possibleChoices); + $question->setMaxAttempts(1); + + $this->assertSame('b', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + } + + public function testAutocompleteWithTrailingBackslash() + { + if (!$this->hasSttyAvailable()) { + $this->markTestSkipped('`stty` is required to test autocomplete functionality'); + } + + $inputStream = $this->getInputStream('E'); + + $dialog = new QuestionHelper(); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $question = new Question(''); + $expectedCompletion = 'ExampleNamespace\\'; + $question->setAutocompleterValues(array($expectedCompletion)); + + $output = $this->createOutputInterface(); + $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $output, $question); + + $outputStream = $output->getStream(); + rewind($outputStream); + $actualOutput = stream_get_contents($outputStream); + + // Shell control (esc) sequences are not so important: we only care that + // tag is interpreted correctly and replaced + $irrelevantEscSequences = array( + "\0337" => '', // Save cursor position + "\0338" => '', // Restore cursor position + "\033[K" => '', // Clear line from cursor till the end + ); + + $importantActualOutput = strtr($actualOutput, $irrelevantEscSequences); + + // Remove colors (e.g. "\033[30m", "\033[31;41m") + $importantActualOutput = preg_replace('/\033\[\d+(;\d+)?m/', '', $importantActualOutput); + + $this->assertEquals($expectedCompletion, $importantActualOutput); + } + public function testAskHiddenResponse() { if ('\\' === DIRECTORY_SEPARATOR) { @@ -425,91 +491,43 @@ class QuestionHelperTest extends AbstractQuestionHelperTest } /** - * @group legacy + * @expectedException \Symfony\Component\Console\Exception\RuntimeException + * @expectedExceptionMessage Aborted */ - public function testLegacyAskChoice() + public function testAskThrowsExceptionOnMissingInput() { - $questionHelper = new QuestionHelper(); - - $helperSet = new HelperSet(array(new FormatterHelper())); - $questionHelper->setHelperSet($helperSet); - - $heroes = array('Superman', 'Batman', 'Spiderman'); - - $questionHelper->setInputStream($this->getInputStream("\n1\n 1 \nFabien\n1\nFabien\n1\n0,2\n 0 , 2 \n\n\n")); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2'); - $question->setMaxAttempts(1); - // first answer is an empty answer, we're supposed to receive the default value - $this->assertEquals('Spiderman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); - $question->setMaxAttempts(1); - $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes); - $question->setErrorMessage('Input "%s" is not a superhero!'); - $question->setMaxAttempts(2); - $this->assertEquals('Batman', $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); - - rewind($output->getStream()); - $stream = stream_get_contents($output->getStream()); - $this->assertContains('Input "Fabien" is not a superhero!', $stream); - - try { - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1'); - $question->setMaxAttempts(1); - $questionHelper->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertEquals('Value "Fabien" is invalid', $e->getMessage()); - } - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null); - $question->setMaxAttempts(1); - $question->setMultiselect(true); - - $this->assertEquals(array('Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1'); - $question->setMaxAttempts(1); - $question->setMultiselect(true); - - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 '); - $question->setMaxAttempts(1); - $question->setMultiselect(true); - - $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); + $dialog = new QuestionHelper(); + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\'s your name?')); } /** - * @group legacy + * @expectedException \Symfony\Component\Console\Exception\RuntimeException + * @expectedExceptionMessage Aborted */ - public function testLegacyAsk() + public function testAskThrowsExceptionOnMissingInputWithValidator() { $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream("\n8AM\n")); - - $question = new Question('What time is it?', '2PM'); - $this->assertEquals('2PM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $question = new Question('What time is it?', '2PM'); - $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $output = $this->createOutputInterface(), $question)); + $question = new Question('What\'s your name?'); + $question->setValidator(function () { + if (!$value) { + throw new \Exception('A value is required.'); + } + }); - rewind($output->getStream()); - $this->assertEquals('What time is it?', stream_get_contents($output->getStream())); + $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), $question); } /** - * @group legacy + * @expectedException \LogicException + * @expectedExceptionMessage Choice question must have at least 1 choice available. */ - public function testLegacyAskWithAutocomplete() + public function testEmptyChoices() + { + new ChoiceQuestion('Question', array(), 'irrelevant'); + } + + public function testTraversableAutocomplete() { if (!$this->hasSttyAvailable()) { $this->markTestSkipped('`stty` is required to test autocomplete functionality'); @@ -526,290 +544,20 @@ class QuestionHelperTest extends AbstractQuestionHelperTest $inputStream = $this->getInputStream("Acm\nAc\177\177s\tTest\n\n\033[A\033[A\n\033[A\033[A\033[A\033[A\033[A\tTest\n\033[B\nS\177\177\033[B\033[B\nF00\177\177oo\t\n"); $dialog = new QuestionHelper(); - $dialog->setInputStream($inputStream); $helperSet = new HelperSet(array(new FormatterHelper())); $dialog->setHelperSet($helperSet); $question = new Question('Please select a bundle', 'FrameworkBundle'); - $question->setAutocompleterValues(array('AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle')); - - $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('FrameworkBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('SecurityBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('FooBundleTest', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('AsseticBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('FooBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - /** - * @group legacy - */ - public function testLegacyAskWithAutocompleteWithNonSequentialKeys() - { - if (!$this->hasSttyAvailable()) { - $this->markTestSkipped('`stty` is required to test autocomplete functionality'); - } - - // - $inputStream = $this->getInputStream("\033[A\033[A\n\033[B\033[B\n"); - - $dialog = new QuestionHelper(); - $dialog->setInputStream($inputStream); - $dialog->setHelperSet(new HelperSet(array(new FormatterHelper()))); - - $question = new ChoiceQuestion('Please select a bundle', array(1 => 'AcmeDemoBundle', 4 => 'AsseticBundle')); - $question->setMaxAttempts(1); - - $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('AsseticBundle', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - /** - * @group legacy - */ - public function testLegacyAskHiddenResponse() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('This test is not supported on Windows'); - } - - $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream("8AM\n")); - - $question = new Question('What time is it?'); - $question->setHidden(true); - - $this->assertEquals('8AM', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - /** - * @group legacy - * @dataProvider getAskConfirmationData - */ - public function testLegacyAskConfirmation($question, $expected, $default = true) - { - $dialog = new QuestionHelper(); - - $dialog->setInputStream($this->getInputStream($question."\n")); - $question = new ConfirmationQuestion('Do you like French fries?', $default); - $this->assertEquals($expected, $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question), 'confirmation question should '.($expected ? 'pass' : 'cancel')); - } - - /** - * @group legacy - */ - public function testLegacyAskConfirmationWithCustomTrueAnswer() - { - $dialog = new QuestionHelper(); - - $dialog->setInputStream($this->getInputStream("j\ny\n")); - $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i'); - $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $question = new ConfirmationQuestion('Do you like French fries?', false, '/^(j|y)/i'); - $this->assertTrue($dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - } - - /** - * @group legacy - */ - public function testLegacyAskAndValidate() - { - $dialog = new QuestionHelper(); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); + $question->setAutocompleterValues(new AutocompleteValues(array('irrelevant' => 'AcmeDemoBundle', 'AsseticBundle', 'SecurityBundle', 'FooBundle'))); - $error = 'This is not a color!'; - $validator = function ($color) use ($error) { - if (!in_array($color, array('white', 'black'))) { - throw new \InvalidArgumentException($error); - } - - return $color; - }; - - $question = new Question('What color was the white horse of Henry IV?', 'white'); - $question->setValidator($validator); - $question->setMaxAttempts(2); - - $dialog->setInputStream($this->getInputStream("\nblack\n")); - $this->assertEquals('white', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - $this->assertEquals('black', $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question)); - - $dialog->setInputStream($this->getInputStream("green\nyellow\norange\n")); - try { - $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); - $this->fail(); - } catch (\InvalidArgumentException $e) { - $this->assertEquals($error, $e->getMessage()); - } - } - - /** - * @group legacy - * @dataProvider simpleAnswerProvider - */ - public function testLegacySelectChoiceFromSimpleChoices($providedAnswer, $expectedValue) - { - $possibleChoices = array( - 'My environment 1', - 'My environment 2', - 'My environment 3', - ); - - $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream($providedAnswer."\n")); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); - $question->setMaxAttempts(1); - $answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); - - $this->assertSame($expectedValue, $answer); - } - - /** - * @group legacy - * @dataProvider mixedKeysChoiceListAnswerProvider - */ - public function testLegacyChoiceFromChoicelistWithMixedKeys($providedAnswer, $expectedValue) - { - $possibleChoices = array( - '0' => 'No environment', - '1' => 'My environment 1', - 'env_2' => 'My environment 2', - 3 => 'My environment 3', - ); - - $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream($providedAnswer."\n")); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); - $question->setMaxAttempts(1); - $answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); - - $this->assertSame($expectedValue, $answer); - } - - /** - * @group legacy - * @dataProvider answerProvider - */ - public function testLegacySelectChoiceFromChoiceList($providedAnswer, $expectedValue) - { - $possibleChoices = array( - 'env_1' => 'My environment 1', - 'env_2' => 'My environment', - 'env_3' => 'My environment', - ); - - $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream($providedAnswer."\n")); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); - $question->setMaxAttempts(1); - $answer = $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); - - $this->assertSame($expectedValue, $answer); - } - - /** - * @group legacy - * @expectedException \InvalidArgumentException - * @expectedExceptionMessage The provided answer is ambiguous. Value should be one of env_2 or env_3. - */ - public function testLegacyAmbiguousChoiceFromChoicelist() - { - $possibleChoices = array( - 'env_1' => 'My first environment', - 'env_2' => 'My environment', - 'env_3' => 'My environment', - ); - - $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream("My environment\n")); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $question = new ChoiceQuestion('Please select the environment to load', $possibleChoices); - $question->setMaxAttempts(1); - - $dialog->ask($this->createInputInterfaceMock(), $this->createOutputInterface(), $question); - } - - /** - * @requires function mb_strwidth - * @group legacy - */ - public function testLegacyChoiceOutputFormattingQuestionForUtf8Keys() - { - $question = 'Lorem ipsum?'; - $possibleChoices = array( - 'foo' => 'foo', - 'żółw' => 'bar', - 'łabądź' => 'baz', - ); - $outputShown = array( - $question, - ' [foo ] foo', - ' [żółw ] bar', - ' [łabądź] baz', - ); - $output = $this->getMockBuilder('\Symfony\Component\Console\Output\OutputInterface')->getMock(); - $output->method('getFormatter')->willReturn(new OutputFormatter()); - - $dialog = new QuestionHelper(); - $dialog->setInputStream($this->getInputStream("\n")); - $helperSet = new HelperSet(array(new FormatterHelper())); - $dialog->setHelperSet($helperSet); - - $output->expects($this->once())->method('writeln')->with($this->equalTo($outputShown)); - - $question = new ChoiceQuestion($question, $possibleChoices, 'foo'); - $dialog->ask($this->createInputInterfaceMock(), $output, $question); - } - - /** - * @expectedException \Symfony\Component\Console\Exception\RuntimeException - * @expectedExceptionMessage Aborted - */ - public function testAskThrowsExceptionOnMissingInput() - { - $dialog = new QuestionHelper(); - $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\'s your name?')); - } - - /** - * @expectedException \Symfony\Component\Console\Exception\RuntimeException - * @expectedExceptionMessage Aborted - */ - public function testAskThrowsExceptionOnMissingInputWithValidator() - { - $dialog = new QuestionHelper(); - - $question = new Question('What\'s your name?'); - $question->setValidator(function () { - if (!$value) { - throw new \Exception('A value is required.'); - } - }); - - $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), $question); - } - - /** - * @expectedException \LogicException - * @expectedExceptionMessage Choice question must have at least 1 choice available. - */ - public function testEmptyChoices() - { - new ChoiceQuestion('Question', array(), 'irrelevant'); + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundleTest', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('FrameworkBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('SecurityBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundleTest', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('AcmeDemoBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('AsseticBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); + $this->assertEquals('FooBundle', $dialog->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question)); } protected function getInputStream($input) @@ -840,6 +588,21 @@ class QuestionHelperTest extends AbstractQuestionHelperTest { exec('stty 2>&1', $output, $exitcode); - return $exitcode === 0; + return 0 === $exitcode; + } +} + +class AutocompleteValues implements \IteratorAggregate +{ + private $values; + + public function __construct(array $values) + { + $this->values = $values; + } + + public function getIterator() + { + return new \ArrayIterator($this->values); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/TableTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/TableTest.php index d8a8ff00..b195e09a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/TableTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Helper/TableTest.php @@ -726,6 +726,22 @@ TABLE; $this->assertEquals($expected, $this->getOutputContent($output)); } + /** + * @expectedException \Symfony\Component\Console\Exception\InvalidArgumentException + * @expectedExceptionMessage A cell must be a TableCell, a scalar or an object implementing __toString, array given. + */ + public function testThrowsWhenTheCellInAnArray() + { + $table = new Table($output = $this->getOutputStream()); + $table + ->setHeaders(array('ISBN', 'Title', 'Author', 'Price')) + ->setRows(array( + array('99921-58-10-7', array(), 'Dante Alighieri', '9.95'), + )); + + $table->render(); + } + public function testColumnWith() { $table = new Table($output = $this->getOutputStream()); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArgvInputTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArgvInputTest.php index 8287bce5..61d1723e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArgvInputTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArgvInputTest.php @@ -314,6 +314,10 @@ class ArgvInputTest extends TestCase $input = new ArgvInput(array('cli.php', '-f', 'foo')); $this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input'); + $input = new ArgvInput(array('cli.php', '-etest')); + $this->assertTrue($input->hasParameterOption('-e'), '->hasParameterOption() returns true if the given short option is in the raw input'); + $this->assertFalse($input->hasParameterOption('-s'), '->hasParameterOption() returns true if the given short option is in the raw input'); + $input = new ArgvInput(array('cli.php', '--foo', 'foo')); $this->assertTrue($input->hasParameterOption('--foo'), '->hasParameterOption() returns true if the given short option is in the raw input'); @@ -339,6 +343,46 @@ class ArgvInputTest extends TestCase $this->assertFalse($input->hasParameterOption('--foo', true), '->hasParameterOption() returns false if the given option is in the raw input but after an end of options signal'); } + public function testHasParameterOptionEdgeCasesAndLimitations() + { + $input = new ArgvInput(array('cli.php', '-fh')); + // hasParameterOption does not know if the previous short option, -f, + // takes a value or not. If -f takes a value, then -fh does NOT include + // -h; Otherwise it does. Since we do not know which short options take + // values, hasParameterOption does not support this use-case. + $this->assertFalse($input->hasParameterOption('-h'), '->hasParameterOption() returns true if the given short option is in the raw input'); + // hasParameterOption does detect that `-fh` contains `-f`, since + // `-f` is the first short option in the set. + $this->assertTrue($input->hasParameterOption('-f'), '->hasParameterOption() returns true if the given short option is in the raw input'); + // The test below happens to pass, although it might make more sense + // to disallow it, and require the use of + // $input->hasParameterOption('-f') && $input->hasParameterOption('-h') + // instead. + $this->assertTrue($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input'); + // In theory, if -fh is supported, then -hf should also work. + // However, this is not supported. + $this->assertFalse($input->hasParameterOption('-hf'), '->hasParameterOption() returns true if the given short option is in the raw input'); + + $input = new ArgvInput(array('cli.php', '-f', '-h')); + // If hasParameterOption('-fh') is supported for 'cli.php -fh', then + // one might also expect that it should also be supported for + // 'cli.php -f -h'. However, this is not supported. + $this->assertFalse($input->hasParameterOption('-fh'), '->hasParameterOption() returns true if the given short option is in the raw input'); + } + + public function testNoWarningOnInvalidParameterOption() + { + $input = new ArgvInput(array('cli.php', '-edev')); + + $this->assertTrue($input->hasParameterOption(array('-e', ''))); + // No warning thrown + $this->assertFalse($input->hasParameterOption(array('-m', ''))); + + $this->assertEquals('dev', $input->getParameterOption(array('-e', ''))); + // No warning thrown + $this->assertFalse($input->getParameterOption(array('-m', ''))); + } + public function testToString() { $input = new ArgvInput(array('cli.php', '-f', 'foo')); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArrayInputTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArrayInputTest.php index a1b5a203..6b443e0b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArrayInputTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/ArrayInputTest.php @@ -167,5 +167,11 @@ class ArrayInputTest extends TestCase { $input = new ArrayInput(array('-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C")); $this->assertEquals('-f -b=bar --foo='.escapeshellarg('b a z').' --lala Foo '.escapeshellarg("A\nB'C"), (string) $input); + + $input = new ArrayInput(array('-b' => array('bval_1', 'bval_2'), '--f' => array('fval_1', 'fval_2'))); + $this->assertSame('-b=bval_1 -b=bval_2 --f=fval_1 --f=fval_2', (string) $input); + + $input = new ArrayInput(array('array_arg' => array('val_1', 'val_2'))); + $this->assertSame('val_1 val_2', (string) $input); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputArgumentTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputArgumentTest.php index 66af98b3..881300c2 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputArgumentTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputArgumentTest.php @@ -38,26 +38,12 @@ class InputArgumentTest extends TestCase } /** - * @dataProvider provideInvalidModes + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Argument mode "-1" is not valid. */ - public function testInvalidModes($mode) + public function testInvalidModes() { - if (method_exists($this, 'expectException')) { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage(sprintf('Argument mode "%s" is not valid.', $mode)); - } else { - $this->setExpectedException('InvalidArgumentException', sprintf('Argument mode "%s" is not valid.', $mode)); - } - - new InputArgument('foo', $mode); - } - - public function provideInvalidModes() - { - return array( - array('ANOTHER_ONE'), - array(-1), - ); + new InputArgument('foo', '-1'); } public function testIsArray() diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputOptionTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputOptionTest.php index 943bf607..66a6dd5a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputOptionTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Input/InputOptionTest.php @@ -74,26 +74,12 @@ class InputOptionTest extends TestCase } /** - * @dataProvider provideInvalidModes + * @expectedException \InvalidArgumentException + * @expectedExceptionMessage Option mode "-1" is not valid. */ - public function testInvalidModes($mode) - { - if (method_exists($this, 'expectException')) { - $this->expectException('InvalidArgumentException'); - $this->expectExceptionMessage(sprintf('Option mode "%s" is not valid.', $mode)); - } else { - $this->setExpectedException('InvalidArgumentException', sprintf('Option mode "%s" is not valid.', $mode)); - } - - new InputOption('foo', 'f', $mode); - } - - public function provideInvalidModes() + public function testInvalidModes() { - return array( - array('ANOTHER_ONE'), - array(-1), - ); + new InputOption('foo', 'f', '-1'); } /** diff --git a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php index 34299298..734a153e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/console/Tests/Logger/ConsoleLoggerTest.php @@ -166,9 +166,7 @@ class ConsoleLoggerTest extends TestCase } else { $dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', array('__toString')); } - $dummy->expects($this->once()) - ->method('__toString') - ->will($this->returnValue('DUMMY')); + $dummy->method('__toString')->will($this->returnValue('DUMMY')); $this->getLogger()->warning($dummy); diff --git a/wp-content/themes/physioassist/vendor/symfony/console/composer.json b/wp-content/themes/physioassist/vendor/symfony/console/composer.json index db76bf3b..371818fc 100644 --- a/wp-content/themes/physioassist/vendor/symfony/console/composer.json +++ b/wp-content/themes/physioassist/vendor/symfony/console/composer.json @@ -16,27 +16,26 @@ } ], "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.0", - "symfony/debug": "~2.8|~3.0" + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "symfony/config": "~3.3", - "symfony/http-kernel": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/filesystem": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0", + "symfony/config": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0", "psr/log": "~1.0" }, "suggest": { "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "", - "psr/log": "For using the console logger" + "psr/log-implementation": "For using the console logger" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" }, @@ -47,7 +46,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/CHANGELOG.md b/wp-content/themes/physioassist/vendor/symfony/debug/CHANGELOG.md index a853b7a0..122af731 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/CHANGELOG.md +++ b/wp-content/themes/physioassist/vendor/symfony/debug/CHANGELOG.md @@ -1,6 +1,17 @@ CHANGELOG ========= +4.0.0 +----- + +* removed the symfony_debug extension +* removed `ContextErrorException` + +3.4.0 +----- + +* deprecated `ErrorHandler::stackErrors()` and `ErrorHandler::unstackErrors()` + 3.3.0 ----- diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Debug.php b/wp-content/themes/physioassist/vendor/symfony/debug/Debug.php index e3665ae5..92117104 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Debug.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Debug.php @@ -25,9 +25,6 @@ class Debug * * This method registers an error handler and an exception handler. * - * If the Symfony ClassLoader component is available, a special - * class loader is also registered. - * * @param int $errorReportingLevel The level of error reporting you want * @param bool $displayErrors Whether to display errors (for development) or just log them (for production) */ @@ -45,7 +42,7 @@ class Debug error_reporting(E_ALL); } - if ('cli' !== PHP_SAPI) { + if (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) { ini_set('display_errors', 0); ExceptionHandler::register(); } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) { diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/DebugClassLoader.php b/wp-content/themes/physioassist/vendor/symfony/debug/DebugClassLoader.php index 2e1d7180..f9c80d04 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/DebugClassLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/DebugClassLoader.php @@ -26,18 +26,16 @@ class DebugClassLoader { private $classLoader; private $isFinder; + private $loaded = array(); private static $caseCheck; + private static $checkedClasses = array(); private static $final = array(); private static $finalMethods = array(); private static $deprecated = array(); - private static $php7Reserved = array('int', 'float', 'bool', 'string', 'true', 'false', 'null'); + private static $internal = array(); + private static $internalMethods = array(); private static $darwinCache = array('/' => array('/', array())); - /** - * Constructor. - * - * @param callable $classLoader A class loader - */ public function __construct(callable $classLoader) { $this->classLoader = $classLoader; @@ -136,117 +134,146 @@ class DebugClassLoader */ public function loadClass($class) { - ErrorHandler::stackErrors(); + $e = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); try { - if ($this->isFinder) { - if ($file = $this->classLoader[0]->findFile($class)) { - require_once $file; + if ($this->isFinder && !isset($this->loaded[$class])) { + $this->loaded[$class] = true; + if ($file = $this->classLoader[0]->findFile($class) ?: false) { + $wasCached = \function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file); + + require $file; + + if ($wasCached) { + return; + } } } else { call_user_func($this->classLoader, $class); $file = false; } } finally { - ErrorHandler::unstackErrors(); + error_reporting($e); } - $exists = class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); + $this->checkClass($class, $file); + } + + private function checkClass($class, $file = null) + { + $exists = null === $file || \class_exists($class, false) || \interface_exists($class, false) || \trait_exists($class, false); - if ($class && '\\' === $class[0]) { + if (null !== $file && $class && '\\' === $class[0]) { $class = substr($class, 1); } if ($exists) { + if (isset(self::$checkedClasses[$class])) { + return; + } + self::$checkedClasses[$class] = true; + $refl = new \ReflectionClass($class); + if (null === $file && $refl->isInternal()) { + return; + } $name = $refl->getName(); - if ($name !== $class && 0 === strcasecmp($name, $class)) { + if ($name !== $class && 0 === \strcasecmp($name, $class)) { throw new \RuntimeException(sprintf('Case mismatch between loaded and declared class names: "%s" vs "%s".', $class, $name)); } - $parent = get_parent_class($class); + // Don't trigger deprecations for classes in the same vendor + if (2 > $len = 1 + (\strpos($name, '\\') ?: \strpos($name, '_'))) { + $len = 0; + $ns = ''; + } else { + $ns = \substr($name, 0, $len); + } + + // Detect annotations on the class + if (false !== $doc = $refl->getDocComment()) { + foreach (array('final', 'deprecated', 'internal') as $annotation) { + if (false !== \strpos($doc, $annotation) && preg_match('#\n \* @'.$annotation.'(?:( .+?)\.?)?\r?\n \*(?: @|/$)#s', $doc, $notice)) { + self::${$annotation}[$name] = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; + } + } + } - // Not an interface nor a trait - if (class_exists($name, false)) { - if (preg_match('#\n \* @final(?:( .+?)\.?)?\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) { - self::$final[$name] = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; + $parentAndTraits = \class_uses($name, false); + if ($parent = \get_parent_class($class)) { + $parentAndTraits[] = $parent; + + if (!isset(self::$checkedClasses[$parent])) { + $this->checkClass($parent); } - if ($parent && isset(self::$final[$parent])) { + if (isset(self::$final[$parent])) { @trigger_error(sprintf('The "%s" class is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $parent, self::$final[$parent], $name), E_USER_DEPRECATED); } + } - // Inherit @final annotations - self::$finalMethods[$name] = $parent && isset(self::$finalMethods[$parent]) ? self::$finalMethods[$parent] : array(); - - foreach ($refl->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $method) { - if ($method->class !== $name) { - continue; - } - - if ($parent && isset(self::$finalMethods[$parent][$method->name])) { - @trigger_error(sprintf('%s It may change without further notice as of its next major version. You should not extend it from "%s".', self::$finalMethods[$parent][$method->name], $name), E_USER_DEPRECATED); - } + // Detect if the parent is annotated + foreach ($parentAndTraits + $this->getOwnInterfaces($name, $parent) as $use) { + if (!isset(self::$checkedClasses[$use])) { + $this->checkClass($use); + } + if (isset(self::$deprecated[$use]) && \strncmp($ns, $use, $len)) { + $type = class_exists($name, false) ? 'class' : (interface_exists($name, false) ? 'interface' : 'trait'); + $verb = class_exists($use, false) || interface_exists($name, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses'); - $doc = $method->getDocComment(); - if (false === $doc || false === strpos($doc, '@final')) { - continue; - } + @trigger_error(sprintf('The "%s" %s %s "%s" that is deprecated%s.', $name, $type, $verb, $use, self::$deprecated[$use]), E_USER_DEPRECATED); + } + if (isset(self::$internal[$use]) && \strncmp($ns, $use, $len)) { + @trigger_error(sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $name), E_USER_DEPRECATED); + } + } - if (preg_match('#\n\s+\* @final(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) { - $message = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; - self::$finalMethods[$name][$method->name] = sprintf('The "%s::%s()" method is considered final%s.', $name, $method->name, $message); + // Inherit @final and @internal annotations for methods + self::$finalMethods[$name] = array(); + self::$internalMethods[$name] = array(); + foreach ($parentAndTraits as $use) { + foreach (array('finalMethods', 'internalMethods') as $property) { + if (isset(self::${$property}[$use])) { + self::${$property}[$name] = self::${$property}[$name] ? self::${$property}[$use] + self::${$property}[$name] : self::${$property}[$use]; } } } - if (in_array(strtolower($refl->getShortName()), self::$php7Reserved)) { - @trigger_error(sprintf('The "%s" class uses the reserved name "%s", it will break on PHP 7 and higher', $name, $refl->getShortName()), E_USER_DEPRECATED); - } elseif (preg_match('#\n \* @deprecated (.*?)\r?\n \*(?: @|/$)#s', $refl->getDocComment(), $notice)) { - self::$deprecated[$name] = preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]); - } else { - // Don't trigger deprecations for classes in the same vendor - if (2 > $len = 1 + (strpos($name, '\\', 1 + strpos($name, '\\')) ?: strpos($name, '_'))) { - $len = 0; - $ns = ''; - } else { - switch ($ns = substr($name, 0, $len)) { - case 'Symfony\Bridge\\': - case 'Symfony\Bundle\\': - case 'Symfony\Component\\': - $ns = 'Symfony\\'; - $len = strlen($ns); - break; - } + $isClass = \class_exists($name, false); + foreach ($refl->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $method) { + if ($method->class !== $name) { + continue; } - if (!$parent || strncmp($ns, $parent, $len)) { - if ($parent && isset(self::$deprecated[$parent]) && strncmp($ns, $parent, $len)) { - @trigger_error(sprintf('The "%s" class extends "%s" that is deprecated %s', $name, $parent, self::$deprecated[$parent]), E_USER_DEPRECATED); - } + // Method from a trait + if ($method->getFilename() !== $refl->getFileName()) { + continue; + } - $parentInterfaces = array(); - $deprecatedInterfaces = array(); - if ($parent) { - foreach (class_implements($parent) as $interface) { - $parentInterfaces[$interface] = 1; - } - } + if ($isClass && $parent && isset(self::$finalMethods[$parent][$method->name])) { + list($declaringClass, $message) = self::$finalMethods[$parent][$method->name]; + @trigger_error(sprintf('The "%s::%s()" method is considered final%s. It may change without further notice as of its next major version. You should not extend it from "%s".', $declaringClass, $method->name, $message, $name), E_USER_DEPRECATED); + } - foreach ($refl->getInterfaceNames() as $interface) { - if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len)) { - $deprecatedInterfaces[] = $interface; - } - foreach (class_implements($interface) as $interface) { - $parentInterfaces[$interface] = 1; + foreach ($parentAndTraits as $use) { + if (isset(self::$internalMethods[$use][$method->name])) { + list($declaringClass, $message) = self::$internalMethods[$use][$method->name]; + if (\strncmp($ns, $declaringClass, $len)) { + @trigger_error(sprintf('The "%s::%s()" method is considered internal%s. It may change without further notice. You should not extend it from "%s".', $declaringClass, $method->name, $message, $name), E_USER_DEPRECATED); } } + } - foreach ($deprecatedInterfaces as $interface) { - if (!isset($parentInterfaces[$interface])) { - @trigger_error(sprintf('The "%s" %s "%s" that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED); - } + // Detect method annotations + if (false === $doc = $method->getDocComment()) { + continue; + } + + foreach (array('final', 'internal') as $annotation) { + if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) { + $message = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : ''; + self::${$annotation.'Methods'}[$name][$method->name] = array($name, $message); } } } @@ -345,8 +372,33 @@ class DebugClassLoader throw new \RuntimeException(sprintf('Case mismatch between class and real file names: "%s" vs "%s" in "%s".', substr($tail, -$tailLen + 1), substr($real, -$tailLen + 1), substr($real, 0, -$tailLen + 1))); } } + } + } + + /** + * `class_implements` includes interfaces from the parents so we have to manually exclude them. + * + * @param string $class + * @param string|false $parent + * + * @return string[] + */ + private function getOwnInterfaces($class, $parent) + { + $ownInterfaces = class_implements($class, false); + + if ($parent) { + foreach (class_implements($parent, false) as $interface) { + unset($ownInterfaces[$interface]); + } + } - return true; + foreach ($ownInterfaces as $interface) { + foreach (class_implements($interface) as $interface) { + unset($ownInterfaces[$interface]); + } } + + return $ownInterfaces; } } diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/ErrorHandler.php b/wp-content/themes/physioassist/vendor/symfony/debug/ErrorHandler.php index 369ed26f..5dbdd693 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/ErrorHandler.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/ErrorHandler.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Debug; use Psr\Log\LogLevel; use Psr\Log\LoggerInterface; -use Symfony\Component\Debug\Exception\ContextErrorException; use Symfony\Component\Debug\Exception\FatalErrorException; use Symfony\Component\Debug\Exception\FatalThrowableError; use Symfony\Component\Debug\Exception\OutOfMemoryException; @@ -97,8 +96,6 @@ class ErrorHandler private $bootstrappingLogger; private static $reservedMemory; - private static $stackedErrors = array(); - private static $stackedErrorLevels = array(); private static $toStringException = null; private static $silencedErrorCache = array(); private static $silencedErrorCount = 0; @@ -134,10 +131,24 @@ class ErrorHandler $handler = $prev[0]; $replace = false; } - if ($replace || !$prev) { - $handler->setExceptionHandler(set_exception_handler(array($handler, 'handleException'))); - } else { + if (!$replace && $prev) { restore_error_handler(); + $handlerIsRegistered = is_array($prev) && $handler === $prev[0]; + } else { + $handlerIsRegistered = true; + } + if (is_array($prev = set_exception_handler(array($handler, 'handleException'))) && $prev[0] instanceof self) { + restore_exception_handler(); + if (!$handlerIsRegistered) { + $handler = $prev[0]; + } elseif ($handler !== $prev[0] && $replace) { + set_exception_handler(array($handler, 'handleException')); + $p = $prev[0]->setExceptionHandler(null); + $handler->setExceptionHandler($p); + $prev[0]->setExceptionHandler($p); + } + } else { + $handler->setExceptionHandler($prev); } $handler->throwAt(E_ALL & $handler->thrownErrors, true); @@ -382,10 +393,8 @@ class ErrorHandler if (4 < $numArgs = func_num_args()) { $context = $scope ? (func_get_arg(4) ?: array()) : array(); - $backtrace = 5 < $numArgs ? func_get_arg(5) : null; // defined on HHVM } else { $context = array(); - $backtrace = null; } if (isset($context['GLOBALS']) && $scope) { @@ -394,53 +403,45 @@ class ErrorHandler $context = $e; } - if (null !== $backtrace && $type & E_ERROR) { - // E_ERROR fatal errors are triggered on HHVM when - // hhvm.error_handling.call_user_handler_on_fatals=1 - // which is the way to get their backtrace. - $this->handleFatalError(compact('type', 'message', 'file', 'line', 'backtrace')); - - return true; - } - $logMessage = $this->levels[$type].': '.$message; if (null !== self::$toStringException) { $errorAsException = self::$toStringException; self::$toStringException = null; } elseif (!$throw && !($type & $level)) { - if (isset(self::$silencedErrorCache[$message])) { + if (!isset(self::$silencedErrorCache[$id = $file.':'.$line])) { + $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3), $type, $file, $line, false) : array(); + $errorAsException = new SilencedErrorContext($type, $file, $line, $lightTrace); + } elseif (isset(self::$silencedErrorCache[$id][$message])) { $lightTrace = null; - $errorAsException = self::$silencedErrorCache[$message]; + $errorAsException = self::$silencedErrorCache[$id][$message]; ++$errorAsException->count; } else { - $lightTrace = $this->tracedErrors & $type ? $this->cleanTrace(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3), $type, $file, $line, false) : array(); - $errorAsException = new SilencedErrorContext($type, $file, $line, $lightTrace); + $lightTrace = array(); + $errorAsException = null; } if (100 < ++self::$silencedErrorCount) { self::$silencedErrorCache = $lightTrace = array(); self::$silencedErrorCount = 1; } - self::$silencedErrorCache[$message] = $errorAsException; - + if ($errorAsException) { + self::$silencedErrorCache[$id][$message] = $errorAsException; + } if (null === $lightTrace) { return; } } else { - if ($scope) { - $errorAsException = new ContextErrorException($logMessage, 0, $type, $file, $line, $context); - } else { - $errorAsException = new \ErrorException($logMessage, 0, $type, $file, $line); - } + $errorAsException = new \ErrorException($logMessage, 0, $type, $file, $line); // Clean the trace by removing function arguments and the first frames added by the error handler itself. if ($throw || $this->tracedErrors & $type) { - $backtrace = $backtrace ?: $errorAsException->getTrace(); + $backtrace = $errorAsException->getTrace(); $lightTrace = $this->cleanTrace($backtrace, $type, $file, $line, $throw); $this->traceReflector->setValue($errorAsException, $lightTrace); } else { $this->traceReflector->setValue($errorAsException, array()); + $backtrace = array(); } } @@ -454,32 +455,25 @@ class ErrorHandler && ('trigger_error' === $backtrace[$i - 1]['function'] || 'user_error' === $backtrace[$i - 1]['function']) ) { // Here, we know trigger_error() has been called from __toString(). - // HHVM is fine with throwing from __toString() but PHP triggers a fatal error instead. + // PHP triggers a fatal error when throwing from __toString(). // A small convention allows working around the limitation: // given a caught $e exception in __toString(), quitting the method with // `return trigger_error($e, E_USER_ERROR);` allows this error handler // to make $e get through the __toString() barrier. foreach ($context as $e) { - if (($e instanceof \Exception || $e instanceof \Throwable) && $e->__toString() === $message) { - if (1 === $i) { - // On HHVM - $errorAsException = $e; - break; - } + if ($e instanceof \Throwable && $e->__toString() === $message) { self::$toStringException = $e; return true; } } - if (1 < $i) { - // On PHP (not on HHVM), display the original error message instead of the default one. - $this->handleException($errorAsException); + // Display the original error message instead of the default one. + $this->handleException($errorAsException); - // Stop the process by giving back the error to the native handler. - return false; - } + // Stop the process by giving back the error to the native handler. + return false; } } } @@ -489,18 +483,11 @@ class ErrorHandler if ($this->isRecursive) { $log = 0; - } elseif (self::$stackedErrorLevels) { - self::$stackedErrors[] = array( - $this->loggers[$type][0], - ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG, - $logMessage, - array('exception' => $errorAsException), - ); } else { try { $this->isRecursive = true; $level = ($type & $level) ? $this->loggers[$type][1] : LogLevel::DEBUG; - $this->loggers[$type][0]->log($level, $logMessage, array('exception' => $errorAsException)); + $this->loggers[$type][0]->log($level, $logMessage, $errorAsException ? array('exception' => $errorAsException) : array()); } finally { $this->isRecursive = false; } @@ -526,6 +513,7 @@ class ErrorHandler $exception = new FatalThrowableError($exception); } $type = $exception instanceof FatalErrorException ? $exception->getSeverity() : E_ERROR; + $handlerException = null; if (($this->loggedErrors & $type) || $exception instanceof FatalThrowableError) { if ($exception instanceof FatalErrorException) { @@ -548,7 +536,6 @@ class ErrorHandler if ($this->loggedErrors & $type) { try { $this->loggers[$type][0]->log($this->loggers[$type][1], $message, array('exception' => $exception)); - } catch (\Exception $handlerException) { } catch (\Throwable $handlerException) { } } @@ -560,18 +547,20 @@ class ErrorHandler } } } - if (empty($this->exceptionHandler)) { - throw $exception; // Give back $exception to the native handler - } + $exceptionHandler = $this->exceptionHandler; + $this->exceptionHandler = null; try { - call_user_func($this->exceptionHandler, $exception); - } catch (\Exception $handlerException) { + if (null !== $exceptionHandler) { + return \call_user_func($exceptionHandler, $exception); + } + $handlerException = $handlerException ?: $exception; } catch (\Throwable $handlerException) { } - if (isset($handlerException)) { - $this->exceptionHandler = null; - $this->handleException($handlerException); + if ($exception === $handlerException) { + self::$reservedMemory = null; // Disable the fatal error handler + throw $exception; // Give back $exception to the native handler } + $this->handleException($handlerException); } /** @@ -587,30 +576,44 @@ class ErrorHandler return; } - self::$reservedMemory = null; + $handler = self::$reservedMemory = null; + $handlers = array(); + $previousHandler = null; + $sameHandlerLimit = 10; - $handler = set_error_handler('var_dump'); - $handler = is_array($handler) ? $handler[0] : null; - restore_error_handler(); + while (!is_array($handler) || !$handler[0] instanceof self) { + $handler = set_exception_handler('var_dump'); + restore_exception_handler(); - if (!$handler instanceof self) { + if (!$handler) { + break; + } + restore_exception_handler(); + + if ($handler !== $previousHandler) { + array_unshift($handlers, $handler); + $previousHandler = $handler; + } elseif (0 === --$sameHandlerLimit) { + $handler = null; + break; + } + } + foreach ($handlers as $h) { + set_exception_handler($h); + } + if (!$handler) { return; } + if ($handler !== $h) { + $handler[0]->setExceptionHandler($h); + } + $handler = $handler[0]; + $handlers = array(); if ($exit = null === $error) { $error = error_get_last(); } - try { - while (self::$stackedErrorLevels) { - static::unstackErrors(); - } - } catch (\Exception $exception) { - // Handled below - } catch (\Throwable $exception) { - // Handled below - } - if ($error && $error['type'] &= E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR) { // Let's not throw anymore but keep logging $handler->throwAt(0, true); @@ -621,10 +624,12 @@ class ErrorHandler } else { $exception = new FatalErrorException($handler->levels[$error['type']].': '.$error['message'], 0, $error['type'], $error['file'], $error['line'], 2, true, $trace); } + } else { + $exception = null; } try { - if (isset($exception)) { + if (null !== $exception) { self::$exitCode = 255; $handler->handleException($exception, $error); } @@ -638,47 +643,6 @@ class ErrorHandler } } - /** - * Configures the error handler for delayed handling. - * Ensures also that non-catchable fatal errors are never silenced. - * - * As shown by http://bugs.php.net/42098 and http://bugs.php.net/60724 - * PHP has a compile stage where it behaves unusually. To workaround it, - * we plug an error handler that only stacks errors for later. - * - * The most important feature of this is to prevent - * autoloading until unstackErrors() is called. - */ - public static function stackErrors() - { - self::$stackedErrorLevels[] = error_reporting(error_reporting() | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR); - } - - /** - * Unstacks stacked errors and forwards to the logger. - */ - public static function unstackErrors() - { - $level = array_pop(self::$stackedErrorLevels); - - if (null !== $level) { - $errorReportingLevel = error_reporting($level); - if ($errorReportingLevel !== ($level | E_PARSE | E_ERROR | E_CORE_ERROR | E_COMPILE_ERROR)) { - // If the user changed the error level, do not overwrite it - error_reporting($errorReportingLevel); - } - } - - if (empty(self::$stackedErrorLevels)) { - $errors = self::$stackedErrors; - self::$stackedErrors = array(); - - foreach ($errors as $error) { - $error[0]->log($error[1], $error[2], $error[3]); - } - } - } - /** * Gets the fatal error handlers. * @@ -707,7 +671,7 @@ class ErrorHandler } if (!($throw || $this->scopedErrors & $type)) { for ($i = 0; isset($lightTrace[$i]); ++$i) { - unset($lightTrace[$i]['args']); + unset($lightTrace[$i]['args'], $lightTrace[$i]['object']); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/ClassNotFoundException.php b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/ClassNotFoundException.php index b91bf466..45d4c253 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/ClassNotFoundException.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/ClassNotFoundException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Debug\Exception; */ class ClassNotFoundException extends FatalErrorException { - public function __construct($message, \ErrorException $previous) + public function __construct(string $message, \ErrorException $previous) { parent::__construct( $message, diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/ContextErrorException.php b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/ContextErrorException.php deleted file mode 100644 index 6561d4df..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/ContextErrorException.php +++ /dev/null @@ -1,40 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Debug\Exception; - -/** - * Error Exception with Variable Context. - * - * @author Christian Sciberras - * - * @deprecated since version 3.3. Instead, \ErrorException will be used directly in 4.0. - */ -class ContextErrorException extends \ErrorException -{ - private $context = array(); - - public function __construct($message, $code, $severity, $filename, $lineno, $context = array()) - { - parent::__construct($message, $code, $severity, $filename, $lineno); - $this->context = $context; - } - - /** - * @return array Array of variables that existed when the exception occurred - */ - public function getContext() - { - @trigger_error(sprintf('The %s class is deprecated since version 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); - - return $this->context; - } -} diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalErrorException.php b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalErrorException.php index f24a54e7..46c7ad72 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalErrorException.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalErrorException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Debug\Exception; */ class FatalErrorException extends \ErrorException { - public function __construct($message, $code, $severity, $filename, $lineno, $traceOffset = null, $traceArgs = true, array $trace = null) + public function __construct(string $message, int $code, int $severity, string $filename, int $lineno, int $traceOffset = null, bool $traceArgs = true, array $trace = null) { parent::__construct($message, $code, $severity, $filename, $lineno); @@ -60,11 +60,6 @@ class FatalErrorException extends \ErrorException unset($frame); $trace = array_reverse($trace); - } elseif (function_exists('symfony_debug_backtrace')) { - $trace = symfony_debug_backtrace(); - if (0 < $traceOffset) { - array_splice($trace, 0, $traceOffset); - } } else { $trace = array(); } diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalThrowableError.php b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalThrowableError.php index 34f43b17..fafc9226 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalThrowableError.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/FatalThrowableError.php @@ -36,7 +36,8 @@ class FatalThrowableError extends FatalErrorException $e->getCode(), $severity, $e->getFile(), - $e->getLine() + $e->getLine(), + $e->getPrevious() ); $this->setTrace($e->getTrace()); diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/SilencedErrorContext.php b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/SilencedErrorContext.php index 4be83491..6f84617c 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/SilencedErrorContext.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/SilencedErrorContext.php @@ -25,7 +25,7 @@ class SilencedErrorContext implements \JsonSerializable private $line; private $trace; - public function __construct($severity, $file, $line, array $trace = array(), $count = 1) + public function __construct(int $severity, string $file, int $line, array $trace = array(), int $count = 1) { $this->severity = $severity; $this->file = $file; diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedFunctionException.php b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedFunctionException.php index a66ae2a3..89710671 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedFunctionException.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedFunctionException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Debug\Exception; */ class UndefinedFunctionException extends FatalErrorException { - public function __construct($message, \ErrorException $previous) + public function __construct(string $message, \ErrorException $previous) { parent::__construct( $message, diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedMethodException.php b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedMethodException.php index 350dc318..e8952747 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedMethodException.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Exception/UndefinedMethodException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Debug\Exception; */ class UndefinedMethodException extends FatalErrorException { - public function __construct($message, \ErrorException $previous) + public function __construct(string $message, \ErrorException $previous) { parent::__construct( $message, diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/ExceptionHandler.php b/wp-content/themes/physioassist/vendor/symfony/debug/ExceptionHandler.php index d84cfdd4..a67637ea 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/ExceptionHandler.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/ExceptionHandler.php @@ -36,11 +36,11 @@ class ExceptionHandler private $caughtLength; private $fileLinkFormat; - public function __construct($debug = true, $charset = null, $fileLinkFormat = null) + public function __construct(bool $debug = true, string $charset = null, $fileLinkFormat = null) { $this->debug = $debug; $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8'; - $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->fileLinkFormat = $fileLinkFormat; } /** @@ -196,8 +196,6 @@ class ExceptionHandler /** * Gets the HTML content associated with the given exception. * - * @param FlattenException $exception A FlattenException instance - * * @return string The content as a string */ public function getContent(FlattenException $exception) @@ -276,8 +274,6 @@ EOF; /** * Gets the stylesheet associated with the given exception. * - * @param FlattenException $exception A FlattenException instance - * * @return string The stylesheet as a string */ public function getStylesheet(FlattenException $exception) @@ -310,8 +306,8 @@ EOF; .exception-message { flex-grow: 1; padding: 30px 0; } .exception-message, .exception-message a { color: #FFF; font-size: 21px; font-weight: 400; margin: 0; } .exception-message.long { font-size: 18px; } - .exception-message a { text-decoration: none; } - .exception-message a:hover { text-decoration: underline; } + .exception-message a { border-bottom: 1px solid rgba(255, 255, 255, 0.5); font-size: inherit; text-decoration: none; } + .exception-message a:hover { border-bottom-color: #ffffff; } .exception-illustration { flex-basis: 111px; flex-shrink: 0; height: 66px; margin-left: 15px; opacity: .7; } @@ -320,11 +316,11 @@ EOF; .trace-message { font-size: 14px; font-weight: normal; margin: .5em 0 0; } - .trace-file-path, .trace-file-path a { margin-top: 3px; color: #999; color: #795da3; color: #B0413E; color: #222; font-size: 13px; } + .trace-file-path, .trace-file-path a { color: #222; margin-top: 3px; font-size: 13px; } .trace-class { color: #B0413E; } .trace-type { padding: 0 2px; } - .trace-method { color: #B0413E; color: #222; font-weight: bold; color: #B0413E; } - .trace-arguments { color: #222; color: #999; font-weight: normal; color: #795da3; color: #777; padding-left: 2px; } + .trace-method { color: #B0413E; font-weight: bold; } + .trace-arguments { color: #777; font-weight: normal; padding-left: 2px; } @media (min-width: 575px) { .hidden-xs-down { display: initial; } @@ -359,13 +355,29 @@ EOF; private function formatPath($path, $line) { $file = $this->escapeHtml(preg_match('#[^/\\\\]*+$#', $path, $file) ? $file[0] : $path); - $fmt = $this->fileLinkFormat; + $fmt = $this->fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + + if (!$fmt) { + return sprintf('in
%s%s', $this->escapeHtml($path), $file, 0 < $line ? ' line '.$line : ''); + } + + if (\is_string($fmt)) { + $i = strpos($f = $fmt, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: strlen($f); + $fmt = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE); + + for ($i = 1; isset($fmt[$i]); ++$i) { + if (0 === strpos($path, $k = $fmt[$i++])) { + $path = substr_replace($path, $fmt[$i], 0, strlen($k)); + break; + } + } - if ($fmt && $link = is_string($fmt) ? strtr($fmt, array('%f' => $path, '%l' => $line)) : $fmt->format($path, $line)) { - return sprintf('in %s (line %d)', $this->escapeHtml($link), $file, $line); + $link = strtr($fmt[0], array('%f' => $path, '%l' => $line)); + } else { + $link = $fmt->format($path, $line); } - return sprintf('in %s (line %d)', $this->escapeHtml($path), $file, $line); + return sprintf('in %s%s', $this->escapeHtml($link), $file, 0 < $line ? ' line '.$line : ''); } /** diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/wp-content/themes/physioassist/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php index 32ba9a09..25030e56 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -83,7 +83,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface * * @return array An array of possible fully qualified class names */ - private function getClassCandidates($class) + private function getClassCandidates(string $class): array { if (!is_array($functions = spl_autoload_functions())) { return array(); @@ -124,14 +124,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface return array_unique($classes); } - /** - * @param string $path - * @param string $class - * @param string $prefix - * - * @return array - */ - private function findClassInPath($path, $class, $prefix) + private function findClassInPath(string $path, string $class, string $prefix): array { if (!$path = realpath($path.'/'.strtr($prefix, '\\_', '//')) ?: realpath($path.'/'.dirname(strtr($prefix, '\\_', '//'))) ?: realpath($path)) { return array(); @@ -148,14 +141,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface return $classes; } - /** - * @param string $path - * @param string $file - * @param string $prefix - * - * @return string|null - */ - private function convertFileToClass($path, $file, $prefix) + private function convertFileToClass(string $path, string $file, string $prefix): ?string { $candidates = array( // namespaced class @@ -192,14 +178,11 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface return $candidate; } } + + return null; } - /** - * @param string $class - * - * @return bool - */ - private function classExists($class) + private function classExists(string $class): bool { return class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false); } diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/LICENSE b/wp-content/themes/physioassist/vendor/symfony/debug/LICENSE index 17d16a13..21d7fb9e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/LICENSE +++ b/wp-content/themes/physioassist/vendor/symfony/debug/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/README.md b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/README.md deleted file mode 100644 index 25dccf07..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/README.md +++ /dev/null @@ -1,134 +0,0 @@ -Symfony Debug Extension for PHP 5 -================================= - -This extension publishes several functions to help building powerful debugging tools. -It is compatible with PHP 5.3, 5.4, 5.5 and 5.6; with ZTS and non-ZTS modes. -It is not required thus not provided for PHP 7. - -symfony_zval_info() -------------------- - -- exposes zval_hash/refcounts, allowing e.g. efficient exploration of arbitrary structures in PHP, -- does work with references, preventing memory copying. - -Its behavior is about the same as: - -```php - gettype($array[$key]), - 'zval_hash' => /* hashed memory address of $array[$key] */, - 'zval_refcount' => /* internal zval refcount of $array[$key] */, - 'zval_isref' => /* is_ref status of $array[$key] */, - ); - - switch ($info['type']) { - case 'object': - $info += array( - 'object_class' => get_class($array[$key]), - 'object_refcount' => /* internal object refcount of $array[$key] */, - 'object_hash' => spl_object_hash($array[$key]), - 'object_handle' => /* internal object handle $array[$key] */, - ); - break; - - case 'resource': - $info += array( - 'resource_handle' => (int) $array[$key], - 'resource_type' => get_resource_type($array[$key]), - 'resource_refcount' => /* internal resource refcount of $array[$key] */, - ); - break; - - case 'array': - $info += array( - 'array_count' => count($array[$key]), - ); - break; - - case 'string': - $info += array( - 'strlen' => strlen($array[$key]), - ); - break; - } - - return $info; -} -``` - -symfony_debug_backtrace() -------------------------- - -This function works like debug_backtrace(), except that it can fetch the full backtrace in case of fatal errors: - -```php -function foo() { fatal(); } -function bar() { foo(); } - -function sd() { var_dump(symfony_debug_backtrace()); } - -register_shutdown_function('sd'); - -bar(); - -/* Will output -Fatal error: Call to undefined function fatal() in foo.php on line 42 -array(3) { - [0]=> - array(2) { - ["function"]=> - string(2) "sd" - ["args"]=> - array(0) { - } - } - [1]=> - array(4) { - ["file"]=> - string(7) "foo.php" - ["line"]=> - int(1) - ["function"]=> - string(3) "foo" - ["args"]=> - array(0) { - } - } - [2]=> - array(4) { - ["file"]=> - string(102) "foo.php" - ["line"]=> - int(2) - ["function"]=> - string(3) "bar" - ["args"]=> - array(0) { - } - } -} -*/ -``` - -Usage ------ - -To enable the extension from source, run: - -``` - phpize - ./configure - make - sudo make install -``` diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.m4 b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.m4 deleted file mode 100644 index 3c560471..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.m4 +++ /dev/null @@ -1,63 +0,0 @@ -dnl $Id$ -dnl config.m4 for extension symfony_debug - -dnl Comments in this file start with the string 'dnl'. -dnl Remove where necessary. This file will not work -dnl without editing. - -dnl If your extension references something external, use with: - -dnl PHP_ARG_WITH(symfony_debug, for symfony_debug support, -dnl Make sure that the comment is aligned: -dnl [ --with-symfony_debug Include symfony_debug support]) - -dnl Otherwise use enable: - -PHP_ARG_ENABLE(symfony_debug, whether to enable symfony_debug support, -dnl Make sure that the comment is aligned: -[ --enable-symfony_debug Enable symfony_debug support]) - -if test "$PHP_SYMFONY_DEBUG" != "no"; then - dnl Write more examples of tests here... - - dnl # --with-symfony_debug -> check with-path - dnl SEARCH_PATH="/usr/local /usr" # you might want to change this - dnl SEARCH_FOR="/include/symfony_debug.h" # you most likely want to change this - dnl if test -r $PHP_SYMFONY_DEBUG/$SEARCH_FOR; then # path given as parameter - dnl SYMFONY_DEBUG_DIR=$PHP_SYMFONY_DEBUG - dnl else # search default path list - dnl AC_MSG_CHECKING([for symfony_debug files in default path]) - dnl for i in $SEARCH_PATH ; do - dnl if test -r $i/$SEARCH_FOR; then - dnl SYMFONY_DEBUG_DIR=$i - dnl AC_MSG_RESULT(found in $i) - dnl fi - dnl done - dnl fi - dnl - dnl if test -z "$SYMFONY_DEBUG_DIR"; then - dnl AC_MSG_RESULT([not found]) - dnl AC_MSG_ERROR([Please reinstall the symfony_debug distribution]) - dnl fi - - dnl # --with-symfony_debug -> add include path - dnl PHP_ADD_INCLUDE($SYMFONY_DEBUG_DIR/include) - - dnl # --with-symfony_debug -> check for lib and symbol presence - dnl LIBNAME=symfony_debug # you may want to change this - dnl LIBSYMBOL=symfony_debug # you most likely want to change this - - dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, - dnl [ - dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SYMFONY_DEBUG_DIR/lib, SYMFONY_DEBUG_SHARED_LIBADD) - dnl AC_DEFINE(HAVE_SYMFONY_DEBUGLIB,1,[ ]) - dnl ],[ - dnl AC_MSG_ERROR([wrong symfony_debug lib version or lib not found]) - dnl ],[ - dnl -L$SYMFONY_DEBUG_DIR/lib -lm - dnl ]) - dnl - dnl PHP_SUBST(SYMFONY_DEBUG_SHARED_LIBADD) - - PHP_NEW_EXTENSION(symfony_debug, symfony_debug.c, $ext_shared) -fi diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.w32 b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.w32 deleted file mode 100644 index 487e6913..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/config.w32 +++ /dev/null @@ -1,13 +0,0 @@ -// $Id$ -// vim:ft=javascript - -// If your extension references something external, use ARG_WITH -// ARG_WITH("symfony_debug", "for symfony_debug support", "no"); - -// Otherwise, use ARG_ENABLE -// ARG_ENABLE("symfony_debug", "enable symfony_debug support", "no"); - -if (PHP_SYMFONY_DEBUG != "no") { - EXTENSION("symfony_debug", "symfony_debug.c"); -} - diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/php_symfony_debug.h b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/php_symfony_debug.h deleted file mode 100644 index 26d0e8c0..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/php_symfony_debug.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -#ifndef PHP_SYMFONY_DEBUG_H -#define PHP_SYMFONY_DEBUG_H - -extern zend_module_entry symfony_debug_module_entry; -#define phpext_symfony_debug_ptr &symfony_debug_module_entry - -#define PHP_SYMFONY_DEBUG_VERSION "2.7" - -#ifdef PHP_WIN32 -# define PHP_SYMFONY_DEBUG_API __declspec(dllexport) -#elif defined(__GNUC__) && __GNUC__ >= 4 -# define PHP_SYMFONY_DEBUG_API __attribute__ ((visibility("default"))) -#else -# define PHP_SYMFONY_DEBUG_API -#endif - -#ifdef ZTS -#include "TSRM.h" -#endif - -ZEND_BEGIN_MODULE_GLOBALS(symfony_debug) - intptr_t req_rand_init; - void (*old_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); - zval *debug_bt; -ZEND_END_MODULE_GLOBALS(symfony_debug) - -PHP_MINIT_FUNCTION(symfony_debug); -PHP_MSHUTDOWN_FUNCTION(symfony_debug); -PHP_RINIT_FUNCTION(symfony_debug); -PHP_RSHUTDOWN_FUNCTION(symfony_debug); -PHP_MINFO_FUNCTION(symfony_debug); -PHP_GINIT_FUNCTION(symfony_debug); -PHP_GSHUTDOWN_FUNCTION(symfony_debug); - -PHP_FUNCTION(symfony_zval_info); -PHP_FUNCTION(symfony_debug_backtrace); - -static char *_symfony_debug_memory_address_hash(void * TSRMLS_DC); -static const char *_symfony_debug_zval_type(zval *); -static const char* _symfony_debug_get_resource_type(long TSRMLS_DC); -static int _symfony_debug_get_resource_refcount(long TSRMLS_DC); - -void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args); - -#ifdef ZTS -#define SYMFONY_DEBUG_G(v) TSRMG(symfony_debug_globals_id, zend_symfony_debug_globals *, v) -#else -#define SYMFONY_DEBUG_G(v) (symfony_debug_globals.v) -#endif - -#endif /* PHP_SYMFONY_DEBUG_H */ diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/symfony_debug.c b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/symfony_debug.c deleted file mode 100644 index 0d7cb602..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/symfony_debug.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "php.h" -#ifdef ZTS -#include "TSRM.h" -#endif -#include "php_ini.h" -#include "ext/standard/info.h" -#include "php_symfony_debug.h" -#include "ext/standard/php_rand.h" -#include "ext/standard/php_lcg.h" -#include "ext/spl/php_spl.h" -#include "Zend/zend_gc.h" -#include "Zend/zend_builtin_functions.h" -#include "Zend/zend_extensions.h" /* for ZEND_EXTENSION_API_NO */ -#include "ext/standard/php_array.h" -#include "Zend/zend_interfaces.h" -#include "SAPI.h" - -#define IS_PHP_53 ZEND_EXTENSION_API_NO == 220090626 - -ZEND_DECLARE_MODULE_GLOBALS(symfony_debug) - -ZEND_BEGIN_ARG_INFO_EX(symfony_zval_arginfo, 0, 0, 2) - ZEND_ARG_INFO(0, key) - ZEND_ARG_ARRAY_INFO(0, array, 0) - ZEND_ARG_INFO(0, options) -ZEND_END_ARG_INFO() - -const zend_function_entry symfony_debug_functions[] = { - PHP_FE(symfony_zval_info, symfony_zval_arginfo) - PHP_FE(symfony_debug_backtrace, NULL) - PHP_FE_END -}; - -PHP_FUNCTION(symfony_debug_backtrace) -{ - if (zend_parse_parameters_none() == FAILURE) { - return; - } -#if IS_PHP_53 - zend_fetch_debug_backtrace(return_value, 1, 0 TSRMLS_CC); -#else - zend_fetch_debug_backtrace(return_value, 1, 0, 0 TSRMLS_CC); -#endif - - if (!SYMFONY_DEBUG_G(debug_bt)) { - return; - } - - php_array_merge(Z_ARRVAL_P(return_value), Z_ARRVAL_P(SYMFONY_DEBUG_G(debug_bt)), 0 TSRMLS_CC); -} - -PHP_FUNCTION(symfony_zval_info) -{ - zval *key = NULL, *arg = NULL; - zval **data = NULL; - HashTable *array = NULL; - long options = 0; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zh|l", &key, &array, &options) == FAILURE) { - return; - } - - switch (Z_TYPE_P(key)) { - case IS_STRING: - if (zend_symtable_find(array, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&data) == FAILURE) { - return; - } - break; - case IS_LONG: - if (zend_hash_index_find(array, Z_LVAL_P(key), (void **)&data)) { - return; - } - break; - } - - arg = *data; - - array_init(return_value); - - add_assoc_string(return_value, "type", (char *)_symfony_debug_zval_type(arg), 1); - add_assoc_stringl(return_value, "zval_hash", _symfony_debug_memory_address_hash((void *)arg TSRMLS_CC), 16, 0); - add_assoc_long(return_value, "zval_refcount", Z_REFCOUNT_P(arg)); - add_assoc_bool(return_value, "zval_isref", (zend_bool)Z_ISREF_P(arg)); - - if (Z_TYPE_P(arg) == IS_OBJECT) { - char hash[33] = {0}; - - php_spl_object_hash(arg, (char *)hash TSRMLS_CC); - add_assoc_stringl(return_value, "object_class", (char *)Z_OBJCE_P(arg)->name, Z_OBJCE_P(arg)->name_length, 1); - add_assoc_long(return_value, "object_refcount", EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(arg)].bucket.obj.refcount); - add_assoc_string(return_value, "object_hash", hash, 1); - add_assoc_long(return_value, "object_handle", Z_OBJ_HANDLE_P(arg)); - } else if (Z_TYPE_P(arg) == IS_ARRAY) { - add_assoc_long(return_value, "array_count", zend_hash_num_elements(Z_ARRVAL_P(arg))); - } else if(Z_TYPE_P(arg) == IS_RESOURCE) { - add_assoc_long(return_value, "resource_handle", Z_LVAL_P(arg)); - add_assoc_string(return_value, "resource_type", (char *)_symfony_debug_get_resource_type(Z_LVAL_P(arg) TSRMLS_CC), 1); - add_assoc_long(return_value, "resource_refcount", _symfony_debug_get_resource_refcount(Z_LVAL_P(arg) TSRMLS_CC)); - } else if (Z_TYPE_P(arg) == IS_STRING) { - add_assoc_long(return_value, "strlen", Z_STRLEN_P(arg)); - } -} - -void symfony_debug_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) -{ - TSRMLS_FETCH(); - zval *retval; - - switch (type) { - case E_ERROR: - case E_PARSE: - case E_CORE_ERROR: - case E_CORE_WARNING: - case E_COMPILE_ERROR: - case E_COMPILE_WARNING: - ALLOC_INIT_ZVAL(retval); -#if IS_PHP_53 - zend_fetch_debug_backtrace(retval, 1, 0 TSRMLS_CC); -#else - zend_fetch_debug_backtrace(retval, 1, 0, 0 TSRMLS_CC); -#endif - SYMFONY_DEBUG_G(debug_bt) = retval; - } - - SYMFONY_DEBUG_G(old_error_cb)(type, error_filename, error_lineno, format, args); -} - -static const char* _symfony_debug_get_resource_type(long rsid TSRMLS_DC) -{ - const char *res_type; - res_type = zend_rsrc_list_get_rsrc_type(rsid TSRMLS_CC); - - if (!res_type) { - return "Unknown"; - } - - return res_type; -} - -static int _symfony_debug_get_resource_refcount(long rsid TSRMLS_DC) -{ - zend_rsrc_list_entry *le; - - if (zend_hash_index_find(&EG(regular_list), rsid, (void **) &le)==SUCCESS) { - return le->refcount; - } - - return 0; -} - -static char *_symfony_debug_memory_address_hash(void *address TSRMLS_DC) -{ - char *result = NULL; - intptr_t address_rand; - - if (!SYMFONY_DEBUG_G(req_rand_init)) { - if (!BG(mt_rand_is_seeded)) { - php_mt_srand(GENERATE_SEED() TSRMLS_CC); - } - SYMFONY_DEBUG_G(req_rand_init) = (intptr_t)php_mt_rand(TSRMLS_C); - } - - address_rand = (intptr_t)address ^ SYMFONY_DEBUG_G(req_rand_init); - - spprintf(&result, 17, "%016zx", address_rand); - - return result; -} - -static const char *_symfony_debug_zval_type(zval *zv) -{ - switch (Z_TYPE_P(zv)) { - case IS_NULL: - return "NULL"; - break; - - case IS_BOOL: - return "boolean"; - break; - - case IS_LONG: - return "integer"; - break; - - case IS_DOUBLE: - return "double"; - break; - - case IS_STRING: - return "string"; - break; - - case IS_ARRAY: - return "array"; - break; - - case IS_OBJECT: - return "object"; - - case IS_RESOURCE: - return "resource"; - - default: - return "unknown type"; - } -} - -zend_module_entry symfony_debug_module_entry = { - STANDARD_MODULE_HEADER, - "symfony_debug", - symfony_debug_functions, - PHP_MINIT(symfony_debug), - PHP_MSHUTDOWN(symfony_debug), - PHP_RINIT(symfony_debug), - PHP_RSHUTDOWN(symfony_debug), - PHP_MINFO(symfony_debug), - PHP_SYMFONY_DEBUG_VERSION, - PHP_MODULE_GLOBALS(symfony_debug), - PHP_GINIT(symfony_debug), - PHP_GSHUTDOWN(symfony_debug), - NULL, - STANDARD_MODULE_PROPERTIES_EX -}; - -#ifdef COMPILE_DL_SYMFONY_DEBUG -ZEND_GET_MODULE(symfony_debug) -#endif - -PHP_GINIT_FUNCTION(symfony_debug) -{ - memset(symfony_debug_globals, 0 , sizeof(*symfony_debug_globals)); -} - -PHP_GSHUTDOWN_FUNCTION(symfony_debug) -{ - -} - -PHP_MINIT_FUNCTION(symfony_debug) -{ - SYMFONY_DEBUG_G(old_error_cb) = zend_error_cb; - zend_error_cb = symfony_debug_error_cb; - - return SUCCESS; -} - -PHP_MSHUTDOWN_FUNCTION(symfony_debug) -{ - zend_error_cb = SYMFONY_DEBUG_G(old_error_cb); - - return SUCCESS; -} - -PHP_RINIT_FUNCTION(symfony_debug) -{ - return SUCCESS; -} - -PHP_RSHUTDOWN_FUNCTION(symfony_debug) -{ - return SUCCESS; -} - -PHP_MINFO_FUNCTION(symfony_debug) -{ - php_info_print_table_start(); - php_info_print_table_header(2, "Symfony Debug support", "enabled"); - php_info_print_table_header(2, "Symfony Debug version", PHP_SYMFONY_DEBUG_VERSION); - php_info_print_table_end(); -} diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/001.phpt b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/001.phpt deleted file mode 100644 index 15e183a7..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/001.phpt +++ /dev/null @@ -1,153 +0,0 @@ ---TEST-- -Test symfony_zval_info API ---SKIPIF-- - ---FILE-- - $int, - 'float' => $float, - 'str' => $str, - 'object' => $object, - 'array' => $array, - 'resource' => $resource, - 'null' => $null, - 'bool' => $bool, - 'refcount' => &$refcount2, -); - -var_dump(symfony_zval_info('int', $var)); -var_dump(symfony_zval_info('float', $var)); -var_dump(symfony_zval_info('str', $var)); -var_dump(symfony_zval_info('object', $var)); -var_dump(symfony_zval_info('array', $var)); -var_dump(symfony_zval_info('resource', $var)); -var_dump(symfony_zval_info('null', $var)); -var_dump(symfony_zval_info('bool', $var)); - -var_dump(symfony_zval_info('refcount', $var)); -var_dump(symfony_zval_info('not-exist', $var)); -?> ---EXPECTF-- -array(4) { - ["type"]=> - string(7) "integer" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) -} -array(4) { - ["type"]=> - string(6) "double" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) -} -array(5) { - ["type"]=> - string(6) "string" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) - ["strlen"]=> - int(6) -} -array(8) { - ["type"]=> - string(6) "object" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) - ["object_class"]=> - string(8) "stdClass" - ["object_refcount"]=> - int(1) - ["object_hash"]=> - string(32) "%s" - ["object_handle"]=> - int(%d) -} -array(5) { - ["type"]=> - string(5) "array" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) - ["array_count"]=> - int(2) -} -array(7) { - ["type"]=> - string(8) "resource" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) - ["resource_handle"]=> - int(%d) - ["resource_type"]=> - string(6) "stream" - ["resource_refcount"]=> - int(1) -} -array(4) { - ["type"]=> - string(4) "NULL" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) -} -array(4) { - ["type"]=> - string(7) "boolean" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(2) - ["zval_isref"]=> - bool(false) -} -array(4) { - ["type"]=> - string(7) "integer" - ["zval_hash"]=> - string(16) "%s" - ["zval_refcount"]=> - int(3) - ["zval_isref"]=> - bool(true) -} -NULL diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002.phpt b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002.phpt deleted file mode 100644 index 2bc6d712..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002.phpt +++ /dev/null @@ -1,63 +0,0 @@ ---TEST-- -Test symfony_debug_backtrace in case of fatal error ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Fatal error: Call to undefined function notexist() in %s on line %d -Array -( - [0] => Array - ( - [function] => bt - [args] => Array - ( - ) - - ) - - [1] => Array - ( - [file] => %s - [line] => %d - [function] => foo - [args] => Array - ( - ) - - ) - - [2] => Array - ( - [file] => %s - [line] => %d - [function] => bar - [args] => Array - ( - ) - - ) - -) diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002_1.phpt b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002_1.phpt deleted file mode 100644 index 4e9e34f1..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/002_1.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test symfony_debug_backtrace in case of non fatal error ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -Array -( - [0] => Array - ( - [file] => %s - [line] => %d - [function] => bt - [args] => Array - ( - ) - - ) - - [1] => Array - ( - [file] => %s - [line] => %d - [function] => bar - [args] => Array - ( - ) - - ) - -) diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/003.phpt b/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/003.phpt deleted file mode 100644 index 2a494e27..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Resources/ext/tests/003.phpt +++ /dev/null @@ -1,85 +0,0 @@ ---TEST-- -Test ErrorHandler in case of fatal error ---SKIPIF-- - ---FILE-- -setExceptionHandler('print_r'); - -if (function_exists('xdebug_disable')) { - xdebug_disable(); -} - -bar(); -?> ---EXPECTF-- -Fatal error: Call to undefined function Symfony\Component\Debug\notexist() in %s on line %d -Symfony\Component\Debug\Exception\UndefinedFunctionException Object -( - [message:protected] => Attempted to call function "notexist" from namespace "Symfony\Component\Debug". - [string:Exception:private] => - [code:protected] => 0 - [file:protected] => %s - [line:protected] => %d - [trace:Exception:private] => Array - ( - [0] => Array - ( -%A [function] => Symfony\Component\Debug\foo -%A [args] => Array - ( - ) - - ) - - [1] => Array - ( -%A [function] => Symfony\Component\Debug\bar -%A [args] => Array - ( - ) - - ) -%A - ) - - [previous:Exception:private] => - [severity:protected] => 1 -) diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/DebugClassLoaderTest.php b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/DebugClassLoaderTest.php index f1e3fb7c..1580ca99 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/DebugClassLoaderTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/DebugClassLoaderTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Debug\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Debug\DebugClassLoader; -use Symfony\Component\Debug\ErrorHandler; class DebugClassLoaderTest extends TestCase { @@ -59,67 +58,21 @@ class DebugClassLoaderTest extends TestCase $this->fail('DebugClassLoader did not register'); } - public function testUnsilencing() - { - if (\PHP_VERSION_ID >= 70000) { - $this->markTestSkipped('PHP7 throws exceptions, unsilencing is not required anymore.'); - } - if (defined('HHVM_VERSION')) { - $this->markTestSkipped('HHVM is not handled in this test case.'); - } - - ob_start(); - - $this->iniSet('log_errors', 0); - $this->iniSet('display_errors', 1); - - // See below: this will fail with parse error - // but this should not be @-silenced. - @class_exists(__NAMESPACE__.'\TestingUnsilencing', true); - - $output = ob_get_clean(); - - $this->assertStringMatchesFormat('%aParse error%a', $output); - } - - public function testStacking() + /** + * @expectedException \Exception + * @expectedExceptionMessage boo + */ + public function testThrowingClass() { - // the ContextErrorException must not be loaded to test the workaround - // for https://bugs.php.net/65322. - if (class_exists('Symfony\Component\Debug\Exception\ContextErrorException', false)) { - $this->markTestSkipped('The ContextErrorException class is already loaded.'); - } - if (defined('HHVM_VERSION')) { - $this->markTestSkipped('HHVM is not handled in this test case.'); - } - - ErrorHandler::register(); - try { - // Trigger autoloading + E_STRICT at compile time - // which in turn triggers $errorHandler->handle() - // that again triggers autoloading for ContextErrorException. - // Error stacking works around the bug above and everything is fine. - - eval(' - namespace '.__NAMESPACE__.'; - class ChildTestingStacking extends TestingStacking { function foo($bar) {} } - '); - $this->fail('ContextErrorException expected'); - } catch (\ErrorException $exception) { - // if an exception is thrown, the test passed - $this->assertStringStartsWith(__FILE__, $exception->getFile()); - if (\PHP_VERSION_ID < 70000) { - $this->assertRegExp('/^Runtime Notice: Declaration/', $exception->getMessage()); - $this->assertEquals(E_STRICT, $exception->getSeverity()); - } else { - $this->assertRegExp('/^Warning: Declaration/', $exception->getMessage()); - $this->assertEquals(E_WARNING, $exception->getSeverity()); - } - } finally { - restore_error_handler(); - restore_exception_handler(); + class_exists(__NAMESPACE__.'\Fixtures\Throwing'); + $this->fail('Exception expected'); + } catch (\Exception $e) { + $this->assertSame('boo', $e->getMessage()); } + + // the second call also should throw + class_exists(__NAMESPACE__.'\Fixtures\Throwing'); } /** @@ -243,17 +196,13 @@ class DebugClassLoaderTest extends TestCase $this->assertSame($xError, $lastError); } - public function testReservedForPhp7() + public function testExtendedFinalClass() { - if (\PHP_VERSION_ID >= 70000) { - $this->markTestSkipped('PHP7 already prevents using reserved names.'); - } - set_error_handler(function () { return false; }); $e = error_reporting(0); trigger_error('', E_USER_NOTICE); - class_exists('Test\\'.__NAMESPACE__.'\\Float', true); + class_exists('Test\\'.__NAMESPACE__.'\\ExtendsFinalClass', true); error_reporting($e); restore_error_handler(); @@ -263,19 +212,19 @@ class DebugClassLoaderTest extends TestCase $xError = array( 'type' => E_USER_DEPRECATED, - 'message' => 'The "Test\Symfony\Component\Debug\Tests\Float" class uses the reserved name "Float", it will break on PHP 7 and higher', + 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass".', ); $this->assertSame($xError, $lastError); } - public function testExtendedFinalClass() + public function testExtendedFinalMethod() { set_error_handler(function () { return false; }); $e = error_reporting(0); trigger_error('', E_USER_NOTICE); - class_exists('Test\\'.__NAMESPACE__.'\\ExtendsFinalClass', true); + class_exists(__NAMESPACE__.'\\Fixtures\\ExtendedFinalMethod', true); error_reporting($e); restore_error_handler(); @@ -285,19 +234,19 @@ class DebugClassLoaderTest extends TestCase $xError = array( 'type' => E_USER_DEPRECATED, - 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass" class is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass".', + 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".', ); $this->assertSame($xError, $lastError); } - public function testExtendedFinalMethod() + public function testExtendedDeprecatedMethodDoesntTriggerAnyNotice() { set_error_handler(function () { return false; }); $e = error_reporting(0); trigger_error('', E_USER_NOTICE); - class_exists(__NAMESPACE__.'\\Fixtures\\ExtendedFinalMethod', true); + class_exists('Test\\'.__NAMESPACE__.'\\ExtendsAnnotatedClass', true); error_reporting($e); restore_error_handler(); @@ -305,12 +254,26 @@ class DebugClassLoaderTest extends TestCase $lastError = error_get_last(); unset($lastError['file'], $lastError['line']); - $xError = array( - 'type' => E_USER_DEPRECATED, - 'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod".', - ); + $this->assertSame(array('type' => E_USER_NOTICE, 'message' => ''), $lastError); + } - $this->assertSame($xError, $lastError); + public function testInternalsUse() + { + $deprecations = array(); + set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; }); + $e = error_reporting(E_USER_DEPRECATED); + + class_exists('Test\\'.__NAMESPACE__.'\\ExtendsInternals', true); + + error_reporting($e); + restore_error_handler(); + + $this->assertSame($deprecations, array( + 'The "Symfony\Component\Debug\Tests\Fixtures\InternalClass" class is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".', + 'The "Symfony\Component\Debug\Tests\Fixtures\InternalInterface" interface is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternalsParent".', + 'The "Symfony\Component\Debug\Tests\Fixtures\InternalTrait" trait is considered internal. It may change without further notice. You should not use it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".', + 'The "Symfony\Component\Debug\Tests\Fixtures\InternalTrait2::internalMethod()" method is considered internal. It may change without further notice. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsInternals".', + )); } } @@ -335,22 +298,12 @@ class ClassLoader eval('namespace '.__NAMESPACE__.'; class TestingStacking { function foo() {} }'); } elseif (__NAMESPACE__.'\TestingCaseMismatch' === $class) { eval('namespace '.__NAMESPACE__.'; class TestingCaseMisMatch {}'); - } elseif (__NAMESPACE__.'\Fixtures\CaseMismatch' === $class) { - return $fixtureDir.'CaseMismatch.php'; } elseif (__NAMESPACE__.'\Fixtures\Psr4CaseMismatch' === $class) { return $fixtureDir.'psr4'.DIRECTORY_SEPARATOR.'Psr4CaseMismatch.php'; } elseif (__NAMESPACE__.'\Fixtures\NotPSR0' === $class) { return $fixtureDir.'reallyNotPsr0.php'; } elseif (__NAMESPACE__.'\Fixtures\NotPSR0bis' === $class) { return $fixtureDir.'notPsr0Bis.php'; - } elseif (__NAMESPACE__.'\Fixtures\DeprecatedInterface' === $class) { - return $fixtureDir.'DeprecatedInterface.php'; - } elseif (__NAMESPACE__.'\Fixtures\FinalClass' === $class) { - return $fixtureDir.'FinalClass.php'; - } elseif (__NAMESPACE__.'\Fixtures\FinalMethod' === $class) { - return $fixtureDir.'FinalMethod.php'; - } elseif (__NAMESPACE__.'\Fixtures\ExtendedFinalMethod' === $class) { - return $fixtureDir.'ExtendedFinalMethod.php'; } elseif ('Symfony\Bridge\Debug\Tests\Fixtures\ExtendsDeprecatedParent' === $class) { eval('namespace Symfony\Bridge\Debug\Tests\Fixtures; class ExtendsDeprecatedParent extends \\'.__NAMESPACE__.'\Fixtures\DeprecatedClass {}'); } elseif ('Test\\'.__NAMESPACE__.'\DeprecatedParentClass' === $class) { @@ -363,6 +316,18 @@ class ClassLoader eval('namespace Test\\'.__NAMESPACE__.'; class Float {}'); } elseif ('Test\\'.__NAMESPACE__.'\ExtendsFinalClass' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsFinalClass extends \\'.__NAMESPACE__.'\Fixtures\FinalClass {}'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsAnnotatedClass' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsAnnotatedClass extends \\'.__NAMESPACE__.'\Fixtures\AnnotatedClass { + public function deprecatedMethod() { } + }'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsInternals' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsInternals extends ExtendsInternalsParent { + use \\'.__NAMESPACE__.'\Fixtures\InternalTrait; + + public function internalMethod() { } + }'); + } elseif ('Test\\'.__NAMESPACE__.'\ExtendsInternalsParent' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsInternalsParent extends \\'.__NAMESPACE__.'\Fixtures\InternalClass implements \\'.__NAMESPACE__.'\Fixtures\InternalInterface { }'); } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/ErrorHandlerTest.php b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/ErrorHandlerTest.php index a14accf3..afe16ea4 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/ErrorHandlerTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/ErrorHandlerTest.php @@ -35,7 +35,7 @@ class ErrorHandlerTest extends TestCase $newHandler = new ErrorHandler(); - $this->assertSame($newHandler, ErrorHandler::register($newHandler, false)); + $this->assertSame($handler, ErrorHandler::register($newHandler, false)); $h = set_error_handler('var_dump'); restore_error_handler(); $this->assertSame(array($handler, 'handleError'), $h); @@ -98,8 +98,6 @@ class ErrorHandlerTest extends TestCase // dummy function to test trace in error handler. private static function triggerNotice($that) { - // dummy variable to check for in error handler. - $foobar = 123; $that->assertSame('', $foo.$foo.$bar); } @@ -342,35 +340,6 @@ class ErrorHandlerTest extends TestCase } } - public function testErrorStacking() - { - try { - $handler = ErrorHandler::register(); - $handler->screamAt(E_USER_WARNING); - - $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); - - $logger - ->expects($this->exactly(2)) - ->method('log') - ->withConsecutive( - array($this->equalTo(LogLevel::WARNING), $this->equalTo('Dummy log')), - array($this->equalTo(LogLevel::DEBUG), $this->equalTo('User Warning: Silenced warning')) - ) - ; - - $handler->setDefaultLogger($logger, array(E_USER_WARNING => LogLevel::WARNING)); - - ErrorHandler::stackErrors(); - @trigger_error('Silenced warning', E_USER_WARNING); - $logger->log(LogLevel::WARNING, 'Dummy log'); - ErrorHandler::unstackErrors(); - } finally { - restore_error_handler(); - restore_exception_handler(); - } - } - public function testBootstrappingLogger() { $bootLogger = new BufferingLogger(); @@ -481,9 +450,6 @@ class ErrorHandlerTest extends TestCase } } - /** - * @requires PHP 7 - */ public function testHandleErrorException() { $exception = new \Error("Class 'Foo' not found"); @@ -499,37 +465,16 @@ class ErrorHandlerTest extends TestCase $this->assertStringStartsWith("Attempted to load class \"Foo\" from the global namespace.\nDid you forget a \"use\" statement", $args[0]->getMessage()); } - public function testHandleFatalErrorOnHHVM() + /** + * @expectedException \Exception + */ + public function testCustomExceptionHandler() { - try { - $handler = ErrorHandler::register(); - - $logger = $this->getMockBuilder('Psr\Log\LoggerInterface')->getMock(); - $logger - ->expects($this->once()) - ->method('log') - ->with( - $this->equalTo(LogLevel::CRITICAL), - $this->equalTo('Fatal Error: foo') - ) - ; - - $handler->setDefaultLogger($logger, E_ERROR); - - $error = array( - 'type' => E_ERROR + 0x1000000, // This error level is used by HHVM for fatal errors - 'message' => 'foo', - 'file' => 'bar', - 'line' => 123, - 'context' => array(123), - 'backtrace' => array(456), - ); + $handler = new ErrorHandler(); + $handler->setExceptionHandler(function ($e) use ($handler) { + $handler->handleException($e); + }); - call_user_func_array(array($handler, 'handleError'), $error); - $handler->handleFatalError($error); - } finally { - restore_error_handler(); - restore_exception_handler(); - } + $handler->handleException(new \Exception()); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php index e7762bde..5c781dbf 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php @@ -111,7 +111,7 @@ class FlattenExceptionTest extends TestCase /** * @dataProvider flattenDataProvider */ - public function testFlattenHttpException(\Exception $exception, $statusCode) + public function testFlattenHttpException(\Exception $exception) { $flattened = FlattenException::create($exception); $flattened2 = FlattenException::create($exception); @@ -126,7 +126,7 @@ class FlattenExceptionTest extends TestCase /** * @dataProvider flattenDataProvider */ - public function testPrevious(\Exception $exception, $statusCode) + public function testPrevious(\Exception $exception) { $flattened = FlattenException::create($exception); $flattened2 = FlattenException::create($exception); @@ -138,9 +138,6 @@ class FlattenExceptionTest extends TestCase $this->assertSame(array($flattened2), $flattened->getAllPrevious()); } - /** - * @requires PHP 7.0 - */ public function testPreviousError() { $exception = new \Exception('test', 123, new \ParseError('Oh noes!', 42)); @@ -173,7 +170,7 @@ class FlattenExceptionTest extends TestCase /** * @dataProvider flattenDataProvider */ - public function testToArray(\Exception $exception, $statusCode) + public function testToArray(\Exception $exception) { $flattened = FlattenException::create($exception); $flattened->setTrace(array(), 'foo.php', 123); @@ -193,7 +190,7 @@ class FlattenExceptionTest extends TestCase public function flattenDataProvider() { return array( - array(new \Exception('test', 123), 500), + array(new \Exception('test', 123)), ); } @@ -236,7 +233,7 @@ class FlattenExceptionTest extends TestCase $this->assertSame(array('object', 'stdClass'), $array[$i++]); $this->assertSame(array('object', 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException'), $array[$i++]); $this->assertSame(array('incomplete-object', 'BogusTestClass'), $array[$i++]); - $this->assertSame(array('resource', defined('HHVM_VERSION') ? 'Directory' : 'stream'), $array[$i++]); + $this->assertSame(array('resource', 'stream'), $array[$i++]); $this->assertSame(array('resource', 'stream'), $array[$i++]); $args = $array[$i++]; @@ -261,6 +258,7 @@ class FlattenExceptionTest extends TestCase public function testRecursionInArguments() { + $a = null; $a = array('foo', array(2, &$a)); $exception = $this->createException($a); diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php index 1dc21200..60153fc5 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/FatalErrorHandler/UndefinedFunctionFatalErrorHandlerTest.php @@ -26,7 +26,7 @@ class UndefinedFunctionFatalErrorHandlerTest extends TestCase $exception = $handler->handleError($error, new FatalErrorException('', 0, $error['type'], $error['file'], $error['line'])); $this->assertInstanceOf('Symfony\Component\Debug\Exception\UndefinedFunctionException', $exception); - // class names are case insensitive and PHP/HHVM do not return the same + // class names are case insensitive and PHP do not return the same $this->assertSame(strtolower($translatedMessage), strtolower($exception->getMessage())); $this->assertSame($error['type'], $exception->getSeverity()); $this->assertSame($error['file'], $exception->getFile()); diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php new file mode 100644 index 00000000..4eecb6d3 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/Fixtures/AnnotatedClass.php @@ -0,0 +1,13 @@ + +--EXPECTF-- +The "Symfony\Component\Debug\Tests\Fixtures\FinalMethod::finalMethod()" method is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Component\Debug\Tests\Fixtures\ExtendedFinalMethod". diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt new file mode 100644 index 00000000..7ce7b9dc --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/decorate_exception_hander.phpt @@ -0,0 +1,47 @@ +--TEST-- +Test catching fatal errors when handlers are nested +--FILE-- + +--EXPECTF-- +Fatal error: Class 'Symfony\Component\Debug\missing' not found in %s on line %d +object(Symfony\Component\Debug\Exception\ClassNotFoundException)#%d (8) { + ["message":protected]=> + string(131) "Attempted to load class "missing" from namespace "Symfony\Component\Debug". +Did you forget a "use" statement for another namespace?" + ["string":"Exception":private]=> + string(0) "" + ["code":protected]=> + int(0) + ["file":protected]=> + string(%d) "%s" + ["line":protected]=> + int(%d) + ["trace":"Exception":private]=> + array(0) { + } + ["previous":"Exception":private]=> + NULL + ["severity":protected]=> + int(1) +} diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt new file mode 100644 index 00000000..9df0a65c --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt @@ -0,0 +1,35 @@ +--TEST-- +Test rethrowing in custom exception handler +--FILE-- +setDefaultLogger(new TestLogger()); +ini_set('display_errors', 1); + +throw new \Exception('foo'); +?> +--EXPECTF-- +Uncaught Exception: foo +123 +Fatal error: Uncaught %s:25 +Stack trace: +%a diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt new file mode 100644 index 00000000..5c5245c0 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test catching fatal errors when handlers are nested +--FILE-- +setExceptionHandler('print_r'); + +if (true) { + class Broken implements \Serializable + { + } +} + +?> +--EXPECTF-- +array(1) { + [0]=> + string(37) "Error and exception handlers do match" +} +object(Symfony\Component\Debug\Exception\FatalErrorException)#%d (%d) { + ["message":protected]=> + string(199) "Error: Class Symfony\Component\Debug\Broken contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Serializable::serialize, Serializable::unserialize)" +%a +} diff --git a/wp-content/themes/physioassist/vendor/symfony/debug/composer.json b/wp-content/themes/physioassist/vendor/symfony/debug/composer.json index 6531eefd..2e6fc173 100644 --- a/wp-content/themes/physioassist/vendor/symfony/debug/composer.json +++ b/wp-content/themes/physioassist/vendor/symfony/debug/composer.json @@ -16,14 +16,14 @@ } ], "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0" + "symfony/http-kernel": "~3.4|~4.0" }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" }, @@ -34,7 +34,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/CHANGELOG.md b/wp-content/themes/physioassist/vendor/symfony/finder/CHANGELOG.md index cf19de69..c795e54c 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/CHANGELOG.md +++ b/wp-content/themes/physioassist/vendor/symfony/finder/CHANGELOG.md @@ -1,6 +1,18 @@ CHANGELOG ========= +4.0.0 +----- + + * removed `ExceptionInterface` + * removed `Symfony\Component\Finder\Iterator\FilterIterator` + +3.4.0 +----- + + * deprecated `Symfony\Component\Finder\Iterator\FilterIterator` + * added Finder::hasResults() method to check if any results were found + 3.3.0 ----- diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/DateComparator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/DateComparator.php index 8b7746ba..d17c77a9 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/DateComparator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/DateComparator.php @@ -19,13 +19,11 @@ namespace Symfony\Component\Finder\Comparator; class DateComparator extends Comparator { /** - * Constructor. - * * @param string $test A comparison string * * @throws \InvalidArgumentException If the test is not understood */ - public function __construct($test) + public function __construct(string $test) { if (!preg_match('#^\s*(==|!=|[<>]=?|after|since|before|until)?\s*(.+?)\s*$#i', $test, $matches)) { throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a date test.', $test)); diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/NumberComparator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/NumberComparator.php index 16f91285..80667c9d 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/NumberComparator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Comparator/NumberComparator.php @@ -35,13 +35,11 @@ namespace Symfony\Component\Finder\Comparator; class NumberComparator extends Comparator { /** - * Constructor. - * * @param string|int $test A comparison string or an integer * * @throws \InvalidArgumentException If the test is not understood */ - public function __construct($test) + public function __construct(?string $test) { if (!preg_match('#^\s*(==|!=|[<>]=?)?\s*([0-9\.]+)\s*([kmg]i?)?\s*$#i', $test, $matches)) { throw new \InvalidArgumentException(sprintf('Don\'t understand "%s" as a number test.', $test)); diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Exception/ExceptionInterface.php b/wp-content/themes/physioassist/vendor/symfony/finder/Exception/ExceptionInterface.php deleted file mode 100644 index 161e9686..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Exception/ExceptionInterface.php +++ /dev/null @@ -1,25 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Exception; - -/** - * @author Jean-François Simon - * - * @deprecated since 3.3, to be removed in 4.0. - */ -interface ExceptionInterface -{ - /** - * @return \Symfony\Component\Finder\Adapter\AdapterInterface - */ - public function getAdapter(); -} diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Finder.php b/wp-content/themes/physioassist/vendor/symfony/finder/Finder.php index add3fa25..105acc70 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Finder.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Finder.php @@ -61,9 +61,6 @@ class Finder implements \IteratorAggregate, \Countable private static $vcsPatterns = array('.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'); - /** - * Constructor. - */ public function __construct() { $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES; @@ -300,6 +297,10 @@ class Finder implements \IteratorAggregate, \Countable /** * Excludes directories. * + * Directories passed as argument must be relative to the ones defined with the `in()` method. For example: + * + * $finder->in(__DIR__)->exclude('ruby'); + * * @param string|array $dirs A directory path or an array of directories * * @return $this @@ -316,6 +317,8 @@ class Finder implements \IteratorAggregate, \Countable /** * Excludes "hidden" directories and files (starting with a dot). * + * This option is enabled by default. + * * @param bool $ignoreDotFiles Whether to exclude "hidden" files or not * * @return $this @@ -336,6 +339,8 @@ class Finder implements \IteratorAggregate, \Countable /** * Forces the finder to ignore version control directories. * + * This option is enabled by default. + * * @param bool $ignoreVCS Whether to exclude VCS files or not * * @return $this @@ -376,8 +381,6 @@ class Finder implements \IteratorAggregate, \Countable * * This can be slow as all the matching files and directories must be retrieved for comparison. * - * @param \Closure $closure An anonymous function - * * @return $this * * @see SortableIterator @@ -483,8 +486,6 @@ class Finder implements \IteratorAggregate, \Countable * The anonymous function receives a \SplFileInfo and must return false * to remove files. * - * @param \Closure $closure An anonymous function - * * @return $this * * @see CustomFilterIterator @@ -539,9 +540,9 @@ class Finder implements \IteratorAggregate, \Countable foreach ((array) $dirs as $dir) { if (is_dir($dir)) { - $resolvedDirs[] = $dir; + $resolvedDirs[] = $this->normalizeDir($dir); } elseif ($glob = glob($dir, (defined('GLOB_BRACE') ? GLOB_BRACE : 0) | GLOB_ONLYDIR)) { - $resolvedDirs = array_merge($resolvedDirs, $glob); + $resolvedDirs = array_merge($resolvedDirs, array_map(array($this, 'normalizeDir'), $glob)); } else { throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir)); } @@ -592,7 +593,7 @@ class Finder implements \IteratorAggregate, \Countable * * @return $this * - * @throws \InvalidArgumentException When the given argument is not iterable. + * @throws \InvalidArgumentException when the given argument is not iterable */ public function append($iterator) { @@ -613,6 +614,20 @@ class Finder implements \IteratorAggregate, \Countable return $this; } + /** + * Check if the any results were found. + * + * @return bool + */ + public function hasResults() + { + foreach ($this->getIterator() as $_) { + return true; + } + + return false; + } + /** * Counts all the results collected by the iterators. * @@ -623,12 +638,7 @@ class Finder implements \IteratorAggregate, \Countable return iterator_count($this->getIterator()); } - /** - * @param $dir - * - * @return \Iterator - */ - private function searchInDirectory($dir) + private function searchInDirectory(string $dir): \Iterator { if (static::IGNORE_VCS_FILES === (static::IGNORE_VCS_FILES & $this->ignore)) { $this->exclude = array_merge($this->exclude, self::$vcsPatterns); @@ -713,4 +723,16 @@ class Finder implements \IteratorAggregate, \Countable return $iterator; } + + /** + * Normalizes given directory names by removing trailing slashes. + * + * @param string $dir + * + * @return string + */ + private function normalizeDir($dir) + { + return rtrim($dir, '/'.\DIRECTORY_SEPARATOR); + } } diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/CustomFilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/CustomFilterIterator.php index b43b88d9..031bc157 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/CustomFilterIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/CustomFilterIterator.php @@ -19,13 +19,11 @@ namespace Symfony\Component\Finder\Iterator; * * @author Fabien Potencier */ -class CustomFilterIterator extends FilterIterator +class CustomFilterIterator extends \FilterIterator { private $filters = array(); /** - * Constructor. - * * @param \Iterator $iterator The Iterator to filter * @param callable[] $filters An array of PHP callbacks * diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php index 0f2d48f3..c08e0a16 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php @@ -18,13 +18,11 @@ use Symfony\Component\Finder\Comparator\DateComparator; * * @author Fabien Potencier */ -class DateRangeFilterIterator extends FilterIterator +class DateRangeFilterIterator extends \FilterIterator { private $comparators = array(); /** - * Constructor. - * * @param \Iterator $iterator The Iterator to filter * @param DateComparator[] $comparators An array of DateComparator instances */ diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php index f78c71ed..436a66d8 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/DepthRangeFilterIterator.php @@ -16,18 +16,16 @@ namespace Symfony\Component\Finder\Iterator; * * @author Fabien Potencier */ -class DepthRangeFilterIterator extends FilterIterator +class DepthRangeFilterIterator extends \FilterIterator { private $minDepth = 0; /** - * Constructor. - * * @param \RecursiveIteratorIterator $iterator The Iterator to filter * @param int $minDepth The min depth * @param int $maxDepth The max depth */ - public function __construct(\RecursiveIteratorIterator $iterator, $minDepth = 0, $maxDepth = PHP_INT_MAX) + public function __construct(\RecursiveIteratorIterator $iterator, int $minDepth = 0, int $maxDepth = PHP_INT_MAX) { $this->minDepth = $minDepth; $iterator->setMaxDepth(PHP_INT_MAX === $maxDepth ? -1 : $maxDepth); diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php index 3f5a5dfe..d2d41f4a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Finder\Iterator; * * @author Fabien Potencier */ -class ExcludeDirectoryFilterIterator extends FilterIterator implements \RecursiveIterator +class ExcludeDirectoryFilterIterator extends \FilterIterator implements \RecursiveIterator { private $iterator; private $isRecursive; @@ -24,8 +24,6 @@ class ExcludeDirectoryFilterIterator extends FilterIterator implements \Recursiv private $excludedPattern; /** - * Constructor. - * * @param \Iterator $iterator The Iterator to filter * @param array $directories An array of directories to exclude */ diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php index f50fd82c..a4c4eec7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Finder\Iterator; * * @author Fabien Potencier */ -class FileTypeFilterIterator extends FilterIterator +class FileTypeFilterIterator extends \FilterIterator { const ONLY_FILES = 1; const ONLY_DIRECTORIES = 2; @@ -24,12 +24,10 @@ class FileTypeFilterIterator extends FilterIterator private $mode; /** - * Constructor. - * * @param \Iterator $iterator The Iterator to filter * @param int $mode The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES) */ - public function __construct(\Iterator $iterator, $mode) + public function __construct(\Iterator $iterator, int $mode) { $this->mode = $mode; diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FilterIterator.php deleted file mode 100644 index acb98361..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/FilterIterator.php +++ /dev/null @@ -1,58 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Iterator; - -/** - * This iterator just overrides the rewind method in order to correct a PHP bug, - * which existed before version 5.5.23/5.6.7. - * - * @see https://bugs.php.net/68557 - * - * @author Alex Bogomazov - */ -abstract class FilterIterator extends \FilterIterator -{ - /** - * This is a workaround for the problem with \FilterIterator leaving inner \FilesystemIterator in wrong state after - * rewind in some cases. - * - * @see FilterIterator::rewind() - */ - public function rewind() - { - if (\PHP_VERSION_ID > 50607 || (\PHP_VERSION_ID > 50523 && \PHP_VERSION_ID < 50600)) { - parent::rewind(); - - return; - } - - $iterator = $this; - while ($iterator instanceof \OuterIterator) { - $innerIterator = $iterator->getInnerIterator(); - - if ($innerIterator instanceof RecursiveDirectoryIterator) { - // this condition is necessary for iterators to work properly with non-local filesystems like ftp - if ($innerIterator->isRewindable()) { - $innerIterator->next(); - $innerIterator->rewind(); - } - } elseif ($innerIterator instanceof \FilesystemIterator) { - $innerIterator->next(); - $innerIterator->rewind(); - } - - $iterator = $innerIterator; - } - - parent::rewind(); - } -} diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php index 162dc141..b94e1d43 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php @@ -16,14 +16,12 @@ namespace Symfony\Component\Finder\Iterator; * * @author Fabien Potencier */ -abstract class MultiplePcreFilterIterator extends FilterIterator +abstract class MultiplePcreFilterIterator extends \FilterIterator { protected $matchRegexps = array(); protected $noMatchRegexps = array(); /** - * Constructor. - * * @param \Iterator $iterator The Iterator to filter * @param array $matchPatterns An array of patterns that need to match * @param array $noMatchPatterns An array of patterns that need to not match diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php index 31178a83..acd5a376 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php @@ -37,15 +37,9 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator private $directorySeparator = '/'; /** - * Constructor. - * - * @param string $path - * @param int $flags - * @param bool $ignoreUnreadableDirs - * * @throws \RuntimeException */ - public function __construct($path, $flags, $ignoreUnreadableDirs = false) + public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false) { if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) { throw new \RuntimeException('This iterator only support returning current as fileinfo.'); @@ -118,11 +112,6 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator return; } - // @see https://bugs.php.net/68557 - if (\PHP_VERSION_ID < 50523 || \PHP_VERSION_ID >= 50600 && \PHP_VERSION_ID < 50607) { - parent::next(); - } - parent::rewind(); } @@ -137,11 +126,6 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator return $this->rewindable; } - // workaround for an HHVM bug, should be removed when https://github.com/facebook/hhvm/issues/7281 is fixed - if ('' === $this->getPath()) { - return $this->rewindable = false; - } - if (false !== $stream = @opendir($this->getPath())) { $infos = stream_get_meta_data($stream); closedir($stream); diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php index 3d3140a6..a68666b4 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php @@ -18,13 +18,11 @@ use Symfony\Component\Finder\Comparator\NumberComparator; * * @author Fabien Potencier */ -class SizeRangeFilterIterator extends FilterIterator +class SizeRangeFilterIterator extends \FilterIterator { private $comparators = array(); /** - * Constructor. - * * @param \Iterator $iterator The Iterator to filter * @param NumberComparator[] $comparators An array of NumberComparator instances */ diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SortableIterator.php b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SortableIterator.php index f1134c00..c2f54b93 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SortableIterator.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Iterator/SortableIterator.php @@ -28,8 +28,6 @@ class SortableIterator implements \IteratorAggregate private $sort; /** - * Constructor. - * * @param \Traversable $iterator The Iterator to filter * @param int|callable $sort The sort type (SORT_BY_NAME, SORT_BY_TYPE, or a PHP callback) * diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/LICENSE b/wp-content/themes/physioassist/vendor/symfony/finder/LICENSE index 17d16a13..21d7fb9e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/LICENSE +++ b/wp-content/themes/physioassist/vendor/symfony/finder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/SplFileInfo.php b/wp-content/themes/physioassist/vendor/symfony/finder/SplFileInfo.php index 31a3f86a..6516113a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/SplFileInfo.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/SplFileInfo.php @@ -22,13 +22,11 @@ class SplFileInfo extends \SplFileInfo private $relativePathname; /** - * Constructor. - * * @param string $file The file name * @param string $relativePath The relative path * @param string $relativePathname The relative path name */ - public function __construct($file, $relativePath, $relativePathname) + public function __construct(string $file, string $relativePath, string $relativePathname) { parent::__construct($file); $this->relativePath = $relativePath; diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/FinderTest.php b/wp-content/themes/physioassist/vendor/symfony/finder/Tests/FinderTest.php index f4050d1f..c7908fa8 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/FinderTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Tests/FinderTest.php @@ -46,6 +46,45 @@ class FinderTest extends Iterator\RealIteratorTestCase $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')), $finder->in(self::$tmpDir)->getIterator()); } + public function testRemoveTrailingSlash() + { + $finder = $this->buildFinder(); + + $expected = $this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py', 'foo bar')); + $in = self::$tmpDir.'//'; + + $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); + } + + public function testSymlinksNotResolved() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('symlinks are not supported on Windows'); + } + + $finder = $this->buildFinder(); + + symlink($this->toAbsolute('foo'), $this->toAbsolute('baz')); + $expected = $this->toAbsolute(array('baz/bar.tmp')); + $in = self::$tmpDir.'/baz/'; + try { + $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); + unlink($this->toAbsolute('baz')); + } catch (\Exception $e) { + unlink($this->toAbsolute('baz')); + throw $e; + } + } + + public function testBackPathNotNormalized() + { + $finder = $this->buildFinder(); + + $expected = $this->toAbsolute(array('foo/../foo/bar.tmp')); + $in = self::$tmpDir.'/foo/../foo/'; + $this->assertIterator($expected, $finder->in($in)->files()->getIterator()); + } + public function testDepth() { $finder = $this->buildFinder(); @@ -261,7 +300,7 @@ class FinderTest extends Iterator\RealIteratorTestCase public function testInWithGlob() { $finder = $this->buildFinder(); - $finder->in(array(__DIR__.'/Fixtures/*/B/C', __DIR__.'/Fixtures/*/*/B/C'))->getIterator(); + $finder->in(array(__DIR__.'/Fixtures/*/B/C/', __DIR__.'/Fixtures/*/*/B/C/'))->getIterator(); $this->assertIterator($this->toAbsoluteFixtures(array('A/B/C/abc.dat', 'copy/A/B/C/abc.dat.copy')), $finder); } @@ -424,6 +463,20 @@ class FinderTest extends Iterator\RealIteratorTestCase count($finder); } + public function testHasResults() + { + $finder = $this->buildFinder(); + $finder->in(__DIR__); + $this->assertTrue($finder->hasResults()); + } + + public function testNoResults() + { + $finder = $this->buildFinder(); + $finder->in(__DIR__)->name('DoesNotExist'); + $this->assertFalse($finder->hasResults()); + } + /** * @dataProvider getContainsTestData */ diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/FilterIteratorTest.php b/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/FilterIteratorTest.php deleted file mode 100644 index 4f12d142..00000000 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/FilterIteratorTest.php +++ /dev/null @@ -1,51 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Finder\Tests\Iterator; - -/** - * @author Alex Bogomazov - */ -class FilterIteratorTest extends RealIteratorTestCase -{ - public function testFilterFilesystemIterators() - { - $i = new \FilesystemIterator($this->toAbsolute()); - - // it is expected that there are test.py test.php in the tmpDir - $i = $this->getMockForAbstractClass('Symfony\Component\Finder\Iterator\FilterIterator', array($i)); - $i->expects($this->any()) - ->method('accept') - ->will($this->returnCallback(function () use ($i) { - return (bool) preg_match('/\.php/', (string) $i->current()); - }) - ); - - $c = 0; - foreach ($i as $item) { - ++$c; - } - - $this->assertEquals(1, $c); - - $i->rewind(); - - $c = 0; - foreach ($i as $item) { - ++$c; - } - - // This would fail in php older than 5.5.23/5.6.7 with \FilterIterator - // but works with Symfony\Component\Finder\Iterator\FilterIterator - // see https://bugs.php.net/68557 - $this->assertEquals(1, $c); - } -} diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php b/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php index d03a9ac7..cfe31c90 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php @@ -13,9 +13,9 @@ namespace Symfony\Component\Finder\Tests\Iterator; class MockSplFileInfo extends \SplFileInfo { - const TYPE_DIRECTORY = 1; - const TYPE_FILE = 2; - const TYPE_UNKNOWN = 3; + const TYPE_DIRECTORY = 1; + const TYPE_FILE = 2; + const TYPE_UNKNOWN = 3; private $contents = null; private $mode = null; diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php b/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php index 4750f250..444654a2 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/finder/Tests/Iterator/SortableIteratorTest.php @@ -58,9 +58,9 @@ class SortableIteratorTest extends RealIteratorTestCase $iterator = new SortableIterator($inner, $mode); - if ($mode === SortableIterator::SORT_BY_ACCESSED_TIME - || $mode === SortableIterator::SORT_BY_CHANGED_TIME - || $mode === SortableIterator::SORT_BY_MODIFIED_TIME + if (SortableIterator::SORT_BY_ACCESSED_TIME === $mode + || SortableIterator::SORT_BY_CHANGED_TIME === $mode + || SortableIterator::SORT_BY_MODIFIED_TIME === $mode ) { if ('\\' === DIRECTORY_SEPARATOR && SortableIterator::SORT_BY_MODIFIED_TIME !== $mode) { $this->markTestSkipped('Sorting by atime or ctime is not supported on Windows'); diff --git a/wp-content/themes/physioassist/vendor/symfony/finder/composer.json b/wp-content/themes/physioassist/vendor/symfony/finder/composer.json index b57dd8bc..906e1a68 100644 --- a/wp-content/themes/physioassist/vendor/symfony/finder/composer.json +++ b/wp-content/themes/physioassist/vendor/symfony/finder/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9" + "php": "^7.1.3" }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" }, @@ -27,7 +27,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/LICENSE b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/LICENSE index 39fa189d..24fa32c2 100644 --- a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/LICENSE +++ b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2016 Fabien Potencier +Copyright (c) 2015-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/Mbstring.php b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/Mbstring.php index 97e8c9b4..4bd326e5 100644 --- a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/Mbstring.php +++ b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/Mbstring.php @@ -20,7 +20,10 @@ namespace Symfony\Polyfill\Mbstring; * - mb_convert_variables - Convert character code in variable(s) * - mb_decode_mimeheader - Decode string in MIME header field * - mb_encode_mimeheader - Encode string for MIME header XXX NATIVE IMPLEMENTATION IS REALLY BUGGED + * - mb_decode_numericentity - Decode HTML numeric string reference to character + * - mb_encode_numericentity - Encode character to HTML numeric string reference * - mb_convert_case - Perform case folding on a string + * - mb_detect_encoding - Detect character encoding * - mb_get_info - Get internal settings of mbstring * - mb_http_input - Detect HTTP input character encoding * - mb_http_output - Set/Get HTTP output character encoding @@ -47,8 +50,6 @@ namespace Symfony\Polyfill\Mbstring; * * Not implemented: * - mb_convert_kana - Convert "kana" one from another ("zen-kaku", "han-kaku" and more) - * - mb_decode_numericentity - Decode HTML numeric string reference to character - * - mb_encode_numericentity - Encode character to HTML numeric string reference * - mb_ereg_* - Regular expression with multibyte support * - mb_parse_str - Parse GET/POST/COOKIE data and set global variable * - mb_preferred_mime_name - Get MIME charset string @@ -77,7 +78,7 @@ final class Mbstring public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null) { - if (is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { + if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) { $fromEncoding = self::mb_detect_encoding($s, $fromEncoding); } else { $fromEncoding = self::getEncoding($fromEncoding); @@ -137,9 +138,134 @@ final class Mbstring trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING); } + public static function mb_decode_numericentity($s, $convmap, $encoding = null) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_decode_numericentity() expects parameter 1 to be string, '.gettype($s).' given', E_USER_WARNING); + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_decode_numericentity() expects parameter 3 to be string, '.gettype($s).' given', E_USER_WARNING); + return ''; // Instead of null (cf. mb_encode_numericentity). + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + $cnt = floor(\count($convmap) / 4) * 4; + + for ($i = 0; $i < $cnt; $i += 4) { + // collector_decode_htmlnumericentity ignores $convmap[$i + 3] + $convmap[$i] += $convmap[$i + 2]; + $convmap[$i + 1] += $convmap[$i + 2]; + } + + $s = preg_replace_callback('/&#(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use ($cnt, $convmap) { + $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1]; + for ($i = 0; $i < $cnt; $i += 4) { + if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) { + return Mbstring::mb_chr($c - $convmap[$i + 2]); + } + } + return $m[0]; + }, $s); + + if (null === $encoding) { + return $s; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $s); + } + + public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false) + { + if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) { + trigger_error('mb_encode_numericentity() expects parameter 1 to be string, '.gettype($s).' given', E_USER_WARNING); + return null; + } + + if (!\is_array($convmap) || !$convmap) { + return false; + } + + if (null !== $encoding && !\is_scalar($encoding)) { + trigger_error('mb_encode_numericentity() expects parameter 3 to be string, '.gettype($s).' given', E_USER_WARNING); + return null; // Instead of '' (cf. mb_decode_numericentity). + } + + if (null !== $is_hex && !\is_scalar($is_hex)) { + trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, '.gettype($s).' given', E_USER_WARNING); + return null; + } + + $s = (string) $s; + if ('' === $s) { + return ''; + } + + $encoding = self::getEncoding($encoding); + + if ('UTF-8' === $encoding) { + $encoding = null; + if (!preg_match('//u', $s)) { + $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s); + } + } else { + $s = iconv($encoding, 'UTF-8//IGNORE', $s); + } + + static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); + + $cnt = floor(\count($convmap) / 4) * 4; + $i = 0; + $len = \strlen($s); + $result = ''; + + while ($i < $len) { + $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; + $uchr = substr($s, $i, $ulen); + $i += $ulen; + $c = self::mb_ord($uchr); + + for ($j = 0; $j < $cnt; $j += 4) { + if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) { + $cOffset = ($c + $convmap[$j + 2]) & $convmap[$j + 3]; + $result .= $is_hex ? sprintf('&#x%X;', $cOffset) : '&#'.$cOffset.';'; + continue 2; + } + } + $result .= $uchr; + } + + if (null === $encoding) { + return $result; + } + + return iconv('UTF-8', $encoding.'//IGNORE', $result); + } + public static function mb_convert_case($s, $mode, $encoding = null) { - if ('' === $s .= '') { + $s = (string) $s; + if ('' === $s) { return ''; } @@ -179,7 +305,7 @@ final class Mbstring static $ulenMask = array("\xC0" => 2, "\xD0" => 2, "\xE0" => 3, "\xF0" => 4); $i = 0; - $len = strlen($s); + $len = \strlen($s); while ($i < $len) { $ulen = $s[$i] < "\x80" ? 1 : $ulenMask[$s[$i] & "\xF0"]; @@ -188,7 +314,7 @@ final class Mbstring if (isset($map[$uchr])) { $uchr = $map[$uchr]; - $nlen = strlen($uchr); + $nlen = \strlen($uchr); if ($nlen == $ulen) { $nlen = $i; @@ -278,7 +404,7 @@ final class Mbstring if (null === $encodingList) { $encodingList = self::$encodingList; } else { - if (!is_array($encodingList)) { + if (!\is_array($encodingList)) { $encodingList = array_map('trim', explode(',', $encodingList)); } $encodingList = array_map('strtoupper', $encodingList); @@ -315,7 +441,7 @@ final class Mbstring return self::$encodingList; } - if (!is_array($encodingList)) { + if (!\is_array($encodingList)) { $encodingList = array_map('trim', explode(',', $encodingList)); } $encodingList = array_map('strtoupper', $encodingList); @@ -341,7 +467,7 @@ final class Mbstring { $encoding = self::getEncoding($encoding); if ('CP850' === $encoding || 'ASCII' === $encoding) { - return strlen($s); + return \strlen($s); } return @iconv_strlen($s, $encoding); @@ -354,7 +480,8 @@ final class Mbstring return strpos($haystack, $needle, $offset); } - if ('' === $needle .= '') { + $needle = (string) $needle; + if ('' === $needle) { trigger_error(__METHOD__.': Empty delimiter', E_USER_WARNING); return false; @@ -428,7 +555,7 @@ final class Mbstring } } - return iconv_substr($s, $start, $length, $encoding).''; + return (string) iconv_substr($s, $start, $length, $encoding); } public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null) @@ -552,13 +679,13 @@ final class Mbstring public static function mb_chr($code, $encoding = null) { if (0x80 > $code %= 0x200000) { - $s = chr($code); + $s = \chr($code); } elseif (0x800 > $code) { - $s = chr(0xC0 | $code >> 6).chr(0x80 | $code & 0x3F); + $s = \chr(0xC0 | $code >> 6).\chr(0x80 | $code & 0x3F); } elseif (0x10000 > $code) { - $s = chr(0xE0 | $code >> 12).chr(0x80 | $code >> 6 & 0x3F).chr(0x80 | $code & 0x3F); + $s = \chr(0xE0 | $code >> 12).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); } else { - $s = chr(0xF0 | $code >> 18).chr(0x80 | $code >> 12 & 0x3F).chr(0x80 | $code >> 6 & 0x3F).chr(0x80 | $code & 0x3F); + $s = \chr(0xF0 | $code >> 18).\chr(0x80 | $code >> 12 & 0x3F).\chr(0x80 | $code >> 6 & 0x3F).\chr(0x80 | $code & 0x3F); } if ('UTF-8' !== $encoding = self::getEncoding($encoding)) { @@ -600,7 +727,7 @@ final class Mbstring return self::mb_substr($haystack, $pos, null, $encoding); } - private static function html_encoding_callback($m) + private static function html_encoding_callback(array $m) { $i = 1; $entities = ''; @@ -608,7 +735,7 @@ final class Mbstring while (isset($m[$i])) { if (0x80 > $m[$i]) { - $entities .= chr($m[$i++]); + $entities .= \chr($m[$i++]); continue; } if (0xF0 <= $m[$i]) { @@ -625,12 +752,12 @@ final class Mbstring return $entities; } - private static function title_case_lower($s) + private static function title_case_lower(array $s) { return self::mb_convert_case($s[0], MB_CASE_LOWER, 'UTF-8'); } - private static function title_case_upper($s) + private static function title_case_upper(array $s) { return self::mb_convert_case($s[0], MB_CASE_UPPER, 'UTF-8'); } diff --git a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/bootstrap.php b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/bootstrap.php index 33722910..2fdcc5a6 100644 --- a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/bootstrap.php +++ b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/bootstrap.php @@ -19,6 +19,8 @@ if (!function_exists('mb_strlen')) { function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } + function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } + function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } diff --git a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/composer.json b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/composer.json index e184b210..49b720dd 100644 --- a/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/composer.json +++ b/wp-content/themes/physioassist/vendor/symfony/polyfill-mbstring/composer.json @@ -28,7 +28,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "1.5-dev" + "dev-master": "1.8-dev" } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/process/CHANGELOG.md b/wp-content/themes/physioassist/vendor/symfony/process/CHANGELOG.md index bb719be7..c5cdb994 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/CHANGELOG.md +++ b/wp-content/themes/physioassist/vendor/symfony/process/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +3.4.0 +----- + + * deprecated the ProcessBuilder class + * deprecated calling `Process::start()` without setting a valid working directory beforehand (via `setWorkingDirectory()` or constructor) + 3.3.0 ----- diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Exception/ProcessTimedOutException.php b/wp-content/themes/physioassist/vendor/symfony/process/Exception/ProcessTimedOutException.php index d4511469..fef4a8ae 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Exception/ProcessTimedOutException.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Exception/ProcessTimedOutException.php @@ -45,12 +45,12 @@ class ProcessTimedOutException extends RuntimeException public function isGeneralTimeout() { - return $this->timeoutType === self::TYPE_GENERAL; + return self::TYPE_GENERAL === $this->timeoutType; } public function isIdleTimeout() { - return $this->timeoutType === self::TYPE_IDLE; + return self::TYPE_IDLE === $this->timeoutType; } public function getExceededTimeout() diff --git a/wp-content/themes/physioassist/vendor/symfony/process/ExecutableFinder.php b/wp-content/themes/physioassist/vendor/symfony/process/ExecutableFinder.php index d8e68962..d042a5b1 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/ExecutableFinder.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/ExecutableFinder.php @@ -23,8 +23,6 @@ class ExecutableFinder /** * Replaces default suffixes of executable. - * - * @param array $suffixes */ public function setSuffixes(array $suffixes) { diff --git a/wp-content/themes/physioassist/vendor/symfony/process/InputStream.php b/wp-content/themes/physioassist/vendor/symfony/process/InputStream.php index 831b1093..9bd917a7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/InputStream.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/InputStream.php @@ -20,6 +20,7 @@ use Symfony\Component\Process\Exception\RuntimeException; */ class InputStream implements \IteratorAggregate { + /** @var null|callable */ private $onEmpty = null; private $input = array(); private $open = true; @@ -35,7 +36,8 @@ class InputStream implements \IteratorAggregate /** * Appends an input to the write buffer. * - * @param resource|scalar|\Traversable|null The input to append as stream resource, scalar or \Traversable + * @param resource|string|int|float|bool|\Traversable|null The input to append as scalar, + * stream resource or \Traversable */ public function write($input) { diff --git a/wp-content/themes/physioassist/vendor/symfony/process/LICENSE b/wp-content/themes/physioassist/vendor/symfony/process/LICENSE index 17d16a13..21d7fb9e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/LICENSE +++ b/wp-content/themes/physioassist/vendor/symfony/process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/themes/physioassist/vendor/symfony/process/PhpExecutableFinder.php b/wp-content/themes/physioassist/vendor/symfony/process/PhpExecutableFinder.php index db31cc1b..c9c113c9 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/PhpExecutableFinder.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/PhpExecutableFinder.php @@ -44,7 +44,7 @@ class PhpExecutableFinder } // PHP_BINARY return the current sapi executable - if (PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg')) && is_file(PHP_BINARY)) { + if (PHP_BINARY && \in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg'), true)) { return PHP_BINARY.$args; } @@ -62,6 +62,10 @@ class PhpExecutableFinder } } + if (is_executable($php = PHP_BINDIR.('\\' === DIRECTORY_SEPARATOR ? '\\php.exe' : '/php'))) { + return $php; + } + $dirs = array(PHP_BINDIR); if ('\\' === DIRECTORY_SEPARATOR) { $dirs[] = 'C:\xampp\php\\'; diff --git a/wp-content/themes/physioassist/vendor/symfony/process/PhpProcess.php b/wp-content/themes/physioassist/vendor/symfony/process/PhpProcess.php index 7afd182f..d3fd384a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/PhpProcess.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/PhpProcess.php @@ -25,8 +25,6 @@ use Symfony\Component\Process\Exception\RuntimeException; class PhpProcess extends Process { /** - * Constructor. - * * @param string $script The PHP script to run (as a string) * @param string|null $cwd The working directory or null to use the working dir of the current PHP process * @param array|null $env The environment variables or null to use the same environment as the current PHP process @@ -49,7 +47,7 @@ class PhpProcess extends Process $script = null; } if (null !== $options) { - @trigger_error(sprintf('The $options parameter of the %s constructor is deprecated since version 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); + @trigger_error(sprintf('The $options parameter of the %s constructor is deprecated since Symfony 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); } parent::__construct($php, $cwd, $env, $script, $timeout, $options); diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Pipes/AbstractPipes.php b/wp-content/themes/physioassist/vendor/symfony/process/Pipes/AbstractPipes.php index 4c67d5b8..2bd1fe75 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Pipes/AbstractPipes.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Pipes/AbstractPipes.php @@ -20,16 +20,15 @@ use Symfony\Component\Process\Exception\InvalidArgumentException; */ abstract class AbstractPipes implements PipesInterface { - /** @var array */ public $pipes = array(); - /** @var string */ private $inputBuffer = ''; - /** @var resource|scalar|\Iterator|null */ private $input; - /** @var bool */ private $blocked = true; + /** + * @param resource|string|int|float|bool|\Iterator|null $input + */ public function __construct($input) { if (is_resource($input) || $input instanceof \Iterator) { @@ -120,7 +119,7 @@ abstract class AbstractPipes implements PipesInterface $w = array($this->pipes[0]); // let's have a look if something changed in streams - if (false === $n = @stream_select($r, $w, $e, 0, 0)) { + if (false === @stream_select($r, $w, $e, 0, 0)) { return; } diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Pipes/UnixPipes.php b/wp-content/themes/physioassist/vendor/symfony/process/Pipes/UnixPipes.php index 3185fe76..78ffee7b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Pipes/UnixPipes.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Pipes/UnixPipes.php @@ -22,11 +22,8 @@ use Symfony\Component\Process\Process; */ class UnixPipes extends AbstractPipes { - /** @var bool */ private $ttyMode; - /** @var bool */ private $ptyMode; - /** @var bool */ private $haveReadSupport; public function __construct($ttyMode, $ptyMode, $input, $haveReadSupport) @@ -102,7 +99,7 @@ class UnixPipes extends AbstractPipes unset($r[0]); // let's have a look if something changed in streams - if (($r || $w) && false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + if (($r || $w) && false === @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { // if a system call has been interrupted, forget about it, let's try again // otherwise, an error occurred, let's reset pipes if (!$this->hasSystemCallBeenInterrupted()) { diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Pipes/WindowsPipes.php b/wp-content/themes/physioassist/vendor/symfony/process/Pipes/WindowsPipes.php index a1e31155..d5fa2fde 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Pipes/WindowsPipes.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Pipes/WindowsPipes.php @@ -26,16 +26,12 @@ use Symfony\Component\Process\Exception\RuntimeException; */ class WindowsPipes extends AbstractPipes { - /** @var array */ private $files = array(); - /** @var array */ private $fileHandles = array(); - /** @var array */ private $readBytes = array( Process::STDOUT => 0, Process::STDERR => 0, ); - /** @var bool */ private $haveReadSupport; public function __construct($input, $haveReadSupport) diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Process.php b/wp-content/themes/physioassist/vendor/symfony/process/Process.php index 05f88d2d..830c623e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Process.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Process.php @@ -87,8 +87,6 @@ class Process implements \IteratorAggregate * Exit codes translation table. * * User-defined errors must use exit codes in the 64-113 range. - * - * @var array */ public static $exitCodes = array( 0 => 'OK', @@ -134,8 +132,6 @@ class Process implements \IteratorAggregate ); /** - * Constructor. - * * @param string|array $commandline The command line to run * @param string|null $cwd The working directory or null to use the working dir of the current PHP process * @param array|null $env The environment variables or null to use the same environment as the current PHP process @@ -171,7 +167,7 @@ class Process implements \IteratorAggregate $this->pty = false; $this->enhanceSigchildCompatibility = '\\' !== DIRECTORY_SEPARATOR && $this->isSigchildEnabled(); if (null !== $options) { - @trigger_error(sprintf('The $options parameter of the %s constructor is deprecated since version 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); + @trigger_error(sprintf('The $options parameter of the %s constructor is deprecated since Symfony 3.3 and will be removed in 4.0.', __CLASS__), E_USER_DEPRECATED); $this->options = array_replace($this->options, $options); } } @@ -277,7 +273,7 @@ class Process implements \IteratorAggregate if (__CLASS__ !== static::class) { $r = new \ReflectionMethod($this, __FUNCTION__); if (__CLASS__ !== $r->getDeclaringClass()->getName() && (2 > $r->getNumberOfParameters() || 'env' !== $r->getParameters()[0]->name)) { - @trigger_error(sprintf('The %s::start() method expects a second "$env" argument since version 3.3. It will be made mandatory in 4.0.', static::class), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s::start() method expects a second "$env" argument since Symfony 3.3. It will be made mandatory in 4.0.', static::class), E_USER_DEPRECATED); } } $env = null; @@ -308,19 +304,16 @@ class Process implements \IteratorAggregate $inheritEnv = true; } - $envBackup = array(); if (null !== $env && $inheritEnv) { - foreach ($env as $k => $v) { - $envBackup[$k] = getenv($k); - putenv(false === $v || null === $v ? $k : "$k=$v"); - } - $env = null; + $env += $this->getDefaultEnv(); } elseif (null !== $env) { @trigger_error('Not inheriting environment variables is deprecated since Symfony 3.3 and will always happen in 4.0. Set "Process::inheritEnvironmentVariables()" to true instead.', E_USER_DEPRECATED); + } else { + $env = $this->getDefaultEnv(); } if ('\\' === DIRECTORY_SEPARATOR && $this->enhanceWindowsCompatibility) { $this->options['bypass_shell'] = true; - $commandline = $this->prepareWindowsCommandLine($commandline, $envBackup, $env); + $commandline = $this->prepareWindowsCommandLine($commandline, $env); } elseif (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { // last exit code is output on the fourth pipe and caught to work around --enable-sigchild $descriptors[3] = array('pipe', 'w'); @@ -333,13 +326,23 @@ class Process implements \IteratorAggregate // @see : https://bugs.php.net/69442 $ptsWorkaround = fopen(__FILE__, 'r'); } + if (defined('HHVM_VERSION')) { + $envPairs = $env; + } else { + $envPairs = array(); + foreach ($env as $k => $v) { + if (false !== $v) { + $envPairs[] = $k.'='.$v; + } + } + } - $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $env, $this->options); - - foreach ($envBackup as $k => $v) { - putenv(false === $v ? $k : "$k=$v"); + if (!is_dir($this->cwd)) { + @trigger_error('The provided cwd does not exist. Command is currently ran against getcwd(). This behavior is deprecated since Symfony 3.4 and will be removed in 4.0.', E_USER_DEPRECATED); } + $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $envPairs, $this->options); + if (!is_resource($this->process)) { throw new RuntimeException('Unable to launch a new process.'); } @@ -831,7 +834,7 @@ class Process implements \IteratorAggregate */ public function isStarted() { - return $this->status != self::STATUS_READY; + return self::STATUS_READY != $this->status; } /** @@ -843,7 +846,7 @@ class Process implements \IteratorAggregate { $this->updateStatus(false); - return $this->status == self::STATUS_TERMINATED; + return self::STATUS_TERMINATED == $this->status; } /** @@ -1122,7 +1125,7 @@ class Process implements \IteratorAggregate /** * Sets the environment variables. * - * An environment variable value should be a string. + * Each environment variable value should be a string. * If it is an array, the variable is ignored. * If it is false or null, it will be removed when * env vars are otherwise inherited. @@ -1161,7 +1164,7 @@ class Process implements \IteratorAggregate * * This content will be passed to the underlying process standard input. * - * @param resource|scalar|\Traversable|null $input The content + * @param string|int|float|bool|resource|\Traversable|null $input The content * * @return self The current Process instance * @@ -1187,7 +1190,7 @@ class Process implements \IteratorAggregate */ public function getOptions() { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); return $this->options; } @@ -1203,7 +1206,7 @@ class Process implements \IteratorAggregate */ public function setOptions(array $options) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); $this->options = $options; @@ -1221,7 +1224,7 @@ class Process implements \IteratorAggregate */ public function getEnhanceWindowsCompatibility() { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); return $this->enhanceWindowsCompatibility; } @@ -1237,7 +1240,7 @@ class Process implements \IteratorAggregate */ public function setEnhanceWindowsCompatibility($enhance) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Enhanced Windows compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); $this->enhanceWindowsCompatibility = (bool) $enhance; @@ -1253,7 +1256,7 @@ class Process implements \IteratorAggregate */ public function getEnhanceSigchildCompatibility() { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); return $this->enhanceSigchildCompatibility; } @@ -1273,7 +1276,7 @@ class Process implements \IteratorAggregate */ public function setEnhanceSigchildCompatibility($enhance) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Sigchild compatibility will always be enabled.', __METHOD__), E_USER_DEPRECATED); $this->enhanceSigchildCompatibility = (bool) $enhance; @@ -1307,7 +1310,7 @@ class Process implements \IteratorAggregate */ public function areEnvironmentVariablesInherited() { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Environment variables will always be inherited.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Environment variables will always be inherited.', __METHOD__), E_USER_DEPRECATED); return $this->inheritEnv; } @@ -1322,7 +1325,7 @@ class Process implements \IteratorAggregate */ public function checkTimeout() { - if ($this->status !== self::STATUS_STARTED) { + if (self::STATUS_STARTED !== $this->status) { return; } @@ -1513,7 +1516,7 @@ class Process implements \IteratorAggregate $callback = $this->callback; foreach ($result as $type => $data) { if (3 !== $type) { - $callback($type === self::STDOUT ? self::OUT : self::ERR, $data); + $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data); } elseif (!isset($this->fallbackStatus['signaled'])) { $this->fallbackStatus['exitcode'] = (int) $data; } @@ -1627,7 +1630,7 @@ class Process implements \IteratorAggregate return true; } - private function prepareWindowsCommandLine($cmd, array &$envBackup, array &$env = null) + private function prepareWindowsCommandLine($cmd, array &$env) { $uid = uniqid('', true); $varCount = 0; @@ -1640,7 +1643,7 @@ class Process implements \IteratorAggregate [^"%!^]*+ )++ ) | [^"]*+ )"/x', - function ($m) use (&$envBackup, &$env, &$varCache, &$varCount, $uid) { + function ($m) use (&$env, &$varCache, &$varCount, $uid) { if (!isset($m[1])) { return $m[0]; } @@ -1658,13 +1661,7 @@ class Process implements \IteratorAggregate $value = '"'.preg_replace('/(\\\\*)"/', '$1$1\\"', $value).'"'; $var = $uid.++$varCount; - if (null === $env) { - putenv("$var=$value"); - } else { - $env[$var] = $value; - } - - $envBackup[$var] = false; + $env[$var] = $value; return $varCache[$m[0]] = '!'.$var.'!'; }, @@ -1684,7 +1681,7 @@ class Process implements \IteratorAggregate * * @param string $functionName The function name that was called * - * @throws LogicException If the process has not run. + * @throws LogicException if the process has not run */ private function requireProcessIsStarted($functionName) { @@ -1698,7 +1695,7 @@ class Process implements \IteratorAggregate * * @param string $functionName The function name that was called * - * @throws LogicException If the process is not yet terminated. + * @throws LogicException if the process is not yet terminated */ private function requireProcessIsTerminated($functionName) { @@ -1732,4 +1729,23 @@ class Process implements \IteratorAggregate return '"'.str_replace(array('"', '^', '%', '!', "\n"), array('""', '"^^"', '"^%"', '"^!"', '!LF!'), $argument).'"'; } + + private function getDefaultEnv() + { + $env = array(); + + foreach ($_SERVER as $k => $v) { + if (is_string($v) && false !== $v = getenv($k)) { + $env[$k] = $v; + } + } + + foreach ($_ENV as $k => $v) { + if (is_string($v)) { + $env[$k] = $v; + } + } + + return $env; + } } diff --git a/wp-content/themes/physioassist/vendor/symfony/process/ProcessBuilder.php b/wp-content/themes/physioassist/vendor/symfony/process/ProcessBuilder.php index 36db35ed..a91147cb 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/ProcessBuilder.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/ProcessBuilder.php @@ -11,13 +11,15 @@ namespace Symfony\Component\Process; +@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the Process class instead.', ProcessBuilder::class), E_USER_DEPRECATED); + use Symfony\Component\Process\Exception\InvalidArgumentException; use Symfony\Component\Process\Exception\LogicException; /** - * Process builder. - * * @author Kris Wallsmith + * + * @deprecated since version 3.4, to be removed in 4.0. Use the Process class instead. */ class ProcessBuilder { @@ -32,8 +34,6 @@ class ProcessBuilder private $outputDisabled = false; /** - * Constructor. - * * @param string[] $arguments An array of arguments */ public function __construct(array $arguments = array()) @@ -120,13 +120,9 @@ class ProcessBuilder * @param bool $inheritEnv * * @return $this - * - * @deprecated since version 3.3, to be removed in 4.0. */ public function inheritEnvironmentVariables($inheritEnv = true) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); - $this->inheritEnv = $inheritEnv; return $this; @@ -171,7 +167,7 @@ class ProcessBuilder /** * Sets the input of the process. * - * @param resource|scalar|\Traversable|null $input The input content + * @param resource|string|int|float|bool|\Traversable|null $input The input content * * @return $this * @@ -221,13 +217,9 @@ class ProcessBuilder * @param string $value The option value * * @return $this - * - * @deprecated since version 3.3, to be removed in 4.0. */ public function setOption($name, $value) { - @trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED); - $this->options[$name] = $value; return $this; diff --git a/wp-content/themes/physioassist/vendor/symfony/process/ProcessUtils.php b/wp-content/themes/physioassist/vendor/symfony/process/ProcessUtils.php index 24438d98..c30950c1 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/ProcessUtils.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/ProcessUtils.php @@ -40,7 +40,7 @@ class ProcessUtils */ public static function escapeArgument($argument) { - @trigger_error('The '.__METHOD__.'() method is deprecated since version 3.3 and will be removed in 4.0. Use a command line array or give env vars to the Process::start/run() method instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.'() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use a command line array or give env vars to the Process::start/run() method instead.', E_USER_DEPRECATED); //Fix for PHP bug #43784 escapeshellarg removes % from given string //Fix for PHP bug #49446 escapeshellarg doesn't work on Windows diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Tests/PhpProcessTest.php b/wp-content/themes/physioassist/vendor/symfony/process/Tests/PhpProcessTest.php index 988cd091..f67368c7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Tests/PhpProcessTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Tests/PhpProcessTest.php @@ -43,6 +43,6 @@ PHP $process->wait(); $this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait'); - $this->assertSame(phpversion().PHP_SAPI, $process->getOutput()); + $this->assertSame(PHP_VERSION.PHP_SAPI, $process->getOutput()); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessBuilderTest.php b/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessBuilderTest.php index fa7c8c51..36c40bf0 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessBuilderTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessBuilderTest.php @@ -14,11 +14,11 @@ namespace Symfony\Component\Process\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Process\ProcessBuilder; +/** + * @group legacy + */ class ProcessBuilderTest extends TestCase { - /** - * @group legacy - */ public function testInheritEnvironmentVars() { $proc = ProcessBuilder::create() diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php b/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php index 5f739158..25712af7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessFailedExceptionTest.php @@ -29,10 +29,12 @@ class ProcessFailedExceptionTest extends TestCase ->method('isSuccessful') ->will($this->returnValue(true)); - $this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}( - '\InvalidArgumentException', - 'Expected a failed process, but the given process was successful.' - ); + if (method_exists($this, 'expectException')) { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Expected a failed process, but the given process was successful.'); + } else { + $this->setExpectedException(\InvalidArgumentException::class, 'Expected a failed process, but the given process was successful.'); + } new ProcessFailedException($process); } diff --git a/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessTest.php b/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessTest.php index 26725711..bca7ddd9 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/process/Tests/ProcessTest.php @@ -48,6 +48,24 @@ class ProcessTest extends TestCase } } + /** + * @group legacy + * @expectedDeprecation The provided cwd does not exist. Command is currently ran against getcwd(). This behavior is deprecated since Symfony 3.4 and will be removed in 4.0. + */ + public function testInvalidCwd() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('False-positive on Windows/appveyor.'); + } + + // Check that it works fine if the CWD exists + $cmd = new Process('echo test', __DIR__); + $cmd->run(); + + $cmd = new Process('echo test', __DIR__.'/notfound/'); + $cmd->run(); + } + public function testThatProcessDoesNotThrowWarningDuringRun() { if ('\\' === DIRECTORY_SEPARATOR) { @@ -313,7 +331,7 @@ class ProcessTest extends TestCase $called = false; $p->run(function ($type, $buffer) use (&$called) { - $called = $buffer === 'foo'; + $called = 'foo' === $buffer; }); $this->assertTrue($called, 'The callback should be executed with the output'); @@ -326,7 +344,7 @@ class ProcessTest extends TestCase $called = false; $p->run(function ($type, $buffer) use (&$called) { - $called = $buffer === 'foo'; + $called = 'foo' === $buffer; }); $this->assertTrue($called, 'The callback should be executed with the output'); @@ -557,7 +575,7 @@ class ProcessTest extends TestCase { $process = $this->getProcess('echo foo'); $process->run(); - $this->assertTrue(strlen($process->getOutput()) > 0); + $this->assertGreaterThan(0, strlen($process->getOutput())); } public function testGetExitCodeIsNullOnStart() @@ -1225,7 +1243,7 @@ class ProcessTest extends TestCase { $input = new InputStream(); - $process = $this->getProcessForCode('echo \'ping\'; stream_copy_to_stream(STDIN, STDOUT);'); + $process = $this->getProcessForCode('echo \'ping\'; echo fread(STDIN, 4); echo fread(STDIN, 4);'); $process->setInput($input); $process->start(function ($type, $data) use ($input) { @@ -1406,6 +1424,7 @@ class ProcessTest extends TestCase public function testEnvBackupDoesNotDeleteExistingVars() { putenv('existing_var=foo'); + $_ENV['existing_var'] = 'foo'; $process = $this->getProcess('php -r "echo getenv(\'new_test_var\');"'); $process->setEnv(array('existing_var' => 'bar', 'new_test_var' => 'foo')); $process->inheritEnvironmentVariables(); @@ -1415,20 +1434,27 @@ class ProcessTest extends TestCase $this->assertSame('foo', $process->getOutput()); $this->assertSame('foo', getenv('existing_var')); $this->assertFalse(getenv('new_test_var')); + + putenv('existing_var'); + unset($_ENV['existing_var']); } public function testEnvIsInherited() { - $process = $this->getProcessForCode('echo serialize($_SERVER);', null, array('BAR' => 'BAZ')); + $process = $this->getProcessForCode('echo serialize($_SERVER);', null, array('BAR' => 'BAZ', 'EMPTY' => '')); putenv('FOO=BAR'); + $_ENV['FOO'] = 'BAR'; $process->run(); - $expected = array('BAR' => 'BAZ', 'FOO' => 'BAR'); + $expected = array('BAR' => 'BAZ', 'EMPTY' => '', 'FOO' => 'BAR'); $env = array_intersect_key(unserialize($process->getOutput()), $expected); $this->assertEquals($expected, $env); + + putenv('FOO'); + unset($_ENV['FOO']); } /** @@ -1439,6 +1465,7 @@ class ProcessTest extends TestCase $process = $this->getProcessForCode('echo serialize($_SERVER);', null, array('BAR' => 'BAZ')); putenv('FOO=BAR'); + $_ENV['FOO'] = 'BAR'; $this->assertSame($process, $process->inheritEnvironmentVariables(false)); $this->assertFalse($process->areEnvironmentVariablesInherited()); @@ -1450,6 +1477,9 @@ class ProcessTest extends TestCase unset($expected['FOO']); $this->assertSame($expected, $env); + + putenv('FOO'); + unset($_ENV['FOO']); } public function testGetCommandLine() @@ -1499,7 +1529,7 @@ Array ) EOTXT; - $this->assertSame($expected, $p->getOutput()); + $this->assertSame($expected, str_replace('Standard input code', '-', $p->getOutput())); } public function provideEscapeArgument() diff --git a/wp-content/themes/physioassist/vendor/symfony/process/composer.json b/wp-content/themes/physioassist/vendor/symfony/process/composer.json index f899c52b..b8867db3 100644 --- a/wp-content/themes/physioassist/vendor/symfony/process/composer.json +++ b/wp-content/themes/physioassist/vendor/symfony/process/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" }, @@ -27,7 +27,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/CHANGELOG.md b/wp-content/themes/physioassist/vendor/symfony/translation/CHANGELOG.md index 349faceb..ff6ce7a3 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/CHANGELOG.md +++ b/wp-content/themes/physioassist/vendor/symfony/translation/CHANGELOG.md @@ -1,6 +1,28 @@ CHANGELOG ========= +4.0.0 +----- + + * removed the backup feature of the `FileDumper` class + * removed `TranslationWriter::writeTranslations()` method + * removed support for passing `MessageSelector` instances to the constructor of the `Translator` class + +3.4.0 +----- + + * Added `TranslationDumperPass` + * Added `TranslationExtractorPass` + * Added `TranslatorPass` + * Added `TranslationReader` and `TranslationReaderInterface` + * Added `` section to the Xliff 2.0 dumper. + * Improved Xliff 2.0 loader to load `` section. + * Added `TranslationWriterInterface` + * Deprecated `TranslationWriter::writeTranslations` in favor of `TranslationWriter::write` + * added support for adding custom message formatter and decoupling the default one. + * Added `PhpExtractor` + * Added `PhpStringTokenParser` + 3.2.0 ----- diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Catalogue/AbstractOperation.php b/wp-content/themes/physioassist/vendor/symfony/translation/Catalogue/AbstractOperation.php index bb501c14..022bad48 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Catalogue/AbstractOperation.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Catalogue/AbstractOperation.php @@ -26,19 +26,8 @@ use Symfony\Component\Translation\Exception\LogicException; */ abstract class AbstractOperation implements OperationInterface { - /** - * @var MessageCatalogueInterface The source catalogue - */ protected $source; - - /** - * @var MessageCatalogueInterface The target catalogue - */ protected $target; - - /** - * @var MessageCatalogue The result catalogue - */ protected $result; /** @@ -71,9 +60,6 @@ abstract class AbstractOperation implements OperationInterface protected $messages; /** - * @param MessageCatalogueInterface $source The source catalogue - * @param MessageCatalogueInterface $target The target catalogue - * * @throws LogicException */ public function __construct(MessageCatalogueInterface $source, MessageCatalogueInterface $target) diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Command/XliffLintCommand.php b/wp-content/themes/physioassist/vendor/symfony/translation/Command/XliffLintCommand.php index 80d8bb25..042ab1ea 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Command/XliffLintCommand.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Command/XliffLintCommand.php @@ -26,12 +26,14 @@ use Symfony\Component\Console\Style\SymfonyStyle; */ class XliffLintCommand extends Command { + protected static $defaultName = 'lint:xliff'; + private $format; private $displayCorrectFiles; private $directoryIteratorProvider; private $isReadableProvider; - public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null) + public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null) { parent::__construct($name); @@ -45,7 +47,6 @@ class XliffLintCommand extends Command protected function configure() { $this - ->setName('lint:xliff') ->setDescription('Lints a XLIFF file and outputs encountered errors') ->addArgument('filename', null, 'A file or a directory or STDIN') ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt') diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/DataCollector/TranslationDataCollector.php b/wp-content/themes/physioassist/vendor/symfony/translation/DataCollector/TranslationDataCollector.php index b99a49f7..5d97a670 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/DataCollector/TranslationDataCollector.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/DataCollector/TranslationDataCollector.php @@ -22,14 +22,8 @@ use Symfony\Component\Translation\DataCollectorTranslator; */ class TranslationDataCollector extends DataCollector implements LateDataCollectorInterface { - /** - * @var DataCollectorTranslator - */ private $translator; - /** - * @param DataCollectorTranslator $translator - */ public function __construct(DataCollectorTranslator $translator) { $this->translator = $translator; @@ -45,6 +39,9 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto $this->data = $this->computeCount($messages); $this->data['messages'] = $messages; + $this->data['locale'] = $this->translator->getLocale(); + $this->data['fallback_locales'] = $this->translator->getFallbackLocales(); + $this->data = $this->cloneVar($this->data); } @@ -55,6 +52,14 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto { } + /** + * {@inheritdoc} + */ + public function reset() + { + $this->data = array(); + } + /** * @return array */ @@ -87,6 +92,16 @@ class TranslationDataCollector extends DataCollector implements LateDataCollecto return isset($this->data[DataCollectorTranslator::MESSAGE_DEFINED]) ? $this->data[DataCollectorTranslator::MESSAGE_DEFINED] : 0; } + public function getLocale() + { + return !empty($this->data['locale']) ? $this->data['locale'] : null; + } + + public function getFallbackLocales() + { + return (isset($this->data['fallback_locales']) && count($this->data['fallback_locales']) > 0) ? $this->data['fallback_locales'] : array(); + } + /** * {@inheritdoc} */ diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/DataCollectorTranslator.php b/wp-content/themes/physioassist/vendor/symfony/translation/DataCollectorTranslator.php index 48b3c473..715c390f 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/DataCollectorTranslator.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/DataCollectorTranslator.php @@ -27,9 +27,6 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter */ private $translator; - /** - * @var array - */ private $messages = array(); /** diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php b/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php new file mode 100644 index 00000000..e620226e --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationDumperPass.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\DependencyInjection; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; + +/** + * Adds tagged translation.formatter services to translation writer. + */ +class TranslationDumperPass implements CompilerPassInterface +{ + private $writerServiceId; + private $dumperTag; + + public function __construct(string $writerServiceId = 'translation.writer', string $dumperTag = 'translation.dumper') + { + $this->writerServiceId = $writerServiceId; + $this->dumperTag = $dumperTag; + } + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition($this->writerServiceId)) { + return; + } + + $definition = $container->getDefinition($this->writerServiceId); + + foreach ($container->findTaggedServiceIds($this->dumperTag, true) as $id => $attributes) { + $definition->addMethodCall('addDumper', array($attributes[0]['alias'], new Reference($id))); + } + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php b/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php new file mode 100644 index 00000000..18c67f68 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslationExtractorPass.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\DependencyInjection; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Exception\RuntimeException; + +/** + * Adds tagged translation.extractor services to translation extractor. + */ +class TranslationExtractorPass implements CompilerPassInterface +{ + private $extractorServiceId; + private $extractorTag; + + public function __construct(string $extractorServiceId = 'translation.extractor', string $extractorTag = 'translation.extractor') + { + $this->extractorServiceId = $extractorServiceId; + $this->extractorTag = $extractorTag; + } + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition($this->extractorServiceId)) { + return; + } + + $definition = $container->getDefinition($this->extractorServiceId); + + foreach ($container->findTaggedServiceIds($this->extractorTag, true) as $id => $attributes) { + if (!isset($attributes[0]['alias'])) { + throw new RuntimeException(sprintf('The alias for the tag "translation.extractor" of service "%s" must be set.', $id)); + } + + $definition->addMethodCall('addExtractor', array($attributes[0]['alias'], new Reference($id))); + } + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslatorPass.php b/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslatorPass.php new file mode 100644 index 00000000..1f7839db --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/DependencyInjection/TranslatorPass.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\DependencyInjection; + +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; +use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; + +class TranslatorPass implements CompilerPassInterface +{ + private $translatorServiceId; + private $readerServiceId; + private $loaderTag; + private $debugCommandServiceId; + private $updateCommandServiceId; + + public function __construct(string $translatorServiceId = 'translator.default', string $readerServiceId = 'translation.reader', string $loaderTag = 'translation.loader', string $debugCommandServiceId = 'console.command.translation_debug', string $updateCommandServiceId = 'console.command.translation_update') + { + $this->translatorServiceId = $translatorServiceId; + $this->readerServiceId = $readerServiceId; + $this->loaderTag = $loaderTag; + $this->debugCommandServiceId = $debugCommandServiceId; + $this->updateCommandServiceId = $updateCommandServiceId; + } + + public function process(ContainerBuilder $container) + { + if (!$container->hasDefinition($this->translatorServiceId)) { + return; + } + + $loaders = array(); + $loaderRefs = array(); + foreach ($container->findTaggedServiceIds($this->loaderTag, true) as $id => $attributes) { + $loaderRefs[$id] = new Reference($id); + $loaders[$id][] = $attributes[0]['alias']; + if (isset($attributes[0]['legacy-alias'])) { + $loaders[$id][] = $attributes[0]['legacy-alias']; + } + } + + if ($container->hasDefinition($this->readerServiceId)) { + $definition = $container->getDefinition($this->readerServiceId); + foreach ($loaders as $id => $formats) { + foreach ($formats as $format) { + $definition->addMethodCall('addLoader', array($format, $loaderRefs[$id])); + } + } + } + + $container + ->findDefinition($this->translatorServiceId) + ->replaceArgument(0, ServiceLocatorTagPass::register($container, $loaderRefs)) + ->replaceArgument(3, $loaders) + ; + + if (!$container->hasParameter('twig.default_path')) { + return; + } + + if ($container->hasDefinition($this->debugCommandServiceId)) { + $container->getDefinition($this->debugCommandServiceId)->replaceArgument(4, $container->getParameter('twig.default_path')); + } + + if ($container->hasDefinition($this->updateCommandServiceId)) { + $container->getDefinition($this->updateCommandServiceId)->replaceArgument(5, $container->getParameter('twig.default_path')); + } + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/CsvFileDumper.php b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/CsvFileDumper.php index fe5dccb4..ebfa831d 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/CsvFileDumper.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/CsvFileDumper.php @@ -44,8 +44,8 @@ class CsvFileDumper extends FileDumper /** * Sets the delimiter and escape character for CSV. * - * @param string $delimiter delimiter character - * @param string $enclosure enclosure character + * @param string $delimiter Delimiter character + * @param string $enclosure Enclosure character */ public function setCsvControl($delimiter = ';', $enclosure = '"') { diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/FileDumper.php b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/FileDumper.php index b2b50cfc..2e047ed7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/FileDumper.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/FileDumper.php @@ -17,7 +17,6 @@ use Symfony\Component\Translation\Exception\RuntimeException; /** * FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s). - * Performs backup of already existing files. * * Options: * - path (mandatory): the directory where the files should be saved @@ -33,13 +32,6 @@ abstract class FileDumper implements DumperInterface */ protected $relativePathTemplate = '%domain%.%locale%.%extension%'; - /** - * Make file backup before the dump. - * - * @var bool - */ - private $backup = true; - /** * Sets the template for the relative paths to files. * @@ -57,7 +49,12 @@ abstract class FileDumper implements DumperInterface */ public function setBackup($backup) { - $this->backup = $backup; + if (false !== $backup) { + throw new \LogicException('The backup feature is no longer supported.'); + } + + // the method is only present to not break BC + // to be deprecated in 4.1 } /** @@ -71,14 +68,8 @@ abstract class FileDumper implements DumperInterface // save a file for each domain foreach ($messages->getDomains() as $domain) { - // backup $fullpath = $options['path'].'/'.$this->getRelativePath($domain, $messages->getLocale()); - if (file_exists($fullpath)) { - if ($this->backup) { - @trigger_error('Creating a backup while dumping a message catalogue is deprecated since version 3.1 and will be removed in 4.0. Use TranslationWriter::disableBackup() to disable the backup.', E_USER_DEPRECATED); - copy($fullpath, $fullpath.'~'); - } - } else { + if (!file_exists($fullpath)) { $directory = dirname($fullpath); if (!file_exists($directory) && !@mkdir($directory, 0777, true)) { throw new RuntimeException(sprintf('Unable to create directory "%s".', $directory)); @@ -109,13 +100,8 @@ abstract class FileDumper implements DumperInterface /** * Gets the relative file path using the template. - * - * @param string $domain The domain - * @param string $locale The locale - * - * @return string The relative file path */ - private function getRelativePath($domain, $locale) + private function getRelativePath(string $domain, string $locale): string { return strtr($this->relativePathTemplate, array( '%domain%' => $domain, diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/JsonFileDumper.php b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/JsonFileDumper.php index 08b538e1..32bdaf51 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/JsonFileDumper.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/JsonFileDumper.php @@ -28,7 +28,7 @@ class JsonFileDumper extends FileDumper if (isset($options['json_encoding'])) { $flags = $options['json_encoding']; } else { - $flags = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; + $flags = JSON_PRETTY_PRINT; } return json_encode($messages->all($domain), $flags); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/XliffFileDumper.php b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/XliffFileDumper.php index 47b05c81..d7e5ecc7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/XliffFileDumper.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/XliffFileDumper.php @@ -85,7 +85,7 @@ class XliffFileDumper extends FileDumper foreach ($messages->all($domain) as $source => $target) { $translation = $dom->createElement('trans-unit'); - $translation->setAttribute('id', md5($source)); + $translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._')); $translation->setAttribute('resname', $source); $s = $translation->appendChild($dom->createElement('source')); @@ -145,7 +145,24 @@ class XliffFileDumper extends FileDumper foreach ($messages->all($domain) as $source => $target) { $translation = $dom->createElement('unit'); - $translation->setAttribute('id', md5($source)); + $translation->setAttribute('id', strtr(substr(base64_encode(hash('sha256', $source, true)), 0, 7), '/+', '._')); + $metadata = $messages->getMetadata($source, $domain); + + // Add notes section + if ($this->hasMetadataArrayInfo('notes', $metadata)) { + $notesElement = $dom->createElement('notes'); + foreach ($metadata['notes'] as $note) { + $n = $dom->createElement('note'); + $n->appendChild($dom->createTextNode(isset($note['content']) ? $note['content'] : '')); + unset($note['content']); + + foreach ($note as $name => $value) { + $n->setAttribute($name, $value); + } + $notesElement->appendChild($n); + } + $translation->appendChild($notesElement); + } $segment = $translation->appendChild($dom->createElement('segment')); @@ -156,7 +173,6 @@ class XliffFileDumper extends FileDumper $text = 1 === preg_match('/[&<>]/', $target) ? $dom->createCDATASection($target) : $dom->createTextNode($target); $targetElement = $dom->createElement('target'); - $metadata = $messages->getMetadata($source, $domain); if ($this->hasMetadataArrayInfo('target-attributes', $metadata)) { foreach ($metadata['target-attributes'] as $name => $value) { $targetElement->setAttribute($name, $value); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/YamlFileDumper.php b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/YamlFileDumper.php index fdd113b1..db9e4b36 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/YamlFileDumper.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Dumper/YamlFileDumper.php @@ -23,6 +23,13 @@ use Symfony\Component\Translation\Exception\LogicException; */ class YamlFileDumper extends FileDumper { + private $extension; + + public function __construct(string $extension = 'yml') + { + $this->extension = $extension; + } + /** * {@inheritdoc} */ @@ -50,6 +57,6 @@ class YamlFileDumper extends FileDumper */ protected function getExtension() { - return 'yml'; + return $this->extension; } } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/AbstractFileExtractor.php b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/AbstractFileExtractor.php index 4b6b155d..40b36451 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/AbstractFileExtractor.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/AbstractFileExtractor.php @@ -21,7 +21,7 @@ use Symfony\Component\Translation\Exception\InvalidArgumentException; abstract class AbstractFileExtractor { /** - * @param string|array $resource files, a file or a directory + * @param string|array $resource Files, a file or a directory * * @return array */ @@ -43,12 +43,7 @@ abstract class AbstractFileExtractor return $files; } - /** - * @param string $file - * - * @return \SplFileInfo - */ - private function toSplFileInfo($file) + private function toSplFileInfo(string $file): \SplFileInfo { return ($file instanceof \SplFileInfo) ? $file : new \SplFileInfo($file); } @@ -77,7 +72,7 @@ abstract class AbstractFileExtractor abstract protected function canBeExtracted($file); /** - * @param string|array $resource files, a file or a directory + * @param string|array $resource Files, a file or a directory * * @return array files to be extracted */ diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/ExtractorInterface.php b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/ExtractorInterface.php index 438f80b3..b4534fae 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/ExtractorInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/ExtractorInterface.php @@ -24,7 +24,7 @@ interface ExtractorInterface /** * Extracts translation messages from files, a file or a directory to the catalogue. * - * @param string|array $resource files, a file or a directory + * @param string|array $resource Files, a file or a directory * @param MessageCatalogue $catalogue The catalogue */ public function extract($resource, MessageCatalogue $catalogue); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpExtractor.php b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpExtractor.php new file mode 100644 index 00000000..f364bdec --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpExtractor.php @@ -0,0 +1,256 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +use Symfony\Component\Finder\Finder; +use Symfony\Component\Translation\MessageCatalogue; + +/** + * PhpExtractor extracts translation messages from a PHP template. + * + * @author Michel Salib + */ +class PhpExtractor extends AbstractFileExtractor implements ExtractorInterface +{ + const MESSAGE_TOKEN = 300; + const METHOD_ARGUMENTS_TOKEN = 1000; + const DOMAIN_TOKEN = 1001; + + /** + * Prefix for new found message. + * + * @var string + */ + private $prefix = ''; + + /** + * The sequence that captures translation messages. + * + * @var array + */ + protected $sequences = array( + array( + '->', + 'trans', + '(', + self::MESSAGE_TOKEN, + ',', + self::METHOD_ARGUMENTS_TOKEN, + ',', + self::DOMAIN_TOKEN, + ), + array( + '->', + 'transChoice', + '(', + self::MESSAGE_TOKEN, + ',', + self::METHOD_ARGUMENTS_TOKEN, + ',', + self::METHOD_ARGUMENTS_TOKEN, + ',', + self::DOMAIN_TOKEN, + ), + array( + '->', + 'trans', + '(', + self::MESSAGE_TOKEN, + ), + array( + '->', + 'transChoice', + '(', + self::MESSAGE_TOKEN, + ), + ); + + /** + * {@inheritdoc} + */ + public function extract($resource, MessageCatalogue $catalog) + { + $files = $this->extractFiles($resource); + foreach ($files as $file) { + $this->parseTokens(token_get_all(file_get_contents($file)), $catalog); + + // PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098 + gc_mem_caches(); + } + } + + /** + * {@inheritdoc} + */ + public function setPrefix($prefix) + { + $this->prefix = $prefix; + } + + /** + * Normalizes a token. + * + * @param mixed $token + * + * @return string + */ + protected function normalizeToken($token) + { + if (isset($token[1]) && 'b"' !== $token) { + return $token[1]; + } + + return $token; + } + + /** + * Seeks to a non-whitespace token. + */ + private function seekToNextRelevantToken(\Iterator $tokenIterator) + { + for (; $tokenIterator->valid(); $tokenIterator->next()) { + $t = $tokenIterator->current(); + if (T_WHITESPACE !== $t[0]) { + break; + } + } + } + + private function skipMethodArgument(\Iterator $tokenIterator) + { + $openBraces = 0; + + for (; $tokenIterator->valid(); $tokenIterator->next()) { + $t = $tokenIterator->current(); + + if ('[' === $t[0] || '(' === $t[0]) { + ++$openBraces; + } + + if (']' === $t[0] || ')' === $t[0]) { + --$openBraces; + } + + if ((0 === $openBraces && ',' === $t[0]) || (-1 === $openBraces && ')' === $t[0])) { + break; + } + } + } + + /** + * Extracts the message from the iterator while the tokens + * match allowed message tokens. + */ + private function getValue(\Iterator $tokenIterator) + { + $message = ''; + $docToken = ''; + + for (; $tokenIterator->valid(); $tokenIterator->next()) { + $t = $tokenIterator->current(); + if (!isset($t[1])) { + break; + } + + switch ($t[0]) { + case T_START_HEREDOC: + $docToken = $t[1]; + break; + case T_ENCAPSED_AND_WHITESPACE: + case T_CONSTANT_ENCAPSED_STRING: + $message .= $t[1]; + break; + case T_END_HEREDOC: + return PhpStringTokenParser::parseDocString($docToken, $message); + default: + break 2; + } + } + + if ($message) { + $message = PhpStringTokenParser::parse($message); + } + + return $message; + } + + /** + * Extracts trans message from PHP tokens. + * + * @param array $tokens + * @param MessageCatalogue $catalog + */ + protected function parseTokens($tokens, MessageCatalogue $catalog) + { + $tokenIterator = new \ArrayIterator($tokens); + + for ($key = 0; $key < $tokenIterator->count(); ++$key) { + foreach ($this->sequences as $sequence) { + $message = ''; + $domain = 'messages'; + $tokenIterator->seek($key); + + foreach ($sequence as $sequenceKey => $item) { + $this->seekToNextRelevantToken($tokenIterator); + + if ($this->normalizeToken($tokenIterator->current()) === $item) { + $tokenIterator->next(); + continue; + } elseif (self::MESSAGE_TOKEN === $item) { + $message = $this->getValue($tokenIterator); + + if (count($sequence) === ($sequenceKey + 1)) { + break; + } + } elseif (self::METHOD_ARGUMENTS_TOKEN === $item) { + $this->skipMethodArgument($tokenIterator); + } elseif (self::DOMAIN_TOKEN === $item) { + $domain = $this->getValue($tokenIterator); + + break; + } else { + break; + } + } + + if ($message) { + $catalog->set($message, $this->prefix.$message, $domain); + break; + } + } + } + } + + /** + * @param string $file + * + * @return bool + * + * @throws \InvalidArgumentException + */ + protected function canBeExtracted($file) + { + return $this->isFile($file) && 'php' === pathinfo($file, PATHINFO_EXTENSION); + } + + /** + * @param string|array $directory + * + * @return array + */ + protected function extractFromDirectory($directory) + { + $finder = new Finder(); + + return $finder->files()->name('*.php')->in($directory); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpStringTokenParser.php b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpStringTokenParser.php new file mode 100644 index 00000000..bab4ce0c --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Extractor/PhpStringTokenParser.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Extractor; + +/* + * The following is derived from code at http://github.com/nikic/PHP-Parser + * + * Copyright (c) 2011 by Nikita Popov + * + * Some rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * + * * The names of the contributors may not be used to endorse or + * promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +class PhpStringTokenParser +{ + protected static $replacements = array( + '\\' => '\\', + '$' => '$', + 'n' => "\n", + 'r' => "\r", + 't' => "\t", + 'f' => "\f", + 'v' => "\v", + 'e' => "\x1B", + ); + + /** + * Parses a string token. + * + * @param string $str String token content + * + * @return string The parsed string + */ + public static function parse($str) + { + $bLength = 0; + if ('b' === $str[0]) { + $bLength = 1; + } + + if ('\'' === $str[$bLength]) { + return str_replace( + array('\\\\', '\\\''), + array('\\', '\''), + substr($str, $bLength + 1, -1) + ); + } else { + return self::parseEscapeSequences(substr($str, $bLength + 1, -1), '"'); + } + } + + /** + * Parses escape sequences in strings (all string types apart from single quoted). + * + * @param string $str String without quotes + * @param null|string $quote Quote type + * + * @return string String with escape sequences parsed + */ + public static function parseEscapeSequences($str, $quote) + { + if (null !== $quote) { + $str = str_replace('\\'.$quote, $quote, $str); + } + + return preg_replace_callback( + '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3})~', + array(__CLASS__, 'parseCallback'), + $str + ); + } + + private static function parseCallback($matches) + { + $str = $matches[1]; + + if (isset(self::$replacements[$str])) { + return self::$replacements[$str]; + } elseif ('x' === $str[0] || 'X' === $str[0]) { + return chr(hexdec($str)); + } else { + return chr(octdec($str)); + } + } + + /** + * Parses a constant doc string. + * + * @param string $startToken Doc string start token content (<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Formatter; + +/** + * @author Abdellatif Ait boudad + */ +interface ChoiceMessageFormatterInterface +{ + /** + * Formats a localized message pattern with given arguments. + * + * @param string $message The message (may also be an object that can be cast to string) + * @param int $number The number to use to find the indice of the message + * @param string $locale The message locale + * @param array $parameters An array of parameters for the message + * + * @return string + */ + public function choiceFormat($message, $number, $locale, array $parameters = array()); +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatter.php b/wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatter.php new file mode 100644 index 00000000..e174be36 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatter.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Formatter; + +use Symfony\Component\Translation\MessageSelector; + +/** + * @author Abdellatif Ait boudad + */ +class MessageFormatter implements MessageFormatterInterface, ChoiceMessageFormatterInterface +{ + private $selector; + + /** + * @param MessageSelector|null $selector The message selector for pluralization + */ + public function __construct(MessageSelector $selector = null) + { + $this->selector = $selector ?: new MessageSelector(); + } + + /** + * {@inheritdoc} + */ + public function format($message, $locale, array $parameters = array()) + { + return strtr($message, $parameters); + } + + /** + * {@inheritdoc} + */ + public function choiceFormat($message, $number, $locale, array $parameters = array()) + { + $parameters = array_merge(array('%count%' => $number), $parameters); + + return $this->format($this->selector->choose($message, (int) $number, $locale), $locale, $parameters); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatterInterface.php b/wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatterInterface.php new file mode 100644 index 00000000..86937fb2 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Formatter/MessageFormatterInterface.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Formatter; + +/** + * @author Guilherme Blanco + * @author Abdellatif Ait boudad + */ +interface MessageFormatterInterface +{ + /** + * Formats a localized message pattern with given arguments. + * + * @param string $message The message (may also be an object that can be cast to string) + * @param string $locale The message locale + * @param array $parameters An array of parameters for the message + * + * @return string + */ + public function format($message, $locale, array $parameters = array()); +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/IdentityTranslator.php b/wp-content/themes/physioassist/vendor/symfony/translation/IdentityTranslator.php index 46a04636..82b24701 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/IdentityTranslator.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/IdentityTranslator.php @@ -22,8 +22,6 @@ class IdentityTranslator implements TranslatorInterface private $locale; /** - * Constructor. - * * @param MessageSelector|null $selector The message selector for pluralization */ public function __construct(MessageSelector $selector = null) diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/LICENSE b/wp-content/themes/physioassist/vendor/symfony/translation/LICENSE index 17d16a13..21d7fb9e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/LICENSE +++ b/wp-content/themes/physioassist/vendor/symfony/translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/CsvFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/CsvFileLoader.php index f1d3443f..e454d169 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/CsvFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/CsvFileLoader.php @@ -52,9 +52,9 @@ class CsvFileLoader extends FileLoader /** * Sets the delimiter, enclosure, and escape character for CSV. * - * @param string $delimiter delimiter character - * @param string $enclosure enclosure character - * @param string $escape escape character + * @param string $delimiter Delimiter character + * @param string $enclosure Enclosure character + * @param string $escape Escape character */ public function setCsvControl($delimiter = ';', $enclosure = '"', $escape = '\\') { diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/FileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/FileLoader.php index 1885963a..322679d2 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/FileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/FileLoader.php @@ -59,7 +59,7 @@ abstract class FileLoader extends ArrayLoader * * @return array * - * @throws InvalidResourceException If stream content has an invalid format. + * @throws InvalidResourceException if stream content has an invalid format */ abstract protected function loadResource($resource); } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuDatFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuDatFileLoader.php index 71ba90a3..822bc362 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuDatFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuDatFileLoader.php @@ -39,7 +39,6 @@ class IcuDatFileLoader extends IcuResFileLoader try { $rb = new \ResourceBundle($locale, $resource); } catch (\Exception $e) { - // HHVM compatibility: constructor throws on invalid resource $rb = null; } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuResFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuResFileLoader.php index 2f8037fb..927cae16 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuResFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/IcuResFileLoader.php @@ -39,7 +39,6 @@ class IcuResFileLoader implements LoaderInterface try { $rb = new \ResourceBundle($locale, $resource); } catch (\Exception $e) { - // HHVM compatibility: constructor throws on invalid resource $rb = null; } @@ -70,9 +69,9 @@ class IcuResFileLoader implements LoaderInterface * * This function takes an array by reference and will modify it * - * @param \ResourceBundle $rb the ResourceBundle that will be flattened - * @param array $messages used internally for recursive calls - * @param string $path current path being parsed, used internally for recursive calls + * @param \ResourceBundle $rb The ResourceBundle that will be flattened + * @param array $messages Used internally for recursive calls + * @param string $path Current path being parsed, used internally for recursive calls * * @return array the flattened ResourceBundle */ diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/MoFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/MoFileLoader.php index 928cc9df..918bf94a 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/MoFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/MoFileLoader.php @@ -21,23 +21,17 @@ class MoFileLoader extends FileLoader /** * Magic used for validating the format of a MO file as well as * detecting if the machine used to create that file was little endian. - * - * @var float */ const MO_LITTLE_ENDIAN_MAGIC = 0x950412de; /** * Magic used for validating the format of a MO file as well as * detecting if the machine used to create that file was big endian. - * - * @var float */ const MO_BIG_ENDIAN_MAGIC = 0xde120495; /** * The size of the header of a MO file in bytes. - * - * @var int Number of bytes */ const MO_HEADER_SIZE = 28; @@ -59,9 +53,9 @@ class MoFileLoader extends FileLoader $magic = unpack('V1', fread($stream, 4)); $magic = hexdec(substr(dechex(current($magic)), -8)); - if ($magic == self::MO_LITTLE_ENDIAN_MAGIC) { + if (self::MO_LITTLE_ENDIAN_MAGIC == $magic) { $isBigEndian = false; - } elseif ($magic == self::MO_BIG_ENDIAN_MAGIC) { + } elseif (self::MO_BIG_ENDIAN_MAGIC == $magic) { $isBigEndian = true; } else { throw new InvalidResourceException('MO stream content has an invalid format.'); @@ -95,7 +89,7 @@ class MoFileLoader extends FileLoader fseek($stream, $offset); $singularId = fread($stream, $length); - if (strpos($singularId, "\000") !== false) { + if (false !== strpos($singularId, "\000")) { list($singularId, $pluralId) = explode("\000", $singularId); } @@ -110,7 +104,7 @@ class MoFileLoader extends FileLoader fseek($stream, $offset); $translated = fread($stream, $length); - if (strpos($translated, "\000") !== false) { + if (false !== strpos($translated, "\000")) { $translated = explode("\000", $translated); } @@ -140,11 +134,8 @@ class MoFileLoader extends FileLoader * Reads an unsigned long from stream respecting endianness. * * @param resource $stream - * @param bool $isBigEndian - * - * @return int */ - private function readLong($stream, $isBigEndian) + private function readLong($stream, bool $isBigEndian): int { $result = unpack($isBigEndian ? 'N1' : 'V1', fread($stream, 4)); $result = current($result); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/PoFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/PoFileLoader.php index 40f5464b..7ce7d2df 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/PoFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/PoFileLoader.php @@ -76,24 +76,24 @@ class PoFileLoader extends FileLoader while ($line = fgets($stream)) { $line = trim($line); - if ($line === '') { + if ('' === $line) { // Whitespace indicated current item is done if (!in_array('fuzzy', $flags)) { $this->addMessage($messages, $item); } $item = $defaults; $flags = array(); - } elseif (substr($line, 0, 2) === '#,') { + } elseif ('#,' === substr($line, 0, 2)) { $flags = array_map('trim', explode(',', substr($line, 2))); - } elseif (substr($line, 0, 7) === 'msgid "') { + } elseif ('msgid "' === substr($line, 0, 7)) { // We start a new msg so save previous // TODO: this fails when comments or contexts are added $this->addMessage($messages, $item); $item = $defaults; $item['ids']['singular'] = substr($line, 7, -1); - } elseif (substr($line, 0, 8) === 'msgstr "') { + } elseif ('msgstr "' === substr($line, 0, 8)) { $item['translated'] = substr($line, 8, -1); - } elseif ($line[0] === '"') { + } elseif ('"' === $line[0]) { $continues = isset($item['translated']) ? 'translated' : 'ids'; if (is_array($item[$continues])) { @@ -102,9 +102,9 @@ class PoFileLoader extends FileLoader } else { $item[$continues] .= substr($line, 1, -1); } - } elseif (substr($line, 0, 14) === 'msgid_plural "') { + } elseif ('msgid_plural "' === substr($line, 0, 14)) { $item['ids']['plural'] = substr($line, 14, -1); - } elseif (substr($line, 0, 7) === 'msgstr[') { + } elseif ('msgstr[' === substr($line, 0, 7)) { $size = strpos($line, ']'); $item['translated'][(int) substr($line, 7, 1)] = substr($line, $size + 3, -1); } @@ -123,9 +123,6 @@ class PoFileLoader extends FileLoader * * A .po file could contain by error missing plural indexes. We need to * fix these before saving them. - * - * @param array $messages - * @param array $item */ private function addMessage(array &$messages, array $item) { diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/QtFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/QtFileLoader.php index 657bd6eb..22536aa8 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/QtFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/QtFileLoader.php @@ -50,7 +50,7 @@ class QtFileLoader implements LoaderInterface $nodes = $xpath->evaluate('//TS/context/name[text()="'.$domain.'"]'); $catalogue = new MessageCatalogue($locale); - if ($nodes->length == 1) { + if (1 == $nodes->length) { $translations = $nodes->item(0)->nextSibling->parentNode->parentNode->getElementsByTagName('message'); foreach ($translations as $translation) { $translationValue = (string) $translation->getElementsByTagName('translation')->item(0)->nodeValue; diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/XliffFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/XliffFileLoader.php index e3cab654..b20d4909 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/XliffFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -75,7 +75,7 @@ class XliffFileLoader implements LoaderInterface * @param MessageCatalogue $catalogue Catalogue where we'll collect messages and metadata * @param string $domain The domain */ - private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain) { $xml = simplexml_import_dom($dom); $encoding = strtoupper($dom->encoding); @@ -115,48 +115,52 @@ class XliffFileLoader implements LoaderInterface } } - /** - * @param \DOMDocument $dom - * @param MessageCatalogue $catalogue - * @param string $domain - */ - private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, $domain) + private function extractXliff2(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain) { $xml = simplexml_import_dom($dom); $encoding = strtoupper($dom->encoding); $xml->registerXPathNamespace('xliff', 'urn:oasis:names:tc:xliff:document:2.0'); - foreach ($xml->xpath('//xliff:unit/xliff:segment') as $segment) { - $source = $segment->source; + foreach ($xml->xpath('//xliff:unit') as $unit) { + foreach ($unit->segment as $segment) { + $source = $segment->source; - // If the xlf file has another encoding specified, try to convert it because - // simple_xml will always return utf-8 encoded values - $target = $this->utf8ToCharset((string) (isset($segment->target) ? $segment->target : $source), $encoding); + // If the xlf file has another encoding specified, try to convert it because + // simple_xml will always return utf-8 encoded values + $target = $this->utf8ToCharset((string) (isset($segment->target) ? $segment->target : $source), $encoding); - $catalogue->set((string) $source, $target, $domain); + $catalogue->set((string) $source, $target, $domain); - $metadata = array(); - if (isset($segment->target) && $segment->target->attributes()) { - $metadata['target-attributes'] = array(); - foreach ($segment->target->attributes() as $key => $value) { - $metadata['target-attributes'][$key] = (string) $value; + $metadata = array(); + if (isset($segment->target) && $segment->target->attributes()) { + $metadata['target-attributes'] = array(); + foreach ($segment->target->attributes() as $key => $value) { + $metadata['target-attributes'][$key] = (string) $value; + } } - } - $catalogue->setMetadata((string) $source, $metadata, $domain); + if (isset($unit->notes)) { + $metadata['notes'] = array(); + foreach ($unit->notes->note as $noteNode) { + $note = array(); + foreach ($noteNode->attributes() as $key => $value) { + $note[$key] = (string) $value; + } + $note['content'] = (string) $noteNode; + $metadata['notes'][] = $note; + } + } + + $catalogue->setMetadata((string) $source, $metadata, $domain); + } } } /** * Convert a UTF8 string to the specified encoding. - * - * @param string $content String to decode - * @param string $encoding Target encoding - * - * @return string */ - private function utf8ToCharset($content, $encoding = null) + private function utf8ToCharset(string $content, string $encoding = null): string { if ('UTF-8' !== $encoding && !empty($encoding)) { return mb_convert_encoding($content, $encoding, 'UTF-8'); @@ -168,13 +172,9 @@ class XliffFileLoader implements LoaderInterface /** * Validates and parses the given file into a DOMDocument. * - * @param string $file - * @param \DOMDocument $dom - * @param string $schema source of the schema - * * @throws InvalidResourceException */ - private function validateSchema($file, \DOMDocument $dom, $schema) + private function validateSchema(string $file, \DOMDocument $dom, string $schema) { $internalErrors = libxml_use_internal_errors(true); @@ -211,38 +211,33 @@ class XliffFileLoader implements LoaderInterface /** * Internally changes the URI of a dependent xsd to be loaded locally. - * - * @param string $schemaSource Current content of schema file - * @param string $xmlUri External URI of XML to convert to local - * - * @return string */ - private function fixXmlLocation($schemaSource, $xmlUri) + private function fixXmlLocation(string $schemaSource, string $xmlUri): string { $newPath = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd'; $parts = explode('/', $newPath); + $locationstart = 'file:///'; if (0 === stripos($newPath, 'phar://')) { - $tmpfile = tempnam(sys_get_temp_dir(), 'sf2'); + $tmpfile = tempnam(sys_get_temp_dir(), 'symfony'); if ($tmpfile) { copy($newPath, $tmpfile); $parts = explode('/', str_replace('\\', '/', $tmpfile)); + } else { + array_shift($parts); + $locationstart = 'phar:///'; } } $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts).'/' : ''; - $newPath = 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts)); + $newPath = $locationstart.$drive.implode('/', array_map('rawurlencode', $parts)); return str_replace($xmlUri, $newPath, $schemaSource); } /** * Returns the XML errors of the internal XML parser. - * - * @param bool $internalErrors - * - * @return array An array of errors */ - private function getXmlErrors($internalErrors) + private function getXmlErrors(bool $internalErrors): array { $errors = array(); foreach (libxml_get_errors() as $error) { @@ -266,13 +261,9 @@ class XliffFileLoader implements LoaderInterface * Gets xliff file version based on the root "version" attribute. * Defaults to 1.2 for backwards compatibility. * - * @param \DOMDocument $dom - * * @throws InvalidArgumentException - * - * @return string */ - private function getVersionNumber(\DOMDocument $dom) + private function getVersionNumber(\DOMDocument $dom): string { /** @var \DOMNode $xliff */ foreach ($dom->getElementsByTagName('xliff') as $xliff) { @@ -283,7 +274,7 @@ class XliffFileLoader implements LoaderInterface $namespace = $xliff->attributes->getNamedItem('xmlns'); if ($namespace) { - if (substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34) !== 0) { + if (0 !== substr_compare('urn:oasis:names:tc:xliff:document:', $namespace->nodeValue, 0, 34)) { throw new InvalidArgumentException(sprintf('Not a valid XLIFF namespace "%s"', $namespace)); } @@ -295,13 +286,7 @@ class XliffFileLoader implements LoaderInterface return '1.2'; } - /** - * @param \SimpleXMLElement|null $noteElement - * @param string|null $encoding - * - * @return array - */ - private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, $encoding = null) + private function parseNotesMetadata(\SimpleXMLElement $noteElement = null, string $encoding = null): array { $notes = array(); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/YamlFileLoader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/YamlFileLoader.php index 5897767b..874fa3a8 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Loader/YamlFileLoader.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Loader/YamlFileLoader.php @@ -15,7 +15,6 @@ use Symfony\Component\Translation\Exception\InvalidResourceException; use Symfony\Component\Translation\Exception\LogicException; use Symfony\Component\Yaml\Parser as YamlParser; use Symfony\Component\Yaml\Exception\ParseException; -use Symfony\Component\Yaml\Yaml; /** * YamlFileLoader loads translations from Yaml files. @@ -40,7 +39,7 @@ class YamlFileLoader extends FileLoader } try { - $messages = $this->yamlParser->parse(file_get_contents($resource), Yaml::PARSE_KEYS_AS_STRINGS); + $messages = $this->yamlParser->parseFile($resource); } catch (ParseException $e) { throw new InvalidResourceException(sprintf('Error parsing YAML, invalid file "%s"', $resource), 0, $e); } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/LoggingTranslator.php b/wp-content/themes/physioassist/vendor/symfony/translation/LoggingTranslator.php index 194e554a..337c1143 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/LoggingTranslator.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/LoggingTranslator.php @@ -24,9 +24,6 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface */ private $translator; - /** - * @var LoggerInterface - */ private $logger; /** diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogue.php b/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogue.php index c82b73e1..c36ea30e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogue.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogue.php @@ -15,8 +15,6 @@ use Symfony\Component\Config\Resource\ResourceInterface; use Symfony\Component\Translation\Exception\LogicException; /** - * MessageCatalogue. - * * @author Fabien Potencier */ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterface @@ -29,12 +27,10 @@ class MessageCatalogue implements MessageCatalogueInterface, MetadataAwareInterf private $parent; /** - * Constructor. - * * @param string $locale The locale * @param array $messages An array of messages classified by domain */ - public function __construct($locale, array $messages = array()) + public function __construct(?string $locale, array $messages = array()) { $this->locale = $locale; $this->messages = $messages; diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogueInterface.php b/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogueInterface.php index 40054f05..4dad27fb 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogueInterface.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/MessageCatalogueInterface.php @@ -104,8 +104,6 @@ interface MessageCatalogueInterface * Merges translations from the given Catalogue into the current one. * * The two catalogues must have the same locale. - * - * @param self $catalogue */ public function addCatalogue(MessageCatalogueInterface $catalogue); @@ -114,8 +112,6 @@ interface MessageCatalogueInterface * only when the translation does not exist. * * This is used to provide default translations when they do not exist for the current locale. - * - * @param self $catalogue */ public function addFallbackCatalogue(MessageCatalogueInterface $catalogue); @@ -135,8 +131,6 @@ interface MessageCatalogueInterface /** * Adds a resource for this collection. - * - * @param ResourceInterface $resource A resource instance */ public function addResource(ResourceInterface $resource); } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/MessageSelector.php b/wp-content/themes/physioassist/vendor/symfony/translation/MessageSelector.php index c6134191..31304cd0 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/MessageSelector.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/MessageSelector.php @@ -49,10 +49,16 @@ class MessageSelector */ public function choose($message, $number, $locale) { - preg_match_all('/(?:\|\||[^\|])++/', $message, $parts); + $parts = array(); + if (preg_match('/^\|++$/', $message)) { + $parts = explode('|', $message); + } elseif (preg_match_all('/(?:\|\||[^\|])++/', $message, $matches)) { + $parts = $matches[0]; + } + $explicitRules = array(); $standardRules = array(); - foreach ($parts[0] as $part) { + foreach ($parts as $part) { $part = trim(str_replace('||', '|', $part)); if (preg_match('/^(?P'.Interval::getIntervalRegexp().')\s*(?P.*?)$/xs', $part, $matches)) { @@ -76,7 +82,7 @@ class MessageSelector if (!isset($standardRules[$position])) { // when there's exactly one rule given, and that rule is a standard // rule, use this rule - if (1 === count($parts[0]) && isset($standardRules[0])) { + if (1 === count($parts) && isset($standardRules[0])) { return $standardRules[0]; } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/PluralizationRules.php b/wp-content/themes/physioassist/vendor/symfony/translation/PluralizationRules.php index ef2be709..38dde743 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/PluralizationRules.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/PluralizationRules.php @@ -71,7 +71,6 @@ class PluralizationRules case 'vi': case 'zh': return 0; - break; case 'af': case 'bn': @@ -123,7 +122,7 @@ class PluralizationRules case 'tk': case 'ur': case 'zu': - return ($number == 1) ? 0 : 1; + return (1 == $number) ? 0 : 1; case 'am': case 'bh': @@ -138,7 +137,7 @@ class PluralizationRules case 'xbr': case 'ti': case 'wa': - return (($number == 0) || ($number == 1)) ? 0 : 1; + return ((0 == $number) || (1 == $number)) ? 0 : 1; case 'be': case 'bs': @@ -146,41 +145,41 @@ class PluralizationRules case 'ru': case 'sr': case 'uk': - return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); case 'cs': case 'sk': - return ($number == 1) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); + return (1 == $number) ? 0 : ((($number >= 2) && ($number <= 4)) ? 1 : 2); case 'ga': - return ($number == 1) ? 0 : (($number == 2) ? 1 : 2); + return (1 == $number) ? 0 : ((2 == $number) ? 1 : 2); case 'lt': - return (($number % 10 == 1) && ($number % 100 != 11)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); + return ((1 == $number % 10) && (11 != $number % 100)) ? 0 : ((($number % 10 >= 2) && (($number % 100 < 10) || ($number % 100 >= 20))) ? 1 : 2); case 'sl': - return ($number % 100 == 1) ? 0 : (($number % 100 == 2) ? 1 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 2 : 3)); + return (1 == $number % 100) ? 0 : ((2 == $number % 100) ? 1 : (((3 == $number % 100) || (4 == $number % 100)) ? 2 : 3)); case 'mk': - return ($number % 10 == 1) ? 0 : 1; + return (1 == $number % 10) ? 0 : 1; case 'mt': - return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); + return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 1) && ($number % 100 < 11))) ? 1 : ((($number % 100 > 10) && ($number % 100 < 20)) ? 2 : 3)); case 'lv': - return ($number == 0) ? 0 : ((($number % 10 == 1) && ($number % 100 != 11)) ? 1 : 2); + return (0 == $number) ? 0 : (((1 == $number % 10) && (11 != $number % 100)) ? 1 : 2); case 'pl': - return ($number == 1) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); + return (1 == $number) ? 0 : ((($number % 10 >= 2) && ($number % 10 <= 4) && (($number % 100 < 12) || ($number % 100 > 14))) ? 1 : 2); case 'cy': - return ($number == 1) ? 0 : (($number == 2) ? 1 : ((($number == 8) || ($number == 11)) ? 2 : 3)); + return (1 == $number) ? 0 : ((2 == $number) ? 1 : (((8 == $number) || (11 == $number)) ? 2 : 3)); case 'ro': - return ($number == 1) ? 0 : ((($number == 0) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); + return (1 == $number) ? 0 : (((0 == $number) || (($number % 100 > 0) && ($number % 100 < 20))) ? 1 : 2); case 'ar': - return ($number == 0) ? 0 : (($number == 1) ? 1 : (($number == 2) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); + return (0 == $number) ? 0 : ((1 == $number) ? 1 : ((2 == $number) ? 2 : ((($number % 100 >= 3) && ($number % 100 <= 10)) ? 3 : ((($number % 100 >= 11) && ($number % 100 <= 99)) ? 4 : 5)))); default: return 0; diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReader.php b/wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReader.php new file mode 100644 index 00000000..d2ad774e --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReader.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Reader; + +use Symfony\Component\Finder\Finder; +use Symfony\Component\Translation\Loader\LoaderInterface; +use Symfony\Component\Translation\MessageCatalogue; + +/** + * TranslationReader reads translation messages from translation files. + * + * @author Michel Salib + */ +class TranslationReader implements TranslationReaderInterface +{ + /** + * Loaders used for import. + * + * @var array + */ + private $loaders = array(); + + /** + * Adds a loader to the translation extractor. + * + * @param string $format The format of the loader + * @param LoaderInterface $loader + */ + public function addLoader($format, LoaderInterface $loader) + { + $this->loaders[$format] = $loader; + } + + /** + * {@inheritdoc} + */ + public function read($directory, MessageCatalogue $catalogue) + { + if (!is_dir($directory)) { + return; + } + + foreach ($this->loaders as $format => $loader) { + // load any existing translation files + $finder = new Finder(); + $extension = $catalogue->getLocale().'.'.$format; + $files = $finder->files()->name('*.'.$extension)->in($directory); + foreach ($files as $file) { + $domain = substr($file->getFilename(), 0, -1 * strlen($extension) - 1); + $catalogue->addCatalogue($loader->load($file->getPathname(), $catalogue->getLocale(), $domain)); + } + } + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReaderInterface.php b/wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReaderInterface.php new file mode 100644 index 00000000..0aa55c6d --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Reader/TranslationReaderInterface.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Reader; + +use Symfony\Component\Translation\MessageCatalogue; + +/** + * TranslationReader reads translation messages from translation files. + * + * @author Tobias Nyholm + */ +interface TranslationReaderInterface +{ + /** + * Reads translation messages from a directory to the catalogue. + * + * @param string $directory + * @param MessageCatalogue $catalogue + */ + public function read($directory, MessageCatalogue $catalogue); +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd b/wp-content/themes/physioassist/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd index 803eb602..dface628 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Resources/schemas/xliff-core-1.2-strict.xsd @@ -1,2223 +1,2223 @@ - - - - - - - - - - - - - - - Values for the attribute 'context-type'. - - - - - Indicates a database content. - - - - - Indicates the content of an element within an XML document. - - - - - Indicates the name of an element within an XML document. - - - - - Indicates the line number from the sourcefile (see context-type="sourcefile") where the <source> is found. - - - - - Indicates a the number of parameters contained within the <source>. - - - - - Indicates notes pertaining to the parameters in the <source>. - - - - - Indicates the content of a record within a database. - - - - - Indicates the name of a record within a database. - - - - - Indicates the original source file in the case that multiple files are merged to form the original file from which the XLIFF file is created. This differs from the original <file> attribute in that this sourcefile is one of many that make up that file. - - - - - - - Values for the attribute 'count-type'. - - - - - Indicates the count units are items that are used X times in a certain context; example: this is a reusable text unit which is used 42 times in other texts. - - - - - Indicates the count units are translation units existing already in the same document. - - - - - Indicates a total count. - - - - - - - Values for the attribute 'ctype' when used other elements than <ph> or <x>. - - - - - Indicates a run of bolded text. - - - - - Indicates a run of text in italics. - - - - - Indicates a run of underlined text. - - - - - Indicates a run of hyper-text. - - - - - - - Values for the attribute 'ctype' when used with <ph> or <x>. - - - - - Indicates a inline image. - - - - - Indicates a page break. - - - - - Indicates a line break. - - - - - - - - - - - - Values for the attribute 'datatype'. - - - - - Indicates Active Server Page data. - - - - - Indicates C source file data. - - - - - Indicates Channel Definition Format (CDF) data. - - - - - Indicates ColdFusion data. - - - - - Indicates C++ source file data. - - - - - Indicates C-Sharp data. - - - - - Indicates strings from C, ASM, and driver files data. - - - - - Indicates comma-separated values data. - - - - - Indicates database data. - - - - - Indicates portions of document that follows data and contains metadata. - - - - - Indicates portions of document that precedes data and contains metadata. - - - - - Indicates data from standard UI file operations dialogs (e.g., Open, Save, Save As, Export, Import). - - - - - Indicates standard user input screen data. - - - - - Indicates HyperText Markup Language (HTML) data - document instance. - - - - - Indicates content within an HTML document’s <body> element. - - - - - Indicates Windows INI file data. - - - - - Indicates Interleaf data. - - - - - Indicates Java source file data (extension '.java'). - - - - - Indicates Java property resource bundle data. - - - - - Indicates Java list resource bundle data. - - - - - Indicates JavaScript source file data. - - - - - Indicates JScript source file data. - - - - - Indicates information relating to formatting. - - - - - Indicates LISP source file data. - - - - - Indicates information relating to margin formats. - - - - - Indicates a file containing menu. - - - - - Indicates numerically identified string table. - - - - - Indicates Maker Interchange Format (MIF) data. - - - - - Indicates that the datatype attribute value is a MIME Type value and is defined in the mime-type attribute. - - - - - Indicates GNU Machine Object data. - - - - - Indicates Message Librarian strings created by Novell's Message Librarian Tool. - - - - - Indicates information to be displayed at the bottom of each page of a document. - - - - - Indicates information to be displayed at the top of each page of a document. - - - - - Indicates a list of property values (e.g., settings within INI files or preferences dialog). - - - - - Indicates Pascal source file data. - - - - - Indicates Hypertext Preprocessor data. - - - - - Indicates plain text file (no formatting other than, possibly, wrapping). - - - - - Indicates GNU Portable Object file. - - - - - Indicates dynamically generated user defined document. e.g. Oracle Report, Crystal Report, etc. - - - - - Indicates Windows .NET binary resources. - - - - - Indicates Windows .NET Resources. - - - - - Indicates Rich Text Format (RTF) data. - - - - - Indicates Standard Generalized Markup Language (SGML) data - document instance. - - - - - Indicates Standard Generalized Markup Language (SGML) data - Document Type Definition (DTD). - - - - - Indicates Scalable Vector Graphic (SVG) data. - - - - - Indicates VisualBasic Script source file. - - - - - Indicates warning message. - - - - - Indicates Windows (Win32) resources (i.e. resources extracted from an RC script, a message file, or a compiled file). - - - - - Indicates Extensible HyperText Markup Language (XHTML) data - document instance. - - - - - Indicates Extensible Markup Language (XML) data - document instance. - - - - - Indicates Extensible Markup Language (XML) data - Document Type Definition (DTD). - - - - - Indicates Extensible Stylesheet Language (XSL) data. - - - - - Indicates XUL elements. - - - - - - - Values for the attribute 'mtype'. - - - - - Indicates the marked text is an abbreviation. - - - - - ISO-12620 2.1.8: A term resulting from the omission of any part of the full term while designating the same concept. - - - - - ISO-12620 2.1.8.1: An abbreviated form of a simple term resulting from the omission of some of its letters (e.g. 'adj.' for 'adjective'). - - - - - ISO-12620 2.1.8.4: An abbreviated form of a term made up of letters from the full form of a multiword term strung together into a sequence pronounced only syllabically (e.g. 'radar' for 'radio detecting and ranging'). - - - - - ISO-12620: A proper-name term, such as the name of an agency or other proper entity. - - - - - ISO-12620 2.1.18.1: A recurrent word combination characterized by cohesion in that the components of the collocation must co-occur within an utterance or series of utterances, even though they do not necessarily have to maintain immediate proximity to one another. - - - - - ISO-12620 2.1.5: A synonym for an international scientific term that is used in general discourse in a given language. - - - - - Indicates the marked text is a date and/or time. - - - - - ISO-12620 2.1.15: An expression used to represent a concept based on a statement that two mathematical expressions are, for instance, equal as identified by the equal sign (=), or assigned to one another by a similar sign. - - - - - ISO-12620 2.1.7: The complete representation of a term for which there is an abbreviated form. - - - - - ISO-12620 2.1.14: Figures, symbols or the like used to express a concept briefly, such as a mathematical or chemical formula. - - - - - ISO-12620 2.1.1: The concept designation that has been chosen to head a terminological record. - - - - - ISO-12620 2.1.8.3: An abbreviated form of a term consisting of some of the initial letters of the words making up a multiword term or the term elements making up a compound term when these letters are pronounced individually (e.g. 'BSE' for 'bovine spongiform encephalopathy'). - - - - - ISO-12620 2.1.4: A term that is part of an international scientific nomenclature as adopted by an appropriate scientific body. - - - - - ISO-12620 2.1.6: A term that has the same or nearly identical orthographic or phonemic form in many languages. - - - - - ISO-12620 2.1.16: An expression used to represent a concept based on mathematical or logical relations, such as statements of inequality, set relationships, Boolean operations, and the like. - - - - - ISO-12620 2.1.17: A unit to track object. - - - - - Indicates the marked text is a name. - - - - - ISO-12620 2.1.3: A term that represents the same or a very similar concept as another term in the same language, but for which interchangeability is limited to some contexts and inapplicable in others. - - - - - ISO-12620 2.1.17.2: A unique alphanumeric designation assigned to an object in a manufacturing system. - - - - - Indicates the marked text is a phrase. - - - - - ISO-12620 2.1.18: Any group of two or more words that form a unit, the meaning of which frequently cannot be deduced based on the combined sense of the words making up the phrase. - - - - - Indicates the marked text should not be translated. - - - - - ISO-12620 2.1.12: A form of a term resulting from an operation whereby non-Latin writing systems are converted to the Latin alphabet. - - - - - Indicates that the marked text represents a segment. - - - - - ISO-12620 2.1.18.2: A fixed, lexicalized phrase. - - - - - ISO-12620 2.1.8.2: A variant of a multiword term that includes fewer words than the full form of the term (e.g. 'Group of Twenty-four' for 'Intergovernmental Group of Twenty-four on International Monetary Affairs'). - - - - - ISO-12620 2.1.17.1: Stock keeping unit, an inventory item identified by a unique alphanumeric designation assigned to an object in an inventory control system. - - - - - ISO-12620 2.1.19: A fixed chunk of recurring text. - - - - - ISO-12620 2.1.13: A designation of a concept by letters, numerals, pictograms or any combination thereof. - - - - - ISO-12620 2.1.2: Any term that represents the same or a very similar concept as the main entry term in a term entry. - - - - - ISO-12620 2.1.18.3: Phraseological unit in a language that expresses the same semantic content as another phrase in that same language. - - - - - Indicates the marked text is a term. - - - - - ISO-12620 2.1.11: A form of a term resulting from an operation whereby the characters of one writing system are represented by characters from another writing system, taking into account the pronunciation of the characters converted. - - - - - ISO-12620 2.1.10: A form of a term resulting from an operation whereby the characters of an alphabetic writing system are represented by characters from another alphabetic writing system. - - - - - ISO-12620 2.1.8.5: An abbreviated form of a term resulting from the omission of one or more term elements or syllables (e.g. 'flu' for 'influenza'). - - - - - ISO-12620 2.1.9: One of the alternate forms of a term. - - - - - - - Values for the attribute 'restype'. - - - - - Indicates a Windows RC AUTO3STATE control. - - - - - Indicates a Windows RC AUTOCHECKBOX control. - - - - - Indicates a Windows RC AUTORADIOBUTTON control. - - - - - Indicates a Windows RC BEDIT control. - - - - - Indicates a bitmap, for example a BITMAP resource in Windows. - - - - - Indicates a button object, for example a BUTTON control Windows. - - - - - Indicates a caption, such as the caption of a dialog box. - - - - - Indicates the cell in a table, for example the content of the <td> element in HTML. - - - - - Indicates check box object, for example a CHECKBOX control in Windows. - - - - - Indicates a menu item with an associated checkbox. - - - - - Indicates a list box, but with a check-box for each item. - - - - - Indicates a color selection dialog. - - - - - Indicates a combination of edit box and listbox object, for example a COMBOBOX control in Windows. - - - - - Indicates an initialization entry of an extended combobox DLGINIT resource block. (code 0x1234). - - - - - Indicates an initialization entry of a combobox DLGINIT resource block (code 0x0403). - - - - - Indicates a UI base class element that cannot be represented by any other element. - - - - - Indicates a context menu. - - - - - Indicates a Windows RC CTEXT control. - - - - - Indicates a cursor, for example a CURSOR resource in Windows. - - - - - Indicates a date/time picker. - - - - - Indicates a Windows RC DEFPUSHBUTTON control. - - - - - Indicates a dialog box. - - - - - Indicates a Windows RC DLGINIT resource block. - - - - - Indicates an edit box object, for example an EDIT control in Windows. - - - - - Indicates a filename. - - - - - Indicates a file dialog. - - - - - Indicates a footnote. - - - - - Indicates a font name. - - - - - Indicates a footer. - - - - - Indicates a frame object. - - - - - Indicates a XUL grid element. - - - - - Indicates a groupbox object, for example a GROUPBOX control in Windows. - - - - - Indicates a header item. - - - - - Indicates a heading, such has the content of <h1>, <h2>, etc. in HTML. - - - - - Indicates a Windows RC HEDIT control. - - - - - Indicates a horizontal scrollbar. - - - - - Indicates an icon, for example an ICON resource in Windows. - - - - - Indicates a Windows RC IEDIT control. - - - - - Indicates keyword list, such as the content of the Keywords meta-data in HTML, or a K footnote in WinHelp RTF. - - - - - Indicates a label object. - - - - - Indicates a label that is also a HTML link (not necessarily a URL). - - - - - Indicates a list (a group of list-items, for example an <ol> or <ul> element in HTML). - - - - - Indicates a listbox object, for example an LISTBOX control in Windows. - - - - - Indicates an list item (an entry in a list). - - - - - Indicates a Windows RC LTEXT control. - - - - - Indicates a menu (a group of menu-items). - - - - - Indicates a toolbar containing one or more tope level menus. - - - - - Indicates a menu item (an entry in a menu). - - - - - Indicates a XUL menuseparator element. - - - - - Indicates a message, for example an entry in a MESSAGETABLE resource in Windows. - - - - - Indicates a calendar control. - - - - - Indicates an edit box beside a spin control. - - - - - Indicates a catch all for rectangular areas. - - - - - Indicates a standalone menu not necessarily associated with a menubar. - - - - - Indicates a pushbox object, for example a PUSHBOX control in Windows. - - - - - Indicates a Windows RC PUSHBUTTON control. - - - - - Indicates a radio button object. - - - - - Indicates a menuitem with associated radio button. - - - - - Indicates raw data resources for an application. - - - - - Indicates a row in a table. - - - - - Indicates a Windows RC RTEXT control. - - - - - Indicates a user navigable container used to show a portion of a document. - - - - - Indicates a generic divider object (e.g. menu group separator). - - - - - Windows accelerators, shortcuts in resource or property files. - - - - - Indicates a UI control to indicate process activity but not progress. - - - - - Indicates a splitter bar. - - - - - Indicates a Windows RC STATE3 control. - - - - - Indicates a window for providing feedback to the users, like 'read-only', etc. - - - - - Indicates a string, for example an entry in a STRINGTABLE resource in Windows. - - - - - Indicates a layers of controls with a tab to select layers. - - - - - Indicates a display and edits regular two-dimensional tables of cells. - - - - - Indicates a XUL textbox element. - - - - - Indicates a UI button that can be toggled to on or off state. - - - - - Indicates an array of controls, usually buttons. - - - - - Indicates a pop up tool tip text. - - - - - Indicates a bar with a pointer indicating a position within a certain range. - - - - - Indicates a control that displays a set of hierarchical data. - - - - - Indicates a URI (URN or URL). - - - - - Indicates a Windows RC USERBUTTON control. - - - - - Indicates a user-defined control like CONTROL control in Windows. - - - - - Indicates the text of a variable. - - - - - Indicates version information about a resource like VERSIONINFO in Windows. - - - - - Indicates a vertical scrollbar. - - - - - Indicates a graphical window. - - - - - - - Values for the attribute 'size-unit'. - - - - - Indicates a size in 8-bit bytes. - - - - - Indicates a size in Unicode characters. - - - - - Indicates a size in columns. Used for HTML text area. - - - - - Indicates a size in centimeters. - - - - - Indicates a size in dialog units, as defined in Windows resources. - - - - - Indicates a size in 'font-size' units (as defined in CSS). - - - - - Indicates a size in 'x-height' units (as defined in CSS). - - - - - Indicates a size in glyphs. A glyph is considered to be one or more combined Unicode characters that represent a single displayable text character. Sometimes referred to as a 'grapheme cluster' - - - - - Indicates a size in inches. - - - - - Indicates a size in millimeters. - - - - - Indicates a size in percentage. - - - - - Indicates a size in pixels. - - - - - Indicates a size in point. - - - - - Indicates a size in rows. Used for HTML text area. - - - - - - - Values for the attribute 'state'. - - - - - Indicates the terminating state. - - - - - Indicates only non-textual information needs adaptation. - - - - - Indicates both text and non-textual information needs adaptation. - - - - - Indicates only non-textual information needs review. - - - - - Indicates both text and non-textual information needs review. - - - - - Indicates that only the text of the item needs to be reviewed. - - - - - Indicates that the item needs to be translated. - - - - - Indicates that the item is new. For example, translation units that were not in a previous version of the document. - - - - - Indicates that changes are reviewed and approved. - - - - - Indicates that the item has been translated. - - - - - - - Values for the attribute 'state-qualifier'. - - - - - Indicates an exact match. An exact match occurs when a source text of a segment is exactly the same as the source text of a segment that was translated previously. - - - - - Indicates a fuzzy match. A fuzzy match occurs when a source text of a segment is very similar to the source text of a segment that was translated previously (e.g. when the difference is casing, a few changed words, white-space discripancy, etc.). - - - - - Indicates a match based on matching IDs (in addition to matching text). - - - - - Indicates a translation derived from a glossary. - - - - - Indicates a translation derived from existing translation. - - - - - Indicates a translation derived from machine translation. - - - - - Indicates a translation derived from a translation repository. - - - - - Indicates a translation derived from a translation memory. - - - - - Indicates the translation is suggested by machine translation. - - - - - Indicates that the item has been rejected because of incorrect grammar. - - - - - Indicates that the item has been rejected because it is incorrect. - - - - - Indicates that the item has been rejected because it is too long or too short. - - - - - Indicates that the item has been rejected because of incorrect spelling. - - - - - Indicates the translation is suggested by translation memory. - - - - - - - Values for the attribute 'unit'. - - - - - Refers to words. - - - - - Refers to pages. - - - - - Refers to <trans-unit> elements. - - - - - Refers to <bin-unit> elements. - - - - - Refers to glyphs. - - - - - Refers to <trans-unit> and/or <bin-unit> elements. - - - - - Refers to the occurrences of instances defined by the count-type value. - - - - - Refers to characters. - - - - - Refers to lines. - - - - - Refers to sentences. - - - - - Refers to paragraphs. - - - - - Refers to segments. - - - - - Refers to placeables (inline elements). - - - - - - - Values for the attribute 'priority'. - - - - - Highest priority. - - - - - High priority. - - - - - High priority, but not as important as 2. - - - - - High priority, but not as important as 3. - - - - - Medium priority, but more important than 6. - - - - - Medium priority, but less important than 5. - - - - - Low priority, but more important than 8. - - - - - Low priority, but more important than 9. - - - - - Low priority. - - - - - Lowest priority. - - - - - - - - - This value indicates that all properties can be reformatted. This value must be used alone. - - - - - This value indicates that no properties should be reformatted. This value must be used alone. - - - - - - - - - - - - - This value indicates that all information in the coord attribute can be modified. - - - - - This value indicates that the x information in the coord attribute can be modified. - - - - - This value indicates that the y information in the coord attribute can be modified. - - - - - This value indicates that the cx information in the coord attribute can be modified. - - - - - This value indicates that the cy information in the coord attribute can be modified. - - - - - This value indicates that all the information in the font attribute can be modified. - - - - - This value indicates that the name information in the font attribute can be modified. - - - - - This value indicates that the size information in the font attribute can be modified. - - - - - This value indicates that the weight information in the font attribute can be modified. - - - - - This value indicates that the information in the css-style attribute can be modified. - - - - - This value indicates that the information in the style attribute can be modified. - - - - - This value indicates that the information in the exstyle attribute can be modified. - - - - - - - - - - - - - Indicates that the context is informational in nature, specifying for example, how a term should be translated. Thus, should be displayed to anyone editing the XLIFF document. - - - - - Indicates that the context-group is used to specify where the term was found in the translatable source. Thus, it is not displayed. - - - - - Indicates that the context information should be used during translation memory lookups. Thus, it is not displayed. - - - - - - - - - Represents a translation proposal from a translation memory or other resource. - - - - - Represents a previous version of the target element. - - - - - Represents a rejected version of the target element. - - - - - Represents a translation to be used for reference purposes only, for example from a related product or a different language. - - - - - Represents a proposed translation that was used for the translation of the trans-unit, possibly modified. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Values for the attribute 'coord'. - - - - - - - - Version values: 1.0 and 1.1 are allowed for backward compatibility. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + Values for the attribute 'context-type'. + + + + + Indicates a database content. + + + + + Indicates the content of an element within an XML document. + + + + + Indicates the name of an element within an XML document. + + + + + Indicates the line number from the sourcefile (see context-type="sourcefile") where the <source> is found. + + + + + Indicates a the number of parameters contained within the <source>. + + + + + Indicates notes pertaining to the parameters in the <source>. + + + + + Indicates the content of a record within a database. + + + + + Indicates the name of a record within a database. + + + + + Indicates the original source file in the case that multiple files are merged to form the original file from which the XLIFF file is created. This differs from the original <file> attribute in that this sourcefile is one of many that make up that file. + + + + + + + Values for the attribute 'count-type'. + + + + + Indicates the count units are items that are used X times in a certain context; example: this is a reusable text unit which is used 42 times in other texts. + + + + + Indicates the count units are translation units existing already in the same document. + + + + + Indicates a total count. + + + + + + + Values for the attribute 'ctype' when used other elements than <ph> or <x>. + + + + + Indicates a run of bolded text. + + + + + Indicates a run of text in italics. + + + + + Indicates a run of underlined text. + + + + + Indicates a run of hyper-text. + + + + + + + Values for the attribute 'ctype' when used with <ph> or <x>. + + + + + Indicates a inline image. + + + + + Indicates a page break. + + + + + Indicates a line break. + + + + + + + + + + + + Values for the attribute 'datatype'. + + + + + Indicates Active Server Page data. + + + + + Indicates C source file data. + + + + + Indicates Channel Definition Format (CDF) data. + + + + + Indicates ColdFusion data. + + + + + Indicates C++ source file data. + + + + + Indicates C-Sharp data. + + + + + Indicates strings from C, ASM, and driver files data. + + + + + Indicates comma-separated values data. + + + + + Indicates database data. + + + + + Indicates portions of document that follows data and contains metadata. + + + + + Indicates portions of document that precedes data and contains metadata. + + + + + Indicates data from standard UI file operations dialogs (e.g., Open, Save, Save As, Export, Import). + + + + + Indicates standard user input screen data. + + + + + Indicates HyperText Markup Language (HTML) data - document instance. + + + + + Indicates content within an HTML document’s <body> element. + + + + + Indicates Windows INI file data. + + + + + Indicates Interleaf data. + + + + + Indicates Java source file data (extension '.java'). + + + + + Indicates Java property resource bundle data. + + + + + Indicates Java list resource bundle data. + + + + + Indicates JavaScript source file data. + + + + + Indicates JScript source file data. + + + + + Indicates information relating to formatting. + + + + + Indicates LISP source file data. + + + + + Indicates information relating to margin formats. + + + + + Indicates a file containing menu. + + + + + Indicates numerically identified string table. + + + + + Indicates Maker Interchange Format (MIF) data. + + + + + Indicates that the datatype attribute value is a MIME Type value and is defined in the mime-type attribute. + + + + + Indicates GNU Machine Object data. + + + + + Indicates Message Librarian strings created by Novell's Message Librarian Tool. + + + + + Indicates information to be displayed at the bottom of each page of a document. + + + + + Indicates information to be displayed at the top of each page of a document. + + + + + Indicates a list of property values (e.g., settings within INI files or preferences dialog). + + + + + Indicates Pascal source file data. + + + + + Indicates Hypertext Preprocessor data. + + + + + Indicates plain text file (no formatting other than, possibly, wrapping). + + + + + Indicates GNU Portable Object file. + + + + + Indicates dynamically generated user defined document. e.g. Oracle Report, Crystal Report, etc. + + + + + Indicates Windows .NET binary resources. + + + + + Indicates Windows .NET Resources. + + + + + Indicates Rich Text Format (RTF) data. + + + + + Indicates Standard Generalized Markup Language (SGML) data - document instance. + + + + + Indicates Standard Generalized Markup Language (SGML) data - Document Type Definition (DTD). + + + + + Indicates Scalable Vector Graphic (SVG) data. + + + + + Indicates VisualBasic Script source file. + + + + + Indicates warning message. + + + + + Indicates Windows (Win32) resources (i.e. resources extracted from an RC script, a message file, or a compiled file). + + + + + Indicates Extensible HyperText Markup Language (XHTML) data - document instance. + + + + + Indicates Extensible Markup Language (XML) data - document instance. + + + + + Indicates Extensible Markup Language (XML) data - Document Type Definition (DTD). + + + + + Indicates Extensible Stylesheet Language (XSL) data. + + + + + Indicates XUL elements. + + + + + + + Values for the attribute 'mtype'. + + + + + Indicates the marked text is an abbreviation. + + + + + ISO-12620 2.1.8: A term resulting from the omission of any part of the full term while designating the same concept. + + + + + ISO-12620 2.1.8.1: An abbreviated form of a simple term resulting from the omission of some of its letters (e.g. 'adj.' for 'adjective'). + + + + + ISO-12620 2.1.8.4: An abbreviated form of a term made up of letters from the full form of a multiword term strung together into a sequence pronounced only syllabically (e.g. 'radar' for 'radio detecting and ranging'). + + + + + ISO-12620: A proper-name term, such as the name of an agency or other proper entity. + + + + + ISO-12620 2.1.18.1: A recurrent word combination characterized by cohesion in that the components of the collocation must co-occur within an utterance or series of utterances, even though they do not necessarily have to maintain immediate proximity to one another. + + + + + ISO-12620 2.1.5: A synonym for an international scientific term that is used in general discourse in a given language. + + + + + Indicates the marked text is a date and/or time. + + + + + ISO-12620 2.1.15: An expression used to represent a concept based on a statement that two mathematical expressions are, for instance, equal as identified by the equal sign (=), or assigned to one another by a similar sign. + + + + + ISO-12620 2.1.7: The complete representation of a term for which there is an abbreviated form. + + + + + ISO-12620 2.1.14: Figures, symbols or the like used to express a concept briefly, such as a mathematical or chemical formula. + + + + + ISO-12620 2.1.1: The concept designation that has been chosen to head a terminological record. + + + + + ISO-12620 2.1.8.3: An abbreviated form of a term consisting of some of the initial letters of the words making up a multiword term or the term elements making up a compound term when these letters are pronounced individually (e.g. 'BSE' for 'bovine spongiform encephalopathy'). + + + + + ISO-12620 2.1.4: A term that is part of an international scientific nomenclature as adopted by an appropriate scientific body. + + + + + ISO-12620 2.1.6: A term that has the same or nearly identical orthographic or phonemic form in many languages. + + + + + ISO-12620 2.1.16: An expression used to represent a concept based on mathematical or logical relations, such as statements of inequality, set relationships, Boolean operations, and the like. + + + + + ISO-12620 2.1.17: A unit to track object. + + + + + Indicates the marked text is a name. + + + + + ISO-12620 2.1.3: A term that represents the same or a very similar concept as another term in the same language, but for which interchangeability is limited to some contexts and inapplicable in others. + + + + + ISO-12620 2.1.17.2: A unique alphanumeric designation assigned to an object in a manufacturing system. + + + + + Indicates the marked text is a phrase. + + + + + ISO-12620 2.1.18: Any group of two or more words that form a unit, the meaning of which frequently cannot be deduced based on the combined sense of the words making up the phrase. + + + + + Indicates the marked text should not be translated. + + + + + ISO-12620 2.1.12: A form of a term resulting from an operation whereby non-Latin writing systems are converted to the Latin alphabet. + + + + + Indicates that the marked text represents a segment. + + + + + ISO-12620 2.1.18.2: A fixed, lexicalized phrase. + + + + + ISO-12620 2.1.8.2: A variant of a multiword term that includes fewer words than the full form of the term (e.g. 'Group of Twenty-four' for 'Intergovernmental Group of Twenty-four on International Monetary Affairs'). + + + + + ISO-12620 2.1.17.1: Stock keeping unit, an inventory item identified by a unique alphanumeric designation assigned to an object in an inventory control system. + + + + + ISO-12620 2.1.19: A fixed chunk of recurring text. + + + + + ISO-12620 2.1.13: A designation of a concept by letters, numerals, pictograms or any combination thereof. + + + + + ISO-12620 2.1.2: Any term that represents the same or a very similar concept as the main entry term in a term entry. + + + + + ISO-12620 2.1.18.3: Phraseological unit in a language that expresses the same semantic content as another phrase in that same language. + + + + + Indicates the marked text is a term. + + + + + ISO-12620 2.1.11: A form of a term resulting from an operation whereby the characters of one writing system are represented by characters from another writing system, taking into account the pronunciation of the characters converted. + + + + + ISO-12620 2.1.10: A form of a term resulting from an operation whereby the characters of an alphabetic writing system are represented by characters from another alphabetic writing system. + + + + + ISO-12620 2.1.8.5: An abbreviated form of a term resulting from the omission of one or more term elements or syllables (e.g. 'flu' for 'influenza'). + + + + + ISO-12620 2.1.9: One of the alternate forms of a term. + + + + + + + Values for the attribute 'restype'. + + + + + Indicates a Windows RC AUTO3STATE control. + + + + + Indicates a Windows RC AUTOCHECKBOX control. + + + + + Indicates a Windows RC AUTORADIOBUTTON control. + + + + + Indicates a Windows RC BEDIT control. + + + + + Indicates a bitmap, for example a BITMAP resource in Windows. + + + + + Indicates a button object, for example a BUTTON control Windows. + + + + + Indicates a caption, such as the caption of a dialog box. + + + + + Indicates the cell in a table, for example the content of the <td> element in HTML. + + + + + Indicates check box object, for example a CHECKBOX control in Windows. + + + + + Indicates a menu item with an associated checkbox. + + + + + Indicates a list box, but with a check-box for each item. + + + + + Indicates a color selection dialog. + + + + + Indicates a combination of edit box and listbox object, for example a COMBOBOX control in Windows. + + + + + Indicates an initialization entry of an extended combobox DLGINIT resource block. (code 0x1234). + + + + + Indicates an initialization entry of a combobox DLGINIT resource block (code 0x0403). + + + + + Indicates a UI base class element that cannot be represented by any other element. + + + + + Indicates a context menu. + + + + + Indicates a Windows RC CTEXT control. + + + + + Indicates a cursor, for example a CURSOR resource in Windows. + + + + + Indicates a date/time picker. + + + + + Indicates a Windows RC DEFPUSHBUTTON control. + + + + + Indicates a dialog box. + + + + + Indicates a Windows RC DLGINIT resource block. + + + + + Indicates an edit box object, for example an EDIT control in Windows. + + + + + Indicates a filename. + + + + + Indicates a file dialog. + + + + + Indicates a footnote. + + + + + Indicates a font name. + + + + + Indicates a footer. + + + + + Indicates a frame object. + + + + + Indicates a XUL grid element. + + + + + Indicates a groupbox object, for example a GROUPBOX control in Windows. + + + + + Indicates a header item. + + + + + Indicates a heading, such has the content of <h1>, <h2>, etc. in HTML. + + + + + Indicates a Windows RC HEDIT control. + + + + + Indicates a horizontal scrollbar. + + + + + Indicates an icon, for example an ICON resource in Windows. + + + + + Indicates a Windows RC IEDIT control. + + + + + Indicates keyword list, such as the content of the Keywords meta-data in HTML, or a K footnote in WinHelp RTF. + + + + + Indicates a label object. + + + + + Indicates a label that is also a HTML link (not necessarily a URL). + + + + + Indicates a list (a group of list-items, for example an <ol> or <ul> element in HTML). + + + + + Indicates a listbox object, for example an LISTBOX control in Windows. + + + + + Indicates an list item (an entry in a list). + + + + + Indicates a Windows RC LTEXT control. + + + + + Indicates a menu (a group of menu-items). + + + + + Indicates a toolbar containing one or more tope level menus. + + + + + Indicates a menu item (an entry in a menu). + + + + + Indicates a XUL menuseparator element. + + + + + Indicates a message, for example an entry in a MESSAGETABLE resource in Windows. + + + + + Indicates a calendar control. + + + + + Indicates an edit box beside a spin control. + + + + + Indicates a catch all for rectangular areas. + + + + + Indicates a standalone menu not necessarily associated with a menubar. + + + + + Indicates a pushbox object, for example a PUSHBOX control in Windows. + + + + + Indicates a Windows RC PUSHBUTTON control. + + + + + Indicates a radio button object. + + + + + Indicates a menuitem with associated radio button. + + + + + Indicates raw data resources for an application. + + + + + Indicates a row in a table. + + + + + Indicates a Windows RC RTEXT control. + + + + + Indicates a user navigable container used to show a portion of a document. + + + + + Indicates a generic divider object (e.g. menu group separator). + + + + + Windows accelerators, shortcuts in resource or property files. + + + + + Indicates a UI control to indicate process activity but not progress. + + + + + Indicates a splitter bar. + + + + + Indicates a Windows RC STATE3 control. + + + + + Indicates a window for providing feedback to the users, like 'read-only', etc. + + + + + Indicates a string, for example an entry in a STRINGTABLE resource in Windows. + + + + + Indicates a layers of controls with a tab to select layers. + + + + + Indicates a display and edits regular two-dimensional tables of cells. + + + + + Indicates a XUL textbox element. + + + + + Indicates a UI button that can be toggled to on or off state. + + + + + Indicates an array of controls, usually buttons. + + + + + Indicates a pop up tool tip text. + + + + + Indicates a bar with a pointer indicating a position within a certain range. + + + + + Indicates a control that displays a set of hierarchical data. + + + + + Indicates a URI (URN or URL). + + + + + Indicates a Windows RC USERBUTTON control. + + + + + Indicates a user-defined control like CONTROL control in Windows. + + + + + Indicates the text of a variable. + + + + + Indicates version information about a resource like VERSIONINFO in Windows. + + + + + Indicates a vertical scrollbar. + + + + + Indicates a graphical window. + + + + + + + Values for the attribute 'size-unit'. + + + + + Indicates a size in 8-bit bytes. + + + + + Indicates a size in Unicode characters. + + + + + Indicates a size in columns. Used for HTML text area. + + + + + Indicates a size in centimeters. + + + + + Indicates a size in dialog units, as defined in Windows resources. + + + + + Indicates a size in 'font-size' units (as defined in CSS). + + + + + Indicates a size in 'x-height' units (as defined in CSS). + + + + + Indicates a size in glyphs. A glyph is considered to be one or more combined Unicode characters that represent a single displayable text character. Sometimes referred to as a 'grapheme cluster' + + + + + Indicates a size in inches. + + + + + Indicates a size in millimeters. + + + + + Indicates a size in percentage. + + + + + Indicates a size in pixels. + + + + + Indicates a size in point. + + + + + Indicates a size in rows. Used for HTML text area. + + + + + + + Values for the attribute 'state'. + + + + + Indicates the terminating state. + + + + + Indicates only non-textual information needs adaptation. + + + + + Indicates both text and non-textual information needs adaptation. + + + + + Indicates only non-textual information needs review. + + + + + Indicates both text and non-textual information needs review. + + + + + Indicates that only the text of the item needs to be reviewed. + + + + + Indicates that the item needs to be translated. + + + + + Indicates that the item is new. For example, translation units that were not in a previous version of the document. + + + + + Indicates that changes are reviewed and approved. + + + + + Indicates that the item has been translated. + + + + + + + Values for the attribute 'state-qualifier'. + + + + + Indicates an exact match. An exact match occurs when a source text of a segment is exactly the same as the source text of a segment that was translated previously. + + + + + Indicates a fuzzy match. A fuzzy match occurs when a source text of a segment is very similar to the source text of a segment that was translated previously (e.g. when the difference is casing, a few changed words, white-space discripancy, etc.). + + + + + Indicates a match based on matching IDs (in addition to matching text). + + + + + Indicates a translation derived from a glossary. + + + + + Indicates a translation derived from existing translation. + + + + + Indicates a translation derived from machine translation. + + + + + Indicates a translation derived from a translation repository. + + + + + Indicates a translation derived from a translation memory. + + + + + Indicates the translation is suggested by machine translation. + + + + + Indicates that the item has been rejected because of incorrect grammar. + + + + + Indicates that the item has been rejected because it is incorrect. + + + + + Indicates that the item has been rejected because it is too long or too short. + + + + + Indicates that the item has been rejected because of incorrect spelling. + + + + + Indicates the translation is suggested by translation memory. + + + + + + + Values for the attribute 'unit'. + + + + + Refers to words. + + + + + Refers to pages. + + + + + Refers to <trans-unit> elements. + + + + + Refers to <bin-unit> elements. + + + + + Refers to glyphs. + + + + + Refers to <trans-unit> and/or <bin-unit> elements. + + + + + Refers to the occurrences of instances defined by the count-type value. + + + + + Refers to characters. + + + + + Refers to lines. + + + + + Refers to sentences. + + + + + Refers to paragraphs. + + + + + Refers to segments. + + + + + Refers to placeables (inline elements). + + + + + + + Values for the attribute 'priority'. + + + + + Highest priority. + + + + + High priority. + + + + + High priority, but not as important as 2. + + + + + High priority, but not as important as 3. + + + + + Medium priority, but more important than 6. + + + + + Medium priority, but less important than 5. + + + + + Low priority, but more important than 8. + + + + + Low priority, but more important than 9. + + + + + Low priority. + + + + + Lowest priority. + + + + + + + + + This value indicates that all properties can be reformatted. This value must be used alone. + + + + + This value indicates that no properties should be reformatted. This value must be used alone. + + + + + + + + + + + + + This value indicates that all information in the coord attribute can be modified. + + + + + This value indicates that the x information in the coord attribute can be modified. + + + + + This value indicates that the y information in the coord attribute can be modified. + + + + + This value indicates that the cx information in the coord attribute can be modified. + + + + + This value indicates that the cy information in the coord attribute can be modified. + + + + + This value indicates that all the information in the font attribute can be modified. + + + + + This value indicates that the name information in the font attribute can be modified. + + + + + This value indicates that the size information in the font attribute can be modified. + + + + + This value indicates that the weight information in the font attribute can be modified. + + + + + This value indicates that the information in the css-style attribute can be modified. + + + + + This value indicates that the information in the style attribute can be modified. + + + + + This value indicates that the information in the exstyle attribute can be modified. + + + + + + + + + + + + + Indicates that the context is informational in nature, specifying for example, how a term should be translated. Thus, should be displayed to anyone editing the XLIFF document. + + + + + Indicates that the context-group is used to specify where the term was found in the translatable source. Thus, it is not displayed. + + + + + Indicates that the context information should be used during translation memory lookups. Thus, it is not displayed. + + + + + + + + + Represents a translation proposal from a translation memory or other resource. + + + + + Represents a previous version of the target element. + + + + + Represents a rejected version of the target element. + + + + + Represents a translation to be used for reference purposes only, for example from a related product or a different language. + + + + + Represents a proposed translation that was used for the translation of the trans-unit, possibly modified. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Values for the attribute 'coord'. + + + + + + + + Version values: 1.0 and 1.1 are allowed for backward compatibility. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php new file mode 100644 index 00000000..3e02cb43 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationDumperPassTest.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Translation\DependencyInjection\TranslationDumperPass; + +class TranslationDumperPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + $writerDefinition = $container->register('translation.writer'); + $container->register('foo.id') + ->addTag('translation.dumper', array('alias' => 'bar.alias')); + + $translationDumperPass = new TranslationDumperPass(); + $translationDumperPass->process($container); + + $this->assertEquals(array(array('addDumper', array('bar.alias', new Reference('foo.id')))), $writerDefinition->getMethodCalls()); + } + + public function testProcessNoDefinitionFound() + { + $container = new ContainerBuilder(); + + $definitionsBefore = count($container->getDefinitions()); + $aliasesBefore = count($container->getAliases()); + + $translationDumperPass = new TranslationDumperPass(); + $translationDumperPass->process($container); + + // the container is untouched (i.e. no new definitions or aliases) + $this->assertCount($definitionsBefore, $container->getDefinitions()); + $this->assertCount($aliasesBefore, $container->getAliases()); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php new file mode 100644 index 00000000..b3313e63 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationExtractorPassTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Translation\DependencyInjection\TranslationExtractorPass; + +class TranslationExtractorPassTest extends TestCase +{ + public function testProcess() + { + $container = new ContainerBuilder(); + $extractorDefinition = $container->register('translation.extractor'); + $container->register('foo.id') + ->addTag('translation.extractor', array('alias' => 'bar.alias')); + + $translationDumperPass = new TranslationExtractorPass(); + $translationDumperPass->process($container); + + $this->assertEquals(array(array('addExtractor', array('bar.alias', new Reference('foo.id')))), $extractorDefinition->getMethodCalls()); + } + + public function testProcessNoDefinitionFound() + { + $container = new ContainerBuilder(); + + $definitionsBefore = count($container->getDefinitions()); + $aliasesBefore = count($container->getAliases()); + + $translationDumperPass = new TranslationExtractorPass(); + $translationDumperPass->process($container); + + // the container is untouched (i.e. no new definitions or aliases) + $this->assertCount($definitionsBefore, $container->getDefinitions()); + $this->assertCount($aliasesBefore, $container->getAliases()); + } + + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException + * @expectedExceptionMessage The alias for the tag "translation.extractor" of service "foo.id" must be set. + */ + public function testProcessMissingAlias() + { + $definition = $this->getMockBuilder('Symfony\Component\DependencyInjection\Definition')->disableOriginalConstructor()->getMock(); + $container = new ContainerBuilder(); + $container->register('translation.extractor'); + $container->register('foo.id') + ->addTag('translation.extractor', array()); + + $definition->expects($this->never())->method('addMethodCall'); + + $translationDumperPass = new TranslationExtractorPass(); + $translationDumperPass->process($container); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationPassTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationPassTest.php new file mode 100644 index 00000000..4082d169 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/DependencyInjection/TranslationPassTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\DependencyInjection; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument; +use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\Translation\DependencyInjection\TranslatorPass; + +class TranslationPassTest extends TestCase +{ + public function testValidCollector() + { + $loader = (new Definition()) + ->addTag('translation.loader', array('alias' => 'xliff', 'legacy-alias' => 'xlf')); + + $reader = new Definition(); + + $translator = (new Definition()) + ->setArguments(array(null, null, null, null)); + + $container = new ContainerBuilder(); + $container->setDefinition('translator.default', $translator); + $container->setDefinition('translation.reader', $reader); + $container->setDefinition('translation.xliff_loader', $loader); + + $pass = new TranslatorPass('translator.default', 'translation.reader'); + $pass->process($container); + + $expectedReader = (new Definition()) + ->addMethodCall('addLoader', array('xliff', new Reference('translation.xliff_loader'))) + ->addMethodCall('addLoader', array('xlf', new Reference('translation.xliff_loader'))) + ; + $this->assertEquals($expectedReader, $reader); + + $expectedLoader = (new Definition()) + ->addTag('translation.loader', array('alias' => 'xliff', 'legacy-alias' => 'xlf')) + ; + $this->assertEquals($expectedLoader, $loader); + + $this->assertSame(array('translation.xliff_loader' => array('xliff', 'xlf')), $translator->getArgument(3)); + + $expected = array('translation.xliff_loader' => new ServiceClosureArgument(new Reference('translation.xliff_loader'))); + $this->assertEquals($expected, $container->getDefinition((string) $translator->getArgument(0))->getArgument(0)); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php index 9ed4c91e..25b85610 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/FileDumperTest.php @@ -28,29 +28,8 @@ class FileDumperTest extends TestCase $dumper->dump($catalogue, array('path' => $tempDir)); $this->assertFileExists($tempDir.'/messages.en.concrete'); - } - - /** - * @group legacy - */ - public function testDumpBackupsFileIfExisting() - { - $tempDir = sys_get_temp_dir(); - $file = $tempDir.'/messages.en.concrete'; - $backupFile = $file.'~'; - @touch($file); - - $catalogue = new MessageCatalogue('en'); - $catalogue->add(array('foo' => 'bar')); - - $dumper = new ConcreteFileDumper(); - $dumper->dump($catalogue, array('path' => $tempDir)); - - $this->assertFileExists($backupFile); - - @unlink($file); - @unlink($backupFile); + @unlink($tempDir.'/messages.en.concrete'); } public function testDumpCreatesNestedDirectoriesAndFile() diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php index 5764dff5..738d4b3b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Dumper/XliffFileDumperTest.php @@ -87,4 +87,29 @@ class XliffFileDumperTest extends TestCase $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR')) ); } + + public function testFormatCatalogueWithNotesMetadata() + { + $catalogue = new MessageCatalogue('en_US'); + $catalogue->add(array( + 'foo' => 'bar', + 'baz' => 'biz', + )); + $catalogue->setMetadata('foo', array('notes' => array( + array('category' => 'state', 'content' => 'new'), + array('category' => 'approved', 'content' => 'true'), + array('category' => 'section', 'content' => 'user login', 'priority' => '1'), + ))); + $catalogue->setMetadata('baz', array('notes' => array( + array('id' => 'x', 'content' => 'x_content'), + array('appliesTo' => 'target', 'category' => 'quality', 'content' => 'Fuzzy'), + ))); + + $dumper = new XliffFileDumper(); + + $this->assertStringEqualsFile( + __DIR__.'/../fixtures/resources-notes-meta.xlf', + $dumper->formatCatalogue($catalogue, 'messages', array('default_locale' => 'fr_FR', 'xliff_version' => '2.0')) + ); + } } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Extractor/PhpExtractorTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Extractor/PhpExtractorTest.php new file mode 100644 index 00000000..3487dd62 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Extractor/PhpExtractorTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Extractor; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Extractor\PhpExtractor; +use Symfony\Component\Translation\MessageCatalogue; + +class PhpExtractorTest extends TestCase +{ + /** + * @dataProvider resourcesProvider + * + * @param array|string $resource + */ + public function testExtraction($resource) + { + // Arrange + $extractor = new PhpExtractor(); + $extractor->setPrefix('prefix'); + $catalogue = new MessageCatalogue('en'); + + // Act + $extractor->extract($resource, $catalogue); + + $expectedHeredoc = << array( + 'single-quoted key' => 'prefixsingle-quoted key', + 'double-quoted key' => 'prefixdouble-quoted key', + 'heredoc key' => 'prefixheredoc key', + 'nowdoc key' => 'prefixnowdoc key', + "double-quoted key with whitespace and escaped \$\n\" sequences" => "prefixdouble-quoted key with whitespace and escaped \$\n\" sequences", + 'single-quoted key with whitespace and nonescaped \$\n\' sequences' => 'prefixsingle-quoted key with whitespace and nonescaped \$\n\' sequences', + 'single-quoted key with "quote mark at the end"' => 'prefixsingle-quoted key with "quote mark at the end"', + $expectedHeredoc => 'prefix'.$expectedHeredoc, + $expectedNowdoc => 'prefix'.$expectedNowdoc, + '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples' => 'prefix{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples', + ), + 'not_messages' => array( + 'other-domain-test-no-params-short-array' => 'prefixother-domain-test-no-params-short-array', + 'other-domain-test-no-params-long-array' => 'prefixother-domain-test-no-params-long-array', + 'other-domain-test-params-short-array' => 'prefixother-domain-test-params-short-array', + 'other-domain-test-params-long-array' => 'prefixother-domain-test-params-long-array', + 'other-domain-test-trans-choice-short-array-%count%' => 'prefixother-domain-test-trans-choice-short-array-%count%', + 'other-domain-test-trans-choice-long-array-%count%' => 'prefixother-domain-test-trans-choice-long-array-%count%', + 'typecast' => 'prefixtypecast', + 'msg1' => 'prefixmsg1', + 'msg2' => 'prefixmsg2', + ), + ); + $actualCatalogue = $catalogue->all(); + + $this->assertEquals($expectedCatalogue, $actualCatalogue); + } + + public function resourcesProvider() + { + $directory = __DIR__.'/../fixtures/extractor/'; + $splFiles = array(); + foreach (new \DirectoryIterator($directory) as $fileInfo) { + if ($fileInfo->isDot()) { + continue; + } + if ('translation.html.php' === $fileInfo->getBasename()) { + $phpFile = $fileInfo->getPathname(); + } + $splFiles[] = $fileInfo->getFileInfo(); + } + + return array( + array($directory), + array($phpFile), + array(glob($directory.'*')), + array($splFiles), + array(new \ArrayObject(glob($directory.'*'))), + array(new \ArrayObject($splFiles)), + ); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Formatter/MessageFormatterTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Formatter/MessageFormatterTest.php new file mode 100644 index 00000000..1fa736e7 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Formatter/MessageFormatterTest.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Tests\Formatter; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Translation\Formatter\MessageFormatter; + +class MessageFormatterTest extends TestCase +{ + /** + * @dataProvider getTransMessages + */ + public function testFormat($expected, $message, $parameters = array()) + { + $this->assertEquals($expected, $this->getMessageFormatter()->format($message, 'en', $parameters)); + } + + /** + * @dataProvider getTransChoiceMessages + */ + public function testFormatPlural($expected, $message, $number, $parameters) + { + $this->assertEquals($expected, $this->getMessageFormatter()->choiceFormat($message, $number, 'fr', $parameters)); + } + + public function getTransMessages() + { + return array( + array( + 'There is one apple', + 'There is one apple', + ), + array( + 'There are 5 apples', + 'There are %count% apples', + array('%count%' => 5), + ), + array( + 'There are 5 apples', + 'There are {{count}} apples', + array('{{count}}' => 5), + ), + ); + } + + public function getTransChoiceMessages() + { + return array( + array('Il y a 0 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0)), + array('Il y a 1 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 1, array('%count%' => 1)), + array('Il y a 10 pommes', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 10, array('%count%' => 10)), + + array('Il y a 0 pomme', 'Il y a %count% pomme|Il y a %count% pommes', 0, array('%count%' => 0)), + array('Il y a 1 pomme', 'Il y a %count% pomme|Il y a %count% pommes', 1, array('%count%' => 1)), + array('Il y a 10 pommes', 'Il y a %count% pomme|Il y a %count% pommes', 10, array('%count%' => 10)), + + array('Il y a 0 pomme', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0)), + array('Il y a 1 pomme', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1)), + array('Il y a 10 pommes', 'one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10)), + + array('Il n\'y a aucune pomme', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 0, array('%count%' => 0)), + array('Il y a 1 pomme', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 1, array('%count%' => 1)), + array('Il y a 10 pommes', '{0} Il n\'y a aucune pomme|one: Il y a %count% pomme|more: Il y a %count% pommes', 10, array('%count%' => 10)), + + array('Il y a 0 pomme', '[0,1] Il y a %count% pomme|]1,Inf] Il y a %count% pommes', 0, array('%count%' => 0)), + ); + } + + private function getMessageFormatter() + { + return new MessageFormatter(); + } +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php index 32351d34..a8182895 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php @@ -188,4 +188,73 @@ class XliffFileLoaderTest extends TestCase // target attributes $this->assertEquals(array('target-attributes' => array('order' => 1)), $catalogue->getMetadata('bar', 'domain1')); } + + public function testLoadVersion2WithNoteMeta() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources-notes-meta.xlf'; + $catalogue = $loader->load($resource, 'en', 'domain1'); + + $this->assertEquals('en', $catalogue->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); + $this->assertSame(array(), libxml_get_errors()); + + // test for "foo" metadata + $this->assertTrue($catalogue->defines('foo', 'domain1')); + $metadata = $catalogue->getMetadata('foo', 'domain1'); + $this->assertNotEmpty($metadata); + $this->assertCount(3, $metadata['notes']); + + $this->assertEquals('state', $metadata['notes'][0]['category']); + $this->assertEquals('new', $metadata['notes'][0]['content']); + + $this->assertEquals('approved', $metadata['notes'][1]['category']); + $this->assertEquals('true', $metadata['notes'][1]['content']); + + $this->assertEquals('section', $metadata['notes'][2]['category']); + $this->assertEquals('1', $metadata['notes'][2]['priority']); + $this->assertEquals('user login', $metadata['notes'][2]['content']); + + // test for "baz" metadata + $this->assertTrue($catalogue->defines('baz', 'domain1')); + $metadata = $catalogue->getMetadata('baz', 'domain1'); + $this->assertNotEmpty($metadata); + $this->assertCount(2, $metadata['notes']); + + $this->assertEquals('x', $metadata['notes'][0]['id']); + $this->assertEquals('x_content', $metadata['notes'][0]['content']); + + $this->assertEquals('target', $metadata['notes'][1]['appliesTo']); + $this->assertEquals('quality', $metadata['notes'][1]['category']); + $this->assertEquals('Fuzzy', $metadata['notes'][1]['content']); + } + + public function testLoadVersion2WithMultiSegmentUnit() + { + $loader = new XliffFileLoader(); + $resource = __DIR__.'/../fixtures/resources-2.0-multi-segment-unit.xlf'; + $catalog = $loader->load($resource, 'en', 'domain1'); + + $this->assertSame('en', $catalog->getLocale()); + $this->assertEquals(array(new FileResource($resource)), $catalog->getResources()); + $this->assertFalse(libxml_get_last_error()); + + // test for "foo" metadata + $this->assertTrue($catalog->defines('foo', 'domain1')); + $metadata = $catalog->getMetadata('foo', 'domain1'); + $this->assertNotEmpty($metadata); + $this->assertCount(1, $metadata['notes']); + + $this->assertSame('processed', $metadata['notes'][0]['category']); + $this->assertSame('true', $metadata['notes'][0]['content']); + + // test for "bar" metadata + $this->assertTrue($catalog->defines('bar', 'domain1')); + $metadata = $catalog->getMetadata('bar', 'domain1'); + $this->assertNotEmpty($metadata); + $this->assertCount(1, $metadata['notes']); + + $this->assertSame('processed', $metadata['notes'][0]['category']); + $this->assertSame('true', $metadata['notes'][0]['content']); + } } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/MessageSelectorTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/MessageSelectorTest.php index a9b92c5c..42b7e0a3 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/MessageSelectorTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/MessageSelectorTest.php @@ -128,6 +128,10 @@ class MessageSelectorTest extends TestCase array("This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1), // esacape pipe array('This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0), + // Empty plural set (2 plural forms) from a .PO file + array('', '|', 1), + // Empty plural set (3 plural forms) from a .PO file + array('', '||', 1), ); } } diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/PluralizationRulesTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/PluralizationRulesTest.php index 8a6723ea..a0624e29 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/PluralizationRulesTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/PluralizationRulesTest.php @@ -91,8 +91,8 @@ class PluralizationRulesTest extends TestCase /** * We validate only on the plural coverage. Thus the real rules is not tested. * - * @param string $nplural plural expected - * @param array $matrix containing langcodes and their plural index values + * @param string $nplural Plural expected + * @param array $matrix Containing langcodes and their plural index values * @param bool $expectSuccess */ protected function validateMatrix($nplural, $matrix, $expectSuccess = true) diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/TranslatorTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/TranslatorTest.php index 2394fdb4..d30ea587 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/TranslatorTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/TranslatorTest.php @@ -13,7 +13,6 @@ namespace Symfony\Component\Translation\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Translation\Translator; -use Symfony\Component\Translation\MessageSelector; use Symfony\Component\Translation\Loader\ArrayLoader; use Symfony\Component\Translation\MessageCatalogue; @@ -25,7 +24,7 @@ class TranslatorTest extends TestCase */ public function testConstructorInvalidLocale($locale) { - $translator = new Translator($locale, new MessageSelector()); + new Translator($locale); } /** @@ -33,14 +32,14 @@ class TranslatorTest extends TestCase */ public function testConstructorValidLocale($locale) { - $translator = new Translator($locale, new MessageSelector()); + $translator = new Translator($locale); $this->assertEquals($locale, $translator->getLocale()); } public function testConstructorWithoutLocale() { - $translator = new Translator(null, new MessageSelector()); + $translator = new Translator(null); $this->assertNull($translator->getLocale()); } @@ -61,7 +60,7 @@ class TranslatorTest extends TestCase */ public function testSetInvalidLocale($locale) { - $translator = new Translator('fr', new MessageSelector()); + $translator = new Translator('fr'); $translator->setLocale($locale); } @@ -70,7 +69,7 @@ class TranslatorTest extends TestCase */ public function testSetValidLocale($locale) { - $translator = new Translator($locale, new MessageSelector()); + $translator = new Translator($locale); $translator->setLocale($locale); $this->assertEquals($locale, $translator->getLocale()); @@ -144,7 +143,7 @@ class TranslatorTest extends TestCase */ public function testSetFallbackInvalidLocales($locale) { - $translator = new Translator('fr', new MessageSelector()); + $translator = new Translator('fr'); $translator->setFallbackLocales(array('fr', $locale)); } @@ -153,7 +152,7 @@ class TranslatorTest extends TestCase */ public function testSetFallbackValidLocales($locale) { - $translator = new Translator($locale, new MessageSelector()); + $translator = new Translator($locale); $translator->setFallbackLocales(array('fr', $locale)); // no assertion. this method just asserts that no exception is thrown $this->addToAssertionCount(1); @@ -176,7 +175,7 @@ class TranslatorTest extends TestCase */ public function testAddResourceInvalidLocales($locale) { - $translator = new Translator('fr', new MessageSelector()); + $translator = new Translator('fr'); $translator->addResource('array', array('foo' => 'foofoo'), $locale); } @@ -185,7 +184,7 @@ class TranslatorTest extends TestCase */ public function testAddResourceValidLocales($locale) { - $translator = new Translator('fr', new MessageSelector()); + $translator = new Translator('fr'); $translator->addResource('array', array('foo' => 'foofoo'), $locale); // no assertion. this method just asserts that no exception is thrown $this->addToAssertionCount(1); @@ -288,7 +287,7 @@ class TranslatorTest extends TestCase public function testFallbackCatalogueResources() { - $translator = new Translator('en_GB', new MessageSelector()); + $translator = new Translator('en_GB'); $translator->addLoader('yml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); $translator->addResource('yml', __DIR__.'/fixtures/empty.yml', 'en_GB'); $translator->addResource('yml', __DIR__.'/fixtures/resources.yml', 'en'); @@ -324,7 +323,7 @@ class TranslatorTest extends TestCase */ public function testTransInvalidLocale($locale) { - $translator = new Translator('en', new MessageSelector()); + $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array('foo' => 'foofoo'), 'en'); @@ -336,7 +335,7 @@ class TranslatorTest extends TestCase */ public function testTransValidLocale($locale) { - $translator = new Translator($locale, new MessageSelector()); + $translator = new Translator($locale); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array('test' => 'OK'), $locale); @@ -374,7 +373,7 @@ class TranslatorTest extends TestCase */ public function testTransChoiceInvalidLocale($locale) { - $translator = new Translator('en', new MessageSelector()); + $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array('foo' => 'foofoo'), 'en'); @@ -386,7 +385,7 @@ class TranslatorTest extends TestCase */ public function testTransChoiceValidLocale($locale) { - $translator = new Translator('en', new MessageSelector()); + $translator = new Translator('en'); $translator->addLoader('array', new ArrayLoader()); $translator->addResource('array', array('foo' => 'foofoo'), 'en'); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php index 2d2aec7c..c7a7668f 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/Writer/TranslationWriterTest.php @@ -18,7 +18,7 @@ use Symfony\Component\Translation\Writer\TranslationWriter; class TranslationWriterTest extends TestCase { - public function testWriteTranslations() + public function testWrite() { $dumper = $this->getMockBuilder('Symfony\Component\Translation\Dumper\DumperInterface')->getMock(); $dumper @@ -27,7 +27,7 @@ class TranslationWriterTest extends TestCase $writer = new TranslationWriter(); $writer->addDumper('test', $dumper); - $writer->writeTranslations(new MessageCatalogue(array()), 'test'); + $writer->write(new MessageCatalogue('en'), 'test'); } public function testDisableBackup() diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/resource.format.engine b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/resource.format.engine new file mode 100644 index 00000000..e69de29b diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/this.is.a.template.format.engine b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/this.is.a.template.format.engine new file mode 100644 index 00000000..e69de29b diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/translation.html.php b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/translation.html.php new file mode 100644 index 00000000..1ce8ea94 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/extractor/translation.html.php @@ -0,0 +1,49 @@ +This template is used for translation message extraction tests +trans('single-quoted key'); ?> +trans('double-quoted key'); ?> +trans(<<<'EOF' +heredoc key +EOF +); ?> +trans(<<<'EOF' +nowdoc key +EOF +); ?> +trans( + "double-quoted key with whitespace and escaped \$\n\" sequences" +); ?> +trans( + 'single-quoted key with whitespace and nonescaped \$\n\' sequences' +); ?> +trans(<< +trans(<<<'EOF' +nowdoc key with whitespace and nonescaped \$\n sequences +EOF +); ?> + +trans('single-quoted key with "quote mark at the end"'); ?> + +transChoice( + '{0} There is no apples|{1} There is one apple|]1,Inf[ There are %count% apples', + 10, + array('%count%' => 10) +); ?> + +trans('other-domain-test-no-params-short-array', array(), 'not_messages'); ?> + +trans('other-domain-test-no-params-long-array', array(), 'not_messages'); ?> + +trans('other-domain-test-params-short-array', array('foo' => 'bar'), 'not_messages'); ?> + +trans('other-domain-test-params-long-array', array('foo' => 'bar'), 'not_messages'); ?> + +transChoice('other-domain-test-trans-choice-short-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?> + +transChoice('other-domain-test-trans-choice-long-array-%count%', 10, array('%count%' => 10), 'not_messages'); ?> + +trans('typecast', array('a' => (int) '123'), 'not_messages'); ?> +transChoice('msg1', 10 + 1, array(), 'not_messages'); ?> +transChoice('msg2', ceil(4.5), array(), 'not_messages'); ?> diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf index 2efa155e..06047dde 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-clean.xlf @@ -1,19 +1,19 @@ - + foo bar - + key - + key.with.cdata & ]]> diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-multi-segment-unit.xlf b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-multi-segment-unit.xlf new file mode 100644 index 00000000..d0dc2a8a --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-2.0-multi-segment-unit.xlf @@ -0,0 +1,17 @@ + + + + + true + + + foo + foo (translated) + + + bar + bar (translated) + + + + diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf index 436e19ec..00c8a5c2 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-clean.xlf @@ -5,18 +5,18 @@ - + foo bar baz - + key baz qux - + key.with.cdata & ]]> diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-notes-meta.xlf b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-notes-meta.xlf new file mode 100644 index 00000000..e9995fa8 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-notes-meta.xlf @@ -0,0 +1,26 @@ + + + + + + new + true + user login + + + foo + bar + + + + + x_content + Fuzzy + + + baz + biz + + + + diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf index e3afb498..700d2818 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-target-attributes.xlf @@ -5,7 +5,7 @@ - + foo bar diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf index 1ed06d2a..1c2ae954 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Tests/fixtures/resources-tool-info.xlf @@ -5,7 +5,7 @@ - + foo bar diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Translator.php b/wp-content/themes/physioassist/vendor/symfony/translation/Translator.php index 5f8eb033..2899db01 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Translator.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Translator.php @@ -14,14 +14,16 @@ namespace Symfony\Component\Translation; use Symfony\Component\Translation\Loader\LoaderInterface; use Symfony\Component\Translation\Exception\NotFoundResourceException; use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Translation\Exception\LogicException; use Symfony\Component\Translation\Exception\RuntimeException; use Symfony\Component\Config\ConfigCacheInterface; use Symfony\Component\Config\ConfigCacheFactoryInterface; use Symfony\Component\Config\ConfigCacheFactory; +use Symfony\Component\Translation\Formatter\MessageFormatterInterface; +use Symfony\Component\Translation\Formatter\ChoiceMessageFormatterInterface; +use Symfony\Component\Translation\Formatter\MessageFormatter; /** - * Translator. - * * @author Fabien Potencier */ class Translator implements TranslatorInterface, TranslatorBagInterface @@ -52,9 +54,9 @@ class Translator implements TranslatorInterface, TranslatorBagInterface private $resources = array(); /** - * @var MessageSelector + * @var MessageFormatterInterface */ - private $selector; + private $formatter; /** * @var string @@ -72,28 +74,21 @@ class Translator implements TranslatorInterface, TranslatorBagInterface private $configCacheFactory; /** - * Constructor. - * - * @param string $locale The locale - * @param MessageSelector|null $selector The message selector for pluralization - * @param string|null $cacheDir The directory to use for the cache - * @param bool $debug Use cache in debug mode ? - * * @throws InvalidArgumentException If a locale contains invalid characters */ - public function __construct($locale, MessageSelector $selector = null, $cacheDir = null, $debug = false) + public function __construct(?string $locale, MessageFormatterInterface $formatter = null, string $cacheDir = null, bool $debug = false) { $this->setLocale($locale); - $this->selector = $selector ?: new MessageSelector(); + + if (null === $formatter) { + $formatter = new MessageFormatter(); + } + + $this->formatter = $formatter; $this->cacheDir = $cacheDir; $this->debug = $debug; } - /** - * Sets the ConfigCache factory to use. - * - * @param ConfigCacheFactoryInterface $configCacheFactory - */ public function setConfigCacheFactory(ConfigCacheFactoryInterface $configCacheFactory) { $this->configCacheFactory = $configCacheFactory; @@ -192,7 +187,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface $domain = 'messages'; } - return strtr($this->getCatalogue($locale)->get((string) $id, $domain), $parameters); + return $this->formatter->format($this->getCatalogue($locale)->get((string) $id, $domain), $locale, $parameters); } /** @@ -200,9 +195,9 @@ class Translator implements TranslatorInterface, TranslatorBagInterface */ public function transChoice($id, $number, array $parameters = array(), $domain = null, $locale = null) { - $parameters = array_merge(array( - '%count%' => $number, - ), $parameters); + if (!$this->formatter instanceof ChoiceMessageFormatterInterface) { + throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', get_class($this->formatter))); + } if (null === $domain) { $domain = 'messages'; @@ -220,7 +215,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface } } - return strtr($this->selector->choose($catalogue->get($id, $domain), (int) $number, $locale), $parameters); + return $this->formatter->choiceFormat($catalogue->get($id, $domain), $number, $locale, $parameters); } /** @@ -280,10 +275,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface $this->loadFallbackCatalogues($locale); } - /** - * @param string $locale - */ - private function initializeCacheCatalogue($locale) + private function initializeCacheCatalogue(string $locale): void { if (isset($this->catalogues[$locale])) { /* Catalogue already initialized. */ @@ -306,7 +298,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface $this->catalogues[$locale] = include $cache->getPath(); } - private function dumpCatalogue($locale, ConfigCacheInterface $cache) + private function dumpCatalogue($locale, ConfigCacheInterface $cache): void { $this->initializeCatalogue($locale); $fallbackContent = $this->getFallbackContent($this->catalogues[$locale]); @@ -331,7 +323,7 @@ EOF $cache->write($content, $this->catalogues[$locale]->getResources()); } - private function getFallbackContent(MessageCatalogue $catalogue) + private function getFallbackContent(MessageCatalogue $catalogue): string { $fallbackContent = ''; $current = ''; @@ -363,10 +355,10 @@ EOF private function getCatalogueCachePath($locale) { - return $this->cacheDir.'/catalogue.'.$locale.'.'.sha1(serialize($this->fallbackLocales)).'.php'; + return $this->cacheDir.'/catalogue.'.$locale.'.'.strtr(substr(base64_encode(hash('sha256', serialize($this->fallbackLocales), true)), 0, 7), '/', '_').'.php'; } - private function doLoadCatalogue($locale) + private function doLoadCatalogue($locale): void { $this->catalogues[$locale] = new MessageCatalogue($locale); @@ -380,7 +372,7 @@ EOF } } - private function loadFallbackCatalogues($locale) + private function loadFallbackCatalogues($locale): void { $current = $this->catalogues[$locale]; @@ -409,7 +401,7 @@ EOF $locales[] = $fallback; } - if (strrchr($locale, '_') !== false) { + if (false !== strrchr($locale, '_')) { array_unshift($locales, substr($locale, 0, -strlen(strrchr($locale, '_')))); } @@ -433,10 +425,8 @@ EOF /** * Provides the ConfigCache factory implementation, falling back to a * default implementation if necessary. - * - * @return ConfigCacheFactoryInterface $configCacheFactory */ - private function getConfigCacheFactory() + private function getConfigCacheFactory(): ConfigCacheFactoryInterface { if (!$this->configCacheFactory) { $this->configCacheFactory = new ConfigCacheFactory($this->debug); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriter.php b/wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriter.php index 901a8894..56d99cc7 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriter.php +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriter.php @@ -21,13 +21,8 @@ use Symfony\Component\Translation\Exception\RuntimeException; * * @author Michel Salib */ -class TranslationWriter +class TranslationWriter implements TranslationWriterInterface { - /** - * Dumpers used for export. - * - * @var array - */ private $dumpers = array(); /** @@ -46,6 +41,7 @@ class TranslationWriter */ public function disableBackup() { + // to be deprecated in 4.1 foreach ($this->dumpers as $dumper) { if (method_exists($dumper, 'setBackup')) { $dumper->setBackup(false); @@ -66,13 +62,13 @@ class TranslationWriter /** * Writes translation from the catalogue according to the selected format. * - * @param MessageCatalogue $catalogue The message catalogue to dump + * @param MessageCatalogue $catalogue The message catalogue to write * @param string $format The format to use to dump the messages * @param array $options Options that are passed to the dumper * * @throws InvalidArgumentException */ - public function writeTranslations(MessageCatalogue $catalogue, $format, $options = array()) + public function write(MessageCatalogue $catalogue, $format, $options = array()) { if (!isset($this->dumpers[$format])) { throw new InvalidArgumentException(sprintf('There is no dumper associated with format "%s".', $format)); diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriterInterface.php b/wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriterInterface.php new file mode 100644 index 00000000..992ab769 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/translation/Writer/TranslationWriterInterface.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Translation\Writer; + +use Symfony\Component\Translation\Exception\InvalidArgumentException; +use Symfony\Component\Translation\MessageCatalogue; + +/** + * TranslationWriter writes translation messages. + * + * @author Michel Salib + */ +interface TranslationWriterInterface +{ + /** + * Writes translation from the catalogue according to the selected format. + * + * @param MessageCatalogue $catalogue The message catalogue to write + * @param string $format The format to use to dump the messages + * @param array $options Options that are passed to the dumper + * + * @throws InvalidArgumentException + */ + public function write(MessageCatalogue $catalogue, $format, $options = array()); +} diff --git a/wp-content/themes/physioassist/vendor/symfony/translation/composer.json b/wp-content/themes/physioassist/vendor/symfony/translation/composer.json index e107e253..6b609689 100644 --- a/wp-content/themes/physioassist/vendor/symfony/translation/composer.json +++ b/wp-content/themes/physioassist/vendor/symfony/translation/composer.json @@ -16,23 +16,26 @@ } ], "require": { - "php": ">=5.5.9", + "php": "^7.1.3", "symfony/polyfill-mbstring": "~1.0" }, "require-dev": { - "symfony/config": "~2.8|~3.0", - "symfony/intl": "^2.8.18|^3.2.5", - "symfony/yaml": "~3.3", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/intl": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", "psr/log": "~1.0" }, "conflict": { - "symfony/config": "<2.8", - "symfony/yaml": "<3.3" + "symfony/config": "<3.4", + "symfony/dependency-injection": "<3.4", + "symfony/yaml": "<3.4" }, "suggest": { "symfony/config": "", "symfony/yaml": "", - "psr/log": "To use logging capability in translator" + "psr/log-implementation": "To use logging capability in translator" }, "autoload": { "psr-4": { "Symfony\\Component\\Translation\\": "" }, @@ -43,7 +46,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "4.0-dev" } } } diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/CHANGELOG.md b/wp-content/themes/physioassist/vendor/symfony/yaml/CHANGELOG.md index 77438a67..1b07b239 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/CHANGELOG.md +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/CHANGELOG.md @@ -1,6 +1,24 @@ CHANGELOG ========= +3.4.0 +----- + + * added support for parsing YAML files using the `Yaml::parseFile()` or `Parser::parseFile()` method + + * the `Dumper`, `Parser`, and `Yaml` classes are marked as final + + * Deprecated the `!php/object:` tag which will be replaced by the + `!php/object` tag (without the colon) in 4.0. + + * Deprecated the `!php/const:` tag which will be replaced by the + `!php/const` tag (without the colon) in 4.0. + + * Support for the `!str` tag is deprecated, use the `!!str` tag instead. + + * Deprecated using the non-specific tag `!` as its behavior will change in 4.0. + It will force non-evaluating your values in 4.0. Use plain integers or `!!float` instead. + 3.3.0 ----- diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Command/LintCommand.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Command/LintCommand.php index 271f2d84..4f2dc637 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Command/LintCommand.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Command/LintCommand.php @@ -28,6 +28,8 @@ use Symfony\Component\Yaml\Yaml; */ class LintCommand extends Command { + protected static $defaultName = 'lint:yaml'; + private $parser; private $format; private $displayCorrectFiles; @@ -48,10 +50,10 @@ class LintCommand extends Command protected function configure() { $this - ->setName('lint:yaml') ->setDescription('Lints a file and outputs encountered errors') ->addArgument('filename', null, 'A file or a directory or STDIN') ->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format', 'txt') + ->addOption('parse-tags', null, InputOption::VALUE_NONE, 'Parse custom tags') ->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT the first encountered syntax error. @@ -80,13 +82,14 @@ EOF $filename = $input->getArgument('filename'); $this->format = $input->getOption('format'); $this->displayCorrectFiles = $output->isVerbose(); + $flags = $input->getOption('parse-tags') ? Yaml::PARSE_CUSTOM_TAGS : 0; if (!$filename) { if (!$stdin = $this->getStdin()) { throw new \RuntimeException('Please provide a filename or pipe file content to STDIN.'); } - return $this->display($io, array($this->validate($stdin))); + return $this->display($io, array($this->validate($stdin, $flags))); } if (!$this->isReadable($filename)) { @@ -95,26 +98,26 @@ EOF $filesInfo = array(); foreach ($this->getFiles($filename) as $file) { - $filesInfo[] = $this->validate(file_get_contents($file), $file); + $filesInfo[] = $this->validate(file_get_contents($file), $flags, $file); } return $this->display($io, $filesInfo); } - private function validate($content, $file = null) + private function validate($content, $flags, $file = null) { $prevErrorHandler = set_error_handler(function ($level, $message, $file, $line) use (&$prevErrorHandler) { if (E_USER_DEPRECATED === $level) { - throw new ParseException($message); + throw new ParseException($message, $this->getParser()->getRealCurrentLineNb() + 1); } return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false; }); try { - $this->getParser()->parse($content, Yaml::PARSE_CONSTANT); + $this->getParser()->parse($content, Yaml::PARSE_CONSTANT | $flags); } catch (ParseException $e) { - return array('file' => $file, 'valid' => false, 'message' => $e->getMessage()); + return array('file' => $file, 'line' => $e->getParsedLine(), 'valid' => false, 'message' => $e->getMessage()); } finally { restore_error_handler(); } @@ -149,7 +152,7 @@ EOF } } - if ($erroredFiles === 0) { + if (0 === $erroredFiles) { $io->success(sprintf('All %d YAML files contain valid syntax.', $countFiles)); } else { $io->warning(sprintf('%d YAML files have valid syntax and %d contain errors.', $countFiles - $erroredFiles, $erroredFiles)); diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Dumper.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Dumper.php index e26a65a5..0513044d 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Dumper.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Dumper.php @@ -15,6 +15,8 @@ namespace Symfony\Component\Yaml; * Dumper dumps PHP variables to YAML strings. * * @author Fabien Potencier + * + * @final since version 3.4 */ class Dumper { @@ -46,7 +48,7 @@ class Dumper */ public function setIndentation($num) { - @trigger_error('The '.__METHOD__.' method is deprecated since version 3.1 and will be removed in 4.0. Pass the indentation to the constructor instead.', E_USER_DEPRECATED); + @trigger_error('The '.__METHOD__.' method is deprecated since Symfony 3.1 and will be removed in 4.0. Pass the indentation to the constructor instead.', E_USER_DEPRECATED); $this->indentation = (int) $num; } @@ -64,7 +66,7 @@ class Dumper public function dump($input, $inline = 0, $indent = 0, $flags = 0) { if (is_bool($flags)) { - @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); if ($flags) { $flags = Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE; @@ -74,7 +76,7 @@ class Dumper } if (func_num_args() >= 5) { - @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); if (func_get_arg(4)) { $flags |= Yaml::DUMP_OBJECT; @@ -95,8 +97,11 @@ class Dumper $dumpAsMap = Inline::isHash($input); foreach ($input as $key => $value) { - if ($inline >= 1 && Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && is_string($value) && false !== strpos($value, "\n")) { - $output .= sprintf("%s%s%s |\n", $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', ''); + if ($inline >= 1 && Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK & $flags && is_string($value) && false !== strpos($value, "\n") && false === strpos($value, "\r\n")) { + // If the first line starts with a space character, the spec requires a blockIndicationIndicator + // http://www.yaml.org/spec/1.2/spec.html#id2793979 + $blockIndentationIndicator = (' ' === substr($value, 0, 1)) ? (string) $this->indentation : ''; + $output .= sprintf("%s%s%s |%s\n", $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', '', $blockIndentationIndicator); foreach (preg_split('/\n|\r\n/', $value) as $row) { $output .= sprintf("%s%s%s\n", $prefix, str_repeat(' ', $this->indentation), $row); diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Exception/ParseException.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Exception/ParseException.php index 3b38b643..be79960b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Exception/ParseException.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Exception/ParseException.php @@ -24,8 +24,6 @@ class ParseException extends RuntimeException private $rawMessage; /** - * Constructor. - * * @param string $message The error message * @param int $parsedLine The line where the error occurred * @param string|null $snippet The snippet of code near the problem diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Inline.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Inline.php index 51242bbf..77c9383e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Inline.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Inline.php @@ -26,13 +26,32 @@ class Inline { const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*+(?:\\\\.[^"\\\\]*+)*+)"|\'([^\']*+(?:\'\'[^\']*+)*+)\')'; - public static $parsedLineNumber; + public static $parsedLineNumber = -1; + public static $parsedFilename; private static $exceptionOnInvalidType = false; private static $objectSupport = false; private static $objectForMap = false; private static $constantSupport = false; + /** + * @param int $flags + * @param int|null $parsedLineNumber + * @param string|null $parsedFilename + */ + public static function initialize($flags, $parsedLineNumber = null, $parsedFilename = null) + { + self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); + self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); + self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags); + self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags); + self::$parsedFilename = $parsedFilename; + + if (null !== $parsedLineNumber) { + self::$parsedLineNumber = $parsedLineNumber; + } + } + /** * Converts a YAML string to a PHP value. * @@ -47,7 +66,7 @@ class Inline public static function parse($value, $flags = 0, $references = array()) { if (is_bool($flags)) { - @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); if ($flags) { $flags = Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE; @@ -57,14 +76,14 @@ class Inline } if (func_num_args() >= 3 && !is_array($references)) { - @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED); if ($references) { $flags |= Yaml::PARSE_OBJECT; } if (func_num_args() >= 4) { - @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); if (func_get_arg(3)) { $flags |= Yaml::PARSE_OBJECT_FOR_MAP; @@ -78,10 +97,7 @@ class Inline } } - self::$exceptionOnInvalidType = (bool) (Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE & $flags); - self::$objectSupport = (bool) (Yaml::PARSE_OBJECT & $flags); - self::$objectForMap = (bool) (Yaml::PARSE_OBJECT_FOR_MAP & $flags); - self::$constantSupport = (bool) (Yaml::PARSE_CONSTANT & $flags); + self::initialize($flags); $value = trim($value); @@ -115,7 +131,7 @@ class Inline // some comments are allowed at the end if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); + throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } if (isset($mbEncoding)) { @@ -138,7 +154,7 @@ class Inline public static function dump($value, $flags = 0) { if (is_bool($flags)) { - @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); if ($flags) { $flags = Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE; @@ -148,7 +164,7 @@ class Inline } if (func_num_args() >= 3) { - @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::DUMP_OBJECT flag instead.', E_USER_DEPRECATED); if (func_get_arg(2)) { $flags |= Yaml::DUMP_OBJECT; @@ -170,7 +186,7 @@ class Inline } if (Yaml::DUMP_OBJECT & $flags) { - return '!php/object:'.serialize($value); + return '!php/object '.self::dump(serialize($value)); } if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \stdClass || $value instanceof \ArrayObject)) { @@ -308,8 +324,11 @@ class Inline if (null !== $delimiters) { $tmp = ltrim(substr($scalar, $i), ' '); + if ('' === $tmp) { + throw new ParseException(sprintf('Unexpected end of line, expected one of "%s".', implode($delimiters)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } if (!in_array($tmp[0], $delimiters)) { - throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i))); + throw new ParseException(sprintf('Unexpected characters (%s).', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } } } else { @@ -326,16 +345,16 @@ class Inline $output = $match[1]; $i += strlen($output); } else { - throw new ParseException(sprintf('Malformed inline YAML string: %s.', $scalar)); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $scalar), self::$parsedLineNumber + 1, null, self::$parsedFilename); } // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0])) { - throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0])); + throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0]), self::$parsedLineNumber + 1, $output, self::$parsedFilename); } if ($output && '%' === $output[0]) { - @trigger_error(sprintf('Not quoting the scalar "%s" starting with the "%%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.', $output), E_USER_DEPRECATED); + @trigger_error(self::getDeprecationMessage(sprintf('Not quoting the scalar "%s" starting with the "%%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0.', $output)), E_USER_DEPRECATED); } if ($evaluate) { @@ -359,7 +378,7 @@ class Inline private static function parseQuotedScalar($scalar, &$i) { if (!Parser::preg_match('/'.self::REGEX_QUOTED_STRING.'/Au', substr($scalar, $i), $match)) { - throw new ParseException(sprintf('Malformed inline YAML string: %s.', substr($scalar, $i))); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', substr($scalar, $i)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } $output = substr($match[0], 1, strlen($match[0]) - 2); @@ -442,7 +461,7 @@ class Inline ++$i; } - throw new ParseException(sprintf('Malformed inline YAML string: %s.', $sequence)); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $sequence), self::$parsedLineNumber + 1, null, self::$parsedFilename); } /** @@ -462,6 +481,7 @@ class Inline $output = array(); $len = strlen($mapping); ++$i; + $allowOverwrite = false; // {foo: bar, bar:foo, ...} while ($i < $len) { @@ -487,19 +507,23 @@ class Inline } if (':' === $key) { - @trigger_error('Omitting the key of a mapping is deprecated and will throw a ParseException in 4.0.', E_USER_DEPRECATED); + @trigger_error(self::getDeprecationMessage('Omitting the key of a mapping is deprecated and will throw a ParseException in 4.0.'), E_USER_DEPRECATED); } - if (!(Yaml::PARSE_KEYS_AS_STRINGS & $flags)) { + if (!$isKeyQuoted) { $evaluatedKey = self::evaluateScalar($key, $flags, $references); if ('' !== $key && $evaluatedKey !== $key && !is_string($evaluatedKey) && !is_int($evaluatedKey)) { - @trigger_error('Implicit casting of incompatible mapping keys to strings is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead.', E_USER_DEPRECATED); + @trigger_error(self::getDeprecationMessage('Implicit casting of incompatible mapping keys to strings is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead.'), E_USER_DEPRECATED); } } if (':' !== $key && !$isKeyQuoted && (!isset($mapping[$i + 1]) || !in_array($mapping[$i + 1], array(' ', ',', '[', ']', '{', '}'), true))) { - @trigger_error('Using a colon after an unquoted mapping key that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}") is deprecated since version 3.2 and will throw a ParseException in 4.0.', E_USER_DEPRECATED); + @trigger_error(self::getDeprecationMessage('Using a colon after an unquoted mapping key that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}") is deprecated since Symfony 3.2 and will throw a ParseException in 4.0.'), E_USER_DEPRECATED); + } + + if ('<<' === $key) { + $allowOverwrite = true; } while ($i < $len) { @@ -510,7 +534,6 @@ class Inline } $tag = self::parseTag($mapping, $i, $flags); - $duplicate = false; switch ($mapping[$i]) { case '[': // nested sequence @@ -518,9 +541,19 @@ class Inline // Spec: Keys MUST be unique; first one wins. // Parser cannot abort this mapping earlier, since lines // are processed sequentially. - if (isset($output[$key])) { - @trigger_error(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key), E_USER_DEPRECATED); - $duplicate = true; + // But overwriting is allowed when a merge node is used in current block. + if ('<<' === $key) { + foreach ($value as $parsedValue) { + $output += $parsedValue; + } + } elseif ($allowOverwrite || !isset($output[$key])) { + if (null !== $tag) { + $output[$key] = new TaggedValue($tag, $value); + } else { + $output[$key] = $value; + } + } elseif (isset($output[$key])) { + @trigger_error(self::getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED); } break; case '{': @@ -529,9 +562,17 @@ class Inline // Spec: Keys MUST be unique; first one wins. // Parser cannot abort this mapping earlier, since lines // are processed sequentially. - if (isset($output[$key])) { - @trigger_error(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key), E_USER_DEPRECATED); - $duplicate = true; + // But overwriting is allowed when a merge node is used in current block. + if ('<<' === $key) { + $output += $value; + } elseif ($allowOverwrite || !isset($output[$key])) { + if (null !== $tag) { + $output[$key] = new TaggedValue($tag, $value); + } else { + $output[$key] = $value; + } + } elseif (isset($output[$key])) { + @trigger_error(self::getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED); } break; default: @@ -539,27 +580,27 @@ class Inline // Spec: Keys MUST be unique; first one wins. // Parser cannot abort this mapping earlier, since lines // are processed sequentially. - if (isset($output[$key])) { - @trigger_error(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key), E_USER_DEPRECATED); - $duplicate = true; + // But overwriting is allowed when a merge node is used in current block. + if ('<<' === $key) { + $output += $value; + } elseif ($allowOverwrite || !isset($output[$key])) { + if (null !== $tag) { + $output[$key] = new TaggedValue($tag, $value); + } else { + $output[$key] = $value; + } + } elseif (isset($output[$key])) { + @trigger_error(self::getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED); } --$i; } - - if (!$duplicate) { - if (null !== $tag) { - $output[$key] = new TaggedValue($tag, $value); - } else { - $output[$key] = $value; - } - } ++$i; continue 2; } } - throw new ParseException(sprintf('Malformed inline YAML string: %s.', $mapping)); + throw new ParseException(sprintf('Malformed inline YAML string: %s.', $mapping), self::$parsedLineNumber + 1, null, self::$parsedFilename); } /** @@ -587,11 +628,11 @@ class Inline // an unquoted * if (false === $value || '' === $value) { - throw new ParseException('A reference must contain at least one character.'); + throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); } if (!array_key_exists($value, $references)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value)); + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } return $references[$value]; @@ -606,44 +647,78 @@ class Inline return true; case 'false' === $scalarLower: return false; - case $scalar[0] === '!': + case '!' === $scalar[0]: switch (true) { case 0 === strpos($scalar, '!str'): + @trigger_error(self::getDeprecationMessage('Support for the !str tag is deprecated since Symfony 3.4. Use the !!str tag instead.'), E_USER_DEPRECATED); + return (string) substr($scalar, 5); + case 0 === strpos($scalar, '!!str '): + return (string) substr($scalar, 6); case 0 === strpos($scalar, '! '): + @trigger_error(self::getDeprecationMessage('Using the non-specific tag "!" is deprecated since Symfony 3.4 as its behavior will change in 4.0. It will force non-evaluating your values in 4.0. Use plain integers or !!float instead.'), E_USER_DEPRECATED); + return (int) self::parseScalar(substr($scalar, 2), $flags); case 0 === strpos($scalar, '!php/object:'): if (self::$objectSupport) { + @trigger_error(self::getDeprecationMessage('The !php/object: tag to indicate dumped PHP objects is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.'), E_USER_DEPRECATED); + return unserialize(substr($scalar, 12)); } if (self::$exceptionOnInvalidType) { - throw new ParseException('Object support when parsing a YAML file has been disabled.'); + throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } return; case 0 === strpos($scalar, '!!php/object:'): if (self::$objectSupport) { - @trigger_error('The !!php/object tag to indicate dumped PHP objects is deprecated since version 3.1 and will be removed in 4.0. Use the !php/object tag instead.', E_USER_DEPRECATED); + @trigger_error(self::getDeprecationMessage('The !!php/object: tag to indicate dumped PHP objects is deprecated since Symfony 3.1 and will be removed in 4.0. Use the !php/object (without the colon) tag instead.'), E_USER_DEPRECATED); return unserialize(substr($scalar, 13)); } if (self::$exceptionOnInvalidType) { - throw new ParseException('Object support when parsing a YAML file has been disabled.'); + throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + + return; + case 0 === strpos($scalar, '!php/object'): + if (self::$objectSupport) { + return unserialize(self::parseScalar(substr($scalar, 12))); + } + + if (self::$exceptionOnInvalidType) { + throw new ParseException('Object support when parsing a YAML file has been disabled.', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } return; case 0 === strpos($scalar, '!php/const:'): if (self::$constantSupport) { + @trigger_error(self::getDeprecationMessage('The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead.'), E_USER_DEPRECATED); + if (defined($const = substr($scalar, 11))) { return constant($const); } - throw new ParseException(sprintf('The constant "%s" is not defined.', $const)); + throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + if (self::$exceptionOnInvalidType) { + throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + } + + return; + case 0 === strpos($scalar, '!php/const'): + if (self::$constantSupport) { + $i = 0; + if (defined($const = self::parseScalar(substr($scalar, 11), 0, null, $i, false))) { + return constant($const); + } + + throw new ParseException(sprintf('The constant "%s" is not defined.', $const), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } if (self::$exceptionOnInvalidType) { - throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar)); + throw new ParseException(sprintf('The string "%s" could not be parsed as a constant. Have you forgotten to pass the "Yaml::PARSE_CONSTANT" flag to the parser?', $scalar), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } return; @@ -652,15 +727,17 @@ class Inline case 0 === strpos($scalar, '!!binary '): return self::evaluateBinaryScalar(substr($scalar, 9)); default: - @trigger_error(sprintf('Using the unquoted scalar value "%s" is deprecated since version 3.3 and will be considered as a tagged value in 4.0. You must quote it.', $scalar), E_USER_DEPRECATED); + @trigger_error(self::getDeprecationMessage(sprintf('Using the unquoted scalar value "%s" is deprecated since Symfony 3.3 and will be considered as a tagged value in 4.0. You must quote it.', $scalar)), E_USER_DEPRECATED); } // Optimize for returning strings. - case $scalar[0] === '+' || $scalar[0] === '-' || $scalar[0] === '.' || is_numeric($scalar[0]): + // no break + case '+' === $scalar[0] || '-' === $scalar[0] || '.' === $scalar[0] || is_numeric($scalar[0]): switch (true) { case Parser::preg_match('{^[+-]?[0-9][0-9_]*$}', $scalar): $scalar = str_replace('_', '', (string) $scalar); // omitting the break / return as integers are handled in the next case + // no break case ctype_digit($scalar): $raw = $scalar; $cast = (int) $scalar; @@ -684,7 +761,7 @@ class Inline case Parser::preg_match('/^(-|\+)?[0-9][0-9,]*(\.[0-9_]+)?$/', $scalar): case Parser::preg_match('/^(-|\+)?[0-9][0-9_]*(\.[0-9_]+)?$/', $scalar): if (false !== strpos($scalar, ',')) { - @trigger_error('Using the comma as a group separator for floats is deprecated since version 3.2 and will be removed in 4.0.', E_USER_DEPRECATED); + @trigger_error(self::getDeprecationMessage('Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0.'), E_USER_DEPRECATED); } return (float) str_replace(array(',', '_'), '', $scalar); @@ -726,14 +803,14 @@ class Inline $nextOffset += strspn($value, ' ', $nextOffset); // Is followed by a scalar - if (!isset($value[$nextOffset]) || !in_array($value[$nextOffset], array('[', '{'), true)) { - // Manage scalars in {@link self::evaluateScalar()} + if ((!isset($value[$nextOffset]) || !in_array($value[$nextOffset], array('[', '{'), true)) && 'tagged' !== $tag) { + // Manage non-whitelisted scalars in {@link self::evaluateScalar()} return; } // Built-in tags if ($tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag)); + throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } if (Yaml::PARSE_CUSTOM_TAGS & $flags) { @@ -742,7 +819,7 @@ class Inline return $tag; } - throw new ParseException(sprintf('Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!%s".', $tag)); + throw new ParseException(sprintf('Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!%s".', $tag), self::$parsedLineNumber + 1, $value, self::$parsedFilename); } /** @@ -757,11 +834,11 @@ class Inline $parsedBinaryData = self::parseScalar(preg_replace('/\s/', '', $scalar)); if (0 !== (strlen($parsedBinaryData) % 4)) { - throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', strlen($parsedBinaryData))); + throw new ParseException(sprintf('The normalized base64 encoded data (data without whitespace characters) length must be a multiple of four (%d bytes given).', strlen($parsedBinaryData)), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } if (!Parser::preg_match('#^[A-Z0-9+/]+={0,2}$#i', $parsedBinaryData)) { - throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData)); + throw new ParseException(sprintf('The base64 encoded data (%s) contains invalid characters.', $parsedBinaryData), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } return base64_decode($parsedBinaryData, true); @@ -806,4 +883,19 @@ EOF; { return '~^0x[0-9a-f_]++$~i'; } + + private static function getDeprecationMessage($message) + { + $message = rtrim($message, '.'); + + if (null !== self::$parsedFilename) { + $message .= ' in '.self::$parsedFilename; + } + + if (-1 !== self::$parsedLineNumber) { + $message .= ' on line '.(self::$parsedLineNumber + 1); + } + + return $message.'.'; + } } diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/LICENSE b/wp-content/themes/physioassist/vendor/symfony/yaml/LICENSE index 17d16a13..21d7fb9e 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/LICENSE +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2017 Fabien Potencier +Copyright (c) 2004-2018 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Parser.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Parser.php index 3c03e746..7446ae06 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Parser.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Parser.php @@ -18,12 +18,15 @@ use Symfony\Component\Yaml\Tag\TaggedValue; * Parser parses YAML strings to convert them to PHP arrays. * * @author Fabien Potencier + * + * @final since version 3.4 */ class Parser { const TAG_PATTERN = '(?P![\w!.\/:-]+)'; const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; + private $filename; private $offset = 0; private $totalNumberOfLines; private $lines = array(); @@ -48,6 +51,35 @@ class Parser } } + /** + * Parses a YAML file into a PHP value. + * + * @param string $filename The path to the YAML file to be parsed + * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * + * @return mixed The YAML converted to a PHP value + * + * @throws ParseException If the file could not be read or the YAML is not valid + */ + public function parseFile($filename, $flags = 0) + { + if (!is_file($filename)) { + throw new ParseException(sprintf('File "%s" does not exist.', $filename)); + } + + if (!is_readable($filename)) { + throw new ParseException(sprintf('File "%s" cannot be read.', $filename)); + } + + $this->filename = $filename; + + try { + return $this->parse(file_get_contents($filename), $flags); + } finally { + $this->filename = null; + } + } + /** * Parses a YAML string to a PHP value. * @@ -61,7 +93,7 @@ class Parser public function parse($value, $flags = 0) { if (is_bool($flags)) { - @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); if ($flags) { $flags = Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE; @@ -71,7 +103,7 @@ class Parser } if (func_num_args() >= 3) { - @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT flag instead.', E_USER_DEPRECATED); if (func_get_arg(2)) { $flags |= Yaml::PARSE_OBJECT; @@ -79,15 +111,19 @@ class Parser } if (func_num_args() >= 4) { - @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); if (func_get_arg(3)) { $flags |= Yaml::PARSE_OBJECT_FOR_MAP; } } + if (Yaml::PARSE_KEYS_AS_STRINGS & $flags) { + @trigger_error('Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead.', E_USER_DEPRECATED); + } + if (false === preg_match('//u', $value)) { - throw new ParseException('The YAML value does not appear to be valid UTF-8.'); + throw new ParseException('The YAML value does not appear to be valid UTF-8.', -1, null, $this->filename); } $this->refs = array(); @@ -162,13 +198,15 @@ class Parser // tab? if ("\t" === $this->currentLine[0]) { - throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException('A YAML file cannot contain tabs as indentation.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } + Inline::initialize($flags, $this->getRealCurrentLineNb(), $this->filename); + $isRef = $mergeNode = false; if (self::preg_match('#^\-((?P\s+)(?P.+))?$#u', rtrim($this->currentLine), $values)) { if ($context && 'mapping' == $context) { - throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException('You cannot define a sequence item when in a mapping', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } $context = 'sequence'; @@ -178,7 +216,7 @@ class Parser } if (isset($values['value'][1]) && '?' === $values['value'][0] && ' ' === $values['value'][1]) { - @trigger_error('Starting an unquoted string with a question mark followed by a space is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', E_USER_DEPRECATED); + @trigger_error($this->getDeprecationMessage('Starting an unquoted string with a question mark followed by a space is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.'), E_USER_DEPRECATED); } // array @@ -208,18 +246,15 @@ class Parser $this->refs[$isRef] = end($data); } } elseif ( - self::preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?(?:![^\s]++\s++)?[^ \'"\[\{!].*?) *\:(\s++(?P.+))?$#u', rtrim($this->currentLine), $values) + self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(\s++(?P.+))?$#u', rtrim($this->currentLine), $values) && (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('"', "'"))) ) { if ($context && 'sequence' == $context) { - throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine); + throw new ParseException('You cannot define a mapping item when in a sequence', $this->currentLineNb + 1, $this->currentLine, $this->filename); } $context = 'mapping'; - // force correct settings - Inline::parse(null, $flags, $this->refs); try { - Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); $i = 0; $evaluateKey = !(Yaml::PARSE_KEYS_AS_STRINGS & $flags); @@ -236,9 +271,9 @@ class Parser throw $e; } - if (!(Yaml::PARSE_KEYS_AS_STRINGS & $flags) && !is_string($key) && !is_int($key)) { + if (!is_string($key) && !is_int($key)) { $keyType = is_numeric($key) ? 'numeric key' : 'non-string key'; - @trigger_error(sprintf('Implicit casting of %s to string is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead.', $keyType), E_USER_DEPRECATED); + @trigger_error($this->getDeprecationMessage(sprintf('Implicit casting of %s to string is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead.', $keyType)), E_USER_DEPRECATED); } // Convert float keys to strings, to avoid being converted to integers by PHP @@ -246,32 +281,40 @@ class Parser $key = (string) $key; } - if ('<<' === $key) { + if ('<<' === $key && (!isset($values['value']) || !self::preg_match('#^&(?P[^ ]+)#u', $values['value'], $refMatches))) { $mergeNode = true; $allowOverwrite = true; - if (isset($values['value']) && 0 === strpos($values['value'], '*')) { + if (isset($values['value'][0]) && '*' === $values['value'][0]) { $refName = substr(rtrim($values['value']), 1); if (!array_key_exists($refName, $this->refs)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } $refValue = $this->refs[$refName]; + if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $refValue instanceof \stdClass) { + $refValue = (array) $refValue; + } + if (!is_array($refValue)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } $data += $refValue; // array union } else { - if (isset($values['value']) && $values['value'] !== '') { + if (isset($values['value']) && '' !== $values['value']) { $value = $values['value']; } else { $value = $this->getNextEmbedBlock(); } $parsed = $this->parseBlock($this->getRealCurrentLineNb() + 1, $value, $flags); + if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsed instanceof \stdClass) { + $parsed = (array) $parsed; + } + if (!is_array($parsed)) { - throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException('YAML merge keys used with a scalar value instead of an array.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } if (isset($parsed[0])) { @@ -279,8 +322,12 @@ class Parser // and each of these nodes is merged in turn according to its order in the sequence. Keys in mapping nodes earlier // in the sequence override keys specified in later mapping nodes. foreach ($parsed as $parsedItem) { + if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $parsedItem instanceof \stdClass) { + $parsedItem = (array) $parsedItem; + } + if (!is_array($parsedItem)) { - throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem); + throw new ParseException('Merge items must be arrays.', $this->getRealCurrentLineNb() + 1, $parsedItem, $this->filename); } $data += $parsedItem; // array union @@ -291,7 +338,7 @@ class Parser $data += $parsed; // array union } } - } elseif (isset($values['value']) && self::preg_match('#^&(?P[^ ]++) *+(?P.*)#u', $values['value'], $matches)) { + } elseif ('<<' !== $key && isset($values['value']) && self::preg_match('#^&(?P[^ ]++) *+(?P.*)#u', $values['value'], $matches)) { $isRef = $matches['ref']; $values['value'] = $matches['value']; } @@ -299,7 +346,7 @@ class Parser $subTag = null; if ($mergeNode) { // Merge keys - } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags))) { + } elseif (!isset($values['value']) || '' === $values['value'] || 0 === strpos($values['value'], '#') || (null !== $subTag = $this->getLineTag($values['value'], $flags)) || '<<' === $key) { // hash // if next line is less indented or equal, then it means that the current value is null if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) { @@ -312,22 +359,28 @@ class Parser $data[$key] = null; } } else { - @trigger_error(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key), E_USER_DEPRECATED); + @trigger_error($this->getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED); } } else { - // remember the parsed line number here in case we need it to provide some contexts in error messages below - $realCurrentLineNbKey = $this->getRealCurrentLineNb(); $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $flags); - // Spec: Keys MUST be unique; first one wins. - // But overwriting is allowed when a merge node is used in current block. - if ($allowOverwrite || !isset($data[$key])) { + if ('<<' === $key) { + $this->refs[$refMatches['ref']] = $value; + + if (Yaml::PARSE_OBJECT_FOR_MAP & $flags && $value instanceof \stdClass) { + $value = (array) $value; + } + + $data += $value; + } elseif ($allowOverwrite || !isset($data[$key])) { + // Spec: Keys MUST be unique; first one wins. + // But overwriting is allowed when a merge node is used in current block. if (null !== $subTag) { $data[$key] = new TaggedValue($subTag, $value); } else { $data[$key] = $value; } } else { - @trigger_error(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key), E_USER_DEPRECATED); + @trigger_error($this->getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED); } } } else { @@ -337,7 +390,7 @@ class Parser if ($allowOverwrite || !isset($data[$key])) { $data[$key] = $value; } else { - @trigger_error(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since version 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key), E_USER_DEPRECATED); + @trigger_error($this->getDeprecationMessage(sprintf('Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated since Symfony 3.2 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', $key)), E_USER_DEPRECATED); } } if ($isRef) { @@ -346,17 +399,16 @@ class Parser } else { // multiple documents are not supported if ('---' === $this->currentLine) { - throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine); + throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename); } - if (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1]) { - @trigger_error('Starting an unquoted string with a question mark followed by a space is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.', E_USER_DEPRECATED); + if ($deprecatedUsage = (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1])) { + @trigger_error($this->getDeprecationMessage('Starting an unquoted string with a question mark followed by a space is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0.'), E_USER_DEPRECATED); } // 1-liner optionally followed by newline(s) if (is_string($value) && $this->lines[0] === trim($value)) { try { - Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); $value = Inline::parse($this->lines[0], $flags, $this->refs); } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); @@ -370,45 +422,47 @@ class Parser // try to parse the value as a multi-line string as a last resort if (0 === $this->currentLineNb) { - $parseError = false; $previousLineWasNewline = false; + $previousLineWasTerminatedWithBackslash = false; $value = ''; foreach ($this->lines as $line) { - try { - if (isset($line[0]) && ('"' === $line[0] || "'" === $line[0])) { - $parsedLine = $line; - } else { - $parsedLine = Inline::parse($line, $flags, $this->refs); - } + // If the indentation is not consistent at offset 0, it is to be considered as a ParseError + if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) { + throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); + } + if ('' === trim($line)) { + $value .= "\n"; + } elseif (!$previousLineWasNewline && !$previousLineWasTerminatedWithBackslash) { + $value .= ' '; + } - if (!is_string($parsedLine)) { - $parseError = true; - break; - } + if ('' !== trim($line) && '\\' === substr($line, -1)) { + $value .= ltrim(substr($line, 0, -1)); + } elseif ('' !== trim($line)) { + $value .= trim($line); + } - if ('' === trim($parsedLine)) { - $value .= "\n"; - $previousLineWasNewline = true; - } elseif ($previousLineWasNewline) { - $value .= trim($parsedLine); - $previousLineWasNewline = false; - } else { - $value .= ' '.trim($parsedLine); - $previousLineWasNewline = false; - } - } catch (ParseException $e) { - $parseError = true; - break; + if ('' === trim($line)) { + $previousLineWasNewline = true; + $previousLineWasTerminatedWithBackslash = false; + } elseif ('\\' === substr($line, -1)) { + $previousLineWasNewline = false; + $previousLineWasTerminatedWithBackslash = true; + } else { + $previousLineWasNewline = false; + $previousLineWasTerminatedWithBackslash = false; } } - if (!$parseError) { - return trim($value); + try { + return Inline::parse(trim($value)); + } catch (ParseException $e) { + // fall-through to the ParseException thrown below } } - throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } while ($this->moveToNextLine()); @@ -453,9 +507,11 @@ class Parser /** * Returns the current line number (takes the offset into account). * + * @internal + * * @return int The current line number */ - private function getRealCurrentLineNb() + public function getRealCurrentLineNb() { $realCurrentLineNumber = $this->currentLineNb + $this->offset; @@ -504,12 +560,32 @@ class Parser } if (null === $indentation) { - $newIndent = $this->getCurrentLineIndentation(); + $newIndent = null; + $movements = 0; + + do { + $EOF = false; + + // empty and comment-like lines do not influence the indentation depth + if ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { + $EOF = !$this->moveToNextLine(); + + if (!$EOF) { + ++$movements; + } + } else { + $newIndent = $this->getCurrentLineIndentation(); + } + } while (!$EOF && null === $newIndent); + + for ($i = 0; $i < $movements; ++$i) { + $this->moveToPreviousLine(); + } $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } else { $newIndent = $indentation; @@ -518,6 +594,8 @@ class Parser $data = array(); if ($this->getCurrentLineIndentation() >= $newIndent) { $data[] = substr($this->currentLine, $newIndent); + } elseif ($this->isCurrentLineEmpty() || $this->isCurrentLineComment()) { + $data[] = $this->currentLine; } else { $this->moveToPreviousLine(); @@ -544,7 +622,7 @@ class Parser $indent = $this->getCurrentLineIndentation(); // terminate all block scalars that are more indented than the current line - if (!empty($blockScalarIndentations) && $indent < $previousLineIndentation && trim($this->currentLine) !== '') { + if (!empty($blockScalarIndentations) && $indent < $previousLineIndentation && '' !== trim($this->currentLine)) { foreach ($blockScalarIndentations as $key => $blockScalarIndentation) { if ($blockScalarIndentation >= $indent) { unset($blockScalarIndentations[$key]); @@ -568,27 +646,16 @@ class Parser continue; } - // we ignore "comment" lines only when we are not inside a scalar block - if (empty($blockScalarIndentations) && $this->isCurrentLineComment()) { - // remember ignored comment lines (they are used later in nested - // parser calls to determine real line numbers) - // - // CAUTION: beware to not populate the global property here as it - // will otherwise influence the getRealCurrentLineNb() call here - // for consecutive comment lines and subsequent embedded blocks - $this->locallySkippedLineNumbers[] = $this->getRealCurrentLineNb(); - - continue; - } - if ($indent >= $newIndent) { $data[] = substr($this->currentLine, $newIndent); + } elseif ($this->isCurrentLineComment()) { + $data[] = $this->currentLine; } elseif (0 == $indent) { $this->moveToPreviousLine(); break; } else { - throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); + throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } } @@ -648,7 +715,7 @@ class Parser } if (!array_key_exists($value, $this->refs)) { - throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine); + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); } return $this->refs[$value]; @@ -662,8 +729,10 @@ class Parser if ('' !== $matches['tag']) { if ('!!binary' === $matches['tag']) { return Inline::evaluateBinaryScalar($data); + } elseif ('tagged' === $matches['tag']) { + return new TaggedValue(substr($matches['tag'], 1), $data); } elseif ('!' !== $matches['tag']) { - @trigger_error(sprintf('Using the custom tag "%s" for the value "%s" is deprecated since version 3.3. It will be replaced by an instance of %s in 4.0.', $matches['tag'], $data, TaggedValue::class), E_USER_DEPRECATED); + @trigger_error($this->getDeprecationMessage(sprintf('Using the custom tag "%s" for the value "%s" is deprecated since Symfony 3.3. It will be replaced by an instance of %s in 4.0.', $matches['tag'], $data, TaggedValue::class)), E_USER_DEPRECATED); } } @@ -678,15 +747,17 @@ class Parser return Inline::parse($value, $flags, $this->refs); } + $lines = array(); + while ($this->moveToNextLine()) { // unquoted strings end before the first unindented line - if (null === $quotation && $this->getCurrentLineIndentation() === 0) { + if (null === $quotation && 0 === $this->getCurrentLineIndentation()) { $this->moveToPreviousLine(); break; } - $value .= ' '.trim($this->currentLine); + $lines[] = trim($this->currentLine); // quoted string values end with a line that is terminated with the quotation character if ('' !== $this->currentLine && substr($this->currentLine, -1) === $quotation) { @@ -694,11 +765,25 @@ class Parser } } + for ($i = 0, $linesCount = count($lines), $previousLineBlank = false; $i < $linesCount; ++$i) { + if ('' === $lines[$i]) { + $value .= "\n"; + $previousLineBlank = true; + } elseif ($previousLineBlank) { + $value .= $lines[$i]; + $previousLineBlank = false; + } else { + $value .= ' '.$lines[$i]; + $previousLineBlank = false; + } + } + Inline::$parsedLineNumber = $this->getRealCurrentLineNb(); + $parsedValue = Inline::parse($value, $flags, $this->refs); if ('mapping' === $context && is_string($parsedValue) && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { - throw new ParseException('A colon cannot be used in an unquoted mapping value.'); + throw new ParseException('A colon cannot be used in an unquoted mapping value.', $this->getRealCurrentLineNb() + 1, $value, $this->filename); } return $parsedValue; @@ -829,11 +914,15 @@ class Parser private function isNextLineIndented() { $currentIndentation = $this->getCurrentLineIndentation(); - $EOF = !$this->moveToNextLine(); + $movements = 0; - while (!$EOF && $this->isCurrentLineEmpty()) { + do { $EOF = !$this->moveToNextLine(); - } + + if (!$EOF) { + ++$movements; + } + } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); if ($EOF) { return false; @@ -841,7 +930,9 @@ class Parser $ret = $this->getCurrentLineIndentation() > $currentIndentation; - $this->moveToPreviousLine(); + for ($i = 0; $i < $movements; ++$i) { + $this->moveToPreviousLine(); + } return $ret; } @@ -876,7 +967,7 @@ class Parser //checking explicitly the first char of the trim is faster than loops or strpos $ltrimmedLine = ltrim($this->currentLine, ' '); - return '' !== $ltrimmedLine && $ltrimmedLine[0] === '#'; + return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0]; } private function isCurrentLineLastLineInDocument() @@ -902,7 +993,7 @@ class Parser // remove leading comments $trimmedValue = preg_replace('#^(\#.*?\n)+#s', '', $value, -1, $count); - if ($count == 1) { + if (1 === $count) { // items have been removed, update the offset $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); $value = $trimmedValue; @@ -910,7 +1001,7 @@ class Parser // remove start of the document marker (---) $trimmedValue = preg_replace('#^\-\-\-.*?\n#s', '', $value, -1, $count); - if ($count == 1) { + if (1 === $count) { // items have been removed, update the offset $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); $value = $trimmedValue; @@ -930,19 +1021,25 @@ class Parser private function isNextLineUnIndentedCollection() { $currentIndentation = $this->getCurrentLineIndentation(); - $notEOF = $this->moveToNextLine(); + $movements = 0; - while ($notEOF && $this->isCurrentLineEmpty()) { - $notEOF = $this->moveToNextLine(); - } + do { + $EOF = !$this->moveToNextLine(); + + if (!$EOF) { + ++$movements; + } + } while (!$EOF && ($this->isCurrentLineEmpty() || $this->isCurrentLineComment())); - if (false === $notEOF) { + if ($EOF) { return false; } $ret = $this->getCurrentLineIndentation() === $currentIndentation && $this->isStringUnIndentedCollectionItem(); - $this->moveToPreviousLine(); + for ($i = 0; $i < $movements; ++$i) { + $this->moveToPreviousLine(); + } return $ret; } @@ -1038,13 +1135,26 @@ class Parser // Built-in tags if ($tag && '!' === $tag[0]) { - throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag)); + throw new ParseException(sprintf('The built-in tag "!%s" is not implemented.', $tag), $this->getRealCurrentLineNb() + 1, $value, $this->filename); } if (Yaml::PARSE_CUSTOM_TAGS & $flags) { return $tag; } - throw new ParseException(sprintf('Tags support is not enabled. You must use the flag `Yaml::PARSE_CUSTOM_TAGS` to use "%s".', $matches['tag'])); + throw new ParseException(sprintf('Tags support is not enabled. You must use the flag `Yaml::PARSE_CUSTOM_TAGS` to use "%s".', $matches['tag']), $this->getRealCurrentLineNb() + 1, $value, $this->filename); + } + + private function getDeprecationMessage($message) + { + $message = rtrim($message, '.'); + + if (null !== $this->filename) { + $message .= ' in '.$this->filename; + } + + $message .= ' on line '.($this->getRealCurrentLineNb() + 1); + + return $message.'.'; } } diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Command/LintCommandTest.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Command/LintCommandTest.php index 75aa067f..5d0f44d5 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Command/LintCommandTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Command/LintCommandTest.php @@ -54,12 +54,30 @@ bar'; public function testConstantAsKey() { $yaml = <<createCommandTester()->execute(array('filename' => $this->createFile($yaml)), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); $this->assertSame(0, $ret, 'lint:yaml exits with code 0 in case of success'); } + public function testCustomTags() + { + $yaml = <<createCommandTester()->execute(array('filename' => $this->createFile($yaml), '--parse-tags' => true), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + $this->assertSame(0, $ret, 'lint:yaml exits with code 0 in case of success'); + } + + public function testCustomTagsError() + { + $yaml = <<createCommandTester()->execute(array('filename' => $this->createFile($yaml)), array('verbosity' => OutputInterface::VERBOSITY_VERBOSE, 'decorated' => false)); + $this->assertSame(1, $ret, 'lint:yaml exits with code 1 in case of error'); + } + /** * @expectedException \RuntimeException */ diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/DumperTest.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/DumperTest.php index 1c80bec6..b4743911 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/DumperTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/DumperTest.php @@ -125,7 +125,7 @@ EOF; // TODO } else { eval('$expected = '.trim($test['php']).';'); - $this->assertSame($expected, $this->parser->parse($this->dumper->dump($expected, 10), Yaml::PARSE_KEYS_AS_STRINGS), $test['test']); + $this->assertSame($expected, $this->parser->parse($this->dumper->dump($expected, 10)), $test['test']); } } } @@ -210,7 +210,7 @@ EOF; { $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, Yaml::DUMP_OBJECT); - $this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects'); + $this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump objects'); } /** @@ -220,7 +220,7 @@ EOF; { $dump = $this->dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true); - $this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects'); + $this->assertEquals('{ foo: !php/object \'O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}\', bar: 1 }', $dump, '->dump() is able to dump objects'); } public function testObjectSupportDisabledButNoExceptions() @@ -443,7 +443,8 @@ YAML; $data = array( 'data' => array( 'single_line' => 'foo bar baz', - 'multi_line' => "foo\nline with trailing spaces:\n \nbar\r\ninteger like line:\n123456789\nempty line:\n\nbaz", + 'multi_line' => "foo\nline with trailing spaces:\n \nbar\ninteger like line:\n123456789\nempty line:\n\nbaz", + 'multi_line_with_carriage_return' => "foo\nbar\r\nbaz", 'nested_inlined_multi_line_string' => array( 'inlined_multi_line' => "foo\nbar\r\nempty line:\n\nbaz", ), @@ -453,6 +454,22 @@ YAML; $this->assertSame(file_get_contents(__DIR__.'/Fixtures/multiple_lines_as_literal_block.yml'), $this->dumper->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); } + public function testDumpMultiLineStringAsScalarBlockWhenFirstLineHasLeadingSpace() + { + $data = array( + 'data' => array( + 'multi_line' => " the first line has leading spaces\nThe second line does not.", + ), + ); + + $this->assertSame(file_get_contents(__DIR__.'/Fixtures/multiple_lines_as_literal_block_leading_space_in_first_line.yml'), $this->dumper->dump($data, 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); + } + + public function testCarriageReturnIsMaintainedWhenDumpingAsMultiLineLiteralBlock() + { + $this->assertSame("- \"a\\r\\nb\\nc\"\n", $this->dumper->dump(array("a\r\nb\nc"), 2, 0, Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK)); + } + /** * @expectedException \InvalidArgumentException * @expectedExceptionMessage The indentation must be greater than zero diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml index 45e27b7b..3f93c982 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml @@ -592,7 +592,7 @@ test: Various explicit families todo: true spec: 2.23 yaml: | - not-date: !str 2002-04-28 + not-date: !!str 2002-04-28 picture: !binary | R0lGODlhDAAMAIQAAP//9/X 17unp5WZmZgAAAOfn515eXv @@ -928,10 +928,11 @@ documents: 2 --- test: Explicit typing +deprecated: Using the non-specific tag "!" is deprecated since Symfony 3.4 as its behavior will change in 4.0. yaml: | integer: 12 also int: ! "12" - string: !str 12 + string: !!str 12 php: | array( 'integer' => 12, 'also int' => 12, 'string' => '12' ) --- @@ -963,7 +964,7 @@ documents: 2 test: Type family under yaml.org yaml: | # The URI is 'tag:yaml.org,2002:str' - - !str a Unicode string + - !!str a Unicode string php: | array( 'a Unicode string' ) --- @@ -1350,7 +1351,7 @@ yaml: | second: 12 ## This is an integer. - third: !str 12 ## This is a string. + third: !!str 12 ## This is a string. span: this contains six spaces @@ -1419,7 +1420,7 @@ yaml: | # The following scalars # are loaded to the # string value '1' '2'. - - !str 12 + - !!str 12 - '12' - "12" - "\ diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml index 5b9df73b..dea0be01 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml @@ -52,10 +52,10 @@ php: | test: Forcing Strings brief: > Any YAML type can be forced into a string using the - explicit !str method. + explicit !!str method. yaml: | - date string: !str 2001-08-01 - number string: !str 192 + date string: !!str 2001-08-01 + number string: !!str 192 php: | array( 'date string' => '2001-08-01', diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml index b4903d30..9d72f09b 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block.yml @@ -10,4 +10,5 @@ data: empty line: baz + multi_line_with_carriage_return: "foo\nbar\r\nbaz" nested_inlined_multi_line_string: { inlined_multi_line: "foo\nbar\r\nempty line:\n\nbaz" } diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block_leading_space_in_first_line.yml b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block_leading_space_in_first_line.yml new file mode 100644 index 00000000..3f2dedd1 --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/multiple_lines_as_literal_block_leading_space_in_first_line.yml @@ -0,0 +1,4 @@ +data: + multi_line: |4 + the first line has leading spaces + The second line does not. diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/not_readable.yml b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/not_readable.yml new file mode 100644 index 00000000..3216a89e --- /dev/null +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/not_readable.yml @@ -0,0 +1,18 @@ +- escapedCharacters +- sfComments +- sfCompact +- sfTests +- sfObjects +- sfMergeKey +- sfQuotes +- YtsAnchorAlias +- YtsBasicTests +- YtsBlockMapping +- YtsDocumentSeparator +- YtsErrorTests +- YtsFlowCollections +- YtsFoldedScalars +- YtsNullsAndEmpties +- YtsSpecificationExamples +- YtsTypeTransfers +- unindentedCollections diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/sfMergeKey.yml b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/sfMergeKey.yml index 18e5abf9..83264cfa 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/sfMergeKey.yml +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/Fixtures/sfMergeKey.yml @@ -21,6 +21,7 @@ yaml: | c: foo: bar bar: foo + bar_inline: {a: before, d: other, <<: *foo, b: new, x: Oren, c: { foo: bar, bar: foo}} foo2: &foo2 a: Ballmer ding: &dong [ fi, fei, fo, fam] @@ -42,14 +43,19 @@ yaml: | p: 12345 z: <<: *nestedref + head_inline: &head_inline { <<: [ *foo , *dong , *foo2 ] } + recursive_inline: { <<: *head_inline, c: { <<: *foo2 } } php: | array( 'foo' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull'), 'bar' => array('a' => 'before', 'd' => 'other', 'e' => null, 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'x' => 'Oren'), + 'bar_inline' => array('a' => 'before', 'd' => 'other', 'b' => 'new', 'c' => array('foo' => 'bar', 'bar' => 'foo'), 'e' => 'notnull', 'x' => 'Oren'), 'foo2' => array('a' => 'Ballmer'), 'ding' => array('fi', 'fei', 'fo', 'fam'), 'check' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam', 'isit' => 'tested'), 'head' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'), 'taz' => array('a' => 'Steve', 'w' => array('p' => 1234)), - 'nested' => array('a' => 'Steve', 'w' => array('p' => 12345), 'd' => 'Doug', 'z' => array('p' => 12345)) + 'nested' => array('a' => 'Steve', 'w' => array('p' => 12345), 'd' => 'Doug', 'z' => array('p' => 12345)), + 'head_inline' => array('a' => 'Steve', 'b' => 'Clark', 'c' => 'Brian', 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'), + 'recursive_inline' => array('a' => 'Steve', 'b' => 'Clark', 'c' => array('a' => 'Ballmer'), 'e' => 'notnull', 'fi', 'fei', 'fo', 'fam'), ) diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/InlineTest.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/InlineTest.php index 665c2ecc..f2c4ab60 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/InlineTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/InlineTest.php @@ -18,6 +18,11 @@ use Symfony\Component\Yaml\Yaml; class InlineTest extends TestCase { + protected function setUp() + { + Inline::initialize(0, 0); + } + /** * @dataProvider getTestsForParse */ @@ -49,10 +54,11 @@ class InlineTest extends TestCase public function getTestsForParsePhpConstants() { return array( - array('!php/const:Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT), - array('!php/const:PHP_INT_MAX', PHP_INT_MAX), - array('[!php/const:PHP_INT_MAX]', array(PHP_INT_MAX)), - array('{ foo: !php/const:PHP_INT_MAX }', array('foo' => PHP_INT_MAX)), + array('!php/const Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT), + array('!php/const PHP_INT_MAX', PHP_INT_MAX), + array('[!php/const PHP_INT_MAX]', array(PHP_INT_MAX)), + array('{ foo: !php/const PHP_INT_MAX }', array('foo' => PHP_INT_MAX)), + array('!php/const NULL', null), ); } @@ -62,16 +68,37 @@ class InlineTest extends TestCase */ public function testParsePhpConstantThrowsExceptionWhenUndefined() { - Inline::parse('!php/const:WRONG_CONSTANT', Yaml::PARSE_CONSTANT); + Inline::parse('!php/const WRONG_CONSTANT', Yaml::PARSE_CONSTANT); } /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException - * @expectedExceptionMessageRegExp #The string "!php/const:PHP_INT_MAX" could not be parsed as a constant.*# + * @expectedExceptionMessageRegExp #The string "!php/const PHP_INT_MAX" could not be parsed as a constant.*# */ public function testParsePhpConstantThrowsExceptionOnInvalidType() { - Inline::parse('!php/const:PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); + Inline::parse('!php/const PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); + } + + /** + * @group legacy + * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead on line 1. + * @dataProvider getTestsForParseLegacyPhpConstants + */ + public function testDeprecatedConstantTag($yaml, $expectedValue) + { + $this->assertSame($expectedValue, Inline::parse($yaml, Yaml::PARSE_CONSTANT)); + } + + public function getTestsForParseLegacyPhpConstants() + { + return array( + array('!php/const:Symfony\Component\Yaml\Yaml::PARSE_CONSTANT', Yaml::PARSE_CONSTANT), + array('!php/const:PHP_INT_MAX', PHP_INT_MAX), + array('[!php/const:PHP_INT_MAX]', array(PHP_INT_MAX)), + array('{ foo: !php/const:PHP_INT_MAX }', array('foo' => PHP_INT_MAX)), + array('!php/const:NULL', null), + ); } /** @@ -168,7 +195,7 @@ class InlineTest extends TestCase /** * @group legacy - * @expectedDeprecation Using a colon after an unquoted mapping key that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}") is deprecated since version 3.2 and will throw a ParseException in 4.0. + * @expectedDeprecation Using a colon after an unquoted mapping key that is not followed by an indication character (i.e. " ", ",", "[", "]", "{", "}") is deprecated since Symfony 3.2 and will throw a ParseException in 4.0 on line 1. * throws \Symfony\Component\Yaml\Exception\ParseException in 4.0 */ public function testParseMappingKeyWithColonNotFollowedBySpace() @@ -256,7 +283,7 @@ class InlineTest extends TestCase /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException - * @expectedExceptionMessage A reference must contain at least one character. + * @expectedExceptionMessage A reference must contain at least one character at line 1. */ public function testParseUnquotedAsterisk() { @@ -265,7 +292,7 @@ class InlineTest extends TestCase /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException - * @expectedExceptionMessage A reference must contain at least one character. + * @expectedExceptionMessage A reference must contain at least one character at line 1. */ public function testParseUnquotedAsteriskFollowedByAComment() { @@ -274,11 +301,16 @@ class InlineTest extends TestCase /** * @dataProvider getReservedIndicators - * @expectedException \Symfony\Component\Yaml\Exception\ParseException - * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar. */ public function testParseUnquotedScalarStartingWithReservedIndicator($indicator) { + if (method_exists($this, 'expectExceptionMessage')) { + $this->expectException(ParseException::class); + $this->expectExceptionMessage(sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator)); + } else { + $this->setExpectedException(ParseException::class, sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator)); + } + Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); } @@ -289,11 +321,16 @@ class InlineTest extends TestCase /** * @dataProvider getScalarIndicators - * @expectedException \Symfony\Component\Yaml\Exception\ParseException - * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar. */ public function testParseUnquotedScalarStartingWithScalarIndicator($indicator) { + if (method_exists($this, 'expectExceptionMessage')) { + $this->expectException(ParseException::class); + $this->expectExceptionMessage(sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator)); + } else { + $this->setExpectedException(ParseException::class, sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator)); + } + Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); } @@ -304,7 +341,7 @@ class InlineTest extends TestCase /** * @group legacy - * @expectedDeprecation Not quoting the scalar "%bar " starting with the "%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0. + * @expectedDeprecation Not quoting the scalar "%bar " starting with the "%" indicator character is deprecated since Symfony 3.1 and will throw a ParseException in 4.0 on line 1. * throws \Symfony\Component\Yaml\Exception\ParseException in 4.0 */ public function testParseUnquotedScalarStartingWithPercentCharacter() @@ -385,8 +422,8 @@ class InlineTest extends TestCase array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), // mappings - array('{foo: bar,bar: foo,false: false,null: null,integer: 12}', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_KEYS_AS_STRINGS), - array('{ foo : bar, bar : foo, false : false, null : null, integer : 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_KEYS_AS_STRINGS), + array('{foo: bar,bar: foo,"false": false, "null": null,integer: 12}', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), + array('{ foo : bar, bar : foo, "false" : false, "null" : null, integer : 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), array('{foo: \'bar\', bar: \'foo: bar\'}', array('foo' => 'bar', 'bar' => 'foo: bar')), array('{\'foo\': \'bar\', "bar": \'foo: bar\'}', array('foo' => 'bar', 'bar' => 'foo: bar')), array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', array('foo\'' => 'bar', 'bar"' => 'foo: bar')), @@ -456,8 +493,8 @@ class InlineTest extends TestCase array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), // mappings - array('{foo: bar,bar: foo,false: false,null: null,integer: 12}', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_OBJECT_FOR_MAP | Yaml::PARSE_KEYS_AS_STRINGS), - array('{ foo : bar, bar : foo, false : false, null : null, integer : 12 }', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_OBJECT_FOR_MAP | Yaml::PARSE_KEYS_AS_STRINGS), + array('{foo: bar,bar: foo,"false": false,"null": null,integer: 12}', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_OBJECT_FOR_MAP), + array('{ foo : bar, bar : foo, "false" : false, "null" : null, integer : 12 }', (object) array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_OBJECT_FOR_MAP), array('{foo: \'bar\', bar: \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), array('{\'foo\': \'bar\', "bar": \'foo: bar\'}', (object) array('foo' => 'bar', 'bar' => 'foo: bar')), array('{\'foo\'\'\': \'bar\', "bar\"": \'foo: bar\'}', (object) array('foo\'' => 'bar', 'bar"' => 'foo: bar')), @@ -538,7 +575,7 @@ class InlineTest extends TestCase array('[\'foo,bar\', \'foo bar\']', array('foo,bar', 'foo bar')), // mappings - array('{ foo: bar, bar: foo, \'false\': false, \'null\': null, integer: 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12), Yaml::PARSE_KEYS_AS_STRINGS), + array('{ foo: bar, bar: foo, \'false\': false, \'null\': null, integer: 12 }', array('foo' => 'bar', 'bar' => 'foo', 'false' => false, 'null' => null, 'integer' => 12)), array('{ foo: bar, bar: \'foo: bar\' }', array('foo' => 'bar', 'bar' => 'foo: bar')), // nested sequences and mappings @@ -554,7 +591,7 @@ class InlineTest extends TestCase array('[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']', array('foo', '@foo.baz', array('%foo%' => 'foo is %foo%', 'bar' => '%foo%'), true, '@service_container')), - array('{ foo: { bar: { 1: 2, baz: 3 } } }', array('foo' => array('bar' => array(1 => 2, 'baz' => 3))), Yaml::PARSE_KEYS_AS_STRINGS), + array('{ foo: { bar: { 1: 2, baz: 3 } } }', array('foo' => array('bar' => array(1 => 2, 'baz' => 3)))), ); } @@ -681,7 +718,7 @@ class InlineTest extends TestCase /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException - * @expectedExceptionMessage Malformed inline YAML string: {this, is not, supported}. + * @expectedExceptionMessage Malformed inline YAML string: {this, is not, supported} at line 1. */ public function testNotSupportedMissingValue() { @@ -700,7 +737,7 @@ class InlineTest extends TestCase /** * @group legacy - * @expectedDeprecation Omitting the key of a mapping is deprecated and will throw a ParseException in 4.0. + * @expectedDeprecation Omitting the key of a mapping is deprecated and will throw a ParseException in 4.0 on line 1. */ public function testOmittedMappingKeyIsParsedAsColon() { @@ -730,7 +767,7 @@ class InlineTest extends TestCase /** * @group legacy - * @expectedDeprecation Implicit casting of incompatible mapping keys to strings is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead. + * @expectedDeprecation Implicit casting of incompatible mapping keys to strings is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead on line 1. * @dataProvider getNotPhpCompatibleMappingKeyData */ public function testImplicitStringCastingOfMappingKeysIsDeprecated($yaml, $expected) @@ -739,11 +776,14 @@ class InlineTest extends TestCase } /** + * @group legacy + * @expectedDeprecation Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead. + * @expectedDeprecation Implicit casting of incompatible mapping keys to strings is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead on line 1. * @dataProvider getNotPhpCompatibleMappingKeyData */ public function testExplicitStringCastingOfMappingKeys($yaml, $expected) { - $this->assertSame($expected, Inline::parse($yaml, Yaml::PARSE_KEYS_AS_STRINGS)); + $this->assertSame($expected, Yaml::parse($yaml, Yaml::PARSE_KEYS_AS_STRINGS)); } public function getNotPhpCompatibleMappingKeyData() @@ -755,4 +795,22 @@ class InlineTest extends TestCase 'float' => array('{0.25: "foo"}', array('0.25' => 'foo')), ); } + + /** + * @group legacy + * @expectedDeprecation Support for the !str tag is deprecated since Symfony 3.4. Use the !!str tag instead on line 1. + */ + public function testDeprecatedStrTag() + { + $this->assertSame(array('foo' => 'bar'), Inline::parse('{ foo: !str bar }')); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage Unexpected end of line, expected one of ",}" at line 1 (near "{abc: 'def'"). + */ + public function testUnfinishedInlineMap() + { + Inline::parse("{abc: 'def'"); + } } diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/ParserTest.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/ParserTest.php index 620eff32..86417ab5 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/ParserTest.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Tests/ParserTest.php @@ -30,6 +30,8 @@ class ParserTest extends TestCase protected function tearDown() { $this->parser = null; + + chmod(__DIR__.'/Fixtures/not_readable.yml', 0644); } /** @@ -61,7 +63,7 @@ class ParserTest extends TestCase restore_error_handler(); $this->assertCount(1, $deprecations); - $this->assertContains('Using the comma as a group separator for floats is deprecated since version 3.2 and will be removed in 4.0.', $deprecations[0]); + $this->assertContains(true !== $deprecated ? $deprecated : 'Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0 on line 1.', $deprecations[0]); } } @@ -71,6 +73,8 @@ class ParserTest extends TestCase } /** + * @group legacy + * @expectedDeprecationMessage Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable * @dataProvider getNonStringMappingKeysData */ public function testNonStringMappingKeys($expected, $yaml, $comment) @@ -469,7 +473,7 @@ EOF; public function testObjectSupportEnabled() { $input = <<<'EOF' -foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";} +foo: !php/object O:30:"Symfony\Component\Yaml\Tests\B":1:{s:1:"b";s:3:"foo";} bar: 1 EOF; $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); @@ -489,14 +493,29 @@ EOF; /** * @group legacy + * @dataProvider deprecatedObjectValueProvider */ - public function testObjectSupportEnabledWithDeprecatedTag() + public function testObjectSupportEnabledWithDeprecatedTag($yaml) { - $input = <<<'EOF' + $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($yaml, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); + } + + public function deprecatedObjectValueProvider() + { + return array( + array( + <<assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, Yaml::PARSE_OBJECT), '->parse() is able to parse objects'); +YAML + ), + array( + <<assertEquals($expected, $this->parser->parse($yaml, $flags)); } @@ -577,18 +592,18 @@ YAML; $expected->map = new \stdClass(); $expected->map->{1} = 'one'; $expected->map->{2} = 'two'; - $tests['numeric-keys'] = array($yaml, $expected, true); + $tests['numeric-keys'] = array($yaml, $expected); $yaml = <<<'YAML' map: - 0: one - 1: two + '0': one + '1': two YAML; $expected = new \stdClass(); $expected->map = new \stdClass(); $expected->map->{0} = 'one'; $expected->map->{1} = 'two'; - $tests['zero-indexed-numeric-keys'] = array($yaml, $expected, true); + $tests['zero-indexed-numeric-keys'] = array($yaml, $expected); return $tests; } @@ -776,6 +791,88 @@ EOT; $this->assertSame($expected, $this->parser->parse($yaml)); } + public function testNonStringFollowedByCommentEmbeddedInMapping() + { + $yaml = <<<'EOT' +a: + b: + {} +# comment + d: + 1.1 +# another comment +EOT; + $expected = array( + 'a' => array( + 'b' => array(), + 'd' => 1.1, + ), + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function getParseExceptionNotAffectedMultiLineStringLastResortParsing() + { + $tests = array(); + + $yaml = <<<'EOT' +a + b: +EOT; + $tests['parse error on first line'] = array($yaml); + + $yaml = <<<'EOT' +a + +b + c: +EOT; + $tests['parse error due to inconsistent indentation'] = array($yaml); + + $yaml = <<<'EOT' + & * ! | > ' " % @ ` #, { asd a;sdasd }-@^qw3 +EOT; + $tests['symfony/symfony/issues/22967#issuecomment-322067742'] = array($yaml); + + return $tests; + } + + /** + * @dataProvider getParseExceptionNotAffectedMultiLineStringLastResortParsing + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseExceptionNotAffectedByMultiLineStringLastResortParsing($yaml) + { + $this->parser->parse($yaml); + } + + public function testMultiLineStringLastResortParsing() + { + $yaml = <<<'EOT' +test: + You can have things that don't look like strings here + true + yes you can +EOT; + $expected = array( + 'test' => 'You can have things that don\'t look like strings here true yes you can', + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + + $yaml = <<<'EOT' +a: + b + c +EOT; + $expected = array( + 'a' => 'b c', + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ @@ -853,7 +950,7 @@ EOD; /** * @group legacy * @dataProvider getParseExceptionOnDuplicateData - * @expectedDeprecation Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated %s. + * @expectedDeprecation Duplicate key "%s" detected whilst parsing YAML. Silent handling of duplicate mapping keys in YAML is deprecated %s and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0 on line %d. * throws \Symfony\Component\Yaml\Exception\ParseException in 4.0 */ public function testParseExceptionOnDuplicate($input, $duplicateKey, $lineNumber) @@ -1081,7 +1178,7 @@ EOF; /** * @group legacy - * @expectedDeprecation Implicit casting of numeric key to string is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead. + * @expectedDeprecation Implicit casting of numeric key to string is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead on line 2. */ public function testFloatKeys() { @@ -1103,7 +1200,7 @@ EOF; /** * @group legacy - * @expectedDeprecation Implicit casting of non-string key to string is deprecated since version 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead. + * @expectedDeprecation Implicit casting of non-string key to string is deprecated since Symfony 3.3 and will throw \Symfony\Component\Yaml\Exception\ParseException in 4.0. Quote your evaluable mapping keys instead on line 1. */ public function testBooleanKeys() { @@ -1120,37 +1217,29 @@ EOF; $this->assertEquals($expected, $this->parser->parse($yaml)); } - public function testExplicitStringCastingOfFloatKeys() + public function testExplicitStringCasting() { $yaml = <<<'EOF' -foo: - 1.2: "bar" - 1.3: "baz" -EOF; +'1.2': "bar" +!!str 1.3: "baz" - $expected = array( - 'foo' => array( - '1.2' => 'bar', - '1.3' => 'baz', - ), - ); +'true': foo +!!str false: bar - $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_KEYS_AS_STRINGS)); - } - - public function testExplicitStringCastingOfBooleanKeys() - { - $yaml = <<<'EOF' -true: foo -false: bar +!!str null: 'null' +'~': 'null' EOF; $expected = array( + '1.2' => 'bar', + '1.3' => 'baz', 'true' => 'foo', 'false' => 'bar', + 'null' => 'null', + '~' => 'null', ); - $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_KEYS_AS_STRINGS)); + $this->assertEquals($expected, $this->parser->parse($yaml)); } /** @@ -1543,6 +1632,49 @@ EOT; $this->assertSame(array('foo' => 'bar baz foobar foo', 'bar' => 'baz'), $this->parser->parse($yaml)); } + public function testMultiLineQuotedStringWithTrailingBackslash() + { + $yaml = <<assertSame(array('foobar' => 'foobar'), $this->parser->parse($yaml)); + } + + public function testCommentCharactersInMultiLineQuotedStrings() + { + $yaml = << array( + 'foobar' => 'foo #bar', + 'bar' => 'baz', + ), + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function testBlankLinesInQuotedMultiLineString() + { + $yaml = << "foo\nbar", + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + public function testParseMultiLineUnquotedString() { $yaml = <<parse(file_get_contents(__DIR__.'/Fixtures/'.$testsFile)); + $files = $parser->parseFile(__DIR__.'/Fixtures/'.$testsFile); foreach ($files as $file) { $yamls = file_get_contents(__DIR__.'/Fixtures/'.$file.'.yml'); @@ -1823,6 +1955,35 @@ YAML; public function testPhpConstantTagMappingKey() { $yaml = << array( + 'foo' => array( + 'from' => array( + 'bar', + ), + 'to' => 'baz', + ), + ), + ); + + $this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT)); + } + + /** + * @group legacy + * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead on line 2. + * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead on line 4. + * @expectedDeprecation The !php/const: tag to indicate dumped PHP constants is deprecated since Symfony 3.4 and will be removed in 4.0. Use the !php/const (without the colon) tag instead on line 5. + */ + public function testDeprecatedPhpConstantTagMappingKey() + { + $yaml = <<assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT)); } + /** + * @group legacy + * @expectedDeprecation Using the Yaml::PARSE_KEYS_AS_STRINGS flag is deprecated since Symfony 3.4 as it will be removed in 4.0. Quote your keys when they are evaluable instead. + */ public function testPhpConstantTagMappingKeyWithKeysCastToStrings() { $yaml = << array( @@ -1865,6 +2030,222 @@ YAML; $this->assertSame($expected, $this->parser->parse($yaml, Yaml::PARSE_CONSTANT | Yaml::PARSE_KEYS_AS_STRINGS)); } + + public function testMergeKeysWhenMappingsAreParsedAsObjects() + { + $yaml = << (object) array( + 'bar' => 1, + ), + 'bar' => (object) array( + 'baz' => 2, + 'bar' => 1, + ), + 'baz' => (object) array( + 'baz_foo' => 3, + 'baz_bar' => 4, + ), + 'foobar' => (object) array( + 'bar' => null, + 'baz' => 2, + ), + ); + + $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP)); + } + + public function testFilenamesAreParsedAsStringsWithoutFlag() + { + $file = __DIR__.'/Fixtures/index.yml'; + + $this->assertSame($file, $this->parser->parse($file)); + } + + public function testParseFile() + { + $this->assertInternalType('array', $this->parser->parseFile(__DIR__.'/Fixtures/index.yml')); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessageRegExp #^File ".+/Fixtures/nonexistent.yml" does not exist\.$# + */ + public function testParsingNonExistentFilesThrowsException() + { + $this->parser->parseFile(__DIR__.'/Fixtures/nonexistent.yml'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessageRegExp #^File ".+/Fixtures/not_readable.yml" cannot be read\.$# + */ + public function testParsingNotReadableFilesThrowsException() + { + if ('\\' === DIRECTORY_SEPARATOR) { + $this->markTestSkipped('chmod is not supported on Windows'); + } + + $file = __DIR__.'/Fixtures/not_readable.yml'; + chmod($file, 0200); + + $this->parser->parseFile($file); + } + + public function testParseReferencesOnMergeKeys() + { + $yaml = << array( + 'a' => 'foo', + 'b' => 'bar', + 'c' => 'baz', + ), + 'mergekeyderef' => array( + 'd' => 'quux', + 'b' => 'bar', + 'c' => 'baz', + ), + ); + + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function testParseReferencesOnMergeKeysWithMappingsParsedAsObjects() + { + $yaml = << (object) array( + 'a' => 'foo', + 'b' => 'bar', + 'c' => 'baz', + ), + 'mergekeyderef' => (object) array( + 'd' => 'quux', + 'b' => 'bar', + 'c' => 'baz', + ), + ); + + $this->assertEquals($expected, $this->parser->parse($yaml, Yaml::PARSE_OBJECT_FOR_MAP)); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage Reference "foo" does not exist + */ + public function testEvalRefException() + { + $yaml = <<parser->parse($yaml); + } + + /** + * @dataProvider indentedMappingData + */ + public function testParseIndentedMappings($yaml, $expected) + { + $this->assertSame($expected, $this->parser->parse($yaml)); + } + + public function indentedMappingData() + { + $tests = array(); + + $yaml = << array( + array( + 'bar' => 'foobar', + 'baz' => 'foobaz', + ), + ), + ); + $tests['comment line is first line in indented block'] = array($yaml, $expected); + + $yaml = << array( + array( + 'bar' => array( + 'baz' => array(1, 2, 3), + ), + ), + ), + ); + $tests['mapping value on new line starting with a comment line'] = array($yaml, $expected); + + $yaml = << array( + array( + 'bar' => 'foobar', + ), + ), + ); + $tests['mapping in sequence starting on a new line'] = array($yaml, $expected); + + $yaml = << array( + 'bar' => 'baz', + ), + ); + $tests['blank line at the beginning of an indented mapping value'] = array($yaml, $expected); + + return $tests; + } } class B diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/Yaml.php b/wp-content/themes/physioassist/vendor/symfony/yaml/Yaml.php index 84f749b5..d429a339 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/Yaml.php +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/Yaml.php @@ -17,6 +17,8 @@ use Symfony\Component\Yaml\Exception\ParseException; * Yaml offers convenience methods to load and dump YAML. * * @author Fabien Potencier + * + * @final since version 3.4 */ class Yaml { @@ -31,8 +33,35 @@ class Yaml const PARSE_CONSTANT = 256; const PARSE_CUSTOM_TAGS = 512; const DUMP_EMPTY_ARRAY_AS_SEQUENCE = 1024; + + /** + * @deprecated since version 3.4, to be removed in 4.0. Quote your evaluable keys instead. + */ const PARSE_KEYS_AS_STRINGS = 2048; + /** + * Parses a YAML file into a PHP value. + * + * Usage: + * + * $array = Yaml::parseFile('config.yml'); + * print_r($array); + * + * + * @param string $filename The path to the YAML file to be parsed + * @param int $flags A bit field of PARSE_* constants to customize the YAML parser behavior + * + * @return mixed The YAML converted to a PHP value + * + * @throws ParseException If the file could not be read or the YAML is not valid + */ + public static function parseFile($filename, $flags = 0) + { + $yaml = new Parser(); + + return $yaml->parseFile($filename, $flags); + } + /** * Parses YAML into a PHP value. * @@ -52,7 +81,7 @@ class Yaml public static function parse($input, $flags = 0) { if (is_bool($flags)) { - @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the PARSE_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); if ($flags) { $flags = self::PARSE_EXCEPTION_ON_INVALID_TYPE; @@ -62,7 +91,7 @@ class Yaml } if (func_num_args() >= 3) { - @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the PARSE_OBJECT flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the PARSE_OBJECT flag instead.', E_USER_DEPRECATED); if (func_get_arg(2)) { $flags |= self::PARSE_OBJECT; @@ -70,7 +99,7 @@ class Yaml } if (func_num_args() >= 4) { - @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since version 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object for map support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the Yaml::PARSE_OBJECT_FOR_MAP flag instead.', E_USER_DEPRECATED); if (func_get_arg(3)) { $flags |= self::PARSE_OBJECT_FOR_MAP; @@ -98,7 +127,7 @@ class Yaml public static function dump($input, $inline = 2, $indent = 4, $flags = 0) { if (is_bool($flags)) { - @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since version 3.1 and will be removed in 4.0. Use the DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle exception handling is deprecated since Symfony 3.1 and will be removed in 4.0. Use the DUMP_EXCEPTION_ON_INVALID_TYPE flag instead.', E_USER_DEPRECATED); if ($flags) { $flags = self::DUMP_EXCEPTION_ON_INVALID_TYPE; @@ -108,7 +137,7 @@ class Yaml } if (func_num_args() >= 5) { - @trigger_error('Passing a boolean flag to toggle object support is deprecated since version 3.1 and will be removed in 4.0. Use the DUMP_OBJECT flag instead.', E_USER_DEPRECATED); + @trigger_error('Passing a boolean flag to toggle object support is deprecated since Symfony 3.1 and will be removed in 4.0. Use the DUMP_OBJECT flag instead.', E_USER_DEPRECATED); if (func_get_arg(4)) { $flags |= self::DUMP_OBJECT; diff --git a/wp-content/themes/physioassist/vendor/symfony/yaml/composer.json b/wp-content/themes/physioassist/vendor/symfony/yaml/composer.json index 698b5ced..a31a2cef 100644 --- a/wp-content/themes/physioassist/vendor/symfony/yaml/composer.json +++ b/wp-content/themes/physioassist/vendor/symfony/yaml/composer.json @@ -16,10 +16,13 @@ } ], "require": { - "php": ">=5.5.9" + "php": "^5.5.9|>=7.0.8" }, "require-dev": { - "symfony/console": "~2.8|~3.0" + "symfony/console": "~3.4|~4.0" + }, + "conflict": { + "symfony/console": "<3.4" }, "suggest": { "symfony/console": "For validating YAML files using the lint command" @@ -33,7 +36,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } } } -- 2.39.5