From 10e3fd5b4f5e171a8ecddac57a294a187c983bd6 Mon Sep 17 00:00:00 2001 From: Ivan Diaz Date: Wed, 18 Nov 2015 22:00:22 -0300 Subject: [PATCH] [Ivan Diaz] - Delete vendor --- server/composer.lock | 1140 ----- server/vendor/autoload.php | 7 - server/vendor/bin/phpunit | 1 - server/vendor/composer/ClassLoader.php | 413 -- server/vendor/composer/autoload_classmap.php | 450 -- .../vendor/composer/autoload_namespaces.php | 12 - server/vendor/composer/autoload_psr4.php | 13 - server/vendor/composer/autoload_real.php | 50 - server/vendor/composer/installed.json | 1167 ----- .../vendor/doctrine/instantiator/.gitignore | 5 - .../doctrine/instantiator/.scrutinizer.yml | 46 - .../doctrine/instantiator/.travis.install.sh | 14 - .../vendor/doctrine/instantiator/.travis.yml | 22 - .../doctrine/instantiator/CONTRIBUTING.md | 35 - server/vendor/doctrine/instantiator/LICENSE | 19 - server/vendor/doctrine/instantiator/README.md | 40 - .../doctrine/instantiator/composer.json | 45 - .../doctrine/instantiator/phpmd.xml.dist | 27 - .../doctrine/instantiator/phpunit.xml.dist | 22 - .../Exception/ExceptionInterface.php | 29 - .../Exception/InvalidArgumentException.php | 62 - .../Exception/UnexpectedValueException.php | 79 - .../Doctrine/Instantiator/Instantiator.php | 273 -- .../Instantiator/InstantiatorInterface.php | 37 - .../InstantiatorPerformanceEvent.php | 96 - .../InvalidArgumentExceptionTest.php | 83 - .../UnexpectedValueExceptionTest.php | 69 - .../InstantiatorTest/InstantiatorTest.php | 219 - .../AbstractClassAsset.php | 29 - .../ArrayObjectAsset.php | 41 - .../InstantiatorTestAsset/ExceptionAsset.php | 41 - .../FinalExceptionAsset.php | 41 - .../InstantiatorTestAsset/PharAsset.php | 41 - .../PharExceptionAsset.php | 44 - .../SerializableArrayObjectAsset.php | 62 - .../SimpleSerializableAsset.php | 61 - .../SimpleTraitAsset.php | 29 - .../UnCloneableAsset.php | 50 - .../UnserializeExceptionArrayObjectAsset.php | 39 - .../WakeUpNoticesAsset.php | 38 - .../InstantiatorTestAsset/XMLReaderAsset.php | 41 - server/vendor/gabordemooij/redbean/.gitignore | 26 - .../vendor/gabordemooij/redbean/.travis.yml | 20 - .../gabordemooij/redbean/README.markdown | 48 - .../redbean/RedBeanPHP/Adapter.php | 189 - .../redbean/RedBeanPHP/Adapter/DBAdapter.php | 230 - .../redbean/RedBeanPHP/AssociationManager.php | 341 -- .../redbean/RedBeanPHP/BeanCollection.php | 92 - .../redbean/RedBeanPHP/BeanHelper.php | 54 - .../BeanHelper/SimpleFacadeBeanHelper.php | 115 - .../redbean/RedBeanPHP/Cursor.php | 36 - .../redbean/RedBeanPHP/Cursor/NullCursor.php | 38 - .../redbean/RedBeanPHP/Cursor/PDOCursor.php | 62 - .../redbean/RedBeanPHP/Driver.php | 164 - .../redbean/RedBeanPHP/Driver/RPDO.php | 621 --- .../redbean/RedBeanPHP/DuplicationManager.php | 455 -- .../redbean/RedBeanPHP/Facade.php | 1793 ------- .../redbean/RedBeanPHP/Finder.php | 386 -- .../redbean/RedBeanPHP/Functions.php | 78 - .../redbean/RedBeanPHP/LabelMaker.php | 182 - .../redbean/RedBeanPHP/Logger.php | 34 - .../redbean/RedBeanPHP/Logger/RDefault.php | 133 - .../RedBeanPHP/Logger/RDefault/Debug.php | 185 - .../gabordemooij/redbean/RedBeanPHP/OODB.php | 545 --- .../redbean/RedBeanPHP/OODBBean.php | 1820 ------- .../redbean/RedBeanPHP/Observable.php | 75 - .../redbean/RedBeanPHP/Observer.php | 35 - .../redbean/RedBeanPHP/Plugin.php | 22 - .../redbean/RedBeanPHP/QueryWriter.php | 494 -- .../RedBeanPHP/QueryWriter/AQueryWriter.php | 1194 ----- .../redbean/RedBeanPHP/QueryWriter/CUBRID.php | 351 -- .../redbean/RedBeanPHP/QueryWriter/MySQL.php | 375 -- .../RedBeanPHP/QueryWriter/PostgreSQL.php | 381 -- .../RedBeanPHP/QueryWriter/SQLiteT.php | 437 -- .../gabordemooij/redbean/RedBeanPHP/R.php | 21 - .../redbean/RedBeanPHP/RedException.php | 20 - .../redbean/RedBeanPHP/RedException/SQL.php | 60 - .../redbean/RedBeanPHP/Repository.php | 598 --- .../redbean/RedBeanPHP/Repository/Fluid.php | 314 -- .../redbean/RedBeanPHP/Repository/Frozen.php | 197 - .../redbean/RedBeanPHP/SimpleModel.php | 113 - .../redbean/RedBeanPHP/SimpleModelHelper.php | 51 - .../redbean/RedBeanPHP/TagManager.php | 265 -- .../redbean/RedBeanPHP/ToolBox.php | 103 - .../redbean/RedBeanPHP/license.txt | 316 -- .../redbean/RedBeanPHP/loader.php | 79 - .../vendor/gabordemooij/redbean/composer.json | 22 - .../gabordemooij/redbean/deepfreeze.php | 49 - .../vendor/gabordemooij/redbean/p533patch.php | 19 - .../gabordemooij/redbean/replica2-win.php | 34 - .../vendor/gabordemooij/redbean/replica2.php | 128 - .../vendor/gabordemooij/redbean/test-dist.ini | 17 - .../gabordemooij/redbean/testing/RedUNIT.php | 124 - .../redbean/testing/RedUNIT/Base.php | 46 - .../redbean/testing/RedUNIT/Base/Aliasing.php | 545 --- .../redbean/testing/RedUNIT/Base/Arrays.php | 302 -- .../testing/RedUNIT/Base/Association.php | 357 -- .../redbean/testing/RedUNIT/Base/Batch.php | 139 - .../redbean/testing/RedUNIT/Base/Bean.php | 1039 ---- .../redbean/testing/RedUNIT/Base/Boxing.php | 74 - .../redbean/testing/RedUNIT/Base/Chill.php | 150 - .../redbean/testing/RedUNIT/Base/Close.php | 40 - .../redbean/testing/RedUNIT/Base/Copy.php | 326 -- .../redbean/testing/RedUNIT/Base/Count.php | 143 - .../redbean/testing/RedUNIT/Base/Cross.php | 530 --- .../redbean/testing/RedUNIT/Base/Cursors.php | 92 - .../redbean/testing/RedUNIT/Base/Database.php | 393 -- .../redbean/testing/RedUNIT/Base/Dispense.php | 168 - .../redbean/testing/RedUNIT/Base/Dup.php | 758 --- .../redbean/testing/RedUNIT/Base/Facade.php | 173 - .../redbean/testing/RedUNIT/Base/Finding.php | 858 ---- .../testing/RedUNIT/Base/Foreignkeys.php | 433 -- .../redbean/testing/RedUNIT/Base/Frozen.php | 115 - .../redbean/testing/RedUNIT/Base/Fuse.php | 442 -- .../redbean/testing/RedUNIT/Base/Indexes.php | 132 - .../redbean/testing/RedUNIT/Base/Issue259.php | 75 - .../redbean/testing/RedUNIT/Base/Issue303.php | 54 - .../redbean/testing/RedUNIT/Base/Issue408.php | 79 - .../redbean/testing/RedUNIT/Base/Issue90.php | 50 - .../redbean/testing/RedUNIT/Base/Joins.php | 235 - .../redbean/testing/RedUNIT/Base/Keywords.php | 79 - .../redbean/testing/RedUNIT/Base/Largenum.php | 40 - .../redbean/testing/RedUNIT/Base/Logging.php | 110 - .../redbean/testing/RedUNIT/Base/Misc.php | 677 --- .../testing/RedUNIT/Base/Namedparams.php | 127 - .../redbean/testing/RedUNIT/Base/Nuke.php | 54 - .../testing/RedUNIT/Base/Observers.php | 62 - .../testing/RedUNIT/Base/Performance.php | 126 - .../redbean/testing/RedUNIT/Base/Prefixes.php | 266 -- .../testing/RedUNIT/Base/Relations.php | 1757 ------- .../redbean/testing/RedUNIT/Base/Tags.php | 220 - .../redbean/testing/RedUNIT/Base/Threeway.php | 145 - .../redbean/testing/RedUNIT/Base/Traverse.php | 252 - .../testing/RedUNIT/Base/Typechecking.php | 177 - .../redbean/testing/RedUNIT/Base/Update.php | 542 --- .../redbean/testing/RedUNIT/Base/Utf8.php | 39 - .../redbean/testing/RedUNIT/Base/Via.php | 397 -- .../redbean/testing/RedUNIT/Base/With.php | 709 --- .../testing/RedUNIT/Base/Writecache.php | 537 --- .../redbean/testing/RedUNIT/Base/Xnull.php | 282 -- .../redbean/testing/RedUNIT/Blackhole.php | 28 - .../testing/RedUNIT/Blackhole/Debug.php | 149 - .../testing/RedUNIT/Blackhole/Export.php | 197 - .../testing/RedUNIT/Blackhole/Fusebox.php | 71 - .../testing/RedUNIT/Blackhole/Glue.php | 55 - .../testing/RedUNIT/Blackhole/Import.php | 313 -- .../testing/RedUNIT/Blackhole/Labels.php | 47 - .../testing/RedUNIT/Blackhole/Meta.php | 99 - .../testing/RedUNIT/Blackhole/Misc.php | 613 --- .../testing/RedUNIT/Blackhole/Plugins.php | 79 - .../testing/RedUNIT/Blackhole/Tainted.php | 158 - .../testing/RedUNIT/Blackhole/Toolbox.php | 131 - .../testing/RedUNIT/Blackhole/Version.php | 45 - .../redbean/testing/RedUNIT/CUBRID.php | 28 - .../redbean/testing/RedUNIT/CUBRID/Setget.php | 137 - .../redbean/testing/RedUNIT/CUBRID/Writer.php | 52 - .../redbean/testing/RedUNIT/Mysql.php | 28 - .../redbean/testing/RedUNIT/Mysql/Bigint.php | 149 - .../redbean/testing/RedUNIT/Mysql/Double.php | 59 - .../testing/RedUNIT/Mysql/Foreignkeys.php | 408 -- .../redbean/testing/RedUNIT/Mysql/Freeze.php | 150 - .../testing/RedUNIT/Mysql/Issue411.php | 57 - .../redbean/testing/RedUNIT/Mysql/Mix.php | 147 - .../testing/RedUNIT/Mysql/Parambind.php | 152 - .../testing/RedUNIT/Mysql/Preexist.php | 74 - .../redbean/testing/RedUNIT/Mysql/Setget.php | 152 - .../redbean/testing/RedUNIT/Mysql/Uuid.php | 320 -- .../redbean/testing/RedUNIT/Mysql/Writer.php | 662 --- .../redbean/testing/RedUNIT/Postgres.php | 28 - .../testing/RedUNIT/Postgres/Bigint.php | 136 - .../testing/RedUNIT/Postgres/Foreignkeys.php | 374 -- .../testing/RedUNIT/Postgres/Parambind.php | 55 - .../testing/RedUNIT/Postgres/Setget.php | 126 - .../redbean/testing/RedUNIT/Postgres/Uuid.php | 312 -- .../testing/RedUNIT/Postgres/Writer.php | 699 --- .../redbean/testing/RedUNIT/Pretest.php | 32 - .../redbean/testing/RedUNIT/Sqlite.php | 28 - .../testing/RedUNIT/Sqlite/Foreignkeys.php | 266 -- .../testing/RedUNIT/Sqlite/Parambind.php | 66 - .../testing/RedUNIT/Sqlite/Rebuild.php | 77 - .../redbean/testing/RedUNIT/Sqlite/Setget.php | 116 - .../redbean/testing/RedUNIT/Sqlite/Writer.php | 291 -- .../redbean/testing/cli/plugins/myhooks.php | 27 - .../redbean/testing/cli/runperf.php | 96 - .../redbean/testing/cli/runtests.php | 336 -- .../redbean/testing/cli/test_hook_example.php | 14 - .../cli/testcontainer/put-rb-file-here.txt | 5 - .../redbean/testing/config/test-dist.ini | 17 - .../redbean/testing/config/test-travis.ini | 18 - .../redbean/testing/helpers/classes.php | 669 --- .../redbean/testing/helpers/functions.php | 513 -- .../gabordemooij/redbean/testing/notes.txt | 8 - .../gabordemooij/redbean/testing/readme.txt | 11 - .../vendor/myclabs/deep-copy/.gitattributes | 7 - server/vendor/myclabs/deep-copy/.gitignore | 6 - server/vendor/myclabs/deep-copy/.travis.yml | 24 - server/vendor/myclabs/deep-copy/LICENSE | 20 - server/vendor/myclabs/deep-copy/README.md | 209 - server/vendor/myclabs/deep-copy/composer.json | 21 - server/vendor/myclabs/deep-copy/doc/clone.png | Bin 12380 -> 0 bytes .../myclabs/deep-copy/doc/deep-clone.png | Bin 14009 -> 0 bytes .../myclabs/deep-copy/doc/deep-copy.png | Bin 10895 -> 0 bytes server/vendor/myclabs/deep-copy/doc/graph.png | Bin 6436 -> 0 bytes .../deep-copy/src/DeepCopy/DeepCopy.php | 223 - .../src/DeepCopy/Exception/CloneException.php | 6 - .../Doctrine/DoctrineCollectionFilter.php | 31 - .../DoctrineEmptyCollectionFilter.php | 24 - .../deep-copy/src/DeepCopy/Filter/Filter.php | 17 - .../src/DeepCopy/Filter/KeepFilter.php | 17 - .../src/DeepCopy/Filter/ReplaceFilter.php | 35 - .../src/DeepCopy/Filter/SetNullFilter.php | 22 - .../src/DeepCopy/Matcher/Matcher.php | 16 - .../src/DeepCopy/Matcher/PropertyMatcher.php | 37 - .../DeepCopy/Matcher/PropertyNameMatcher.php | 30 - .../DeepCopy/Matcher/PropertyTypeMatcher.php | 38 - .../DeepCopy/Reflection/ReflectionHelper.php | 36 - .../reflection-docblock/.gitignore | 2 - .../reflection-docblock/.travis.yml | 32 - .../phpdocumentor/reflection-docblock/LICENSE | 21 - .../reflection-docblock/README.md | 57 - .../reflection-docblock/composer.json | 26 - .../reflection-docblock/composer.lock | 827 ---- .../reflection-docblock/phpunit.xml.dist | 14 - .../src/phpDocumentor/Reflection/DocBlock.php | 468 -- .../Reflection/DocBlock/Context.php | 154 - .../Reflection/DocBlock/Description.php | 223 - .../Reflection/DocBlock/Location.php | 76 - .../Reflection/DocBlock/Serializer.php | 198 - .../phpDocumentor/Reflection/DocBlock/Tag.php | 377 -- .../Reflection/DocBlock/Tag/AuthorTag.php | 131 - .../Reflection/DocBlock/Tag/CoversTag.php | 24 - .../Reflection/DocBlock/Tag/DeprecatedTag.php | 26 - .../Reflection/DocBlock/Tag/ExampleTag.php | 156 - .../Reflection/DocBlock/Tag/LinkTag.php | 81 - .../Reflection/DocBlock/Tag/MethodTag.php | 209 - .../Reflection/DocBlock/Tag/ParamTag.php | 119 - .../DocBlock/Tag/PropertyReadTag.php | 24 - .../Reflection/DocBlock/Tag/PropertyTag.php | 24 - .../DocBlock/Tag/PropertyWriteTag.php | 24 - .../Reflection/DocBlock/Tag/ReturnTag.php | 99 - .../Reflection/DocBlock/Tag/SeeTag.php | 81 - .../Reflection/DocBlock/Tag/SinceTag.php | 26 - .../Reflection/DocBlock/Tag/SourceTag.php | 137 - .../Reflection/DocBlock/Tag/ThrowsTag.php | 24 - .../Reflection/DocBlock/Tag/UsesTag.php | 24 - .../Reflection/DocBlock/Tag/VarTag.php | 24 - .../Reflection/DocBlock/Tag/VersionTag.php | 108 - .../Reflection/DocBlock/Type/Collection.php | 221 - .../Reflection/DocBlock/DescriptionTest.php | 245 - .../Reflection/DocBlock/Tag/CoversTagTest.php | 86 - .../DocBlock/Tag/DeprecatedTagTest.php | 115 - .../DocBlock/Tag/ExampleTagTest.php | 203 - .../Reflection/DocBlock/Tag/LinkTagTest.php | 87 - .../Reflection/DocBlock/Tag/MethodTagTest.php | 146 - .../Reflection/DocBlock/Tag/ParamTagTest.php | 118 - .../Reflection/DocBlock/Tag/ReturnTagTest.php | 102 - .../Reflection/DocBlock/Tag/SeeTagTest.php | 86 - .../Reflection/DocBlock/Tag/SinceTagTest.php | 115 - .../Reflection/DocBlock/Tag/SourceTagTest.php | 116 - .../Reflection/DocBlock/Tag/ThrowsTagTest.php | 102 - .../Reflection/DocBlock/Tag/UsesTagTest.php | 86 - .../Reflection/DocBlock/Tag/VarTagTest.php | 94 - .../DocBlock/Tag/VersionTagTest.php | 115 - .../Reflection/DocBlock/TagTest.php | 313 -- .../DocBlock/Type/CollectionTest.php | 195 - .../phpDocumentor/Reflection/DocBlockTest.php | 337 -- server/vendor/phpspec/prophecy/.gitignore | 4 - server/vendor/phpspec/prophecy/.travis.yml | 19 - server/vendor/phpspec/prophecy/CHANGES.md | 122 - .../vendor/phpspec/prophecy/CONTRIBUTING.md | 21 - server/vendor/phpspec/prophecy/LICENSE | 23 - server/vendor/phpspec/prophecy/README.md | 390 -- server/vendor/phpspec/prophecy/composer.json | 40 - server/vendor/phpspec/prophecy/composer.lock | 731 --- .../Argument/ArgumentsWildcardSpec.php | 146 - .../Argument/Token/AnyValueTokenSpec.php | 28 - .../Argument/Token/AnyValuesTokenSpec.php | 28 - .../Argument/Token/ArrayCountTokenSpec.php | 64 - .../Argument/Token/ArrayEntryTokenSpec.php | 229 - .../Token/ArrayEveryEntryTokenSpec.php | 109 - .../Argument/Token/CallbackTokenSpec.php | 42 - .../Argument/Token/ExactValueTokenSpec.php | 155 - .../Token/IdenticalValueTokenSpec.php | 152 - .../Argument/Token/LogicalAndTokenSpec.php | 78 - .../Argument/Token/LogicalNotTokenSpec.php | 65 - .../Argument/Token/ObjectStateTokenSpec.php | 101 - .../Token/StringContainsTokenSpec.php | 49 - .../Prophecy/Argument/Token/TypeTokenSpec.php | 62 - .../prophecy/spec/Prophecy/ArgumentSpec.php | 101 - .../spec/Prophecy/Call/CallCenterSpec.php | 195 - .../prophecy/spec/Prophecy/Call/CallSpec.php | 54 - .../Comparator/ClosureComparatorSpec.php | 39 - .../spec/Prophecy/Comparator/FactorySpec.php | 20 - .../DisableConstructorPatchSpec.php | 59 - .../ClassPatch/HhvmExceptionPatchSpec.php | 37 - .../Doubler/ClassPatch/KeywordPatchSpec.php | 44 - .../Doubler/ClassPatch/MagicCallPatchSpec.php | 76 - .../ClassPatch/ProphecySubjectPatchSpec.php | 83 - .../ReflectionClassNewInstancePatchSpec.php | 47 - .../ClassPatch/SplFileInfoPatchSpec.php | 91 - .../ClassPatch/TraversablePatchSpec.php | 61 - .../spec/Prophecy/Doubler/DoublerSpec.php | 122 - .../Generator/ClassCodeGeneratorSpec.php | 191 - .../Doubler/Generator/ClassCreatorSpec.php | 44 - .../Doubler/Generator/ClassMirrorSpec.php | 610 --- .../Generator/Node/ArgumentNodeSpec.php | 62 - .../Doubler/Generator/Node/ClassNodeSpec.php | 154 - .../Doubler/Generator/Node/MethodNodeSpec.php | 138 - .../spec/Prophecy/Doubler/LazyDoubleSpec.php | 96 - .../Prophecy/Doubler/NameGeneratorSpec.php | 72 - .../Call/UnexpectedCallExceptionSpec.php | 32 - .../Doubler/ClassCreatorExceptionSpec.php | 28 - .../Doubler/ClassMirrorExceptionSpec.php | 27 - .../Doubler/ClassNotFoundExceptionSpec.php | 25 - .../Exception/Doubler/DoubleExceptionSpec.php | 14 - .../InterfaceNotFoundExceptionSpec.php | 24 - .../Doubler/MethodNotFoundExceptionSpec.php | 40 - .../Prediction/AggregateExceptionSpec.php | 57 - .../Prediction/NoCallsExceptionSpec.php | 29 - .../UnexpectedCallsCountExceptionSpec.php | 31 - .../UnexpectedCallsExceptionSpec.php | 36 - .../Prophecy/MethodProphecyExceptionSpec.php | 30 - .../Prophecy/ObjectProphecyExceptionSpec.php | 27 - .../Prediction/CallPredictionSpec.php | 42 - .../Prediction/CallTimesPredictionSpec.php | 54 - .../Prediction/CallbackPredictionSpec.php | 36 - .../Prediction/NoCallsPredictionSpec.php | 43 - .../Prophecy/Promise/CallbackPromiseSpec.php | 110 - .../Promise/ReturnArgumentPromiseSpec.php | 41 - .../Prophecy/Promise/ReturnPromiseSpec.php | 61 - .../Prophecy/Promise/ThrowPromiseSpec.php | 58 - .../Prophecy/Prophecy/MethodProphecySpec.php | 384 -- .../Prophecy/Prophecy/ObjectProphecySpec.php | 319 -- .../spec/Prophecy/Prophecy/RevealerSpec.php | 51 - .../prophecy/spec/Prophecy/ProphetSpec.php | 91 - .../spec/Prophecy/Util/StringUtilSpec.php | 97 - .../prophecy/src/Prophecy/Argument.php | 198 - .../Prophecy/Argument/ArgumentsWildcard.php | 101 - .../Prophecy/Argument/Token/AnyValueToken.php | 52 - .../Argument/Token/AnyValuesToken.php | 52 - .../Argument/Token/ArrayCountToken.php | 86 - .../Argument/Token/ArrayEntryToken.php | 143 - .../Argument/Token/ArrayEveryEntryToken.php | 82 - .../Prophecy/Argument/Token/CallbackToken.php | 75 - .../Argument/Token/ExactValueToken.php | 116 - .../Argument/Token/IdenticalValueToken.php | 74 - .../Argument/Token/LogicalAndToken.php | 80 - .../Argument/Token/LogicalNotToken.php | 73 - .../Argument/Token/ObjectStateToken.php | 104 - .../Argument/Token/StringContainsToken.php | 67 - .../Argument/Token/TokenInterface.php | 43 - .../src/Prophecy/Argument/Token/TypeToken.php | 76 - .../prophecy/src/Prophecy/Call/Call.php | 127 - .../prophecy/src/Prophecy/Call/CallCenter.php | 152 - .../Prophecy/Comparator/ClosureComparator.php | 42 - .../src/Prophecy/Comparator/Factory.php | 46 - .../src/Prophecy/Doubler/CachedDoubler.php | 68 - .../ClassPatch/ClassPatchInterface.php | 48 - .../ClassPatch/DisableConstructorPatch.php | 72 - .../Doubler/ClassPatch/HhvmExceptionPatch.php | 63 - .../Doubler/ClassPatch/KeywordPatch.php | 135 - .../Doubler/ClassPatch/MagicCallPatch.php | 73 - .../ClassPatch/ProphecySubjectPatch.php | 98 - .../ReflectionClassNewInstancePatch.php | 57 - .../Doubler/ClassPatch/SplFileInfoPatch.php | 85 - .../Doubler/ClassPatch/TraversablePatch.php | 83 - .../src/Prophecy/Doubler/DoubleInterface.php | 22 - .../prophecy/src/Prophecy/Doubler/Doubler.php | 146 - .../Doubler/Generator/ClassCodeGenerator.php | 92 - .../Doubler/Generator/ClassCreator.php | 67 - .../Doubler/Generator/ClassMirror.php | 210 - .../Doubler/Generator/Node/ArgumentNode.php | 75 - .../Doubler/Generator/Node/ClassNode.php | 130 - .../Doubler/Generator/Node/MethodNode.php | 177 - .../Doubler/Generator/ReflectionInterface.php | 22 - .../src/Prophecy/Doubler/LazyDouble.php | 127 - .../src/Prophecy/Doubler/NameGenerator.php | 52 - .../Call/UnexpectedCallException.php | 40 - .../Doubler/ClassCreatorException.php | 31 - .../Doubler/ClassMirrorException.php | 31 - .../Doubler/ClassNotFoundException.php | 33 - .../Exception/Doubler/DoubleException.php | 18 - .../Exception/Doubler/DoublerException.php | 18 - .../Doubler/InterfaceNotFoundException.php | 20 - .../Doubler/MethodNotFoundException.php | 60 - .../Doubler/ReturnByReferenceException.php | 41 - .../src/Prophecy/Exception/Exception.php | 26 - .../Exception/InvalidArgumentException.php | 16 - .../Prediction/AggregateException.php | 50 - .../Prediction/FailedPredictionException.php | 24 - .../Exception/Prediction/NoCallsException.php | 18 - .../Prediction/PredictionException.php | 18 - .../UnexpectedCallsCountException.php | 31 - .../Prediction/UnexpectedCallsException.php | 32 - .../Prophecy/MethodProphecyException.php | 34 - .../Prophecy/ObjectProphecyException.php | 34 - .../Exception/Prophecy/ProphecyException.php | 18 - .../Prophecy/Prediction/CallPrediction.php | 86 - .../Prediction/CallTimesPrediction.php | 107 - .../Prediction/CallbackPrediction.php | 65 - .../Prophecy/Prediction/NoCallsPrediction.php | 68 - .../Prediction/PredictionInterface.php | 37 - .../src/Prophecy/Promise/CallbackPromise.php | 66 - .../src/Prophecy/Promise/PromiseInterface.php | 35 - .../Promise/ReturnArgumentPromise.php | 61 - .../src/Prophecy/Promise/ReturnPromise.php | 55 - .../src/Prophecy/Promise/ThrowPromise.php | 91 - .../src/Prophecy/Prophecy/MethodProphecy.php | 437 -- .../src/Prophecy/Prophecy/ObjectProphecy.php | 279 -- .../Prophecy/Prophecy/ProphecyInterface.php | 27 - .../Prophecy/ProphecySubjectInterface.php | 34 - .../src/Prophecy/Prophecy/Revealer.php | 44 - .../Prophecy/Prophecy/RevealerInterface.php | 29 - .../phpspec/prophecy/src/Prophecy/Prophet.php | 134 - .../prophecy/src/Prophecy/Util/ExportUtil.php | 185 - .../prophecy/src/Prophecy/Util/StringUtil.php | 89 - .../phpunit/php-code-coverage/.gitattributes | 1 - .../phpunit/php-code-coverage/.gitignore | 11 - .../vendor/phpunit/php-code-coverage/.php_cs | 43 - .../phpunit/php-code-coverage/.travis.yml | 16 - .../phpunit/php-code-coverage/CONTRIBUTING.md | 1 - .../php-code-coverage/ChangeLog-2.2.md | 56 - .../php-code-coverage/ChangeLog-3.0.md | 31 - .../vendor/phpunit/php-code-coverage/LICENSE | 33 - .../phpunit/php-code-coverage/README.md | 50 - .../phpunit/php-code-coverage/build.xml | 41 - .../phpunit/php-code-coverage/composer.json | 50 - .../php-code-coverage/phpunit.xml.dist | 23 - .../php-code-coverage/src/CodeCoverage.php | 934 ---- .../src/CodeCoverage/Driver.php | 47 - .../src/CodeCoverage/Driver/HHVM.php | 26 - .../src/CodeCoverage/Driver/PHPDBG.php | 105 - .../src/CodeCoverage/Driver/Xdebug.php | 97 - .../src/CodeCoverage/Exception/Exception.php | 18 - .../Exception/InvalidArgumentException.php | 37 - .../Exception/RuntimeException.php | 16 - .../UnintentionallyCoveredCodeException.php | 18 - .../src/CodeCoverage/Filter.php | 176 - .../src/CodeCoverage/Report/Clover.php | 284 -- .../src/CodeCoverage/Report/Crap4j.php | 164 - .../src/CodeCoverage/Report/Factory.php | 242 - .../src/CodeCoverage/Report/HTML.php | 182 - .../src/CodeCoverage/Report/HTML/Renderer.php | 271 -- .../Report/HTML/Renderer/Dashboard.php | 295 -- .../Report/HTML/Renderer/Directory.php | 97 - .../Report/HTML/Renderer/File.php | 556 --- .../Renderer/Template/coverage_bar.html.dist | 5 - .../Renderer/Template/css/bootstrap.min.css | 5 - .../HTML/Renderer/Template/css/nv.d3.min.css | 1 - .../HTML/Renderer/Template/css/style.css | 122 - .../Renderer/Template/dashboard.html.dist | 284 -- .../Renderer/Template/directory.html.dist | 61 - .../Template/directory_item.html.dist | 13 - .../HTML/Renderer/Template/file.html.dist | 90 - .../Renderer/Template/file_item.html.dist | 14 - .../fonts/glyphicons-halflings-regular.eot | Bin 20127 -> 0 bytes .../fonts/glyphicons-halflings-regular.svg | 288 -- .../fonts/glyphicons-halflings-regular.ttf | Bin 45404 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff | Bin 23424 -> 0 bytes .../fonts/glyphicons-halflings-regular.woff2 | Bin 18028 -> 0 bytes .../Renderer/Template/js/bootstrap.min.js | 7 - .../HTML/Renderer/Template/js/d3.min.js | 5 - .../HTML/Renderer/Template/js/holder.min.js | 12 - .../Renderer/Template/js/html5shiv.min.js | 4 - .../HTML/Renderer/Template/js/jquery.min.js | 5 - .../HTML/Renderer/Template/js/nv.d3.min.js | 8 - .../HTML/Renderer/Template/js/respond.min.js | 5 - .../Renderer/Template/method_item.html.dist | 11 - .../src/CodeCoverage/Report/Node.php | 339 -- .../CodeCoverage/Report/Node/Directory.php | 478 -- .../src/CodeCoverage/Report/Node/File.php | 679 --- .../src/CodeCoverage/Report/Node/Iterator.php | 105 - .../src/CodeCoverage/Report/PHP.php | 48 - .../src/CodeCoverage/Report/Text.php | 246 - .../src/CodeCoverage/Report/XML.php | 234 - .../src/CodeCoverage/Report/XML/Directory.php | 16 - .../src/CodeCoverage/Report/XML/File.php | 73 - .../CodeCoverage/Report/XML/File/Coverage.php | 66 - .../CodeCoverage/Report/XML/File/Method.php | 58 - .../CodeCoverage/Report/XML/File/Report.php | 72 - .../src/CodeCoverage/Report/XML/File/Unit.php | 97 - .../src/CodeCoverage/Report/XML/Node.php | 89 - .../src/CodeCoverage/Report/XML/Project.php | 63 - .../src/CodeCoverage/Report/XML/Tests.php | 45 - .../src/CodeCoverage/Report/XML/Totals.php | 140 - .../src/CodeCoverage/Util.php | 47 - .../tests/PHP/CodeCoverage/FilterTest.php | 197 - .../PHP/CodeCoverage/Report/CloverTest.php | 66 - .../PHP/CodeCoverage/Report/FactoryTest.php | 222 - .../tests/PHP/CodeCoverage/UtilTest.php | 30 - .../tests/PHP/CodeCoverageTest.php | 509 -- .../php-code-coverage/tests/TestCase.php | 326 -- .../tests/_files/BankAccount-clover.xml | 26 - .../tests/_files/BankAccount.php | 33 - .../tests/_files/BankAccountTest.php | 66 - .../_files/CoverageClassExtendedTest.php | 12 - .../tests/_files/CoverageClassTest.php | 12 - .../CoverageFunctionParenthesesTest.php | 11 - ...erageFunctionParenthesesWhitespaceTest.php | 11 - .../tests/_files/CoverageFunctionTest.php | 11 - .../CoverageMethodOneLineAnnotationTest.php | 11 - .../_files/CoverageMethodParenthesesTest.php | 12 - ...overageMethodParenthesesWhitespaceTest.php | 12 - .../tests/_files/CoverageMethodTest.php | 12 - .../tests/_files/CoverageNoneTest.php | 9 - .../tests/_files/CoverageNotPrivateTest.php | 12 - .../tests/_files/CoverageNotProtectedTest.php | 12 - .../tests/_files/CoverageNotPublicTest.php | 12 - .../tests/_files/CoverageNothingTest.php | 13 - .../tests/_files/CoveragePrivateTest.php | 12 - .../tests/_files/CoverageProtectedTest.php | 12 - .../tests/_files/CoveragePublicTest.php | 12 - .../CoverageTwoDefaultClassAnnotations.php | 18 - .../tests/_files/CoveredClass.php | 36 - .../tests/_files/CoveredFunction.php | 4 - .../NamespaceCoverageClassExtendedTest.php | 12 - .../_files/NamespaceCoverageClassTest.php | 12 - ...NamespaceCoverageCoversClassPublicTest.php | 15 - .../NamespaceCoverageCoversClassTest.php | 20 - .../_files/NamespaceCoverageMethodTest.php | 12 - .../NamespaceCoverageNotPrivateTest.php | 12 - .../NamespaceCoverageNotProtectedTest.php | 12 - .../_files/NamespaceCoverageNotPublicTest.php | 12 - .../_files/NamespaceCoveragePrivateTest.php | 12 - .../_files/NamespaceCoverageProtectedTest.php | 12 - .../_files/NamespaceCoveragePublicTest.php | 12 - .../tests/_files/NamespaceCoveredClass.php | 38 - .../_files/NotExistingCoveredElementTest.php | 24 - .../class-with-anonymous-function-clover.xml | 22 - .../tests/_files/ignored-lines-clover.xml | 17 - ...urce_with_class_and_anonymous_function.php | 19 - .../tests/_files/source_with_ignore.php | 37 - .../tests/_files/source_with_namespace.php | 20 - .../source_with_oneline_annotations.php | 36 - .../tests/_files/source_without_ignore.php | 4 - .../tests/_files/source_without_namespace.php | 18 - .../phpunit/php-file-iterator/.gitattributes | 1 - .../phpunit/php-file-iterator/.gitignore | 7 - .../phpunit/php-file-iterator/ChangeLog.md | 10 - .../vendor/phpunit/php-file-iterator/LICENSE | 33 - .../phpunit/php-file-iterator/README.md | 12 - .../phpunit/php-file-iterator/composer.json | 36 - .../phpunit/php-file-iterator/src/Facade.php | 123 - .../phpunit/php-file-iterator/src/Factory.php | 91 - .../php-file-iterator/src/Iterator.php | 158 - .../phpunit/php-text-template/.gitattributes | 1 - .../phpunit/php-text-template/.gitignore | 5 - .../vendor/phpunit/php-text-template/LICENSE | 33 - .../phpunit/php-text-template/README.md | 14 - .../phpunit/php-text-template/composer.json | 29 - .../php-text-template/src/Template.php | 135 - .../vendor/phpunit/php-timer/.gitattributes | 1 - server/vendor/phpunit/php-timer/.gitignore | 7 - server/vendor/phpunit/php-timer/.travis.yml | 22 - server/vendor/phpunit/php-timer/LICENSE | 33 - server/vendor/phpunit/php-timer/README.md | 47 - server/vendor/phpunit/php-timer/composer.json | 29 - server/vendor/phpunit/php-timer/src/Timer.php | 107 - .../phpunit/php-timer/tests/TimerTest.php | 101 - .../phpunit/php-token-stream/.gitattributes | 1 - .../phpunit/php-token-stream/.gitignore | 4 - .../phpunit/php-token-stream/.travis.yml | 35 - .../vendor/phpunit/php-token-stream/LICENSE | 33 - .../vendor/phpunit/php-token-stream/README.md | 13 - .../vendor/phpunit/php-token-stream/build.xml | 33 - .../phpunit/php-token-stream/composer.json | 34 - .../phpunit/php-token-stream/src/Token.php | 846 ---- .../php-token-stream/src/Token/Stream.php | 606 --- .../src/Token/Stream/CachingFactory.php | 51 - .../tests/Token/ClassTest.php | 112 - .../tests/Token/ClosureTest.php | 85 - .../tests/Token/FunctionTest.php | 146 - .../tests/Token/IncludeTest.php | 73 - .../tests/Token/InterfaceTest.php | 191 - .../tests/Token/NamespaceTest.php | 80 - .../php-token-stream/tests/TokenTest.php | 42 - .../_fixture/classExtendsNamespacedClass.php | 10 - .../tests/_fixture/classInNamespace.php | 6 - .../tests/_fixture/classInScopedNamespace.php | 9 - ...h_method_that_declares_anonymous_class.php | 15 - ..._method_that_declares_anonymous_class2.php | 16 - .../tests/_fixture/closure.php | 7 - .../tests/_fixture/issue19.php | 3 - .../tests/_fixture/issue30.php | 8 - ...tipleNamespacesWithOneClassUsingBraces.php | 12 - ...espacesWithOneClassUsingNonBraceSyntax.php | 14 - .../tests/_fixture/source.php | 36 - .../tests/_fixture/source2.php | 6 - .../tests/_fixture/source3.php | 14 - .../tests/_fixture/source4.php | 30 - .../tests/_fixture/source5.php | 5 - .../php-token-stream/tests/bootstrap.php | 7 - .../phpunit-mock-objects/.gitattributes | 1 - .../phpunit/phpunit-mock-objects/.gitignore | 8 - .../phpunit/phpunit-mock-objects/.php_cs | 43 - .../phpunit/phpunit-mock-objects/.travis.yml | 22 - .../phpunit-mock-objects/CONTRIBUTING.md | 1 - .../phpunit/phpunit-mock-objects/LICENSE | 33 - .../phpunit/phpunit-mock-objects/README.md | 21 - .../phpunit/phpunit-mock-objects/build.xml | 42 - .../phpunit-mock-objects/composer.json | 50 - .../phpunit-mock-objects/phpunit.xml.dist | 22 - .../Framework/MockObject/Builder/Identity.php | 30 - .../MockObject/Builder/InvocationMocker.php | 256 - .../Framework/MockObject/Builder/Match.php | 26 - .../MockObject/Builder/MethodNameMatch.php | 28 - .../MockObject/Builder/Namespace.php | 39 - .../MockObject/Builder/ParametersMatch.php | 49 - .../src/Framework/MockObject/Builder/Stub.php | 26 - .../Exception/BadMethodCallException.php | 16 - .../MockObject/Exception/Exception.php | 18 - .../MockObject/Exception/RuntimeException.php | 16 - .../src/Framework/MockObject/Generator.php | 1181 ----- .../Generator/mocked_class.tpl.dist | 39 - .../Generator/mocked_class_method.tpl.dist | 7 - .../Generator/mocked_clone.tpl.dist | 4 - .../Generator/mocked_method.tpl.dist | 22 - .../Generator/mocked_static_method.tpl.dist | 5 - .../Generator/proxied_method.tpl.dist | 22 - .../MockObject/Generator/trait_class.tpl.dist | 4 - .../Generator/unmocked_clone.tpl.dist | 5 - .../MockObject/Generator/wsdl_class.tpl.dist | 7 - .../MockObject/Generator/wsdl_method.tpl.dist | 4 - .../src/Framework/MockObject/Invocation.php | 22 - .../MockObject/Invocation/Object.php | 36 - .../MockObject/Invocation/Static.php | 190 - .../Framework/MockObject/InvocationMocker.php | 157 - .../src/Framework/MockObject/Invokable.php | 39 - .../src/Framework/MockObject/Matcher.php | 271 -- .../MockObject/Matcher/AnyInvokedCount.php | 32 - .../MockObject/Matcher/AnyParameters.php | 34 - .../Matcher/ConsecutiveParameters.php | 123 - .../MockObject/Matcher/Invocation.php | 48 - .../MockObject/Matcher/InvokedAtIndex.php | 86 - .../Matcher/InvokedAtLeastCount.php | 57 - .../MockObject/Matcher/InvokedAtLeastOnce.php | 45 - .../MockObject/Matcher/InvokedAtMostCount.php | 57 - .../MockObject/Matcher/InvokedCount.php | 109 - .../MockObject/Matcher/InvokedRecorder.php | 67 - .../MockObject/Matcher/MethodName.php | 66 - .../MockObject/Matcher/Parameters.php | 127 - .../Matcher/StatelessInvocation.php | 56 - .../src/Framework/MockObject/MockBuilder.php | 322 -- .../src/Framework/MockObject/MockObject.php | 52 - .../src/Framework/MockObject/Stub.php | 31 - .../MockObject/Stub/ConsecutiveCalls.php | 48 - .../Framework/MockObject/Stub/Exception.php | 41 - .../MockObject/Stub/MatcherCollection.php | 26 - .../src/Framework/MockObject/Stub/Return.php | 41 - .../MockObject/Stub/ReturnArgument.php | 38 - .../MockObject/Stub/ReturnCallback.php | 51 - .../Framework/MockObject/Stub/ReturnSelf.php | 34 - .../MockObject/Stub/ReturnValueMap.php | 47 - .../src/Framework/MockObject/Verifiable.php | 25 - .../tests/GeneratorTest.php | 183 - .../tests/MockBuilderTest.php | 107 - .../tests/MockObject/232.phpt | 128 - .../Builder/InvocationMockerTest.php | 38 - .../MockObject/Invocation/ObjectTest.php | 106 - .../MockObject/Invocation/StaticTest.php | 86 - .../Matcher/ConsecutiveParametersTest.php | 45 - .../tests/MockObject/abstract_class.phpt | 146 - .../tests/MockObject/class.phpt | 124 - .../MockObject/class_call_parent_clone.phpt | 76 - .../class_call_parent_constructor.phpt | 75 - .../class_dont_call_parent_clone.phpt | 75 - .../class_dont_call_parent_constructor.phpt | 75 - ...ing_interface_call_parent_constructor.phpt | 80 - ...nterface_dont_call_parent_constructor.phpt | 80 - .../tests/MockObject/class_partial.phpt | 102 - .../class_with_method_named_method.phpt | 91 - ...s_with_method_with_variadic_arguments.phpt | 98 - .../tests/MockObject/interface.phpt | 96 - .../invocation_object_clone_object.phpt | 125 - .../tests/MockObject/namespaced_class.phpt | 126 - .../namespaced_class_call_parent_clone.phpt | 78 - ...espaced_class_call_parent_constructor.phpt | 77 - ...mespaced_class_dont_call_parent_clone.phpt | 77 - ...ed_class_dont_call_parent_constructor.phpt | 77 - ...ing_interface_call_parent_constructor.phpt | 82 - ...nterface_dont_call_parent_constructor.phpt | 82 - .../MockObject/namespaced_class_partial.phpt | 104 - .../MockObject/namespaced_interface.phpt | 98 - .../tests/MockObject/nonexistent_class.phpt | 73 - .../nonexistent_class_with_namespace.phpt | 81 - ...ith_namespace_starting_with_separator.phpt | 81 - .../tests/MockObject/proxy.phpt | 120 - ...eturn_type_declarations_object_method.phpt | 103 - .../return_type_declarations_self.phpt | 100 - ...eturn_type_declarations_static_method.phpt | 86 - .../MockObject/scalar_type_declarations.phpt | 102 - .../tests/MockObject/wsdl_class.phpt | 37 - .../MockObject/wsdl_class_namespace.phpt | 39 - .../tests/MockObject/wsdl_class_partial.phpt | 30 - .../tests/MockObjectTest.php | 852 ---- .../tests/ProxyObjectTest.php | 40 - .../tests/_fixture/AbstractMockTestClass.php | 10 - .../tests/_fixture/AbstractTrait.php | 15 - .../tests/_fixture/AnInterface.php | 5 - .../tests/_fixture/AnotherInterface.php | 5 - .../tests/_fixture/Bar.php | 8 - .../ClassThatImplementsSerializable.php | 15 - .../tests/_fixture/ClassWithStaticMethod.php | 7 - .../tests/_fixture/Foo.php | 8 - .../tests/_fixture/FunctionCallback.php | 9 - .../tests/_fixture/GoogleSearch.wsdl | 198 - .../InterfaceWithSemiReservedMethodName.php | 5 - .../_fixture/InterfaceWithStaticMethod.php | 5 - .../tests/_fixture/MethodCallback.php | 21 - .../_fixture/MethodCallbackByReference.php | 13 - .../tests/_fixture/MockTestInterface.php | 6 - .../tests/_fixture/Mockable.php | 28 - .../tests/_fixture/PartialMockTestClass.php | 18 - .../tests/_fixture/SingletonClass.php | 28 - .../tests/_fixture/SomeClass.php | 13 - .../tests/_fixture/StaticMockTestClass.php | 12 - .../tests/_fixture/StringableClass.php | 8 - .../_fixture/TraversableMockTestInterface.php | 4 - .../phpunit-mock-objects/tests/bootstrap.php | 3 - server/vendor/phpunit/phpunit/.gitattributes | 3 - server/vendor/phpunit/phpunit/.gitignore | 22 - server/vendor/phpunit/phpunit/.php_cs | 69 - server/vendor/phpunit/phpunit/.travis.yml | 36 - .../vendor/phpunit/phpunit/CODE_OF_CONDUCT.md | 14 - server/vendor/phpunit/phpunit/CONTRIBUTING.md | 66 - .../vendor/phpunit/phpunit/ChangeLog-4.0.md | 176 - .../vendor/phpunit/phpunit/ChangeLog-4.1.md | 73 - .../vendor/phpunit/phpunit/ChangeLog-4.2.md | 56 - .../vendor/phpunit/phpunit/ChangeLog-4.3.md | 54 - .../vendor/phpunit/phpunit/ChangeLog-4.4.md | 57 - .../vendor/phpunit/phpunit/ChangeLog-4.5.md | 28 - .../vendor/phpunit/phpunit/ChangeLog-4.6.md | 95 - .../vendor/phpunit/phpunit/ChangeLog-4.7.md | 71 - .../vendor/phpunit/phpunit/ChangeLog-4.8.md | 152 - .../vendor/phpunit/phpunit/ChangeLog-5.0.md | 120 - server/vendor/phpunit/phpunit/LICENSE | 33 - server/vendor/phpunit/phpunit/README.md | 46 - server/vendor/phpunit/phpunit/build.xml | 293 -- server/vendor/phpunit/phpunit/composer.json | 71 - server/vendor/phpunit/phpunit/phpdox.xml.dist | 23 - server/vendor/phpunit/phpunit/phpunit | 47 - .../vendor/phpunit/phpunit/phpunit.xml.dist | 34 - server/vendor/phpunit/phpunit/phpunit.xsd | 249 - .../vendor/phpunit/phpunit/src/Exception.php | 18 - .../phpunit/src/Extensions/GroupTestSuite.php | 60 - .../phpunit/src/Extensions/PhptTestCase.php | 241 - .../phpunit/src/Extensions/PhptTestSuite.php | 40 - .../phpunit/src/Extensions/RepeatedTest.php | 90 - .../phpunit/src/Extensions/TestDecorator.php | 109 - .../phpunit/src/Extensions/TicketListener.php | 204 - .../phpunit/phpunit/src/Framework/Assert.php | 2926 ------------ .../src/Framework/Assert/Functions.php | 2373 ---------- .../src/Framework/AssertionFailedError.php | 27 - .../src/Framework/BaseTestListener.php | 55 - .../src/Framework/CodeCoverageException.php | 16 - .../phpunit/src/Framework/Constraint.php | 153 - .../phpunit/src/Framework/Constraint/And.php | 125 - .../src/Framework/Constraint/ArrayHasKey.php | 82 - .../src/Framework/Constraint/ArraySubset.php | 85 - .../src/Framework/Constraint/Attribute.php | 87 - .../src/Framework/Constraint/Callback.php | 59 - .../Constraint/ClassHasAttribute.php | 82 - .../Constraint/ClassHasStaticAttribute.php | 56 - .../src/Framework/Constraint/Composite.php | 70 - .../src/Framework/Constraint/Count.php | 104 - .../src/Framework/Constraint/Exception.php | 88 - .../Framework/Constraint/ExceptionCode.php | 69 - .../Framework/Constraint/ExceptionMessage.php | 69 - .../Constraint/ExceptionMessageRegExp.php | 77 - .../src/Framework/Constraint/FileExists.php | 60 - .../src/Framework/Constraint/GreaterThan.php | 55 - .../src/Framework/Constraint/IsAnything.php | 62 - .../src/Framework/Constraint/IsEmpty.php | 66 - .../src/Framework/Constraint/IsEqual.php | 179 - .../src/Framework/Constraint/IsFalse.php | 40 - .../src/Framework/Constraint/IsFinite.php | 40 - .../src/Framework/Constraint/IsIdentical.php | 132 - .../src/Framework/Constraint/IsInfinite.php | 40 - .../src/Framework/Constraint/IsInstanceOf.php | 94 - .../src/Framework/Constraint/IsJson.php | 77 - .../src/Framework/Constraint/IsNan.php | 40 - .../src/Framework/Constraint/IsNull.php | 40 - .../src/Framework/Constraint/IsTrue.php | 40 - .../src/Framework/Constraint/IsType.php | 143 - .../src/Framework/Constraint/JsonMatches.php | 71 - .../JsonMatches/ErrorMessageProvider.php | 69 - .../src/Framework/Constraint/LessThan.php | 55 - .../phpunit/src/Framework/Constraint/Not.php | 160 - .../Constraint/ObjectHasAttribute.php | 35 - .../phpunit/src/Framework/Constraint/Or.php | 117 - .../src/Framework/Constraint/PCREMatch.php | 63 - .../src/Framework/Constraint/SameSize.php | 28 - .../Framework/Constraint/StringContains.php | 81 - .../Framework/Constraint/StringEndsWith.php | 55 - .../Framework/Constraint/StringMatches.php | 101 - .../Framework/Constraint/StringStartsWith.php | 55 - .../Constraint/TraversableContains.php | 127 - .../Constraint/TraversableContainsOnly.php | 95 - .../phpunit/src/Framework/Constraint/Xor.php | 122 - .../phpunit/phpunit/src/Framework/Error.php | 34 - .../src/Framework/Error/Deprecated.php | 24 - .../phpunit/src/Framework/Error/Notice.php | 24 - .../phpunit/src/Framework/Error/Warning.php | 24 - .../phpunit/src/Framework/Exception.php | 77 - .../src/Framework/ExceptionWrapper.php | 91 - .../Framework/ExpectationFailedException.php | 41 - .../phpunit/src/Framework/IncompleteTest.php | 19 - .../src/Framework/IncompleteTestCase.php | 84 - .../src/Framework/IncompleteTestError.php | 19 - .../Framework/InvalidCoversTargetError.php | 19 - .../InvalidCoversTargetException.php | 16 - .../phpunit/src/Framework/OutputError.php | 19 - .../phpunit/src/Framework/RiskyTest.php | 19 - .../phpunit/src/Framework/RiskyTestError.php | 19 - .../phpunit/src/Framework/SelfDescribing.php | 24 - .../phpunit/src/Framework/SkippedTest.php | 18 - .../phpunit/src/Framework/SkippedTestCase.php | 82 - .../src/Framework/SkippedTestError.php | 19 - .../src/Framework/SkippedTestSuiteError.php | 19 - .../phpunit/src/Framework/SyntheticError.php | 80 - .../phpunit/phpunit/src/Framework/Test.php | 26 - .../phpunit/src/Framework/TestCase.php | 2293 --------- .../phpunit/src/Framework/TestFailure.php | 167 - .../phpunit/src/Framework/TestListener.php | 99 - .../phpunit/src/Framework/TestResult.php | 1181 ----- .../phpunit/src/Framework/TestSuite.php | 1036 ---- .../src/Framework/TestSuite/DataProvider.php | 27 - .../UnintentionallyCoveredCodeError.php | 19 - .../phpunit/phpunit/src/Framework/Warning.php | 81 - .../phpunit/src/Runner/BaseTestRunner.php | 140 - .../phpunit/phpunit/src/Runner/Exception.php | 16 - .../phpunit/src/Runner/Filter/Factory.php | 51 - .../phpunit/src/Runner/Filter/Group.php | 59 - .../src/Runner/Filter/Group/Exclude.php | 20 - .../src/Runner/Filter/Group/Include.php | 20 - .../phpunit/src/Runner/Filter/Test.php | 116 - .../src/Runner/StandardTestSuiteLoader.php | 118 - .../phpunit/src/Runner/TestSuiteLoader.php | 32 - .../phpunit/phpunit/src/Runner/Version.php | 75 - .../phpunit/phpunit/src/TextUI/Command.php | 1026 ---- .../phpunit/src/TextUI/ResultPrinter.php | 676 --- .../phpunit/phpunit/src/TextUI/TestRunner.php | 1012 ---- .../phpunit/phpunit/src/Util/Blacklist.php | 115 - .../phpunit/src/Util/Configuration.php | 1073 ----- .../phpunit/phpunit/src/Util/ErrorHandler.php | 117 - .../phpunit/phpunit/src/Util/Fileloader.php | 72 - .../phpunit/phpunit/src/Util/Filesystem.php | 42 - .../phpunit/phpunit/src/Util/Filter.php | 107 - .../phpunit/phpunit/src/Util/Getopt.php | 163 - .../phpunit/phpunit/src/Util/GlobalState.php | 192 - .../src/Util/InvalidArgumentHelper.php | 41 - .../phpunit/phpunit/src/Util/Log/JSON.php | 238 - .../phpunit/phpunit/src/Util/Log/JUnit.php | 443 -- .../phpunit/phpunit/src/Util/Log/TAP.php | 257 - .../phpunit/phpunit/src/Util/Log/TeamCity.php | 388 -- .../vendor/phpunit/phpunit/src/Util/PHP.php | 227 - .../phpunit/phpunit/src/Util/PHP/Default.php | 84 - .../Util/PHP/Template/TestCaseMethod.tpl.dist | 90 - .../phpunit/phpunit/src/Util/PHP/Windows.php | 106 - .../phpunit/phpunit/src/Util/Printer.php | 172 - .../vendor/phpunit/phpunit/src/Util/Regex.php | 26 - .../phpunit/phpunit/src/Util/String.php | 71 - .../vendor/phpunit/phpunit/src/Util/Test.php | 1075 ----- .../src/Util/TestDox/NamePrettifier.php | 142 - .../src/Util/TestDox/ResultPrinter.php | 339 -- .../src/Util/TestDox/ResultPrinter/HTML.php | 80 - .../src/Util/TestDox/ResultPrinter/Text.php | 54 - .../phpunit/src/Util/TestSuiteIterator.php | 103 - .../vendor/phpunit/phpunit/src/Util/Type.php | 38 - .../vendor/phpunit/phpunit/src/Util/XML.php | 244 - .../tests/Extensions/PhptTestCaseTest.php | 36 - .../tests/Extensions/RepeatedTestTest.php | 64 - .../phpunit/phpunit/tests/Fail/fail.phpt | 5 - .../phpunit/tests/Framework/AssertTest.php | 4178 ----------------- .../tests/Framework/BaseTestListenerTest.php | 34 - .../tests/Framework/Constraint/CountTest.php | 63 - .../Constraint/ExceptionMessageRegExpTest.php | 56 - .../Constraint/ExceptionMessageTest.php | 52 - .../tests/Framework/Constraint/IsJsonTest.php | 32 - .../JsonMatches/ErrorMessageProviderTest.php | 83 - .../Framework/Constraint/JsonMatchesTest.php | 48 - .../tests/Framework/ConstraintTest.php | 3489 -------------- .../phpunit/tests/Framework/SuiteTest.php | 242 - .../phpunit/tests/Framework/TestCaseTest.php | 550 --- .../tests/Framework/TestFailureTest.php | 27 - .../tests/Framework/TestImplementorTest.php | 30 - .../tests/Framework/TestListenerTest.php | 108 - .../phpunit/tests/Regression/1021.phpt | 19 - .../tests/Regression/1021/Issue1021Test.php | 23 - .../phpunit/phpunit/tests/Regression/523.phpt | 19 - .../tests/Regression/523/Issue523Test.php | 13 - .../phpunit/phpunit/tests/Regression/578.phpt | 37 - .../tests/Regression/578/Issue578Test.php | 20 - .../phpunit/phpunit/tests/Regression/684.phpt | 25 - .../tests/Regression/684/Issue684Test.php | 4 - .../phpunit/phpunit/tests/Regression/783.phpt | 21 - .../tests/Regression/783/ChildSuite.php | 15 - .../phpunit/tests/Regression/783/OneTest.php | 10 - .../tests/Regression/783/ParentSuite.php | 13 - .../phpunit/tests/Regression/783/TwoTest.php | 10 - .../phpunit/tests/Regression/GitHub/1149.phpt | 20 - .../Regression/GitHub/1149/Issue1149Test.php | 18 - .../phpunit/tests/Regression/GitHub/1216.phpt | 25 - .../Regression/GitHub/1216/Issue1216Test.php | 8 - .../Regression/GitHub/1216/bootstrap1216.php | 2 - .../Regression/GitHub/1216/phpunit1216.xml | 8 - .../phpunit/tests/Regression/GitHub/1265.phpt | 21 - .../Regression/GitHub/1265/Issue1265Test.php | 8 - .../Regression/GitHub/1265/phpunit1265.xml | 2 - .../phpunit/tests/Regression/GitHub/1330.phpt | 24 - .../Regression/GitHub/1330/Issue1330Test.php | 8 - .../Regression/GitHub/1330/phpunit1330.xml | 5 - .../phpunit/tests/Regression/GitHub/1335.phpt | 21 - .../Regression/GitHub/1335/Issue1335Test.php | 67 - .../Regression/GitHub/1335/bootstrap1335.php | 13 - .../phpunit/tests/Regression/GitHub/1337.phpt | 21 - .../Regression/GitHub/1337/Issue1337Test.php | 19 - .../phpunit/tests/Regression/GitHub/1348.phpt | 36 - .../Regression/GitHub/1348/Issue1348Test.php | 14 - .../phpunit/tests/Regression/GitHub/1351.phpt | 48 - .../GitHub/1351/ChildProcessClass1351.php | 4 - .../Regression/GitHub/1351/Issue1351Test.php | 48 - .../phpunit/tests/Regression/GitHub/1374.phpt | 21 - .../Regression/GitHub/1374/Issue1374Test.php | 21 - .../phpunit/tests/Regression/GitHub/1437.phpt | 28 - .../Regression/GitHub/1437/Issue1437Test.php | 9 - .../phpunit/tests/Regression/GitHub/1468.phpt | 22 - .../Regression/GitHub/1468/Issue1468Test.php | 11 - .../phpunit/tests/Regression/GitHub/1471.phpt | 28 - .../Regression/GitHub/1471/Issue1471Test.php | 12 - .../phpunit/tests/Regression/GitHub/1472.phpt | 26 - .../Regression/GitHub/1472/Issue1472Test.php | 21 - .../phpunit/tests/Regression/GitHub/1570.phpt | 21 - .../Regression/GitHub/1570/Issue1570Test.php | 8 - .../phpunit/tests/Regression/GitHub/244.phpt | 32 - .../Regression/GitHub/244/Issue244Test.php | 55 - .../phpunit/tests/Regression/GitHub/322.phpt | 26 - .../Regression/GitHub/322/Issue322Test.php | 17 - .../Regression/GitHub/322/phpunit322.xml | 11 - .../phpunit/tests/Regression/GitHub/433.phpt | 31 - .../Regression/GitHub/433/Issue433Test.php | 21 - .../phpunit/tests/Regression/GitHub/445.phpt | 32 - .../Regression/GitHub/445/Issue445Test.php | 21 - .../phpunit/tests/Regression/GitHub/498.phpt | 29 - .../Regression/GitHub/498/Issue498Test.php | 44 - .../phpunit/tests/Regression/GitHub/503.phpt | 33 - .../Regression/GitHub/503/Issue503Test.php | 11 - .../phpunit/tests/Regression/GitHub/581.phpt | 42 - .../Regression/GitHub/581/Issue581Test.php | 11 - .../phpunit/tests/Regression/GitHub/74.phpt | 28 - .../Regression/GitHub/74/Issue74Test.php | 9 - .../Regression/GitHub/74/NewException.php | 4 - .../phpunit/tests/Regression/GitHub/765.phpt | 26 - .../Regression/GitHub/765/Issue765Test.php | 22 - .../phpunit/tests/Regression/GitHub/797.phpt | 22 - .../Regression/GitHub/797/Issue797Test.php | 10 - .../Regression/GitHub/797/bootstrap797.php | 6 - .../phpunit/tests/Regression/GitHub/863.phpt | 24 - .../tests/Regression/GitHub/873-php5.phpt | 22 - .../tests/Regression/GitHub/873-php7.phpt | 22 - .../Regression/GitHub/873/Issue873Test.php | 9 - .../tests/Runner/BaseTestRunnerTest.php | 22 - .../tests/TextUI/abstract-test-class.phpt | 25 - .../phpunit/tests/TextUI/colors-always.phpt | 19 - .../tests/TextUI/concrete-test-class.phpt | 19 - .../tests/TextUI/custom-printer-debug.phpt | 27 - .../tests/TextUI/custom-printer-verbose.phpt | 32 - .../tests/TextUI/dataprovider-debug.phpt | 34 - .../dataprovider-log-xml-isolation.phpt | 47 - .../tests/TextUI/dataprovider-log-xml.phpt | 46 - .../tests/TextUI/dataprovider-testdox.phpt | 17 - .../phpunit/phpunit/tests/TextUI/debug.phpt | 26 - .../tests/TextUI/default-isolation.phpt | 20 - .../phpunit/phpunit/tests/TextUI/default.phpt | 19 - .../tests/TextUI/dependencies-clone.phpt | 23 - .../tests/TextUI/dependencies-isolation.phpt | 43 - .../phpunit/tests/TextUI/dependencies.phpt | 42 - .../tests/TextUI/dependencies2-isolation.phpt | 20 - .../phpunit/tests/TextUI/dependencies2.phpt | 19 - .../tests/TextUI/dependencies3-isolation.phpt | 20 - .../phpunit/tests/TextUI/dependencies3.phpt | 19 - .../phpunit/tests/TextUI/empty-testcase.phpt | 25 - .../phpunit/tests/TextUI/exception-stack.phpt | 65 - .../tests/TextUI/exclude-group-isolation.phpt | 22 - .../phpunit/tests/TextUI/exclude-group.phpt | 21 - .../tests/TextUI/failure-isolation.phpt | 142 - .../tests/TextUI/failure-reverse-list.phpt | 142 - .../phpunit/phpunit/tests/TextUI/failure.phpt | 141 - .../phpunit/tests/TextUI/fatal-isolation.phpt | 26 - .../tests/TextUI/filter-class-isolation.phpt | 22 - .../phpunit/tests/TextUI/filter-class.phpt | 21 - ...ider-by-classname-and-range-isolation.phpt | 22 - ...r-dataprovider-by-classname-and-range.phpt | 21 - ...lter-dataprovider-by-number-isolation.phpt | 22 - .../TextUI/filter-dataprovider-by-number.phpt | 21 - ...-dataprovider-by-only-range-isolation.phpt | 22 - .../filter-dataprovider-by-only-range.phpt | 21 - ...dataprovider-by-only-regexp-isolation.phpt | 22 - .../filter-dataprovider-by-only-regexp.phpt | 21 - ...dataprovider-by-only-string-isolation.phpt | 22 - .../filter-dataprovider-by-only-string.phpt | 21 - ...ilter-dataprovider-by-range-isolation.phpt | 22 - .../TextUI/filter-dataprovider-by-range.phpt | 21 - ...lter-dataprovider-by-regexp-isolation.phpt | 22 - .../TextUI/filter-dataprovider-by-regexp.phpt | 21 - ...lter-dataprovider-by-string-isolation.phpt | 22 - .../TextUI/filter-dataprovider-by-string.phpt | 21 - .../filter-method-case-insensitive.phpt | 21 - ...ilter-method-case-sensitive-no-result.phpt | 21 - .../tests/TextUI/filter-method-isolation.phpt | 22 - .../phpunit/tests/TextUI/filter-method.phpt | 21 - .../tests/TextUI/filter-no-results.phpt | 21 - .../phpunit/tests/TextUI/group-isolation.phpt | 22 - .../phpunit/phpunit/tests/TextUI/group.phpt | 21 - .../phpunit/phpunit/tests/TextUI/help.phpt | 93 - .../phpunit/phpunit/tests/TextUI/help2.phpt | 94 - .../phpunit/tests/TextUI/ini-isolation.phpt | 22 - .../phpunit/tests/TextUI/list-groups.phpt | 19 - .../tests/TextUI/log-json-post-66021.phpt | 72 - .../phpunit/phpunit/tests/TextUI/log-tap.phpt | 26 - .../phpunit/tests/TextUI/log-teamcity.phpt | 39 - .../phpunit/phpunit/tests/TextUI/log-xml.phpt | 29 - .../tests/TextUI/options-after-arguments.phpt | 19 - .../tests/TextUI/output-isolation.phpt | 21 - .../phpunit/phpunit/tests/TextUI/repeat.phpt | 21 - .../report-useless-tests-incomplete.phpt | 21 - .../report-useless-tests-isolation.phpt | 22 - .../tests/TextUI/report-useless-tests.phpt | 21 - .../phpunit/phpunit/tests/TextUI/tap.phpt | 18 - .../phpunit/tests/TextUI/teamcity.phpt | 38 - .../tests/TextUI/test-suffix-multiple.phpt | 20 - .../tests/TextUI/test-suffix-single.phpt | 20 - .../phpunit/tests/TextUI/testdox-html.phpt | 21 - .../phpunit/tests/TextUI/testdox-text.phpt | 25 - .../phpunit/phpunit/tests/TextUI/testdox.phpt | 19 - .../phpunit/tests/Util/ConfigurationTest.php | 438 -- .../phpunit/phpunit/tests/Util/GetoptTest.php | 62 - .../phpunit/tests/Util/GlobalStateTest.php | 35 - .../phpunit/phpunit/tests/Util/RegexTest.php | 52 - .../tests/Util/TestDox/NamePrettifierTest.php | 81 - .../phpunit/phpunit/tests/Util/TestTest.php | 673 --- .../phpunit/phpunit/tests/Util/XMLTest.php | 49 - .../phpunit/tests/_files/AbstractTest.php | 7 - .../phpunit/phpunit/tests/_files/Author.php | 27 - .../phpunit/tests/_files/BankAccount.php | 82 - .../phpunit/tests/_files/BankAccountTest.php | 87 - .../tests/_files/BankAccountTest.test.php | 87 - .../tests/_files/BaseTestListenerSample.php | 11 - .../tests/_files/BeforeAndAfterTest.php | 35 - .../_files/BeforeClassAndAfterClassTest.php | 35 - .../phpunit/phpunit/tests/_files/Book.php | 20 - .../phpunit/tests/_files/Calculator.php | 14 - .../ChangeCurrentWorkingDirectoryTest.php | 9 - .../_files/ClassWithNonPublicAttributes.php | 29 - .../ClassWithScalarTypeDeclarations.php | 7 - .../tests/_files/ClassWithToString.php | 22 - .../tests/_files/ClonedDependencyTest.php | 39 - .../phpunit/tests/_files/ConcreteTest.my.php | 7 - .../phpunit/tests/_files/ConcreteTest.php | 7 - .../_files/CoverageClassExtendedTest.php | 12 - .../tests/_files/CoverageClassTest.php | 12 - .../CoverageFunctionParenthesesTest.php | 11 - ...erageFunctionParenthesesWhitespaceTest.php | 11 - .../tests/_files/CoverageFunctionTest.php | 11 - .../CoverageMethodOneLineAnnotationTest.php | 11 - .../_files/CoverageMethodParenthesesTest.php | 12 - ...overageMethodParenthesesWhitespaceTest.php | 12 - .../tests/_files/CoverageMethodTest.php | 12 - .../_files/CoverageNamespacedFunctionTest.php | 11 - .../phpunit/tests/_files/CoverageNoneTest.php | 9 - .../tests/_files/CoverageNotPrivateTest.php | 12 - .../tests/_files/CoverageNotProtectedTest.php | 12 - .../tests/_files/CoverageNotPublicTest.php | 12 - .../tests/_files/CoverageNothingTest.php | 13 - .../tests/_files/CoveragePrivateTest.php | 12 - .../tests/_files/CoverageProtectedTest.php | 12 - .../tests/_files/CoveragePublicTest.php | 12 - .../CoverageTwoDefaultClassAnnotations.php | 17 - .../phpunit/tests/_files/CoveredClass.php | 36 - .../phpunit/tests/_files/CoveredFunction.php | 4 - .../phpunit/tests/_files/CustomPrinter.php | 4 - .../tests/_files/DataProviderDebugTest.php | 48 - .../tests/_files/DataProviderFilterTest.php | 39 - .../_files/DataProviderIncompleteTest.php | 37 - .../tests/_files/DataProviderSkippedTest.php | 37 - .../phpunit/tests/_files/DataProviderTest.php | 21 - .../tests/_files/DependencyFailureTest.php | 29 - .../tests/_files/DependencySuccessTest.php | 21 - .../tests/_files/DependencyTestSuite.php | 13 - .../phpunit/tests/_files/DoubleTestCase.php | 25 - .../phpunit/tests/_files/DummyException.php | 5 - .../tests/_files/EmptyTestCaseTest.php | 4 - .../ExceptionInAssertPostConditionsTest.php | 35 - .../ExceptionInAssertPreConditionsTest.php | 35 - .../tests/_files/ExceptionInSetUpTest.php | 35 - .../tests/_files/ExceptionInTearDownTest.php | 35 - .../phpunit/tests/_files/ExceptionInTest.php | 35 - .../tests/_files/ExceptionNamespaceTest.php | 38 - .../tests/_files/ExceptionStackTest.php | 21 - .../phpunit/tests/_files/ExceptionTest.php | 139 - .../phpunit/phpunit/tests/_files/Failure.php | 8 - .../phpunit/tests/_files/FailureTest.php | 75 - .../phpunit/tests/_files/FatalTest.php | 13 - .../phpunit/tests/_files/IncompleteTest.php | 8 - .../tests/_files/Inheritance/InheritanceA.php | 7 - .../tests/_files/Inheritance/InheritanceB.php | 8 - .../tests/_files/InheritedTestCase.php | 7 - .../phpunit/phpunit/tests/_files/IniTest.php | 8 - .../phpunit/tests/_files/IsolationTest.php | 13 - .../tests/_files/JsonData/arrayObject.json | 1 - .../tests/_files/JsonData/simpleObject.json | 1 - .../phpunit/tests/_files/MockRunner.php | 7 - .../tests/_files/MultiDependencyTest.php | 23 - .../NamespaceCoverageClassExtendedTest.php | 12 - .../_files/NamespaceCoverageClassTest.php | 12 - ...NamespaceCoverageCoversClassPublicTest.php | 15 - .../NamespaceCoverageCoversClassTest.php | 20 - .../_files/NamespaceCoverageMethodTest.php | 12 - .../NamespaceCoverageNotPrivateTest.php | 12 - .../NamespaceCoverageNotProtectedTest.php | 12 - .../_files/NamespaceCoverageNotPublicTest.php | 12 - .../_files/NamespaceCoveragePrivateTest.php | 12 - .../_files/NamespaceCoverageProtectedTest.php | 12 - .../_files/NamespaceCoveragePublicTest.php | 12 - .../tests/_files/NamespaceCoveredClass.php | 38 - .../tests/_files/NamespaceCoveredFunction.php | 7 - .../tests/_files/NoArgTestCaseTest.php | 7 - .../phpunit/tests/_files/NoTestCaseClass.php | 4 - .../phpunit/tests/_files/NoTestCases.php | 7 - .../phpunit/tests/_files/NonStatic.php | 8 - .../_files/NotExistingCoveredElementTest.php | 24 - .../tests/_files/NotPublicTestCase.php | 11 - .../phpunit/tests/_files/NotVoidTestCase.php | 4 - .../phpunit/tests/_files/NothingTest.php | 7 - .../phpunit/tests/_files/OneTestCase.php | 11 - .../phpunit/tests/_files/OutputTestCase.php | 27 - .../phpunit/tests/_files/OverrideTestCase.php | 7 - .../RequirementsClassBeforeClassHookTest.php | 12 - .../_files/RequirementsClassDocBlockTest.php | 22 - .../phpunit/tests/_files/RequirementsTest.php | 148 - .../tests/_files/SampleArrayAccess.php | 36 - .../phpunit/tests/_files/SampleClass.php | 14 - .../phpunit/tests/_files/Singleton.php | 22 - .../phpunit/tests/_files/StackTest.php | 24 - .../phpunit/phpunit/tests/_files/Struct.php | 10 - .../phpunit/phpunit/tests/_files/Success.php | 7 - .../tests/_files/TemplateMethodsTest.php | 51 - .../phpunit/tests/_files/TestIncomplete.php | 8 - .../phpunit/tests/_files/TestIterator.php | 36 - .../phpunit/tests/_files/TestIterator2.php | 35 - .../phpunit/tests/_files/TestSkipped.php | 8 - .../phpunit/tests/_files/TestTestError.php | 8 - .../phpunit/tests/_files/TestWithTest.php | 24 - .../tests/_files/ThrowExceptionTestCase.php | 8 - .../tests/_files/ThrowNoExceptionTestCase.php | 7 - .../phpunit/phpunit/tests/_files/WasRun.php | 10 - .../phpunit/phpunit/tests/_files/bar.xml | 1 - .../_files/configuration.colors.empty.xml | 1 - .../_files/configuration.colors.false.xml | 1 - .../_files/configuration.colors.invalid.xml | 1 - .../_files/configuration.colors.true.xml | 1 - .../_files/configuration.custom-printer.xml | 2 - .../phpunit/tests/_files/configuration.xml | 105 - .../tests/_files/configuration_empty.xml | 49 - .../tests/_files/configuration_xinclude.xml | 71 - .../tests/_files/expectedFileFormat.txt | 1 - .../phpunit/phpunit/tests/_files/foo.xml | 1 - ...uctureAttributesAreSameButValuesAreNot.xml | 10 - .../tests/_files/structureExpected.xml | 10 - .../tests/_files/structureIgnoreTextNodes.xml | 13 - .../_files/structureIsSameButDataIsNot.xml | 10 - .../structureWrongNumberOfAttributes.xml | 10 - .../_files/structureWrongNumberOfNodes.xml | 9 - .../phpunit/phpunit/tests/bootstrap.php | 6 - server/vendor/sebastian/comparator/.gitignore | 6 - .../vendor/sebastian/comparator/.travis.yml | 25 - server/vendor/sebastian/comparator/LICENSE | 33 - server/vendor/sebastian/comparator/README.md | 41 - server/vendor/sebastian/comparator/build.xml | 34 - .../vendor/sebastian/comparator/composer.json | 44 - .../sebastian/comparator/phpunit.xml.dist | 21 - .../comparator/src/ArrayComparator.php | 136 - .../sebastian/comparator/src/Comparator.php | 68 - .../comparator/src/ComparisonFailure.php | 129 - .../comparator/src/DOMNodeComparator.php | 110 - .../comparator/src/DateTimeComparator.php | 80 - .../comparator/src/DoubleComparator.php | 60 - .../comparator/src/ExceptionComparator.php | 51 - .../sebastian/comparator/src/Factory.php | 107 - .../comparator/src/MockObjectComparator.php | 45 - .../comparator/src/NumericComparator.php | 72 - .../comparator/src/ObjectComparator.php | 109 - .../comparator/src/ResourceComparator.php | 56 - .../comparator/src/ScalarComparator.php | 94 - .../src/SplObjectStorageComparator.php | 73 - .../comparator/src/TypeComparator.php | 63 - .../comparator/tests/ArrayComparatorTest.php | 163 - .../tests/DOMNodeComparatorTest.php | 162 - .../tests/DateTimeComparatorTest.php | 216 - .../comparator/tests/DoubleComparatorTest.php | 134 - .../tests/ExceptionComparatorTest.php | 136 - .../comparator/tests/FactoryTest.php | 115 - .../tests/MockObjectComparatorTest.php | 166 - .../tests/NumericComparatorTest.php | 122 - .../comparator/tests/ObjectComparatorTest.php | 150 - .../tests/ResourceComparatorTest.php | 120 - .../comparator/tests/ScalarComparatorTest.php | 158 - .../tests/SplObjectStorageComparatorTest.php | 137 - .../comparator/tests/TypeComparatorTest.php | 104 - .../comparator/tests/_files/Author.php | 28 - .../comparator/tests/_files/Book.php | 21 - .../tests/_files/ClassWithToString.php | 19 - .../comparator/tests/_files/SampleClass.php | 29 - .../comparator/tests/_files/Struct.php | 25 - .../comparator/tests/_files/TestClass.php | 14 - .../tests/_files/TestClassComparator.php | 14 - .../sebastian/comparator/tests/autoload.php | 38 - .../sebastian/comparator/tests/bootstrap.php | 7 - server/vendor/sebastian/diff/.gitignore | 10 - server/vendor/sebastian/diff/.travis.yml | 16 - server/vendor/sebastian/diff/LICENSE | 33 - server/vendor/sebastian/diff/README.md | 126 - server/vendor/sebastian/diff/build.xml | 26 - server/vendor/sebastian/diff/composer.json | 33 - server/vendor/sebastian/diff/phpunit.xml.dist | 17 - server/vendor/sebastian/diff/src/Chunk.php | 110 - server/vendor/sebastian/diff/src/Diff.php | 81 - server/vendor/sebastian/diff/src/Differ.php | 256 - .../diff/src/LCS/LongestCommonSubsequence.php | 33 - ...LongestCommonSubsequenceImplementation.php | 98 - ...LongestCommonSubsequenceImplementation.php | 79 - server/vendor/sebastian/diff/src/Line.php | 62 - server/vendor/sebastian/diff/src/Parser.php | 105 - .../sebastian/diff/tests/DifferTest.php | Bin 11371 -> 0 bytes .../LCS/TimeEfficientImplementationTest.php | 175 - .../sebastian/diff/tests/ParserTest.php | 62 - .../sebastian/diff/tests/fixtures/patch.txt | 9 - .../sebastian/diff/tests/fixtures/patch2.txt | 21 - .../vendor/sebastian/environment/.gitignore | 5 - .../vendor/sebastian/environment/.travis.yml | 16 - server/vendor/sebastian/environment/LICENSE | 33 - server/vendor/sebastian/environment/README.md | 72 - server/vendor/sebastian/environment/build.xml | 26 - .../sebastian/environment/composer.json | 29 - .../sebastian/environment/phpunit.xml.dist | 20 - .../sebastian/environment/src/Console.php | 81 - .../sebastian/environment/src/Runtime.php | 192 - .../environment/tests/ConsoleTest.php | 60 - .../environment/tests/RuntimeTest.php | 112 - server/vendor/sebastian/exporter/.gitignore | 9 - server/vendor/sebastian/exporter/.travis.yml | 23 - server/vendor/sebastian/exporter/LICENSE | 33 - server/vendor/sebastian/exporter/README.md | 171 - server/vendor/sebastian/exporter/build.xml | 27 - .../vendor/sebastian/exporter/composer.json | 47 - .../sebastian/exporter/phpunit.xml.dist | 21 - .../sebastian/exporter/src/Exporter.php | 296 -- .../sebastian/exporter/tests/ExporterTest.php | 333 -- .../vendor/sebastian/global-state/.gitignore | 6 - .../vendor/sebastian/global-state/.travis.yml | 20 - server/vendor/sebastian/global-state/LICENSE | 33 - .../vendor/sebastian/global-state/README.md | 15 - .../vendor/sebastian/global-state/build.xml | 33 - .../sebastian/global-state/composer.json | 37 - .../sebastian/global-state/phpunit.xml.dist | 21 - .../sebastian/global-state/src/Blacklist.php | 149 - .../global-state/src/CodeExporter.php | 93 - .../sebastian/global-state/src/Exception.php | 17 - .../sebastian/global-state/src/Restorer.php | 141 - .../global-state/src/RuntimeException.php | 17 - .../sebastian/global-state/src/Snapshot.php | 423 -- .../global-state/tests/BlacklistTest.php | 113 - .../global-state/tests/SnapshotTest.php | 119 - .../tests/_fixture/BlacklistedChildClass.php | 17 - .../tests/_fixture/BlacklistedClass.php | 18 - .../tests/_fixture/BlacklistedImplementor.php | 18 - .../tests/_fixture/BlacklistedInterface.php | 17 - .../tests/_fixture/SnapshotClass.php | 37 - .../tests/_fixture/SnapshotDomDocument.php | 19 - .../tests/_fixture/SnapshotFunctions.php | 15 - .../tests/_fixture/SnapshotTrait.php | 17 - .../sebastian/recursion-context/.gitignore | 9 - .../sebastian/recursion-context/.travis.yml | 21 - .../sebastian/recursion-context/LICENSE | 33 - .../sebastian/recursion-context/README.md | 13 - .../sebastian/recursion-context/build.xml | 27 - .../sebastian/recursion-context/composer.json | 36 - .../recursion-context/phpunit.xml.dist | 20 - .../recursion-context/src/Context.php | 153 - .../recursion-context/src/Exception.php | 17 - .../src/InvalidArgumentException.php | 17 - .../recursion-context/tests/ContextTest.php | 144 - .../sebastian/resource-operations/.gitignore | 3 - .../sebastian/resource-operations/LICENSE | 33 - .../sebastian/resource-operations/README.md | 16 - .../sebastian/resource-operations/build.xml | 24 - .../resource-operations/composer.json | 26 - .../src/ResourceOperations.php | 670 --- .../vendor/sebastian/version/.gitattributes | 1 - server/vendor/sebastian/version/.gitignore | 1 - server/vendor/sebastian/version/LICENSE | 33 - server/vendor/sebastian/version/README.md | 37 - server/vendor/sebastian/version/composer.json | 21 - .../vendor/sebastian/version/src/Version.php | 82 - server/vendor/slim/slim/.gitignore | 1 - server/vendor/slim/slim/.htaccess | 11 - server/vendor/slim/slim/.travis.yml | 11 - server/vendor/slim/slim/CONTRIBUTING.md | 20 - server/vendor/slim/slim/LICENSE | 19 - server/vendor/slim/slim/README.markdown | 208 - server/vendor/slim/slim/Slim/Environment.php | 228 - .../vendor/slim/slim/Slim/Exception/Pass.php | 49 - .../vendor/slim/slim/Slim/Exception/Stop.php | 47 - server/vendor/slim/slim/Slim/Helper/Set.php | 246 - server/vendor/slim/slim/Slim/Http/Cookies.php | 91 - server/vendor/slim/slim/Slim/Http/Headers.php | 104 - server/vendor/slim/slim/Slim/Http/Request.php | 617 --- .../vendor/slim/slim/Slim/Http/Response.php | 520 -- server/vendor/slim/slim/Slim/Http/Util.php | 434 -- server/vendor/slim/slim/Slim/Log.php | 354 -- server/vendor/slim/slim/Slim/LogWriter.php | 75 - server/vendor/slim/slim/Slim/Middleware.php | 114 - .../slim/Slim/Middleware/ContentTypes.php | 174 - .../slim/slim/Slim/Middleware/Flash.php | 212 - .../slim/Slim/Middleware/MethodOverride.php | 94 - .../slim/Slim/Middleware/PrettyExceptions.php | 116 - .../slim/Slim/Middleware/SessionCookie.php | 205 - server/vendor/slim/slim/Slim/Route.php | 471 -- server/vendor/slim/slim/Slim/Router.php | 257 - server/vendor/slim/slim/Slim/Slim.php | 1444 ------ server/vendor/slim/slim/Slim/View.php | 282 -- server/vendor/slim/slim/composer.json | 24 - server/vendor/slim/slim/index.php | 169 - server/vendor/slim/slim/phpunit.xml.dist | 25 - .../slim/slim/tests/EnvironmentTest.php | 376 -- server/vendor/slim/slim/tests/Foo.php | 7 - .../vendor/slim/slim/tests/Helper/SetTest.php | 241 - .../slim/slim/tests/Http/CookiesTest.php | 92 - .../slim/slim/tests/Http/HeadersTest.php | 59 - .../slim/slim/tests/Http/RequestTest.php | 949 ---- .../slim/slim/tests/Http/ResponseTest.php | 271 -- .../vendor/slim/slim/tests/Http/UtilTest.php | 445 -- server/vendor/slim/slim/tests/LogTest.php | 208 - .../vendor/slim/slim/tests/LogWriterTest.php | 48 - .../tests/Middleware/ContentTypesTest.php | 162 - .../slim/slim/tests/Middleware/FlashTest.php | 141 - .../tests/Middleware/MethodOverrideTest.php | 149 - .../tests/Middleware/PrettyExceptionsTest.php | 153 - .../tests/Middleware/SessionCookieTest.php | 463 -- .../vendor/slim/slim/tests/MiddlewareTest.php | 79 - server/vendor/slim/slim/tests/README | 18 - server/vendor/slim/slim/tests/RouteTest.php | 617 --- server/vendor/slim/slim/tests/RouterTest.php | 250 - server/vendor/slim/slim/tests/SlimTest.php | 1657 ------- server/vendor/slim/slim/tests/ViewTest.php | 199 - server/vendor/slim/slim/tests/bootstrap.php | 22 - .../vendor/slim/slim/tests/templates/test.php | 1 - server/vendor/symfony/yaml/.gitignore | 3 - server/vendor/symfony/yaml/CHANGELOG.md | 8 - server/vendor/symfony/yaml/Dumper.php | 73 - server/vendor/symfony/yaml/Escaper.php | 97 - .../symfony/yaml/Exception/DumpException.php | 21 - .../yaml/Exception/ExceptionInterface.php | 21 - .../symfony/yaml/Exception/ParseException.php | 146 - .../yaml/Exception/RuntimeException.php | 21 - server/vendor/symfony/yaml/Inline.php | 546 --- server/vendor/symfony/yaml/LICENSE | 19 - server/vendor/symfony/yaml/Parser.php | 712 --- server/vendor/symfony/yaml/README.md | 21 - .../vendor/symfony/yaml/Tests/DumperTest.php | 236 - .../yaml/Tests/Fixtures/YtsAnchorAlias.yml | 31 - .../yaml/Tests/Fixtures/YtsBasicTests.yml | 202 - .../yaml/Tests/Fixtures/YtsBlockMapping.yml | 51 - .../Tests/Fixtures/YtsDocumentSeparator.yml | 85 - .../yaml/Tests/Fixtures/YtsErrorTests.yml | 25 - .../Tests/Fixtures/YtsFlowCollections.yml | 60 - .../yaml/Tests/Fixtures/YtsFoldedScalars.yml | 176 - .../Tests/Fixtures/YtsNullsAndEmpties.yml | 45 - .../Fixtures/YtsSpecificationExamples.yml | 1697 ------- .../yaml/Tests/Fixtures/YtsTypeTransfers.yml | 244 - .../yaml/Tests/Fixtures/embededPhp.yml | 1 - .../yaml/Tests/Fixtures/escapedCharacters.yml | 147 - .../symfony/yaml/Tests/Fixtures/index.yml | 18 - .../yaml/Tests/Fixtures/sfComments.yml | 76 - .../symfony/yaml/Tests/Fixtures/sfCompact.yml | 159 - .../yaml/Tests/Fixtures/sfMergeKey.yml | 58 - .../symfony/yaml/Tests/Fixtures/sfObjects.yml | 11 - .../symfony/yaml/Tests/Fixtures/sfQuotes.yml | 33 - .../symfony/yaml/Tests/Fixtures/sfTests.yml | 149 - .../Tests/Fixtures/unindentedCollections.yml | 82 - .../vendor/symfony/yaml/Tests/InlineTest.php | 384 -- .../symfony/yaml/Tests/ParseExceptionTest.php | 41 - .../vendor/symfony/yaml/Tests/ParserTest.php | 796 ---- server/vendor/symfony/yaml/Tests/YamlTest.php | 37 - server/vendor/symfony/yaml/Unescaper.php | 147 - server/vendor/symfony/yaml/Yaml.php | 99 - server/vendor/symfony/yaml/composer.json | 30 - server/vendor/symfony/yaml/phpunit.xml.dist | 28 - 1398 files changed, 158414 deletions(-) delete mode 100644 server/composer.lock delete mode 100644 server/vendor/autoload.php delete mode 120000 server/vendor/bin/phpunit delete mode 100644 server/vendor/composer/ClassLoader.php delete mode 100644 server/vendor/composer/autoload_classmap.php delete mode 100644 server/vendor/composer/autoload_namespaces.php delete mode 100644 server/vendor/composer/autoload_psr4.php delete mode 100644 server/vendor/composer/autoload_real.php delete mode 100644 server/vendor/composer/installed.json delete mode 100644 server/vendor/doctrine/instantiator/.gitignore delete mode 100644 server/vendor/doctrine/instantiator/.scrutinizer.yml delete mode 100755 server/vendor/doctrine/instantiator/.travis.install.sh delete mode 100644 server/vendor/doctrine/instantiator/.travis.yml delete mode 100644 server/vendor/doctrine/instantiator/CONTRIBUTING.md delete mode 100644 server/vendor/doctrine/instantiator/LICENSE delete mode 100644 server/vendor/doctrine/instantiator/README.md delete mode 100644 server/vendor/doctrine/instantiator/composer.json delete mode 100644 server/vendor/doctrine/instantiator/phpmd.xml.dist delete mode 100644 server/vendor/doctrine/instantiator/phpunit.xml.dist delete mode 100644 server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php delete mode 100644 server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php delete mode 100644 server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php delete mode 100644 server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php delete mode 100644 server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php delete mode 100644 server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php delete mode 100644 server/vendor/gabordemooij/redbean/.gitignore delete mode 100644 server/vendor/gabordemooij/redbean/.travis.yml delete mode 100755 server/vendor/gabordemooij/redbean/README.markdown delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Adapter.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Adapter/DBAdapter.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/AssociationManager.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/BeanCollection.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/BeanHelper.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/BeanHelper/SimpleFacadeBeanHelper.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Cursor.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Cursor/NullCursor.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Cursor/PDOCursor.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Driver.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Driver/RPDO.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/DuplicationManager.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Logger/RDefault.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Logger/RDefault/Debug.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/OODB.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/Observer.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Plugin.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/R.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/RedException.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/RedException/SQL.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Repository.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModelHelper.php delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/TagManager.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php delete mode 100755 server/vendor/gabordemooij/redbean/RedBeanPHP/license.txt delete mode 100644 server/vendor/gabordemooij/redbean/RedBeanPHP/loader.php delete mode 100644 server/vendor/gabordemooij/redbean/composer.json delete mode 100644 server/vendor/gabordemooij/redbean/deepfreeze.php delete mode 100644 server/vendor/gabordemooij/redbean/p533patch.php delete mode 100644 server/vendor/gabordemooij/redbean/replica2-win.php delete mode 100644 server/vendor/gabordemooij/redbean/replica2.php delete mode 100755 server/vendor/gabordemooij/redbean/test-dist.ini delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Aliasing.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Batch.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Copy.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Facade.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Frozen.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Indexes.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue259.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue303.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue408.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue90.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Namedparams.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Nuke.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Observers.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Tags.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Threeway.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Typechecking.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Utf8.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Writecache.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Xnull.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Debug.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Export.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Glue.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Import.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Labels.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Meta.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Plugins.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Tainted.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Version.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID/Setget.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID/Writer.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Bigint.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Double.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Freeze.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Parambind.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Preexist.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Uuid.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Bigint.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Foreignkeys.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Parambind.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Uuid.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Pretest.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Foreignkeys.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Parambind.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Rebuild.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Setget.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Writer.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/cli/runperf.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/cli/runtests.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/cli/testcontainer/put-rb-file-here.txt delete mode 100644 server/vendor/gabordemooij/redbean/testing/config/test-dist.ini delete mode 100644 server/vendor/gabordemooij/redbean/testing/config/test-travis.ini delete mode 100644 server/vendor/gabordemooij/redbean/testing/helpers/classes.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/helpers/functions.php delete mode 100644 server/vendor/gabordemooij/redbean/testing/notes.txt delete mode 100644 server/vendor/gabordemooij/redbean/testing/readme.txt delete mode 100755 server/vendor/myclabs/deep-copy/.gitattributes delete mode 100755 server/vendor/myclabs/deep-copy/.gitignore delete mode 100755 server/vendor/myclabs/deep-copy/.travis.yml delete mode 100644 server/vendor/myclabs/deep-copy/LICENSE delete mode 100644 server/vendor/myclabs/deep-copy/README.md delete mode 100644 server/vendor/myclabs/deep-copy/composer.json delete mode 100644 server/vendor/myclabs/deep-copy/doc/clone.png delete mode 100644 server/vendor/myclabs/deep-copy/doc/deep-clone.png delete mode 100644 server/vendor/myclabs/deep-copy/doc/deep-copy.png delete mode 100644 server/vendor/myclabs/deep-copy/doc/graph.png delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineCollectionFilter.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/KeepFilter.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyMatcher.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php delete mode 100644 server/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/.gitignore delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/.travis.yml delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/LICENSE delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/README.md delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/composer.json delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/composer.lock delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php delete mode 100644 server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php delete mode 100644 server/vendor/phpspec/prophecy/.gitignore delete mode 100644 server/vendor/phpspec/prophecy/.travis.yml delete mode 100644 server/vendor/phpspec/prophecy/CHANGES.md delete mode 100644 server/vendor/phpspec/prophecy/CONTRIBUTING.md delete mode 100644 server/vendor/phpspec/prophecy/LICENSE delete mode 100644 server/vendor/phpspec/prophecy/README.md delete mode 100644 server/vendor/phpspec/prophecy/composer.json delete mode 100644 server/vendor/phpspec/prophecy/composer.lock delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php delete mode 100644 server/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/HhvmExceptionPatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Prophet.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php delete mode 100644 server/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php delete mode 100644 server/vendor/phpunit/php-code-coverage/.gitattributes delete mode 100644 server/vendor/phpunit/php-code-coverage/.gitignore delete mode 100644 server/vendor/phpunit/php-code-coverage/.php_cs delete mode 100644 server/vendor/phpunit/php-code-coverage/.travis.yml delete mode 100644 server/vendor/phpunit/php-code-coverage/CONTRIBUTING.md delete mode 100644 server/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md delete mode 100644 server/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md delete mode 100644 server/vendor/phpunit/php-code-coverage/LICENSE delete mode 100644 server/vendor/phpunit/php-code-coverage/README.md delete mode 100644 server/vendor/phpunit/php-code-coverage/build.xml delete mode 100644 server/vendor/phpunit/php-code-coverage/composer.json delete mode 100644 server/vendor/phpunit/php-code-coverage/phpunit.xml.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/html5shiv.min.js delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/nv.d3.min.js delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/respond.min.js delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/method_item.html.dist delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php delete mode 100644 server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/TestCase.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/BankAccount.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/BankAccountTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassExtendedTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageClassTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionParenthesesWhitespaceTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageFunctionTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodOneLineAnnotationTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodParenthesesWhitespaceTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageMethodTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageNoneTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPrivateTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotProtectedTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageNotPublicTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageNothingTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoveragePrivateTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageProtectedTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoveragePublicTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoverageTwoDefaultClassAnnotations.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoveredClass.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/CoveredFunction.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassExtendedTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageClassTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassPublicTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageMethodTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPrivateTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotPublicTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePrivateTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageProtectedTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveragePublicTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoveredClass.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/NotExistingCoveredElementTest.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/source_with_ignore.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/source_with_namespace.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/source_with_oneline_annotations.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/source_without_ignore.php delete mode 100644 server/vendor/phpunit/php-code-coverage/tests/_files/source_without_namespace.php delete mode 100644 server/vendor/phpunit/php-file-iterator/.gitattributes delete mode 100644 server/vendor/phpunit/php-file-iterator/.gitignore delete mode 100644 server/vendor/phpunit/php-file-iterator/ChangeLog.md delete mode 100644 server/vendor/phpunit/php-file-iterator/LICENSE delete mode 100644 server/vendor/phpunit/php-file-iterator/README.md delete mode 100644 server/vendor/phpunit/php-file-iterator/composer.json delete mode 100644 server/vendor/phpunit/php-file-iterator/src/Facade.php delete mode 100644 server/vendor/phpunit/php-file-iterator/src/Factory.php delete mode 100644 server/vendor/phpunit/php-file-iterator/src/Iterator.php delete mode 100644 server/vendor/phpunit/php-text-template/.gitattributes delete mode 100644 server/vendor/phpunit/php-text-template/.gitignore delete mode 100644 server/vendor/phpunit/php-text-template/LICENSE delete mode 100644 server/vendor/phpunit/php-text-template/README.md delete mode 100644 server/vendor/phpunit/php-text-template/composer.json delete mode 100644 server/vendor/phpunit/php-text-template/src/Template.php delete mode 100644 server/vendor/phpunit/php-timer/.gitattributes delete mode 100644 server/vendor/phpunit/php-timer/.gitignore delete mode 100644 server/vendor/phpunit/php-timer/.travis.yml delete mode 100644 server/vendor/phpunit/php-timer/LICENSE delete mode 100644 server/vendor/phpunit/php-timer/README.md delete mode 100644 server/vendor/phpunit/php-timer/composer.json delete mode 100644 server/vendor/phpunit/php-timer/src/Timer.php delete mode 100644 server/vendor/phpunit/php-timer/tests/TimerTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/.gitattributes delete mode 100644 server/vendor/phpunit/php-token-stream/.gitignore delete mode 100644 server/vendor/phpunit/php-token-stream/.travis.yml delete mode 100644 server/vendor/phpunit/php-token-stream/LICENSE delete mode 100644 server/vendor/phpunit/php-token-stream/README.md delete mode 100644 server/vendor/phpunit/php-token-stream/build.xml delete mode 100644 server/vendor/phpunit/php-token-stream/composer.json delete mode 100644 server/vendor/phpunit/php-token-stream/src/Token.php delete mode 100644 server/vendor/phpunit/php-token-stream/src/Token/Stream.php delete mode 100644 server/vendor/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/Token/ClassTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/Token/IncludeTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/Token/InterfaceTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/Token/NamespaceTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/TokenTest.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/classExtendsNamespacedClass.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/classInNamespace.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/classInScopedNamespace.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_that_declares_anonymous_class.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/class_with_method_that_declares_anonymous_class2.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/closure.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/issue19.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/issue30.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingBraces.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/multipleNamespacesWithOneClassUsingNonBraceSyntax.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/source.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/source2.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/source3.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/source4.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/_fixture/source5.php delete mode 100644 server/vendor/phpunit/php-token-stream/tests/bootstrap.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/.gitattributes delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/.gitignore delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/.php_cs delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/.travis.yml delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/CONTRIBUTING.md delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/LICENSE delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/README.md delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/build.xml delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/composer.json delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/phpunit.xml.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class_method.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_clone.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/trait_class.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/unmocked_clone.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_class.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/wsdl_method.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Builder/InvocationMockerTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/return_type_declarations_object_method.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/return_type_declarations_self.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/return_type_declarations_static_method.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractMockTestClass.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AbstractTrait.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnInterface.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/AnotherInterface.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Bar.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/ClassThatImplementsSerializable.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/ClassWithStaticMethod.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Foo.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/GoogleSearch.wsdl delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithSemiReservedMethodName.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/InterfaceWithStaticMethod.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallbackByReference.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MockTestInterface.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/PartialMockTestClass.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SingletonClass.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/StaticMockTestClass.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/StringableClass.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/_fixture/TraversableMockTestInterface.php delete mode 100644 server/vendor/phpunit/phpunit-mock-objects/tests/bootstrap.php delete mode 100644 server/vendor/phpunit/phpunit/.gitattributes delete mode 100644 server/vendor/phpunit/phpunit/.gitignore delete mode 100644 server/vendor/phpunit/phpunit/.php_cs delete mode 100644 server/vendor/phpunit/phpunit/.travis.yml delete mode 100644 server/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md delete mode 100644 server/vendor/phpunit/phpunit/CONTRIBUTING.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.0.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.1.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.2.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.3.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.4.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.5.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.6.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.7.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-4.8.md delete mode 100644 server/vendor/phpunit/phpunit/ChangeLog-5.0.md delete mode 100644 server/vendor/phpunit/phpunit/LICENSE delete mode 100644 server/vendor/phpunit/phpunit/README.md delete mode 100644 server/vendor/phpunit/phpunit/build.xml delete mode 100644 server/vendor/phpunit/phpunit/composer.json delete mode 100644 server/vendor/phpunit/phpunit/phpdox.xml.dist delete mode 100755 server/vendor/phpunit/phpunit/phpunit delete mode 100644 server/vendor/phpunit/phpunit/phpunit.xml.dist delete mode 100644 server/vendor/phpunit/phpunit/phpunit.xsd delete mode 100644 server/vendor/phpunit/phpunit/src/Exception.php delete mode 100644 server/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php delete mode 100644 server/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/src/Extensions/PhptTestSuite.php delete mode 100644 server/vendor/phpunit/phpunit/src/Extensions/RepeatedTest.php delete mode 100644 server/vendor/phpunit/phpunit/src/Extensions/TestDecorator.php delete mode 100644 server/vendor/phpunit/phpunit/src/Extensions/TicketListener.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Assert.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/AssertionFailedError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/CodeCoverageException.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/And.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Attribute.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Callback.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/FileExists.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsAnything.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsEqual.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsFalse.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsFinite.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsNan.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsNull.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsTrue.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/LessThan.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/SameSize.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/StringContains.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Error.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Error/Deprecated.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Error/Notice.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Error/Warning.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Exception.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/ExpectationFailedException.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/IncompleteTest.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/IncompleteTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/IncompleteTestError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/OutputError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/RiskyTest.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/RiskyTestError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/SelfDescribing.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/SkippedTest.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/SkippedTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/SkippedTestError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/SyntheticError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Test.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/TestCase.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/TestFailure.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/TestListener.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/TestResult.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/TestSuite.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php delete mode 100644 server/vendor/phpunit/phpunit/src/Framework/Warning.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/Exception.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/Filter/Group.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/Filter/Group/Include.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/Filter/Test.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/TestSuiteLoader.php delete mode 100644 server/vendor/phpunit/phpunit/src/Runner/Version.php delete mode 100644 server/vendor/phpunit/phpunit/src/TextUI/Command.php delete mode 100644 server/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php delete mode 100644 server/vendor/phpunit/phpunit/src/TextUI/TestRunner.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Blacklist.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Configuration.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/ErrorHandler.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Fileloader.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Filesystem.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Filter.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Getopt.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/GlobalState.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/InvalidArgumentHelper.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Log/JSON.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Log/JUnit.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Log/TAP.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Log/TeamCity.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/PHP.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/PHP/Default.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist delete mode 100644 server/vendor/phpunit/phpunit/src/Util/PHP/Windows.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Printer.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Regex.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/String.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Test.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/TestSuiteIterator.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/Type.php delete mode 100644 server/vendor/phpunit/phpunit/src/Util/XML.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Extensions/RepeatedTestTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Fail/fail.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/AssertTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/BaseTestListenerTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageRegExpTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/Constraint/ExceptionMessageTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/Constraint/IsJsonTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/TestFailureTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/TestImplementorTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/1021.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/1021/Issue1021Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/523.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/523/Issue523Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/578.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/578/Issue578Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/684.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/684/Issue684Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/783.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/783/ChildSuite.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/783/OneTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/783/ParentSuite.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/783/TwoTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1149/Issue1149Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/Issue1216Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/bootstrap1216.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1216/phpunit1216.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/Issue1265Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1265/phpunit1265.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/Issue1330Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1330/phpunit1330.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1348/Issue1348Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1351/ChildProcessClass1351.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1351/Issue1351Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1374/Issue1374Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1437/Issue1437Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1468/Issue1468Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1471/Issue1471Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1472/Issue1472Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/1570/Issue1570Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/244/Issue244Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/322/Issue322Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/322/phpunit322.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/433/Issue433Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/445/Issue445Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/503/Issue503Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/74/Issue74Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/74/NewException.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/765/Issue765Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/797/Issue797Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/797/bootstrap797.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php5.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/873-php7.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Regression/GitHub/873/Issue873Test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Runner/BaseTestRunnerTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dataprovider-testdox.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/debug.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/default.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dependencies-clone.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/failure-reverse-list.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/failure.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-sensitive-no-result.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/filter-no-results.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/group.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/help.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/help2.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/list-groups.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/log-teamcity.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/tap.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/teamcity.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/TextUI/testdox.phpt delete mode 100644 server/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Util/GetoptTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Util/RegexTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Util/TestDox/NamePrettifierTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Util/TestTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/Util/XMLTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/AbstractTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Author.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/BankAccount.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/BankAccountTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/BankAccountTest.test.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/BaseTestListenerSample.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/BeforeAndAfterTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/BeforeClassAndAfterClassTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Book.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Calculator.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ChangeCurrentWorkingDirectoryTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ClassWithScalarTypeDeclarations.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ClassWithToString.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ClonedDependencyTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ConcreteTest.my.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ConcreteTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageClassExtendedTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageClassTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageFunctionParenthesesWhitespaceTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageFunctionTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageMethodOneLineAnnotationTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageMethodParenthesesWhitespaceTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageMethodTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageNamespacedFunctionTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageNoneTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageNotPrivateTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageNotProtectedTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageNotPublicTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageNothingTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoveragePrivateTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageProtectedTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoveragePublicTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoverageTwoDefaultClassAnnotations.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoveredClass.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CoveredFunction.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/CustomPrinter.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DataProviderDebugTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DependencySuccessTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DependencyTestSuite.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DoubleTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/DummyException.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/EmptyTestCaseTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPostConditionsTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPreConditionsTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionInSetUpTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionInTearDownTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionInTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionNamespaceTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ExceptionTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Failure.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/FailureTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/FatalTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/IncompleteTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceA.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Inheritance/InheritanceB.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/InheritedTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/IniTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/IsolationTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/JsonData/arrayObject.json delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/JsonData/simpleObject.json delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/MockRunner.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/MultiDependencyTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassExtendedTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageClassTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassPublicTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageCoversClassTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageMethodTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPrivateTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotProtectedTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageNotPublicTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePrivateTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoverageProtectedTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoveragePublicTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredClass.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NamespaceCoveredFunction.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NoArgTestCaseTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NoTestCaseClass.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NoTestCases.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NonStatic.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NotExistingCoveredElementTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NotPublicTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NotVoidTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/NothingTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/OneTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/OutputTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/OverrideTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/RequirementsClassBeforeClassHookTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/RequirementsClassDocBlockTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/SampleArrayAccess.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/SampleClass.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Singleton.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/StackTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Struct.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/Success.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/TemplateMethodsTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/TestIncomplete.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/TestIterator.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/TestIterator2.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/TestSkipped.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/TestTestError.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/TestWithTest.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ThrowExceptionTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/ThrowNoExceptionTestCase.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/WasRun.php delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/bar.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration.colors.empty.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration.colors.false.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration.colors.invalid.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration.colors.true.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration.custom-printer.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/expectedFileFormat.txt delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/foo.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/structureAttributesAreSameButValuesAreNot.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/structureExpected.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/structureIgnoreTextNodes.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/structureIsSameButDataIsNot.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfAttributes.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/_files/structureWrongNumberOfNodes.xml delete mode 100644 server/vendor/phpunit/phpunit/tests/bootstrap.php delete mode 100644 server/vendor/sebastian/comparator/.gitignore delete mode 100644 server/vendor/sebastian/comparator/.travis.yml delete mode 100644 server/vendor/sebastian/comparator/LICENSE delete mode 100644 server/vendor/sebastian/comparator/README.md delete mode 100644 server/vendor/sebastian/comparator/build.xml delete mode 100644 server/vendor/sebastian/comparator/composer.json delete mode 100644 server/vendor/sebastian/comparator/phpunit.xml.dist delete mode 100644 server/vendor/sebastian/comparator/src/ArrayComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/Comparator.php delete mode 100644 server/vendor/sebastian/comparator/src/ComparisonFailure.php delete mode 100644 server/vendor/sebastian/comparator/src/DOMNodeComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/DateTimeComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/DoubleComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/ExceptionComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/Factory.php delete mode 100644 server/vendor/sebastian/comparator/src/MockObjectComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/NumericComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/ObjectComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/ResourceComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/ScalarComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/SplObjectStorageComparator.php delete mode 100644 server/vendor/sebastian/comparator/src/TypeComparator.php delete mode 100644 server/vendor/sebastian/comparator/tests/ArrayComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/DOMNodeComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/DateTimeComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/DoubleComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/ExceptionComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/FactoryTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/MockObjectComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/NumericComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/ObjectComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/ResourceComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/ScalarComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/SplObjectStorageComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/TypeComparatorTest.php delete mode 100644 server/vendor/sebastian/comparator/tests/_files/Author.php delete mode 100644 server/vendor/sebastian/comparator/tests/_files/Book.php delete mode 100644 server/vendor/sebastian/comparator/tests/_files/ClassWithToString.php delete mode 100644 server/vendor/sebastian/comparator/tests/_files/SampleClass.php delete mode 100644 server/vendor/sebastian/comparator/tests/_files/Struct.php delete mode 100644 server/vendor/sebastian/comparator/tests/_files/TestClass.php delete mode 100644 server/vendor/sebastian/comparator/tests/_files/TestClassComparator.php delete mode 100644 server/vendor/sebastian/comparator/tests/autoload.php delete mode 100644 server/vendor/sebastian/comparator/tests/bootstrap.php delete mode 100644 server/vendor/sebastian/diff/.gitignore delete mode 100644 server/vendor/sebastian/diff/.travis.yml delete mode 100644 server/vendor/sebastian/diff/LICENSE delete mode 100644 server/vendor/sebastian/diff/README.md delete mode 100644 server/vendor/sebastian/diff/build.xml delete mode 100644 server/vendor/sebastian/diff/composer.json delete mode 100644 server/vendor/sebastian/diff/phpunit.xml.dist delete mode 100644 server/vendor/sebastian/diff/src/Chunk.php delete mode 100644 server/vendor/sebastian/diff/src/Diff.php delete mode 100644 server/vendor/sebastian/diff/src/Differ.php delete mode 100644 server/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php delete mode 100644 server/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php delete mode 100644 server/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php delete mode 100644 server/vendor/sebastian/diff/src/Line.php delete mode 100644 server/vendor/sebastian/diff/src/Parser.php delete mode 100644 server/vendor/sebastian/diff/tests/DifferTest.php delete mode 100644 server/vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php delete mode 100644 server/vendor/sebastian/diff/tests/ParserTest.php delete mode 100644 server/vendor/sebastian/diff/tests/fixtures/patch.txt delete mode 100644 server/vendor/sebastian/diff/tests/fixtures/patch2.txt delete mode 100644 server/vendor/sebastian/environment/.gitignore delete mode 100644 server/vendor/sebastian/environment/.travis.yml delete mode 100644 server/vendor/sebastian/environment/LICENSE delete mode 100644 server/vendor/sebastian/environment/README.md delete mode 100644 server/vendor/sebastian/environment/build.xml delete mode 100644 server/vendor/sebastian/environment/composer.json delete mode 100644 server/vendor/sebastian/environment/phpunit.xml.dist delete mode 100644 server/vendor/sebastian/environment/src/Console.php delete mode 100644 server/vendor/sebastian/environment/src/Runtime.php delete mode 100644 server/vendor/sebastian/environment/tests/ConsoleTest.php delete mode 100644 server/vendor/sebastian/environment/tests/RuntimeTest.php delete mode 100644 server/vendor/sebastian/exporter/.gitignore delete mode 100644 server/vendor/sebastian/exporter/.travis.yml delete mode 100644 server/vendor/sebastian/exporter/LICENSE delete mode 100644 server/vendor/sebastian/exporter/README.md delete mode 100644 server/vendor/sebastian/exporter/build.xml delete mode 100644 server/vendor/sebastian/exporter/composer.json delete mode 100644 server/vendor/sebastian/exporter/phpunit.xml.dist delete mode 100644 server/vendor/sebastian/exporter/src/Exporter.php delete mode 100644 server/vendor/sebastian/exporter/tests/ExporterTest.php delete mode 100644 server/vendor/sebastian/global-state/.gitignore delete mode 100644 server/vendor/sebastian/global-state/.travis.yml delete mode 100644 server/vendor/sebastian/global-state/LICENSE delete mode 100644 server/vendor/sebastian/global-state/README.md delete mode 100644 server/vendor/sebastian/global-state/build.xml delete mode 100644 server/vendor/sebastian/global-state/composer.json delete mode 100644 server/vendor/sebastian/global-state/phpunit.xml.dist delete mode 100644 server/vendor/sebastian/global-state/src/Blacklist.php delete mode 100644 server/vendor/sebastian/global-state/src/CodeExporter.php delete mode 100644 server/vendor/sebastian/global-state/src/Exception.php delete mode 100644 server/vendor/sebastian/global-state/src/Restorer.php delete mode 100644 server/vendor/sebastian/global-state/src/RuntimeException.php delete mode 100644 server/vendor/sebastian/global-state/src/Snapshot.php delete mode 100644 server/vendor/sebastian/global-state/tests/BlacklistTest.php delete mode 100644 server/vendor/sebastian/global-state/tests/SnapshotTest.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/BlacklistedChildClass.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/BlacklistedClass.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/BlacklistedImplementor.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/BlacklistedInterface.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/SnapshotClass.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/SnapshotDomDocument.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/SnapshotFunctions.php delete mode 100644 server/vendor/sebastian/global-state/tests/_fixture/SnapshotTrait.php delete mode 100644 server/vendor/sebastian/recursion-context/.gitignore delete mode 100644 server/vendor/sebastian/recursion-context/.travis.yml delete mode 100644 server/vendor/sebastian/recursion-context/LICENSE delete mode 100644 server/vendor/sebastian/recursion-context/README.md delete mode 100644 server/vendor/sebastian/recursion-context/build.xml delete mode 100644 server/vendor/sebastian/recursion-context/composer.json delete mode 100644 server/vendor/sebastian/recursion-context/phpunit.xml.dist delete mode 100644 server/vendor/sebastian/recursion-context/src/Context.php delete mode 100644 server/vendor/sebastian/recursion-context/src/Exception.php delete mode 100644 server/vendor/sebastian/recursion-context/src/InvalidArgumentException.php delete mode 100644 server/vendor/sebastian/recursion-context/tests/ContextTest.php delete mode 100644 server/vendor/sebastian/resource-operations/.gitignore delete mode 100644 server/vendor/sebastian/resource-operations/LICENSE delete mode 100644 server/vendor/sebastian/resource-operations/README.md delete mode 100644 server/vendor/sebastian/resource-operations/build.xml delete mode 100644 server/vendor/sebastian/resource-operations/composer.json delete mode 100644 server/vendor/sebastian/resource-operations/src/ResourceOperations.php delete mode 100644 server/vendor/sebastian/version/.gitattributes delete mode 100644 server/vendor/sebastian/version/.gitignore delete mode 100644 server/vendor/sebastian/version/LICENSE delete mode 100644 server/vendor/sebastian/version/README.md delete mode 100644 server/vendor/sebastian/version/composer.json delete mode 100644 server/vendor/sebastian/version/src/Version.php delete mode 100644 server/vendor/slim/slim/.gitignore delete mode 100644 server/vendor/slim/slim/.htaccess delete mode 100644 server/vendor/slim/slim/.travis.yml delete mode 100644 server/vendor/slim/slim/CONTRIBUTING.md delete mode 100644 server/vendor/slim/slim/LICENSE delete mode 100644 server/vendor/slim/slim/README.markdown delete mode 100644 server/vendor/slim/slim/Slim/Environment.php delete mode 100644 server/vendor/slim/slim/Slim/Exception/Pass.php delete mode 100644 server/vendor/slim/slim/Slim/Exception/Stop.php delete mode 100644 server/vendor/slim/slim/Slim/Helper/Set.php delete mode 100644 server/vendor/slim/slim/Slim/Http/Cookies.php delete mode 100644 server/vendor/slim/slim/Slim/Http/Headers.php delete mode 100644 server/vendor/slim/slim/Slim/Http/Request.php delete mode 100644 server/vendor/slim/slim/Slim/Http/Response.php delete mode 100644 server/vendor/slim/slim/Slim/Http/Util.php delete mode 100644 server/vendor/slim/slim/Slim/Log.php delete mode 100644 server/vendor/slim/slim/Slim/LogWriter.php delete mode 100644 server/vendor/slim/slim/Slim/Middleware.php delete mode 100644 server/vendor/slim/slim/Slim/Middleware/ContentTypes.php delete mode 100644 server/vendor/slim/slim/Slim/Middleware/Flash.php delete mode 100644 server/vendor/slim/slim/Slim/Middleware/MethodOverride.php delete mode 100644 server/vendor/slim/slim/Slim/Middleware/PrettyExceptions.php delete mode 100644 server/vendor/slim/slim/Slim/Middleware/SessionCookie.php delete mode 100644 server/vendor/slim/slim/Slim/Route.php delete mode 100644 server/vendor/slim/slim/Slim/Router.php delete mode 100644 server/vendor/slim/slim/Slim/Slim.php delete mode 100644 server/vendor/slim/slim/Slim/View.php delete mode 100644 server/vendor/slim/slim/composer.json delete mode 100644 server/vendor/slim/slim/index.php delete mode 100644 server/vendor/slim/slim/phpunit.xml.dist delete mode 100644 server/vendor/slim/slim/tests/EnvironmentTest.php delete mode 100644 server/vendor/slim/slim/tests/Foo.php delete mode 100644 server/vendor/slim/slim/tests/Helper/SetTest.php delete mode 100644 server/vendor/slim/slim/tests/Http/CookiesTest.php delete mode 100644 server/vendor/slim/slim/tests/Http/HeadersTest.php delete mode 100644 server/vendor/slim/slim/tests/Http/RequestTest.php delete mode 100644 server/vendor/slim/slim/tests/Http/ResponseTest.php delete mode 100644 server/vendor/slim/slim/tests/Http/UtilTest.php delete mode 100644 server/vendor/slim/slim/tests/LogTest.php delete mode 100644 server/vendor/slim/slim/tests/LogWriterTest.php delete mode 100644 server/vendor/slim/slim/tests/Middleware/ContentTypesTest.php delete mode 100644 server/vendor/slim/slim/tests/Middleware/FlashTest.php delete mode 100644 server/vendor/slim/slim/tests/Middleware/MethodOverrideTest.php delete mode 100644 server/vendor/slim/slim/tests/Middleware/PrettyExceptionsTest.php delete mode 100644 server/vendor/slim/slim/tests/Middleware/SessionCookieTest.php delete mode 100644 server/vendor/slim/slim/tests/MiddlewareTest.php delete mode 100644 server/vendor/slim/slim/tests/README delete mode 100644 server/vendor/slim/slim/tests/RouteTest.php delete mode 100644 server/vendor/slim/slim/tests/RouterTest.php delete mode 100644 server/vendor/slim/slim/tests/SlimTest.php delete mode 100644 server/vendor/slim/slim/tests/ViewTest.php delete mode 100644 server/vendor/slim/slim/tests/bootstrap.php delete mode 100644 server/vendor/slim/slim/tests/templates/test.php delete mode 100644 server/vendor/symfony/yaml/.gitignore delete mode 100644 server/vendor/symfony/yaml/CHANGELOG.md delete mode 100644 server/vendor/symfony/yaml/Dumper.php delete mode 100644 server/vendor/symfony/yaml/Escaper.php delete mode 100644 server/vendor/symfony/yaml/Exception/DumpException.php delete mode 100644 server/vendor/symfony/yaml/Exception/ExceptionInterface.php delete mode 100644 server/vendor/symfony/yaml/Exception/ParseException.php delete mode 100644 server/vendor/symfony/yaml/Exception/RuntimeException.php delete mode 100644 server/vendor/symfony/yaml/Inline.php delete mode 100644 server/vendor/symfony/yaml/LICENSE delete mode 100644 server/vendor/symfony/yaml/Parser.php delete mode 100644 server/vendor/symfony/yaml/README.md delete mode 100644 server/vendor/symfony/yaml/Tests/DumperTest.php delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsAnchorAlias.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsBasicTests.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsBlockMapping.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsDocumentSeparator.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsErrorTests.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsFlowCollections.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsFoldedScalars.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsNullsAndEmpties.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/embededPhp.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/escapedCharacters.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/index.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/sfComments.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/sfCompact.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/sfMergeKey.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/sfObjects.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/sfQuotes.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/sfTests.yml delete mode 100644 server/vendor/symfony/yaml/Tests/Fixtures/unindentedCollections.yml delete mode 100644 server/vendor/symfony/yaml/Tests/InlineTest.php delete mode 100644 server/vendor/symfony/yaml/Tests/ParseExceptionTest.php delete mode 100644 server/vendor/symfony/yaml/Tests/ParserTest.php delete mode 100644 server/vendor/symfony/yaml/Tests/YamlTest.php delete mode 100644 server/vendor/symfony/yaml/Unescaper.php delete mode 100644 server/vendor/symfony/yaml/Yaml.php delete mode 100644 server/vendor/symfony/yaml/composer.json delete mode 100644 server/vendor/symfony/yaml/phpunit.xml.dist diff --git a/server/composer.lock b/server/composer.lock deleted file mode 100644 index 4230cf7d..00000000 --- a/server/composer.lock +++ /dev/null @@ -1,1140 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "7a496b7c224bbce2958a2a98de39493f", - "packages": [ - { - "name": "gabordemooij/redbean", - "version": "v4.3", - "source": { - "type": "git", - "url": "https://github.com/gabordemooij/redbean.git", - "reference": "f375a1678d137ca1ff806813fac306723f97ec6b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/gabordemooij/redbean/zipball/f375a1678d137ca1ff806813fac306723f97ec6b", - "reference": "f375a1678d137ca1ff806813fac306723f97ec6b", - "shasum": "" - }, - "require": { - "php": ">=5.3.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "RedBeanPHP\\": "RedBeanPHP" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "New BSD and GPLv2" - ], - "authors": [ - { - "name": "Gabor de Mooij", - "email": "gabor@redbeanphp.com", - "homepage": "http://redbeanphp.com" - } - ], - "description": "RedBeanPHP ORM", - "homepage": "http://redbeanphp.com/", - "keywords": [ - "orm" - ], - "time": "2015-09-11 18:55:25" - }, - { - "name": "slim/slim", - "version": "2.6.2", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/20a02782f76830b67ae56a5c08eb1f563c351a37", - "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "suggest": { - "ext-mcrypt": "Required for HTTP cookie encryption" - }, - "type": "library", - "autoload": { - "psr-0": { - "Slim": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "info@joshlockhart.com", - "homepage": "http://www.joshlockhart.com/" - } - ], - "description": "Slim Framework, a PHP micro framework", - "homepage": "http://github.com/codeguy/Slim", - "keywords": [ - "microframework", - "rest", - "router" - ], - "time": "2015-03-08 18:41:17" - } - ], - "packages-dev": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "myclabs/deep-copy", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "time": "2015-11-07 22:20:37" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03 12:10:50" - }, - { - "name": "phpspec/prophecy", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "time": "2015-08-13 10:07:40" - }, - { - "name": "phpunit/php-code-coverage", - "version": "3.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7bb5cddf4ffe113eeb737b05241adb947b43f9d", - "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~5" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2015-11-12 21:08:20" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2015-06-21 13:08:43" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21 13:50:34" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2015-06-21 08:01:12" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2015-09-15 10:49:45" - }, - { - "name": "phpunit/phpunit", - "version": "5.0.9", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ed084be6b5b912f11c3559e17110f8d8a1e3a8a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed084be6b5b912f11c3559e17110f8d8a1e3a8a1", - "reference": "ed084be6b5b912f11c3559e17110f8d8a1e3a8a1", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "myclabs/deep-copy": "~1.3", - "php": ">=5.6", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~3.0", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": ">=3.0", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2015-11-10 21:47:43" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "b28b029356e65091dfbf8c2bc4ef106ffece509e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b28b029356e65091dfbf8c2bc4ef106ffece509e", - "reference": "b28b029356e65091dfbf8c2bc4ef106ffece509e", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.6", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2015-11-09 15:37:17" - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-07-26 15:48:44" - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-02-22 15:13:53" - }, - { - "name": "sebastian/environment", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2015-08-03 06:14:51" - }, - { - "name": "sebastian/exporter", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2015-06-21 07:55:53" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "time": "2015-10-12 03:26:01" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "time": "2015-07-28 20:34:47" - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" - }, - { - "name": "symfony/yaml", - "version": "v2.7.6", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "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 Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/server/vendor/autoload.php b/server/vendor/autoload.php deleted file mode 100644 index 92d6189a..00000000 --- a/server/vendor/autoload.php +++ /dev/null @@ -1,7 +0,0 @@ - - * Jordi Boggiano - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Composer\Autoload; - -/** - * ClassLoader implements a PSR-0 class loader - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md - * - * $loader = new \Composer\Autoload\ClassLoader(); - * - * // register classes with namespaces - * $loader->add('Symfony\Component', __DIR__.'/component'); - * $loader->add('Symfony', __DIR__.'/framework'); - * - * // activate the autoloader - * $loader->register(); - * - * // to enable searching the include path (eg. for PEAR packages) - * $loader->setUseIncludePath(true); - * - * In this example, if you try to use a class in the Symfony\Component - * namespace or one of its children (Symfony\Component\Console for instance), - * the autoloader will first look for the class under the component/ - * directory, and it will then fallback to the framework/ directory if not - * found before giving up. - * - * This class is loosely based on the Symfony UniversalClassLoader. - * - * @author Fabien Potencier - * @author Jordi Boggiano - */ -class ClassLoader -{ - // PSR-4 - private $prefixLengthsPsr4 = array(); - private $prefixDirsPsr4 = array(); - private $fallbackDirsPsr4 = array(); - - // PSR-0 - private $prefixesPsr0 = array(); - private $fallbackDirsPsr0 = array(); - - private $useIncludePath = false; - private $classMap = array(); - - private $classMapAuthoritative = false; - - public function getPrefixes() - { - if (!empty($this->prefixesPsr0)) { - return call_user_func_array('array_merge', $this->prefixesPsr0); - } - - return array(); - } - - public function getPrefixesPsr4() - { - return $this->prefixDirsPsr4; - } - - public function getFallbackDirs() - { - return $this->fallbackDirsPsr0; - } - - public function getFallbackDirsPsr4() - { - return $this->fallbackDirsPsr4; - } - - public function getClassMap() - { - return $this->classMap; - } - - /** - * @param array $classMap Class to filename map - */ - public function addClassMap(array $classMap) - { - if ($this->classMap) { - $this->classMap = array_merge($this->classMap, $classMap); - } else { - $this->classMap = $classMap; - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, either - * appending or prepending to the ones previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 root directories - * @param bool $prepend Whether to prepend the directories - */ - public function add($prefix, $paths, $prepend = false) - { - if (!$prefix) { - if ($prepend) { - $this->fallbackDirsPsr0 = array_merge( - (array) $paths, - $this->fallbackDirsPsr0 - ); - } else { - $this->fallbackDirsPsr0 = array_merge( - $this->fallbackDirsPsr0, - (array) $paths - ); - } - - return; - } - - $first = $prefix[0]; - if (!isset($this->prefixesPsr0[$first][$prefix])) { - $this->prefixesPsr0[$first][$prefix] = (array) $paths; - - return; - } - if ($prepend) { - $this->prefixesPsr0[$first][$prefix] = array_merge( - (array) $paths, - $this->prefixesPsr0[$first][$prefix] - ); - } else { - $this->prefixesPsr0[$first][$prefix] = array_merge( - $this->prefixesPsr0[$first][$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, either - * appending or prepending to the ones previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-0 base directories - * @param bool $prepend Whether to prepend the directories - * - * @throws \InvalidArgumentException - */ - public function addPsr4($prefix, $paths, $prepend = false) - { - if (!$prefix) { - // Register directories for the root namespace. - if ($prepend) { - $this->fallbackDirsPsr4 = array_merge( - (array) $paths, - $this->fallbackDirsPsr4 - ); - } else { - $this->fallbackDirsPsr4 = array_merge( - $this->fallbackDirsPsr4, - (array) $paths - ); - } - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { - // Register directories for a new namespace. - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } elseif ($prepend) { - // Prepend directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - (array) $paths, - $this->prefixDirsPsr4[$prefix] - ); - } else { - // Append directories for an already registered namespace. - $this->prefixDirsPsr4[$prefix] = array_merge( - $this->prefixDirsPsr4[$prefix], - (array) $paths - ); - } - } - - /** - * Registers a set of PSR-0 directories for a given prefix, - * replacing any others previously set for this prefix. - * - * @param string $prefix The prefix - * @param array|string $paths The PSR-0 base directories - */ - public function set($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr0 = (array) $paths; - } else { - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; - } - } - - /** - * Registers a set of PSR-4 directories for a given namespace, - * replacing any others previously set for this namespace. - * - * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-4 base directories - * - * @throws \InvalidArgumentException - */ - public function setPsr4($prefix, $paths) - { - if (!$prefix) { - $this->fallbackDirsPsr4 = (array) $paths; - } else { - $length = strlen($prefix); - if ('\\' !== $prefix[$length - 1]) { - throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); - } - $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; - $this->prefixDirsPsr4[$prefix] = (array) $paths; - } - } - - /** - * Turns on searching the include path for class files. - * - * @param bool $useIncludePath - */ - public function setUseIncludePath($useIncludePath) - { - $this->useIncludePath = $useIncludePath; - } - - /** - * Can be used to check if the autoloader uses the include path to check - * for classes. - * - * @return bool - */ - public function getUseIncludePath() - { - return $this->useIncludePath; - } - - /** - * Turns off searching the prefix and fallback directories for classes - * that have not been registered with the class map. - * - * @param bool $classMapAuthoritative - */ - public function setClassMapAuthoritative($classMapAuthoritative) - { - $this->classMapAuthoritative = $classMapAuthoritative; - } - - /** - * Should class lookup fail if not found in the current class map? - * - * @return bool - */ - public function isClassMapAuthoritative() - { - return $this->classMapAuthoritative; - } - - /** - * Registers this instance as an autoloader. - * - * @param bool $prepend Whether to prepend the autoloader or not - */ - public function register($prepend = false) - { - spl_autoload_register(array($this, 'loadClass'), true, $prepend); - } - - /** - * Unregisters this instance as an autoloader. - */ - public function unregister() - { - spl_autoload_unregister(array($this, 'loadClass')); - } - - /** - * Loads the given class or interface. - * - * @param string $class The name of the class - * @return bool|null True if loaded, null otherwise - */ - public function loadClass($class) - { - if ($file = $this->findFile($class)) { - includeFile($file); - - return true; - } - } - - /** - * Finds the path to the file where the class is defined. - * - * @param string $class The name of the class - * - * @return string|false The path if found, false otherwise - */ - public function findFile($class) - { - // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731 - if ('\\' == $class[0]) { - $class = substr($class, 1); - } - - // class map lookup - if (isset($this->classMap[$class])) { - return $this->classMap[$class]; - } - if ($this->classMapAuthoritative) { - return false; - } - - $file = $this->findFileWithExtension($class, '.php'); - - // Search for Hack files if we are running on HHVM - if ($file === null && defined('HHVM_VERSION')) { - $file = $this->findFileWithExtension($class, '.hh'); - } - - if ($file === null) { - // Remember that this class does not exist. - return $this->classMap[$class] = false; - } - - return $file; - } - - private function findFileWithExtension($class, $ext) - { - // PSR-4 lookup - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; - - $first = $class[0]; - if (isset($this->prefixLengthsPsr4[$first])) { - foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) { - if (0 === strpos($class, $prefix)) { - foreach ($this->prefixDirsPsr4[$prefix] as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { - return $file; - } - } - } - } - } - - // PSR-4 fallback dirs - foreach ($this->fallbackDirsPsr4 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { - return $file; - } - } - - // PSR-0 lookup - if (false !== $pos = strrpos($class, '\\')) { - // namespaced class name - $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) - . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); - } else { - // PEAR-like class name - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; - } - - if (isset($this->prefixesPsr0[$first])) { - foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { - if (0 === strpos($class, $prefix)) { - foreach ($dirs as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - } - } - } - - // PSR-0 fallback dirs - foreach ($this->fallbackDirsPsr0 as $dir) { - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { - return $file; - } - } - - // PSR-0 include paths. - if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { - return $file; - } - } -} - -/** - * Scope isolated include. - * - * Prevents access to $this/self from included files. - */ -function includeFile($file) -{ - include $file; -} diff --git a/server/vendor/composer/autoload_classmap.php b/server/vendor/composer/autoload_classmap.php deleted file mode 100644 index 9766b89a..00000000 --- a/server/vendor/composer/autoload_classmap.php +++ /dev/null @@ -1,450 +0,0 @@ - $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', - 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', - 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', - 'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', - 'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', - 'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', - 'PHPUnit_Extensions_PhptTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestSuite.php', - 'PHPUnit_Extensions_RepeatedTest' => $vendorDir . '/phpunit/phpunit/src/Extensions/RepeatedTest.php', - 'PHPUnit_Extensions_TestDecorator' => $vendorDir . '/phpunit/phpunit/src/Extensions/TestDecorator.php', - 'PHPUnit_Extensions_TicketListener' => $vendorDir . '/phpunit/phpunit/src/Extensions/TicketListener.php', - 'PHPUnit_Framework_Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php', - 'PHPUnit_Framework_AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/AssertionFailedError.php', - 'PHPUnit_Framework_BaseTestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/BaseTestListener.php', - 'PHPUnit_Framework_CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/CodeCoverageException.php', - 'PHPUnit_Framework_Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint.php', - 'PHPUnit_Framework_Constraint_And' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/And.php', - 'PHPUnit_Framework_Constraint_ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php', - 'PHPUnit_Framework_Constraint_ArraySubset' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ArraySubset.php', - 'PHPUnit_Framework_Constraint_Attribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Attribute.php', - 'PHPUnit_Framework_Constraint_Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php', - 'PHPUnit_Framework_Constraint_ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasAttribute.php', - 'PHPUnit_Framework_Constraint_ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ClassHasStaticAttribute.php', - 'PHPUnit_Framework_Constraint_Composite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Composite.php', - 'PHPUnit_Framework_Constraint_Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Count.php', - 'PHPUnit_Framework_Constraint_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception.php', - 'PHPUnit_Framework_Constraint_ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionCode.php', - 'PHPUnit_Framework_Constraint_ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessage.php', - 'PHPUnit_Framework_Constraint_ExceptionMessageRegExp' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ExceptionMessageRegExp.php', - 'PHPUnit_Framework_Constraint_FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/FileExists.php', - 'PHPUnit_Framework_Constraint_GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/GreaterThan.php', - 'PHPUnit_Framework_Constraint_IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php', - 'PHPUnit_Framework_Constraint_IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', - 'PHPUnit_Framework_Constraint_IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', - 'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', - 'PHPUnit_Framework_Constraint_IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php', - 'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', - 'PHPUnit_Framework_Constraint_IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php', - 'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', - 'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', - 'PHPUnit_Framework_Constraint_IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php', - 'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', - 'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', - 'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', - 'PHPUnit_Framework_Constraint_JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php', - 'PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches/ErrorMessageProvider.php', - 'PHPUnit_Framework_Constraint_LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/LessThan.php', - 'PHPUnit_Framework_Constraint_Not' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Not.php', - 'PHPUnit_Framework_Constraint_ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/ObjectHasAttribute.php', - 'PHPUnit_Framework_Constraint_Or' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Or.php', - 'PHPUnit_Framework_Constraint_PCREMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/PCREMatch.php', - 'PHPUnit_Framework_Constraint_SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/SameSize.php', - 'PHPUnit_Framework_Constraint_StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringContains.php', - 'PHPUnit_Framework_Constraint_StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php', - 'PHPUnit_Framework_Constraint_StringMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringMatches.php', - 'PHPUnit_Framework_Constraint_StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/StringStartsWith.php', - 'PHPUnit_Framework_Constraint_TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', - 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', - 'PHPUnit_Framework_Constraint_Xor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', - 'PHPUnit_Framework_Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error.php', - 'PHPUnit_Framework_Error_Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', - 'PHPUnit_Framework_Error_Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php', - 'PHPUnit_Framework_Error_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php', - 'PHPUnit_Framework_Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception.php', - 'PHPUnit_Framework_ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php', - 'PHPUnit_Framework_ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/ExpectationFailedException.php', - 'PHPUnit_Framework_IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php', - 'PHPUnit_Framework_IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php', - 'PHPUnit_Framework_IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestError.php', - 'PHPUnit_Framework_InvalidCoversTargetError' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetError.php', - 'PHPUnit_Framework_InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidCoversTargetException.php', - 'PHPUnit_Framework_MockObject_BadMethodCallException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/BadMethodCallException.php', - 'PHPUnit_Framework_MockObject_Builder_Identity' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Identity.php', - 'PHPUnit_Framework_MockObject_Builder_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Builder_Match' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Match.php', - 'PHPUnit_Framework_MockObject_Builder_MethodNameMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/MethodNameMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Namespace' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Namespace.php', - 'PHPUnit_Framework_MockObject_Builder_ParametersMatch' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/ParametersMatch.php', - 'PHPUnit_Framework_MockObject_Builder_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/Stub.php', - 'PHPUnit_Framework_MockObject_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/Exception.php', - 'PHPUnit_Framework_MockObject_Generator' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php', - 'PHPUnit_Framework_MockObject_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php', - 'PHPUnit_Framework_MockObject_InvocationMocker' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php', - 'PHPUnit_Framework_MockObject_Invocation_Object' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php', - 'PHPUnit_Framework_MockObject_Invocation_Static' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php', - 'PHPUnit_Framework_MockObject_Invokable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invokable.php', - 'PHPUnit_Framework_MockObject_Matcher' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyInvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_AnyParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/AnyParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php', - 'PHPUnit_Framework_MockObject_Matcher_Invocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Invocation.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtIndex.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtLeastOnce.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedAtMostCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedCount' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedCount.php', - 'PHPUnit_Framework_MockObject_Matcher_InvokedRecorder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php', - 'PHPUnit_Framework_MockObject_Matcher_MethodName' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/MethodName.php', - 'PHPUnit_Framework_MockObject_Matcher_Parameters' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php', - 'PHPUnit_Framework_MockObject_Matcher_StatelessInvocation' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/StatelessInvocation.php', - 'PHPUnit_Framework_MockObject_MockBuilder' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php', - 'PHPUnit_Framework_MockObject_MockObject' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php', - 'PHPUnit_Framework_MockObject_RuntimeException' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Exception/RuntimeException.php', - 'PHPUnit_Framework_MockObject_Stub' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub.php', - 'PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ConsecutiveCalls.php', - 'PHPUnit_Framework_MockObject_Stub_Exception' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php', - 'PHPUnit_Framework_MockObject_Stub_MatcherCollection' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/MatcherCollection.php', - 'PHPUnit_Framework_MockObject_Stub_Return' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Return.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnArgument' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnArgument.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnCallback' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnCallback.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnSelf' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnSelf.php', - 'PHPUnit_Framework_MockObject_Stub_ReturnValueMap' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/ReturnValueMap.php', - 'PHPUnit_Framework_MockObject_Verifiable' => $vendorDir . '/phpunit/phpunit-mock-objects/src/Framework/MockObject/Verifiable.php', - 'PHPUnit_Framework_OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/OutputError.php', - 'PHPUnit_Framework_RiskyTest' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTest.php', - 'PHPUnit_Framework_RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/RiskyTestError.php', - 'PHPUnit_Framework_SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php', - 'PHPUnit_Framework_SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php', - 'PHPUnit_Framework_SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php', - 'PHPUnit_Framework_SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestError.php', - 'PHPUnit_Framework_SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestSuiteError.php', - 'PHPUnit_Framework_SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/SyntheticError.php', - 'PHPUnit_Framework_Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php', - 'PHPUnit_Framework_TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php', - 'PHPUnit_Framework_TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php', - 'PHPUnit_Framework_TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php', - 'PHPUnit_Framework_TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php', - 'PHPUnit_Framework_TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php', - 'PHPUnit_Framework_TestSuite_DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', - 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', - 'PHPUnit_Framework_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php', - 'PHPUnit_Runner_BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', - 'PHPUnit_Runner_Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php', - 'PHPUnit_Runner_Filter_Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', - 'PHPUnit_Runner_Filter_GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group.php', - 'PHPUnit_Runner_Filter_Group_Exclude' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Exclude.php', - 'PHPUnit_Runner_Filter_Group_Include' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Group/Include.php', - 'PHPUnit_Runner_Filter_Test' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Test.php', - 'PHPUnit_Runner_StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php', - 'PHPUnit_Runner_TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php', - 'PHPUnit_Runner_Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php', - 'PHPUnit_TextUI_Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php', - 'PHPUnit_TextUI_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php', - 'PHPUnit_TextUI_TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php', - 'PHPUnit_Util_Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php', - 'PHPUnit_Util_Configuration' => $vendorDir . '/phpunit/phpunit/src/Util/Configuration.php', - 'PHPUnit_Util_ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php', - 'PHPUnit_Util_Fileloader' => $vendorDir . '/phpunit/phpunit/src/Util/Fileloader.php', - 'PHPUnit_Util_Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php', - 'PHPUnit_Util_Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php', - 'PHPUnit_Util_Getopt' => $vendorDir . '/phpunit/phpunit/src/Util/Getopt.php', - 'PHPUnit_Util_GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php', - 'PHPUnit_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidArgumentHelper.php', - 'PHPUnit_Util_Log_JSON' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JSON.php', - 'PHPUnit_Util_Log_JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php', - 'PHPUnit_Util_Log_TAP' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TAP.php', - 'PHPUnit_Util_Log_TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php', - 'PHPUnit_Util_PHP' => $vendorDir . '/phpunit/phpunit/src/Util/PHP.php', - 'PHPUnit_Util_PHP_Default' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Default.php', - 'PHPUnit_Util_PHP_Windows' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Windows.php', - 'PHPUnit_Util_Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php', - 'PHPUnit_Util_Regex' => $vendorDir . '/phpunit/phpunit/src/Util/Regex.php', - 'PHPUnit_Util_String' => $vendorDir . '/phpunit/phpunit/src/Util/String.php', - 'PHPUnit_Util_Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php', - 'PHPUnit_Util_TestDox_NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php', - 'PHPUnit_Util_TestDox_ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php', - 'PHPUnit_Util_TestDox_ResultPrinter_HTML' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/HTML.php', - 'PHPUnit_Util_TestDox_ResultPrinter_Text' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter/Text.php', - 'PHPUnit_Util_TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Util/TestSuiteIterator.php', - 'PHPUnit_Util_Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php', - 'PHPUnit_Util_XML' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php', - 'PHP_CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', - 'PHP_CodeCoverage_Driver' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', - 'PHP_CodeCoverage_Driver_HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', - 'PHP_CodeCoverage_Driver_PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', - 'PHP_CodeCoverage_Driver_Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', - 'PHP_CodeCoverage_Exception' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php', - 'PHP_CodeCoverage_Filter' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', - 'PHP_CodeCoverage_InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php', - 'PHP_CodeCoverage_Report_Clover' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', - 'PHP_CodeCoverage_Report_Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', - 'PHP_CodeCoverage_Report_Factory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', - 'PHP_CodeCoverage_Report_HTML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php', - 'PHP_CodeCoverage_Report_HTML_Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php', - 'PHP_CodeCoverage_Report_HTML_Renderer_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php', - 'PHP_CodeCoverage_Report_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php', - 'PHP_CodeCoverage_Report_Node_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php', - 'PHP_CodeCoverage_Report_Node_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php', - 'PHP_CodeCoverage_Report_Node_Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Iterator.php', - 'PHP_CodeCoverage_Report_PHP' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php', - 'PHP_CodeCoverage_Report_Text' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php', - 'PHP_CodeCoverage_Report_XML' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php', - 'PHP_CodeCoverage_Report_XML_Directory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Directory.php', - 'PHP_CodeCoverage_Report_XML_File' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File.php', - 'PHP_CodeCoverage_Report_XML_File_Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php', - 'PHP_CodeCoverage_Report_XML_File_Method' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Method.php', - 'PHP_CodeCoverage_Report_XML_File_Report' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Report.php', - 'PHP_CodeCoverage_Report_XML_File_Unit' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Unit.php', - 'PHP_CodeCoverage_Report_XML_Node' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Node.php', - 'PHP_CodeCoverage_Report_XML_Project' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', - 'PHP_CodeCoverage_Report_XML_Tests' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', - 'PHP_CodeCoverage_Report_XML_Totals' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', - 'PHP_CodeCoverage_RuntimeException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php', - 'PHP_CodeCoverage_UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php', - 'PHP_CodeCoverage_Util' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', - 'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php', - 'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_TokenWithScopeAndVisibility' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ABSTRACT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AMPERSAND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AND_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ARRAY_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ASYNC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_AWAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BACKTICK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BAD_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOLEAN_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BOOL_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_BREAK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CALLABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CARET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CASE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CATCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CHARACTER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLASS_NAME_CONSTANT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLONE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CLOSE_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COALESCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMA' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_COMPILER_HALT_OFFSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONCAT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONSTANT_ENCAPSED_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CONTINUE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_CURLY_OPEN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DEFAULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DIV_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOC_COMMENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOLLAR_OPEN_CURLY_BRACES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_COLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_DOUBLE_QUOTES' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELLIPSIS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ELSEIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EMPTY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENCAPSED_AND_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDDECLARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDFOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDIF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDSWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENDWHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_END_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ENUM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EQUALS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EVAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXCLAMATION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_EXTENDS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FINALLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FOREACH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNCTION' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_FUNC_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GLOBAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GOTO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_HALT_COMPILER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IMPLEMENTS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INCLUDE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INLINE_HTML' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTANCEOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INSTEADOF' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INTERFACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_INT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ISSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_GREATER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_NOT_IDENTICAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_IS_SMALLER_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Includes' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_JOIN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_ARROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_CP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LAMBDA_OP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LINE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LIST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LNUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_AND' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_OR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LOGICAL_XOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_METHOD_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MINUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MOD_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MULT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_MUL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NAMESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NEW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NS_SEPARATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_NUM_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OBJECT_OPERATOR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_ONUMBER' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_BRACKET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_CURLY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_SQUARE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OPEN_TAG_WITH_ECHO' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_OR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PAAMAYIM_NEKUDOTAYIM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PERCENT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PIPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PLUS_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_POW_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRINT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PRIVATE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PROTECTED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_PUBLIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_QUESTION_MARK' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_REQUIRE_ONCE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_RETURN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SEMICOLON' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SHAPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SL_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SPACESHIP' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_START_HEREDOC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STATIC' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_STRING_VARNAME' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_SWITCH' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_Stream' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream.php', - 'PHP_Token_Stream_CachingFactory' => $vendorDir . '/phpunit/php-token-stream/src/Token/Stream/CachingFactory.php', - 'PHP_Token_THROW' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TILDE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRAIT_C' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TRY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPELIST_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_TYPELIST_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_UNSET_CAST' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_USE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VAR' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_VARIABLE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHERE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHILE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_WHITESPACE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_ATTRIBUTE' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CATEGORY' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CATEGORY_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_CHILDREN' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_LABEL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_REQUIRED' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TAG_GT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TAG_LT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XHP_TEXT' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', - 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', - 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', - 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', - 'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php', - 'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php', - 'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php', - 'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php', - 'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php', - 'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php', - 'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php', - 'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php', - 'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php', - 'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php', - 'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php', - 'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php', - 'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php', - 'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php', - 'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php', - 'SebastianBergmann\\Diff\\LCS\\LongestCommonSubsequence' => $vendorDir . '/sebastian/diff/src/LCS/LongestCommonSubsequence.php', - 'SebastianBergmann\\Diff\\LCS\\MemoryEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\LCS\\TimeEfficientImplementation' => $vendorDir . '/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php', - 'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php', - 'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php', - 'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php', - 'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php', - 'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php', - 'SebastianBergmann\\GlobalState\\Blacklist' => $vendorDir . '/sebastian/global-state/src/Blacklist.php', - 'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php', - 'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/Exception.php', - 'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php', - 'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/RuntimeException.php', - 'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php', - 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', - 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php', - 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', - 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php', - 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', - 'Text_Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php', -); diff --git a/server/vendor/composer/autoload_namespaces.php b/server/vendor/composer/autoload_namespaces.php deleted file mode 100644 index 19ef1a98..00000000 --- a/server/vendor/composer/autoload_namespaces.php +++ /dev/null @@ -1,12 +0,0 @@ - array($vendorDir . '/phpdocumentor/reflection-docblock/src'), - 'Slim' => array($vendorDir . '/slim/slim'), - 'Prophecy\\' => array($vendorDir . '/phpspec/prophecy/src'), -); diff --git a/server/vendor/composer/autoload_psr4.php b/server/vendor/composer/autoload_psr4.php deleted file mode 100644 index b367de02..00000000 --- a/server/vendor/composer/autoload_psr4.php +++ /dev/null @@ -1,13 +0,0 @@ - array($vendorDir . '/symfony/yaml'), - 'RedBeanPHP\\' => array($vendorDir . '/gabordemooij/redbean/RedBeanPHP'), - 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), - 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), -); diff --git a/server/vendor/composer/autoload_real.php b/server/vendor/composer/autoload_real.php deleted file mode 100644 index d264186e..00000000 --- a/server/vendor/composer/autoload_real.php +++ /dev/null @@ -1,50 +0,0 @@ - $path) { - $loader->set($namespace, $path); - } - - $map = require __DIR__ . '/autoload_psr4.php'; - foreach ($map as $namespace => $path) { - $loader->setPsr4($namespace, $path); - } - - $classMap = require __DIR__ . '/autoload_classmap.php'; - if ($classMap) { - $loader->addClassMap($classMap); - } - - $loader->register(true); - - return $loader; - } -} - -function composerRequirec1131bbfb8e9acff5fc8b79d0d7d1f64($file) -{ - require $file; -} diff --git a/server/vendor/composer/installed.json b/server/vendor/composer/installed.json deleted file mode 100644 index a426272b..00000000 --- a/server/vendor/composer/installed.json +++ /dev/null @@ -1,1167 +0,0 @@ -[ - { - "name": "slim/slim", - "version": "2.6.2", - "version_normalized": "2.6.2.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/20a02782f76830b67ae56a5c08eb1f563c351a37", - "reference": "20a02782f76830b67ae56a5c08eb1f563c351a37", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "suggest": { - "ext-mcrypt": "Required for HTTP cookie encryption" - }, - "time": "2015-03-08 18:41:17", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Slim": "." - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "info@joshlockhart.com", - "homepage": "http://www.joshlockhart.com/" - } - ], - "description": "Slim Framework, a PHP micro framework", - "homepage": "http://github.com/codeguy/Slim", - "keywords": [ - "microframework", - "rest", - "router" - ] - }, - { - "name": "gabordemooij/redbean", - "version": "v4.3", - "version_normalized": "4.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/gabordemooij/redbean.git", - "reference": "f375a1678d137ca1ff806813fac306723f97ec6b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/gabordemooij/redbean/zipball/f375a1678d137ca1ff806813fac306723f97ec6b", - "reference": "f375a1678d137ca1ff806813fac306723f97ec6b", - "shasum": "" - }, - "require": { - "php": ">=5.3.4" - }, - "time": "2015-09-11 18:55:25", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "RedBeanPHP\\": "RedBeanPHP" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "New BSD and GPLv2" - ], - "authors": [ - { - "name": "Gabor de Mooij", - "email": "gabor@redbeanphp.com", - "homepage": "http://redbeanphp.com" - } - ], - "description": "RedBeanPHP ORM", - "homepage": "http://redbeanphp.com/", - "keywords": [ - "orm" - ] - }, - { - "name": "myclabs/deep-copy", - "version": "1.5.0", - "version_normalized": "1.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", - "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - }, - "time": "2015-11-07 22:20:37", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "homepage": "https://github.com/myclabs/DeepCopy", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ] - }, - { - "name": "sebastian/version", - "version": "1.0.6", - "version_normalized": "1.0.6.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "shasum": "" - }, - "time": "2015-06-21 13:59:46", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version" - }, - { - "name": "sebastian/resource-operations", - "version": "1.0.0", - "version_normalized": "1.0.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "time": "2015-07-28 20:34:47", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations" - }, - { - "name": "sebastian/global-state", - "version": "1.1.1", - "version_normalized": "1.1.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "suggest": { - "ext-uopz": "*" - }, - "time": "2015-10-12 03:26:01", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ] - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2015-06-21 08:04:50", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context" - }, - { - "name": "sebastian/exporter", - "version": "1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2015-06-21 07:55:53", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ] - }, - { - "name": "sebastian/environment", - "version": "1.3.2", - "version_normalized": "1.3.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2015-08-03 06:14:51", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ] - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "version_normalized": "1.3.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2015-02-22 15:13:53", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ] - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "version_normalized": "1.2.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "time": "2015-07-26 15:48:44", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ] - }, - { - "name": "symfony/yaml", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "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 Yaml Component", - "homepage": "https://symfony.com" - }, - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "version_normalized": "1.0.5.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "time": "2015-06-14 21:17:01", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ] - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "version_normalized": "2.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "time": "2015-02-03 12:10:50", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ] - }, - { - "name": "phpspec/prophecy", - "version": "v1.5.0", - "version_normalized": "1.5.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "time": "2015-08-13 10:07:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ] - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "version_normalized": "1.2.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2015-06-21 13:50:34", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ] - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "3.0.4", - "version_normalized": "3.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "b28b029356e65091dfbf8c2bc4ef106ffece509e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/b28b029356e65091dfbf8c2bc4ef106ffece509e", - "reference": "b28b029356e65091dfbf8c2bc4ef106ffece509e", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.6", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~5" - }, - "suggest": { - "ext-soap": "*" - }, - "time": "2015-11-09 15:37:17", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ] - }, - { - "name": "phpunit/php-timer", - "version": "1.0.7", - "version_normalized": "1.0.7.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2015-06-21 08:01:12", - "type": "library", - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ] - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.8", - "version_normalized": "1.4.8.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "time": "2015-09-15 10:49:45", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ] - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.1", - "version_normalized": "1.4.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "time": "2015-06-21 13:08:43", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ] - }, - { - "name": "phpunit/php-code-coverage", - "version": "3.0.2", - "version_normalized": "3.0.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f7bb5cddf4ffe113eeb737b05241adb947b43f9d", - "reference": "f7bb5cddf4ffe113eeb737b05241adb947b43f9d", - "shasum": "" - }, - "require": { - "php": ">=5.6", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~5" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "time": "2015-11-12 21:08:20", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ] - }, - { - "name": "phpunit/phpunit", - "version": "5.0.9", - "version_normalized": "5.0.9.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ed084be6b5b912f11c3559e17110f8d8a1e3a8a1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ed084be6b5b912f11c3559e17110f8d8a1e3a8a1", - "reference": "ed084be6b5b912f11c3559e17110f8d8a1e3a8a1", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "myclabs/deep-copy": "~1.3", - "php": ">=5.6", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~3.0", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": ">=3.0", - "sebastian/comparator": "~1.1", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/resource-operations": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "time": "2015-11-10 21:47:43", - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ] - } -] diff --git a/server/vendor/doctrine/instantiator/.gitignore b/server/vendor/doctrine/instantiator/.gitignore deleted file mode 100644 index e3e368dd..00000000 --- a/server/vendor/doctrine/instantiator/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -phpunit.xml -composer.lock -build -vendor -coverage.clover diff --git a/server/vendor/doctrine/instantiator/.scrutinizer.yml b/server/vendor/doctrine/instantiator/.scrutinizer.yml deleted file mode 100644 index aad5e403..00000000 --- a/server/vendor/doctrine/instantiator/.scrutinizer.yml +++ /dev/null @@ -1,46 +0,0 @@ -before_commands: - - "composer install --prefer-source" - -tools: - external_code_coverage: - timeout: 600 - php_code_coverage: - enabled: true - test_command: ./vendor/bin/phpunit - php_code_sniffer: - enabled: true - config: - standard: PSR2 - filter: - paths: ["src/*", "tests/*"] - php_cpd: - enabled: true - excluded_dirs: ["build/*", "tests", "vendor"] - php_cs_fixer: - enabled: true - config: - level: all - filter: - paths: ["src/*", "tests/*"] - php_loc: - enabled: true - excluded_dirs: ["build", "tests", "vendor"] - php_mess_detector: - enabled: true - config: - ruleset: phpmd.xml.dist - design_rules: { eval_expression: false } - filter: - paths: ["src/*"] - php_pdepend: - enabled: true - excluded_dirs: ["build", "tests", "vendor"] - php_analyzer: - enabled: true - filter: - paths: ["src/*", "tests/*"] - php_hhvm: - enabled: true - filter: - paths: ["src/*", "tests/*"] - sensiolabs_security_checker: true diff --git a/server/vendor/doctrine/instantiator/.travis.install.sh b/server/vendor/doctrine/instantiator/.travis.install.sh deleted file mode 100755 index 2819188c..00000000 --- a/server/vendor/doctrine/instantiator/.travis.install.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -set -x -if [ "$TRAVIS_PHP_VERSION" = 'hhvm' ] || [ "$TRAVIS_PHP_VERSION" = 'hhvm-nightly' ] ; then - curl -sS https://getcomposer.org/installer > composer-installer.php - hhvm composer-installer.php - hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 composer.phar update --prefer-source -elif [ "$TRAVIS_PHP_VERSION" = '5.3.3' ] ; then - composer self-update - composer update --prefer-source --no-dev - composer dump-autoload -else - composer self-update - composer update --prefer-source -fi diff --git a/server/vendor/doctrine/instantiator/.travis.yml b/server/vendor/doctrine/instantiator/.travis.yml deleted file mode 100644 index 7f1ec5f9..00000000 --- a/server/vendor/doctrine/instantiator/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: php - -php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - -before_script: - - ./.travis.install.sh - - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then PHPUNIT_FLAGS="--coverage-clover coverage.clover"; else PHPUNIT_FLAGS=""; fi - -script: - - if [ $TRAVIS_PHP_VERSION = '5.3.3' ]; then phpunit; fi - - if [ $TRAVIS_PHP_VERSION != '5.3.3' ]; then ./vendor/bin/phpunit $PHPUNIT_FLAGS; fi - - if [ $TRAVIS_PHP_VERSION != '5.3.3' ]; then ./vendor/bin/phpcs --standard=PSR2 ./src/ ./tests/; fi - - if [[ $TRAVIS_PHP_VERSION != '5.3.3' && $TRAVIS_PHP_VERSION != '5.4.29' && $TRAVIS_PHP_VERSION != '5.5.13' ]]; then php -n ./vendor/bin/athletic -p ./tests/DoctrineTest/InstantiatorPerformance/ -f GroupedFormatter; fi - -after_script: - - if [ $TRAVIS_PHP_VERSION = '5.6' ]; then wget https://scrutinizer-ci.com/ocular.phar; php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi diff --git a/server/vendor/doctrine/instantiator/CONTRIBUTING.md b/server/vendor/doctrine/instantiator/CONTRIBUTING.md deleted file mode 100644 index 75b84b2a..00000000 --- a/server/vendor/doctrine/instantiator/CONTRIBUTING.md +++ /dev/null @@ -1,35 +0,0 @@ -# Contributing - - * Coding standard for the project is [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) - * The project will follow strict [object calisthenics](http://www.slideshare.net/guilhermeblanco/object-calisthenics-applied-to-php) - * Any contribution must provide tests for additional introduced conditions - * Any un-confirmed issue needs a failing test case before being accepted - * Pull requests must be sent from a new hotfix/feature branch, not from `master`. - -## Installation - -To install the project and run the tests, you need to clone it first: - -```sh -$ git clone git://github.com/doctrine/instantiator.git -``` - -You will then need to run a composer installation: - -```sh -$ cd Instantiator -$ curl -s https://getcomposer.org/installer | php -$ php composer.phar update -``` - -## Testing - -The PHPUnit version to be used is the one installed as a dev- dependency via composer: - -```sh -$ ./vendor/bin/phpunit -``` - -Accepted coverage for new contributions is 80%. Any contribution not satisfying this requirement -won't be merged. - diff --git a/server/vendor/doctrine/instantiator/LICENSE b/server/vendor/doctrine/instantiator/LICENSE deleted file mode 100644 index 4d983d1a..00000000 --- a/server/vendor/doctrine/instantiator/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2014 Doctrine Project - -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/server/vendor/doctrine/instantiator/README.md b/server/vendor/doctrine/instantiator/README.md deleted file mode 100644 index 393ec7ca..00000000 --- a/server/vendor/doctrine/instantiator/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Instantiator - -This library provides a way of avoiding usage of constructors when instantiating PHP classes. - -[![Build Status](https://travis-ci.org/doctrine/instantiator.svg?branch=master)](https://travis-ci.org/doctrine/instantiator) -[![Code Coverage](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/doctrine/instantiator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/doctrine/instantiator/?branch=master) -[![Dependency Status](https://www.versioneye.com/package/php--doctrine--instantiator/badge.svg)](https://www.versioneye.com/package/php--doctrine--instantiator) -[![HHVM Status](http://hhvm.h4cc.de/badge/doctrine/instantiator.png)](http://hhvm.h4cc.de/package/doctrine/instantiator) - -[![Latest Stable Version](https://poser.pugx.org/doctrine/instantiator/v/stable.png)](https://packagist.org/packages/doctrine/instantiator) -[![Latest Unstable Version](https://poser.pugx.org/doctrine/instantiator/v/unstable.png)](https://packagist.org/packages/doctrine/instantiator) - -## Installation - -The suggested installation method is via [composer](https://getcomposer.org/): - -```sh -php composer.phar require "doctrine/instantiator:~1.0.3" -``` - -## Usage - -The instantiator is able to create new instances of any class without using the constructor or any API of the class -itself: - -```php -$instantiator = new \Doctrine\Instantiator\Instantiator(); - -$instance = $instantiator->instantiate('My\\ClassName\\Here'); -``` - -## Contributing - -Please read the [CONTRIBUTING.md](CONTRIBUTING.md) contents if you wish to help out! - -## Credits - -This library was migrated from [ocramius/instantiator](https://github.com/Ocramius/Instantiator), which -has been donated to the doctrine organization, and which is now deprecated in favour of this package. diff --git a/server/vendor/doctrine/instantiator/composer.json b/server/vendor/doctrine/instantiator/composer.json deleted file mode 100644 index 4823890b..00000000 --- a/server/vendor/doctrine/instantiator/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "doctrine/instantiator", - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "type": "library", - "license": "MIT", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "instantiate", - "constructor" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "ext-phar": "*", - "ext-pdo": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0", - "athletic/athletic": "~0.1.8" - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "autoload-dev": { - "psr-0": { - "DoctrineTest\\InstantiatorPerformance\\": "tests", - "DoctrineTest\\InstantiatorTest\\": "tests", - "DoctrineTest\\InstantiatorTestAsset\\": "tests" - } - }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - } -} diff --git a/server/vendor/doctrine/instantiator/phpmd.xml.dist b/server/vendor/doctrine/instantiator/phpmd.xml.dist deleted file mode 100644 index 82541056..00000000 --- a/server/vendor/doctrine/instantiator/phpmd.xml.dist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/server/vendor/doctrine/instantiator/phpunit.xml.dist b/server/vendor/doctrine/instantiator/phpunit.xml.dist deleted file mode 100644 index 0a8d5709..00000000 --- a/server/vendor/doctrine/instantiator/phpunit.xml.dist +++ /dev/null @@ -1,22 +0,0 @@ - - - - ./tests/DoctrineTest/InstantiatorTest - - - - ./src - - - diff --git a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php b/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php deleted file mode 100644 index 3065375a..00000000 --- a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator\Exception; - -/** - * Base exception marker interface for the instantiator component - * - * @author Marco Pivetta - */ -interface ExceptionInterface -{ -} diff --git a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php b/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php deleted file mode 100644 index ea8d28c5..00000000 --- a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator\Exception; - -use InvalidArgumentException as BaseInvalidArgumentException; -use ReflectionClass; - -/** - * Exception for invalid arguments provided to the instantiator - * - * @author Marco Pivetta - */ -class InvalidArgumentException extends BaseInvalidArgumentException implements ExceptionInterface -{ - /** - * @param string $className - * - * @return self - */ - public static function fromNonExistingClass($className) - { - if (interface_exists($className)) { - return new self(sprintf('The provided type "%s" is an interface, and can not be instantiated', $className)); - } - - if (PHP_VERSION_ID >= 50400 && trait_exists($className)) { - return new self(sprintf('The provided type "%s" is a trait, and can not be instantiated', $className)); - } - - return new self(sprintf('The provided class "%s" does not exist', $className)); - } - - /** - * @param ReflectionClass $reflectionClass - * - * @return self - */ - public static function fromAbstractClass(ReflectionClass $reflectionClass) - { - return new self(sprintf( - 'The provided class "%s" is abstract, and can not be instantiated', - $reflectionClass->getName() - )); - } -} diff --git a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php b/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php deleted file mode 100644 index 1681e56e..00000000 --- a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php +++ /dev/null @@ -1,79 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator\Exception; - -use Exception; -use ReflectionClass; -use UnexpectedValueException as BaseUnexpectedValueException; - -/** - * Exception for given parameters causing invalid/unexpected state on instantiation - * - * @author Marco Pivetta - */ -class UnexpectedValueException extends BaseUnexpectedValueException implements ExceptionInterface -{ - /** - * @param ReflectionClass $reflectionClass - * @param Exception $exception - * - * @return self - */ - public static function fromSerializationTriggeredException(ReflectionClass $reflectionClass, Exception $exception) - { - return new self( - sprintf( - 'An exception was raised while trying to instantiate an instance of "%s" via un-serialization', - $reflectionClass->getName() - ), - 0, - $exception - ); - } - - /** - * @param ReflectionClass $reflectionClass - * @param string $errorString - * @param int $errorCode - * @param string $errorFile - * @param int $errorLine - * - * @return UnexpectedValueException - */ - public static function fromUncleanUnSerialization( - ReflectionClass $reflectionClass, - $errorString, - $errorCode, - $errorFile, - $errorLine - ) { - return new self( - sprintf( - 'Could not produce an instance of "%s" via un-serialization, since an error was triggered ' - . 'in file "%s" at line "%d"', - $reflectionClass->getName(), - $errorFile, - $errorLine - ), - 0, - new Exception($errorString, $errorCode) - ); - } -} diff --git a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php b/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php deleted file mode 100644 index 6d5b3b65..00000000 --- a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php +++ /dev/null @@ -1,273 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator; - -use Closure; -use Doctrine\Instantiator\Exception\InvalidArgumentException; -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Exception; -use ReflectionClass; - -/** - * {@inheritDoc} - * - * @author Marco Pivetta - */ -final class Instantiator implements InstantiatorInterface -{ - /** - * Markers used internally by PHP to define whether {@see \unserialize} should invoke - * the method {@see \Serializable::unserialize()} when dealing with classes implementing - * the {@see \Serializable} interface. - */ - const SERIALIZATION_FORMAT_USE_UNSERIALIZER = 'C'; - const SERIALIZATION_FORMAT_AVOID_UNSERIALIZER = 'O'; - - /** - * @var \Closure[] of {@see \Closure} instances used to instantiate specific classes - */ - private static $cachedInstantiators = array(); - - /** - * @var object[] of objects that can directly be cloned - */ - private static $cachedCloneables = array(); - - /** - * {@inheritDoc} - */ - public function instantiate($className) - { - if (isset(self::$cachedCloneables[$className])) { - return clone self::$cachedCloneables[$className]; - } - - if (isset(self::$cachedInstantiators[$className])) { - $factory = self::$cachedInstantiators[$className]; - - return $factory(); - } - - return $this->buildAndCacheFromFactory($className); - } - - /** - * Builds the requested object and caches it in static properties for performance - * - * @param string $className - * - * @return object - */ - private function buildAndCacheFromFactory($className) - { - $factory = self::$cachedInstantiators[$className] = $this->buildFactory($className); - $instance = $factory(); - - if ($this->isSafeToClone(new ReflectionClass($instance))) { - self::$cachedCloneables[$className] = clone $instance; - } - - return $instance; - } - - /** - * Builds a {@see \Closure} capable of instantiating the given $className without - * invoking its constructor. - * - * @param string $className - * - * @return Closure - */ - private function buildFactory($className) - { - $reflectionClass = $this->getReflectionClass($className); - - if ($this->isInstantiableViaReflection($reflectionClass)) { - return function () use ($reflectionClass) { - return $reflectionClass->newInstanceWithoutConstructor(); - }; - } - - $serializedString = sprintf( - '%s:%d:"%s":0:{}', - $this->getSerializationFormat($reflectionClass), - strlen($className), - $className - ); - - $this->checkIfUnSerializationIsSupported($reflectionClass, $serializedString); - - return function () use ($serializedString) { - return unserialize($serializedString); - }; - } - - /** - * @param string $className - * - * @return ReflectionClass - * - * @throws InvalidArgumentException - */ - private function getReflectionClass($className) - { - if (! class_exists($className)) { - throw InvalidArgumentException::fromNonExistingClass($className); - } - - $reflection = new ReflectionClass($className); - - if ($reflection->isAbstract()) { - throw InvalidArgumentException::fromAbstractClass($reflection); - } - - return $reflection; - } - - /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString - * - * @throws UnexpectedValueException - * - * @return void - */ - private function checkIfUnSerializationIsSupported(ReflectionClass $reflectionClass, $serializedString) - { - set_error_handler(function ($code, $message, $file, $line) use ($reflectionClass, & $error) { - $error = UnexpectedValueException::fromUncleanUnSerialization( - $reflectionClass, - $message, - $code, - $file, - $line - ); - }); - - $this->attemptInstantiationViaUnSerialization($reflectionClass, $serializedString); - - restore_error_handler(); - - if ($error) { - throw $error; - } - } - - /** - * @param ReflectionClass $reflectionClass - * @param string $serializedString - * - * @throws UnexpectedValueException - * - * @return void - */ - private function attemptInstantiationViaUnSerialization(ReflectionClass $reflectionClass, $serializedString) - { - try { - unserialize($serializedString); - } catch (Exception $exception) { - restore_error_handler(); - - throw UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $exception); - } - } - - /** - * @param ReflectionClass $reflectionClass - * - * @return bool - */ - private function isInstantiableViaReflection(ReflectionClass $reflectionClass) - { - if (\PHP_VERSION_ID >= 50600) { - return ! ($this->hasInternalAncestors($reflectionClass) && $reflectionClass->isFinal()); - } - - return \PHP_VERSION_ID >= 50400 && ! $this->hasInternalAncestors($reflectionClass); - } - - /** - * Verifies whether the given class is to be considered internal - * - * @param ReflectionClass $reflectionClass - * - * @return bool - */ - private function hasInternalAncestors(ReflectionClass $reflectionClass) - { - do { - if ($reflectionClass->isInternal()) { - return true; - } - } while ($reflectionClass = $reflectionClass->getParentClass()); - - return false; - } - - /** - * Verifies if the given PHP version implements the `Serializable` interface serialization - * with an incompatible serialization format. If that's the case, use serialization marker - * "C" instead of "O". - * - * @link http://news.php.net/php.internals/74654 - * - * @param ReflectionClass $reflectionClass - * - * @return string the serialization format marker, either self::SERIALIZATION_FORMAT_USE_UNSERIALIZER - * or self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER - */ - private function getSerializationFormat(ReflectionClass $reflectionClass) - { - if ($this->isPhpVersionWithBrokenSerializationFormat() - && $reflectionClass->implementsInterface('Serializable') - ) { - return self::SERIALIZATION_FORMAT_USE_UNSERIALIZER; - } - - return self::SERIALIZATION_FORMAT_AVOID_UNSERIALIZER; - } - - /** - * Checks whether the current PHP runtime uses an incompatible serialization format - * - * @return bool - */ - private function isPhpVersionWithBrokenSerializationFormat() - { - return PHP_VERSION_ID === 50429 || PHP_VERSION_ID === 50513; - } - - /** - * Checks if a class is cloneable - * - * @param ReflectionClass $reflection - * - * @return bool - */ - private function isSafeToClone(ReflectionClass $reflection) - { - if (method_exists($reflection, 'isCloneable') && ! $reflection->isCloneable()) { - return false; - } - - // not cloneable if it implements `__clone`, as we want to avoid calling it - return ! $reflection->hasMethod('__clone'); - } -} diff --git a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php b/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php deleted file mode 100644 index b665bea8..00000000 --- a/server/vendor/doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -namespace Doctrine\Instantiator; - -/** - * Instantiator provides utility methods to build objects without invoking their constructors - * - * @author Marco Pivetta - */ -interface InstantiatorInterface -{ - /** - * @param string $className - * - * @return object - * - * @throws \Doctrine\Instantiator\Exception\ExceptionInterface - */ - public function instantiate($className); -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php deleted file mode 100644 index 3e8fc6ff..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php +++ /dev/null @@ -1,96 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorPerformance; - -use Athletic\AthleticEvent; -use Doctrine\Instantiator\Instantiator; - -/** - * Performance tests for {@see \Doctrine\Instantiator\Instantiator} - * - * @author Marco Pivetta - */ -class InstantiatorPerformanceEvent extends AthleticEvent -{ - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * {@inheritDoc} - */ - protected function setUp() - { - $this->instantiator = new Instantiator(); - - $this->instantiator->instantiate(__CLASS__); - $this->instantiator->instantiate('ArrayObject'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); - } - - /** - * @iterations 20000 - * @baseline - * @group instantiation - */ - public function testInstantiateSelf() - { - $this->instantiator->instantiate(__CLASS__); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateInternalClass() - { - $this->instantiator->instantiate('ArrayObject'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateSimpleSerializableAssetClass() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateSerializableArrayObjectAsset() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'); - } - - /** - * @iterations 20000 - * @group instantiation - */ - public function testInstantiateUnCloneableAsset() - { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php deleted file mode 100644 index 39d9b94d..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php +++ /dev/null @@ -1,83 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest\Exception; - -use Doctrine\Instantiator\Exception\InvalidArgumentException; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Exception\InvalidArgumentException} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Exception\InvalidArgumentException - */ -class InvalidArgumentExceptionTest extends PHPUnit_Framework_TestCase -{ - public function testFromNonExistingTypeWithNonExistingClass() - { - $className = __CLASS__ . uniqid(); - $exception = InvalidArgumentException::fromNonExistingClass($className); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\InvalidArgumentException', $exception); - $this->assertSame('The provided class "' . $className . '" does not exist', $exception->getMessage()); - } - - public function testFromNonExistingTypeWithTrait() - { - if (PHP_VERSION_ID < 50400) { - $this->markTestSkipped('Need at least PHP 5.4.0, as this test requires traits support to run'); - } - - $exception = InvalidArgumentException::fromNonExistingClass( - 'DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset' - ); - - $this->assertSame( - 'The provided type "DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset" is a trait, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } - - public function testFromNonExistingTypeWithInterface() - { - $exception = InvalidArgumentException::fromNonExistingClass('Doctrine\\Instantiator\\InstantiatorInterface'); - - $this->assertSame( - 'The provided type "Doctrine\\Instantiator\\InstantiatorInterface" is an interface, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } - - public function testFromAbstractClass() - { - $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); - $exception = InvalidArgumentException::fromAbstractClass($reflection); - - $this->assertSame( - 'The provided class "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" is abstract, ' - . 'and can not be instantiated', - $exception->getMessage() - ); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php deleted file mode 100644 index 84154e73..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php +++ /dev/null @@ -1,69 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest\Exception; - -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Exception; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Exception\UnexpectedValueException} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Exception\UnexpectedValueException - */ -class UnexpectedValueExceptionTest extends PHPUnit_Framework_TestCase -{ - public function testFromSerializationTriggeredException() - { - $reflectionClass = new ReflectionClass($this); - $previous = new Exception(); - $exception = UnexpectedValueException::fromSerializationTriggeredException($reflectionClass, $previous); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); - $this->assertSame($previous, $exception->getPrevious()); - $this->assertSame( - 'An exception was raised while trying to instantiate an instance of "' - . __CLASS__ . '" via un-serialization', - $exception->getMessage() - ); - } - - public function testFromUncleanUnSerialization() - { - $reflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'); - $exception = UnexpectedValueException::fromUncleanUnSerialization($reflection, 'foo', 123, 'bar', 456); - - $this->assertInstanceOf('Doctrine\\Instantiator\\Exception\\UnexpectedValueException', $exception); - $this->assertSame( - 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset" ' - . 'via un-serialization, since an error was triggered in file "bar" at line "456"', - $exception->getMessage() - ); - - $previous = $exception->getPrevious(); - - $this->assertInstanceOf('Exception', $previous); - $this->assertSame('foo', $previous->getMessage()); - $this->assertSame(123, $previous->getCode()); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php deleted file mode 100644 index 0a2cb931..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php +++ /dev/null @@ -1,219 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTest; - -use Doctrine\Instantiator\Exception\UnexpectedValueException; -use Doctrine\Instantiator\Instantiator; -use PHPUnit_Framework_TestCase; -use ReflectionClass; - -/** - * Tests for {@see \Doctrine\Instantiator\Instantiator} - * - * @author Marco Pivetta - * - * @covers \Doctrine\Instantiator\Instantiator - */ -class InstantiatorTest extends PHPUnit_Framework_TestCase -{ - /** - * @var Instantiator - */ - private $instantiator; - - /** - * {@inheritDoc} - */ - protected function setUp() - { - $this->instantiator = new Instantiator(); - } - - /** - * @param string $className - * - * @dataProvider getInstantiableClasses - */ - public function testCanInstantiate($className) - { - $this->assertInstanceOf($className, $this->instantiator->instantiate($className)); - } - - /** - * @param string $className - * - * @dataProvider getInstantiableClasses - */ - public function testInstantiatesSeparateInstances($className) - { - $instance1 = $this->instantiator->instantiate($className); - $instance2 = $this->instantiator->instantiate($className); - - $this->assertEquals($instance1, $instance2); - $this->assertNotSame($instance1, $instance2); - } - - public function testExceptionOnUnSerializationException() - { - if (defined('HHVM_VERSION')) { - $this->markTestSkipped( - 'As of facebook/hhvm#3432, HHVM has no PDORow, and therefore ' - . ' no internal final classes that cannot be instantiated' - ); - } - - $className = 'DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'; - - if (\PHP_VERSION_ID >= 50600) { - $className = 'PDORow'; - } - - if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { - $className = 'DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'; - } - - $this->setExpectedException('Doctrine\\Instantiator\\Exception\\UnexpectedValueException'); - - $this->instantiator->instantiate($className); - } - - public function testNoticeOnUnSerializationException() - { - if (\PHP_VERSION_ID >= 50600) { - $this->markTestSkipped( - 'PHP 5.6 supports `ReflectionClass#newInstanceWithoutConstructor()` for some internal classes' - ); - } - - try { - $this->instantiator->instantiate('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - - $this->fail('No exception was raised'); - } catch (UnexpectedValueException $exception) { - $wakeUpNoticesReflection = new ReflectionClass('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - $previous = $exception->getPrevious(); - - $this->assertInstanceOf('Exception', $previous); - - // in PHP 5.4.29 and PHP 5.5.13, this case is not a notice, but an exception being thrown - if (! (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513)) { - $this->assertSame( - 'Could not produce an instance of "DoctrineTest\\InstantiatorTestAsset\WakeUpNoticesAsset" ' - . 'via un-serialization, since an error was triggered in file "' - . $wakeUpNoticesReflection->getFileName() . '" at line "36"', - $exception->getMessage() - ); - - $this->assertSame('Something went bananas while un-serializing this instance', $previous->getMessage()); - $this->assertSame(\E_USER_NOTICE, $previous->getCode()); - } - } - } - - /** - * @param string $invalidClassName - * - * @dataProvider getInvalidClassNames - */ - public function testInstantiationFromNonExistingClass($invalidClassName) - { - $this->setExpectedException('Doctrine\\Instantiator\\Exception\\InvalidArgumentException'); - - $this->instantiator->instantiate($invalidClassName); - } - - public function testInstancesAreNotCloned() - { - $className = 'TemporaryClass' . uniqid(); - - eval('namespace ' . __NAMESPACE__ . '; class ' . $className . '{}'); - - $instance = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); - - $instance->foo = 'bar'; - - $instance2 = $this->instantiator->instantiate(__NAMESPACE__ . '\\' . $className); - - $this->assertObjectNotHasAttribute('foo', $instance2); - } - - /** - * Provides a list of instantiable classes (existing) - * - * @return string[][] - */ - public function getInstantiableClasses() - { - $classes = array( - array('stdClass'), - array(__CLASS__), - array('Doctrine\\Instantiator\\Instantiator'), - array('Exception'), - array('PharException'), - array('DoctrineTest\\InstantiatorTestAsset\\SimpleSerializableAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\ExceptionAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\FinalExceptionAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\PharExceptionAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\UnCloneableAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\XMLReaderAsset'), - ); - - if (\PHP_VERSION_ID === 50429 || \PHP_VERSION_ID === 50513) { - return $classes; - } - - $classes = array_merge( - $classes, - array( - array('PharException'), - array('ArrayObject'), - array('DoctrineTest\\InstantiatorTestAsset\\ArrayObjectAsset'), - array('DoctrineTest\\InstantiatorTestAsset\\SerializableArrayObjectAsset'), - ) - ); - - if (\PHP_VERSION_ID >= 50600) { - $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\WakeUpNoticesAsset'); - $classes[] = array('DoctrineTest\\InstantiatorTestAsset\\UnserializeExceptionArrayObjectAsset'); - } - - return $classes; - } - - /** - * Provides a list of instantiable classes (existing) - * - * @return string[][] - */ - public function getInvalidClassNames() - { - $classNames = array( - array(__CLASS__ . uniqid()), - array('Doctrine\\Instantiator\\InstantiatorInterface'), - array('DoctrineTest\\InstantiatorTestAsset\\AbstractClassAsset'), - ); - - if (\PHP_VERSION_ID >= 50400) { - $classNames[] = array('DoctrineTest\\InstantiatorTestAsset\\SimpleTraitAsset'); - } - - return $classNames; - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php deleted file mode 100644 index fbe28ddd..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -abstract class AbstractClassAsset -{ -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php deleted file mode 100644 index 56146d70..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; - -/** - * Test asset that extends an internal PHP class - * - * @author Marco Pivetta - */ -class ArrayObjectAsset extends ArrayObject -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php deleted file mode 100644 index 43bbe46b..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Exception; - -/** - * Test asset that extends an internal PHP base exception - * - * @author Marco Pivetta - */ -class ExceptionAsset extends Exception -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php deleted file mode 100644 index 7d268f5b..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Exception; - -/** - * Test asset that extends an internal PHP base exception - * - * @author Marco Pivetta - */ -final class FinalExceptionAsset extends Exception -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php deleted file mode 100644 index 553fd561..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Phar; - -/** - * Test asset that extends an internal PHP class - * - * @author Marco Pivetta - */ -class PharAsset extends Phar -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php deleted file mode 100644 index 42bf73e7..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php +++ /dev/null @@ -1,44 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use PharException; - -/** - * Test asset that extends an internal PHP class - * This class should be serializable without problems - * and without getting the "Erroneous data format for unserializing" - * error - * - * @author Marco Pivetta - */ -class PharExceptionAsset extends PharException -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php deleted file mode 100644 index ba19aaf6..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; -use Serializable; - -/** - * Serializable test asset that also extends an internal class - * - * @author Marco Pivetta - */ -class SerializableArrayObjectAsset extends ArrayObject implements Serializable -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * {@inheritDoc} - */ - public function serialize() - { - return ''; - } - - /** - * {@inheritDoc} - * - * Should not be called - * - * @throws BadMethodCallException - */ - public function unserialize($serialized) - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php deleted file mode 100644 index 39f84a6c..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php +++ /dev/null @@ -1,61 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use Serializable; - -/** - * Base serializable test asset - * - * @author Marco Pivetta - */ -class SimpleSerializableAsset implements Serializable -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * {@inheritDoc} - */ - public function serialize() - { - return ''; - } - - /** - * {@inheritDoc} - * - * Should not be called - * - * @throws BadMethodCallException - */ - public function unserialize($serialized) - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php deleted file mode 100644 index 04e78069..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php +++ /dev/null @@ -1,29 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -/** - * A simple trait with no attached logic - * - * @author Marco Pivetta - */ -trait SimpleTraitAsset -{ -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php deleted file mode 100644 index 7d03bdab..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php +++ /dev/null @@ -1,50 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; - -/** - * Base un-cloneable asset - * - * @author Marco Pivetta - */ -class UnCloneableAsset -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } - - /** - * Magic `__clone` - should not be invoked - * - * @throws BadMethodCallException - */ - public function __clone() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php deleted file mode 100644 index b348a405..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php +++ /dev/null @@ -1,39 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; -use BadMethodCallException; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -class UnserializeExceptionArrayObjectAsset extends ArrayObject -{ - /** - * {@inheritDoc} - */ - public function __wakeup() - { - throw new BadMethodCallException(); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php deleted file mode 100644 index 18dc6711..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php +++ /dev/null @@ -1,38 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use ArrayObject; - -/** - * A simple asset for an abstract class - * - * @author Marco Pivetta - */ -class WakeUpNoticesAsset extends ArrayObject -{ - /** - * Wakeup method called after un-serialization - */ - public function __wakeup() - { - trigger_error('Something went bananas while un-serializing this instance'); - } -} diff --git a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php b/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php deleted file mode 100644 index 39ee6992..00000000 --- a/server/vendor/doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php +++ /dev/null @@ -1,41 +0,0 @@ -. - */ - -namespace DoctrineTest\InstantiatorTestAsset; - -use BadMethodCallException; -use XMLReader; - -/** - * Test asset that extends an internal PHP class - * - * @author Dave Marshall - */ -class XMLReaderAsset extends XMLReader -{ - /** - * Constructor - should not be called - * - * @throws BadMethodCallException - */ - public function __construct() - { - throw new BadMethodCallException('Not supposed to be called!'); - } -} diff --git a/server/vendor/gabordemooij/redbean/.gitignore b/server/vendor/gabordemooij/redbean/.gitignore deleted file mode 100644 index 4294ebe3..00000000 --- a/server/vendor/gabordemooij/redbean/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# Compiled source # -################### -*.com -*.class -*.dll -*.exe -*.o -*.so -*.pyc - -# Logs and databases # -###################### -*.log - -# OS generated files # -###################### -.DS_Store* -ehthumbs.db -Icon? -Thumbs.db -/.project -/.settings/org.eclipse.php.core.prefs -/.settings/org.eclipse.php.debug.core.Debug_Process_Preferences.prefs -/rb.phar -/rb.php -build/ diff --git a/server/vendor/gabordemooij/redbean/.travis.yml b/server/vendor/gabordemooij/redbean/.travis.yml deleted file mode 100644 index 8cb349d3..00000000 --- a/server/vendor/gabordemooij/redbean/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: php -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm - -before_script: - - touch /tmp/oodb.db - - mysql -e 'create database oodb;' - - psql template1 -c 'CREATE EXTENSION "uuid-ossp";' -U postgres - - psql -c 'create database oodb;' -U postgres - - php replica2.php onlyphp - - cp rb.php testing/cli/testcontainer/rb.php - - cd testing/cli - - -script: php runtests.php diff --git a/server/vendor/gabordemooij/redbean/README.markdown b/server/vendor/gabordemooij/redbean/README.markdown deleted file mode 100755 index df47f4d9..00000000 --- a/server/vendor/gabordemooij/redbean/README.markdown +++ /dev/null @@ -1,48 +0,0 @@ -RedBeanPHP 4 -============ - -![Build Status](https://travis-ci.org/gabordemooij/redbean.svg?branch=master) - -RedBeanPHP is an easy to use ORM tool for PHP. - -* Automatically creates tables and columns as you go -* No configuration, just fire and forget -* No complicated package tools, no autoloaders, just ONE file - -Installation via Composer -------------------------- - -Just open your composer.json file and add the package name ```(e.g. "gabordemooij/redbean": "dev-master")``` in your require list. - -```json -{ - "require": { - "gabordemooij/redbean": "dev-master" - } -} -``` - -If you not using composer then [try it.](http://redbeanphp.com/install) - - -Quick Example -------------- - -How we store a book object with RedBeanPHP: -```php -$book = R::dispense("book"); -$book->author = "Santa Claus"; -$book->title = "Secrets of Christmas"; -$id = R::store( $book ); -``` - -Yep, it's that simple. - - -More information ----------------- - -For more information about RedBeanPHP please consult -the RedBeanPHP website: - -http://www.redbeanphp.com/ diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Adapter.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Adapter.php deleted file mode 100755 index fbef8f1c..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Adapter.php +++ /dev/null @@ -1,189 +0,0 @@ -db = $database; - } - - /** - * @see Adapter::getSQL - */ - public function getSQL() - { - return $this->sql; - } - - /** - * @see Adapter::exec - */ - public function exec( $sql, $bindings = array(), $noevent = FALSE ) - { - if ( !$noevent ) { - $this->sql = $sql; - $this->signal( 'sql_exec', $this ); - } - - return $this->db->Execute( $sql, $bindings ); - } - - /** - * @see Adapter::get - */ - public function get( $sql, $bindings = array() ) - { - $this->sql = $sql; - $this->signal( 'sql_exec', $this ); - - return $this->db->GetAll( $sql, $bindings ); - } - - /** - * @see Adapter::getRow - */ - public function getRow( $sql, $bindings = array() ) - { - $this->sql = $sql; - $this->signal( 'sql_exec', $this ); - - return $this->db->GetRow( $sql, $bindings ); - } - - /** - * @see Adapter::getCol - */ - public function getCol( $sql, $bindings = array() ) - { - $this->sql = $sql; - $this->signal( 'sql_exec', $this ); - - return $this->db->GetCol( $sql, $bindings ); - } - - /** - * @see Adapter::getAssoc - */ - public function getAssoc( $sql, $bindings = array() ) - { - $this->sql = $sql; - - $this->signal( 'sql_exec', $this ); - - $rows = $this->db->GetAll( $sql, $bindings ); - - $assoc = array(); - if ( !$rows ) { - return $assoc; - } - - foreach ( $rows as $row ) { - if ( empty( $row ) ) continue; - - if ( count( $row ) > 2 ) { - $key = array_shift( $row ); - $value = $row; - } elseif ( count( $row ) > 1 ) { - $key = array_shift( $row ); - $value = array_shift( $row ); - } else { - $key = array_shift( $row ); - $value = $key; - } - - $assoc[$key] = $value; - } - - return $assoc; - } - - /** - * @see Adapter::getAssocRow - */ - public function getAssocRow($sql, $bindings = array()) - { - $this->sql = $sql; - $this->signal( 'sql_exec', $this ); - - return $this->db->GetAssocRow( $sql, $bindings ); - } - - /** - * @see Adapter::getCell - */ - public function getCell( $sql, $bindings = array(), $noSignal = NULL ) - { - $this->sql = $sql; - - if ( !$noSignal ) $this->signal( 'sql_exec', $this ); - - return $this->db->GetOne( $sql, $bindings ); - } - - /** - * @see Adapter::getCursor - */ - public function getCursor( $sql, $bindings = array() ) - { - return $this->db->GetCursor( $sql, $bindings ); - } - - /** - * @see Adapter::getInsertID - */ - public function getInsertID() - { - return $this->db->getInsertID(); - } - - /** - * @see Adapter::getAffectedRows - */ - public function getAffectedRows() - { - return $this->db->Affected_Rows(); - } - - /** - * @see Adapter::getDatabase - */ - public function getDatabase() - { - return $this->db; - } - - /** - * @see Adapter::startTransaction - */ - public function startTransaction() - { - $this->db->StartTrans(); - } - - /** - * @see Adapter::commit - */ - public function commit() - { - $this->db->CommitTrans(); - } - - /** - * @see Adapter::rollback - */ - public function rollback() - { - $this->db->FailTrans(); - } - - /** - * @see Adapter::close. - */ - public function close() - { - $this->db->close(); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/AssociationManager.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/AssociationManager.php deleted file mode 100644 index 87c0606c..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/AssociationManager.php +++ /dev/null @@ -1,341 +0,0 @@ -oodb->isFrozen() || !$this->writer->sqlStateIn( $exception->getSQLState(), - array( - QueryWriter::C_SQLSTATE_NO_SUCH_TABLE, - QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN ) - ) - ) { - throw $exception; - } - } - - /** - * Internal method. - * Returns the many-to-many related rows of table $type for bean $bean using additional SQL in $sql and - * $bindings bindings. If $getLinks is TRUE, link rows are returned instead. - * - * @param OODBBean $bean reference bean instance - * @param string $type target bean type - * @param string $sql additional SQL snippet - * @param array $bindings bindings for query - * - * @return array - */ - private function relatedRows( $bean, $type, $sql = '', $bindings = array() ) - { - $ids = array( $bean->id ); - $sourceType = $bean->getMeta( 'type' ); - try { - return $this->writer->queryRecordRelated( $sourceType, $type, $ids, $sql, $bindings ); - } catch ( SQLException $exception ) { - $this->handleException( $exception ); - return array(); - } - } - - /** - * Associates a pair of beans. This method associates two beans, no matter - * what types. Accepts a base bean that contains data for the linking record. - * This method is used by associate. This method also accepts a base bean to be used - * as the template for the link record in the database. - * - * @param OODBBean $bean1 first bean - * @param OODBBean $bean2 second bean - * @param OODBBean $bean base bean (association record) - * - * @return mixed - */ - protected function associateBeans( OODBBean $bean1, OODBBean $bean2, OODBBean $bean ) - { - $type = $bean->getMeta( 'type' ); - $property1 = $bean1->getMeta( 'type' ) . '_id'; - $property2 = $bean2->getMeta( 'type' ) . '_id'; - - if ( $property1 == $property2 ) { - $property2 = $bean2->getMeta( 'type' ) . '2_id'; - } - - $this->oodb->store( $bean1 ); - $this->oodb->store( $bean2 ); - - $bean->setMeta( "cast.$property1", "id" ); - $bean->setMeta( "cast.$property2", "id" ); - $bean->setMeta( 'sys.buildcommand.unique', array( $property1, $property2 ) ); - - $bean->$property1 = $bean1->id; - $bean->$property2 = $bean2->id; - - $results = array(); - - try { - $id = $this->oodb->store( $bean ); - $results[] = $id; - } catch ( SQLException $exception ) { - if ( !$this->writer->sqlStateIn( $exception->getSQLState(), - array( QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION ) ) - ) { - throw $exception; - } - } - - return $results; - } - - /** - * Constructor - * - * @param ToolBox $tools toolbox - */ - public function __construct( ToolBox $tools ) - { - $this->oodb = $tools->getRedBean(); - $this->adapter = $tools->getDatabaseAdapter(); - $this->writer = $tools->getWriter(); - $this->toolbox = $tools; - } - - /** - * Creates a table name based on a types array. - * Manages the get the correct name for the linking table for the - * types provided. - * - * @todo find a nice way to decouple this class from QueryWriter? - * - * @param array $types 2 types as strings - * - * @return string - */ - public function getTable( $types ) - { - return $this->writer->getAssocTable( $types ); - } - - /** - * Associates two beans in a many-to-many relation. - * This method will associate two beans and store the connection between the - * two in a link table. Instead of two single beans this method also accepts - * two sets of beans. Returns the ID or the IDs of the linking beans. - * - * @param OODBBean|array $beans1 one or more beans to form the association - * @param OODBBean|array $beans2 one or more beans to form the association - * - * @return array - */ - public function associate( $beans1, $beans2 ) - { - if ( !is_array( $beans1 ) ) { - $beans1 = array( $beans1 ); - } - - if ( !is_array( $beans2 ) ) { - $beans2 = array( $beans2 ); - } - - $results = array(); - foreach ( $beans1 as $bean1 ) { - foreach ( $beans2 as $bean2 ) { - $table = $this->getTable( array( $bean1->getMeta( 'type' ), $bean2->getMeta( 'type' ) ) ); - $bean = $this->oodb->dispense( $table ); - $results[] = $this->associateBeans( $bean1, $bean2, $bean ); - } - } - - return ( count( $results ) > 1 ) ? $results : reset( $results ); - } - - /** - * Counts the number of related beans in an N-M relation. - * This method returns the number of beans of type $type associated - * with reference bean(s) $bean. The query can be tuned using an - * SQL snippet for additional filtering. - * - * @param OODBBean|array $bean a bean object or an array of beans - * @param string $type type of bean you're interested in - * @param string $sql SQL snippet (optional) - * @param array $bindings bindings for your SQL string - * - * @return integer - */ - public function relatedCount( $bean, $type, $sql = NULL, $bindings = array() ) - { - if ( !( $bean instanceof OODBBean ) ) { - throw new RedException( - 'Expected array or OODBBean but got:' . gettype( $bean ) - ); - } - - if ( !$bean->id ) { - return 0; - } - - $beanType = $bean->getMeta( 'type' ); - - try { - return $this->writer->queryRecordCountRelated( $beanType, $type, $bean->id, $sql, $bindings ); - } catch ( SQLException $exception ) { - $this->handleException( $exception ); - - return 0; - } - } - - /** - * Breaks the association between two beans. This method unassociates two beans. If the - * method succeeds the beans will no longer form an association. In the database - * this means that the association record will be removed. This method uses the - * OODB trash() method to remove the association links, thus giving FUSE models the - * opportunity to hook-in additional business logic. If the $fast parameter is - * set to boolean TRUE this method will remove the beans without their consent, - * bypassing FUSE. This can be used to improve performance. - * - * @param OODBBean $bean1 first bean in target association - * @param OODBBean $bean2 second bean in target association - * @param boolean $fast if TRUE, removes the entries by query without FUSE - * - * @return void - */ - public function unassociate( $beans1, $beans2, $fast = NULL ) - { - $beans1 = ( !is_array( $beans1 ) ) ? array( $beans1 ) : $beans1; - $beans2 = ( !is_array( $beans2 ) ) ? array( $beans2 ) : $beans2; - - foreach ( $beans1 as $bean1 ) { - foreach ( $beans2 as $bean2 ) { - try { - $this->oodb->store( $bean1 ); - $this->oodb->store( $bean2 ); - - $type1 = $bean1->getMeta( 'type' ); - $type2 = $bean2->getMeta( 'type' ); - - $row = $this->writer->queryRecordLink( $type1, $type2, $bean1->id, $bean2->id ); - $linkType = $this->getTable( array( $type1, $type2 ) ); - - if ( $fast ) { - $this->writer->deleteRecord( $linkType, array( 'id' => $row['id'] ) ); - - return; - } - - $beans = $this->oodb->convertToBeans( $linkType, array( $row ) ); - - if ( count( $beans ) > 0 ) { - $bean = reset( $beans ); - $this->oodb->trash( $bean ); - } - } catch ( SQLException $exception ) { - $this->handleException( $exception ); - } - } - } - } - - /** - * Removes all relations for a bean. This method breaks every connection between - * a certain bean $bean and every other bean of type $type. Warning: this method - * is really fast because it uses a direct SQL query however it does not inform the - * models about this. If you want to notify FUSE models about deletion use a foreach-loop - * with unassociate() instead. (that might be slower though) - * - * @param OODBBean $bean reference bean - * @param string $type type of beans that need to be unassociated - * - * @return void - */ - public function clearRelations( OODBBean $bean, $type ) - { - $this->oodb->store( $bean ); - try { - $this->writer->deleteRelations( $bean->getMeta( 'type' ), $type, $bean->id ); - } catch ( SQLException $exception ) { - $this->handleException( $exception ); - } - } - - /** - * Returns all the beans associated with $bean. - * This method will return an array containing all the beans that have - * been associated once with the associate() function and are still - * associated with the bean specified. The type parameter indicates the - * type of beans you are looking for. You can also pass some extra SQL and - * values for that SQL to filter your results after fetching the - * related beans. - * - * Don't try to make use of subqueries, a subquery using IN() seems to - * be slower than two queries! - * - * Since 3.2, you can now also pass an array of beans instead just one - * bean as the first parameter. - * - * @param OODBBean|array $bean the bean you have - * @param string $type the type of beans you want - * @param string $sql SQL snippet for extra filtering - * @param array $bindings values to be inserted in SQL slots - * - * @return array - */ - public function related( $bean, $type, $sql = '', $bindings = array() ) - { - $sql = $this->writer->glueSQLCondition( $sql ); - $rows = $this->relatedRows( $bean, $type, $sql, $bindings ); - $links = array(); - - foreach ( $rows as $key => $row ) { - if ( !isset( $links[$row['id']] ) ) $links[$row['id']] = array(); - $links[$row['id']][] = $row['linked_by']; - unset( $rows[$key]['linked_by'] ); - } - - $beans = $this->oodb->convertToBeans( $type, $rows ); - foreach ( $beans as $bean ) $bean->setMeta( 'sys.belongs-to', $links[$bean->id] ); - - return $beans; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/BeanCollection.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/BeanCollection.php deleted file mode 100644 index 25ab5017..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/BeanCollection.php +++ /dev/null @@ -1,92 +0,0 @@ -type = $type; - $this->cursor = $cursor; - $this->repository = $repository; - } - - /** - * Returns the next bean in the collection. - * If called the first time, this will return the first bean in the collection. - * If there are no more beans left in the collection, this method - * will return NULL. - * - * @return OODBBean|NULL - */ - public function next() - { - $row = $this->cursor->getNextItem(); - if ( $row ) { - $beans = $this->repository->convertToBeans( $this->type, array( $row ) ); - $bean = array_shift( $beans ); - return $bean; - } - return NULL; - } - - /** - * Closes the underlying cursor (needed for some databases). - * - * @return void - */ - public function close() - { - $this->cursor->close(); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/BeanHelper.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/BeanHelper.php deleted file mode 100755 index 867bc978..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/BeanHelper.php +++ /dev/null @@ -1,54 +0,0 @@ -getMeta( 'type' ); - $prefix = defined( 'REDBEAN_MODEL_PREFIX' ) ? REDBEAN_MODEL_PREFIX : '\\Model_'; - - if ( strpos( $model, '_' ) !== FALSE ) { - $modelParts = explode( '_', $model ); - $modelName = ''; - foreach( $modelParts as $part ) { - $modelName .= ucfirst( $part ); - } - $modelName = $prefix . $modelName; - - if ( !class_exists( $modelName ) ) { - //second try - $modelName = $prefix . ucfirst( $model ); - - if ( !class_exists( $modelName ) ) { - return NULL; - } - } - - } else { - - $modelName = $prefix . ucfirst( $model ); - if ( !class_exists( $modelName ) ) { - return NULL; - } - } - $obj = self::factory( $modelName ); - $obj->loadBean( $bean ); - - return $obj; - } - - /** - * @see BeanHelper::getExtractedToolbox - */ - public function getExtractedToolbox() - { - return Facade::getExtractedToolbox(); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Cursor.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Cursor.php deleted file mode 100644 index 1569c70f..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Cursor.php +++ /dev/null @@ -1,36 +0,0 @@ -res = $res; - $this->fetchStyle = $fetchStyle; - } - - /** - * @see Cursor::getNextItem - */ - public function getNextItem() - { - return $this->res->fetch(); - } - - /** - * @see Cursor::close - */ - public function close() - { - $this->res->closeCursor(); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Driver.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Driver.php deleted file mode 100755 index befd7b1e..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Driver.php +++ /dev/null @@ -1,164 +0,0 @@ -123) will bind the integer 123 to the key :key in the - * SQL. This method has no return value. - * - * @param string $sql SQL query to execute - * @param array $bindings list of values to bind to SQL snippet - * - * @return array Affected Rows - */ - public function Execute( $sql, $bindings = array() ); - - /** - * Returns the latest insert ID if driver does support this - * feature. - * - * @return integer - */ - public function GetInsertID(); - - /** - * Returns the number of rows affected by the most recent query - * if the currently selected driver driver supports this feature. - * - * @return integer - */ - public function Affected_Rows(); - - /** - * Returns a cursor-like object from the database. - * - * @param string $sql SQL query to execute - * @param array $bindings list of values to bind to SQL snippet - * - * @return mixed - */ - public function GetCursor( $sql, $bindings = array() ); - - /** - * Toggles debug mode. In debug mode the driver will print all - * SQL to the screen together with some information about the - * results. All SQL code that passes through the driver will be - * passes on to the screen for inspection. - * This method has no return value. - * - * @param boolean $tf TRUE = debug mode ON - * @param Logger $customLogger - * - * @return void - */ - public function setDebugMode( $tf, $customLogger ); - - /** - * Starts a transaction. - * - * @return void - */ - public function CommitTrans(); - - /** - * Commits a transaction. - * - * @return void - */ - public function StartTrans(); - - /** - * Rolls back a transaction. - * - * @return void - */ - public function FailTrans(); - - /** - * Resets the internal Query Counter. - * - * @return self - */ - public function resetCounter(); - - /** - * Returns the number of SQL queries processed. - * - * @return integer - */ - public function getQueryCount(); -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Driver/RPDO.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Driver/RPDO.php deleted file mode 100755 index 10339865..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Driver/RPDO.php +++ /dev/null @@ -1,621 +0,0 @@ - &$value ) { - if ( is_integer( $key ) ) { - if ( is_null( $value ) ) { - $statement->bindValue( $key + 1, NULL, \PDO::PARAM_NULL ); - } elseif ( !$this->flagUseStringOnlyBinding && AQueryWriter::canBeTreatedAsInt( $value ) && abs( $value ) <= $this->max ) { - $statement->bindParam( $key + 1, $value, \PDO::PARAM_INT ); - } else { - $statement->bindParam( $key + 1, $value, \PDO::PARAM_STR ); - } - } else { - if ( is_null( $value ) ) { - $statement->bindValue( $key, NULL, \PDO::PARAM_NULL ); - } elseif ( !$this->flagUseStringOnlyBinding && AQueryWriter::canBeTreatedAsInt( $value ) && abs( $value ) <= $this->max ) { - $statement->bindParam( $key, $value, \PDO::PARAM_INT ); - } else { - $statement->bindParam( $key, $value, \PDO::PARAM_STR ); - } - } - } - } - - /** - * This method runs the actual SQL query and binds a list of parameters to the query. - * slots. The result of the query will be stored in the protected property - * $rs (always array). The number of rows affected (result of rowcount, if supported by database) - * is stored in protected property $affectedRows. If the debug flag is set - * this function will send debugging output to screen buffer. - * - * @param string $sql the SQL string to be send to database server - * @param array $bindings the values that need to get bound to the query slots - * @param array $options - * - * @return mixed - * @throws SQL - */ - protected function runQuery( $sql, $bindings, $options = array() ) - { - $this->connect(); - if ( $this->loggingEnabled && $this->logger ) { - $this->logger->log( $sql, $bindings ); - } - try { - if ( strpos( 'pgsql', $this->dsn ) === 0 ) { - if ( defined( '\PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT' ) ) { - $statement = $this->pdo->prepare( $sql, array( \PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => TRUE ) ); - } else { - $statement = $this->pdo->prepare( $sql ); - } - } else { - $statement = $this->pdo->prepare( $sql ); - } - $this->bindParams( $statement, $bindings ); - $statement->execute(); - $this->queryCounter ++; - $this->affectedRows = $statement->rowCount(); - if ( $statement->columnCount() ) { - $fetchStyle = ( isset( $options['fetchStyle'] ) ) ? $options['fetchStyle'] : NULL; - if ( isset( $options['noFetch'] ) && $options['noFetch'] ) { - $this->resultArray = array(); - return $statement; - } - $this->resultArray = $statement->fetchAll( $fetchStyle ); - if ( $this->loggingEnabled && $this->logger ) { - $this->logger->log( 'resultset: ' . count( $this->resultArray ) . ' rows' ); - } - } else { - $this->resultArray = array(); - } - } catch ( \PDOException $e ) { - //Unfortunately the code field is supposed to be int by default (php) - //So we need a property to convey the SQL State code. - $err = $e->getMessage(); - if ( $this->loggingEnabled && $this->logger ) $this->logger->log( 'An error occurred: ' . $err ); - $exception = new SQL( $err, 0 ); - $exception->setSQLState( $e->getCode() ); - throw $exception; - } - } - - /** - * Try to fix MySQL character encoding problems. - * MySQL < 5.5 does not support proper 4 byte unicode but they - * seem to have added it with version 5.5 under a different label: utf8mb4. - * We try to select the best possible charset based on your version data. - * - * @return void - */ - protected function setEncoding() - { - $driver = $this->pdo->getAttribute( \PDO::ATTR_DRIVER_NAME ); - $version = floatval( $this->pdo->getAttribute( \PDO::ATTR_SERVER_VERSION ) ); - if ($driver === 'mysql') { - $encoding = ($version >= 5.5) ? 'utf8mb4' : 'utf8'; - $this->pdo->setAttribute(\PDO::MYSQL_ATTR_INIT_COMMAND, 'SET NAMES '.$encoding ); //on every re-connect - $this->pdo->exec(' SET NAMES '. $encoding); //also for current connection - $this->mysqlEncoding = $encoding; - } - } - - /** - * Constructor. You may either specify dsn, user and password or - * just give an existing PDO connection. - * - * Examples: - * $driver = new RPDO($dsn, $user, $password); - * $driver = new RPDO($existingConnection); - * - * @param string|object $dsn database connection string - * @param string $user optional, usename to sign in - * @param string $pass optional, password for connection login - * - * @return void - */ - public function __construct( $dsn, $user = NULL, $pass = NULL ) - { - if ( is_object( $dsn ) ) { - $this->pdo = $dsn; - $this->isConnected = TRUE; - $this->setEncoding(); - $this->pdo->setAttribute( \PDO::ATTR_ERRMODE,\PDO::ERRMODE_EXCEPTION ); - $this->pdo->setAttribute( \PDO::ATTR_DEFAULT_FETCH_MODE,\PDO::FETCH_ASSOC ); - // make sure that the dsn at least contains the type - $this->dsn = $this->getDatabaseType(); - } else { - $this->dsn = $dsn; - $this->connectInfo = array( 'pass' => $pass, 'user' => $user ); - } - - //PHP 5.3 PDO SQLite has a bug with large numbers: - if ( ( strpos( $this->dsn, 'sqlite' ) === 0 && PHP_MAJOR_VERSION === 5 && PHP_MINOR_VERSION === 3 ) || defined('HHVM_VERSION') || $this->dsn === 'test-sqlite-53' ) { - $this->max = 2147483647; //otherwise you get -2147483648 ?! demonstrated in build #603 on Travis. - } elseif ( strpos( $this->dsn, 'cubrid' ) === 0 ) { - $this->max = 2147483647; //bindParam in pdo_cubrid also fails... - } else { - $this->max = PHP_INT_MAX; //the normal value of course (makes it possible to use large numbers in LIMIT clause) - } - } - - /** - * Returns the best possible encoding for MySQL based on version data. - * - * @return string - */ - public function getMysqlEncoding() - { - return $this->mysqlEncoding; - } - - /** - * Whether to bind all parameters as strings. - * If set to TRUE this will cause all integers to be bound as STRINGS. - * This will NOT affect NULL values. - * - * @param boolean $yesNo pass TRUE to bind all parameters as strings. - * - * @return void - */ - public function setUseStringOnlyBinding( $yesNo ) - { - $this->flagUseStringOnlyBinding = (boolean) $yesNo; - } - - /** - * Sets the maximum value to be bound as integer, normally - * this value equals PHP's MAX INT constant, however sometimes - * PDO driver bindings cannot bind large integers as integers. - * This method allows you to manually set the max integer binding - * value to manage portability/compatibility issues among different - * PHP builds. This method will return the old value. - * - * @param integer $max maximum value for integer bindings - * - * @return integer - */ - public function setMaxIntBind( $max ) - { - if ( !is_integer( $max ) ) throw new RedException( 'Parameter has to be integer.' ); - $oldMax = $this->max; - $this->max = $max; - return $oldMax; - } - - /** - * Establishes a connection to the database using PHP\PDO - * functionality. If a connection has already been established this - * method will simply return directly. This method also turns on - * UTF8 for the database and PDO-ERRMODE-EXCEPTION as well as - * PDO-FETCH-ASSOC. - * - * @return void - */ - public function connect() - { - if ( $this->isConnected ) return; - try { - $user = $this->connectInfo['user']; - $pass = $this->connectInfo['pass']; - $this->pdo = new \PDO( - $this->dsn, - $user, - $pass - ); - $this->setEncoding(); - $this->pdo->setAttribute( \PDO::ATTR_STRINGIFY_FETCHES, TRUE ); - //cant pass these as argument to constructor, CUBRID driver does not understand... - $this->pdo->setAttribute( \PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION ); - $this->pdo->setAttribute( \PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC ); - $this->isConnected = TRUE; - } catch ( \PDOException $exception ) { - $matches = array(); - $dbname = ( preg_match( '/dbname=(\w+)/', $this->dsn, $matches ) ) ? $matches[1] : '?'; - throw new \PDOException( 'Could not connect to database (' . $dbname . ').', $exception->getCode() ); - } - } - - /** - * Directly sets PDO instance into driver. - * This method might improve performance, however since the driver does - * not configure this instance terrible things may happen... only use - * this method if you are an expert on RedBeanPHP, PDO and UTF8 connections and - * you know your database server VERY WELL. - * - * @param PDO $pdo PDO instance - * - * @return void - */ - public function setPDO( \PDO $pdo ) { - $this->pdo = $pdo; - } - - /** - * @see Driver::GetAll - */ - public function GetAll( $sql, $bindings = array() ) - { - $this->runQuery( $sql, $bindings ); - return $this->resultArray; - } - - /** - * @see Driver::GetAssocRow - */ - public function GetAssocRow( $sql, $bindings = array() ) - { - $this->runQuery( $sql, $bindings, array( - 'fetchStyle' => \PDO::FETCH_ASSOC - ) - ); - return $this->resultArray; - } - - /** - * @see Driver::GetCol - */ - public function GetCol( $sql, $bindings = array() ) - { - $rows = $this->GetAll( $sql, $bindings ); - $cols = array(); - if ( $rows && is_array( $rows ) && count( $rows ) > 0 ) { - foreach ( $rows as $row ) { - $cols[] = array_shift( $row ); - } - } - - return $cols; - } - - /** - * @see Driver::GetOne - */ - public function GetOne( $sql, $bindings = array() ) - { - $arr = $this->GetAll( $sql, $bindings ); - $res = NULL; - if ( !is_array( $arr ) ) return NULL; - if ( count( $arr ) === 0 ) return NULL; - $row1 = array_shift( $arr ); - if ( !is_array( $row1 ) ) return NULL; - if ( count( $row1 ) === 0 ) return NULL; - $col1 = array_shift( $row1 ); - return $col1; - } - - /** - * Alias for getOne(). - * Backward compatibility. - * - * @param string $sql SQL - * @param array $bindings bindings - * - * @return mixed - */ - public function GetCell( $sql, $bindings = array() ) - { - return $this->GetOne( $sql, $bindings ); - } - - /** - * @see Driver::GetRow - */ - public function GetRow( $sql, $bindings = array() ) - { - $arr = $this->GetAll( $sql, $bindings ); - return array_shift( $arr ); - } - - /** - * @see Driver::Excecute - */ - public function Execute( $sql, $bindings = array() ) - { - $this->runQuery( $sql, $bindings ); - return $this->affectedRows; - } - - /** - * @see Driver::GetInsertID - */ - public function GetInsertID() - { - $this->connect(); - - return (int) $this->pdo->lastInsertId(); - } - - /** - * @see Driver::GetCursor - */ - public function GetCursor( $sql, $bindings = array() ) - { - $statement = $this->runQuery( $sql, $bindings, array( 'noFetch' => TRUE ) ); - $cursor = new PDOCursor( $statement, \PDO::FETCH_ASSOC ); - return $cursor; - } - - /** - * @see Driver::Affected_Rows - */ - public function Affected_Rows() - { - $this->connect(); - return (int) $this->affectedRows; - } - - /** - * Toggles debug mode. In debug mode the driver will print all - * SQL to the screen together with some information about the - * results. - * - * @param boolean $trueFalse turn on/off - * @param Logger $logger logger instance - * - * @return void - */ - public function setDebugMode( $tf, $logger = NULL ) - { - $this->connect(); - $this->loggingEnabled = (bool) $tf; - if ( $this->loggingEnabled and !$logger ) { - $logger = new RDefault(); - } - $this->setLogger( $logger ); - } - - /** - * Injects Logger object. - * Sets the logger instance you wish to use. - * - * @param Logger $logger the logger instance to be used for logging - * - * @return void - */ - public function setLogger( Logger $logger ) - { - $this->logger = $logger; - } - - /** - * Gets Logger object. - * Returns the currently active Logger instance. - * - * @return Logger - */ - public function getLogger() - { - return $this->logger; - } - - /** - * @see Driver::StartTrans - */ - public function StartTrans() - { - $this->connect(); - $this->pdo->beginTransaction(); - } - - /** - * @see Driver::CommitTrans - */ - public function CommitTrans() - { - $this->connect(); - $this->pdo->commit(); - } - - /** - * @see Driver::FailTrans - */ - public function FailTrans() - { - $this->connect(); - $this->pdo->rollback(); - } - - /** - * Returns the name of database driver for PDO. - * Uses the PDO attribute DRIVER NAME to obtain the name of the - * PDO driver. - * - * @return string - */ - public function getDatabaseType() - { - $this->connect(); - - return $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME ); - } - - /** - * Returns the version number of the database. - * - * @return mixed - */ - public function getDatabaseVersion() - { - $this->connect(); - return $this->pdo->getAttribute(\PDO::ATTR_CLIENT_VERSION ); - } - - /** - * Returns the underlying PHP PDO instance. - * - * @return PDO - */ - public function getPDO() - { - $this->connect(); - return $this->pdo; - } - - /** - * Closes database connection by destructing PDO. - * - * @return void - */ - public function close() - { - $this->pdo = NULL; - $this->isConnected = FALSE; - } - - /** - * Returns TRUE if the current PDO instance is connected. - * - * @return boolean - */ - public function isConnected() - { - return $this->isConnected && $this->pdo; - } - - /** - * Toggles logging, enables or disables logging. - * - * @param boolean $enable TRUE to enable logging - * - * @return self - */ - public function setEnableLogging( $enable ) - { - $this->loggingEnabled = (boolean) $enable; - } - - /** - * Resets the internal Query Counter. - * - * @return self - */ - public function resetCounter() - { - $this->queryCounter = 0; - return $this; - } - - /** - * Returns the number of SQL queries processed. - * - * @return integer - */ - public function getQueryCount() - { - return $this->queryCounter; - } - - /** - * Returns the maximum value treated as integer parameter - * binding. - * - * This method is mainly for testing purposes but it can help - * you solve some issues relating to integer bindings. - * - * @return integer - */ - public function getIntegerBindingMax() - { - return $this->max; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/DuplicationManager.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/DuplicationManager.php deleted file mode 100644 index d816796f..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/DuplicationManager.php +++ /dev/null @@ -1,455 +0,0 @@ -$shared = array(); - - foreach ( $beans as $subBean ) { - array_push( $copy->$shared, $subBean ); - } - } - - /** - * Copies the own beans in a bean, i.e. all the ownBean-lists. - * Each bean in the own-list belongs exclusively to its owner so - * we need to invoke the duplicate method again to duplicate each bean here. - * - * @param OODBBean $copy target bean to copy lists to - * @param string $owned name of the own list - * @param array $beans array with shared beans to copy - * @param array $trail array with former beans to detect recursion - * @param boolean $preserveIDs TRUE means preserve IDs, for export only - * - * @return void - */ - private function copyOwnBeans( OODBBean $copy, $owned, $beans, $trail, $preserveIDs ) - { - $copy->$owned = array(); - foreach ( $beans as $subBean ) { - array_push( $copy->$owned, $this->duplicate( $subBean, $trail, $preserveIDs ) ); - } - } - - /** - * Creates a copy of bean $bean and copies all primitive properties (not lists) - * and the parents beans to the newly created bean. Also sets the ID of the bean - * to 0. - * - * @param OODBBean $bean bean to copy - * - * @return OODBBean - */ - private function createCopy( OODBBean $bean ) - { - $type = $bean->getMeta( 'type' ); - - $copy = $this->redbean->dispense( $type ); - $copy->setMeta( 'sys.dup-from-id', $bean->id ); - $copy->setMeta( 'sys.old-id', $bean->id ); - $copy->importFrom( $bean ); - $copy->id = 0; - - return $copy; - } - - /** - * Generates a key from the bean type and its ID and determines if the bean - * occurs in the trail, if not the bean will be added to the trail. - * Returns TRUE if the bean occurs in the trail and FALSE otherwise. - * - * @param array $trail list of former beans - * @param OODBBean $bean currently selected bean - * - * @return boolean - */ - private function inTrailOrAdd( &$trail, OODBBean $bean ) - { - $type = $bean->getMeta( 'type' ); - $key = $type . $bean->getID(); - - if ( isset( $trail[$key] ) ) { - return TRUE; - } - - $trail[$key] = $bean; - - return FALSE; - } - - /** - * Given the type name of a bean this method returns the canonical names - * of the own-list and the shared-list properties respectively. - * Returns a list with two elements: name of the own-list, and name - * of the shared list. - * - * @param string $typeName bean type name - * - * @return array - */ - private function getListNames( $typeName ) - { - $owned = 'own' . ucfirst( $typeName ); - $shared = 'shared' . ucfirst( $typeName ); - - return array( $owned, $shared ); - } - - /** - * Determines whether the bean has an own list based on - * schema inspection from realtime schema or cache. - * - * @param string $type bean type to get list for - * @param string $target type of list you want to detect - * - * @return boolean - */ - protected function hasOwnList( $type, $target ) - { - return isset( $this->columns[$target][$type . '_id'] ); - } - - /** - * Determines whether the bea has a shared list based on - * schema inspection from realtime schema or cache. - * - * @param string $type bean type to get list for - * @param string $target type of list you are looking for - * - * @return boolean - */ - protected function hasSharedList( $type, $target ) - { - return in_array( AQueryWriter::getAssocTableFormat( array( $type, $target ) ), $this->tables ); - } - - /** - * @see DuplicationManager::dup - * - * @param OODBBean $bean bean to be copied - * @param array $trail trail to prevent infinite loops - * @param boolean $preserveIDs preserve IDs - * - * @return OODBBean - */ - protected function duplicate( OODBBean $bean, $trail = array(), $preserveIDs = FALSE ) - { - if ( $this->inTrailOrAdd( $trail, $bean ) ) return $bean; - - $type = $bean->getMeta( 'type' ); - - $copy = $this->createCopy( $bean ); - foreach ( $this->tables as $table ) { - - if ( !empty( $this->filters ) ) { - if ( !in_array( $table, $this->filters ) ) continue; - } - - list( $owned, $shared ) = $this->getListNames( $table ); - - if ( $this->hasSharedList( $type, $table ) ) { - if ( $beans = $bean->$shared ) { - $this->copySharedBeans( $copy, $shared, $beans ); - } - } elseif ( $this->hasOwnList( $type, $table ) ) { - if ( $beans = $bean->$owned ) { - $this->copyOwnBeans( $copy, $owned, $beans, $trail, $preserveIDs ); - } - - $copy->setMeta( 'sys.shadow.' . $owned, NULL ); - } - - $copy->setMeta( 'sys.shadow.' . $shared, NULL ); - } - - $copy->id = ( $preserveIDs ) ? $bean->id : $copy->id; - - return $copy; - } - - /** - * Constructor, - * creates a new instance of DupManager. - * - * @param ToolBox $toolbox - */ - public function __construct( ToolBox $toolbox ) - { - $this->toolbox = $toolbox; - $this->redbean = $toolbox->getRedBean(); - $this->associationManager = $this->redbean->getAssociationManager(); - } - - /** - * Recursively turns the keys of an array into - * camelCase. - * - * @param array $array array to camelize - * @param boolean $dolphinMode whether you want the exception for IDs. - * - * @return array - */ - public function camelfy( $array, $dolphinMode = false ) { - $newArray = array(); - foreach( $array as $key => $element ) { - $newKey = preg_replace_callback( '/_(\w)/', function( &$matches ){ - return strtoupper( $matches[1] ); - }, $key); - - if ( $dolphinMode ) { - $newKey = preg_replace( '/(\w)Id$/', '$1ID', $newKey ); - } - - $newArray[$newKey] = ( is_array($element) ) ? $this->camelfy( $element, $dolphinMode ) : $element; - } - return $newArray; - } - - /** - * For better performance you can pass the tables in an array to this method. - * If the tables are available the duplication manager will not query them so - * this might be beneficial for performance. - * - * This method allows two array formats: - * - * - * array( TABLE1, TABLE2 ... ) - * - * - * or - * - * - * array( TABLE1 => array( COLUMN1, COLUMN2 ... ) ... ) - * - * - * @param array $tables a table cache array - * - * @return void - */ - public function setTables( $tables ) - { - foreach ( $tables as $key => $value ) { - if ( is_numeric( $key ) ) { - $this->tables[] = $value; - } else { - $this->tables[] = $key; - $this->columns[$key] = $value; - } - } - - $this->cacheTables = TRUE; - } - - /** - * Returns a schema array for cache. - * You can use the return value of this method as a cache, - * store it in RAM or on disk and pass it to setTables later. - * - * @return array - */ - public function getSchema() - { - return $this->columns; - } - - /** - * Indicates whether you want the duplication manager to cache the database schema. - * If this flag is set to TRUE the duplication manager will query the database schema - * only once. Otherwise the duplicationmanager will, by default, query the schema - * every time a duplication action is performed (dup()). - * - * @param boolean $yesNo TRUE to use caching, FALSE otherwise - */ - public function setCacheTables( $yesNo ) - { - $this->cacheTables = $yesNo; - } - - /** - * A filter array is an array with table names. - * By setting a table filter you can make the duplication manager only take into account - * certain bean types. Other bean types will be ignored when exporting or making a - * deep copy. If no filters are set all types will be taking into account, this is - * the default behavior. - * - * @param array $filters list of tables to be filtered - * - * @return void - */ - public function setFilters( $filters ) - { - if ( !is_array( $filters ) ) { - $filters = array( $filters ); - } - - $this->filters = $filters; - } - - /** - * Makes a copy of a bean. This method makes a deep copy - * of the bean.The copy will have the following features. - * - All beans in own-lists will be duplicated as well - * - All references to shared beans will be copied but not the shared beans themselves - * - All references to parent objects (_id fields) will be copied but not the parents themselves - * In most cases this is the desired scenario for copying beans. - * This function uses a trail-array to prevent infinite recursion, if a recursive bean is found - * (i.e. one that already has been processed) the ID of the bean will be returned. - * This should not happen though. - * - * Note: - * This function does a reflectional database query so it may be slow. - * - * Note: - * this function actually passes the arguments to a protected function called - * duplicate() that does all the work. This method takes care of creating a clone - * of the bean to avoid the bean getting tainted (triggering saving when storing it). - * - * @param OODBBean $bean bean to be copied - * @param array $trail for internal usage, pass array() - * @param boolean $preserveIDs for internal usage - * - * @return OODBBean - */ - public function dup( OODBBean $bean, $trail = array(), $preserveIDs = FALSE ) - { - if ( !count( $this->tables ) ) { - $this->tables = $this->toolbox->getWriter()->getTables(); - } - - if ( !count( $this->columns ) ) { - foreach ( $this->tables as $table ) { - $this->columns[$table] = $this->toolbox->getWriter()->getColumns( $table ); - } - } - - $rs = $this->duplicate( ( clone $bean ), $trail, $preserveIDs ); - - if ( !$this->cacheTables ) { - $this->tables = array(); - $this->columns = array(); - } - - return $rs; - } - - /** - * Exports a collection of beans recursively. - * This method will export an array of beans in the first argument to a - * set of arrays. This can be used to send JSON or XML representations - * of bean hierarchies to the client. - * - * For every bean in the array this method will export: - * - * - contents of the bean - * - all own bean lists (recursively) - * - all shared beans (but not THEIR own lists) - * - * If the second parameter is set to TRUE the parents of the beans in the - * array will be exported as well (but not THEIR parents). - * - * The third parameter can be used to provide a white-list array - * for filtering. This is an array of strings representing type names, - * only the type names in the filter list will be exported. - * - * The fourth parameter can be used to change the keys of the resulting - * export arrays. The default mode is 'snake case' but this leaves the - * keys as-is, because 'snake' is the default case style used by - * RedBeanPHP in the database. You can set this to 'camel' for - * camel cased keys or 'dolphin' (same as camelcase but id will be - * converted to ID instead of Id). - * - * @param array|OODBBean $beans beans to be exported - * @param boolean $parents also export parents - * @param array $filters only these types (whitelist) - * @param string $caseStyle case style identifier - * - * @return array - */ - public function exportAll( $beans, $parents = FALSE, $filters = array(), $caseStyle = 'snake') - { - $array = array(); - - if ( !is_array( $beans ) ) { - $beans = array( $beans ); - } - - foreach ( $beans as $bean ) { - $this->setFilters( $filters ); - - $duplicate = $this->dup( $bean, array(), TRUE ); - - $array[] = $duplicate->export( FALSE, $parents, FALSE, $filters ); - } - - if ( $caseStyle === 'camel' ) $array = $this->camelfy( $array ); - if ( $caseStyle === 'dolphin' ) $array = $this->camelfy( $array, true ); - - return $array; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php deleted file mode 100755 index 2232331e..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Facade.php +++ /dev/null @@ -1,1793 +0,0 @@ -isFrozen() ) { - try { - $rs = Facade::$adapter->$method( $sql, $bindings ); - } catch ( SQLException $exception ) { - if ( self::$writer->sqlStateIn( $exception->getSQLState(), - array( - QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN, - QueryWriter::C_SQLSTATE_NO_SUCH_TABLE ) - ) - ) { - return ( $method === 'getCell' ) ? NULL : array(); - } else { - throw $exception; - } - } - - return $rs; - } else { - return Facade::$adapter->$method( $sql, $bindings ); - } - } - - /** - * Returns the RedBeanPHP version string. - * The RedBeanPHP version string always has the same format "X.Y" - * where X is the major version number and Y is the minor version number. - * Point releases are not mentioned in the version string. - * - * @return string - */ - public static function getVersion() - { - return self::C_REDBEANPHP_VERSION; - } - - /** - * Tests the connection. - * Returns TRUE if connection has been established and - * FALSE otherwise. - * - * @return boolean - */ - public static function testConnection() - { - if ( !isset( self::$adapter ) ) return FALSE; - - $database = self::$adapter->getDatabase(); - try { - @$database->connect(); - } catch ( \Exception $e ) {} - return $database->isConnected(); - } - - /** - * Kickstarts redbean for you. This method should be called before you start using - * RedBean. The Setup() method can be called without any arguments, in this case it will - * try to create a SQLite database in /tmp called red.db (this only works on UNIX-like systems). - * - * @param string $dsn Database connection string - * @param string $username Username for database - * @param string $password Password for database - * @param boolean $frozen TRUE if you want to setup in frozen mode - * - * @return ToolBox - */ - public static function setup( $dsn = NULL, $username = NULL, $password = NULL, $frozen = FALSE ) - { - if ( is_null( $dsn ) ) { - $dsn = 'sqlite:/' . sys_get_temp_dir() . '/red.db'; - } - - self::addDatabase( 'default', $dsn, $username, $password, $frozen ); - self::selectDatabase( 'default' ); - - return self::$toolbox; - } - - /** - * Toggles Narrow Field Mode. - * See documentation in QueryWriter. - * - * @param boolean $mode TRUE = Narrow Field Mode - * - * @return void - */ - public static function setNarrowFieldMode( $mode ) - { - AQueryWriter::setNarrowFieldMode( $mode ); - } - - /** - * Wraps a transaction around a closure or string callback. - * If an Exception is thrown inside, the operation is automatically rolled back. - * If no Exception happens, it commits automatically. - * It also supports (simulated) nested transactions (that is useful when - * you have many methods that needs transactions but are unaware of - * each other). - * - * Example: - * - * - * $from = 1; - * $to = 2; - * $amount = 300; - * - * R::transaction(function() use($from, $to, $amount) - * { - * $accountFrom = R::load('account', $from); - * $accountTo = R::load('account', $to); - * $accountFrom->money -= $amount; - * $accountTo->money += $amount; - * R::store($accountFrom); - * R::store($accountTo); - * }); - * - * - * @param callable $callback Closure (or other callable) with the transaction logic - * - * @return mixed - */ - public static function transaction( $callback ) - { - return Transaction::transaction( self::$adapter, $callback ); - } - - /** - * Adds a database to the facade, afterwards you can select the database using - * selectDatabase($key), where $key is the name you assigned to this database. - * - * Usage: - * - * - * R::addDatabase( 'database-1', 'sqlite:/tmp/db1.txt' ); - * R::selectDatabase( 'database-1' ); //to select database again - * - * - * This method allows you to dynamically add (and select) new databases - * to the facade. Adding a database with the same key will cause an exception. - * - * @param string $key ID for the database - * @param string $dsn DSN for the database - * @param string $user user for connection - * @param NULL|string $pass password for connection - * @param bool $frozen whether this database is frozen or not - * - * @return void - */ - public static function addDatabase( $key, $dsn, $user = NULL, $pass = NULL, $frozen = FALSE ) - { - if ( isset( self::$toolboxes[$key] ) ) { - throw new RedException( 'A database has already be specified for this key.' ); - } - - if ( is_object($dsn) ) { - $db = new RPDO( $dsn ); - $dbType = $db->getDatabaseType(); - } else { - $db = new RPDO( $dsn, $user, $pass, TRUE ); - $dbType = substr( $dsn, 0, strpos( $dsn, ':' ) ); - } - - $adapter = new DBAdapter( $db ); - - $writers = array( - 'pgsql' => 'PostgreSQL', - 'sqlite' => 'SQLiteT', - 'cubrid' => 'CUBRID', - 'mysql' => 'MySQL', - 'sqlsrv' => 'SQLServer', - ); - - $wkey = trim( strtolower( $dbType ) ); - if ( !isset( $writers[$wkey] ) ) { - $wkey = preg_replace( '/\W/', '' , $wkey ); - throw new RedException( 'Unsupported database ('.$wkey.').' ); - } - $writerClass = '\\RedBeanPHP\\QueryWriter\\'.$writers[$wkey]; - $writer = new $writerClass( $adapter ); - $redbean = new OODB( $writer, $frozen ); - - self::$toolboxes[$key] = new ToolBox( $redbean, $adapter, $writer ); - } - - /** - * Selects a different database for the Facade to work with. - * If you use the R::setup() you don't need this method. This method is meant - * for multiple database setups. This method selects the database identified by the - * database ID ($key). Use addDatabase() to add a new database, which in turn - * can be selected using selectDatabase(). If you use R::setup(), the resulting - * database will be stored under key 'default', to switch (back) to this database - * use R::selectDatabase( 'default' ). This method returns TRUE if the database has been - * switched and FALSE otherwise (for instance if you already using the specified database). - * - * @param string $key Key of the database to select - * - * @return boolean - */ - public static function selectDatabase( $key ) - { - if ( self::$currentDB === $key ) { - return FALSE; - } - - if ( !isset( self::$toolboxes[$key] ) ) { - throw new RedException( 'Database not found in registry. Add database using R::addDatabase().' ); - } - - self::configureFacadeWithToolbox( self::$toolboxes[$key] ); - self::$currentDB = $key; - - return TRUE; - } - - /** - * Toggles DEBUG mode. - * In Debug mode all SQL that happens under the hood will - * be printed to the screen or logged by provided logger. - * If no database connection has been configured using R::setup() or - * R::selectDatabase() this method will throw an exception. - * Returns the attached logger instance. - * - * @param boolean $tf debug mode (true or false) - * @param integer $mode (0 = to STDOUT, 1 = to ARRAY) - * - * @return RDefault - * @throws RedException - */ - public static function debug( $tf = TRUE, $mode = 0 ) - { - if ($mode > 1) { - $mode -= 2; - $logger = new Debug; - } else { - $logger = new RDefault; - } - - if ( !isset( self::$adapter ) ) { - throw new RedException( 'Use R::setup() first.' ); - } - $logger->setMode($mode); - self::$adapter->getDatabase()->setDebugMode( $tf, $logger ); - - return $logger; - } - - /** - * Turns on the fancy debugger. - * In 'fancy' mode the debugger will output queries with bound - * parameters inside the SQL itself. This method has been added to - * offer a convenient way to activate the fancy debugger system - * in one call. - * - * @param boolean $toggle TRUE to activate debugger and select 'fancy' mode - * - * @return void - */ - public static function fancyDebug( $toggle ) - { - self::debug( $toggle, 2 ); - } - - /** - * Inspects the database schema. If you pass the type of a bean this - * method will return the fields of its table in the database. - * The keys of this array will be the field names and the values will be - * the column types used to store their values. - * If no type is passed, this method returns a list of all tables in the database. - * - * @param string $type Type of bean (i.e. table) you want to inspect - * - * @return array - */ - public static function inspect( $type = NULL ) - { - return ($type === NULL) ? self::$writer->getTables() : self::$writer->getColumns( $type ); - } - - /** - * Stores a bean in the database. This method takes a - * OODBBean Bean Object $bean and stores it - * in the database. If the database schema is not compatible - * with this bean and RedBean runs in fluid mode the schema - * will be altered to store the bean correctly. - * If the database schema is not compatible with this bean and - * RedBean runs in frozen mode it will throw an exception. - * This function returns the primary key ID of the inserted - * bean. - * - * The return value is an integer if possible. If it is not possible to - * represent the value as an integer a string will be returned. - * - * @param OODBBean|SimpleModel $bean bean to store - * - * @return integer|string - */ - public static function store( $bean ) - { - return self::$redbean->store( $bean ); - } - - /** - * Toggles fluid or frozen mode. In fluid mode the database - * structure is adjusted to accomodate your objects. In frozen mode - * this is not the case. - * - * You can also pass an array containing a selection of frozen types. - * Let's call this chilly mode, it's just like fluid mode except that - * certain types (i.e. tables) aren't touched. - * - * @param boolean|array $trueFalse - */ - public static function freeze( $tf = TRUE ) - { - self::$redbean->freeze( $tf ); - } - - /** - * Loads multiple types of beans with the same ID. - * This might look like a strange method, however it can be useful - * for loading a one-to-one relation. - * - * Usage: - * list( $author, $bio ) = R::loadMulti( 'author, bio', $id ); - * - * @param string|array $types the set of types to load at once - * @param mixed $id the common ID - * - * @return OODBBean - */ - public static function loadMulti( $types, $id ) - { - return MultiLoader::load( self::$redbean, $types, $id ); - } - - /** - * Loads a bean from the object database. - * It searches for a OODBBean Bean Object in the - * database. It does not matter how this bean has been stored. - * RedBean uses the primary key ID $id and the string $type - * to find the bean. The $type specifies what kind of bean you - * are looking for; this is the same type as used with the - * dispense() function. If RedBean finds the bean it will return - * the OODB Bean object; if it cannot find the bean - * RedBean will return a new bean of type $type and with - * primary key ID 0. In the latter case it acts basically the - * same as dispense(). - * - * Important note: - * If the bean cannot be found in the database a new bean of - * the specified type will be generated and returned. - * - * @param string $type type of bean you want to load - * @param integer $id ID of the bean you want to load - * - * @return OODBBean - */ - public static function load( $type, $id ) - { - return self::$redbean->load( $type, $id ); - } - - /** - * Removes a bean from the database. - * This function will remove the specified OODBBean - * Bean Object from the database. - * - * This facade method also accepts a type-id combination, - * in the latter case this method will attempt to load the specified bean - * and THEN trash it. - * - * @param string|OODBBean|SimpleModel $bean bean you want to remove from database - * @param integer $id ID if the bean to trash (optional, type-id variant only) - * - * @return void - */ - public static function trash( $beanOrType, $id = NULL ) - { - if ( is_string( $beanOrType ) ) return self::trash( self::load( $beanOrType, $id ) ); - return self::$redbean->trash( $beanOrType ); - } - - /** - * Dispenses a new RedBean OODB Bean for use with - * the rest of the methods. - * - * @param string|array $typeOrBeanArray type or bean array to import - * @param integer $number number of beans to dispense - * @param boolean $alwaysReturnArray if TRUE always returns the result as an array - * - * @return array|OODBBean - */ - public static function dispense( $typeOrBeanArray, $num = 1, $alwaysReturnArray = FALSE ) - { - return DispenseHelper::dispense( self::$redbean, $typeOrBeanArray, $num, $alwaysReturnArray ); - } - - /** - * Takes a comma separated list of bean types - * and dispenses these beans. For each type in the list - * you can specify the number of beans to be dispensed. - * - * Usage: - * - * - * list( $book, $page, $text ) = R::dispenseAll( 'book,page,text' ); - * - * - * This will dispense a book, a page and a text. This way you can - * quickly dispense beans of various types in just one line of code. - * - * Usage: - * - * - * list($book, $pages) = R::dispenseAll('book,page*100'); - * - * - * This returns an array with a book bean and then another array - * containing 100 page beans. - * - * @param string $order a description of the desired dispense order using the syntax above - * @param boolean $onlyArrays return only arrays even if amount < 2 - * - * @return array - */ - public static function dispenseAll( $order, $onlyArrays = FALSE ) - { - return DispenseHelper::dispenseAll( self::$redbean, $order, $onlyArrays ); - } - - /** - * Convience method. Tries to find beans of a certain type, - * if no beans are found, it dispenses a bean of that type. - * - * @param string $type type of bean you are looking for - * @param string $sql SQL code for finding the bean - * @param array $bindings parameters to bind to SQL - * - * @return array - */ - public static function findOrDispense( $type, $sql = NULL, $bindings = array() ) - { - return self::$finder->findOrDispense( $type, $sql, $bindings ); - } - - /** - * Finds a bean using a type and a where clause (SQL). - * As with most Query tools in RedBean you can provide values to - * be inserted in the SQL statement by populating the value - * array parameter; you can either use the question mark notation - * or the slot-notation (:keyname). - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings array of values to be bound to parameters in query - * - * @return array - */ - public static function find( $type, $sql = NULL, $bindings = array() ) - { - return self::$finder->find( $type, $sql, $bindings ); - } - - /** - * @see Facade::find - * The findAll() method differs from the find() method in that it does - * not assume a WHERE-clause, so this is valid: - * - * R::findAll('person',' ORDER BY name DESC '); - * - * Your SQL does not have to start with a valid WHERE-clause condition. - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings array of values to be bound to parameters in query - * - * @return array - */ - public static function findAll( $type, $sql = NULL, $bindings = array() ) - { - return self::$finder->find( $type, $sql, $bindings ); - } - - /** - * @see Facade::find - * The variation also exports the beans (i.e. it returns arrays). - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings array of values to be bound to parameters in query - * - * @return array - */ - public static function findAndExport( $type, $sql = NULL, $bindings = array() ) - { - return self::$finder->findAndExport( $type, $sql, $bindings ); - } - - /** - * @see Facade::find - * This variation returns the first bean only. - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings array of values to be bound to parameters in query - * - * @return OODBBean - */ - public static function findOne( $type, $sql = NULL, $bindings = array() ) - { - return self::$finder->findOne( $type, $sql, $bindings ); - } - - /** - * @see Facade::find - * This variation returns the last bean only. - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings array of values to be bound to parameters in query - * - * @return OODBBean - */ - public static function findLast( $type, $sql = NULL, $bindings = array() ) - { - return self::$finder->findLast( $type, $sql, $bindings ); - } - - /** - * Finds a bean collection. - * Use this for large datasets. - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings array of values to be bound to parameters in query - * - * @return BeanCollection - */ - public static function findCollection( $type, $sql = NULL, $bindings = array() ) - { - return self::$finder->findCollection( $type, $sql, $bindings ); - } - - /** - * Finds multiple types of beans at once and offers additional - * remapping functionality. This is a very powerful yet complex function. - * For details see Finder::findMulti(). - * - * @see Finder::findMulti() - * - * @param array|string $types a list of bean types to find - * @param string|array $sqlOrArr SQL query string or result set array - * @param array $bindings SQL bindings - * @param array $remappings an array of remapping arrays containing closures - * - * @return array - */ - public static function findMulti( $types, $sql, $bindings = array(), $remappings = array() ) - { - return self::$finder->findMulti( $types, $sql, $bindings, $remappings ); - } - - /** - * Returns an array of beans. Pass a type and a series of ids and - * this method will bring you the corresponding beans. - * - * important note: Because this method loads beans using the load() - * function (but faster) it will return empty beans with ID 0 for - * every bean that could not be located. The resulting beans will have the - * passed IDs as their keys. - * - * @param string $type type of beans - * @param array $ids ids to load - * - * @return array - */ - public static function batch( $type, $ids ) - { - return self::$redbean->batch( $type, $ids ); - } - - /** - * @see Facade::batch - * - * Alias for batch(). Batch method is older but since we added so-called *All - * methods like storeAll, trashAll, dispenseAll and findAll it seemed logical to - * improve the consistency of the Facade API and also add an alias for batch() called - * loadAll. - * - * @param string $type type of beans - * @param array $ids ids to load - * - * @return array - */ - public static function loadAll( $type, $ids ) - { - return self::$redbean->batch( $type, $ids ); - } - - /** - * Convenience function to execute Queries directly. - * Executes SQL. - * - * @param string $sql SQL query to execute - * @param array $bindings a list of values to be bound to query parameters - * - * @return integer - */ - public static function exec( $sql, $bindings = array() ) - { - return self::query( 'exec', $sql, $bindings ); - } - - /** - * Convenience function to execute Queries directly. - * Executes SQL. - * - * @param string $sql SQL query to execute - * @param array $bindings a list of values to be bound to query parameters - * - * @return array - */ - public static function getAll( $sql, $bindings = array() ) - { - return self::query( 'get', $sql, $bindings ); - } - - /** - * Convenience function to execute Queries directly. - * Executes SQL. - * - * @param string $sql SQL query to execute - * @param array $bindings a list of values to be bound to query parameters - * - * @return string - */ - public static function getCell( $sql, $bindings = array() ) - { - return self::query( 'getCell', $sql, $bindings ); - } - - /** - * Convenience function to execute Queries directly. - * Executes SQL. - * - * @param string $sql SQL query to execute - * @param array $bindings a list of values to be bound to query parameters - * - * @return array - */ - public static function getRow( $sql, $bindings = array() ) - { - return self::query( 'getRow', $sql, $bindings ); - } - - /** - * Convenience function to execute Queries directly. - * Executes SQL. - * - * @param string $sql SQL query to execute - * @param array $bindings a list of values to be bound to query parameters - * - * @return array - */ - public static function getCol( $sql, $bindings = array() ) - { - return self::query( 'getCol', $sql, $bindings ); - } - - /** - * Convenience function to execute Queries directly. - * Executes SQL. - * Results will be returned as an associative array. The first - * column in the select clause will be used for the keys in this array and - * the second column will be used for the values. If only one column is - * selected in the query, both key and value of the array will have the - * value of this field for each row. - * - * @param string $sql SQL query to execute - * @param array $bindings a list of values to be bound to query parameters - * - * @return array - */ - public static function getAssoc( $sql, $bindings = array() ) - { - return self::query( 'getAssoc', $sql, $bindings ); - } - - /** - * Convenience function to execute Queries directly. - * Executes SQL. - * Results will be returned as an associative array indexed by the first - * column in the select. - * - * @param string $sql SQL query to execute - * @param array $bindings a list of values to be bound to query parameters - * - * @return array - */ - public static function getAssocRow( $sql, $bindings = array() ) - { - return self::query( 'getAssocRow', $sql, $bindings ); - } - - /** - * Returns the insert ID for databases that support/require this - * functionality. Alias for R::getAdapter()->getInsertID(). - * - * @return mixed - */ - public static function getInsertID() - { - return self::$adapter->getInsertID(); - } - - /** - * Makes a copy of a bean. This method makes a deep copy - * of the bean.The copy will have the following features. - * - All beans in own-lists will be duplicated as well - * - All references to shared beans will be copied but not the shared beans themselves - * - All references to parent objects (_id fields) will be copied but not the parents themselves - * In most cases this is the desired scenario for copying beans. - * This function uses a trail-array to prevent infinite recursion, if a recursive bean is found - * (i.e. one that already has been processed) the ID of the bean will be returned. - * This should not happen though. - * - * Note: - * This function does a reflectional database query so it may be slow. - * - * @deprecated - * This function is deprecated in favour of R::duplicate(). - * This function has a confusing method signature, the R::duplicate() function - * only accepts two arguments: bean and filters. - * - * @param OODBBean $bean bean to be copied - * @param array $trail for internal usage, pass array() - * @param boolean $pid for internal usage - * @param array $white white list filter with bean types to duplicate - * - * @return array - */ - public static function dup( $bean, $trail = array(), $pid = FALSE, $filters = array() ) - { - self::$duplicationManager->setFilters( $filters ); - return self::$duplicationManager->dup( $bean, $trail, $pid ); - } - - /** - * Makes a deep copy of a bean. This method makes a deep copy - * of the bean.The copy will have the following: - * - * * All beans in own-lists will be duplicated as well - * * All references to shared beans will be copied but not the shared beans themselves - * * All references to parent objects (_id fields) will be copied but not the parents themselves - * - * In most cases this is the desired scenario for copying beans. - * This function uses a trail-array to prevent infinite recursion, if a recursive bean is found - * (i.e. one that already has been processed) the ID of the bean will be returned. - * This should not happen though. - * - * Note: - * This function does a reflectional database query so it may be slow. - * - * Note: - * This is a simplified version of the deprecated R::dup() function. - * - * @param OODBBean $bean bean to be copied - * @param array $white white list filter with bean types to duplicate - * - * @return array - */ - public static function duplicate( $bean, $filters = array() ) - { - return self::dup( $bean, array(), FALSE, $filters ); - } - - /** - * Exports a collection of beans. Handy for XML/JSON exports with a - * Javascript framework like Dojo or ExtJS. - * What will be exported: - * - * * contents of the bean - * * all own bean lists (recursively) - * * all shared beans (not THEIR own lists) - * - * @param array|OODBBean $beans beans to be exported - * @param boolean $parents whether you want parent beans to be exported - * @param array $filters whitelist of types - * - * @return array - */ - public static function exportAll( $beans, $parents = FALSE, $filters = array()) - { - return self::$duplicationManager->exportAll( $beans, $parents, $filters, self::$exportCaseStyle ); - } - - /** - * Selects case style for export. - * This will determine the case style for the keys of exported beans (see exportAll). - * The following options are accepted: - * - * * 'default' RedBeanPHP by default enforces Snake Case (i.e. book_id is_valid ) - * * 'camel' Camel Case (i.e. bookId isValid ) - * * 'dolphin' Dolphin Case (i.e. bookID isValid ) Like CamelCase but ID is written all uppercase - * - * @warning RedBeanPHP transforms camelCase to snake_case using a slightly different - * algorithm, it also converts isACL to is_acl (not is_a_c_l) and bookID to book_id. - * Due to information loss this cannot be corrected. However if you might try - * DolphinCase for IDs it takes into account the exception concerning IDs. - * - * @param string $caseStyle case style identifier - * - * @return void - */ - public static function useExportCase( $caseStyle = 'default' ) - { - if ( !in_array( $caseStyle, array( 'default', 'camel', 'dolphin' ) ) ) throw new RedException( 'Invalid case selected.' ); - self::$exportCaseStyle = $caseStyle; - } - - /** - * Converts a series of rows to beans. - * This method converts a series of rows to beans. - * The type of the desired output beans can be specified in the - * first parameter. The second parameter is meant for the database - * result rows. - * - * @param string $type type of beans to produce - * @param array $rows must contain an array of array - * - * @return array - */ - public static function convertToBeans( $type, $rows ) - { - return self::$redbean->convertToBeans( $type, $rows ); - } - - /** - * Part of RedBeanPHP Tagging API. - * Tests whether a bean has been associated with one ore more - * of the listed tags. If the third parameter is TRUE this method - * will return TRUE only if all tags that have been specified are indeed - * associated with the given bean, otherwise FALSE. - * If the third parameter is FALSE this - * method will return TRUE if one of the tags matches, FALSE if none - * match. - * - * @param OODBBean $bean bean to check for tags - * @param array $tags list of tags - * @param boolean $all whether they must all match or just some - * - * @return boolean - */ - public static function hasTag( $bean, $tags, $all = FALSE ) - { - return self::$tagManager->hasTag( $bean, $tags, $all ); - } - - /** - * Part of RedBeanPHP Tagging API. - * Removes all specified tags from the bean. The tags specified in - * the second parameter will no longer be associated with the bean. - * - * @param OODBBean $bean tagged bean - * @param array $tagList list of tags (names) - * - * @return void - */ - public static function untag( $bean, $tagList ) - { - self::$tagManager->untag( $bean, $tagList ); - } - - /** - * Part of RedBeanPHP Tagging API. - * Tags a bean or returns tags associated with a bean. - * If $tagList is NULL or omitted this method will return a - * comma separated list of tags associated with the bean provided. - * If $tagList is a comma separated list (string) of tags all tags will - * be associated with the bean. - * You may also pass an array instead of a string. - * - * @param OODBBean $bean bean to tag - * @param mixed $tagList tags to attach to the specified bean - * - * @return string - */ - public static function tag( OODBBean $bean, $tagList = NULL ) - { - return self::$tagManager->tag( $bean, $tagList ); - } - - /** - * Part of RedBeanPHP Tagging API. - * Adds tags to a bean. - * If $tagList is a comma separated list of tags all tags will - * be associated with the bean. - * You may also pass an array instead of a string. - * - * @param OODBBean $bean bean to tag - * @param array $tagList list of tags to add to bean - * - * @return void - */ - public static function addTags( OODBBean $bean, $tagList ) - { - self::$tagManager->addTags( $bean, $tagList ); - } - - /** - * Part of RedBeanPHP Tagging API. - * Returns all beans that have been tagged with one of the tags given. - * - * @param string $beanType type of bean you are looking for - * @param array $tagList list of tags to match - * @param string $sql additional SQL query snippet - * @param array $bindings a list of values to bind to the query parameters - * - * @return array - */ - public static function tagged( $beanType, $tagList, $sql = '', $bindings = array() ) - { - return self::$tagManager->tagged( $beanType, $tagList, $sql, $bindings ); - } - - /** - * Part of RedBeanPHP Tagging API. - * Returns all beans that have been tagged with ALL of the tags given. - * - * @param string $beanType type of bean you are looking for - * @param array $tagList list of tags to match - * @param string $sql additional SQL query snippet - * @param array $bindings a list of values to bind to the query parameters - * - * @return array - */ - public static function taggedAll( $beanType, $tagList, $sql = '', $bindings = array() ) - { - return self::$tagManager->taggedAll( $beanType, $tagList, $sql, $bindings ); - } - - /** - * Wipes all beans of type $beanType. - * - * @param string $beanType type of bean you want to destroy entirely - * - * @return boolean - */ - public static function wipe( $beanType ) - { - return Facade::$redbean->wipe( $beanType ); - } - - /** - * Counts the number of beans of type $type. - * This method accepts a second argument to modify the count-query. - * A third argument can be used to provide bindings for the SQL snippet. - * - * @param string $type type of bean we are looking for - * @param string $addSQL additional SQL snippet - * @param array $bindings parameters to bind to SQL - * - * @return integer - */ - public static function count( $type, $addSQL = '', $bindings = array() ) - { - return Facade::$redbean->count( $type, $addSQL, $bindings ); - } - - /** - * Configures the facade, want to have a new Writer? A new Object Database or a new - * Adapter and you want it on-the-fly? Use this method to hot-swap your facade with a new - * toolbox. - * - * @param ToolBox $tb toolbox to configure facade with - * - * @return ToolBox - */ - public static function configureFacadeWithToolbox( ToolBox $tb ) - { - $oldTools = self::$toolbox; - self::$toolbox = $tb; - self::$writer = self::$toolbox->getWriter(); - self::$adapter = self::$toolbox->getDatabaseAdapter(); - self::$redbean = self::$toolbox->getRedBean(); - self::$finder = new Finder( self::$toolbox ); - self::$associationManager = new AssociationManager( self::$toolbox ); - self::$redbean->setAssociationManager( self::$associationManager ); - self::$labelMaker = new LabelMaker( self::$toolbox ); - $helper = new SimpleModelHelper(); - $helper->attachEventListeners( self::$redbean ); - self::$redbean->setBeanHelper( new SimpleFacadeBeanHelper ); - self::$duplicationManager = new DuplicationManager( self::$toolbox ); - self::$tagManager = new TagManager( self::$toolbox ); - return $oldTools; - } - - /** - * Facade Convience method for adapter transaction system. - * Begins a transaction. - * - * @return bool - */ - public static function begin() - { - if ( !self::$redbean->isFrozen() ) return FALSE; - self::$adapter->startTransaction(); - return TRUE; - } - - /** - * Facade Convience method for adapter transaction system. - * Commits a transaction. - * - * @return bool - */ - public static function commit() - { - if ( !self::$redbean->isFrozen() ) return FALSE; - self::$adapter->commit(); - return TRUE; - } - - /** - * Facade Convience method for adapter transaction system. - * Rolls back a transaction. - * - * @return bool - */ - public static function rollback() - { - if ( !self::$redbean->isFrozen() ) return FALSE; - self::$adapter->rollback(); - return TRUE; - } - - /** - * Returns a list of columns. Format of this array: - * array( fieldname => type ) - * Note that this method only works in fluid mode because it might be - * quite heavy on production servers! - * - * @param string $table name of the table (not type) you want to get columns of - * - * @return array - */ - public static function getColumns( $table ) - { - return self::$writer->getColumns( $table ); - } - - /** - * Generates question mark slots for an array of values. - * - * @param array $array array to generate question mark slots for - * - * @return string - */ - public static function genSlots( $array, $template = NULL ) - { - return ArrayTool::genSlots( $array, $template ); - } - - /** - * Flattens a multi dimensional bindings array for use with genSlots(). - * - * @param array $array array to flatten - * - * @return array - */ - public static function flat( $array, $result = array() ) - { - return ArrayTool::flat( $array, $result ); - } - - /** - * Nukes the entire database. - * This will remove all schema structures from the database. - * Only works in fluid mode. Be careful with this method. - * - * @warning dangerous method, will remove all tables, columns etc. - * - * @return void - */ - public static function nuke() - { - if ( !self::$redbean->isFrozen() ) { - self::$writer->wipeAll(); - } - } - - /** - * Short hand function to store a set of beans at once, IDs will be - * returned as an array. For information please consult the R::store() - * function. - * A loop saver. - * - * @param array $beans list of beans to be stored - * - * @return array - */ - public static function storeAll( $beans ) - { - $ids = array(); - foreach ( $beans as $bean ) { - $ids[] = self::store( $bean ); - } - return $ids; - } - - /** - * Short hand function to trash a set of beans at once. - * For information please consult the R::trash() function. - * A loop saver. - * - * @param array $beans list of beans to be trashed - * - * @return void - */ - public static function trashAll( $beans ) - { - foreach ( $beans as $bean ) { - self::trash( $bean ); - } - } - - /** - * Toggles Writer Cache. - * Turns the Writer Cache on or off. The Writer Cache is a simple - * query based caching system that may improve performance without the need - * for cache management. This caching system will cache non-modifying queries - * that are marked with special SQL comments. As soon as a non-marked query - * gets executed the cache will be flushed. Only non-modifying select queries - * have been marked therefore this mechanism is a rather safe way of caching, requiring - * no explicit flushes or reloads. Of course this does not apply if you intend to test - * or simulate concurrent querying. - * - * @param boolean $yesNo TRUE to enable cache, FALSE to disable cache - * - * @return void - */ - public static function useWriterCache( $yesNo ) - { - self::getWriter()->setUseCache( $yesNo ); - } - - /** - * A label is a bean with only an id, type and name property. - * This function will dispense beans for all entries in the array. The - * values of the array will be assigned to the name property of each - * individual bean. - * - * @param string $type type of beans you would like to have - * @param array $labels list of labels, names for each bean - * - * @return array - */ - public static function dispenseLabels( $type, $labels ) - { - return self::$labelMaker->dispenseLabels( $type, $labels ); - } - - /** - * Generates and returns an ENUM value. This is how RedBeanPHP handles ENUMs. - * Either returns a (newly created) bean respresenting the desired ENUM - * value or returns a list of all enums for the type. - * - * To obtain (and add if necessary) an ENUM value: - * - * - * $tea->flavour = R::enum( 'flavour:apple' ); - * - * - * Returns a bean of type 'flavour' with name = apple. - * This will add a bean with property name (set to APPLE) to the database - * if it does not exist yet. - * - * To obtain all flavours: - * - * - * R::enum('flavour'); - * - * - * To get a list of all flavour names: - * - * - * R::gatherLabels( R::enum( 'flavour' ) ); - * - * - * @param string $enum either type or type-value - * - * @return array|OODBBean - */ - public static function enum( $enum ) - { - return self::$labelMaker->enum( $enum ); - } - - /** - * Gathers labels from beans. This function loops through the beans, - * collects the values of the name properties of each individual bean - * and stores the names in a new array. The array then gets sorted using the - * default sort function of PHP (sort). - * - * @param array $beans list of beans to loop - * - * @return array - */ - public static function gatherLabels( $beans ) - { - return self::$labelMaker->gatherLabels( $beans ); - } - - /** - * Closes the database connection. - * - * @return void - */ - public static function close() - { - if ( isset( self::$adapter ) ) { - self::$adapter->close(); - } - } - - /** - * Simple convenience function, returns ISO date formatted representation - * of $time. - * - * @param mixed $time UNIX timestamp - * - * @return string - */ - public static function isoDate( $time = NULL ) - { - if ( !$time ) { - $time = time(); - } - - return @date( 'Y-m-d', $time ); - } - - /** - * Simple convenience function, returns ISO date time - * formatted representation - * of $time. - * - * @param mixed $time UNIX timestamp - * - * @return string - */ - public static function isoDateTime( $time = NULL ) - { - if ( !$time ) $time = time(); - return @date( 'Y-m-d H:i:s', $time ); - } - - /** - * Optional accessor for neat code. - * Sets the database adapter you want to use. - * - * @param Adapter $adapter Database Adapter for facade to use - * - * @return void - */ - public static function setDatabaseAdapter( Adapter $adapter ) - { - self::$adapter = $adapter; - } - - /** - * Optional accessor for neat code. - * Sets the database adapter you want to use. - * - * @param QueryWriter $writer Query Writer instance for facade to use - * - * @return void - */ - public static function setWriter( QueryWriter $writer ) - { - self::$writer = $writer; - } - - /** - * Optional accessor for neat code. - * Sets the database adapter you want to use. - * - * @param OODB $redbean Object Database for facade to use - */ - public static function setRedBean( OODB $redbean ) - { - self::$redbean = $redbean; - } - - /** - * Optional accessor for neat code. - * Sets the database adapter you want to use. - * - * @return DBAdapter - */ - public static function getDatabaseAdapter() - { - return self::$adapter; - } - - /** - * Returns the current duplication manager instance. - * - * @return DuplicationManager - */ - public static function getDuplicationManager() - { - return self::$duplicationManager; - } - - /** - * Optional accessor for neat code. - * Sets the database adapter you want to use. - * - * @return QueryWriter - */ - public static function getWriter() - { - return self::$writer; - } - - /** - * Optional accessor for neat code. - * Sets the database adapter you want to use. - * - * @return OODB - */ - public static function getRedBean() - { - return self::$redbean; - } - - /** - * Returns the toolbox currently used by the facade. - * To set the toolbox use R::setup() or R::configureFacadeWithToolbox(). - * To create a toolbox use Setup::kickstart(). Or create a manual - * toolbox using the ToolBox class. - * - * @return ToolBox - */ - public static function getToolBox() - { - return self::$toolbox; - } - - /** - * Mostly for internal use, but might be handy - * for some users. - * This returns all the components of the currently - * selected toolbox. - * - * Returns the components in the following order: - * - * # OODB instance (getRedBean()) - * # Database Adapter - * # Query Writer - * # Toolbox itself - * - * @return array - */ - public static function getExtractedToolbox() - { - return array( self::$redbean, self::$adapter, self::$writer, self::$toolbox ); - } - - /** - * Facade method for AQueryWriter::renameAssociation() - * - * @param string|array $from - * @param string $to - * - * @return void - */ - public static function renameAssociation( $from, $to = NULL ) - { - AQueryWriter::renameAssociation( $from, $to ); - } - - /** - * Little helper method for Resty Bean Can server and others. - * Takes an array of beans and exports each bean. - * Unlike exportAll this method does not recurse into own lists - * and shared lists, the beans are exported as-is, only loaded lists - * are exported. - * - * @param array $beans beans - * - * @return array - */ - public static function beansToArray( $beans ) - { - $list = array(); - foreach( $beans as $bean ) $list[] = $bean->export(); - return $list; - } - - /** - * Sets the error mode for FUSE. - * What to do if a FUSE model method does not exist? - * You can set the following options: - * - * * OODBBean::C_ERR_IGNORE (default), ignores the call, returns NULL - * * OODBBean::C_ERR_LOG, logs the incident using error_log - * * OODBBean::C_ERR_NOTICE, triggers a E_USER_NOTICE - * * OODBBean::C_ERR_WARN, triggers a E_USER_WARNING - * * OODBBean::C_ERR_EXCEPTION, throws an exception - * * OODBBean::C_ERR_FUNC, allows you to specify a custom handler (function) - * * OODBBean::C_ERR_FATAL, triggers a E_USER_ERROR - * - * - * Custom handler method signature: handler( array ( - * 'message' => string - * 'bean' => OODBBean - * 'method' => string - * ) ) - * - * - * This method returns the old mode and handler as an array. - * - * @param integer $mode mode, determines how to handle errors - * @param callable|NULL $func custom handler (if applicable) - * - * @return array - */ - public static function setErrorHandlingFUSE( $mode, $func = NULL ) - { - return OODBBean::setErrorHandlingFUSE( $mode, $func ); - } - - /** - * Simple but effective debug function. - * Given a one or more beans this method will - * return an array containing first part of the string - * representation of each item in the array. - * - * @param OODBBean|array $data either a bean or an array of beans - * - * @return array - */ - public static function dump( $data ) - { - return Dump::dump( $data ); - } - - /** - * Binds an SQL function to a column. - * This method can be used to setup a decode/encode scheme or - * perform UUID insertion. This method is especially useful for handling - * MySQL spatial columns, because they need to be processed first using - * the asText/GeomFromText functions. - * - * Example: - * - * - * R::bindFunc( 'read', 'location.point', 'asText' ); - * R::bindFunc( 'write', 'location.point', 'GeomFromText' ); - * - * - * Passing NULL as the function will reset (clear) the function - * for this column/mode. - * - * @param string $mode mode for function: i.e. read or write - * @param string $field field (table.column) to bind function to - * @param string $function SQL function to bind to specified column - * - * @return void - */ - public static function bindFunc( $mode, $field, $function ) - { - self::$redbean->bindFunc( $mode, $field, $function ); - } - - /** - * Sets global aliases. - * - * @param array $list list of global aliases - * - * @return void - */ - public static function aliases( $list ) - { - OODBBean::aliases( $list ); - } - - /** - * Tries to find a bean matching a certain type and - * criteria set. If no beans are found a new bean - * will be created, the criteria will be imported into this - * bean and the bean will be stored and returned. - * If multiple beans match the criteria only the first one - * will be returned. - * - * @param string $type type of bean to search for - * @param array $like criteria set describing the bean to search for - * - * @return OODBBean - */ - public static function findOrCreate( $type, $like = array() ) - { - return self::$finder->findOrCreate( $type, $like ); - } - - /** - * Tries to find beans matching the specified type and - * criteria set. - * - * If the optional additional SQL snippet is a condition, it will - * be glued to the rest of the query using the AND operator. - * - * @param string $type type of bean to search for - * @param array $like optional criteria set describing the bean to search for - * @param string $sql optional additional SQL for sorting - * - * @return array - */ - public static function findLike( $type, $like = array(), $sql = '' ) - { - return self::$finder->findLike( $type, $like, $sql ); - } - - /** - * Starts logging queries. - * Use this method to start logging SQL queries being - * executed by the adapter. - * - * @note you cannot use R::debug and R::startLogging - * at the same time because R::debug is essentially a - * special kind of logging. - * - * @return void - */ - public static function startLogging() - { - self::debug( TRUE, RDefault::C_LOGGER_ARRAY ); - } - - /** - * Stops logging, comfortable method to stop logging of queries. - * - * @return void - */ - public static function stopLogging() - { - self::debug( FALSE ); - } - - /** - * Returns the log entries written after the startLogging. - * - * @return array - */ - public static function getLogs() - { - return self::getLogger()->getLogs(); - } - - /** - * Resets the Query counter. - * - * @return integer - */ - public static function resetQueryCount() - { - self::$adapter->getDatabase()->resetCounter(); - } - - /** - * Returns the number of SQL queries processed. - * - * @return integer - */ - public static function getQueryCount() - { - return self::$adapter->getDatabase()->getQueryCount(); - } - - /** - * Returns the current logger instance being used by the - * database object. - * - * @return Logger - */ - public static function getLogger() - { - return self::$adapter->getDatabase()->getLogger(); - } - - /** - * Alias for setAutoResolve() method on OODBBean. - * Enables or disables auto-resolving fetch types. - * Auto-resolving aliased parent beans is convenient but can - * be slower and can create infinite recursion if you - * used aliases to break cyclic relations in your domain. - * - * @param boolean $automatic TRUE to enable automatic resolving aliased parents - * - * @return void - */ - public static function setAutoResolve( $automatic = TRUE ) - { - OODBBean::setAutoResolve( (boolean) $automatic ); - } - - /** - * Dynamically extends the facade with a plugin. - * Using this method you can register your plugin with the facade and then - * use the plugin by invoking the name specified plugin name as a method on - * the facade. - * - * Usage: - * - * - * R::ext( 'makeTea', function() { ... } ); - * - * - * Now you can use your makeTea plugin like this: - * - * - * R::makeTea(); - * - * - * @param string $pluginName name of the method to call the plugin - * @param callable $callable a PHP callable - * - * @return void - */ - public static function ext( $pluginName, $callable ) - { - if ( !ctype_alnum( $pluginName ) ) { - throw new RedException( 'Plugin name may only contain alphanumeric characters.' ); - } - self::$plugins[$pluginName] = $callable; - } - - /** - * Call static for use with dynamic plugins. This magic method will - * intercept static calls and route them to the specified plugin. - * - * @param string $pluginName name of the plugin - * @param array $params list of arguments to pass to plugin method - * - * @return mixed - */ - public static function __callStatic( $pluginName, $params ) - { - if ( !ctype_alnum( $pluginName) ) { - throw new RedException( 'Plugin name may only contain alphanumeric characters.' ); - } - if ( !isset( self::$plugins[$pluginName] ) ) { - throw new RedException( 'Plugin \''.$pluginName.'\' does not exist, add this plugin using: R::ext(\''.$pluginName.'\')' ); - } - return call_user_func_array( self::$plugins[$pluginName], $params ); - } -} - diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php deleted file mode 100644 index 5a1b4b75..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Finder.php +++ /dev/null @@ -1,386 +0,0 @@ -toolbox = $toolbox; - $this->redbean = $toolbox->getRedBean(); - } - - /** - * Finds a bean using a type and a where clause (SQL). - * As with most Query tools in RedBean you can provide values to - * be inserted in the SQL statement by populating the value - * array parameter; you can either use the question mark notation - * or the slot-notation (:keyname). - * - * @param string $type type the type of bean you are looking for - * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings values array of values to be bound to parameters in query - * - * @return array - */ - public function find( $type, $sql = NULL, $bindings = array() ) - { - if ( !is_array( $bindings ) ) { - throw new RedException( - 'Expected array, ' . gettype( $bindings ) . ' given.' - ); - } - - return $this->redbean->find( $type, array(), $sql, $bindings ); - } - - /** - * Like find() but also exports the beans as an array. - * This method will perform a find-operation. For every bean - * in the result collection this method will call the export() method. - * This method returns an array containing the array representations - * of every bean in the result set. - * - * @see Finder::find - * - * @param string $type type the type of bean you are looking for - * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings values array of values to be bound to parameters in query - * - * @return array - */ - public function findAndExport( $type, $sql = NULL, $bindings = array() ) - { - $arr = array(); - foreach ( $this->find( $type, $sql, $bindings ) as $key => $item ) { - $arr[] = $item->export(); - } - - return $arr; - } - - /** - * Like find() but returns just one bean instead of an array of beans. - * This method will return only the first bean of the array. - * If no beans are found, this method will return NULL. - * - * @see Finder::find - * - * @param string $type type the type of bean you are looking for - * @param string $sql sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings values array of values to be bound to parameters in query - * - * @return OODBBean - */ - public function findOne( $type, $sql = NULL, $bindings = array() ) - { - $sql = $this->toolbox->getWriter()->glueLimitOne( $sql ); - - $items = $this->find( $type, $sql, $bindings ); - - if ( empty($items) ) { - return NULL; - } - - return reset( $items ); - } - - /** - * Like find() but returns the last bean of the result array. - * Opposite of Finder::findLast(). - * If no beans are found, this method will return NULL. - * - * @see Finder::find - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings values array of values to be bound to parameters in query - * - * @return OODBBean - */ - public function findLast( $type, $sql = NULL, $bindings = array() ) - { - $items = $this->find( $type, $sql, $bindings ); - - if ( empty($items) ) { - return NULL; - } - - return end( $items ); - } - - /** - * Tries to find beans of a certain type, - * if no beans are found, it dispenses a bean of that type. - * - * @see Finder::find - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings values array of values to be bound to parameters in query - * - * @return array - */ - public function findOrDispense( $type, $sql = NULL, $bindings = array() ) - { - $foundBeans = $this->find( $type, $sql, $bindings ); - - if ( empty( $foundBeans ) ) { - return array( $this->redbean->dispense( $type ) ); - } else { - return $foundBeans; - } - } - - /** - * Finds a BeanCollection using the repository. - * A bean collection can be used to retrieve one bean at a time using - * cursors - this is useful for processing large datasets. A bean collection - * will not load all beans into memory all at once, just one at a time. - * - * @param string $type the type of bean you are looking for - * @param string $sql SQL query to find the desired bean, starting right after WHERE clause - * @param array $bindings values array of values to be bound to parameters in query - * - * @return BeanCollection - */ - public function findCollection( $type, $sql, $bindings = array() ) - { - return $this->redbean->findCollection( $type, $sql, $bindings ); - } - - /** - * Finds or creates a bean. - * Tries to find a bean with certain properties specified in the second - * parameter ($like). If the bean is found, it will be returned. - * If multiple beans are found, only the first will be returned. - * If no beans match the criteria, a new bean will be dispensed, - * the criteria will be imported as properties and this new bean - * will be stored and returned. - * - * Format of criteria set: property => value - * The criteria set also supports OR-conditions: property => array( value1, orValue2 ) - * - * @param string $type type of bean to search for - * @param array $like criteria set describing bean to search for - * - * @return OODBBean - */ - public function findOrCreate( $type, $like = array() ) - { - $beans = $this->findLike( $type, $like ); - if ( count( $beans ) ) { - $bean = reset( $beans ); - return $bean; - } - - $bean = $this->redbean->dispense( $type ); - $bean->import( $like ); - $this->redbean->store( $bean ); - return $bean; - } - - /** - * Finds beans by its type and a certain criteria set. - * - * Format of criteria set: property => value - * The criteria set also supports OR-conditions: property => array( value1, orValue2 ) - * - * If the additional SQL is a condition, this condition will be glued to the rest - * of the query using an AND operator. Note that this is as far as this method - * can go, there is no way to glue additional SQL using an OR-condition. - * This method provides access to an underlying mechanism in the RedBeanPHP architecture - * to find beans using criteria sets. However, please do not use this method - * for complex queries, use plain SQL instead ( the regular find method ) as it is - * more suitable for the job. This method is - * meant for basic search-by-example operations. - * - * @param string $type type of bean to search for - * @param array $conditions criteria set describing the bean to search for - * @param string $sql additional SQL (for sorting) - * - * @return array - */ - public function findLike( $type, $conditions = array(), $sql = '' ) - { - if ( count( $conditions ) > 0 ) { - foreach( $conditions as $key => $condition ) { - if ( !count( $condition ) ) unset( $conditions[$key] ); - } - } - - return $this->redbean->find( $type, $conditions, $sql ); - } - - /** - * Returns a hashmap with bean arrays keyed by type using an SQL - * query as its resource. Given an SQL query like 'SELECT movie.*, review.* FROM movie... JOIN review' - * this method will return movie and review beans. - * - * Example: - * - * - * $stuff = $finder->findMulti('movie,review', ' - * SELECT movie.*, review.* FROM movie - * LEFT JOIN review ON review.movie_id = movie.id'); - * - * - * After this operation, $stuff will contain an entry 'movie' containing all - * movies and an entry named 'review' containing all reviews (all beans). - * You can also pass bindings. - * - * If you want to re-map your beans, so you can use $movie->ownReviewList without - * having RedBeanPHP executing an SQL query you can use the fourth parameter to - * define a selection of remapping closures. - * - * The remapping argument (optional) should contain an array of arrays. - * Each array in the remapping array should contain the following entries: - * - * - * array( - * 'a' => TYPE A - * 'b' => TYPE B - * 'matcher' => MATCHING FUNCTION ACCEPTING A, B and ALL BEANS - * 'do' => OPERATION FUNCTION ACCEPTING A, B, ALL BEANS, ALL REMAPPINGS - * ) - * - * - * Using this mechanism you can build your own 'preloader' with tiny function - * snippets (and those can be re-used and shared online of course). - * - * Example: - * - * - * array( - * 'a' => 'movie' //define A as movie - * 'b' => 'review' //define B as review - * 'matcher' => function( $a, $b ) { - * return ( $b->movie_id == $a->id ); //Perform action if review.movie_id equals movie.id - * } - * 'do' => function( $a, $b ) { - * $a->noLoad()->ownReviewList[] = $b; //Add the review to the movie - * $a->clearHistory(); //optional, act 'as if these beans have been loaded through ownReviewList'. - * } - * ) - * - * - * The Query Template parameter is optional as well but can be used to - * set a different SQL template (sprintf-style) for processing the original query. - * - * @note the SQL query provided IS NOT THE ONE used internally by this function, - * this function will pre-process the query to get all the data required to find the beans. - * - * @note if you use the 'book.*' notation make SURE you're - * selector starts with a SPACE. ' book.*' NOT ',book.*'. This is because - * it's actually an SQL-like template SLOT, not real SQL. - * - * @note instead of an SQL query you can pass a result array as well. - * - * @param string|array $types a list of types (either array or comma separated string) - * @param string|array $sqlOrArr an SQL query or an array of prefetched records - * @param array $bindings optional, bindings for SQL query - * @param array $remappings optional, an array of remapping arrays - * @param string $queryTemplate optional, query template - * - * @return array - */ - public function findMulti( $types, $sql, $bindings = array(), $remappings = array(), $queryTemplate = ' %s.%s AS %s__%s' ) - { - if ( !is_array( $types ) ) $types = explode( ',', $types ); - if ( !is_array( $sql ) ) { - $writer = $this->toolbox->getWriter(); - $adapter = $this->toolbox->getDatabaseAdapter(); - - //Repair the query, replace book.* with book.id AS book_id etc.. - foreach( $types as $type ) { - $pattern = " {$type}.*"; - if ( strpos( $sql, $pattern ) !== FALSE ) { - $newSelectorArray = array(); - $columns = $writer->getColumns( $type ); - foreach( $columns as $column => $definition ) { - $newSelectorArray[] = sprintf( $queryTemplate, $type, $column, $type, $column ); - } - $newSelector = implode( ',', $newSelectorArray ); - $sql = str_replace( $pattern, $newSelector, $sql ); - } - } - - $rows = $adapter->get( $sql, $bindings ); - } else { - $rows = $sql; - } - - //Gather the bean data from the query results using the prefix - $wannaBeans = array(); - foreach( $types as $type ) { - $wannaBeans[$type] = array(); - $prefix = "{$type}__"; - foreach( $rows as $rowkey=>$row ) { - $wannaBean = array(); - foreach( $row as $cell => $value ) { - if ( strpos( $cell, $prefix ) === 0 ) { - $property = substr( $cell, strlen( $prefix ) ); - unset( $rows[$rowkey][$cell] ); - $wannaBean[$property] = $value; - } - } - if ( !isset( $wannaBean['id'] ) ) continue; - if ( is_null( $wannaBean['id'] ) ) continue; - $wannaBeans[$type][$wannaBean['id']] = $wannaBean; - } - } - - //Turn the rows into beans - $beans = array(); - foreach( $wannaBeans as $type => $wannabees ) { - $beans[$type] = $this->redbean->convertToBeans( $type, $wannabees ); - } - - //Apply additional re-mappings - foreach($remappings as $remapping) { - $a = $remapping['a']; - $b = $remapping['b']; - $matcher = $remapping['matcher']; - $do = $remapping['do']; - foreach( $beans[$a] as $bean ) { - foreach( $beans[$b] as $putBean ) { - if ( $matcher( $bean, $putBean, $beans ) ) $do( $bean, $putBean, $beans, $remapping ); - } - } - } - return $beans; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php deleted file mode 100644 index 259aac8c..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Functions.php +++ /dev/null @@ -1,78 +0,0 @@ - - * R::find( 'paint', ' color_id = ? ', [ EID('color:yellow') ] ); - * - * - * If a function called EID() already exists you'll have to write this - * wrapper yourself ;) - * - * @param string $enumName enum code as you would pass to R::enum() - * - * @return mixed - */ -if (!function_exists('EID')) { - - function EID($enumName) - { - return \RedBeanPHP\Facade::enum( $enumName )->id; - } - -} - -/** - * Prints the result of R::dump() to the screen using - * print_r. - * - * @param mixed $data data to dump - * - * @return void - */ -if ( !function_exists( 'dump' ) ) { - - function dmp( $list ) - { - print_r( \RedBeanPHP\Facade::dump( $list ) ); - } -} - -/** - * Function alias for R::genSlots(). - */ -if ( !function_exists( 'genslots' ) ) { - - function genslots( $slots, $tpl = NULL ) - { - return \RedBeanPHP\Facade::genSlots( $slots, $tpl ); - } -} - -/** - * Function alias for R::flat(). - */ -if ( !function_exists( 'array_flatten' ) ) { - - function array_flatten( $array ) - { - return \RedBeanPHP\Facade::flat( $array ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php deleted file mode 100644 index 23010fad..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/LabelMaker.php +++ /dev/null @@ -1,182 +0,0 @@ -toolbox = $toolbox; - } - - /** - * A label is a bean with only an id, type and name property. - * This function will dispense beans for all entries in the array. The - * values of the array will be assigned to the name property of each - * individual bean. - * - * - * $people = R::dispenseLabels( 'person', [ 'Santa', 'Claus' ] ); - * - * - * @param string $type type of beans you would like to have - * @param array $labels list of labels, names for each bean - * - * @return array - */ - public function dispenseLabels( $type, $labels ) - { - $labelBeans = array(); - foreach ( $labels as $label ) { - $labelBean = $this->toolbox->getRedBean()->dispense( $type ); - $labelBean->name = $label; - $labelBeans[] = $labelBean; - } - - return $labelBeans; - } - - /** - * Gathers labels from beans. This function loops through the beans, - * collects the value of the name property for each individual bean - * and stores the names in a new array. The array then gets sorted using the - * default sort function of PHP (sort). - * - * Usage: - * - * - * $o1->name = 'hamburger'; - * $o2->name = 'pizza'; - * implode( ',', R::gatherLabels( [ $o1, $o2 ] ) ); //hamburger,pizza - * - * - * Note that the return value is an array of strings, not beans. - * - * @param array $beans list of beans to loop through - * - * @return array - */ - public function gatherLabels( $beans ) - { - $labels = array(); - - foreach ( $beans as $bean ) { - $labels[] = $bean->name; - } - - sort( $labels ); - - return $labels; - } - - /** - * Fetches an ENUM from the database and creates it if necessary. - * An ENUM has the following format: - * - * - * ENUM:VALUE - * - * - * If you pass 'ENUM' only, this method will return an array of its - * values: - * - * - * implode( ',', R::gatherLabels( R::enum( 'flavour' ) ) ) //'BANANA,MOCCA' - * - * - * If you pass 'ENUM:VALUE' this method will return the specified enum bean - * and create it in the database if it does not exist yet: - * - * - * $bananaFlavour = R::enum( 'flavour:banana' ); - * $bananaFlavour->name; - * - * - * So you can use this method to set an ENUM value in a bean: - * - * - * $shake->flavour = R::enum( 'flavour:banana' ); - * - * - * the property flavour now contains the enum bean, a parent bean. - * In the database, flavour_id will point to the flavour record with name 'banana'. - * - * @param string $enum ENUM specification for label - * - * @return array|OODBBean - */ - public function enum( $enum ) - { - $oodb = $this->toolbox->getRedBean(); - - if ( strpos( $enum, ':' ) === FALSE ) { - $type = $enum; - $value = FALSE; - } else { - list( $type, $value ) = explode( ':', $enum ); - $value = preg_replace( '/\W+/', '_', strtoupper( trim( $value ) ) ); - } - - /** - * We use simply find here, we could use inspect() in fluid mode etc, - * but this would be useless. At first sight it looks clean, you could even - * bake this into find(), however, find not only has to deal with the primary - * search type, people can also include references in the SQL part, so avoiding - * find failures does not matter, this is still the quickest way making use - * of existing functionality. - * - * @note There seems to be a bug in XDebug v2.3.2 causing suppressed - * exceptions like these to surface anyway, to prevent this use: - * - * "xdebug.default_enable = 0" - * - * Also see Github Issue #464 - */ - $values = $oodb->find( $type ); - - if ( $value === FALSE ) { - return $values; - } - - foreach( $values as $enumItem ) { - if ( $enumItem->name === $value ) return $enumItem; - } - - $newEnumItems = $this->dispenseLabels( $type, array( $value ) ); - $newEnumItem = reset( $newEnumItems ); - - $oodb->store( $newEnumItem ); - - return $newEnumItem; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php deleted file mode 100755 index 3699e66b..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Logger.php +++ /dev/null @@ -1,34 +0,0 @@ -mode === self::C_LOGGER_ECHO ) { - echo $log; - } else { - $this->logs[] = $log; - } - } else { - if ( $this->mode === self::C_LOGGER_ECHO ) { - echo $argument; - } else { - $this->logs[] = $argument; - } - } - - if ( $this->mode === self::C_LOGGER_ECHO ) echo "
" . PHP_EOL; - } - } - - /** - * Returns the internal log array. - * The internal log array is where all log messages are stored. - * - * @return array - */ - public function getLogs() - { - return $this->logs; - } - - /** - * Clears the internal log array, removing all - * previously stored entries. - * - * @return self - */ - public function clear() - { - $this->logs = array(); - return $this; - } - - /** - * Selects a logging mode. - * There are several options available. - * - * * C_LOGGER_ARRAY - log silently, stores entries in internal log array only - * * C_LOGGER_ECHO - also forward log messages directly to STDOUT - * - * @param integer $mode mode of operation for logging object - * - * @return self - */ - public function setMode( $mode ) - { - if ($mode !== self::C_LOGGER_ARRAY && $mode !== self::C_LOGGER_ECHO ) { - throw new RedException( 'Invalid mode selected for logger, use C_LOGGER_ARRAY or C_LOGGER_ECHO.' ); - } - $this->mode = $mode; - return $this; - } - - /** - * Searches for all log entries in internal log array - * for $needle and returns those entries. - * This method will return an array containing all matches for your - * search query. - * - * @param string $needle phrase to look for in internal log array - * - * @return array - */ - public function grep( $needle ) - { - $found = array(); - foreach( $this->logs as $logEntry ) { - if ( strpos( $logEntry, $needle ) !== FALSE ) $found[] = $logEntry; - } - return $found; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Logger/RDefault/Debug.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Logger/RDefault/Debug.php deleted file mode 100644 index a17fbbe1..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Logger/RDefault/Debug.php +++ /dev/null @@ -1,185 +0,0 @@ - $value ) { - if ( strpos( $slot, ':' ) === 0 ) { - $newStr = str_replace( $slot, $this->fillInValue( $value ), $newStr ); - } - } - return $newStr; - } - - /** - * Fills in a value of a binding and truncates the - * resulting string if necessary. - * - * @param mixed $value bound value - * - * @return string - */ - protected function fillInValue( $value ) - { - if ( is_null( $value ) ) $value = 'NULL'; - - $value = strval( $value ); - if ( strlen( $value ) > ( $this->strLen ) ) { - $value = substr( $value, 0, ( $this->strLen ) ).'... '; - } - - if ( !is_numeric( $value ) && $value !== 'NULL') { - $value = '\''.$value.'\''; - } - - return $value; - } - - /** - * Dependending on the current mode of operation, - * this method will either log and output to STDIN or - * just log. - * - * @param string $str string to log or output and log - * - * @return void - */ - protected function output( $str ) - { - $this->logs[] = $str; - if ( !$this->mode ) echo $str ,'
'; - } - - /** - * Normalizes the slots in an SQL string. - * Replaces question mark slots with :slot1 :slot2 etc. - * - * @param string $sql sql to normalize - * - * @return string - */ - protected function normalizeSlots( $sql ) - { - $i = 0; - $newSql = $sql; - while($i < 20 && strpos($newSql, '?') !== FALSE ){ - $pos = strpos( $newSql, '?' ); - $slot = ':slot'.$i; - $begin = substr( $newSql, 0, $pos ); - $end = substr( $newSql, $pos+1 ); - $newSql = $begin . $slot . $end; - $i++; - } - return $newSql; - } - - /** - * Normalizes the bindings. - * Replaces numeric binding keys with :slot1 :slot2 etc. - * - * @param array $bindings bindings to normalize - * - * @return array - */ - protected function normalizeBindings( $bindings ) - { - $i = 0; - $newBindings = array(); - foreach( $bindings as $key => $value ) { - if ( is_numeric($key) ) { - $newKey = ':slot'.$i; - $newBindings[$newKey] = $value; - $i++; - } else { - $newBindings[$key] = $value; - } - } - return $newBindings; - } - - /** - * Logger method. - * - * Takes a number of arguments tries to create - * a proper debug log based on the available data. - * - * @return void - */ - public function log() - { - if ( func_num_args() < 1 ) return; - - $sql = func_get_arg( 0 ); - - if ( func_num_args() < 2) { - $bindings = array(); - } else { - $bindings = func_get_arg( 1 ); - } - - if ( !is_array( $bindings ) ) { - return $this->output( $sql ); - } - - $newSql = $this->normalizeSlots( $sql ); - $newBindings = $this->normalizeBindings( $bindings ); - $newStr = $this->writeQuery( $newSql, $newBindings ); - $this->output( $newStr ); - } - - /** - * Sets the max string length for the parameter output in - * SQL queries. Set this value to a reasonable number to - * keep you SQL queries readable. - * - * @param integer $len string length - * - * @return self - */ - public function setParamStringLength( $len = 20 ) - { - $this->strLen = max(0, $len); - return $this; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/OODB.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/OODB.php deleted file mode 100755 index abc37d2e..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/OODB.php +++ /dev/null @@ -1,545 +0,0 @@ -unbox(); - } - if ( !( $bean instanceof OODBBean ) ) { - throw new RedException( 'OODB Store requires a bean, got: ' . gettype( $bean ) ); - } - - return $bean; - } - - /** - * Constructor, requires a query writer. - * - * @param QueryWriter $writer writer - * @param array|boolean $frozen mode of operation: TRUE (frozen), FALSE (default, fluid) or ARRAY (chilled) - */ - public function __construct( QueryWriter $writer, $frozen = FALSE ) - { - if ( $writer instanceof QueryWriter ) { - $this->writer = $writer; - } - - $this->freeze( $frozen ); - } - - /** - * Toggles fluid or frozen mode. In fluid mode the database - * structure is adjusted to accomodate your objects. In frozen mode - * this is not the case. - * - * You can also pass an array containing a selection of frozen types. - * Let's call this chilly mode, it's just like fluid mode except that - * certain types (i.e. tables) aren't touched. - * - * @param boolean|array $toggle TRUE if you want to use OODB instance in frozen mode - * - * @return void - */ - public function freeze( $toggle ) - { - if ( is_array( $toggle ) ) { - $this->chillList = $toggle; - $this->isFrozen = FALSE; - } else { - $this->isFrozen = (boolean) $toggle; - } - - if ( $this->isFrozen ) { - if ( !$this->frozenRepository ) { - $this->frozenRepository = new FrozenRepo( $this, $this->writer ); - } - - $this->repository = $this->frozenRepository; - - } else { - if ( !$this->fluidRepository ) { - $this->fluidRepository = new FluidRepo( $this, $this->writer ); - } - - $this->repository = $this->fluidRepository; - } - - if ( count( self::$sqlFilters ) ) { - AQueryWriter::setSQLFilters( self::$sqlFilters, ( !$this->isFrozen ) ); - } - - } - - /** - * Returns the current mode of operation of RedBean. - * In fluid mode the database - * structure is adjusted to accomodate your objects. - * In frozen mode - * this is not the case. - * - * @return boolean - */ - public function isFrozen() - { - return (bool) $this->isFrozen; - } - - /** - * Determines whether a type is in the chill list. - * If a type is 'chilled' it's frozen, so its schema cannot be - * changed anymore. However other bean types may still be modified. - * This method is a convenience method for other objects to check if - * the schema of a certain type is locked for modification. - * - * @param string $type the type you wish to check - * - * @return boolean - */ - public function isChilled( $type ) - { - return (boolean) ( in_array( $type, $this->chillList ) ); - } - - /** - * Dispenses a new bean (a OODBBean Bean Object) - * of the specified type. Always - * use this function to get an empty bean object. Never - * instantiate a OODBBean yourself because it needs - * to be configured before you can use it with RedBean. This - * function applies the appropriate initialization / - * configuration for you. - * - * @param string $type type of bean you want to dispense - * @param string $number number of beans you would like to get - * @param boolean $alwaysReturnArray if TRUE always returns the result as an array - * - * @return OODBBean - */ - public function dispense( $type, $number = 1, $alwaysReturnArray = FALSE ) - { - if ( $number < 1 ) { - if ( $alwaysReturnArray ) return array(); - return NULL; - } - - return $this->repository->dispense( $type, $number, $alwaysReturnArray ); - } - - /** - * Sets bean helper to be given to beans. - * Bean helpers assist beans in getting a reference to a toolbox. - * - * @param BeanHelper $beanhelper helper - * - * @return void - */ - public function setBeanHelper( BeanHelper $beanhelper ) - { - $this->beanhelper = $beanhelper; - } - - /** - * Returns the current bean helper. - * Bean helpers assist beans in getting a reference to a toolbox. - * - * @return BeanHelper - */ - public function getBeanHelper() - { - return $this->beanhelper; - } - - /** - * Checks whether a OODBBean bean is valid. - * If the type is not valid or the ID is not valid it will - * throw an exception: Security. - * - * @param OODBBean $bean the bean that needs to be checked - * - * @return void - */ - public function check( OODBBean $bean ) - { - $this->repository->check( $bean ); - } - - /** - * Searches the database for a bean that matches conditions $conditions and sql $addSQL - * and returns an array containing all the beans that have been found. - * - * Conditions need to take form: - * - * - * array( - * 'PROPERTY' => array( POSSIBLE VALUES... 'John', 'Steve' ) - * 'PROPERTY' => array( POSSIBLE VALUES... ) - * ); - * - * - * All conditions are glued together using the AND-operator, while all value lists - * are glued using IN-operators thus acting as OR-conditions. - * - * Note that you can use property names; the columns will be extracted using the - * appropriate bean formatter. - * - * @param string $type type of beans you are looking for - * @param array $conditions list of conditions - * @param string $addSQL SQL to be used in query - * @param array $bindings a list of values to bind to query parameters - * - * @return array - */ - public function find( $type, $conditions = array(), $sql = NULL, $bindings = array() ) - { - return $this->repository->find( $type, $conditions, $sql, $bindings ); - } - - /** - * Same as find() but returns a BeanCollection. - * - * @param string $type type of beans you are looking for - * @param string $addSQL SQL to be used in query - * @param array $bindings a list of values to bind to query parameters - * - * @return array - */ - public function findCollection( $type, $sql = NULL, $bindings = array() ) - { - return $this->repository->findCollection( $type, $sql, $bindings ); - } - - /** - * Checks whether the specified table already exists in the database. - * Not part of the Object Database interface! - * - * @deprecated Use AQueryWriter::typeExists() instead. - * - * @param string $table table name - * - * @return boolean - */ - public function tableExists( $table ) - { - return $this->repository->tableExists( $table ); - } - - /** - * Stores a bean in the database. This method takes a - * OODBBean Bean Object $bean and stores it - * in the database. If the database schema is not compatible - * with this bean and RedBean runs in fluid mode the schema - * will be altered to store the bean correctly. - * If the database schema is not compatible with this bean and - * RedBean runs in frozen mode it will throw an exception. - * This function returns the primary key ID of the inserted - * bean. - * - * The return value is an integer if possible. If it is not possible to - * represent the value as an integer a string will be returned. We use - * explicit casts instead of functions to preserve performance - * (0.13 vs 0.28 for 10000 iterations on Core i3). - * - * @param OODBBean|SimpleModel $bean bean to store - * - * @return integer|string - */ - public function store( $bean ) - { - $bean = $this->unboxIfNeeded( $bean ); - $id = $this->repository->store( $bean ); - if ( self::$autoClearHistoryAfterStore ) { - $bean->clearHistory(); - } - return $id; - } - - /** - * Loads a bean from the object database. - * It searches for a OODBBean Bean Object in the - * database. It does not matter how this bean has been stored. - * RedBean uses the primary key ID $id and the string $type - * to find the bean. The $type specifies what kind of bean you - * are looking for; this is the same type as used with the - * dispense() function. If RedBean finds the bean it will return - * the OODB Bean object; if it cannot find the bean - * RedBean will return a new bean of type $type and with - * primary key ID 0. In the latter case it acts basically the - * same as dispense(). - * - * Important note: - * If the bean cannot be found in the database a new bean of - * the specified type will be generated and returned. - * - * @param string $type type of bean you want to load - * @param integer $id ID of the bean you want to load - * - * @return OODBBean - */ - public function load( $type, $id ) - { - return $this->repository->load( $type, $id ); - } - - /** - * Removes a bean from the database. - * This function will remove the specified OODBBean - * Bean Object from the database. - * - * @param OODBBean|SimpleModel $bean bean you want to remove from database - * - * @return void - */ - public function trash( $bean ) - { - $bean = $this->unboxIfNeeded( $bean ); - return $this->repository->trash( $bean ); - } - - /** - * Returns an array of beans. Pass a type and a series of ids and - * this method will bring you the corresponding beans. - * - * important note: Because this method loads beans using the load() - * function (but faster) it will return empty beans with ID 0 for - * every bean that could not be located. The resulting beans will have the - * passed IDs as their keys. - * - * @param string $type type of beans - * @param array $ids ids to load - * - * @return array - */ - public function batch( $type, $ids ) - { - return $this->repository->batch( $type, $ids ); - } - - /** - * This is a convenience method; it converts database rows - * (arrays) into beans. Given a type and a set of rows this method - * will return an array of beans of the specified type loaded with - * the data fields provided by the result set from the database. - * - * @param string $type type of beans you would like to have - * @param array $rows rows from the database result - * - * @return array - */ - public function convertToBeans( $type, $rows ) - { - return $this->repository->convertToBeans( $type, $rows ); - } - - /** - * Counts the number of beans of type $type. - * This method accepts a second argument to modify the count-query. - * A third argument can be used to provide bindings for the SQL snippet. - * - * @param string $type type of bean we are looking for - * @param string $addSQL additional SQL snippet - * @param array $bindings parameters to bind to SQL - * - * @return integer - */ - public function count( $type, $addSQL = '', $bindings = array() ) - { - return $this->repository->count( $type, $addSQL, $bindings ); - } - - /** - * Trash all beans of a given type. Wipes an entire type of bean. - * - * @param string $type type of bean you wish to delete all instances of - * - * @return boolean - */ - public function wipe( $type ) - { - return $this->repository->wipe( $type ); - } - - /** - * Returns an Association Manager for use with OODB. - * A simple getter function to obtain a reference to the association manager used for - * storage and more. - * - * @return AssociationManager - */ - public function getAssociationManager() - { - if ( !isset( $this->assocManager ) ) { - throw new RedException( 'No association manager available.' ); - } - - return $this->assocManager; - } - - /** - * Sets the association manager instance to be used by this OODB. - * A simple setter function to set the association manager to be used for storage and - * more. - * - * @param AssociationManager $assoc sets the association manager to be used - * - * @return void - */ - public function setAssociationManager( AssociationManager $assocManager ) - { - $this->assocManager = $assocManager; - } - - /** - * Returns the currently used repository instance. - * For testing purposes only. - * - * @return Repository - */ - public function getCurrentRepository() - { - return $this->repository; - } - - /** - * Binds an SQL function to a column. - * This method can be used to setup a decode/encode scheme or - * perform UUID insertion. This method is especially useful for handling - * MySQL spatial columns, because they need to be processed first using - * the asText/GeomFromText functions. - * - * @param string $mode mode to set function for, i.e. read or write - * @param string $field field (table.column) to bind SQL function to - * @param string $function SQL function to bind to field - * - * @return void - */ - public function bindFunc( $mode, $field, $function ) - { - list( $type, $property ) = explode( '.', $field ); - $mode = ($mode === 'write') ? QueryWriter::C_SQLFILTER_WRITE : QueryWriter::C_SQLFILTER_READ; - - if ( !isset( self::$sqlFilters[$mode] ) ) self::$sqlFilters[$mode] = array(); - if ( !isset( self::$sqlFilters[$mode][$type] ) ) self::$sqlFilters[$mode][$type] = array(); - - if ( is_null( $function ) ) { - unset( self::$sqlFilters[$mode][$type][$property] ); - } else { - if ($mode === QueryWriter::C_SQLFILTER_WRITE) { - self::$sqlFilters[$mode][$type][$property] = $function.'(?)'; - } else { - self::$sqlFilters[$mode][$type][$property] = $function."($field)"; - } - } - - AQueryWriter::setSQLFilters( self::$sqlFilters, ( !$this->isFrozen ) ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php deleted file mode 100755 index 1854a8a7..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/OODBBean.php +++ /dev/null @@ -1,1820 +0,0 @@ - - * Custom handler method signature: handler( array ( - * 'message' => string - * 'bean' => OODBBean - * 'method' => string - * ) ) - * - * - * This method returns the old mode and handler as an array. - * - * @param integer $mode error handling mode - * @param callable|NULL $func custom handler - * - * @return array - */ - public static function setErrorHandlingFUSE($mode, $func = NULL) { - if ( - $mode !== self::C_ERR_IGNORE - && $mode !== self::C_ERR_LOG - && $mode !== self::C_ERR_NOTICE - && $mode !== self::C_ERR_WARN - && $mode !== self::C_ERR_EXCEPTION - && $mode !== self::C_ERR_FUNC - && $mode !== self::C_ERR_FATAL - ) throw new \Exception( 'Invalid error mode selected' ); - - if ( $mode === self::C_ERR_FUNC && !is_callable( $func ) ) { - throw new \Exception( 'Invalid error handler' ); - } - - $old = array( self::$errorHandlingFUSE, self::$errorHandler ); - self::$errorHandlingFUSE = $mode; - if ( is_callable( $func ) ) { - self::$errorHandler = $func; - } else { - self::$errorHandler = NULL; - } - return $old; - } - - /** - * Sets global aliases. - * - * @param array $list list of global aliases to use - * - * @return void - */ - public static function aliases( $list ) - { - self::$aliases = $list; - } - - /** - * Enables or disables auto-resolving fetch types. - * Auto-resolving aliased parent beans is convenient but can - * be slower and can create infinite recursion if you - * used aliases to break cyclic relations in your domain. - * - * @param boolean $automatic TRUE to enable automatic resolving aliased parents - * - * @return void - */ - public static function setAutoResolve( $automatic = TRUE ) - { - self::$autoResolve = (boolean) $automatic; - } - - /** - * Sets a meta property for all beans. This is a quicker way to set - * the meta properties for a collection of beans because this method - * can directly access the property arrays of the beans. - * This method returns the beans. - * - * @param array $beans beans to set the meta property of - * @param string $property property to set - * @param mixed $value value - * - * @return array - */ - public static function setMetaAll( $beans, $property, $value ) - { - foreach( $beans as $bean ) { - if ( $bean instanceof OODBBean ) $bean->__info[ $property ] = $value; - } - - return $beans; - } - - /** - * Parses the join in the with-snippet. - * For instance: - * - * $author - * ->withCondition(' @joined.detail.title LIKE ? ') - * ->ownBookList; - * - * will automatically join 'detail' on book to - * access the title field. - * - * @note this feature requires Narrow Field Mode and Join Feature - * to be both activated (default). - * - * @param string $type the source type for the join - * - * @return string - */ - private function parseJoin( $type ) - { - $joinSql = ''; - $joins = array(); - if ( strpos($this->withSql, '@joined.' ) !== FALSE ) { - $writer = $this->beanHelper->getToolBox()->getWriter(); - $oldParts = $parts = explode( '@joined.', $this->withSql ); - array_shift( $parts ); - foreach($parts as $part) { - $explosion = explode( '.', $part ); - $joinInfo = array_shift( $explosion ); - //Dont join more than once.. - if ( !isset( $joins[$joinInfo] ) ) { - $joins[ $joinInfo ] = true; - $joinSql .= $writer->writeJoin( $type, $joinInfo, 'LEFT' ); - } - } - $this->withSql = implode( '', $oldParts ); - $joinSql .= ' WHERE '; - } - return $joinSql; - } - - /** - * Internal method. - * Obtains a shared list for a certain type. - * - * @param string $type the name of the list you want to retrieve. - * - * @return array - */ - private function getSharedList( $type, $redbean, $toolbox ) - { - $writer = $toolbox->getWriter(); - - if ( $this->via ) { - $oldName = $writer->getAssocTable( array( $this->__info['type'], $type ) ); - if ( $oldName !== $this->via ) { - //set the new renaming rule - $writer->renameAssocTable( $oldName, $this->via ); - } - $this->via = NULL; - } - - $beans = array(); - if ($this->getID()) { - $type = $this->beau( $type ); - $assocManager = $redbean->getAssociationManager(); - $beans = $assocManager->related( $this, $type, $this->withSql, $this->withParams ); - } - - $this->withSql = ''; - $this->withParams = array(); - - return $beans; - } - - /** - * Internal method. - * Obtains the own list of a certain type. - * - * @param string $type name of the list you want to retrieve - * @param OODB $oodb The RB OODB object database instance - * - * @return array - */ - private function getOwnList( $type, $redbean ) - { - $type = $this->beau( $type ); - - if ( $this->aliasName ) { - $parentField = $this->aliasName; - $myFieldLink = $parentField . '_id'; - - $this->__info['sys.alias.' . $type] = $this->aliasName; - - $this->aliasName = NULL; - } else { - $parentField = $this->__info['type']; - $myFieldLink = $parentField . '_id'; - } - - $beans = array(); - - if ( $this->getID() ) { - - $firstKey = NULL; - if ( count( $this->withParams ) > 0 ) { - reset( $this->withParams ); - - $firstKey = key( $this->withParams ); - } - - $joinSql = $this->parseJoin( $type ); - - if ( !is_numeric( $firstKey ) || $firstKey === NULL ) { - $bindings = $this->withParams; - $bindings[':slot0'] = $this->getID(); - - $beans = $redbean->find( $type, array(), " {$joinSql} $myFieldLink = :slot0 " . $this->withSql, $bindings ); - } else { - $bindings = array_merge( array( $this->getID() ), $this->withParams ); - - $beans = $redbean->find( $type, array(), " {$joinSql} $myFieldLink = ? " . $this->withSql, $bindings ); - } - } - - $this->withSql = ''; - $this->withParams = array(); - - foreach ( $beans as $beanFromList ) { - $beanFromList->__info['sys.parentcache.' . $parentField] = $this; - } - - return $beans; - } - - /** - * Initializes a bean. Used by OODB for dispensing beans. - * It is not recommended to use this method to initialize beans. Instead - * use the OODB object to dispense new beans. You can use this method - * if you build your own bean dispensing mechanism. - * - * @param string $type type of the new bean - * @param BeanHelper $beanhelper bean helper to obtain a toolbox and a model - * - * @return void - */ - public function initializeForDispense( $type, BeanHelper $beanhelper ) - { - $this->beanHelper = $beanhelper; - $this->__info['type'] = $type; - $this->__info['sys.id'] = 'id'; - $this->__info['sys.orig'] = array( 'id' => 0 ); - $this->__info['tainted'] = TRUE; - $this->__info['changed'] = TRUE; - $this->properties['id'] = 0; - } - - /** - * Sets the Bean Helper. Normally the Bean Helper is set by OODB. - * Here you can change the Bean Helper. The Bean Helper is an object - * providing access to a toolbox for the bean necessary to retrieve - * nested beans (bean lists: ownBean, sharedBean) without the need to - * rely on static calls to the facade (or make this class dep. on OODB). - * - * @param BeanHelper $helper helper to use for this bean - * - * @return void - */ - public function setBeanHelper( BeanHelper $helper ) - { - $this->beanHelper = $helper; - } - - /** - * Returns an ArrayIterator so you can treat the bean like - * an array with the properties container as its contents. - * This method is meant for PHP and allows you to access beans as if - * they were arrays, i.e. using array notation: - * - * $bean[$key] = $value; - * - * Note that not all PHP functions work with the array interface. - * - * @return ArrayIterator - */ - public function getIterator() - { - return new \ArrayIterator( $this->properties ); - } - - /** - * Imports all values from an associative array $array. Chainable. - * This method imports the values in the first argument as bean - * propery and value pairs. Use the second parameter to provide a - * selection. If a selection array is passed, only the entries - * having keys mentioned in the selection array will be imported. - * Set the third parameter to TRUE to preserve spaces in selection keys. - * - * @param array $array what you want to import - * @param string|array $selection selection of values - * @param boolean $notrim if TRUE selection keys will NOT be trimmed - * - * @return OODBBean - */ - public function import( $array, $selection = FALSE, $notrim = FALSE ) - { - if ( is_string( $selection ) ) { - $selection = explode( ',', $selection ); - } - - if ( !$notrim && is_array( $selection ) ) { - foreach ( $selection as $key => $selected ) { - $selection[$key] = trim( $selected ); - } - } - - foreach ( $array as $key => $value ) { - if ( $key != '__info' ) { - if ( !$selection || ( $selection && in_array( $key, $selection ) ) ) { - if ( is_array($value ) ) { - if ( isset( $value['_type'] ) ) { - $bean = $this->beanHelper->getToolbox()->getRedBean()->dispense( $value['_type'] ); - unset( $value['_type'] ); - $bean->import($value); - $this->$key = $bean; - } else { - $listBeans = array(); - foreach( $value as $listKey => $listItem ) { - $bean = $this->beanHelper->getToolbox()->getRedBean()->dispense( $listItem['_type'] ); - unset( $listItem['_type'] ); - $bean->import($listItem); - $list = &$this->$key; - $list[ $listKey ] = $bean; - } - } - } else { - $this->$key = $value; - } - } - } - } - - return $this; - } - - /** - * Fast way to import a row. - * Does not perform any checks. - * - * @param array $row a database row - * - * @return self - */ - public function importRow( $row ) - { - $this->properties = $row; - $this->__info['sys.orig'] = $row; - $this->__info['changed'] = FALSE; - return $this; - } - - /** - * Imports data from another bean. Chainable. - * Copies the properties from the source bean to the internal - * property list. - * - * @param OODBBean $sourceBean the source bean to take properties from - * - * @return OODBBean - */ - public function importFrom( OODBBean $sourceBean ) - { - $this->__info['tainted'] = TRUE; - $this->__info['changed'] = TRUE; - $this->properties = $sourceBean->properties; - - return $this; - } - - /** - * Injects the properties of another bean but keeps the original ID. - * Just like import() but keeps the original ID. - * Chainable. - * - * @param OODBBean $otherBean the bean whose properties you would like to copy - * - * @return OODBBean - */ - public function inject( OODBBean $otherBean ) - { - $myID = $this->properties['id']; - - $this->import( $otherBean->export() ); - - $this->id = $myID; - - return $this; - } - - /** - * Exports the bean as an array. - * This function exports the contents of a bean to an array and returns - * the resulting array. - * - * @param boolean $meta set to TRUE if you want to export meta data as well - * @param boolean $parents set to TRUE if you want to export parents as well - * @param boolean $onlyMe set to TRUE if you want to export only this bean - * @param array $filters optional whitelist for export - * - * @return array - */ - public function export( $meta = FALSE, $parents = FALSE, $onlyMe = FALSE, $filters = array() ) - { - $arr = array(); - - if ( $parents ) { - foreach ( $this as $key => $value ) { - if ( substr( $key, -3 ) != '_id' ) continue; - - $prop = substr( $key, 0, strlen( $key ) - 3 ); - $this->$prop; - } - } - - $hasFilters = is_array( $filters ) && count( $filters ); - - foreach ( $this as $key => $value ) { - if ( !$onlyMe && is_array( $value ) ) { - $vn = array(); - - foreach ( $value as $i => $b ) { - if ( !( $b instanceof OODBBean ) ) continue; - $vn[] = $b->export( $meta, FALSE, FALSE, $filters ); - $value = $vn; - } - } elseif ( $value instanceof OODBBean ) { - if ( $hasFilters ) { - if ( !in_array( strtolower( $value->getMeta( 'type' ) ), $filters ) ) continue; - } - - $value = $value->export( $meta, $parents, FALSE, $filters ); - } - - $arr[$key] = $value; - } - - if ( $meta ) { - $arr['__info'] = $this->__info; - } - - return $arr; - } - - /** - * Implements isset() function for use as an array. - * - * @param string $property name of the property you want to check - * - * @return boolean - */ - public function __isset( $property ) - { - $property = $this->beau( $property ); - - if ( strpos( $property, 'xown' ) === 0 && ctype_upper( substr( $property, 4, 1 ) ) ) { - $property = substr($property, 1); - } - return isset( $this->properties[$property] ); - } - - /** - * Returns the ID of the bean no matter what the ID field is. - * - * @return string|null - */ - public function getID() - { - return ( isset( $this->properties['id'] ) ) ? (string) $this->properties['id'] : NULL; - } - - /** - * Unsets a property of a bean. - * Magic method, gets called implicitly when performing the unset() operation - * on a bean property. - * - * @param string $property property to unset - * - * @return void - */ - public function __unset( $property ) - { - $property = $this->beau( $property ); - - if ( strpos( $property, 'xown' ) === 0 && ctype_upper( substr( $property, 4, 1 ) ) ) { - $property = substr($property, 1); - } - - unset( $this->properties[$property] ); - - $shadowKey = 'sys.shadow.'.$property; - if ( isset( $this->__info[ $shadowKey ] ) ) unset( $this->__info[$shadowKey] ); - - //also clear modifiers - $this->withSql = ''; - $this->withParams = array(); - $this->aliasName = NULL; - $this->fetchType = NULL; - $this->noLoad = FALSE; - $this->all = FALSE; - $this->via = NULL; - - return; - } - - /** - * Adds WHERE clause conditions to ownList retrieval. - * For instance to get the pages that belong to a book you would - * issue the following command: $book->ownPage - * However, to order these pages by number use: - * - * - * $book->with(' ORDER BY `number` ASC ')->ownPage - * - * - * the additional SQL snippet will be merged into the final - * query. - * - * @param string $sql SQL to be added to retrieval query. - * @param array $bindings array with parameters to bind to SQL snippet - * - * @return OODBBean - */ - public function with( $sql, $bindings = array() ) - { - $this->withSql = $sql; - $this->withParams = $bindings; - return $this; - } - - /** - * Just like with(). Except that this method prepends the SQL query snippet - * with AND which makes it slightly more comfortable to use a conditional - * SQL snippet. For instance to filter an own-list with pages (belonging to - * a book) on specific chapters you can use: - * - * $book->withCondition(' chapter = 3 ')->ownPage - * - * This will return in the own list only the pages having 'chapter == 3'. - * - * @param string $sql SQL to be added to retrieval query (prefixed by AND) - * @param array $bindings array with parameters to bind to SQL snippet - * - * @return OODBBean - */ - public function withCondition( $sql, $bindings = array() ) - { - $this->withSql = ' AND ' . $sql; - $this->withParams = $bindings; - return $this; - } - - /** - * Tells the bean to (re)load the following list without any - * conditions. If you have an ownList or sharedList with a - * condition you can use this method to reload the entire list. - * - * Usage: - * - * - * $bean->with( ' LIMIT 3 ' )->ownPage; //Just 3 - * $bean->all()->ownPage; //Reload all pages - * - * - * @return self - */ - public function all() - { - $this->all = TRUE; - return $this; - } - - /** - * Tells the bean to only access the list but not load - * its contents. Use this if you only want to add something to a list - * and you have no interest in retrieving its contents from the database. - * - * @return self - */ - public function noLoad() - { - $this->noLoad = TRUE; - return $this; - } - - /** - * Prepares an own-list to use an alias. This is best explained using - * an example. Imagine a project and a person. The project always involves - * two persons: a teacher and a student. The person beans have been aliased in this - * case, so to the project has a teacher_id pointing to a person, and a student_id - * also pointing to a person. Given a project, we obtain the teacher like this: - * - * - * $project->fetchAs('person')->teacher; - * - * - * Now, if we want all projects of a teacher we cant say: - * - * - * $teacher->ownProject - * - * - * because the $teacher is a bean of type 'person' and no project has been - * assigned to a person. Instead we use the alias() method like this: - * - * - * $teacher->alias('teacher')->ownProject - * - * - * now we get the projects associated with the person bean aliased as - * a teacher. - * - * @param string $aliasName the alias name to use - * - * @return OODBBean - */ - public function alias( $aliasName ) - { - $this->aliasName = $this->beau( $aliasName ); - - return $this; - } - - /** - * Returns properties of bean as an array. - * This method returns the raw internal property list of the - * bean. Only use this method for optimization purposes. Otherwise - * use the export() method to export bean data to arrays. - * - * @return array - */ - public function getProperties() - { - return $this->properties; - } - - /** - * Returns properties of bean as an array. - * This method returns the raw internal property list of the - * bean. Only use this method for optimization purposes. Otherwise - * use the export() method to export bean data to arrays. - * This method returns an array with the properties array and - * the type (string). - * - * @return array - */ - public function getPropertiesAndType() - { - return array( $this->properties, $this->__info['type'] ); - } - - /** - * Turns a camelcase property name into an underscored property name. - * - * Examples: - * - * * oneACLRoute -> one_acl_route - * * camelCase -> camel_case - * - * Also caches the result to improve performance. - * - * @param string $property property to un-beautify - * - * @return string - */ - public function beau( $property ) - { - static $beautifulColumns = array(); - - if ( ctype_lower( $property ) ) return $property; - - if ( - ( strpos( $property, 'own' ) === 0 && ctype_upper( substr( $property, 3, 1 ) ) ) - || ( strpos( $property, 'xown' ) === 0 && ctype_upper( substr( $property, 4, 1 ) ) ) - || ( strpos( $property, 'shared' ) === 0 && ctype_upper( substr( $property, 6, 1 ) ) ) - ) { - - $property = preg_replace( '/List$/', '', $property ); - return $property; - } - - if ( !isset( $beautifulColumns[$property] ) ) { - $beautifulColumns[$property] = AQueryWriter::camelsSnake( $property ); - } - - return $beautifulColumns[$property]; - } - - /** - * Clears all modifiers. - * - * @return self - */ - public function clearModifiers() - { - $this->withSql = ''; - $this->withParams = array(); - $this->aliasName = NULL; - $this->fetchType = NULL; - $this->noLoad = FALSE; - $this->all = FALSE; - $this->via = NULL; - return $this; - } - - /** - * Determines whether a list is opened in exclusive mode or not. - * If a list has been opened in exclusive mode this method will return TRUE, - * othwerwise it will return FALSE. - * - * @param string $listName name of the list to check - * - * @return boolean - */ - public function isListInExclusiveMode( $listName ) - { - $listName = $this->beau( $listName ); - - if ( strpos( $listName, 'xown' ) === 0 && ctype_upper( substr( $listName, 4, 1 ) ) ) { - $listName = substr($listName, 1); - } - - $listName = lcfirst( substr( $listName, 3 ) ); - - return ( isset( $this->__info['sys.exclusive-'.$listName] ) && $this->__info['sys.exclusive-'.$listName] ); - } - - /** - * Magic Getter. Gets the value for a specific property in the bean. - * If the property does not exist this getter will make sure no error - * occurs. This is because RedBean allows you to query (probe) for - * properties. If the property can not be found this method will - * return NULL instead. - * - * @param string $property name of the property you wish to obtain the value of - * - * @return mixed - */ - public function &__get( $property ) - { - $isEx = FALSE; - $isOwn = FALSE; - $isShared = FALSE; - - if ( !ctype_lower( $property ) ) { - $property = $this->beau( $property ); - if ( strpos( $property, 'xown' ) === 0 && ctype_upper( substr( $property, 4, 1 ) ) ) { - $property = substr($property, 1); - $listName = lcfirst( substr( $property, 3 ) ); - $isEx = TRUE; - $isOwn = TRUE; - $this->__info['sys.exclusive-'.$listName] = TRUE; - } elseif ( strpos( $property, 'own' ) === 0 && ctype_upper( substr( $property, 3, 1 ) ) ) { - $isOwn = TRUE; - $listName = lcfirst( substr( $property, 3 ) ); - } elseif ( strpos( $property, 'shared' ) === 0 && ctype_upper( substr( $property, 6, 1 ) ) ) { - $isShared = TRUE; - } - } - - $fieldLink = $property . '_id'; - $exists = isset( $this->properties[$property] ); - - //If not exists and no field link and no list, bail out. - if ( !$exists && !isset($this->$fieldLink) && (!$isOwn && !$isShared )) { - - $this->withSql = ''; - $this->withParams = array(); - $this->aliasName = NULL; - $this->fetchType = NULL; - $this->noLoad = FALSE; - $this->all = FALSE; - $this->via = NULL; - - $NULL = NULL; - return $NULL; - } - - $hasAlias = (!is_null($this->aliasName)); - $differentAlias = ($hasAlias && $isOwn && isset($this->__info['sys.alias.'.$listName])) ? - ($this->__info['sys.alias.'.$listName] !== $this->aliasName) : FALSE; - $hasSQL = ($this->withSql !== '' || $this->via !== NULL); - $hasAll = (boolean) ($this->all); - - //If exists and no list or exits and list not changed, bail out. - if ( $exists && ((!$isOwn && !$isShared ) || (!$hasSQL && !$differentAlias && !$hasAll)) ) { - - $this->withSql = ''; - $this->withParams = array(); - $this->aliasName = NULL; - $this->fetchType = NULL; - $this->noLoad = FALSE; - $this->all = FALSE; - $this->via = NULL; - return $this->properties[$property]; - } - - list( $redbean, , , $toolbox ) = $this->beanHelper->getExtractedToolbox(); - - if ( isset( $this->$fieldLink ) ) { - $this->__info['tainted'] = TRUE; - - if ( isset( $this->__info["sys.parentcache.$property"] ) ) { - $bean = $this->__info["sys.parentcache.$property"]; - } else { - if ( isset( self::$aliases[$property] ) ) { - $type = self::$aliases[$property]; - } elseif ( $this->fetchType ) { - $type = $this->fetchType; - $this->fetchType = NULL; - } else { - $type = $property; - } - $bean = NULL; - if ( !is_null( $this->properties[$fieldLink] ) ) { - $bean = $redbean->load( $type, $this->properties[$fieldLink] ); - //If the IDs dont match, we failed to load, so try autoresolv in that case... - if ( $bean->id !== $this->properties[$fieldLink] && self::$autoResolve ) { - $type = $this->beanHelper->getToolbox()->getWriter()->inferFetchType( $this->__info['type'], $property ); - if ( !is_null( $type) ) { - $bean = $redbean->load( $type, $this->properties[$fieldLink] ); - $this->__info["sys.autoresolved.{$property}"] = $type; - } - } - } - } - - $this->properties[$property] = $bean; - $this->withSql = ''; - $this->withParams = array(); - $this->aliasName = NULL; - $this->fetchType = NULL; - $this->noLoad = FALSE; - $this->all = FALSE; - $this->via = NULL; - - return $this->properties[$property]; - - } - //Implicit: elseif ( $isOwn || $isShared ) { - if ( $this->noLoad ) { - $beans = array(); - } elseif ( $isOwn ) { - $beans = $this->getOwnList( $listName, $redbean ); - } else { - $beans = $this->getSharedList( lcfirst( substr( $property, 6 ) ), $redbean, $toolbox ); - } - - $this->properties[$property] = $beans; - $this->__info["sys.shadow.$property"] = $beans; - $this->__info['tainted'] = TRUE; - - $this->withSql = ''; - $this->withParams = array(); - $this->aliasName = NULL; - $this->fetchType = NULL; - $this->noLoad = FALSE; - $this->all = FALSE; - $this->via = NULL; - - return $this->properties[$property]; - } - - /** - * Magic Setter. Sets the value for a specific property. - * This setter acts as a hook for OODB to mark beans as tainted. - * The tainted meta property can be retrieved using getMeta("tainted"). - * The tainted meta property indicates whether a bean has been modified and - * can be used in various caching mechanisms. - * - * @param string $property name of the property you wish to assign a value to - * @param mixed $value the value you want to assign - * - * @return void - */ - public function __set( $property, $value ) - { - $isEx = FALSE; - $isOwn = FALSE; - $isShared = FALSE; - - if ( !ctype_lower( $property ) ) { - $property = $this->beau( $property ); - if ( strpos( $property, 'xown' ) === 0 && ctype_upper( substr( $property, 4, 1 ) ) ) { - $property = substr($property, 1); - $listName = lcfirst( substr( $property, 3 ) ); - $isEx = TRUE; - $isOwn = TRUE; - $this->__info['sys.exclusive-'.$listName] = TRUE; - } elseif ( strpos( $property, 'own' ) === 0 && ctype_upper( substr( $property, 3, 1 ) ) ) { - $isOwn = TRUE; - $listName = lcfirst( substr( $property, 3 ) ); - } elseif ( strpos( $property, 'shared' ) === 0 && ctype_upper( substr( $property, 6, 1 ) ) ) { - $isShared = TRUE; - } - } - - $hasAlias = (!is_null($this->aliasName)); - $differentAlias = ($hasAlias && $isOwn && isset($this->__info['sys.alias.'.$listName])) ? - ($this->__info['sys.alias.'.$listName] !== $this->aliasName) : FALSE; - $hasSQL = ($this->withSql !== '' || $this->via !== NULL); - $exists = isset( $this->properties[$property] ); - $fieldLink = $property . '_id'; - - if ( ($isOwn || $isShared) && (!$exists || $hasSQL || $differentAlias) ) { - - if ( !$this->noLoad ) { - list( $redbean, , , $toolbox ) = $this->beanHelper->getExtractedToolbox(); - if ( $isOwn ) { - $beans = $this->getOwnList( $listName, $redbean ); - } else { - $beans = $this->getSharedList( lcfirst( substr( $property, 6 ) ), $redbean, $toolbox ); - } - $this->__info["sys.shadow.$property"] = $beans; - } - } - - $this->withSql = ''; - $this->withParams = array(); - $this->aliasName = NULL; - $this->fetchType = NULL; - $this->noLoad = FALSE; - $this->all = FALSE; - $this->via = NULL; - - $this->__info['tainted'] = TRUE; - $this->__info['changed'] = TRUE; - - if ( array_key_exists( $fieldLink, $this->properties ) && !( $value instanceof OODBBean ) ) { - if ( is_null( $value ) || $value === FALSE ) { - - unset( $this->properties[ $property ]); - $this->properties[ $fieldLink ] = NULL; - - return; - } else { - throw new RedException( 'Cannot cast to bean.' ); - } - } - - if ( $value === FALSE ) { - $value = '0'; - } elseif ( $value === TRUE ) { - $value = '1'; - } elseif ( $value instanceof \DateTime ) { - $value = $value->format( 'Y-m-d H:i:s' ); - } - - $this->properties[$property] = $value; - } - - /** - * Sets a property directly, for internal use only. - * - * @param string $property property - * @param mixed $value value - * @param boolean $updateShadow whether you want to update the shadow - * @param boolean $taint whether you want to mark the bean as tainted - * - * @return void - */ - public function setProperty( $property, $value, $updateShadow = FALSE, $taint = FALSE ) - { - $this->properties[$property] = $value; - - if ( $updateShadow ) { - $this->__info['sys.shadow.' . $property] = $value; - } - - if ( $taint ) { - $this->__info['tainted'] = TRUE; - $this->__info['changed'] = TRUE; - } - } - - /** - * Returns the value of a meta property. A meta property - * contains additional information about the bean object that will not - * be stored in the database. Meta information is used to instruct - * RedBeanPHP as well as other systems how to deal with the bean. - * If the property cannot be found this getter will return NULL instead. - * - * Example: - * - * - * $bean->setMeta( 'flush-cache', TRUE ); - * - * - * RedBeanPHP also stores meta data in beans, this meta data uses - * keys prefixed with 'sys.' (system). - * - * @param string $path path to property in meta data - * @param mixed $default default value - * - * @return mixed - */ - public function getMeta( $path, $default = NULL ) - { - return ( isset( $this->__info[$path] ) ) ? $this->__info[$path] : $default; - } - - /** - * Gets and unsets a meta property. - * Moves a meta property out of the bean. - * This is a short-cut method that can be used instead - * of combining a get/unset. - * - * @param string $path path to property in meta data - * @param mixed $default default value - * - * @return mixed - */ - public function moveMeta( $path, $value = NULL ) - { - if ( isset( $this->__info[$path] ) ) { - $value = $this->__info[ $path ]; - unset( $this->__info[ $path ] ); - } - return $value; - } - - /** - * Stores a value in the specified Meta information property. - * The first argument should be the key to store the value under, - * the second argument should be the value. It is common to use - * a path-like notation for meta data in RedBeanPHP like: - * 'my.meta.data', however the dots are purely for readability, the - * meta data methods do not store nested structures or hierarchies. - * - * @param string $path path / key to store value under - * @param mixed $value value to store in bean (not in database) as meta data - * - * @return OODBBean - */ - public function setMeta( $path, $value ) - { - $this->__info[$path] = $value; - - return $this; - } - - /** - * Copies the meta information of the specified bean - * This is a convenience method to enable you to - * exchange meta information easily. - * - * @param OODBBean $bean bean to copy meta data of - * - * @return OODBBean - */ - public function copyMetaFrom( OODBBean $bean ) - { - $this->__info = $bean->__info; - - return $this; - } - - /** - * Sends the call to the registered model. - * - * @param string $method name of the method - * @param array $args argument list - * - * @return mixed - */ - public function __call( $method, $args ) - { - if ( !isset( $this->__info['model'] ) ) { - $model = $this->beanHelper->getModelForBean( $this ); - - if ( !$model ) { - return NULL; - } - - $this->__info['model'] = $model; - } - if ( !method_exists( $this->__info['model'], $method ) ) { - - if ( self::$errorHandlingFUSE === FALSE ) { - return NULL; - } - - if ( in_array( $method, array( 'update', 'open', 'delete', 'after_delete', 'after_update', 'dispense' ), TRUE ) ) { - return NULL; - } - - $message = "FUSE: method does not exist in model: $method"; - if ( self::$errorHandlingFUSE === self::C_ERR_LOG ) { - error_log( $message ); - return NULL; - } elseif ( self::$errorHandlingFUSE === self::C_ERR_NOTICE ) { - trigger_error( $message, E_USER_NOTICE ); - return NULL; - } elseif ( self::$errorHandlingFUSE === self::C_ERR_WARN ) { - trigger_error( $message, E_USER_WARNING ); - return NULL; - } elseif ( self::$errorHandlingFUSE === self::C_ERR_EXCEPTION ) { - throw new \Exception( $message ); - } elseif ( self::$errorHandlingFUSE === self::C_ERR_FUNC ) { - $func = self::$errorHandler; - return $func(array( - 'message' => $message, - 'method' => $method, - 'args' => $args, - 'bean' => $this - )); - } - trigger_error( $message, E_USER_ERROR ); - return NULL; - } - - return call_user_func_array( array( $this->__info['model'], $method ), $args ); - } - - /** - * Implementation of __toString Method - * Routes call to Model. If the model implements a __toString() method this - * method will be called and the result will be returned. In case of an - * echo-statement this result will be printed. If the model does not - * implement a __toString method, this method will return a JSON - * representation of the current bean. - * - * @return string - */ - public function __toString() - { - $string = $this->__call( '__toString', array() ); - - if ( $string === NULL ) { - return json_encode( $this->properties ); - } else { - return $string; - } - } - - /** - * Implementation of Array Access Interface, you can access bean objects - * like an array. - * Call gets routed to __set. - * - * @param mixed $offset offset string - * @param mixed $value value - * - * @return void - */ - public function offsetSet( $offset, $value ) - { - $this->__set( $offset, $value ); - } - - /** - * Implementation of Array Access Interface, you can access bean objects - * like an array. - * - * Array functions do not reveal x-own-lists and list-alias because - * you dont want duplicate entries in foreach-loops. - * Also offers a slight performance improvement for array access. - * - * @param mixed $offset property - * - * @return boolean - */ - public function offsetExists( $offset ) - { - return $this->__isset( $offset ); - } - - /** - * Implementation of Array Access Interface, you can access bean objects - * like an array. - * Unsets a value from the array/bean. - * - * Array functions do not reveal x-own-lists and list-alias because - * you dont want duplicate entries in foreach-loops. - * Also offers a slight performance improvement for array access. - * - * @param mixed $offset property - * - * @return void - */ - public function offsetUnset( $offset ) - { - $this->__unset( $offset ); - } - - /** - * Implementation of Array Access Interface, you can access bean objects - * like an array. - * Returns value of a property. - * - * Array functions do not reveal x-own-lists and list-alias because - * you dont want duplicate entries in foreach-loops. - * Also offers a slight performance improvement for array access. - * - * @param mixed $offset property - * - * @return mixed - */ - public function &offsetGet( $offset ) - { - return $this->__get( $offset ); - } - - /** - * Chainable method to cast a certain ID to a bean; for instance: - * $person = $club->fetchAs('person')->member; - * This will load a bean of type person using member_id as ID. - * - * @param string $type preferred fetch type - * - * @return OODBBean - */ - public function fetchAs( $type ) - { - $this->fetchType = $type; - - return $this; - } - - /** - * For polymorphic bean relations. - * Same as fetchAs but uses a column instead of a direct value. - * - * @param string $field field name to use for mapping - * - * @return OODBBean - */ - public function poly( $field ) - { - return $this->fetchAs( $this->$field ); - } - - /** - * Traverses a bean property with the specified function. - * Recursively iterates through the property invoking the - * function for each bean along the way passing the bean to it. - * - * Can be used together with with, withCondition, alias and fetchAs. - * - * @param string $property property - * @param callable $function function - * @param integer $maxDepth maximum depth for traversal - * - * @return OODBBean - * @throws RedException - */ - public function traverse( $property, $function, $maxDepth = NULL ) - { - $this->via = NULL; - if ( strpos( $property, 'shared' ) !== FALSE ) { - throw new RedException( 'Traverse only works with (x)own-lists.' ); - } - - if ( !is_null( $maxDepth ) ) { - if ( !$maxDepth-- ) return $this; - } - - $oldFetchType = $this->fetchType; - $oldAliasName = $this->aliasName; - $oldWith = $this->withSql; - $oldBindings = $this->withParams; - - $beans = $this->$property; - - if ( $beans === NULL ) return $this; - - if ( !is_array( $beans ) ) $beans = array( $beans ); - - foreach( $beans as $bean ) { - /** @var OODBBean $bean */ - $function( $bean ); - - $bean->fetchType = $oldFetchType; - $bean->aliasName = $oldAliasName; - $bean->withSql = $oldWith; - $bean->withParams = $oldBindings; - - $bean->traverse( $property, $function, $maxDepth ); - } - - return $this; - } - - /** - * Implementation of Countable interface. Makes it possible to use - * count() function on a bean. - * - * @return integer - */ - public function count() - { - return count( $this->properties ); - } - - /** - * Checks whether a bean is empty or not. - * A bean is empty if it has no other properties than the id field OR - * if all the other property are empty(). - * - * @return boolean - */ - public function isEmpty() - { - $empty = TRUE; - foreach ( $this->properties as $key => $value ) { - if ( $key == 'id' ) { - continue; - } - if ( !empty( $value ) ) { - $empty = FALSE; - } - } - - return $empty; - } - - /** - * Chainable setter. - * - * @param string $property the property of the bean - * @param mixed $value the value you want to set - * - * @return OODBBean - */ - public function setAttr( $property, $value ) - { - $this->$property = $value; - - return $this; - } - - /** - * Comfort method. - * Unsets all properties in array. - * - * @param array $properties properties you want to unset. - * - * @return OODBBean - */ - public function unsetAll( $properties ) - { - foreach ( $properties as $prop ) { - if ( isset( $this->properties[$prop] ) ) { - unset( $this->properties[$prop] ); - } - } - - return $this; - } - - /** - * Returns original (old) value of a property. - * You can use this method to see what has changed in a - * bean. - * - * @param string $property name of the property you want the old value of - * - * @return mixed - */ - public function old( $property ) - { - $old = $this->getMeta( 'sys.orig', array() ); - - if ( array_key_exists( $property, $old ) ) { - return $old[$property]; - } - - return NULL; - } - - /** - * Convenience method. - * Returns TRUE if the bean has been changed, or FALSE otherwise. - * Same as $bean->getMeta('tainted'); - * Note that a bean becomes tainted as soon as you retrieve a list from - * the bean. This is because the bean lists are arrays and the bean cannot - * determine whether you have made modifications to a list so RedBeanPHP - * will mark the whole bean as tainted. - * - * @return boolean - */ - public function isTainted() - { - return $this->getMeta( 'tainted' ); - } - - /** - * Returns TRUE if the value of a certain property of the bean has been changed and - * FALSE otherwise. - * - * Note that this method will return TRUE if applied to a loaded list. - * Also note that this method keeps track of the bean's history regardless whether - * it has been stored or not. Storing a bean does not undo it's history, - * to clean the history of a bean use: clearHistory(). - * - * @param string $property name of the property you want the change-status of - * - * @return boolean - */ - public function hasChanged( $property ) - { - return ( array_key_exists( $property, $this->properties ) ) ? - $this->old( $property ) != $this->properties[$property] : FALSE; - } - - /** - * Returns TRUE if the specified list exists, has been loaded and has been changed: - * beans have been added or deleted. This method will not tell you anything about - * the state of the beans in the list. - * - * @param string $property name of the list to check - * - * @return boolean - */ - public function hasListChanged( $property ) - { - if ( !array_key_exists( $property, $this->properties ) ) return FALSE; - $diffAdded = array_diff_assoc( $this->properties[$property], $this->__info['sys.shadow.'.$property] ); - if ( count( $diffAdded ) ) return TRUE; - $diffMissing = array_diff_assoc( $this->__info['sys.shadow.'.$property], $this->properties[$property] ); - if ( count( $diffMissing ) ) return TRUE; - return FALSE; - } - - /** - * Clears (syncs) the history of the bean. - * Resets all shadow values of the bean to their current value. - * - * @return self - */ - public function clearHistory() - { - $this->__info['sys.orig'] = array(); - foreach( $this->properties as $key => $value ) { - if ( is_scalar($value) ) { - $this->__info['sys.orig'][$key] = $value; - } else { - $this->__info['sys.shadow.'.$key] = $value; - } - } - return $this; - } - - /** - * Creates a N-M relation by linking an intermediate bean. - * This method can be used to quickly connect beans using indirect - * relations. For instance, given an album and a song you can connect the two - * using a track with a number like this: - * - * Usage: - * - * - * $album->link('track', array('number'=>1))->song = $song; - * - * - * or: - * - * - * $album->link($trackBean)->song = $song; - * - * - * What this method does is adding the link bean to the own-list, in this case - * ownTrack. If the first argument is a string and the second is an array or - * a JSON string then the linking bean gets dispensed on-the-fly as seen in - * example #1. After preparing the linking bean, the bean is returned thus - * allowing the chained setter: ->song = $song. - * - * @param string|OODBBean $type type of bean to dispense or the full bean - * @param string|array $qualification JSON string or array (optional) - * - * @return OODBBean - */ - public function link( $typeOrBean, $qualification = array() ) - { - if ( is_string( $typeOrBean ) ) { - - $typeOrBean = AQueryWriter::camelsSnake( $typeOrBean ); - - $bean = $this->beanHelper->getToolBox()->getRedBean()->dispense( $typeOrBean ); - - if ( is_string( $qualification ) ) { - $data = json_decode( $qualification, TRUE ); - } else { - $data = $qualification; - } - - foreach ( $data as $key => $value ) { - $bean->$key = $value; - } - } else { - $bean = $typeOrBean; - } - - $list = 'own' . ucfirst( $bean->getMeta( 'type' ) ); - - array_push( $this->$list, $bean ); - - return $bean; - } - - /** - * Returns a bean of the given type with the same ID of as - * the current one. This only happens in a one-to-one relation. - * This is as far as support for 1-1 goes in RedBeanPHP. This - * method will only return a reference to the bean, changing it - * and storing the bean will not update the related one-bean. - * - * @return OODBBean - */ - public function one( $type ) { - return $this->beanHelper->getToolBox()->getRedBean()->load( $type, $this->id ); - } - - /** - * Returns the same bean freshly loaded from the database. - * - * @return OODBBean - */ - public function fresh() - { - return $this->beanHelper->getToolbox()->getRedBean()->load( $this->getMeta( 'type' ), $this->properties['id'] ); - } - - /** - * Registers a association renaming globally. - * - * @param string $via type you wish to use for shared lists - * - * @return OODBBean - */ - public function via( $via ) - { - $this->via = AQueryWriter::camelsSnake( $via ); - - return $this; - } - - /** - * Counts all own beans of type $type. - * Also works with alias(), with() and withCondition(). - * - * @param string $type the type of bean you want to count - * - * @return integer - */ - public function countOwn( $type ) - { - $type = $this->beau( $type ); - - if ( $this->aliasName ) { - $myFieldLink = $this->aliasName . '_id'; - - $this->aliasName = NULL; - } else { - $myFieldLink = $this->__info['type'] . '_id'; - } - - $count = 0; - - if ( $this->getID() ) { - - $firstKey = NULL; - if ( count( $this->withParams ) > 0 ) { - reset( $this->withParams ); - $firstKey = key( $this->withParams ); - } - - $joinSql = $this->parseJoin( $type ); - - if ( !is_numeric( $firstKey ) || $firstKey === NULL ) { - $bindings = $this->withParams; - $bindings[':slot0'] = $this->getID(); - $count = $this->beanHelper->getToolbox()->getWriter()->queryRecordCount( $type, array(), " {$joinSql} $myFieldLink = :slot0 " . $this->withSql, $bindings ); - } else { - $bindings = array_merge( array( $this->getID() ), $this->withParams ); - $count = $this->beanHelper->getToolbox()->getWriter()->queryRecordCount( $type, array(), " {$joinSql} $myFieldLink = ? " . $this->withSql, $bindings ); - } - - } - - $this->clearModifiers(); - return (int) $count; - } - - /** - * Counts all shared beans of type $type. - * Also works with via(), with() and withCondition(). - * - * @param string $type type of bean you wish to count - * - * @return integer - */ - public function countShared( $type ) - { - $toolbox = $this->beanHelper->getToolbox(); - $redbean = $toolbox->getRedBean(); - $writer = $toolbox->getWriter(); - - if ( $this->via ) { - $oldName = $writer->getAssocTable( array( $this->__info['type'], $type ) ); - - if ( $oldName !== $this->via ) { - //set the new renaming rule - $writer->renameAssocTable( $oldName, $this->via ); - $this->via = NULL; - } - } - - $type = $this->beau( $type ); - $count = 0; - - if ( $this->getID() ) { - $count = $redbean->getAssociationManager()->relatedCount( $this, $type, $this->withSql, $this->withParams ); - } - - $this->clearModifiers(); - return (integer) $count; - } - - /** - * Iterates through the specified own-list and - * fetches all properties (with their type) and - * returns the references. - * Use this method to quickly load indirectly related - * beans in an own-list. Whenever you cannot use a - * shared-list this method offers the same convenience - * by aggregating the parent beans of all children in - * the specified own-list. - * - * Example: - * - * - * $quest->aggr( 'xownQuestTarget', 'target', 'quest' ); - * - * - * Loads (in batch) and returns references to all - * quest beans residing in the $questTarget->target properties - * of each element in the xownQuestTargetList. - * - * @param string $list the list you wish to process - * @param string $property the property to load - * @param string $type the type of bean residing in this property (optional) - * - * @return array - */ - public function &aggr( $list, $property, $type = NULL ) - { - $this->via = NULL; - $ids = $beanIndex = $references = array(); - - if ( strlen( $list ) < 4 ) throw new RedException('Invalid own-list.'); - if ( strpos( $list, 'own') !== 0 ) throw new RedException('Only own-lists can be aggregated.'); - if ( !ctype_upper( substr( $list, 3, 1 ) ) ) throw new RedException('Invalid own-list.'); - - if ( is_null( $type ) ) $type = $property; - - foreach( $this->$list as $bean ) { - $field = $property . '_id'; - if ( isset( $bean->$field) ) { - $ids[] = $bean->$field; - $beanIndex[$bean->$field] = $bean; - } - } - - $beans = $this->beanHelper->getToolBox()->getRedBean()->batch( $type, $ids ); - - //now preload the beans as well - foreach( $beans as $bean ) { - $beanIndex[$bean->id]->setProperty( $property, $bean ); - } - - foreach( $beanIndex as $indexedBean ) { - $references[] = $indexedBean->$property; - } - - return $references; - } - - /** - * Tests whether the database identities of two beans are equal. - * - * @param OODBBean $bean other bean - * - * @return boolean - */ - public function equals(OODBBean $bean) - { - return (bool) ( - ( (string) $this->properties['id'] === (string) $bean->properties['id'] ) - && ( (string) $this->__info['type'] === (string) $bean->__info['type'] ) - ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php deleted file mode 100755 index 8e3e6c72..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Observable.php +++ /dev/null @@ -1,75 +0,0 @@ -observers[$eventname] ) ) { - $this->observers[$eventname] = array(); - } - - foreach ( $this->observers[$eventname] as $o ) { - if ( $o == $observer ) { - return; - } - } - - $this->observers[$eventname][] = $observer; - } - - /** - * Notifies listeners. - * Sends the signal $eventname, the event identifier and a message object - * to all observers that have been registered to receive notification for - * this event. Part of the observer pattern implementation in RedBeanPHP. - * - * @param string $eventname event you want signal - * @param mixed $info message object to send along - * - * @return void - */ - public function signal( $eventname, $info ) - { - if ( !isset( $this->observers[$eventname] ) ) { - $this->observers[$eventname] = array(); - } - - foreach ( $this->observers[$eventname] as $observer ) { - $observer->onEvent( $eventname, $info ); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Observer.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Observer.php deleted file mode 100755 index 29a07004..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Observer.php +++ /dev/null @@ -1,35 +0,0 @@ - $type where $field is the name of the column and $type - * is a database specific description of the datatype. - * - * This methods accepts a type and infers the corresponding table name. - * - * @param string $type type of bean you want to obtain a column list of - * - * @return array - */ - public function getColumns( $type ); - - /** - * Returns the Column Type Code (integer) that corresponds - * to the given value type. This method is used to determine the minimum - * column type required to represent the given value. - * - * @param string $value value - * - * @return integer - */ - public function scanType( $value, $alsoScanSpecialForTypes = FALSE ); - - /** - * This method will add a column to a table. - * This methods accepts a type and infers the corresponding table name. - * - * @param string $type name of the table - * @param string $column name of the column - * @param integer $field data type for field - * - * @return void - */ - public function addColumn( $type, $column, $field ); - - /** - * Returns the Type Code for a Column Description. - * Given an SQL column description this method will return the corresponding - * code for the writer. If the include specials flag is set it will also - * return codes for special columns. Otherwise special columns will be identified - * as specified columns. - * - * @param string $typedescription description - * @param boolean $includeSpecials whether you want to get codes for special columns as well - * - * @return integer - */ - public function code( $typedescription, $includeSpecials = FALSE ); - - /** - * This method will widen the column to the specified data type. - * This methods accepts a type and infers the corresponding table name. - * - * @param string $type type / table that needs to be adjusted - * @param string $column column that needs to be altered - * @param integer $datatype target data type - * - * @return void - */ - public function widenColumn( $type, $column, $datatype ); - - /** - * Selects records from the database. - * This methods selects the records from the database that match the specified - * type, conditions (optional) and additional SQL snippet (optional). - * - * @param string $type name of the table you want to query - * @param array $conditions criteria ( $column => array( $values ) ) - * @param string $addSQL additional SQL snippet - * @param array $bindings bindings for SQL snippet - * - * @return array - */ - public function queryRecord( $type, $conditions = array(), $addSql = NULL, $bindings = array() ); - - /** - * Selects records from the database and returns a cursor. - * This methods selects the records from the database that match the specified - * type, conditions (optional) and additional SQL snippet (optional). - * - * @param string $type name of the table you want to query - * @param array $conditions criteria ( $column => array( $values ) ) - * @param string $addSQL additional SQL snippet - * @param array $bindings bindings for SQL snippet - * - * @return Cursor - */ - public function queryRecordWithCursor( $type, $addSql = NULL, $bindings = array() ); - - /** - * Returns records through an intermediate type. This method is used to obtain records using a link table and - * allows the SQL snippets to reference columns in the link table for additional filtering or ordering. - * - * @param string $sourceType source type, the reference type you want to use to fetch related items on the other side - * @param string $destType destination type, the target type you want to get beans of - * @param mixed $linkID ID to use for the link table - * @param string $addSql Additional SQL snippet - * @param array $bindings Bindings for SQL snippet - * - * @return array - */ - public function queryRecordRelated( $sourceType, $destType, $linkID, $addSql = '', $bindings = array() ); - - /** - * Returns the row that links $sourceType $sourcID to $destType $destID in an N-M relation. - * - * @param string $sourceType source type, the first part of the link you're looking for - * @param string $destType destination type, the second part of the link you're looking for - * @param string $sourceID ID for the source - * @param string $destID ID for the destination - * - * @return array|null - */ - public function queryRecordLink( $sourceType, $destType, $sourceID, $destID ); - - /** - * Counts the number of records in the database that match the - * conditions and additional SQL. - * - * @param string $type name of the table you want to query - * @param array $conditions criteria ( $column => array( $values ) ) - * @param string $addSQL additional SQL snippet - * @param array $bindings bindings for SQL snippet - * - * @return integer - */ - public function queryRecordCount( $type, $conditions = array(), $addSql = NULL, $bindings = array() ); - - /** - * Returns the number of records linked through $linkType and satisfying the SQL in $addSQL/$bindings. - * - * @param string $sourceType source type - * @param string $targetType the thing you want to count - * @param mixed $linkID the of the source type - * @param string $addSQL additional SQL snippet - * @param array $bindings bindings for SQL snippet - * - * @return integer - */ - public function queryRecordCountRelated( $sourceType, $targetType, $linkID, $addSQL = '', $bindings = array() ); - - /** - * Returns all rows of specified type that have been tagged with one of the - * strings in the specified tag list array. - * - * Note that the additional SQL snippet can only be used for pagination, - * the SQL snippet will be appended to the end of the query. - * - * @param string $type the bean type you want to query - * @param array $tagList an array of strings, each string containing a tag title - * @param boolean $all if TRUE only return records that have been associated with ALL the tags in the list - * @param string $addSql addition SQL snippet, for pagination - * @param array $bindings parameter bindings for additional SQL snippet - * - * @return array - */ - public function queryTagged( $type, $tagList, $all = FALSE, $addSql = '', $bindings = array() ); - - /** - * This method should update (or insert a record), it takes - * a table name, a list of update values ( $field => $value ) and an - * primary key ID (optional). If no primary key ID is provided, an - * INSERT will take place. - * Returns the new ID. - * This methods accepts a type and infers the corresponding table name. - * - * @param string $type name of the table to update - * @param array $updatevalues list of update values - * @param integer $id optional primary key ID value - * - * @return integer - */ - public function updateRecord( $type, $updatevalues, $id = NULL ); - - /** - * Deletes records from the database. - * @note $addSql is always prefixed with ' WHERE ' or ' AND .' - * - * @param string $type name of the table you want to query - * @param array $conditions criteria ( $column => array( $values ) ) - * @param string $sql additional SQL - * @param array $bindings bindings - * - * @return void - */ - public function deleteRecord( $type, $conditions = array(), $addSql = '', $bindings = array() ); - - /** - * Deletes all links between $sourceType and $destType in an N-M relation. - * - * @param string $sourceType source type - * @param string $destType destination type - * @param string $sourceID source ID - * - * @return void - */ - public function deleteRelations( $sourceType, $destType, $sourceID ); - - /** - * @see QueryWriter::addUniqueConstaint - */ - public function addUniqueIndex( $type, $columns ); - - /** - * This method will add a UNIQUE constraint index to a table on columns $columns. - * This methods accepts a type and infers the corresponding table name. - * - * @param string $type target bean type - * @param array $columnsPartOfIndex columns to include in index - * - * @return void - */ - public function addUniqueConstraint( $type, $columns ); - - /** - * This method will check whether the SQL state is in the list of specified states - * and returns TRUE if it does appear in this list or FALSE if it - * does not. The purpose of this method is to translate the database specific state to - * a one of the constants defined in this class and then check whether it is in the list - * of standard states provided. - * - * @param string $state SQL state to consider - * @param array $list list of standardized SQL state constants to check against - * - * @return boolean - */ - public function sqlStateIn( $state, $list ); - - /** - * This method will remove all beans of a certain type. - * This methods accepts a type and infers the corresponding table name. - * - * @param string $type bean type - * - * @return void - */ - public function wipe( $type ); - - /** - * This method will add a foreign key from type and field to - * target type and target field. - * The foreign key is created without an action. On delete/update - * no action will be triggered. The FK is only used to allow database - * tools to generate pretty diagrams and to make it easy to add actions - * later on. - * This methods accepts a type and infers the corresponding table name. - * - * - * @param string $type type that will have a foreign key field - * @param string $targetType points to this type - * @param string $property field that contains the foreign key value - * @param string $targetProperty field where the fk points to - * @param string $isDep whether target is dependent and should cascade on update/delete - * - * @return void - */ - public function addFK( $type, $targetType, $property, $targetProperty, $isDep = false ); - - /** - * This method will add an index to a type and field with name - * $name. - * This methods accepts a type and infers the corresponding table name. - * - * @param string $type type to add index to - * @param string $name name of the new index - * @param string $property field to index - * - * @return void - */ - public function addIndex( $type, $name, $property ); - - /** - * Checks and filters a database structure element like a table of column - * for safe use in a query. A database structure has to conform to the - * RedBeanPHP DB security policy which basically means only alphanumeric - * symbols are allowed. This security policy is more strict than conventional - * SQL policies and does therefore not require database specific escaping rules. - * - * @param string $databaseStructure name of the column/table to check - * @param boolean $noQuotes TRUE to NOT put backticks or quotes around the string - * - * @return string - */ - public function esc( $databaseStructure, $dontQuote = FALSE ); - - /** - * Removes all tables and views from the database. - * - * @return void - */ - public function wipeAll(); - - /** - * Renames an association. For instance if you would like to refer to - * album_song as: track you can specify this by calling this method like: - * - * - * renameAssociation('album_song','track') - * - * - * This allows: - * - * - * $album->sharedSong - * - * - * to add/retrieve beans from track instead of album_song. - * Also works for exportAll(). - * - * This method also accepts a single associative array as - * its first argument. - * - * @param string|array $fromType original type name, or array - * @param string $toType new type name (only if 1st argument is string) - * - * @return void - */ - public function renameAssocTable( $fromType, $toType = NULL ); - - /** - * Returns the format for link tables. - * Given an array containing two type names this method returns the - * name of the link table to be used to store and retrieve - * association records. For instance, given two types: person and - * project, the corresponding link table might be: 'person_project'. - * - * @param array $types two types array($type1, $type2) - * - * @return string - */ - public function getAssocTable( $types ); - - /** - * Given a bean type and a property, this method - * tries to infer the fetch type using the foreign key - * definitions in the database. - * For instance: project, student -> person. - * If no fetchType can be inferred, this method will return NULL. - * - * @note QueryWriters do not have to implement this method, - * it's optional. A default version is available in AQueryWriter. - * - * @param $type the source type to fetch a target type for - * @param $property the property to fetch the type of - * - * @return string|NULL - */ - public function inferFetchType( $type, $property ); -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php deleted file mode 100755 index dbe6ac26..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/AQueryWriter.php +++ /dev/null @@ -1,1194 +0,0 @@ - $value ) self::$renames[$key] = $value; - - return; - } - - self::$renames[$from] = $to; - } - - /** - * Globally available service method for RedBeanPHP. - * Converts a camel cased string to a snake cased string. - * - * @param string $camel camelCased string to converty to snake case - * - * @return string - */ - public static function camelsSnake( $camel ) - { - return strtolower( preg_replace( '/(?<=[a-z])([A-Z])|([A-Z])(?=[a-z])/', '_$1$2', $camel ) ); - } - - /** - * Clears renames. - * - * @return void - */ - public static function clearRenames() - { - self::$renames = array(); - } - - /** - * Toggles 'Narrow Field Mode'. - * In Narrow Field mode the queryRecord method will - * narrow its selection field to - * - * SELECT {table}.* - * - * instead of - * - * SELECT * - * - * This is a better way of querying because it allows - * more flexibility (for instance joins). However if you need - * the wide selector for backward compatibility; use this method - * to turn OFF Narrow Field Mode by passing FALSE. - * - * @param boolean $narrowField TRUE = Narrow Field FALSE = Wide Field - * - * @return void - */ - public static function setNarrowFieldMode( $narrowField ) - { - self::$flagNarrowFieldMode = (boolean) $narrowField; - } - - /** - * Sets SQL filters. - * This is a lowlevel method to set the SQL filter array. - * The format of this array is: - * - * - * array( - * '' => array( - * '' => array( - * '' => '' - * ) - * ) - * ) - * - * - * Example: - * - * - * array( - * QueryWriter::C_SQLFILTER_READ => array( - * 'book' => array( - * 'title' => ' LOWER(book.title) ' - * ) - * ) - * - * - * Note that you can use constants instead of magical chars - * as keys for the uppermost array. - * This is a lowlevel method. For a more friendly method - * please take a look at the facade: R::bindFunc(). - * - * @param array list of filters to set - * - * @return void - */ - public static function setSQLFilters( $sqlFilters, $safeMode = false ) - { - self::$flagSQLFilterSafeMode = (boolean) $safeMode; - self::$sqlFilters = $sqlFilters; - } - - /** - * Returns current SQL Filters. - * This method returns the raw SQL filter array. - * This is a lowlevel method. For a more friendly method - * please take a look at the facade: R::bindFunc(). - * - * @return array - */ - public static function getSQLFilters() - { - return self::$sqlFilters; - } - - /** - * Returns a cache key for the cache values passed. - * This method returns a fingerprint string to be used as a key to store - * data in the writer cache. - * - * @param array $keyValues key-value to generate key for - * - * @return string - */ - private function getCacheKey( $keyValues ) - { - return json_encode( $keyValues ); - } - - /** - * Returns the values associated with the provided cache tag and key. - * - * @param string $cacheTag cache tag to use for lookup - * @param string $key key to use for lookup - * - * @return mixed - */ - private function getCached( $cacheTag, $key ) - { - $sql = $this->adapter->getSQL(); - - if ($this->updateCache()) { - if ( isset( $this->cache[$cacheTag][$key] ) ) { - return $this->cache[$cacheTag][$key]; - } - } - - return NULL; - } - - /** - * Checks if the previous query had a keep-cache tag. - * If so, the cache will persist, otherwise the cache will be flushed. - * - * Returns TRUE if the cache will remain and FALSE if a flush has - * been performed. - * - * @return boolean - */ - private function updateCache() - { - $sql = $this->adapter->getSQL(); - if ( strpos( $sql, '-- keep-cache' ) !== strlen( $sql ) - 13 ) { - // If SQL has been taken place outside of this method then something else then - // a select query might have happened! (or instruct to keep cache) - $this->cache = array(); - return FALSE; - } - return TRUE; - } - - /** - * Stores data from the writer in the cache under a specific key and cache tag. - * A cache tag is used to make sure the cache remains consistent. In most cases the cache tag - * will be the bean type, this makes sure queries associated with a certain reference type will - * never contain conflicting data. - * Why not use the cache tag as a key? Well - * we need to make sure the cache contents fits the key (and key is based on the cache values). - * Otherwise it would be possible to store two different result sets under the same key (the cache tag). - * - * In previous versions you could only store one key-entry, I have changed this to - * improve caching efficiency (issue #400). - * - * @param string $cacheTag cache tag (secondary key) - * @param string $key key to store values under - * @param array $values content to be stored - * - * @return void - */ - private function putResultInCache( $cacheTag, $key, $values ) - { - if ( isset( $this->cache[$cacheTag] ) ) { - if ( count( $this->cache[$cacheTag] ) > $this->maxCacheSizePerType ) array_shift( $this->cache[$cacheTag] ); - } else { - $this->cache[$cacheTag] = array(); - } - - $this->cache[$cacheTag][$key] = $values; - } - - /** - * Creates an SQL snippet from a list of conditions of format: - * - * - * array( - * key => array( - * value1, value2, value3 .... - * ) - * ) - * - * - * @param array $conditions list of conditions - * @param array $bindings parameter bindings for SQL snippet - * @param string $addSql additional SQL snippet to append to result - * - * @return string - */ - private function makeSQLFromConditions( $conditions, &$bindings, $addSql = '' ) - { - reset( $bindings ); - $firstKey = key( $bindings ); - $paramTypeIsNum = ( is_numeric( $firstKey ) ); - $counter = 0; - - $sqlConditions = array(); - foreach ( $conditions as $column => $values ) { - if ( !count( $values ) ) continue; - - $sql = $this->esc( $column ); - $sql .= ' IN ( '; - - if ( !is_array( $values ) ) $values = array( $values ); - - // If it's safe to skip bindings, do so... - if ( ctype_digit( implode( '', $values ) ) ) { - $sql .= implode( ',', $values ) . ' ) '; - - // only numeric, cant do much harm - $sqlConditions[] = $sql; - } else { - - if ( $paramTypeIsNum ) { - $sql .= implode( ',', array_fill( 0, count( $values ), '?' ) ) . ' ) '; - - array_unshift($sqlConditions, $sql); - - foreach ( $values as $k => $v ) { - $values[$k] = strval( $v ); - - array_unshift( $bindings, $v ); - } - } else { - - $slots = array(); - - foreach( $values as $k => $v ) { - $slot = ':slot'.$counter++; - $slots[] = $slot; - $bindings[$slot] = strval( $v ); - } - - $sql .= implode( ',', $slots ).' ) '; - $sqlConditions[] = $sql; - } - } - } - - $sql = ''; - if ( is_array( $sqlConditions ) && count( $sqlConditions ) > 0 ) { - $sql = implode( ' AND ', $sqlConditions ); - $sql = " WHERE ( $sql ) "; - - if ( $addSql ) $sql .= $addSql; - } elseif ( $addSql ) { - $sql = $addSql; - } - - return $sql; - } - - /** - * Returns the table names and column names for a relational query. - * - * @param string $sourceType type of the source bean - * @param string $destType type of the bean you want to obtain using the relation - * @param boolean $noQuote TRUE if you want to omit quotes - * - * @return array - */ - private function getRelationalTablesAndColumns( $sourceType, $destType, $noQuote = FALSE ) - { - $linkTable = $this->esc( $this->getAssocTable( array( $sourceType, $destType ) ), $noQuote ); - $sourceCol = $this->esc( $sourceType . '_id', $noQuote ); - - if ( $sourceType === $destType ) { - $destCol = $this->esc( $destType . '2_id', $noQuote ); - } else { - $destCol = $this->esc( $destType . '_id', $noQuote ); - } - - $sourceTable = $this->esc( $sourceType, $noQuote ); - $destTable = $this->esc( $destType, $noQuote ); - - return array( $sourceTable, $destTable, $linkTable, $sourceCol, $destCol ); - } - - /** - * Given a type and a property name this method - * returns the foreign key map section associated with this pair. - * - * @param string $type name of the type - * @param string $property name of the property - * - * @return array|NULL - */ - protected function getForeignKeyForTypeProperty( $type, $property ) - { - $property = $this->esc( $property, TRUE ); - - try { - $map = $this->getKeyMapForType( $type ); - } catch ( SQLException $e ) { - return NULL; - } - - foreach( $map as $key ) { - if ( $key['from'] === $property ) return $key; - } - return NULL; - } - - /** - * Returns the foreign key map (FKM) for a type. - * A foreign key map describes the foreign keys in a table. - * A FKM always has the same structure: - * - * - * array( - * 'name' => - * 'from' => - * 'table' => - * 'to' => (most of the time 'id') - * 'on_update' => - * 'on_delete' => - * ) - * - * - * @note the keys in the result array are FKDLs, i.e. descriptive unique - * keys per source table. Also see: AQueryWriter::makeFKLabel for details. - * - * @param string $type the bean type you wish to obtain a key map of - * - * @return array - */ - protected function getKeyMapForType( $type ) - { - return array(); - } - - /** - * This method makes a key for a foreign key description array. - * This key is a readable string unique for every source table. - * This uniform key is called the FKDL Foreign Key Description Label. - * Note that the source table is not part of the FKDL because - * this key is supposed to be 'per source table'. If you wish to - * include a source table, prefix the key with 'on_table__'. - * - * @param string $from the column of the key in the source table - * @param string $type the type (table) where the key points to - * @param string $to the target column of the foreign key (mostly just 'id') - * - * @return string - */ - protected function makeFKLabel($from, $type, $to) - { - return "from_{$from}_to_table_{$type}_col_{$to}"; - } - - /** - * Returns an SQL Filter snippet for reading. - * - * @param string $type type of bean - * - * @return string - */ - protected function getSQLFilterSnippet( $type ) - { - $existingCols = array(); - if (self::$flagSQLFilterSafeMode) { - $existingCols = $this->getColumns( $type ); - } - - $sqlFilters = array(); - if ( isset( self::$sqlFilters[QueryWriter::C_SQLFILTER_READ][$type] ) ) { - foreach( self::$sqlFilters[QueryWriter::C_SQLFILTER_READ][$type] as $property => $sqlFilter ) { - if ( !self::$flagSQLFilterSafeMode || isset( $existingCols[$property] ) ) { - $sqlFilters[] = $sqlFilter.' AS '.$property.' '; - } - } - } - $sqlFilterStr = ( count($sqlFilters) ) ? ( ','.implode( ',', $sqlFilters ) ) : ''; - return $sqlFilterStr; - } - - /** - * Generates a list of parameters (slots) for an SQL snippet. - * This method calculates the correct number of slots to insert in the - * SQL snippet and determines the correct type of slot. If the bindings - * array contains named parameters this method will return named ones and - * update the keys in the value list accordingly (that's why we use the &). - * - * If you pass an offset the bindings will be re-added to the value list. - * Some databases cant handle duplicate parameter names in queries. - * - * @param array &$valueList list of values to generate slots for (gets modified if needed) - * @param array $otherBindings list of additional bindings - * @param integer $offset start counter at... - * - * @return string - */ - protected function getParametersForInClause( &$valueList, $otherBindings, $offset = 0 ) - { - if ( is_array( $otherBindings ) && count( $otherBindings ) > 0 ) { - reset( $otherBindings ); - - $key = key( $otherBindings ); - - if ( !is_numeric($key) ) { - $filler = array(); - $newList = (!$offset) ? array() : $valueList; - $counter = $offset; - - foreach( $valueList as $value ) { - $slot = ':slot' . ( $counter++ ); - $filler[] = $slot; - $newList[$slot] = $value; - } - - // Change the keys! - $valueList = $newList; - - return implode( ',', $filler ); - } - } - - return implode( ',', array_fill( 0, count( $valueList ), '?' ) ); - } - - /** - * Adds a data type to the list of data types. - * Use this method to add a new column type definition to the writer. - * Used for UUID support. - * - * @param integer $dataTypeID magic number constant assigned to this data type - * @param string $SQLDefinition SQL column definition (i.e. INT(11)) - * - * @return self - */ - protected function addDataType( $dataTypeID, $SQLDefinition ) - { - $this->typeno_sqltype[ $dataTypeID ] = $SQLDefinition; - $this->sqltype_typeno[ $SQLDefinition ] = $dataTypeID; - return $this; - } - - /** - * Returns the sql that should follow an insert statement. - * - * @param string $table name - * - * @return string - */ - protected function getInsertSuffix( $table ) - { - return ''; - } - - /** - * Checks whether a value starts with zeros. In this case - * the value should probably be stored using a text datatype instead of a - * numerical type in order to preserve the zeros. - * - * @param string $value value to be checked. - * - * @return boolean - */ - protected function startsWithZeros( $value ) - { - $value = strval( $value ); - - if ( strlen( $value ) > 1 && strpos( $value, '0' ) === 0 && strpos( $value, '0.' ) !== 0 ) { - return TRUE; - } else { - return FALSE; - } - } - - /** - * Inserts a record into the database using a series of insert columns - * and corresponding insertvalues. Returns the insert id. - * - * @param string $table table to perform query on - * @param array $insertcolumns columns to be inserted - * @param array $insertvalues values to be inserted - * - * @return integer - */ - protected function insertRecord( $type, $insertcolumns, $insertvalues ) - { - $default = $this->defaultValue; - $suffix = $this->getInsertSuffix( $type ); - $table = $this->esc( $type ); - - if ( count( $insertvalues ) > 0 && is_array( $insertvalues[0] ) && count( $insertvalues[0] ) > 0 ) { - - $insertSlots = array(); - foreach ( $insertcolumns as $k => $v ) { - $insertcolumns[$k] = $this->esc( $v ); - - if (isset(self::$sqlFilters['w'][$type][$v])) { - $insertSlots[] = self::$sqlFilters['w'][$type][$v]; - } else { - $insertSlots[] = '?'; - } - } - - $insertSQL = "INSERT INTO $table ( id, " . implode( ',', $insertcolumns ) . " ) VALUES - ( $default, " . implode( ',', $insertSlots ) . " ) $suffix"; - - $ids = array(); - foreach ( $insertvalues as $i => $insertvalue ) { - $ids[] = $this->adapter->getCell( $insertSQL, $insertvalue, $i ); - } - - $result = count( $ids ) === 1 ? array_pop( $ids ) : $ids; - } else { - $result = $this->adapter->getCell( "INSERT INTO $table (id) VALUES($default) $suffix" ); - } - - if ( $suffix ) return $result; - - $last_id = $this->adapter->getInsertID(); - - return $last_id; - } - - /** - * Checks table name or column name. - * - * @param string $table table string - * - * @return string - */ - protected function check( $struct ) - { - if ( !is_string( $struct ) || !preg_match( '/^[a-zA-Z0-9_]+$/', $struct ) ) { - throw new RedException( 'Identifier does not conform to RedBeanPHP security policies.' ); - } - - return $struct; - } - - /** - * Checks whether the specified type (i.e. table) already exists in the database. - * Not part of the Object Database interface! - * - * @param string $table table name - * - * @return boolean - */ - public function tableExists( $table ) - { - $tables = $this->getTables(); - - return in_array( $table, $tables ); - } - - /** - * @see QueryWriter::glueSQLCondition - */ - public function glueSQLCondition( $sql, $glue = NULL ) - { - static $snippetCache = array(); - - if ( trim( $sql ) === '' ) { - return $sql; - } - - $key = $glue . '|' . $sql; - - if ( isset( $snippetCache[$key] ) ) { - return $snippetCache[$key]; - } - - $lsql = ltrim( $sql ); - - if ( preg_match( '/^(INNER|LEFT|RIGHT|JOIN|AND|OR|WHERE|ORDER|GROUP|HAVING|LIMIT|OFFSET)\s+/i', $lsql ) ) { - if ( $glue === QueryWriter::C_GLUE_WHERE && stripos( $lsql, 'AND' ) === 0 ) { - $snippetCache[$key] = ' WHERE ' . substr( $lsql, 3 ); - } else { - $snippetCache[$key] = $sql; - } - } else { - $snippetCache[$key] = ( ( $glue === QueryWriter::C_GLUE_AND ) ? ' AND ' : ' WHERE ') . $sql; - } - - return $snippetCache[$key]; - } - - /** - * @see QueryWriter::glueLimitOne - */ - public function glueLimitOne( $sql = '') - { - return ( strpos( strtoupper( $sql ), 'LIMIT' ) === FALSE ) ? ( $sql . ' LIMIT 1 ' ) : $sql; - } - - /** - * @see QueryWriter::esc - */ - public function esc( $dbStructure, $dontQuote = FALSE ) - { - $this->check( $dbStructure ); - - return ( $dontQuote ) ? $dbStructure : $this->quoteCharacter . $dbStructure . $this->quoteCharacter; - } - - /** - * @see QueryWriter::addColumn - */ - public function addColumn( $type, $column, $field ) - { - $table = $type; - $type = $field; - $table = $this->esc( $table ); - $column = $this->esc( $column ); - - $type = ( isset( $this->typeno_sqltype[$type] ) ) ? $this->typeno_sqltype[$type] : ''; - - $this->adapter->exec( "ALTER TABLE $table ADD $column $type " ); - } - - /** - * @see QueryWriter::updateRecord - */ - public function updateRecord( $type, $updatevalues, $id = NULL ) - { - $table = $type; - - if ( !$id ) { - $insertcolumns = $insertvalues = array(); - - foreach ( $updatevalues as $pair ) { - $insertcolumns[] = $pair['property']; - $insertvalues[] = $pair['value']; - } - - //Otherwise psql returns string while MySQL/SQLite return numeric causing problems with additions (array_diff) - return (string) $this->insertRecord( $table, $insertcolumns, array( $insertvalues ) ); - } - - if ( $id && !count( $updatevalues ) ) { - return $id; - } - - $table = $this->esc( $table ); - $sql = "UPDATE $table SET "; - - $p = $v = array(); - - foreach ( $updatevalues as $uv ) { - - if ( isset( self::$sqlFilters['w'][$type][$uv['property']] ) ) { - $p[] = " {$this->esc( $uv["property"] )} = ". self::$sqlFilters['w'][$type][$uv['property']]; - } else { - $p[] = " {$this->esc( $uv["property"] )} = ? "; - } - - $v[] = $uv['value']; - } - - $sql .= implode( ',', $p ) . ' WHERE id = ? '; - - $v[] = $id; - - $this->adapter->exec( $sql, $v ); - - return $id; - } - - /** - * @see QueryWriter::writeJoin - */ - public function writeJoin( $type, $targetType, $leftRight = 'LEFT' ) - { - if ( $leftRight !== 'LEFT' && $leftRight !== 'RIGHT' && $leftRight !== 'INNER' ) - throw new RedException( 'Invalid JOIN.' ); - - $table = $this->esc( $type ); - $targetTable = $this->esc( $targetType ); - $field = $this->esc( $targetType, TRUE ); - return " {$leftRight} JOIN {$targetTable} ON {$targetTable}.id = {$table}.{$field}_id "; - } - - /** - * @see QueryWriter::queryRecord - */ - public function queryRecord( $type, $conditions = array(), $addSql = NULL, $bindings = array() ) - { - $addSql = $this->glueSQLCondition( $addSql, ( count($conditions) > 0) ? QueryWriter::C_GLUE_AND : NULL ); - - $key = NULL; - if ( $this->flagUseCache ) { - $key = $this->getCacheKey( array( $conditions, $addSql, $bindings, 'select' ) ); - - if ( $cached = $this->getCached( $type, $key ) ) { - return $cached; - } - } - - $table = $this->esc( $type ); - - $sqlFilterStr = ''; - if ( count( self::$sqlFilters ) ) { - $sqlFilterStr = $this->getSQLFilterSnippet( $type ); - } - - $sql = $this->makeSQLFromConditions( $conditions, $bindings, $addSql ); - - $fieldSelection = ( self::$flagNarrowFieldMode ) ? "{$table}.*" : '*'; - $sql = "SELECT {$fieldSelection} {$sqlFilterStr} FROM {$table} {$sql} -- keep-cache"; - - $rows = $this->adapter->get( $sql, $bindings ); - - if ( $this->flagUseCache && $key ) { - $this->putResultInCache( $type, $key, $rows ); - } - - return $rows; - } - - /** - * @see QueryWriter::queryRecordWithCursor - */ - public function queryRecordWithCursor( $type, $addSql = NULL, $bindings = array() ) - { - $sql = $this->glueSQLCondition( $addSql, NULL ); - $table = $this->esc( $type ); - $sql = "SELECT {$table}.* FROM {$table} {$sql}"; - return $this->adapter->getCursor( $sql, $bindings ); - } - - /** - * @see QueryWriter::queryRecordRelated - */ - public function queryRecordRelated( $sourceType, $destType, $linkIDs, $addSql = '', $bindings = array() ) - { - $addSql = $this->glueSQLCondition( $addSql, QueryWriter::C_GLUE_WHERE ); - - list( $sourceTable, $destTable, $linkTable, $sourceCol, $destCol ) = $this->getRelationalTablesAndColumns( $sourceType, $destType ); - - $key = $this->getCacheKey( array( $sourceType, $destType, implode( ',', $linkIDs ), $addSql, $bindings ) ); - - if ( $this->flagUseCache && $cached = $this->getCached( $destType, $key ) ) { - return $cached; - } - - $inClause = $this->getParametersForInClause( $linkIDs, $bindings ); - - $sqlFilterStr = ''; - if ( count( self::$sqlFilters ) ) { - $sqlFilterStr = $this->getSQLFilterSnippet( $destType ); - } - - if ( $sourceType === $destType ) { - $inClause2 = $this->getParametersForInClause( $linkIDs, $bindings, count( $bindings ) ); //for some databases - $sql = " - SELECT - {$destTable}.* {$sqlFilterStr} , - COALESCE( - NULLIF({$linkTable}.{$sourceCol}, {$destTable}.id), - NULLIF({$linkTable}.{$destCol}, {$destTable}.id)) AS linked_by - FROM {$linkTable} - INNER JOIN {$destTable} ON - ( {$destTable}.id = {$linkTable}.{$destCol} AND {$linkTable}.{$sourceCol} IN ($inClause) ) OR - ( {$destTable}.id = {$linkTable}.{$sourceCol} AND {$linkTable}.{$destCol} IN ($inClause2) ) - {$addSql} - -- keep-cache"; - - $linkIDs = array_merge( $linkIDs, $linkIDs ); - } else { - $sql = " - SELECT - {$destTable}.* {$sqlFilterStr}, - {$linkTable}.{$sourceCol} AS linked_by - FROM {$linkTable} - INNER JOIN {$destTable} ON - ( {$destTable}.id = {$linkTable}.{$destCol} AND {$linkTable}.{$sourceCol} IN ($inClause) ) - {$addSql} - -- keep-cache"; - } - - $bindings = array_merge( $linkIDs, $bindings ); - - $rows = $this->adapter->get( $sql, $bindings ); - - $this->putResultInCache( $destType, $key, $rows ); - - return $rows; - } - - /** - * @see QueryWriter::queryRecordLink - */ - public function queryRecordLink( $sourceType, $destType, $sourceID, $destID ) - { - list( $sourceTable, $destTable, $linkTable, $sourceCol, $destCol ) = $this->getRelationalTablesAndColumns( $sourceType, $destType ); - - $key = $this->getCacheKey( array( $sourceType, $destType, $sourceID, $destID ) ); - - if ( $this->flagUseCache && $cached = $this->getCached( $linkTable, $key ) ) { - return $cached; - } - - $sqlFilterStr = ''; - if ( count( self::$sqlFilters ) ) { - $sqlFilterStr = $this->getSQLFilterSnippet( $destType ); - } - - if ( $sourceTable === $destTable ) { - $sql = "SELECT {$linkTable}.* {$sqlFilterStr} FROM {$linkTable} - WHERE ( {$sourceCol} = ? AND {$destCol} = ? ) OR - ( {$destCol} = ? AND {$sourceCol} = ? ) -- keep-cache"; - $row = $this->adapter->getRow( $sql, array( $sourceID, $destID, $sourceID, $destID ) ); - } else { - $sql = "SELECT {$linkTable}.* {$sqlFilterStr} FROM {$linkTable} - WHERE {$sourceCol} = ? AND {$destCol} = ? -- keep-cache"; - $row = $this->adapter->getRow( $sql, array( $sourceID, $destID ) ); - } - - $this->putResultInCache( $linkTable, $key, $row ); - - return $row; - } - - /** - * @see QueryWriter::queryTagged - */ - public function queryTagged( $type, $tagList, $all = FALSE, $addSql = '', $bindings = array() ) - { - $assocType = $this->getAssocTable( array( $type, 'tag' ) ); - $assocTable = $this->esc( $assocType ); - $assocField = $type . '_id'; - $table = $this->esc( $type ); - $slots = implode( ',', array_fill( 0, count( $tagList ), '?' ) ); - $score = ( $all ) ? count( $tagList ) : 1; - - $sql = " - SELECT {$table}.*, count({$table}.id) FROM {$table} - INNER JOIN {$assocTable} ON {$assocField} = {$table}.id - INNER JOIN tag ON {$assocTable}.tag_id = tag.id - WHERE tag.title IN ({$slots}) - GROUP BY {$table}.id - HAVING count({$table}.id) >= ? - {$addSql} - "; - - $bindings = array_merge( $tagList, array( $score ), $bindings ); - $rows = $this->adapter->get( $sql, $bindings ); - return $rows; - } - - /** - * @see QueryWriter::queryRecordCount - */ - public function queryRecordCount( $type, $conditions = array(), $addSql = NULL, $bindings = array() ) - { - $addSql = $this->glueSQLCondition( $addSql ); - - $table = $this->esc( $type ); - - $this->updateCache(); //check if cache chain has been broken - - $sql = $this->makeSQLFromConditions( $conditions, $bindings, $addSql ); - $sql = "SELECT COUNT(*) FROM {$table} {$sql} -- keep-cache"; - - return (int) $this->adapter->getCell( $sql, $bindings ); - } - - /** - * @see QueryWriter::queryRecordCountRelated - */ - public function queryRecordCountRelated( $sourceType, $destType, $linkID, $addSql = '', $bindings = array() ) - { - list( $sourceTable, $destTable, $linkTable, $sourceCol, $destCol ) = $this->getRelationalTablesAndColumns( $sourceType, $destType ); - - $this->updateCache(); //check if cache chain has been broken - - if ( $sourceType === $destType ) { - $sql = " - SELECT COUNT(*) FROM {$linkTable} - INNER JOIN {$destTable} ON - ( {$destTable}.id = {$linkTable}.{$destCol} AND {$linkTable}.{$sourceCol} = ? ) OR - ( {$destTable}.id = {$linkTable}.{$sourceCol} AND {$linkTable}.{$destCol} = ? ) - {$addSql} - -- keep-cache"; - - $bindings = array_merge( array( $linkID, $linkID ), $bindings ); - } else { - $sql = " - SELECT COUNT(*) FROM {$linkTable} - INNER JOIN {$destTable} ON - ( {$destTable}.id = {$linkTable}.{$destCol} AND {$linkTable}.{$sourceCol} = ? ) - {$addSql} - -- keep-cache"; - - $bindings = array_merge( array( $linkID ), $bindings ); - } - - return (int) $this->adapter->getCell( $sql, $bindings ); - } - - /** - * @see QueryWriter::deleteRecord - */ - public function deleteRecord( $type, $conditions = array(), $addSql = NULL, $bindings = array() ) - { - $addSql = $this->glueSQLCondition( $addSql ); - - $table = $this->esc( $type ); - - $sql = $this->makeSQLFromConditions( $conditions, $bindings, $addSql ); - $sql = "DELETE FROM {$table} {$sql}"; - - $this->adapter->exec( $sql, $bindings ); - } - - /** - * @see QueryWriter::deleteRelations - */ - public function deleteRelations( $sourceType, $destType, $sourceID ) - { - list( $sourceTable, $destTable, $linkTable, $sourceCol, $destCol ) = $this->getRelationalTablesAndColumns( $sourceType, $destType ); - - if ( $sourceTable === $destTable ) { - $sql = "DELETE FROM {$linkTable} - WHERE ( {$sourceCol} = ? ) OR - ( {$destCol} = ? ) - "; - - $this->adapter->exec( $sql, array( $sourceID, $sourceID ) ); - } else { - $sql = "DELETE FROM {$linkTable} - WHERE {$sourceCol} = ? "; - - $this->adapter->exec( $sql, array( $sourceID ) ); - } - } - - /** - * @see QueryWriter::widenColumn - */ - public function widenColumn( $type, $property, $dataType ) - { - if ( !isset($this->typeno_sqltype[$dataType]) ) return FALSE; - - $table = $this->esc( $type ); - $column = $this->esc( $property ); - - $newType = $this->typeno_sqltype[$dataType]; - - $this->adapter->exec( "ALTER TABLE $table CHANGE $column $column $newType " ); - - return TRUE; - } - - /** - * @see QueryWriter::wipe - */ - public function wipe( $type ) - { - $table = $this->esc( $type ); - - $this->adapter->exec( "TRUNCATE $table " ); - } - - /** - * @see QueryWriter::renameAssocTable - */ - public function renameAssocTable( $from, $to = NULL ) - { - self::renameAssociation( $from, $to ); - } - - /** - * @see QueryWriter::getAssocTable - */ - public function getAssocTable( $types ) - { - return self::getAssocTableFormat( $types ); - } - - /** - * Turns caching on or off. Default: off. - * If caching is turned on retrieval queries fired after eachother will - * use a result row cache. - * - * @param boolean - * - * @return void - */ - public function setUseCache( $yesNo ) - { - $this->flushCache(); - - $this->flagUseCache = (bool) $yesNo; - } - - /** - * Flushes the Query Writer Cache. - * Clears the internal query cache array and returns its overall - * size. - * - * @return integer - */ - public function flushCache( $newMaxCacheSizePerType = NULL ) - { - if ( !is_null( $newMaxCacheSizePerType ) && $newMaxCacheSizePerType > 0 ) { - $this->maxCacheSizePerType = $newMaxCacheSizePerType; - } - $count = count( $this->cache, COUNT_RECURSIVE ); - $this->cache = array(); - return $count; - } - - /** - * @deprecated Use esc() instead. - * - * @param string $column column to be escaped - * @param boolean $noQuotes omit quotes - * - * @return string - */ - public function safeColumn( $column, $noQuotes = FALSE ) - { - return $this->esc( $column, $noQuotes ); - } - - /** - * @deprecated Use esc() instead. - * - * @param string $table table to be escaped - * @param boolean $noQuotes omit quotes - * - * @return string - */ - public function safeTable( $table, $noQuotes = FALSE ) - { - return $this->esc( $table, $noQuotes ); - } - - /** - * @see QueryWriter::inferFetchType - */ - public function inferFetchType( $type, $property ) - { - $type = $this->esc( $type, TRUE ); - $field = $this->esc( $property, TRUE ) . '_id'; - $keys = $this->getKeyMapForType( $type ); - - foreach( $keys as $key ) { - if ( - $key['from'] === $field - ) return $key['table']; - } - return NULL; - } - - /** - * @see QueryWriter::addUniqueConstraint - */ - public function addUniqueIndex( $type, $properties ) - { - return $this->addUniqueConstraint( $type, $properties ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php deleted file mode 100644 index ad8740af..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/CUBRID.php +++ /dev/null @@ -1,351 +0,0 @@ -esc( $type ); - $tableNoQ = $this->esc( $type, TRUE ); - $targetTable = $this->esc( $targetType ); - $targetTableNoQ = $this->esc( $targetType, TRUE ); - $column = $this->esc( $property ); - $columnNoQ = $this->esc( $property, TRUE ); - $targetColumn = $this->esc( $targetProperty ); - if ( !is_null( $this->getForeignKeyForTypeProperty( $tableNoQ, $columnNoQ ) ) ) return FALSE; - $needsToDropFK = FALSE; - $casc = ( $isDep ? 'CASCADE' : 'SET NULL' ); - $sql = "ALTER TABLE $table ADD CONSTRAINT FOREIGN KEY($column) REFERENCES $targetTable($targetColumn) ON DELETE $casc "; - try { - $this->adapter->exec( $sql ); - } catch( SQLException $e ) { - return FALSE; - } - return TRUE; - } - - /** - * @see AQueryWriter::getKeyMapForType - */ - protected function getKeyMapForType( $type ) - { - $sqlCode = $this->adapter->get("SHOW CREATE TABLE `{$type}`"); - if (!isset($sqlCode[0])) return array(); - $matches = array(); - preg_match_all( '/CONSTRAINT\s+\[([\w_]+)\]\s+FOREIGN\s+KEY\s+\(\[([\w_]+)\]\)\s+REFERENCES\s+\[([\w_]+)\](\s+ON\s+DELETE\s+(CASCADE|SET\sNULL|RESTRICT|NO\sACTION)\s+ON\s+UPDATE\s+(SET\sNULL|RESTRICT|NO\sACTION))?/', $sqlCode[0]['CREATE TABLE'], $matches ); - $list = array(); - if (!isset($matches[0])) return $list; - $max = count($matches[0]); - for($i = 0; $i < $max; $i++) { - $label = $this->makeFKLabel( $matches[2][$i], $matches[3][$i], 'id' ); - $list[ $label ] = array( - 'name' => $matches[1][$i], - 'from' => $matches[2][$i], - 'table' => $matches[3][$i], - 'to' => 'id', - 'on_update' => $matches[6][$i], - 'on_delete' => $matches[5][$i] - ); - } - return $list; - } - - /** - * Constructor - * - * @param Adapter $adapter Database Adapter - */ - public function __construct( Adapter $adapter ) - { - $this->typeno_sqltype = array( - CUBRID::C_DATATYPE_INTEGER => ' INTEGER ', - CUBRID::C_DATATYPE_DOUBLE => ' DOUBLE ', - CUBRID::C_DATATYPE_STRING => ' STRING ', - CUBRID::C_DATATYPE_SPECIAL_DATE => ' DATE ', - CUBRID::C_DATATYPE_SPECIAL_DATETIME => ' DATETIME ', - ); - - $this->sqltype_typeno = array(); - - foreach ( $this->typeno_sqltype as $k => $v ) { - $this->sqltype_typeno[trim( ( $v ) )] = $k; - } - - $this->sqltype_typeno['STRING(1073741823)'] = self::C_DATATYPE_STRING; - - $this->adapter = $adapter; - } - - /** - * This method returns the datatype to be used for primary key IDS and - * foreign keys. Returns one if the data type constants. - * - * @return integer - */ - public function getTypeForID() - { - return self::C_DATATYPE_INTEGER; - } - - /** - * @see QueryWriter::getTables - */ - public function getTables() - { - $rows = $this->adapter->getCol( "SELECT class_name FROM db_class WHERE is_system_class = 'NO';" ); - - return $rows; - } - - /** - * @see QueryWriter::createTable - */ - public function createTable( $table ) - { - $sql = 'CREATE TABLE ' - . $this->esc( $table ) - . ' ("id" integer AUTO_INCREMENT, CONSTRAINT "pk_' - . $this->esc( $table, TRUE ) - . '_id" PRIMARY KEY("id"))'; - - $this->adapter->exec( $sql ); - } - - /** - * @see QueryWriter::getColumns - */ - public function getColumns( $table ) - { - $table = $this->esc( $table ); - - $columnsRaw = $this->adapter->get( "SHOW COLUMNS FROM $table" ); - - $columns = array(); - foreach ( $columnsRaw as $r ) { - $columns[$r['Field']] = $r['Type']; - } - - return $columns; - } - - /** - * @see QueryWriter::scanType - */ - public function scanType( $value, $flagSpecial = FALSE ) - { - $this->svalue = $value; - - if ( is_null( $value ) ) { - return self::C_DATATYPE_INTEGER; - } - - if ( $flagSpecial ) { - if ( preg_match( '/^\d{4}\-\d\d-\d\d$/', $value ) ) { - return self::C_DATATYPE_SPECIAL_DATE; - } - if ( preg_match( '/^\d{4}\-\d\d-\d\d\s\d\d:\d\d:\d\d$/', $value ) ) { - return self::C_DATATYPE_SPECIAL_DATETIME; - } - } - - $value = strval( $value ); - - if ( !$this->startsWithZeros( $value ) ) { - if ( is_numeric( $value ) && ( floor( $value ) == $value ) && $value >= -2147483647 && $value <= 2147483647 ) { - return self::C_DATATYPE_INTEGER; - } - if ( is_numeric( $value ) ) { - return self::C_DATATYPE_DOUBLE; - } - } - - return self::C_DATATYPE_STRING; - } - - /** - * @see QueryWriter::code - */ - public function code( $typedescription, $includeSpecials = FALSE ) - { - $r = ( ( isset( $this->sqltype_typeno[$typedescription] ) ) ? $this->sqltype_typeno[$typedescription] : self::C_DATATYPE_SPECIFIED ); - - if ( $includeSpecials ) { - return $r; - } - - if ( $r >= QueryWriter::C_DATATYPE_RANGE_SPECIAL ) { - return self::C_DATATYPE_SPECIFIED; - } - - return $r; - } - - /** - * @see QueryWriter::addColumn - */ - public function addColumn( $type, $column, $field ) - { - $table = $type; - $type = $field; - - $table = $this->esc( $table ); - $column = $this->esc( $column ); - - $type = array_key_exists( $type, $this->typeno_sqltype ) ? $this->typeno_sqltype[$type] : ''; - - $this->adapter->exec( "ALTER TABLE $table ADD COLUMN $column $type " ); - } - - /** - * @see QueryWriter::addUniqueIndex - */ - public function addUniqueConstraint( $type, $properties ) - { - $tableNoQ = $this->esc( $type, TRUE ); - $columns = array(); - foreach( $properties as $key => $column ) $columns[$key] = $this->esc( $column ); - $table = $this->esc( $type ); - sort( $columns ); // else we get multiple indexes due to order-effects - $name = 'UQ_' . sha1( implode( ',', $columns ) ); - $sql = "ALTER TABLE $table ADD CONSTRAINT UNIQUE $name (" . implode( ',', $columns ) . ")"; - try { - $this->adapter->exec( $sql ); - } catch( SQLException $e ) { - return FALSE; - } - return TRUE; - } - - /** - * @see QueryWriter::sqlStateIn - */ - public function sqlStateIn( $state, $list ) - { - return ( $state == 'HY000' ) ? ( count( array_diff( array( - QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION, - QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN, - QueryWriter::C_SQLSTATE_NO_SUCH_TABLE - ), $list ) ) !== 3 ) : FALSE; - } - - /** - * @see QueryWriter::addIndex - */ - public function addIndex( $type, $name, $column ) - { - try { - $table = $this->esc( $type ); - $name = preg_replace( '/\W/', '', $name ); - $column = $this->esc( $column ); - $this->adapter->exec( "CREATE INDEX $name ON $table ($column) " ); - return TRUE; - } catch ( SQLException $e ) { - return FALSE; - } - } - - /** - * @see QueryWriter::addFK - */ - public function addFK( $type, $targetType, $property, $targetProperty, $isDependent = FALSE ) - { - return $this->buildFK( $type, $targetType, $property, $targetProperty, $isDependent ); - } - - /** - * @see QueryWriter::wipeAll - */ - public function wipeAll() - { - foreach ( $this->getTables() as $t ) { - foreach ( $this->getKeyMapForType( $t ) as $k ) { - $this->adapter->exec( "ALTER TABLE \"$t\" DROP FOREIGN KEY \"{$k['name']}\"" ); - } - } - foreach ( $this->getTables() as $t ) { - $this->adapter->exec( "DROP TABLE \"$t\"" ); - } - } - - /** - * @see QueryWriter::esc - */ - public function esc( $dbStructure, $noQuotes = FALSE ) - { - return parent::esc( strtolower( $dbStructure ), $noQuotes ); - } - - /** - * @see QueryWriter::inferFetchType - */ - public function inferFetchType( $type, $property ) - { - $table = $this->esc( $type, TRUE ); - $field = $this->esc( $property, TRUE ) . '_id'; - $keys = $this->getKeyMapForType( $table ); - - foreach( $keys as $key ) { - if ( - $key['from'] === $field - ) return $key['table']; - } - return NULL; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php deleted file mode 100755 index f6545c2a..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/MySQL.php +++ /dev/null @@ -1,375 +0,0 @@ -adapter->getCell('SELECT DATABASE()'); - $table = $this->esc( $type, TRUE ); - $keys = $this->adapter->get(' - SELECT - information_schema.key_column_usage.constraint_name AS `name`, - information_schema.key_column_usage.referenced_table_name AS `table`, - information_schema.key_column_usage.column_name AS `from`, - information_schema.key_column_usage.referenced_column_name AS `to`, - information_schema.referential_constraints.update_rule AS `on_update`, - information_schema.referential_constraints.delete_rule AS `on_delete` - FROM information_schema.key_column_usage - INNER JOIN information_schema.referential_constraints - ON information_schema.referential_constraints.constraint_name = information_schema.key_column_usage.constraint_name - WHERE - information_schema.key_column_usage.table_schema = :database - AND information_schema.referential_constraints.constraint_schema = :database - AND information_schema.key_column_usage.constraint_schema = :database - AND information_schema.key_column_usage.table_name = :table - AND information_schema.key_column_usage.constraint_name != \'PRIMARY\' - AND information_schema.key_column_usage.referenced_table_name IS NOT NULL - ', array( ':database' => $databaseName, ':table' => $table ) ); - $keyInfoList = array(); - foreach ( $keys as $k ) { - $label = $this->makeFKLabel( $k['from'], $k['table'], $k['to'] ); - $keyInfoList[$label] = array( - 'name' => $k['name'], - 'from' => $k['from'], - 'table' => $k['table'], - 'to' => $k['to'], - 'on_update' => $k['on_update'], - 'on_delete' => $k['on_delete'] - ); - } - return $keyInfoList; - } - - /** - * Constructor - * - * @param Adapter $adapter Database Adapter - */ - public function __construct( Adapter $adapter ) - { - $this->typeno_sqltype = array( - MySQL::C_DATATYPE_BOOL => ' TINYINT(1) UNSIGNED ', - MySQL::C_DATATYPE_UINT32 => ' INT(11) UNSIGNED ', - MySQL::C_DATATYPE_DOUBLE => ' DOUBLE ', - MySQL::C_DATATYPE_TEXT7 => ' VARCHAR(191) ', - MYSQL::C_DATATYPE_TEXT8 => ' VARCHAR(255) ', - MySQL::C_DATATYPE_TEXT16 => ' TEXT ', - MySQL::C_DATATYPE_TEXT32 => ' LONGTEXT ', - MySQL::C_DATATYPE_SPECIAL_DATE => ' DATE ', - MySQL::C_DATATYPE_SPECIAL_DATETIME => ' DATETIME ', - MySQL::C_DATATYPE_SPECIAL_POINT => ' POINT ', - MySQL::C_DATATYPE_SPECIAL_LINESTRING => ' LINESTRING ', - MySQL::C_DATATYPE_SPECIAL_POLYGON => ' POLYGON ', - MySQL::C_DATATYPE_SPECIAL_MONEY => ' DECIMAL(10,2) ' - ); - - $this->sqltype_typeno = array(); - - foreach ( $this->typeno_sqltype as $k => $v ) { - $this->sqltype_typeno[trim( strtolower( $v ) )] = $k; - } - - $this->adapter = $adapter; - - $this->encoding = $this->adapter->getDatabase()->getMysqlEncoding(); - } - - /** - * This method returns the datatype to be used for primary key IDS and - * foreign keys. Returns one if the data type constants. - * - * @return integer - */ - public function getTypeForID() - { - return self::C_DATATYPE_UINT32; - } - - /** - * @see QueryWriter::getTables - */ - public function getTables() - { - return $this->adapter->getCol( 'show tables' ); - } - - /** - * @see QueryWriter::createTable - */ - public function createTable( $table ) - { - $table = $this->esc( $table ); - - $encoding = $this->adapter->getDatabase()->getMysqlEncoding(); - $sql = "CREATE TABLE $table (id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY ( id )) ENGINE = InnoDB DEFAULT CHARSET={$encoding} COLLATE={$encoding}_unicode_ci "; - - $this->adapter->exec( $sql ); - } - - /** - * @see QueryWriter::getColumns - */ - public function getColumns( $table ) - { - $columnsRaw = $this->adapter->get( "DESCRIBE " . $this->esc( $table ) ); - - $columns = array(); - foreach ( $columnsRaw as $r ) { - $columns[$r['Field']] = $r['Type']; - } - - return $columns; - } - - /** - * @see QueryWriter::scanType - */ - public function scanType( $value, $flagSpecial = FALSE ) - { - $this->svalue = $value; - - if ( is_null( $value ) ) return MySQL::C_DATATYPE_BOOL; - if ( $value === INF ) return MySQL::C_DATATYPE_TEXT7; - - if ( $flagSpecial ) { - if ( preg_match( '/^-?\d+\.\d{2}$/', $value ) ) { - return MySQL::C_DATATYPE_SPECIAL_MONEY; - } - if ( preg_match( '/^\d{4}\-\d\d-\d\d$/', $value ) ) { - return MySQL::C_DATATYPE_SPECIAL_DATE; - } - if ( preg_match( '/^\d{4}\-\d\d-\d\d\s\d\d:\d\d:\d\d$/', $value ) ) { - return MySQL::C_DATATYPE_SPECIAL_DATETIME; - } - if ( preg_match( '/^POINT\(/', $value ) ) { - return MySQL::C_DATATYPE_SPECIAL_POINT; - } - if ( preg_match( '/^LINESTRING\(/', $value ) ) { - return MySQL::C_DATATYPE_SPECIAL_LINESTRING; - } - if ( preg_match( '/^POLYGON\(/', $value ) ) { - return MySQL::C_DATATYPE_SPECIAL_POLYGON; - } - } - - //setter turns TRUE FALSE into 0 and 1 because database has no real bools (TRUE and FALSE only for test?). - if ( $value === FALSE || $value === TRUE || $value === '0' || $value === '1' ) { - return MySQL::C_DATATYPE_BOOL; - } - - if ( is_float( $value ) ) return self::C_DATATYPE_DOUBLE; - - if ( !$this->startsWithZeros( $value ) ) { - - if ( is_numeric( $value ) && ( floor( $value ) == $value ) && $value >= 0 && $value <= 4294967295 ) { - return MySQL::C_DATATYPE_UINT32; - } - - if ( is_numeric( $value ) ) { - return MySQL::C_DATATYPE_DOUBLE; - } - } - - if ( mb_strlen( $value, 'UTF-8' ) <= 191 ) { - return MySQL::C_DATATYPE_TEXT7; - } - - if ( mb_strlen( $value, 'UTF-8' ) <= 255 ) { - return MySQL::C_DATATYPE_TEXT8; - } - - if ( mb_strlen( $value, 'UTF-8' ) <= 65535 ) { - return MySQL::C_DATATYPE_TEXT16; - } - - return MySQL::C_DATATYPE_TEXT32; - } - - /** - * @see QueryWriter::code - */ - public function code( $typedescription, $includeSpecials = FALSE ) - { - if ( isset( $this->sqltype_typeno[$typedescription] ) ) { - $r = $this->sqltype_typeno[$typedescription]; - } else { - $r = self::C_DATATYPE_SPECIFIED; - } - - if ( $includeSpecials ) { - return $r; - } - - if ( $r >= QueryWriter::C_DATATYPE_RANGE_SPECIAL ) { - return self::C_DATATYPE_SPECIFIED; - } - - return $r; - } - - /** - * @see QueryWriter::addUniqueIndex - */ - public function addUniqueConstraint( $type, $properties ) - { - $tableNoQ = $this->esc( $type, TRUE ); - $columns = array(); - foreach( $properties as $key => $column ) $columns[$key] = $this->esc( $column ); - $table = $this->esc( $type ); - sort( $columns ); // Else we get multiple indexes due to order-effects - $name = 'UQ_' . sha1( implode( ',', $columns ) ); - try { - $sql = "ALTER TABLE $table - ADD UNIQUE INDEX $name (" . implode( ',', $columns ) . ")"; - $this->adapter->exec( $sql ); - } catch ( SQLException $e ) { - //do nothing, dont use alter table ignore, this will delete duplicate records in 3-ways! - return FALSE; - } - return TRUE; - } - - /** - * @see QueryWriter::addIndex - */ - public function addIndex( $type, $name, $property ) - { - try { - $table = $this->esc( $type ); - $name = preg_replace( '/\W/', '', $name ); - $column = $this->esc( $property ); - $this->adapter->exec( "CREATE INDEX $name ON $table ($column) " ); - return TRUE; - } catch ( SQLException $e ) { - return FALSE; - } - } - - /** - * @see QueryWriter::addFK - * @return bool - */ - public function addFK( $type, $targetType, $property, $targetProperty, $isDependent = FALSE ) - { - $table = $this->esc( $type ); - $targetTable = $this->esc( $targetType ); - $targetTableNoQ = $this->esc( $targetType, TRUE ); - $field = $this->esc( $property ); - $fieldNoQ = $this->esc( $property, TRUE ); - $targetField = $this->esc( $targetProperty ); - $targetFieldNoQ = $this->esc( $targetProperty, TRUE ); - $tableNoQ = $this->esc( $type, TRUE ); - $fieldNoQ = $this->esc( $property, TRUE ); - if ( !is_null( $this->getForeignKeyForTypeProperty( $tableNoQ, $fieldNoQ ) ) ) return FALSE; - - //Widen the column if it's incapable of representing a foreign key (at least INT). - $columns = $this->getColumns( $tableNoQ ); - $idType = $this->getTypeForID(); - if ( $this->code( $columns[$fieldNoQ] ) !== $idType ) { - $this->widenColumn( $type, $property, $idType ); - } - - $fkName = 'fk_'.($tableNoQ.'_'.$fieldNoQ); - $cName = 'c_'.$fkName; - try { - $this->adapter->exec( " - ALTER TABLE {$table} - ADD CONSTRAINT $cName - FOREIGN KEY $fkName ( {$fieldNoQ} ) REFERENCES {$targetTableNoQ} - ({$targetFieldNoQ}) ON DELETE " . ( $isDependent ? 'CASCADE' : 'SET NULL' ) . ' ON UPDATE '.( $isDependent ? 'CASCADE' : 'SET NULL' ).';'); - } catch ( SQLException $e ) { - // Failure of fk-constraints is not a problem - } - return true; - } - - /** - * @see QueryWriter::sqlStateIn - */ - public function sqlStateIn( $state, $list ) - { - $stateMap = array( - '42S02' => QueryWriter::C_SQLSTATE_NO_SUCH_TABLE, - '42S22' => QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN, - '23000' => QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION - ); - - return in_array( ( isset( $stateMap[$state] ) ? $stateMap[$state] : '0' ), $list ); - } - - /** - * @see QueryWriter::wipeAll - */ - public function wipeAll() - { - $this->adapter->exec( 'SET FOREIGN_KEY_CHECKS = 0;' ); - - foreach ( $this->getTables() as $t ) { - try { - $this->adapter->exec( "DROP TABLE IF EXISTS `$t`" ); - } catch ( SQLException $e ) { - } - - try { - $this->adapter->exec( "DROP VIEW IF EXISTS `$t`" ); - } catch ( SQLException $e ) { - } - } - - $this->adapter->exec( 'SET FOREIGN_KEY_CHECKS = 1;' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php deleted file mode 100755 index f364fc79..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/PostgreSQL.php +++ /dev/null @@ -1,381 +0,0 @@ -esc( $type, TRUE ); - $keys = $this->adapter->get( ' - SELECT - information_schema.key_column_usage.constraint_name AS "name", - information_schema.key_column_usage.column_name AS "from", - information_schema.constraint_table_usage.table_name AS "table", - information_schema.constraint_column_usage.column_name AS "to", - information_schema.referential_constraints.update_rule AS "on_update", - information_schema.referential_constraints.delete_rule AS "on_delete" - FROM information_schema.key_column_usage - INNER JOIN information_schema.constraint_table_usage - ON ( - information_schema.key_column_usage.constraint_name = information_schema.constraint_table_usage.constraint_name - AND information_schema.key_column_usage.constraint_schema = information_schema.constraint_table_usage.constraint_schema - AND information_schema.key_column_usage.constraint_catalog = information_schema.constraint_table_usage.constraint_catalog - ) - INNER JOIN information_schema.constraint_column_usage - ON ( - information_schema.key_column_usage.constraint_name = information_schema.constraint_column_usage.constraint_name - AND information_schema.key_column_usage.constraint_schema = information_schema.constraint_column_usage.constraint_schema - AND information_schema.key_column_usage.constraint_catalog = information_schema.constraint_column_usage.constraint_catalog - ) - INNER JOIN information_schema.referential_constraints - ON ( - information_schema.key_column_usage.constraint_name = information_schema.referential_constraints.constraint_name - AND information_schema.key_column_usage.constraint_schema = information_schema.referential_constraints.constraint_schema - AND information_schema.key_column_usage.constraint_catalog = information_schema.referential_constraints.constraint_catalog - ) - WHERE - information_schema.key_column_usage.table_catalog = current_database() - AND information_schema.key_column_usage.table_schema = ANY( current_schemas( FALSE ) ) - AND information_schema.key_column_usage.table_name = ? - ', array( $type ) ); - $keyInfoList = array(); - foreach ( $keys as $k ) { - $label = $this->makeFKLabel( $k['from'], $k['table'], $k['to'] ); - $keyInfoList[$label] = array( - 'name' => $k['name'], - 'from' => $k['from'], - 'table' => $k['table'], - 'to' => $k['to'], - 'on_update' => $k['on_update'], - 'on_delete' => $k['on_delete'] - ); - } - return $keyInfoList; - } - - /** - * Constructor - * - * @param Adapter $adapter Database Adapter - */ - public function __construct( Adapter $adapter ) - { - $this->typeno_sqltype = array( - self::C_DATATYPE_INTEGER => ' integer ', - self::C_DATATYPE_DOUBLE => ' double precision ', - self::C_DATATYPE_TEXT => ' text ', - self::C_DATATYPE_SPECIAL_DATE => ' date ', - self::C_DATATYPE_SPECIAL_DATETIME => ' timestamp without time zone ', - self::C_DATATYPE_SPECIAL_POINT => ' point ', - self::C_DATATYPE_SPECIAL_LSEG => ' lseg ', - self::C_DATATYPE_SPECIAL_CIRCLE => ' circle ', - self::C_DATATYPE_SPECIAL_MONEY => ' money ', - self::C_DATATYPE_SPECIAL_MONEY2 => ' numeric(10,2) ', - self::C_DATATYPE_SPECIAL_POLYGON => ' polygon ', - ); - - $this->sqltype_typeno = array(); - - foreach ( $this->typeno_sqltype as $k => $v ) { - $this->sqltype_typeno[trim( strtolower( $v ) )] = $k; - } - - $this->adapter = $adapter; - } - - /** - * This method returns the datatype to be used for primary key IDS and - * foreign keys. Returns one if the data type constants. - * - * @return integer - */ - public function getTypeForID() - { - return self::C_DATATYPE_INTEGER; - } - - /** - * @see QueryWriter::getTables - */ - public function getTables() - { - return $this->adapter->getCol( 'SELECT table_name FROM information_schema.tables WHERE table_schema = ANY( current_schemas( FALSE ) )' ); - } - - /** - * @see QueryWriter::createTable - */ - public function createTable( $table ) - { - $table = $this->esc( $table ); - - $this->adapter->exec( " CREATE TABLE $table (id SERIAL PRIMARY KEY); " ); - } - - /** - * @see QueryWriter::getColumns - */ - public function getColumns( $table ) - { - $table = $this->esc( $table, TRUE ); - - $columnsRaw = $this->adapter->get( "SELECT column_name, data_type FROM information_schema.columns WHERE table_name='$table' AND table_schema = ANY( current_schemas( FALSE ) )" ); - - $columns = array(); - foreach ( $columnsRaw as $r ) { - $columns[$r['column_name']] = $r['data_type']; - } - - return $columns; - } - - /** - * @see QueryWriter::scanType - */ - public function scanType( $value, $flagSpecial = FALSE ) - { - $this->svalue = $value; - - if ( $value === INF ) return self::C_DATATYPE_TEXT; - - if ( $flagSpecial && $value ) { - if ( preg_match( '/^\d{4}\-\d\d-\d\d$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_DATE; - } - - if ( preg_match( '/^\d{4}\-\d\d-\d\d\s\d\d:\d\d:\d\d(\.\d{1,6})?$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_DATETIME; - } - - if ( preg_match( '/^\([\d\.]+,[\d\.]+\)$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_POINT; - } - - if ( preg_match( '/^\[\([\d\.]+,[\d\.]+\),\([\d\.]+,[\d\.]+\)\]$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_LSEG; - } - - if ( preg_match( '/^\<\([\d\.]+,[\d\.]+\),[\d\.]+\>$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_CIRCLE; - } - - if ( preg_match( '/^\((\([\d\.]+,[\d\.]+\),?)+\)$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_POLYGON; - } - - if ( preg_match( '/^\-?(\$|€|¥|£)[\d,\.]+$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_MONEY; - } - - if ( preg_match( '/^-?\d+\.\d{2}$/', $value ) ) { - return PostgreSQL::C_DATATYPE_SPECIAL_MONEY2; - } - } - - if ( is_float( $value ) ) return self::C_DATATYPE_DOUBLE; - - if ( $this->startsWithZeros( $value ) ) return self::C_DATATYPE_TEXT; - - if ( $value === FALSE || $value === TRUE || $value === NULL || ( is_numeric( $value ) - && AQueryWriter::canBeTreatedAsInt( $value ) - && $value < 2147483648 - && $value > -2147483648 ) - ) { - return self::C_DATATYPE_INTEGER; - } elseif ( is_numeric( $value ) ) { - return self::C_DATATYPE_DOUBLE; - } else { - return self::C_DATATYPE_TEXT; - } - } - - /** - * @see QueryWriter::code - */ - public function code( $typedescription, $includeSpecials = FALSE ) - { - $r = ( isset( $this->sqltype_typeno[$typedescription] ) ) ? $this->sqltype_typeno[$typedescription] : 99; - - if ( $includeSpecials ) return $r; - - if ( $r >= QueryWriter::C_DATATYPE_RANGE_SPECIAL ) { - return self::C_DATATYPE_SPECIFIED; - } - - return $r; - } - - /** - * @see QueryWriter::widenColumn - */ - public function widenColumn( $type, $column, $datatype ) - { - $table = $type; - $type = $datatype; - - $table = $this->esc( $table ); - $column = $this->esc( $column ); - - $newtype = $this->typeno_sqltype[$type]; - - $this->adapter->exec( "ALTER TABLE $table \n\t ALTER COLUMN $column TYPE $newtype " ); - } - - /** - * @see QueryWriter::addUniqueIndex - */ - public function addUniqueConstraint( $type, $properties ) - { - $tableNoQ = $this->esc( $type, TRUE ); - $columns = array(); - foreach( $properties as $key => $column ) $columns[$key] = $this->esc( $column ); - $table = $this->esc( $type ); - sort( $columns ); //else we get multiple indexes due to order-effects - $name = "UQ_" . sha1( $table . implode( ',', $columns ) ); - $sql = "ALTER TABLE {$table} - ADD CONSTRAINT $name UNIQUE (" . implode( ',', $columns ) . ")"; - try { - $this->adapter->exec( $sql ); - } catch( SQLException $e ) { - return FALSE; - } - return TRUE; - } - - /** - * @see QueryWriter::sqlStateIn - */ - public function sqlStateIn( $state, $list ) - { - $stateMap = array( - '42P01' => QueryWriter::C_SQLSTATE_NO_SUCH_TABLE, - '42703' => QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN, - '23505' => QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION - ); - - return in_array( ( isset( $stateMap[$state] ) ? $stateMap[$state] : '0' ), $list ); - } - - /** - * @see QueryWriter::addIndex - */ - public function addIndex( $type, $name, $property ) - { - $table = $this->esc( $type ); - $name = preg_replace( '/\W/', '', $name ); - $column = $this->esc( $property ); - - try { - $this->adapter->exec( "CREATE INDEX {$name} ON $table ({$column}) " ); - return TRUE; - } catch ( SQLException $e ) { - return FALSE; - } - } - - /** - * @see QueryWriter::addFK - */ - public function addFK( $type, $targetType, $property, $targetProperty, $isDep = FALSE ) - { - $table = $this->esc( $type ); - $targetTable = $this->esc( $targetType ); - $field = $this->esc( $property ); - $targetField = $this->esc( $targetProperty ); - $tableNoQ = $this->esc( $type, TRUE ); - $fieldNoQ = $this->esc( $property, TRUE ); - if ( !is_null( $this->getForeignKeyForTypeProperty( $tableNoQ, $fieldNoQ ) ) ) return FALSE; - try{ - $delRule = ( $isDep ? 'CASCADE' : 'SET NULL' ); - $this->adapter->exec( "ALTER TABLE {$table} - ADD FOREIGN KEY ( {$field} ) REFERENCES {$targetTable} - ({$targetField}) ON DELETE {$delRule} ON UPDATE {$delRule} DEFERRABLE ;" ); - return TRUE; - } catch ( SQLException $e ) { - return FALSE; - } - } - - /** - * @see QueryWriter::wipeAll - */ - public function wipeAll() - { - $this->adapter->exec( 'SET CONSTRAINTS ALL DEFERRED' ); - - foreach ( $this->getTables() as $t ) { - $t = $this->esc( $t ); - - $this->adapter->exec( "DROP TABLE IF EXISTS $t CASCADE " ); - } - - $this->adapter->exec( 'SET CONSTRAINTS ALL IMMEDIATE' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php deleted file mode 100755 index 96f52d3c..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/QueryWriter/SQLiteT.php +++ /dev/null @@ -1,437 +0,0 @@ - name of the table - * columns => array( name => datatype ) - * indexes => array() raw index information rows from PRAGMA query - * keys => array() raw key information rows from PRAGMA query - * ) - * - * @param string $type type you want to get info of - * - * @return array - */ - protected function getTable( $type ) - { - $tableName = $this->esc( $type, TRUE ); - $columns = $this->getColumns( $type ); - $indexes = $this->getIndexes( $type ); - $keys = $this->getKeyMapForType( $type ); - - $table = array( - 'columns' => $columns, - 'indexes' => $indexes, - 'keys' => $keys, - 'name' => $tableName - ); - - $this->tableArchive[$tableName] = $table; - - return $table; - } - - /** - * Puts a table. Updates the table structure. - * In SQLite we can't change columns, drop columns, change or add foreign keys so we - * have a table-rebuild function. You simply load your table with getTable(), modify it and - * then store it with putTable()... - * - * @param array $tableMap information array - * - * @return void - */ - protected function putTable( $tableMap ) - { - $table = $tableMap['name']; - $q = array(); - $q[] = "DROP TABLE IF EXISTS tmp_backup;"; - - $oldColumnNames = array_keys( $this->getColumns( $table ) ); - - foreach ( $oldColumnNames as $k => $v ) $oldColumnNames[$k] = "`$v`"; - - $q[] = "CREATE TEMPORARY TABLE tmp_backup(" . implode( ",", $oldColumnNames ) . ");"; - $q[] = "INSERT INTO tmp_backup SELECT * FROM `$table`;"; - $q[] = "PRAGMA foreign_keys = 0 "; - $q[] = "DROP TABLE `$table`;"; - - $newTableDefStr = ''; - foreach ( $tableMap['columns'] as $column => $type ) { - if ( $column != 'id' ) { - $newTableDefStr .= ",`$column` $type"; - } - } - - $fkDef = ''; - foreach ( $tableMap['keys'] as $key ) { - $fkDef .= ", FOREIGN KEY(`{$key['from']}`) - REFERENCES `{$key['table']}`(`{$key['to']}`) - ON DELETE {$key['on_delete']} ON UPDATE {$key['on_update']}"; - } - - $q[] = "CREATE TABLE `$table` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT $newTableDefStr $fkDef );"; - - foreach ( $tableMap['indexes'] as $name => $index ) { - if ( strpos( $name, 'UQ_' ) === 0 ) { - $cols = explode( '__', substr( $name, strlen( 'UQ_' . $table ) ) ); - foreach ( $cols as $k => $v ) $cols[$k] = "`$v`"; - $q[] = "CREATE UNIQUE INDEX $name ON `$table` (" . implode( ',', $cols ) . ")"; - } else $q[] = "CREATE INDEX $name ON `$table` ({$index['name']}) "; - } - - $q[] = "INSERT INTO `$table` SELECT * FROM tmp_backup;"; - $q[] = "DROP TABLE tmp_backup;"; - $q[] = "PRAGMA foreign_keys = 1 "; - - foreach ( $q as $sq ) $this->adapter->exec( $sq ); - } - - /** - * Returns the an array describing the indexes for type $type. - * - * @param string $type type to describe indexes of - * - * @return array - */ - protected function getIndexes( $type ) - { - $table = $this->esc( $type, TRUE ); - $indexes = $this->adapter->get( "PRAGMA index_list('$table')" ); - - $indexInfoList = array(); - foreach ( $indexes as $i ) { - $indexInfoList[$i['name']] = $this->adapter->getRow( "PRAGMA index_info('{$i['name']}') " ); - - $indexInfoList[$i['name']]['unique'] = $i['unique']; - } - - return $indexInfoList; - } - - /** - * Adds a foreign key to a type. - * Note: cant put this in try-catch because that can hide the fact - * that database has been damaged. - * - * @param string $type type you want to modify table of - * @param string $targetType target type - * @param string $field field of the type that needs to get the fk - * @param string $targetField field where the fk needs to point to - * @param integer $buildopt 0 = NO ACTION, 1 = ON DELETE CASCADE - * - * @return boolean - */ - protected function buildFK( $type, $targetType, $property, $targetProperty, $constraint = FALSE ) - { - $table = $this->esc( $type, TRUE ); - $targetTable = $this->esc( $targetType, TRUE ); - $column = $this->esc( $property, TRUE ); - $targetColumn = $this->esc( $targetProperty, TRUE ); - - $tables = $this->getTables(); - if ( !in_array( $targetTable, $tables ) ) return FALSE; - - if ( !is_null( $this->getForeignKeyForTypeProperty( $table, $column ) ) ) return FALSE; - $t = $this->getTable( $table ); - $consSQL = ( $constraint ? 'CASCADE' : 'SET NULL' ); - $label = 'from_' . $column . '_to_table_' . $targetTable . '_col_' . $targetColumn; - $t['keys'][$label] = array( - 'table' => $targetTable, - 'from' => $column, - 'to' => $targetColumn, - 'on_update' => $consSQL, - 'on_delete' => $consSQL - ); - $this->putTable( $t ); - return TRUE; - } - - /** - * @see AQueryWriter::getKeyMapForType - */ - protected function getKeyMapForType( $type ) - { - $table = $this->esc( $type, TRUE ); - $keys = $this->adapter->get( "PRAGMA foreign_key_list('$table')" ); - $keyInfoList = array(); - foreach ( $keys as $k ) { - $label = $this->makeFKLabel( $k['from'], $k['table'], $k['to'] ); - $keyInfoList[$label] = array( - 'name' => $label, - 'from' => $k['from'], - 'table' => $k['table'], - 'to' => $k['to'], - 'on_update' => $k['on_update'], - 'on_delete' => $k['on_delete'] - ); - } - return $keyInfoList; - } - - /** - * Constructor - * - * @param Adapter $adapter Database Adapter - */ - public function __construct( Adapter $adapter ) - { - $this->typeno_sqltype = array( - SQLiteT::C_DATATYPE_INTEGER => 'INTEGER', - SQLiteT::C_DATATYPE_NUMERIC => 'NUMERIC', - SQLiteT::C_DATATYPE_TEXT => 'TEXT', - ); - - $this->sqltype_typeno = array(); - - foreach ( $this->typeno_sqltype as $k => $v ) { - $this->sqltype_typeno[$v] = $k; - } - - $this->adapter = $adapter; - } - - /** - * This method returns the datatype to be used for primary key IDS and - * foreign keys. Returns one if the data type constants. - * - * @return integer $const data type to be used for IDS. - */ - public function getTypeForID() - { - return self::C_DATATYPE_INTEGER; - } - - /** - * @see QueryWriter::scanType - */ - public function scanType( $value, $flagSpecial = FALSE ) - { - $this->svalue = $value; - - if ( $value === NULL ) return self::C_DATATYPE_INTEGER; - if ( $value === INF ) return self::C_DATATYPE_TEXT; - - if ( $this->startsWithZeros( $value ) ) return self::C_DATATYPE_TEXT; - - if ( $value === TRUE || $value === FALSE ) return self::C_DATATYPE_INTEGER; - - if ( is_numeric( $value ) && ( intval( $value ) == $value ) && $value < 2147483648 && $value > -2147483648 ) return self::C_DATATYPE_INTEGER; - - if ( ( is_numeric( $value ) && $value < 2147483648 && $value > -2147483648) - || preg_match( '/\d{4}\-\d\d\-\d\d/', $value ) - || preg_match( '/\d{4}\-\d\d\-\d\d\s\d\d:\d\d:\d\d/', $value ) - ) { - return self::C_DATATYPE_NUMERIC; - } - - return self::C_DATATYPE_TEXT; - } - - /** - * @see QueryWriter::addColumn - */ - public function addColumn( $table, $column, $type ) - { - $column = $this->check( $column ); - $table = $this->check( $table ); - $type = $this->typeno_sqltype[$type]; - - $this->adapter->exec( "ALTER TABLE `$table` ADD `$column` $type " ); - } - - /** - * @see QueryWriter::code - */ - public function code( $typedescription, $includeSpecials = FALSE ) - { - $r = ( ( isset( $this->sqltype_typeno[$typedescription] ) ) ? $this->sqltype_typeno[$typedescription] : 99 ); - - return $r; - } - - /** - * @see QueryWriter::widenColumn - */ - public function widenColumn( $type, $column, $datatype ) - { - $t = $this->getTable( $type ); - - $t['columns'][$column] = $this->typeno_sqltype[$datatype]; - - $this->putTable( $t ); - } - - /** - * @see QueryWriter::getTables(); - */ - public function getTables() - { - return $this->adapter->getCol( "SELECT name FROM sqlite_master - WHERE type='table' AND name!='sqlite_sequence';" ); - } - - /** - * @see QueryWriter::createTable - */ - public function createTable( $table ) - { - $table = $this->esc( $table ); - - $sql = "CREATE TABLE $table ( id INTEGER PRIMARY KEY AUTOINCREMENT ) "; - - $this->adapter->exec( $sql ); - } - - /** - * @see QueryWriter::getColumns - */ - public function getColumns( $table ) - { - $table = $this->esc( $table, TRUE ); - - $columnsRaw = $this->adapter->get( "PRAGMA table_info('$table')" ); - - $columns = array(); - foreach ( $columnsRaw as $r ) $columns[$r['name']] = $r['type']; - - return $columns; - } - - /** - * @see QueryWriter::addUniqueIndex - */ - public function addUniqueConstraint( $type, $properties ) - { - $tableNoQ = $this->esc( $type, TRUE ); - $name = 'UQ_' . $this->esc( $type, TRUE ) . implode( '__', $properties ); - $t = $this->getTable( $type ); - $t['indexes'][$name] = array( 'name' => $name ); - try { - $this->putTable( $t ); - } catch( SQLException $e ) { - return FALSE; - } - return TRUE; - } - - /** - * @see QueryWriter::sqlStateIn - */ - public function sqlStateIn( $state, $list ) - { - $stateMap = array( - 'HY000' => QueryWriter::C_SQLSTATE_NO_SUCH_TABLE, - '23000' => QueryWriter::C_SQLSTATE_INTEGRITY_CONSTRAINT_VIOLATION - ); - - return in_array( ( isset( $stateMap[$state] ) ? $stateMap[$state] : '0' ), $list ); - } - - /** - * @see QueryWriter::addIndex - */ - public function addIndex( $type, $name, $column ) - { - $columns = $this->getColumns( $type ); - if ( !isset( $columns[$column] ) ) return FALSE; - - $table = $this->esc( $type ); - $name = preg_replace( '/\W/', '', $name ); - $column = $this->esc( $column, TRUE ); - - try { - $t = $this->getTable( $type ); - $t['indexes'][$name] = array( 'name' => $column ); - $this->putTable( $t ); - return TRUE; - } catch( SQLException $exception ) { - return FALSE; - } - } - - /** - * @see QueryWriter::wipe - */ - public function wipe( $type ) - { - $table = $this->esc( $type ); - - $this->adapter->exec( "DELETE FROM $table " ); - } - - /** - * @see QueryWriter::addFK - */ - public function addFK( $type, $targetType, $property, $targetProperty, $isDep = FALSE ) - { - return $this->buildFK( $type, $targetType, $property, $targetProperty, $isDep ); - } - - /** - * @see QueryWriter::wipeAll - */ - public function wipeAll() - { - $this->adapter->exec( 'PRAGMA foreign_keys = 0 ' ); - - foreach ( $this->getTables() as $t ) { - try { - $this->adapter->exec( "DROP TABLE IF EXISTS `$t`" ); - } catch ( SQLException $e ) { - } - - try { - $this->adapter->exec( "DROP TABLE IF EXISTS `$t`" ); - } catch ( SQLException $e ) { - } - } - - $this->adapter->exec( 'PRAGMA foreign_keys = 1 ' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/R.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/R.php deleted file mode 100644 index 6f2648b4..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/R.php +++ /dev/null @@ -1,21 +0,0 @@ -sqlState; - } - - /** - * Returns the raw SQL STATE, possibly compliant with - * ANSI SQL error codes - but this depends on database driver. - * - * @param string $sqlState SQL state error code - * - * @return void - */ - public function setSQLState( $sqlState ) - { - $this->sqlState = $sqlState; - } - - /** - * To String prints both code and SQL state. - * - * @return string - */ - public function __toString() - { - return '[' . $this->getSQLState() . '] - ' . $this->getMessage()."\n". - 'trace: ' . $this->getTraceAsString(); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository.php deleted file mode 100644 index 9346f5a9..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository.php +++ /dev/null @@ -1,598 +0,0 @@ - $value ) { - $value = ( $value instanceof SimpleModel ) ? $value->unbox() : $value; - if ( $value instanceof OODBBean ) { - $this->processEmbeddedBean( $embeddedBeans, $bean, $property, $value ); - $bean->setMeta("sys.typeof.{$property}", $value->getMeta('type')); - } elseif ( is_array( $value ) ) { - $originals = $bean->moveMeta( 'sys.shadow.' . $property, array() ); - if ( strpos( $property, 'own' ) === 0 ) { - list( $ownAdditions, $ownTrashcan, $ownresidue ) = $this->processGroups( $originals, $value, $ownAdditions, $ownTrashcan, $ownresidue ); - $listName = lcfirst( substr( $property, 3 ) ); - if ($bean->moveMeta( 'sys.exclusive-'. $listName ) ) { - OODBBean::setMetaAll( $ownTrashcan, 'sys.garbage', TRUE ); - OODBBean::setMetaAll( $ownAdditions, 'sys.buildcommand.fkdependson', $bean->getMeta( 'type' ) ); - } - unset( $bean->$property ); - } elseif ( strpos( $property, 'shared' ) === 0 ) { - list( $sharedAdditions, $sharedTrashcan, $sharedresidue ) = $this->processGroups( $originals, $value, $sharedAdditions, $sharedTrashcan, $sharedresidue ); - unset( $bean->$property ); - } - } - } - $this->storeBean( $bean ); - $this->processTrashcan( $bean, $ownTrashcan ); - $this->processAdditions( $bean, $ownAdditions ); - $this->processResidue( $ownresidue ); - $this->processSharedTrashcan( $bean, $sharedTrashcan ); - $this->processSharedAdditions( $bean, $sharedAdditions ); - $this->processSharedResidue( $bean, $sharedresidue ); - } - - /** - * Process groups. Internal function. Processes different kind of groups for - * storage function. Given a list of original beans and a list of current beans, - * this function calculates which beans remain in the list (residue), which - * have been deleted (are in the trashcan) and which beans have been added - * (additions). - * - * @param array $originals originals - * @param array $current the current beans - * @param array $additions beans that have been added - * @param array $trashcan beans that have been deleted - * @param array $residue beans that have been left untouched - * - * @return array - */ - protected function processGroups( $originals, $current, $additions, $trashcan, $residue ) - { - return array( - array_merge( $additions, array_diff( $current, $originals ) ), - array_merge( $trashcan, array_diff( $originals, $current ) ), - array_merge( $residue, array_intersect( $current, $originals ) ) - ); - } - - /** - * Processes an embedded bean. - * - * @param OODBBean|SimpleModel $embeddedBean the bean or model - * - * @return integer - */ - protected function prepareEmbeddedBean( $embeddedBean ) - { - if ( !$embeddedBean->id || $embeddedBean->getMeta( 'tainted' ) ) { - $this->store( $embeddedBean ); - } - - return $embeddedBean->id; - } - - /** - * Processes a list of beans from a bean. A bean may contain lists. This - * method handles shared addition lists; i.e. the $bean->sharedObject properties. - * - * @param OODBBean $bean the bean - * @param array $sharedAdditions list with shared additions - * - * @return void - */ - protected function processSharedAdditions( $bean, $sharedAdditions ) - { - foreach ( $sharedAdditions as $addition ) { - if ( $addition instanceof OODBBean ) { - $this->oodb->getAssociationManager()->associate( $addition, $bean ); - } else { - throw new RedException( 'Array may only contain OODBBeans' ); - } - } - } - - /** - * Processes a list of beans from a bean. A bean may contain lists. This - * method handles own lists; i.e. the $bean->ownObject properties. - * A residue is a bean in an own-list that stays where it is. This method - * checks if there have been any modification to this bean, in that case - * the bean is stored once again, otherwise the bean will be left untouched. - * - * @param OODBBean $bean bean tor process - * @param array $ownresidue list to process - * - * @return void - */ - protected function processResidue( $ownresidue ) - { - foreach ( $ownresidue as $residue ) { - if ( $residue->getMeta( 'tainted' ) ) { - $this->store( $residue ); - } - } - } - - /** - * Processes a list of beans from a bean. A bean may contain lists. This - * method handles own lists; i.e. the $bean->ownObject properties. - * A trash can bean is a bean in an own-list that has been removed - * (when checked with the shadow). This method - * checks if the bean is also in the dependency list. If it is the bean will be removed. - * If not, the connection between the bean and the owner bean will be broken by - * setting the ID to NULL. - * - * @param OODBBean $bean bean to process - * @param array $ownTrashcan list to process - * - * @return void - */ - protected function processTrashcan( $bean, $ownTrashcan ) - { - foreach ( $ownTrashcan as $trash ) { - - $myFieldLink = $bean->getMeta( 'type' ) . '_id'; - $alias = $bean->getMeta( 'sys.alias.' . $trash->getMeta( 'type' ) ); - if ( $alias ) $myFieldLink = $alias . '_id'; - - if ( $trash->getMeta( 'sys.garbage' ) === true ) { - $this->trash( $trash ); - } else { - $trash->$myFieldLink = NULL; - $this->store( $trash ); - } - } - } - - /** - * Unassociates the list items in the trashcan. - * - * @param OODBBean $bean bean to process - * @param array $sharedTrashcan list to process - * - * @return void - */ - protected function processSharedTrashcan( $bean, $sharedTrashcan ) - { - foreach ( $sharedTrashcan as $trash ) { - $this->oodb->getAssociationManager()->unassociate( $trash, $bean ); - } - } - - /** - * Stores all the beans in the residue group. - * - * @param OODBBean $bean bean to process - * @param array $sharedresidue list to process - * - * @return void - */ - protected function processSharedResidue( $bean, $sharedresidue ) - { - foreach ( $sharedresidue as $residue ) { - $this->store( $residue ); - } - } - - /** - * Determines whether the bean has 'loaded lists' or - * 'loaded embedded beans' that need to be processed - * by the store() method. - * - * @param OODBBean $bean bean to be examined - * - * @return boolean - */ - protected function hasListsOrObjects( OODBBean $bean ) - { - $processLists = FALSE; - foreach ( $bean as $value ) { - if ( is_array( $value ) || is_object( $value ) ) { - $processLists = TRUE; - break; - } - } - - return $processLists; - } - - /** - * Converts an embedded bean to an ID, removed the bean property and - * stores the bean in the embedded beans array. - * - * @param array $embeddedBeans destination array for embedded bean - * @param OODBBean $bean target bean to process - * @param string $property property that contains the embedded bean - * @param OODBBean $value embedded bean itself - * - * @return void - */ - protected function processEmbeddedBean( &$embeddedBeans, $bean, $property, OODBBean $value ) - { - $linkField = $property . '_id'; - $id = $this->prepareEmbeddedBean( $value ); - if ($bean->$linkField != $id) $bean->$linkField = $id; - $bean->setMeta( 'cast.' . $linkField, 'id' ); - $embeddedBeans[$linkField] = $value; - unset( $bean->$property ); - } - - /** - * Constructor, requires a query writer. - * Creates a new instance of the bean respository class. - * - * @param QueryWriter $writer the Query Writer to use for this repository - * - * @return void - */ - public function __construct( OODB $oodb, QueryWriter $writer ) - { - $this->writer = $writer; - $this->oodb = $oodb; - } - - /** - * Checks whether a OODBBean bean is valid. - * If the type is not valid or the ID is not valid it will - * throw an exception: Security. - * - * @param OODBBean $bean the bean that needs to be checked - * - * @return void - */ - public function check( OODBBean $bean ) - { - //Is all meta information present? - if ( !isset( $bean->id ) ) { - throw new RedException( 'Bean has incomplete Meta Information id ' ); - } - if ( !( $bean->getMeta( 'type' ) ) ) { - throw new RedException( 'Bean has incomplete Meta Information II' ); - } - //Pattern of allowed characters - $pattern = '/[^a-z0-9_]/i'; - //Does the type contain invalid characters? - if ( preg_match( $pattern, $bean->getMeta( 'type' ) ) ) { - throw new RedException( 'Bean Type is invalid' ); - } - //Are the properties and values valid? - foreach ( $bean as $prop => $value ) { - if ( - is_array( $value ) - || ( is_object( $value ) ) - ) { - throw new RedException( "Invalid Bean value: property $prop" ); - } else if ( - strlen( $prop ) < 1 - || preg_match( $pattern, $prop ) - ) { - throw new RedException( "Invalid Bean property: property $prop" ); - } - } - } - - /** - * Searches the database for a bean that matches conditions $conditions and sql $addSQL - * and returns an array containing all the beans that have been found. - * - * Conditions need to take form: - * - * - * array( - * 'PROPERTY' => array( POSSIBLE VALUES... 'John', 'Steve' ) - * 'PROPERTY' => array( POSSIBLE VALUES... ) - * ); - * - * - * All conditions are glued together using the AND-operator, while all value lists - * are glued using IN-operators thus acting as OR-conditions. - * - * Note that you can use property names; the columns will be extracted using the - * appropriate bean formatter. - * - * @param string $type type of beans you are looking for - * @param array $conditions list of conditions - * @param string $addSQL SQL to be used in query - * @param array $bindings whether you prefer to use a WHERE clause or not (TRUE = not) - * - * @return array - */ - public function find( $type, $conditions = array(), $sql = NULL, $bindings = array() ) - { - //for backward compatibility, allow mismatch arguments: - if ( is_array( $sql ) ) { - if ( isset( $sql[1] ) ) { - $bindings = $sql[1]; - } - $sql = $sql[0]; - } - try { - $beans = $this->convertToBeans( $type, $this->writer->queryRecord( $type, $conditions, $sql, $bindings ) ); - - return $beans; - } catch ( SQLException $exception ) { - $this->handleException( $exception ); - } - - return array(); - } - - /** - * Finds a BeanCollection. - * - * @param string $type type of beans you are looking for - * @param string $sql SQL to be used in query - * @param array $bindings whether you prefer to use a WHERE clause or not (TRUE = not) - * - * @return BeanCollection - */ - public function findCollection( $type, $sql, $bindings = array() ) - { - try { - $cursor = $this->writer->queryRecordWithCursor( $type, $sql, $bindings ); - return new BeanCollection( $type, $this, $cursor ); - } catch ( SQLException $exception ) { - $this->handleException( $exception ); - } - return new BeanCollection( $type, $this, new NullCursor ); - } - - /** - * Stores a bean in the database. This method takes a - * OODBBean Bean Object $bean and stores it - * in the database. If the database schema is not compatible - * with this bean and RedBean runs in fluid mode the schema - * will be altered to store the bean correctly. - * If the database schema is not compatible with this bean and - * RedBean runs in frozen mode it will throw an exception. - * This function returns the primary key ID of the inserted - * bean. - * - * The return value is an integer if possible. If it is not possible to - * represent the value as an integer a string will be returned. We use - * explicit casts instead of functions to preserve performance - * (0.13 vs 0.28 for 10000 iterations on Core i3). - * - * @param OODBBean|SimpleModel $bean bean to store - * - * @return integer|string - */ - public function store( $bean ) - { - $processLists = $this->hasListsOrObjects( $bean ); - if ( !$processLists && !$bean->getMeta( 'tainted' ) ) { - return $bean->getID(); //bail out! - } - $this->oodb->signal( 'update', $bean ); - $processLists = $this->hasListsOrObjects( $bean ); //check again, might have changed by model! - if ( $processLists ) { - $this->storeBeanWithLists( $bean ); - } else { - $this->storeBean( $bean ); - } - $this->oodb->signal( 'after_update', $bean ); - - return ( (string) $bean->id === (string) (int) $bean->id ) ? (int) $bean->id : (string) $bean->id; - } - - /** - * Returns an array of beans. Pass a type and a series of ids and - * this method will bring you the corresponding beans. - * - * important note: Because this method loads beans using the load() - * function (but faster) it will return empty beans with ID 0 for - * every bean that could not be located. The resulting beans will have the - * passed IDs as their keys. - * - * @param string $type type of beans - * @param array $ids ids to load - * - * @return array - */ - public function batch( $type, $ids ) - { - if ( !$ids ) { - return array(); - } - $collection = array(); - try { - $rows = $this->writer->queryRecord( $type, array( 'id' => $ids ) ); - } catch ( SQLException $e ) { - $this->handleException( $e ); - $rows = FALSE; - } - $this->stash[$this->nesting] = array(); - if ( !$rows ) { - return array(); - } - foreach ( $rows as $row ) { - $this->stash[$this->nesting][$row['id']] = $row; - } - foreach ( $ids as $id ) { - $collection[$id] = $this->load( $type, $id ); - } - $this->stash[$this->nesting] = NULL; - - return $collection; - } - - /** - * This is a convenience method; it converts database rows - * (arrays) into beans. Given a type and a set of rows this method - * will return an array of beans of the specified type loaded with - * the data fields provided by the result set from the database. - * - * @param string $type type of beans you would like to have - * @param array $rows rows from the database result - * - * @return array - */ - public function convertToBeans( $type, $rows ) - { - $collection = array(); - $this->stash[$this->nesting] = array(); - foreach ( $rows as $row ) { - $id = $row['id']; - $this->stash[$this->nesting][$id] = $row; - $collection[$id] = $this->load( $type, $id ); - } - $this->stash[$this->nesting] = NULL; - - return $collection; - } - - /** - * Counts the number of beans of type $type. - * This method accepts a second argument to modify the count-query. - * A third argument can be used to provide bindings for the SQL snippet. - * - * @param string $type type of bean we are looking for - * @param string $addSQL additional SQL snippet - * @param array $bindings parameters to bind to SQL - * - * @return integer - */ - public function count( $type, $addSQL = '', $bindings = array() ) - { - $type = AQueryWriter::camelsSnake( $type ); - if ( count( explode( '_', $type ) ) > 2 ) { - throw new RedException( 'Invalid type for count.' ); - } - - try { - return (int) $this->writer->queryRecordCount( $type, array(), $addSQL, $bindings ); - } catch ( SQLException $exception ) { - if ( !$this->writer->sqlStateIn( $exception->getSQLState(), array( - QueryWriter::C_SQLSTATE_NO_SUCH_TABLE, - QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN ) ) ) { - throw $exception; - } - } - - return 0; - } - - /** - * Removes a bean from the database. - * This function will remove the specified OODBBean - * Bean Object from the database. - * - * @param OODBBean|SimpleModel $bean bean you want to remove from database - * - * @return void - */ - public function trash( $bean ) - { - $this->oodb->signal( 'delete', $bean ); - foreach ( $bean as $property => $value ) { - if ( $value instanceof OODBBean ) { - unset( $bean->$property ); - } - if ( is_array( $value ) ) { - if ( strpos( $property, 'own' ) === 0 ) { - unset( $bean->$property ); - } elseif ( strpos( $property, 'shared' ) === 0 ) { - unset( $bean->$property ); - } - } - } - try { - $this->writer->deleteRecord( $bean->getMeta( 'type' ), array( 'id' => array( $bean->id ) ), NULL ); - } catch ( SQLException $exception ) { - $this->handleException( $exception ); - } - $bean->id = 0; - $this->oodb->signal( 'after_delete', $bean ); - } - - /** - * Checks whether the specified table already exists in the database. - * Not part of the Object Database interface! - * - * @deprecated Use AQueryWriter::typeExists() instead. - * - * @param string $table table name - * - * @return boolean - */ - public function tableExists( $table ) - { - return $this->writer->tableExists( $table ); - } - - /** - * Trash all beans of a given type. Wipes an entire type of bean. - * - * @param string $type type of bean you wish to delete all instances of - * - * @return boolean - */ - public function wipe( $type ) - { - try { - $this->writer->wipe( $type ); - - return TRUE; - } catch ( SQLException $exception ) { - if ( !$this->writer->sqlStateIn( $exception->getSQLState(), array( QueryWriter::C_SQLSTATE_NO_SUCH_TABLE ) ) ) { - throw $exception; - } - - return FALSE; - } - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php deleted file mode 100644 index fb4dcee4..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Fluid.php +++ /dev/null @@ -1,314 +0,0 @@ -writer->scanType( 'STRING' ); - } elseif ( $cast == 'id' ) { - $typeno = $this->writer->getTypeForID(); - } elseif ( isset( $this->writer->sqltype_typeno[$cast] ) ) { - $typeno = $this->writer->sqltype_typeno[$cast]; - } else { - throw new RedException( 'Invalid Cast' ); - } - - return $typeno; - } - - /** - * Orders the Query Writer to create a table if it does not exist already and - * adds a note in the build report about the creation. - * - * @param OODBBean $bean bean to update report of - * @param string $table table to check and create if not exists - * - * @return void - */ - private function createTableIfNotExists( OODBBean $bean, $table ) - { - //Does table exist? If not, create - if ( !$this->tableExists( $this->writer->esc( $table, TRUE ) ) ) { - $this->writer->createTable( $table ); - $bean->setMeta( 'buildreport.flags.created', TRUE ); - } - } - - /** - * Modifies the table to fit the bean data. - * Given a property and a value and the bean, this method will - * adjust the table structure to fit the requirements of the property and value. - * This may include adding a new column or widening an existing column to hold a larger - * or different kind of value. This method employs the writer to adjust the table - * structure in the database. Schema updates are recorded in meta properties of the bean. - * - * This method will also apply indexes, unique constraints and foreign keys. - * - * @param OODBBean $bean bean to get cast data from and store meta in - * @param string $property property to store - * @param mixed $value value to store - * - * @return void - */ - private function modifySchema( OODBBean $bean, $property, $value ) - { - $doFKStuff = FALSE; - $table = $bean->getMeta( 'type' ); - $columns = $this->writer->getColumns( $table ); - $columnNoQ = $this->writer->esc( $property, TRUE ); - if ( !$this->oodb->isChilled( $bean->getMeta( 'type' ) ) ) { - if ( $bean->getMeta( "cast.$property", -1 ) !== -1 ) { //check for explicitly specified types - $cast = $bean->getMeta( "cast.$property" ); - $typeno = $this->getTypeFromCast( $cast ); - } else { - $cast = FALSE; - $typeno = $this->writer->scanType( $value, TRUE ); - } - if ( isset( $columns[$this->writer->esc( $property, TRUE )] ) ) { //Is this property represented in the table ? - if ( !$cast ) { //rescan without taking into account special types >80 - $typeno = $this->writer->scanType( $value, FALSE ); - } - $sqlt = $this->writer->code( $columns[$this->writer->esc( $property, TRUE )] ); - if ( $typeno > $sqlt ) { //no, we have to widen the database column type - $this->writer->widenColumn( $table, $property, $typeno ); - $bean->setMeta( 'buildreport.flags.widen', TRUE ); - $doFKStuff = TRUE; - } - } else { - $this->writer->addColumn( $table, $property, $typeno ); - $bean->setMeta( 'buildreport.flags.addcolumn', TRUE ); - $doFKStuff = TRUE; - } - if ($doFKStuff) { - if (strrpos($columnNoQ, '_id')===(strlen($columnNoQ)-3)) { - $destinationColumnNoQ = substr($columnNoQ, 0, strlen($columnNoQ)-3); - $indexName = "index_foreignkey_{$table}_{$destinationColumnNoQ}"; - $this->writer->addIndex($table, $indexName, $columnNoQ); - $typeof = $bean->getMeta("sys.typeof.{$destinationColumnNoQ}", $destinationColumnNoQ); - $isLink = $bean->getMeta( 'sys.buildcommand.unique', FALSE ); - //Make FK CASCADING if part of exclusive list (dependson=typeof) or if link bean - $isDep = ( $bean->moveMeta( 'sys.buildcommand.fkdependson' ) === $typeof || is_array( $isLink ) ); - $result = $this->writer->addFK( $table, $typeof, $columnNoQ, 'id', $isDep ); - //If this is a link bean and all unique columns have been added already, then apply unique constraint - if ( is_array( $isLink ) && !count( array_diff( $isLink, array_keys( $this->writer->getColumns( $table ) ) ) ) ) { - $this->writer->addUniqueConstraint( $table, $bean->moveMeta('sys.buildcommand.unique') ); - $bean->setMeta("sys.typeof.{$destinationColumnNoQ}", NULL); - } - } - } - } - } - - /** - * Part of the store() functionality. - * Handles all new additions after the bean has been saved. - * Stores addition bean in own-list, extracts the id and - * adds a foreign key. Also adds a constraint in case the type is - * in the dependent list. - * - * Note that this method raises a custom exception if the bean - * is not an instance of OODBBean. Therefore it does not use - * a type hint. This allows the user to take action in case - * invalid objects are passed in the list. - * - * @param OODBBean $bean bean to process - * @param array $ownAdditions list of addition beans in own-list - * - * @return void - */ - protected function processAdditions( $bean, $ownAdditions ) - { - $beanType = $bean->getMeta( 'type' ); - - foreach ( $ownAdditions as $addition ) { - if ( $addition instanceof OODBBean ) { - - $myFieldLink = $beanType . '_id'; - $alias = $bean->getMeta( 'sys.alias.' . $addition->getMeta( 'type' ) ); - if ( $alias ) $myFieldLink = $alias . '_id'; - - $addition->$myFieldLink = $bean->id; - $addition->setMeta( 'cast.' . $myFieldLink, 'id' ); - - if ($alias) { - $addition->setMeta( "sys.typeof.{$alias}", $beanType ); - } else { - $addition->setMeta( "sys.typeof.{$beanType}", $beanType ); - } - - $this->store( $addition ); - } else { - throw new RedException( 'Array may only contain OODBBeans' ); - } - } - } - - /** - * Stores a cleaned bean; i.e. only scalar values. This is the core of the store() - * method. When all lists and embedded beans (parent objects) have been processed and - * removed from the original bean the bean is passed to this method to be stored - * in the database. - * - * @param OODBBean $bean the clean bean - * - * @return void - */ - protected function storeBean( OODBBean $bean ) - { - if ( $bean->getMeta( 'changed' ) ) { - $this->check( $bean ); - $table = $bean->getMeta( 'type' ); - $this->createTableIfNotExists( $bean, $table ); - - $updateValues = array(); - foreach ( $bean as $property => $value ) { - if ( $property !== 'id' ) { - $this->modifySchema( $bean, $property, $value ); - } - if ( $property !== 'id' ) { - $updateValues[] = array( 'property' => $property, 'value' => $value ); - } - } - - $bean->id = $this->writer->updateRecord( $table, $updateValues, $bean->id ); - $bean->setMeta( 'changed', FALSE ); - } - $bean->setMeta( 'tainted', FALSE ); - } - - /** - * Handles exceptions. Suppresses exceptions caused by missing structures. - * - * @param Exception $exception exception - * - * @return void - */ - protected function handleException( \Exception $exception ) - { - if ( !$this->writer->sqlStateIn( $exception->getSQLState(), - array( - QueryWriter::C_SQLSTATE_NO_SUCH_TABLE, - QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN ) ) - ) { - throw $exception; - } - } - - /** - * Dispenses a new bean (a OODBBean Bean Object) - * of the specified type. Always - * use this function to get an empty bean object. Never - * instantiate a OODBBean yourself because it needs - * to be configured before you can use it with RedBean. This - * function applies the appropriate initialization / - * configuration for you. - * - * @param string $type type of bean you want to dispense - * @param string $number number of beans you would like to get - * @param boolean $alwaysReturnArray if TRUE always returns the result as an array - * - * @return OODBBean - */ - public function dispense( $type, $number = 1, $alwaysReturnArray = FALSE ) - { - $OODBBEAN = defined( 'REDBEAN_OODBBEAN_CLASS' ) ? REDBEAN_OODBBEAN_CLASS : '\RedBeanPHP\OODBBean'; - $beans = array(); - for ( $i = 0; $i < $number; $i++ ) { - $bean = new $OODBBEAN; - $bean->initializeForDispense( $type, $this->oodb->getBeanHelper() ); - $this->check( $bean ); - $this->oodb->signal( 'dispense', $bean ); - $beans[] = $bean; - } - - return ( count( $beans ) === 1 && !$alwaysReturnArray ) ? array_pop( $beans ) : $beans; - } - - /** - * Loads a bean from the object database. - * It searches for a OODBBean Bean Object in the - * database. It does not matter how this bean has been stored. - * RedBean uses the primary key ID $id and the string $type - * to find the bean. The $type specifies what kind of bean you - * are looking for; this is the same type as used with the - * dispense() function. If RedBean finds the bean it will return - * the OODB Bean object; if it cannot find the bean - * RedBean will return a new bean of type $type and with - * primary key ID 0. In the latter case it acts basically the - * same as dispense(). - * - * Important note: - * If the bean cannot be found in the database a new bean of - * the specified type will be generated and returned. - * - * @param string $type type of bean you want to load - * @param integer $id ID of the bean you want to load - * - * @return OODBBean - */ - public function load( $type, $id ) - { - $bean = $this->dispense( $type ); - if ( isset( $this->stash[$this->nesting][$id] ) ) { - $row = $this->stash[$this->nesting][$id]; - } else { - try { - $rows = $this->writer->queryRecord( $type, array( 'id' => array( $id ) ) ); - } catch ( SQLException $exception ) { - if ( $this->writer->sqlStateIn( $exception->getSQLState(), - array( - QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN, - QueryWriter::C_SQLSTATE_NO_SUCH_TABLE ) - ) - ) { - $rows = 0; - } - } - if ( empty( $rows ) ) { - return $bean; - } - $row = array_pop( $rows ); - } - $bean->importRow( $row ); - $this->nesting++; - $this->oodb->signal( 'open', $bean ); - $this->nesting--; - - return $bean->setMeta( 'tainted', FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php deleted file mode 100644 index 7e7a53ef..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/Repository/Frozen.php +++ /dev/null @@ -1,197 +0,0 @@ -getMeta( 'changed' ) ) { - - list( $properties, $table ) = $bean->getPropertiesAndType(); - $id = $properties['id']; - unset($properties['id']); - $updateValues = array(); - $k1 = 'property'; - $k2 = 'value'; - foreach( $properties as $key => $value ) { - $updateValues[] = array( $k1 => $key, $k2 => $value ); - } - $bean->id = $this->writer->updateRecord( $table, $updateValues, $id ); - $bean->setMeta( 'changed', FALSE ); - } - $bean->setMeta( 'tainted', FALSE ); - } - - /** - * Part of the store() functionality. - * Handles all new additions after the bean has been saved. - * Stores addition bean in own-list, extracts the id and - * adds a foreign key. Also adds a constraint in case the type is - * in the dependent list. - * - * Note that this method raises a custom exception if the bean - * is not an instance of OODBBean. Therefore it does not use - * a type hint. This allows the user to take action in case - * invalid objects are passed in the list. - * - * @param OODBBean $bean bean to process - * @param array $ownAdditions list of addition beans in own-list - * - * @return void - * @throws RedException - */ - protected function processAdditions( $bean, $ownAdditions ) - { - $beanType = $bean->getMeta( 'type' ); - - $cachedIndex = array(); - foreach ( $ownAdditions as $addition ) { - if ( $addition instanceof OODBBean ) { - - $myFieldLink = $beanType . '_id'; - $alias = $bean->getMeta( 'sys.alias.' . $addition->getMeta( 'type' ) ); - if ( $alias ) $myFieldLink = $alias . '_id'; - - $addition->$myFieldLink = $bean->id; - $addition->setMeta( 'cast.' . $myFieldLink, 'id' ); - $this->store( $addition ); - - } else { - throw new RedException( 'Array may only contain OODBBeans' ); - } - } - } - - /** - * Dispenses a new bean (a OODBBean Bean Object) - * of the specified type. Always - * use this function to get an empty bean object. Never - * instantiate a OODBBean yourself because it needs - * to be configured before you can use it with RedBean. This - * function applies the appropriate initialization / - * configuration for you. - * - * @param string $type type of bean you want to dispense - * @param int $number number of beans you would like to get - * @param boolean $alwaysReturnArray if TRUE always returns the result as an array - * - * @return OODBBean - */ - public function dispense( $type, $number = 1, $alwaysReturnArray = FALSE ) - { - $OODBBEAN = defined( 'REDBEAN_OODBBEAN_CLASS' ) ? REDBEAN_OODBBEAN_CLASS : '\RedBeanPHP\OODBBean'; - $beans = array(); - for ( $i = 0; $i < $number; $i++ ) { - /** @var \RedBeanPHP\OODBBean $bean */ - $bean = new $OODBBEAN; - $bean->initializeForDispense( $type, $this->oodb->getBeanHelper() ); - $this->oodb->signal( 'dispense', $bean ); - $beans[] = $bean; - } - - return ( count( $beans ) === 1 && !$alwaysReturnArray ) ? array_pop( $beans ) : $beans; - } - - /** - * Loads a bean from the object database. - * It searches for a OODBBean Bean Object in the - * database. It does not matter how this bean has been stored. - * RedBean uses the primary key ID $id and the string $type - * to find the bean. The $type specifies what kind of bean you - * are looking for; this is the same type as used with the - * dispense() function. If RedBean finds the bean it will return - * the OODB Bean object; if it cannot find the bean - * RedBean will return a new bean of type $type and with - * primary key ID 0. In the latter case it acts basically the - * same as dispense(). - * - * Important note: - * If the bean cannot be found in the database a new bean of - * the specified type will be generated and returned. - * - * @param string $type type of bean you want to load - * @param integer $id ID of the bean you want to load - * - * @return OODBBean - * @throws SQLException - */ - public function load( $type, $id ) - { - $bean = $this->dispense( $type ); - if ( isset( $this->stash[$this->nesting][$id] ) ) { - $row = $this->stash[$this->nesting][$id]; - } else { - try { - $rows = $this->writer->queryRecord( $type, array( 'id' => array( $id ) ) ); - } catch ( SQLException $exception ) { - if ( $this->writer->sqlStateIn( $exception->getSQLState(), - array( - QueryWriter::C_SQLSTATE_NO_SUCH_COLUMN, - QueryWriter::C_SQLSTATE_NO_SUCH_TABLE ) - ) - ) { - throw $exception; //only throw if frozen - } - } - if ( empty( $rows ) ) { - return $bean; - } - $row = array_pop( $rows ); - } - $bean->importRow( $row ); - $this->nesting++; - $this->oodb->signal( 'open', $bean ); - $this->nesting--; - - return $bean->setMeta( 'tainted', FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php deleted file mode 100755 index b7940f44..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModel.php +++ /dev/null @@ -1,113 +0,0 @@ -bean = $bean; - } - - /** - * Magic Getter to make the bean properties available from - * the $this-scope. - * - * @note this method returns a value, not a reference! - * To obtain a reference unbox the bean first! - * - * @param string $prop property to get - * - * @return mixed - */ - public function __get( $prop ) - { - return $this->bean->$prop; - } - - /** - * Magic Setter. - * Sets the value directly as a bean property. - * - * @param string $prop property to set value of - * @param mixed $value value to set - * - * @return void - */ - public function __set( $prop, $value ) - { - $this->bean->$prop = $value; - } - - /** - * Isset implementation. - * Implements the isset function for array-like access. - * - * @param string $key key to check - * - * @return boolean - */ - public function __isset( $key ) - { - return isset( $this->bean->$key ); - } - - /** - * Box the bean using the current model. - * This method wraps the current bean in this model. - * This method can be reached using FUSE through a simple - * OODBBean. The method returns a RedBeanPHP Simple Model. - * This is useful if you would like to rely on PHP type hinting. - * You can box your beans before passing them to functions or methods - * with typed parameters. - * - * @return SimpleModel - */ - public function box() - { - return $this; - } - - /** - * Unbox the bean from the model. - * This method returns the bean inside the model. - * - * @return OODBBean - */ - public function unbox() - { - return $this->bean; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModelHelper.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModelHelper.php deleted file mode 100755 index 7561b9a7..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/SimpleModelHelper.php +++ /dev/null @@ -1,51 +0,0 @@ -$eventName(); - } - - /** - * Attaches the FUSE event listeners. Now the Model Helper will listen for - * CRUD events. If a CRUD event occurs it will send a signal to the model - * that belongs to the CRUD bean and this model will take over control from - * there. - * - * @param Observable $observable object to observe - * - * @return void - */ - public function attachEventListeners( Observable $observable ) - { - foreach ( array( 'update', 'open', 'delete', 'after_delete', 'after_update', 'dispense' ) as $e ) { - $observable->addEventListener( $e, $this ); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/TagManager.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/TagManager.php deleted file mode 100644 index ea6e8d63..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/TagManager.php +++ /dev/null @@ -1,265 +0,0 @@ -redbean->find( 'tag', array( 'title' => array( $title ) ) ); - - if ( $beans ) { - $bean = reset( $beans ); - - return $bean; - } - - return NULL; - } - - /** - * Constructor. - * The tag manager offers an easy way to quickly implement basic tagging - * functionality. - * - * @param ToolBox $toolbox toolbox object - */ - public function __construct( ToolBox $toolbox ) - { - $this->toolbox = $toolbox; - $this->redbean = $toolbox->getRedBean(); - - $this->associationManager = $this->redbean->getAssociationManager(); - } - - /** - * Tests whether a bean has been associated with one ore more - * of the listed tags. If the third parameter is TRUE this method - * will return TRUE only if all tags that have been specified are indeed - * associated with the given bean, otherwise FALSE. - * If the third parameter is FALSE this - * method will return TRUE if one of the tags matches, FALSE if none - * match. - * - * Tag list can be either an array with tag names or a comma separated list - * of tag names. - * - * @param OODBBean $bean bean to check for tags - * @param array|string $tags list of tags - * @param boolean $all whether they must all match or just some - * - * @return boolean - */ - public function hasTag( $bean, $tags, $all = FALSE ) - { - $foundtags = $this->tag( $bean ); - - $tags = $this->extractTagsIfNeeded( $tags ); - $same = array_intersect( $tags, $foundtags ); - - if ( $all ) { - return ( implode( ',', $same ) === implode( ',', $tags ) ); - } - - return (bool) ( count( $same ) > 0 ); - } - - /** - * Removes all sepcified tags from the bean. The tags specified in - * the second parameter will no longer be associated with the bean. - * - * Tag list can be either an array with tag names or a comma separated list - * of tag names. - * - * @param OODBBean $bean tagged bean - * @param array|string $tagList list of tags (names) - * - * @return void - */ - public function untag( $bean, $tagList ) - { - $tags = $this->extractTagsIfNeeded( $tagList ); - - foreach ( $tags as $tag ) { - if ( $t = $this->findTagByTitle( $tag ) ) { - $this->associationManager->unassociate( $bean, $t ); - } - } - } - - /** - * Tags a bean or returns tags associated with a bean. - * If $tagList is NULL or omitted this method will return a - * comma separated list of tags associated with the bean provided. - * If $tagList is a comma separated list (string) of tags all tags will - * be associated with the bean. - * You may also pass an array instead of a string. - * - * Tag list can be either an array with tag names or a comma separated list - * of tag names. - * - * @param OODBBean $bean bean to be tagged - * @param array|string $tagList a list of tags - * - * @return array - */ - public function tag( OODBBean $bean, $tagList = NULL ) - { - if ( is_null( $tagList ) ) { - - $tags = $bean->sharedTag; - $foundTags = array(); - - foreach ( $tags as $tag ) { - $foundTags[] = $tag->title; - } - - return $foundTags; - } - - $this->associationManager->clearRelations( $bean, 'tag' ); - $this->addTags( $bean, $tagList ); - - return $tagList; - } - - /** - * Adds tags to a bean. - * If $tagList is a comma separated list of tags all tags will - * be associated with the bean. - * You may also pass an array instead of a string. - * - * Tag list can be either an array with tag names or a comma separated list - * of tag names. - * - * @param OODBBean $bean bean to add tags to - * @param array|string $tagList list of tags to add to bean - * - * @return void - */ - public function addTags( OODBBean $bean, $tagList ) - { - $tags = $this->extractTagsIfNeeded( $tagList ); - - if ( $tagList === FALSE ) { - return; - } - - foreach ( $tags as $tag ) { - if ( !$t = $this->findTagByTitle( $tag ) ) { - $t = $this->redbean->dispense( 'tag' ); - $t->title = $tag; - - $this->redbean->store( $t ); - } - - $this->associationManager->associate( $bean, $t ); - } - } - - /** - * Returns all beans that have been tagged with one or more - * of the specified tags. - * - * Tag list can be either an array with tag names or a comma separated list - * of tag names. - * - * @param string $beanType type of bean you are looking for - * @param array|string $tagList list of tags to match - * @param string $sql additional SQL (use only for pagination) - * @param array $bindings bindings - * - * @return array - */ - public function tagged( $beanType, $tagList, $sql = '', $bindings = array() ) - { - $tags = $this->extractTagsIfNeeded( $tagList ); - $records = $this->toolbox->getWriter()->queryTagged( $beanType, $tags, FALSE, $sql, $bindings ); - - return $this->redbean->convertToBeans( $beanType, $records ); - } - - /** - * Returns all beans that have been tagged with ALL of the tags given. - * - * Tag list can be either an array with tag names or a comma separated list - * of tag names. - * - * @param string $beanType type of bean you are looking for - * @param array|string $tagList list of tags to match - * - * @return array - */ - public function taggedAll( $beanType, $tagList, $sql = '', $bindings = array() ) - { - $tags = $this->extractTagsIfNeeded( $tagList ); - $records = $this->toolbox->getWriter()->queryTagged( $beanType, $tags, TRUE, $sql, $bindings ); - - return $this->redbean->convertToBeans( $beanType, $records ); - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php deleted file mode 100755 index 9947b792..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/ToolBox.php +++ /dev/null @@ -1,103 +0,0 @@ -oodb = $oodb; - $this->adapter = $adapter; - $this->writer = $writer; - - return $this; - } - - /** - * Returns the query writer in this toolbox. - * The Query Writer is responsible for building the queries for a - * specific database and executing them through the adapter. - * - * @return QueryWriter - */ - public function getWriter() - { - return $this->writer; - } - - /** - * Returns the OODB instance in this toolbox. - * OODB is responsible for creating, storing, retrieving and deleting - * single beans. Other components rely - * on OODB for their basic functionality. - * - * @return OODB - */ - public function getRedBean() - { - return $this->oodb; - } - - /** - * Returns the database adapter in this toolbox. - * The adapter is responsible for executing the query and binding the values. - * The adapter also takes care of transaction handling. - * - * @return DBAdapter - */ - public function getDatabaseAdapter() - { - return $this->adapter; - } -} diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/license.txt b/server/vendor/gabordemooij/redbean/RedBeanPHP/license.txt deleted file mode 100755 index ca0ae35c..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/license.txt +++ /dev/null @@ -1,316 +0,0 @@ - -RedBeanPHP -Written by Gabor de Mooij - -RedBean is DUAL Licensed New BSD and GPLv2. You may choose the license that fits -best for your project. - -New BSD License - -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. -* Neither the name of RedBeanPHP nor the -names of its contributors may be used to endorse or promote products -derived from this software without specific prior written permission. - - -THIS SOFTWARE IS PROVIDED BY GABOR DE MOOIJ ''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 GABOR DE MOOIJ 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. - -RedBeanPHP is Written by Gabor de Mooij (G.J.G.T de Mooij) Copyright (c) 2015. - - -GPLv2 LICENSE - - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. diff --git a/server/vendor/gabordemooij/redbean/RedBeanPHP/loader.php b/server/vendor/gabordemooij/redbean/RedBeanPHP/loader.php deleted file mode 100644 index ed4e93e4..00000000 --- a/server/vendor/gabordemooij/redbean/RedBeanPHP/loader.php +++ /dev/null @@ -1,79 +0,0 @@ -=5.3.4" - }, - "autoload": { - "psr-4": { - "RedBeanPHP\\" : "RedBeanPHP" - } - } -} diff --git a/server/vendor/gabordemooij/redbean/deepfreeze.php b/server/vendor/gabordemooij/redbean/deepfreeze.php deleted file mode 100644 index 36b2ad4c..00000000 --- a/server/vendor/gabordemooij/redbean/deepfreeze.php +++ /dev/null @@ -1,49 +0,0 @@ - 0) { - echo 'Applied patch for PHP < 5.3.3'; - echo PHP_EOL; - exit; -} else { - echo 'Somthing went wrong.'; - echo PHP_EOL; - exit; -} diff --git a/server/vendor/gabordemooij/redbean/replica2-win.php b/server/vendor/gabordemooij/redbean/replica2-win.php deleted file mode 100644 index 01f1928c..00000000 --- a/server/vendor/gabordemooij/redbean/replica2-win.php +++ /dev/null @@ -1,34 +0,0 @@ -buildFromDirectory('./build'); -echo "Done.\n"; - -echo "Adding stub... "; -$phar->setStub($phar->createDefaultStub("loader.php")); -echo "Done.\n"; - -echo "Your PHAR file has been generated.\n"; diff --git a/server/vendor/gabordemooij/redbean/replica2.php b/server/vendor/gabordemooij/redbean/replica2.php deleted file mode 100644 index af2f0672..00000000 --- a/server/vendor/gabordemooij/redbean/replica2.php +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env php -1) $mode = $_SERVER['argv'][1]; - - echo "Welcome to Replica 2 Build Script for RedBeanPHP\n"; - echo "Now building your beans!\n"; - echo "-------------------------------------------\n"; - - if ($mode !== 'onlyphp') { - echo "Cleaning up... "; - @exec('rm rb.phar; rm -Rf build'); - echo "Done.\n"; - echo "Trying to create a directory called build to build the PHAR... "; - @mkdir('build'); - echo "Done.\n"; - echo "Trying to copy RedBeanPHP to build/RedBeanPHP... "; - @exec('cp -R RedBeanPHP build/RedBeanPHP'); - echo "Done.\n"; - echo "Moving loader to build folder... "; - @exec('mv build/RedBeanPHP/loader.php build/'); - echo "Done.\n"; - echo "Creating PHAR archive... "; - $phar = new Phar("rb.phar", 0, "rb.phar"); - $phar->buildFromDirectory('./build', '/^((?!loader\.php).)*$/'); - echo "Done.\n"; - echo "Adding stub... "; - $stub = "<"."?php Phar::mapPhar();\n"; - $stub .= str_replace('<'.'?php','',file_get_contents('build/loader.php')); - $stub .= "__HALT_COMPILER();\n"; - $phar->setStub($stub); - echo "Done.\n"; - echo "Your PHAR file has been generated.\n"; - } - -if ($mode !== 'onlyphar') { - - $code = ''; - - function addFile($file) { - global $code; - echo 'Added ', $file , ' to package... ',PHP_EOL; - $raw = file_get_contents($file); - $raw = preg_replace('/namespace\s+([a-zA-Z0-9\\\;]+);/m', 'namespace $1 {', $raw); - $raw .= '}'; - $code .= $raw; - } - - define('DIR', 'RedBeanPHP/'); - - addFile( DIR . 'Logger.php' ); - addFile( DIR . 'Logger/RDefault.php' ); - addFile( DIR . 'Logger/RDefault/Debug.php' ); - addFile( DIR . 'Driver.php' ); - addFile( DIR . 'Driver/RPDO.php' ); - addFile( DIR . 'OODBBean.php' ); - addFile( DIR . 'Observable.php' ); - addFile( DIR . 'Observer.php' ); - addFile( DIR . 'Adapter.php' ); - addFile( DIR . 'Adapter/DBAdapter.php' ); - addFile( DIR . 'Cursor.php'); - addFile( DIR . 'Cursor/PDOCursor.php'); - addFile( DIR . 'Cursor/NullCursor.php'); - addFile( DIR . 'BeanCollection.php' ); - addFile( DIR . 'QueryWriter.php' ); - addFile( DIR . 'QueryWriter/AQueryWriter.php' ); - addFile( DIR . 'QueryWriter/MySQL.php' ); - addFile( DIR . 'QueryWriter/SQLiteT.php' ); - addFile( DIR . 'QueryWriter/PostgreSQL.php' ); - addFile( DIR . 'RedException.php' ); - addFile( DIR . 'RedException/SQL.php' ); - addFile( DIR . 'Repository.php' ); - addFile( DIR . 'Repository/Fluid.php' ); - addFile( DIR . 'Repository/Frozen.php' ); - addFile( DIR . 'OODB.php' ); - addFile( DIR . 'ToolBox.php' ); - addFile( DIR . 'Finder.php' ); - addFile( DIR . 'AssociationManager.php' ); - addFile( DIR . 'BeanHelper.php' ); - addFile( DIR . 'BeanHelper/SimpleFacadeBeanHelper.php' ); - addFile( DIR . 'SimpleModel.php' ); - addFile( DIR . 'SimpleModelHelper.php' ); - addFile( DIR . 'TagManager.php' ); - addFile( DIR . 'LabelMaker.php' ); - addFile( DIR . 'Facade.php' ); - addFile( DIR . 'DuplicationManager.php' ); - addFile( DIR . 'Util/ArrayTool.php' ); - addFile( DIR . 'Util/DispenseHelper.php' ); - addFile( DIR . 'Util/Dump.php' ); - addFile( DIR . 'Util/MultiLoader.php' ); - addFile( DIR . 'Util/Transaction.php' ); - addFile( DIR . 'Plugin.php' ); - - $func = file_get_contents(DIR . 'Functions.php'); - - $code .= " - namespace { - - //make some classes available for backward compatibility - class RedBean_SimpleModel extends \RedBeanPHP\SimpleModel {}; - - if (!class_exists('R')) { - class R extends \RedBeanPHP\Facade{}; - } - - $func - - } - "; - - $code = ' 0) { - echo 'Done!' ,PHP_EOL; - } else { - echo 'Hm, something seems to have gone wrong... ',PHP_EOL; - } - -} - - diff --git a/server/vendor/gabordemooij/redbean/test-dist.ini b/server/vendor/gabordemooij/redbean/test-dist.ini deleted file mode 100755 index 8de9b9bb..00000000 --- a/server/vendor/gabordemooij/redbean/test-dist.ini +++ /dev/null @@ -1,17 +0,0 @@ -; Test suite database config -; Rename this file to test.ini if you are done - -[mysql] -host = "localhost" -schema = "oodb" -user = "root" -pass = "password" - -[pgsql] -host = "localhost" -schema = "oodb" -user = "postgres" -pass = "password" - -[sqlite] -file = "/tmp/database.db" diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT.php deleted file mode 100644 index d2ceadb4..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT.php +++ /dev/null @@ -1,124 +0,0 @@ -getMethods( \ReflectionMethod::IS_PUBLIC ) as $method ) { - // Skip methods inherited from parent class - if ( $method->class != $class->getName() ) continue; - - if ( in_array( $method->name, $skip ) ) continue; - - $classname = str_replace( $class->getParentClass()->getName().'_', '', $method->class ); - - printtext( "\n\t" . $classname."->".$method->name." [".$method->class."->".$method->name."]" . " \n\t" ); - - $call = $method->name; - - $this->$call(); - - try { - R::nuke(); - } catch( \PDOException $e ) { - // Some tests use a broken database on purpose, so an exception is ok - } - } - } - - /** - * Do some cleanup (if necessary..) - */ - public function cleanUp() - { - } - - /** - * Sets the current driver. - */ - public function setCurrentDriver( $driver ) - { - $this->currentlyActiveDriverID = $driver; - } - - /** - * Sets the round number. - * - * @param integer $roundNumber round - */ - public function setRound( $roundNumber ) - { - $this->round = (int) $roundNumber; - } - - /** - * Returns the current round number - * - * @return integer - */ - public function getRound() - { - return $this->round; - } - - /** - * Returns TRUE if the current round is the first round. - * - * @return boolean - */ - public function isFirstRound() - { - return ( $this->round === 0 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base.php deleted file mode 100644 index 1efcea5a..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base.php +++ /dev/null @@ -1,46 +0,0 @@ -name = 'teacher'; - $student->name = 'student'; - $project->teacher = $teacher; - $project->student = $student; - R::store( $project ); - $project = $project->fresh(); - asrt( ( $project->teacher instanceof OODBBean), TRUE ); - asrt( ( $project->student instanceof OODBBean), TRUE ); - asrt( $project->teacher->name, 'teacher' ); - asrt( $project->student->name, 'student' ); - $project2 = R::dispense( 'project' ); - $teacher2 = R::dispense( 'person' ); - $teacher2->name = 'teacher2'; - $project2->teacher = $teacher2; - R::store( $project2 ); - $project2 = $project2->fresh(); - asrt( ( $project2->teacher instanceof OODBBean), TRUE ); - asrt( $project2->teacher->name, 'teacher2' ); - asrt( is_null( $project2->student ), TRUE ); - $project = $project->fresh(); - asrt( ( $project->fetchAs('person')->teacher instanceof OODBBean), TRUE ); - asrt( ( $project->fetchAs('person')->student instanceof OODBBean), TRUE ); - asrt( $project->fetchAs('person')->teacher->name, 'teacher' ); - asrt( $project->fetchAs('person')->student->name, 'student' ); - $project = $project->fresh(); - $export = R::exportAll( array( $project ), TRUE ); - asrt( isset( $export[0]['teacher']['name'] ), TRUE ); - asrt( isset( $export[0]['student']['name'] ), TRUE ); - asrt( $export[0]['teacher']['name'], 'teacher' ); - asrt( $export[0]['student']['name'], 'student' ); - //Also test the default implementation... - $nullWriter = new \NullWriter( R::getDatabaseAdapter() ); - asrt( is_null( $nullWriter->inferFetchType( 'test', 'test' ) ), TRUE ); - //Realteacher should take precedence over fetchAs-teacher, name conventions first! - //also: ensure we do not use autoresolv for anything except when truly necessary! (performance) - $realTeacher = R::dispense( 'teacher' ); - $realTeacher->name = 'real'; - R::store( $realTeacher ); - //ID must be same - asrt( $realTeacher->id, $teacher->id ); - $project = $project->fresh(); - asrt( $project->teacher->name, 'real' ); - } - - /** - * Test for aliasing issue for LTS version. - * - * @return void - */ - public function testIssueAliasingForLTSVersion() { - $person = R::dispense('person'); - $pro = R::dispense('project'); - $c = R::dispense('course'); - $person->name = 'x'; - $person->alias('teacher')->ownProject[] = $pro; - $person->alias('student')->ownCourse[] = $c; - R::store($person); - asrt($c->fresh()->fetchAs('person')->student->name, 'x'); - asrt($pro->fresh()->fetchAs('person')->teacher->name, 'x'); - $person = $person->fresh(); - $person->alias('teacher')->ownProject = array(); - $person->alias('student')->ownCourse = array(); - R::store($person); - asrt($c->fresh()->fetchAs('person')->student, NULL); - asrt($pro->fresh()->fetchAs('person')->teacher, NULL); - } - - /** - * Describing how clearing state of bean works. - * Every method returning somthing (except getID) - * clears prefix-method-state (anything set by withCond,with,alias,fetchAs). - * - * @return void - */ - public function clearStateAdditionalTests() - { - list( $project1, $project2 ) = R::dispense( 'project', 2 ); - list( $irene, $ilse ) = R::dispense('person', 2); - - $project1->developer = $ilse; - $project1->designer = $irene; - - $ilse->name = 'Ilse'; - $irene->name = 'Irene'; - - $project2->developer = $ilse; - - R::storeAll( array( $project1, $project2 ) ); - - $ilse = R::load( 'person', $ilse->id ); - - asrt( count( $ilse->alias( 'developer' )->ownProject ), 2); - - //cached - same list - asrt( count( $ilse->ownProject ), 2); - - asrt( count( $ilse->alias( 'designer' )->ownProject ), 0); - - //cached - same list - asrt( count( $ilse->ownProject ), 0); - - //now test state - asrt( count( $ilse->setAttr( 'a', 'b' )->alias( 'developer' )->ownProject ), 2); - - //now test state - $ilse = $ilse->fresh(); - - //attr clears state... - asrt( count( $ilse->alias( 'developer' )->setAttr( 'a', 'b' )->ownProject ), 0); - - //but getID() does not! - $ilse = $ilse->fresh(); - $ilse->alias('developer'); - $ilse->getID(); - asrt( count( $ilse->ownProject ), 2 ); - } - - /** - * Can switch fetchAs(). - * Also checks shadow by storing. - * - * @return void - */ - public function canSwitchParentBean() - { - - list( $project1, $project2 ) = R::dispense( 'project', 2 ); - list( $irene, $ilse ) = R::dispense('person', 2); - - $project1->developer = $ilse; - $project1->designer = $irene; - - $ilse->name = 'Ilse'; - $irene->name = 'Irene'; - - $project2->developer = $ilse; - - R::storeAll( array( $project1, $project2 ) ); - - $project1 = R::load( 'project', $project1->id ); - - asrt( $project1->fetchAs('person')->developer->name, 'Ilse' ); - asrt( $project1->fetchAs('person')->designer->name, 'Irene' ); - - R::store( $project1 ); - - $project1 = R::load( 'project', $project1->id ); - - asrt( $project1->fetchAs('person')->designer->name, 'Irene' ); - asrt( $project1->fetchAs('person')->developer->name, 'Ilse' ); - - R::store( $project1 ); - - asrt( $project1->fetchAs('person')->developer->name, 'Ilse' ); - asrt( $project1->fetchAs('person')->designer->name, 'Irene' ); - asrt( $project1->fetchAs('person')->developer->name, 'Ilse' ); - } - - /** - * Switching aliases (->alias) should not change other list during - * storage. - * - * @return void - */ - public function testShadow() - { - list( $project1, $project2 ) = R::dispense( 'project', 2 ); - list( $irene, $ilse ) = R::dispense('person', 2); - - $project1->developer = $ilse; - $project1->designer = $irene; - - $project2->developer = $ilse; - - R::storeAll( array( $project1, $project2 ) ); - - $ilse = R::load( 'person', $ilse->id ); - $irene = R::load( 'person', $irene->id ); - - asrt( count( $ilse->alias('developer')->ownProject ), 2 ); - asrt( count( $ilse->alias('designer')->ownProject ), 0 ); - - R::store( $ilse ); - - $ilse = R::load( 'person', $ilse->id ); - $irene = R::load( 'person', $irene->id ); - - asrt( count( $ilse->alias('designer')->ownProject ), 0 ); - asrt( count( $ilse->alias('developer')->ownProject ), 2 ); - - R::storeAll( array( $ilse, $irene) ); - - $ilse = R::load( 'person', $ilse->id ); - $irene = R::load( 'person', $irene->id ); - - asrt( count( $ilse->alias('designer')->ownProject ), 0 ); - asrt( count( $ilse->alias('developer')->ownProject ), 2 ); - asrt( count( $irene->alias('designer')->ownProject), 1 ); - asrt( count( $irene->alias('developer')->ownProject), 0 ); - - R::storeAll( array( $ilse, $irene) ); - - $ilse = R::load( 'person', $ilse->id ); - $irene = R::load( 'person', $irene->id ); - - asrt( count( $ilse->alias('designer')->ownProject ), 0 ); - asrt( count( $ilse->alias('developer')->ownProject ), 2 ); - asrt( count( $irene->alias('designer')->ownProject), 1 ); - asrt( count( $irene->alias('developer')->ownProject), 0 ); - } - - /** - * Issue 291. State not cleared. - * - * @return void - */ - public function testFetchTypeConfusionIssue291() - { - list( $teacher, $student ) = R::dispense( 'person', 2 ) ; - $teacher->name = 'jimmy' ; - $student->name = 'jacko' ; - R::store( $teacher ) ; - R::store( $student ) ; - - $client = R::dispense( 'client' ) ; - $client->firm = 'bean AG' ; - R::store( $client ) ; - - $project = R::dispense( 'project' ) ; - $project->teacher = $teacher ; - $project->student = $student ; - $project->client = $client ; - R::store( $project ) ; - - unset( $project->student ) ; - R::store( $project ) ; - - $project = R::load( 'project', 1 ) ; - $teacher = $project->fetchAs( 'person' )->teacher ; - $student = $project->fetchAs( 'person' )->student ; - $client = $project->client ; // this will select from "person" instead of "client" - - asrt( $client->firm, 'bean AG' ); - } - - /** - * Test switching alias (also issue #291). - * - * @return void - */ - public function testAliasSwitch() - { - $student = R::dispense( 'person' ); - $project = R::dispense( 'project' ); - $project->student = $student; - R::store( $project ); - $person = R::load( 'person', $student->id ); - asrt( count( $person->alias( 'student' )->ownProject ), 1); - asrt( count( $person->alias( 'teacher' )->ownProject ), 0); - } - - /** - * Associating two beans, then loading the associated bean - * - * @return void - */ - public function testAssociated() - { - $person = R::dispense( 'person' ); - $person->name = 'John'; - - R::store( $person ); - - $course = R::dispense( 'course' ); - $course->name = 'Math'; - - R::store( $course ); - - $course->teacher = $person; - - $id = R::store( $course ); - $course = R::load( 'course', $id ); - $teacher = $course->fetchAs( 'person' )->teacher; - - asrt( $teacher->name, 'John' ); - - /** - * Trying to load a property that has an invalid name - */ - - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - - $book->wrongProperty = array( $page ); - - try { - $book->wrongProperty[] = $page; - R::store( $book ); - fail(); - } catch ( RedException $e ) { - pass(); - } catch (\Exception $e ) { - fail(); - } - - } - - /** - * Test for quick detect change. - * - * @return void - */ - public function basic() - { - $book = R::dispense( 'book' ); - - asrt( isset( $book->prop ), FALSE ); //not a very good test - asrt( in_array( 'prop', array_keys( $book->export() ) ), FALSE ); //better... - - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - - $book->paper = $page; - - $id = R::store( $book ); - $book = R::load( 'book', $id ); - - asrt( FALSE, ( isset( $book->paper ) ) ); - asrt( FALSE, ( isset( $book->page ) ) ); - - /** - * The following tests try to store various things that aren't - * beans (which is expected) with the own* and shared* properties - * which only accept beans as assignments, so they're expected to fail - */ - - foreach ( - array( - "a string", 1928, TRUE, NULL, array() - ) - as $value - ) { - try { - $book->ownPage[] = $value; - - R::store( $book ); - - $book->sharedPage[] = $value; - - R::store( $book ); - - fail(); - } catch ( RedException $e ) { - pass(); - } catch (\Exception $e ) { - fail(); - } - } - } - - /** - * Finding $person beans that have been aliased into various roles - * - * @return void - */ - public function testAliasedFinder() - { - $message = R::dispense( 'message' ); - $message->subject = 'Roommate agreement'; - - list( $sender, $recipient ) = R::dispense( 'person', 2 ); - - $sender->name = 'Sheldon'; - $recipient->name = 'Leonard'; - - $message->sender = $sender; - $message->recipient = $recipient; - - $id = R::store( $message ); - $message = R::load( 'message', $id ); - - asrt( $message->fetchAs( 'person' )->sender->name, 'Sheldon' ); - asrt( $message->fetchAs( 'person' )->recipient->name, 'Leonard' ); - - $otherRecipient = R::dispense( 'person' ); - $otherRecipient->name = 'Penny'; - - $message->recipient = $otherRecipient; - - R::store( $message ); - - $message = R::load( 'message', $id ); - - asrt( $message->fetchAs( 'person' )->sender->name, 'Sheldon' ); - asrt( $message->fetchAs( 'person' )->recipient->name, 'Penny' ); - - } - - /** - * Test Basic Fetch AS functionality. - */ - public function testBasicFetchAs() - { - $project = R::dispense( 'project' ); - $project->name = 'Mutant Project'; - - list( $teacher, $student ) = R::dispense( 'person', 2 ); - - $teacher->name = 'Charles Xavier'; - - $project->student = $student; - $project->student->name = 'Wolverine'; - $project->teacher = $teacher; - - $id = R::store( $project ); - $project = R::load( 'project', $id ); - - asrt( $project->fetchAs( 'person' )->teacher->name, 'Charles Xavier' ); - asrt( $project->fetchAs( 'person' )->student->name, 'Wolverine' ); - } - - /** - * Test Basic list variations. - * - * @return void - */ - public function testBasicListVariations() - { - $farm = R::dispense( 'building' ); - $village = R::dispense( 'village' ); - - $farm->name = 'farm'; - $village->name = 'Dusty Mountains'; - - $farm->village = $village; - - $id = R::store( $farm ); - $farm = R::load( 'building', $id ); - - asrt( $farm->name, 'farm' ); - asrt( $farm->village->name, 'Dusty Mountains' ); - - $village = R::dispense( 'village' ); - - list( $mill, $tavern ) = R::dispense( 'building', 2 ); - - $mill->name = 'Mill'; - $tavern->name = 'Tavern'; - - $village->ownBuilding = array( $mill, $tavern ); - - $id = R::store( $village ); - $village = R::load( 'village', $id ); - - asrt( count( $village->ownBuilding ), 2 ); - - $village2 = R::dispense( 'village' ); - $army = R::dispense( 'army' ); - - $village->sharedArmy[] = $army; - $village2->sharedArmy[] = $army; - - $id1 = R::store( $village ); - $id2 = R::store( $village2 ); - - $village1 = R::load( 'village', $id1 ); - $village2 = R::load( 'village', $id2 ); - - asrt( count( $village1->sharedArmy ), 1 ); - asrt( count( $village2->sharedArmy ), 1 ); - - asrt( count( $village1->ownArmy ), 0 ); - asrt( count( $village2->ownArmy ), 0 ); - - } - - /** - * Tests whether aliasing plays nice with beautification. - * - * @return void - */ - public function testAliasWithBeautify() - { - /** - * Ensure that aliased column aren't beautified - */ - - $points = R::dispense( 'point', 2 ); - $line = R::dispense( 'line' ); - - $line->pointA = $points[0]; - $line->pointB = $points[1]; - - R::store( $line ); - - $line2 = R::dispense( 'line' ); - - $line2->pointA = $line->fetchAs('point')->pointA; - $line2->pointB = R::dispense( 'point' ); - - R::store( $line2 ); - - //now we have two points per line (1-to-x) - //I want to know which lines cross A: - - $a = R::load( 'point', $line->pointA->id ); //reload A - - $lines = $a->alias( 'pointA' )->ownLine; - - asrt( count( $lines ), 2 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php deleted file mode 100644 index dbdb284b..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Arrays.php +++ /dev/null @@ -1,302 +0,0 @@ -name = 'bean'; - $bean->taste = 'salty'; - $properties = array(); - foreach($bean as $key => $value) { - $properties[ $key ] = $value; - } - asrt( count( $bean ), 3 ); - asrt( count( $properties ), 3 ); - asrt( isset( $properties['id'] ), TRUE ); - asrt( isset( $properties['name'] ), TRUE ); - asrt( isset( $properties['taste'] ), TRUE ); - - $bean = R::dispense('bean'); - $bean['name'] = 'bean'; - $bean['taste'] = 'salty'; - $properties = array(); - foreach($bean as $key => $value) { - $properties[ $key ] = $value; - } - asrt( count( $bean ), 3 ); - asrt( count( $properties ), 3 ); - asrt( isset( $properties['id'] ), TRUE ); - asrt( isset( $properties['name'] ), TRUE ); - asrt( isset( $properties['taste'] ), TRUE ); - } - - /** - * Tests array access with lists. - * - * @return void - */ - public function testArrayAccessAndLists() - { - $book = R::dispense('book'); - $book['title'] = 'My Book'; - - //Can we add a bean in list with array access? - $book['ownPage'][] = R::dispense('page'); - $book['ownPage'][] = R::dispense('page'); - - asrt( count( $book ), 3 ); - - $properties = array(); - foreach($book as $key => $value) { - $properties[ $key ] = $value; - } - - asrt( count( $properties ), 3 ); - - //Dont reveal aliased x-own and -List in foreach-loop - asrt( isset( $properties['id'] ), TRUE ); - asrt( isset( $properties['title'] ), TRUE ); - asrt( isset( $properties['ownPage'] ), TRUE ); - asrt( isset( $properties['ownPageList'] ), FALSE ); - asrt( isset( $properties['xownPage'] ), FALSE ); - asrt( isset( $properties['xownPageList'] ), FALSE ); - - //But keep them countable - asrt( count( $book['ownPage'] ), 2 ); - asrt( count( $book['ownPageList'] ), 2 ); - asrt( count( $book['xownPage'] ), 2 ); - asrt( count( $book['xownPageList'] ), 2 ); - - //And reveal them with isset() - asrt( isset( $book['id'] ), TRUE ); - asrt( isset( $book['title'] ), TRUE ); - asrt( isset( $book['ownPage'] ), TRUE ); - asrt( isset( $book['ownPageList'] ), TRUE ); - asrt( isset( $book['xownPage'] ), TRUE ); - asrt( isset( $book['xownPageList'] ), TRUE ); - - //Can we add using the List alias? - $book['ownPageList'][] = R::dispense('page'); - asrt( count( $book['ownPage'] ), 3 ); - asrt( count( $book['ownPageList'] ), 3 ); - asrt( count( $book['xownPage'] ), 3 ); - asrt( count( $book['xownPageList'] ), 3 ); - - //Can we add using the x-mode alias? - $book['ownPageList'][] = R::dispense('page'); - asrt( count( $book['ownPage'] ), 4 ); - asrt( count( $book['ownPageList'] ), 4 ); - asrt( count( $book['xownPage'] ), 4 ); - asrt( count( $book['xownPageList'] ), 4 ); - - //Can we unset using array access? - unset( $book['ownPage'] ); - asrt( isset( $book['ownPage'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['xownPageList'] ), FALSE ); - $book['ownPage'] = array( R::dispense('page') ); - unset( $book['xownPage'] ); - asrt( isset( $book['ownPage'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['xownPageList'] ), FALSE ); - $book['ownPage'] = array( R::dispense('page') ); - unset( $book['ownPageList'] ); - asrt( isset( $book['ownPage'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['xownPageList'] ), FALSE ); - $book['ownPage'] = array( R::dispense('page') ); - unset( $book['xownPageList'] ); - asrt( isset( $book['ownPage'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['xownPageList'] ), FALSE ); - - //does it work with shared lists as well? - $book['sharedCategory'] = array( R::dispense('category') ); - asrt( count( $book ), 3 ); - - $properties = array(); - foreach($book as $key => $value) { - $properties[ $key ] = $value; - } - - asrt( isset( $properties['sharedCategory'] ), TRUE ); - asrt( isset( $properties['sharedCategoryList'] ), FALSE ); - - asrt( isset( $book['sharedCategory'] ), TRUE ); - asrt( isset( $book['sharedCategoryList'] ), TRUE ); - - asrt( count( $book['sharedCategory'] ), 1 ); - asrt( count( $book['sharedCategoryList'] ), 1 ); - - $book['sharedCategory'][] = R::dispense( 'category' ); - - asrt( count( $book['sharedCategory'] ), 2 ); - asrt( count( $book['sharedCategoryList'] ), 2 ); - - $book['sharedCategoryList'][] = R::dispense( 'category' ); - - asrt( count( $book['sharedCategory'] ), 3 ); - asrt( count( $book['sharedCategoryList'] ), 3 ); - } - - /** - * Tests array access with parent beans. - * - * @return void - */ - public function testArrayAccessWithBeans() - { - $book = R::dispense( 'bean' ); - $book['author'] = R::dispense( 'author' ); - asrt( isset( $book['author'] ), TRUE ); - asrt( count( $book ), 2 ); - $book['author']['name'] = 'me'; - asrt( $book['author']['name'], 'me' ); - $book['author']['address'] = R::dispense( 'address' ); - $book['author']['ownTagList'][] = R::dispense( 'tag' ); - asrt( isset( $book['author']['address'] ), TRUE ); - asrt( isset( $book['author']['ownTag'] ), TRUE ); - asrt( count( $book['author']['ownTag'] ), 1 ); - asrt( isset( $book['author']['xownTag'] ), TRUE ); - asrt( count( $book['author']['xownTag'] ), 1 ); - asrt( isset( $book['author']['ownTagList'] ), TRUE ); - asrt( count( $book['author']['ownTagList'] ), 1 ); - asrt( isset( $book['author']['xownTagList'] ), TRUE ); - asrt( count( $book['author']['xownTagList'] ), 1 ); - unset( $book['author'] ); - asrt( isset( $book['author'] ), FALSE ); - asrt( count( $book ), 1 ); - } - - /** - * Tests array access with CRUD operations. - * - * @return void - */ - public function testArrayAccessWithCRUD() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book['ownPageList'] = R::dispense( 'page', 3 ); - R::store( $book ); - - $book = $book->fresh(); - //note that isset first returns false, so you can check if a list is loaded - asrt( isset( $book['ownPage'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['xownPageList'] ), FALSE ); - //count triggers load... - asrt( count( $book['ownPage'] ), 3 ); - asrt( isset( $book['ownPage'] ), TRUE ); - asrt( isset( $book['ownPageList'] ), TRUE ); - asrt( isset( $book['xownPage'] ), TRUE ); - asrt( isset( $book['xownPageList'] ), TRUE ); - $book = $book->fresh(); - asrt( count( $book['xownPage'] ), 3 ); - $book = $book->fresh(); - asrt( count( $book['ownPageList'] ), 3 ); - $book = $book->fresh(); - asrt( count( $book['xownPageList'] ), 3 ); - - $book['ownPage'][] = R::dispense( 'page' ); - R::store( $book ); - - $book = $book->fresh(); - asrt( count( $book['ownPage'] ), 4 ); - $book = $book->fresh(); - asrt( count( $book['xownPage'] ), 4 ); - $book = $book->fresh(); - asrt( count( $book['ownPageList'] ), 4 ); - $book = $book->fresh(); - asrt( count( $book['xownPageList'] ), 4 ); - - //does dependency still work? - $book['xownPageList'] = array(); - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book['ownPage'] ), 0 ); - $book = $book->fresh(); - asrt( count( $book['xownPage'] ), 0 ); - $book = $book->fresh(); - asrt( count( $book['ownPageList'] ), 0 ); - $book = $book->fresh(); - asrt( count( $book['xownPageList'] ), 0 ); - - //does shared list work as well? - $book['sharedTag'] = R::dispense( 'tag', 2 ); - R::store( $book ); - - $book = $book->fresh(); - //note that isset first returns false, so you can check if a list is loaded - asrt( isset( $book['sharedTagList'] ), FALSE ); - asrt( isset( $book['sharedTag'] ), FALSE ); - //count triggers load... - asrt( count( $book['sharedTagList'] ), 2 ); - asrt( count( $book['sharedTag'] ), 2 ); - asrt( isset( $book['sharedTagList'] ), TRUE ); - asrt( isset( $book['sharedTag'] ), TRUE ); - - $book['sharedTag'][] = R::dispense( 'tag' ); - R::store( $book ); - - $book = $book->fresh(); - asrt( count( $book['sharedTagList'] ), 3 ); - asrt( count( $book['sharedTag'] ), 3 ); - - $book['sharedTagList'][] = R::dispense( 'tag' ); - R::store( $book ); - - $book = $book->fresh(); - asrt( count( $book['sharedTagList'] ), 4 ); - asrt( count( $book['sharedTag'] ), 4 ); - - //does it also work with cross-shared - $book['sharedBookList'][] = R::dispense( 'book' ); - R::store( $book ); - $book = $book->fresh(); - asrt( isset( $book['sharedBookList'] ), FALSE ); - asrt( count( $book['sharedBookList'] ), 1 ); - $first = reset( $book['sharedBookList'] ); - $id = $first['id']; - asrt( count( $book['sharedBookList'][$id]['sharedBookList'] ), 1 ); - - $properties = array(); - foreach($book as $key => $value) { - $properties[ $key ] = $value; - } - - asrt( count( $properties ), 2 ); - $keys = array_keys( $properties ); - sort( $keys ); - asrt( implode( ',', $keys ), 'id,sharedBook' ); - } - -} \ No newline at end of file diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php deleted file mode 100644 index 9887ca2f..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Association.php +++ /dev/null @@ -1,357 +0,0 @@ -currentlyActiveDriverID !== 'mysql' ) { - return; - } - - testpack( 'Throw exception in case of issue with assoc constraint' ); - - $bunny = R::dispense( 'bunny' ); - $carrot = R::dispense( 'carrot' ); - - $faultyWriter = new \FaultyWriter( R::getToolBox()->getDatabaseAdapter() ); - $faultyOODB = new OODB( $faultyWriter ); - $faultyOODB->setBeanHelper( R::getRedBean()->getBeanHelper() ); - $faultyToolbox = new ToolBox( $faultyOODB, R::getToolBox()->getDatabaseAdapter(), $faultyWriter ); - - $faultyAssociationManager = new AssociationManager( $faultyToolbox ); - - $faultyWriter->setSQLState( '23000' ); - - $faultyAssociationManager->associate( $bunny, $carrot ); - - pass(); - - $faultyWriter->setSQLState( '42S22' ); - - R::nuke(); - - try { - $faultyAssociationManager->associate( $bunny, $carrot ); - fail(); - } catch ( SQL $exception ) { - pass(); - } - } - - /** - * Test fast-track deletion, i.e. bypassing FUSE. - * For link beans. - * - * @return void - */ - public function testFastTrackDeletion() - { - testpack( 'Test fast-track deletion' ); - - $ghost = R::dispense( 'ghost' ); - $house = R::dispense( 'house' ); - - $house->sharedGhost[] = $ghost; - - \Model_Ghost_House::$deleted = FALSE; - - R::getRedBean()->getAssociationManager()->unassociate( $house, $ghost ); - - // No fast-track, assoc bean got trashed - asrt( \Model_Ghost_House::$deleted, TRUE ); - - \Model_Ghost_House::$deleted = FALSE; - - R::getRedBean()->getAssociationManager()->unassociate( $house, $ghost, TRUE ); - - // Fast-track, assoc bean got deleted right away - asrt( \Model_Ghost_House::$deleted, FALSE ); - } - - /** - * Test self-referential associations. - * - * @return void - */ - public function testCrossAssociation() - { - $ghost = R::dispense( 'ghost' ); - $ghost2 = R::dispense( 'ghost' ); - - R::getRedBean()->getAssociationManager()->associate( $ghost, $ghost2 ); - - \Model_Ghost_Ghost::$deleted = FALSE; - - R::getRedBean()->getAssociationManager()->unassociate( $ghost, $ghost2 ); - - // No fast-track, assoc bean got trashed - asrt( \Model_Ghost_Ghost::$deleted, TRUE ); - - \Model_Ghost_Ghost::$deleted = FALSE; - - R::getRedBean()->getAssociationManager()->unassociate( $ghost, $ghost2, TRUE ); - - // Fast-track, assoc bean got deleted right away - asrt( \Model_Ghost_Ghost::$deleted, FALSE ); - } - - /** - * Test limited support for polymorph associations. - * - * @return void - */ - public function testPoly() - { - testpack( 'Testing poly' ); - - $shoe = R::dispense( 'shoe' ); - $lace = R::dispense( 'lace' ); - - $lace->color = 'white'; - - $id = R::store( $lace ); - - $shoe->itemType = 'lace'; - $shoe->item = $lace; - - $id = R::store( $shoe ); - - $shoe = R::load( 'shoe', $id ); - - $x = $shoe->poly( 'itemType' )->item; - - asrt( $x->color, 'white' ); - } - - /** - * Test limited support for 1-to-1 associations. - * - * @return void - */ - public function testOneToOne() - { - testpack( 'Testing one-to-ones' ); - - $author = R::dispense( 'author' )->setAttr( 'name', 'a' );; - $bio = R::dispense( 'bio' )->setAttr( 'name', 'a' ); - - R::storeAll( array( $author, $bio ) ); - - $id1 = $author->id; - - $author = R::dispense( 'author' )->setAttr( 'name', 'b' );; - $bio = R::dispense( 'bio' )->setAttr( 'name', 'b' ); - - R::storeAll( array( $author, $bio ) ); - - $x = $author->one( 'bio' ); - $y = $bio->one('author'); - - asrt( $x->name, $bio->name ); - asrt( $y->name, $author->name ); - asrt( $x->id, $bio->id ); - asrt( $y->id, $author->id ); - - $id2 = $author->id; - - list( $a, $b ) = R::loadMulti( 'author,bio', $id1 ); - - asrt( $a->name, $b->name ); - asrt( $a->name, 'a' ); - - list( $a, $b ) = R::loadMulti( 'author,bio', $id2 ); - - asrt( $a->name, $b->name ); - asrt( $a->name, 'b' ); - - list( $a, $b ) = R::loadMulti( array( 'author', 'bio' ), $id1 ); - - asrt( $a->name, $b->name ); - asrt( $a->name, 'a' ); - - list( $a, $b ) = R::loadMulti( array( 'author', 'bio' ), $id2 ); - - asrt( $a->name, $b->name ); - asrt( $a->name, 'b' ); - - asrt( is_array( R::loadMulti( NULL, 1 ) ), TRUE ); - - asrt( ( count( R::loadMulti( NULL, 1 ) ) === 0 ), TRUE ); - } - - /** - * Test single column bases unique constraints. - * - * @return void - */ - public function testSingleColUniqueConstraint() - { - testpack( 'Testing unique constraint on single column' ); - - $book = R::dispense( 'book' ); - - $book->title = 'bla'; - $book->extra = 2; - - $id = R::store( $book ); - R::getWriter()->addUniqueIndex( 'book', array( 'title' ) ); - - $book = R::dispense( 'book' ); - - $book->title = 'bla'; - - $expected = NULL; - - try { - R::store( $book ); - - fail(); - } catch ( SQL $e ) { - $expected = $e; - } - - asrt( ( $expected instanceof SQL ), TRUE ); - - asrt( R::count( 'book' ), 1 ); - - $book = R::load( 'book', $id ); - - // Causes failure, table will be rebuild - $book->extra = 'CHANGE'; - - $id2 = R::store( $book ); - - $book2 = R::load( 'book', $id2 ); - - $book = R::dispense( 'book' ); - - $book->title = 'bla'; - - try { - R::store( $book ); - - fail(); - } catch ( SQL $e ) { - $expected = $e; - } - - asrt( ( $expected instanceof SQL ), TRUE ); - - asrt( R::count( 'book' ), 1 ); - } - - /** - * Test multiple assiociation. - * - * @return void - */ - public function testMultiAssociationDissociation() - { - $wines = R::dispense( 'wine', 3 ); - $cheese = R::dispense( 'cheese', 3 ); - $olives = R::dispense( 'olive', 3 ); - - R::getRedBean()->getAssociationManager()->associate( $wines, array_merge( $cheese, $olives ) ); - - asrt( R::count( 'cheese' ), 3 ); - asrt( R::count( 'olive' ), 3 ); - asrt( R::count( 'wine' ), 3 ); - - asrt( count( $wines[0]->sharedCheese ), 3 ); - asrt( count( $wines[0]->sharedOlive ), 3 ); - asrt( count( $wines[1]->sharedCheese ), 3 ); - asrt( count( $wines[1]->sharedOlive ), 3 ); - asrt( count( $wines[2]->sharedCheese ), 3 ); - asrt( count( $wines[2]->sharedOlive ), 3 ); - - R::getRedBean()->getAssociationManager()->unassociate( $wines, $olives ); - - asrt( count( $wines[0]->sharedCheese ), 3 ); - asrt( count( $wines[0]->sharedOlive ), 0 ); - asrt( count( $wines[1]->sharedCheese ), 3 ); - asrt( count( $wines[1]->sharedOlive ), 0 ); - asrt( count( $wines[2]->sharedCheese ), 3 ); - asrt( count( $wines[2]->sharedOlive ), 0 ); - - R::getRedBean()->getAssociationManager()->unassociate( array( $wines[1] ), $cheese ); - - asrt( count( $wines[0]->sharedCheese ), 3 ); - asrt( count( $wines[0]->sharedOlive ), 0 ); - asrt( count( $wines[1]->sharedCheese ), 0 ); - asrt( count( $wines[1]->sharedOlive ), 0 ); - asrt( count( $wines[2]->sharedCheese ), 3 ); - asrt( count( $wines[2]->sharedOlive ), 0 ); - - R::getRedBean()->getAssociationManager()->unassociate( array( $wines[2] ), $cheese ); - - asrt( count( $wines[0]->sharedCheese ), 3 ); - asrt( count( $wines[0]->sharedOlive ), 0 ); - asrt( count( $wines[1]->sharedCheese ), 0 ); - asrt( count( $wines[1]->sharedOlive ), 0 ); - asrt( count( $wines[2]->sharedCheese ), 0 ); - asrt( count( $wines[2]->sharedOlive ), 0 ); - } - - public function testErrorHandling() - { - R::nuke(); - list( $book, $page ) = R::dispenseAll( 'book,page' ); - $book->sharedPage[] = $page; - R::store( $page ); - - $redbean = R::getRedBean(); - $am = $redbean->getAssociationManager(); - - //SQLite and CUBRID do not comply with ANSI SQLState codes. - $catchAll = ( $this->currentlyActiveDriverID == 'sqlite' || $this->currentlyActiveDriverID === 'CUBRID' ); - - try { - $am->related( $book, 'page', 'invalid SQL' ); - if ($catchAll) pass(); else fail(); - } catch ( SQL $e ) { - if ($catchAll) fail(); else pass(); - } - - try { - $am->related( $book, 'cover'); - pass(); - } catch ( SQL $e ) { - fail(); - } - - try { - $am->related( R::dispense('cover'), 'book' ); - pass(); - } catch ( SQL $e ) { - fail(); - } - - } - -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Batch.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Batch.php deleted file mode 100644 index 6b50c35f..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Batch.php +++ /dev/null @@ -1,139 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $page = $redbean->dispense( "page" ); - - $page->name = "page no. 1"; - $page->rating = 1; - - $id1 = $redbean->store( $page ); - - $page = $redbean->dispense( "page" ); - - $page->name = "page no. 2"; - - $id2 = $redbean->store( $page ); - - $batch = $redbean->batch( "page", array( $id1, $id2 ) ); - - asrt( count( $batch ), 2 ); - asrt( $batch[$id1]->getMeta( "type" ), "page" ); - asrt( $batch[$id2]->getMeta( "type" ), "page" ); - asrt( (int) $batch[$id1]->id, $id1 ); - asrt( (int) $batch[$id2]->id, $id2 ); - - $book = $redbean->dispense( "book" ); - - $book->name = "book 1"; - - $redbean->store( $book ); - - $book = $redbean->dispense( "book" ); - - $book->name = "book 2"; - - $redbean->store( $book ); - - $book = $redbean->dispense( "book" ); - - $book->name = "book 3"; - - $redbean->store( $book ); - - $books = $redbean->batch( "book", $adapter->getCol( "SELECT id FROM book" ) ); - - asrt( count( $books ), 3 ); - - $a = $redbean->batch( 'book', 9919 ); - - asrt( is_array( $a ), TRUE ); - asrt( count( $a ), 0 ); - $a = $redbean->batch( 'triangle', 1 ); - - asrt( is_array( $a ), TRUE ); - asrt( count( $a ), 0 ); - - R::freeze( TRUE ); - - $a = $redbean->batch( 'book', 9919 ); - - asrt( is_array( $a ), TRUE ); - asrt( count( $a ), 0 ); - try { - $a = $redbean->batch( 'triangle', 1 ); - fail(); - } catch(SQL $e) { - pass(); - } - R::freeze( FALSE ); - asrt( R::wipe( 'spaghettimonster' ), FALSE ); - } - - /** - * Test missing bean scenarios. - * - * @return void - */ - public function testMissingBeans() - { - testpack( 'deal with missing beans' ); - - $id = R::store( R::dispense( 'beer' ) ); - $bottles = R::batch( 'beer', array( $id, $id + 1, $id + 2 ) ); - - asrt( count( $bottles ), 3 ); - asrt( (int) $bottles[$id]->id, (int) $id ); - asrt( (int) $bottles[$id + 1]->id, 0 ); - asrt( (int) $bottles[$id + 2]->id, 0 ); - } - - /** - * Test batch alias loadAll. - * - * @return void - */ - public function testBatchAliasLoadAll() - { - $ids = R::storeAll( R::dispense( 'page', 2 ) ); - $pages = R::loadAll( 'page', $ids ); - asrt( is_array( $pages ), true ); - asrt( count( $pages ), 2 ); - asrt( ( $pages[$ids[0]] instanceof OODBBean ), true ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php deleted file mode 100644 index 1aff3715..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Bean.php +++ /dev/null @@ -1,1039 +0,0 @@ -ownerId = 2; - $book->ownerCritic = 'a'; - $book->sharedbyReader = 'b'; - $id = R::store( $book ); - $columns = R::inspect( 'book' ); - asrt( isset( $columns['owner_id'] ), TRUE ); - asrt( isset( $columns['owner_critic'] ), TRUE ); - asrt( isset( $columns['sharedby_reader'] ), TRUE ); - asrt( isset( $columns['ownerId'] ), FALSE ); - asrt( isset( $columns['ownerCritic'] ), FALSE ); - asrt( isset( $columns['sharedbyReader'] ), FALSE ); - R::nuke(); - $book = R::dispense( 'book' ); - $book->xownerId = 2; - $book->xownerCritic = 'a'; - $book->sharedbyReader = 'b'; - $id = R::store( $book ); - $columns = R::inspect( 'book' ); - asrt( isset( $columns['xowner_id'] ), TRUE ); - asrt( isset( $columns['xowner_critic'] ), TRUE ); - asrt( isset( $columns['sharedby_reader'] ), TRUE ); - asrt( isset( $columns['xownerId'] ), FALSE ); - asrt( isset( $columns['xownerCritic'] ), FALSE ); - asrt( isset( $columns['sharedbyReader'] ), FALSE ); - } - - /** - * Other tests... - */ - public function testMisc() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->ownPage[] = R::dispense( 'page' ); - R::store( $book ); - R::nuke(); - R::store( $book ); - asrt( R::count( 'book' ), 0 ); - $book->ownPage; - R::store( $book ); - asrt( R::count( 'book' ), 0 ); - $book->title = 'x'; - R::store( $book ); - asrt( R::count( 'book' ), 0 ); - } - - /** - * Only fire update query if the bean really contains different - * values. But make sure beans several 'parents' away still get - * saved. - * - * @return void - */ - public function testBeanTainting() - { - $logger = R::getDatabaseAdapter()->getDatabase()->getLogger(); - list( $i, $k, $c, $s ) = R::dispenseAll( 'invoice,customer,city,state' ); - $i->customer = $k; - $i->status = 0; - $k->city = $c; - $c->state = $s; - $s->name = 'x'; - R::store( $i ); - $i = $i->fresh(); - asrt( $i->customer->city->state->name, 'x' ); - $i->status = 1; - R::freeze( true ); - $logger = R::debug( 1, 1 ); - //do we properly skip unmodified but tainted parent beans? - R::store( $i ); - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - //does cascade update still work? - $i = $i->fresh(); - $i->customer->city->state->name = 'y'; - R::store( $i ); - $i = $i->fresh(); - asrt( $i->customer->city->state->name, 'y' ); - $i = $i->fresh(); - $differentCity = R::dispense( 'city' ); - R::store( $differentCity ); - $i->customer->city = $differentCity; - R::store( $i ); - $i = $i->fresh(); - asrt( ( $i->customer->city->id != $c->id ), TRUE ); - asrt( is_null( $i->customer->city->state ), TRUE ); - $i->customer->city = NULL; - R::store( $i ); - $i = $i->fresh(); - asrt( is_null( $i->customer->city ), TRUE ); - $i->customer = $k; - $i->status = 0; - $k->city = $c; - $c->state = $s; - $s->name = 'x'; - R::store( $i ); - R::freeze( FALSE ); - $i = $i->fresh(); - //can we still change remote parent? - $i->customer->city->name = 'q'; - $logger->clear(); - R::store($i); - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - //print_r($logger->getLogs()); - asrt( count( $numberOfUpdateQueries ), 1 ); - $i = $i->fresh(); - asrt( $i->customer->city->name, 'q' ); - //do we properly skip unmodified but tainted parent beans? - $i->status = 3; - $logger->clear(); - R::store( $i ); - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - } - - /** - * Test whether the number of update queries - * executed is limited to the ones that are absolutely - * necessary to sync the database. - * - * @return void - */ - public function testUpdateQueries() - { - $book = R::dispense( 'book' ); - $book->title = 'Eye of Wight'; - $book->xownPageList = R::dispense( 'page', 10 ); - $book->sharedCategoryList = R::dispense( 'category', 2 ); - $n = 1; - foreach( $book->xownPageList as $page ) { - $page->number = $n++; - } - $book->sharedCategory[0]->name = 'adventure'; - $book->sharedCategory[1]->name = 'puzzle'; - $book->author = R::dispense( 'author' ); - $book->author->name = 'John'; - $book->map = R::dispense( 'map' ); - $book->map->name = 'Wight'; - $book->map->xownLocationList = R::dispense( 'location', 3 ); - asrt( $book->getMeta('tainted'), TRUE ); - asrt( $book->getMeta('changed'), TRUE ); - R::store( $book ); - asrt( $book->getMeta('tainted'), FALSE ); - asrt( $book->getMeta('changed'), FALSE ); - $logger = R::debug( 1, 1 ); - $book = $book->fresh(); - asrt( $book->getMeta('tainted'), FALSE ); - asrt( $book->getMeta('changed'), FALSE ); - $book->author; - asrt( $book->getMeta('tainted'), TRUE ); - asrt( $book->getMeta('changed'), FALSE ); - $logger->clear(); - R::store( $book ); - //read only, no updates - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 0 ); - $book->title = 'Spirit of the Stones'; - R::store( $book ); - //changed title, 1 update - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - $logger->clear(); - //store again, no changes, no updates - R::store( $book ); - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 0 ); - $logger->clear(); - $book = $book->fresh(); - $book->xownPageList; - asrt( $book->getMeta('tainted'), TRUE ); - asrt( $book->getMeta('changed'), FALSE ); - R::store( $book ); - //access only, no update - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 0 ); - $logger->clear(); - $book = $book->fresh(); - $book->sharedCategoryList; - asrt( $book->getMeta('tainted'), TRUE ); - asrt( $book->getMeta('changed'), FALSE ); - R::store( $book ); - //access only, no update - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 0 ); - $logger->clear(); - $book = $book->fresh(); - unset($book->xownPageList[5]); - asrt( $book->getMeta('tainted'), TRUE ); - asrt( $book->getMeta('changed'), FALSE ); - R::store( $book ); - //remove only, no update, just 1 delete - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 0 ); - $numberOfUpdateQueries = $logger->grep( 'DELETE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - $book = $book->fresh(); - asrt( count( $book->xownPageList ), 9 ); - $logger->clear(); - $book = $book->fresh(); - $book->xownPageList[] = R::dispense('page'); - asrt( $book->getMeta('tainted'), TRUE ); - asrt( $book->getMeta('changed'), FALSE ); - R::store( $book ); - //no update, 1 insert, just adding - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 0 ); - $numberOfUpdateQueries = $logger->grep( 'INSERT' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - $book = $book->fresh(); - asrt( count( $book->xownPageList ), 10 ); - $logger->clear(); - $book = $book->fresh(); - $book->map->xownLocationList[1]->name = 'Horshoe Bay'; - asrt( $book->getMeta('tainted'), TRUE ); - asrt( $book->getMeta('changed'), FALSE ); - asrt( $book->map->getMeta('tainted'), TRUE ); - asrt( $book->map->getMeta('changed'), FALSE ); - asrt( $book->map->xownLocationList[1]->getMeta('tainted'), TRUE ); - asrt( $book->map->xownLocationList[1]->getMeta('changed'), TRUE ); - R::store( $book ); - //1 update for child of parent, no other updates - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - $book = $book->fresh(); - asrt( $book->map->xownLocationList[1]->name, 'Horshoe Bay' ); - $logger->clear(); - R::store( $book ); - //just access, no updates - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 0 ); - $logger->clear(); - $book = $book->fresh(); - $book->ownPageList[2]->number = 99; - R::store( $book ); - //1 update, do not update rest of pages or book itself - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - $book = $book->fresh(); - $book->author->name = 'Worsley'; - $logger->clear(); - R::store( $book ); - //1 update for parent - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - $author = R::dispense('author'); - $author->name = 'J.W.'; - R::store( $author ); - $book = $book->fresh(); - $book->author = $author; - $author->name = 'JW'; - $logger->clear(); - R::store( $book ); - //2 updates, one for author, one for link field: author_id needs update. - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 2 ); - $author->country = R::dispense( 'country' )->setAttr( 'name', 'England' ); - R::store( $author ); - $book = $book->fresh(); - $book->author->country->name = 'Wight'; - $logger->clear(); - R::store( $book ); - //1 update, country only, dont update for intermediate parents: book -> author -> ... - $numberOfUpdateQueries = $logger->grep( 'UPDATE' ); - asrt( count( $numberOfUpdateQueries ), 1 ); - } - - /** - * Tests effects of importFrom and setProperty. - * - * @return void - */ - public function testImportFromAndSetProp() - { - $bean = R::dispense( 'bean' ); - asrt( $bean->getMeta( 'tainted' ), TRUE ); - asrt( $bean->getMeta( 'changed' ), TRUE ); - $bean->setMeta( 'tainted', FALSE ); - $bean->setMeta( 'changed', FALSE ); - asrt( $bean->getMeta( 'tainted' ), FALSE ); - asrt( $bean->getMeta( 'changed' ), FALSE ); - $bean->importFrom( R::dispense( 'bean' ) ); - asrt( $bean->getMeta( 'tainted' ), TRUE ); - asrt( $bean->getMeta( 'changed' ), TRUE ); - $bean->setMeta( 'tainted', FALSE ); - $bean->setMeta( 'changed', FALSE ); - asrt( $bean->getMeta( 'tainted' ), FALSE ); - asrt( $bean->getMeta( 'changed' ), FALSE ); - $bean->setProperty( 'id', 0, TRUE, TRUE ); - asrt( $bean->getMeta( 'tainted' ), TRUE ); - asrt( $bean->getMeta( 'changed' ), TRUE ); - $bean->setMeta( 'tainted', FALSE ); - $bean->setMeta( 'changed', FALSE ); - asrt( $bean->getMeta( 'tainted' ), FALSE ); - asrt( $bean->getMeta( 'changed' ), FALSE ); - $bean->setProperty( 'id', 0, TRUE, FALSE ); - asrt( $bean->getMeta( 'tainted' ), FALSE ); - asrt( $bean->getMeta( 'changed' ), FALSE ); - $bean->name = 'x'; - asrt( $bean->getMeta( 'tainted' ), TRUE ); - asrt( $bean->getMeta( 'changed' ), TRUE ); - } - - /** - * Setup - * - * @return void - */ - private function _createBook() - { - R::nuke(); - $book = R::dispense( 'book' ); - $pages = R::dispense( 'page', 2 ); - $ads = R::dispense('ad', 3 ); - $tags = R::dispense( 'tag', 2 ); - $author = R::dispense( 'author' ); - $coauthor = R::dispense( 'author' ); - $book->alias( 'magazine' )->ownAd = $ads; - $book->ownPage = $pages; - $book->sharedTag = $tags; - $book->via( 'connection' )->sharedUser = array( R::dispense( 'user' ) ); - $book->author = $author; - $book->coauthor = $coauthor; - R::store( $book ); - return $book->fresh(); - } - - /* - * Can we add a bean to a list? - * - * @return void - */ - public function testWhetherWeCanAddToLists() - { - - $book = $this->_createBook(); - $book->ownPage[] = R::dispense( 'page' ); - R::store( $book ); - asrt( R::count('page'), 3 ); - $book = $this->_createBook(); - $book->ownPageList[] = R::dispense('page'); - R::store( $book ); - asrt( R::count('page'), 3 ); - $book = $this->_createBook(); - $book->xownPage[] = R::dispense('page'); - R::store( $book ); - asrt( R::count('page'), 3 ); - $book = $this->_createBook(); - $book->xownPageList[] = R::dispense('page'); - R::store( $book ); - asrt( R::count('page'), 3 ); - - $ads = R::dispense('ad', 3 ); - $book = $this->_createBook(); - $book->alias('magazine')->ownAd = $ads; - $book->ownPage[] = R::dispense('page'); - R::store( $book ); - asrt( R::count('ad'), 6 ); - asrt( R::count('page'), 3 ); - $ads = R::dispense('ad', 3 ); - $book = $this->_createBook(); - $book->alias('magazine')->ownAdList = $ads; - $book->ownPageList[] = R::dispense('page'); - R::store( $book ); - asrt( R::count('ad'), 6 ); - asrt( R::count('page'), 3 ); - $ads = R::dispense('ad', 3 ); - $book = $this->_createBook(); - $book->alias('magazine')->xownAd = $ads; - $book->xownPage[] = R::dispense('page'); - R::store( $book ); - asrt( R::count('ad'), 3 ); - asrt( R::count('page'), 3 ); - $ads = R::dispense('ad', 3 ); - $book = $this->_createBook(); - $book->alias('magazine')->xownAdList = $ads; - $book->xownPageList[] = R::dispense('page'); - R::store( $book ); - asrt( R::count('ad'), 3 ); - asrt( R::count('page'), 3 ); - - $book = $this->_createBook(); - $book->sharedTag[] = R::dispense('tag'); - R::store( $book ); - asrt( R::count('tag'), 3 ); - $book = $this->_createBook(); - $book->sharedTagList[] = R::dispense('tag'); - R::store( $book ); - asrt( R::count('tag'), 3 ); - } - - /** - * Can we delete a bean in a list by its ID? - * Only the UNSET() variant should work. - * - * @return void - */ - public function testDeleteByIDs() - { - $book = $this->_createBook(); - $firstPage = reset( $book->ownPageList ); - $book->ownPage[ $firstPage->id ] = NULL; - try { R::store( $book ); fail(); }catch(\Exception $e) { pass(); } - $book = $this->_createBook(); - asrt( count( $book->ownPage ), 2 ); - $firstPage = reset( $book->ownPageList ); - unset( $book->ownPage[ $firstPage->id ] ); - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book->ownPage ), 1 ); - $firstPage = reset( $book->ownPageList ); - $book->ownPage[ $firstPage->id ] = FALSE; - try { R::store( $book ); fail(); }catch(\Exception $e) { pass(); } - $book = $book->fresh(); - asrt( count( $book->ownPage ), 0 ); - - $book = $this->_createBook(); - $firstAd = reset( $book->alias('magazine')->ownAd ); - $book->alias('magazine')->ownAd[ $firstAd->id ] = NULL; - try { R::store( $book ); fail(); }catch(\Exception $e) { pass(); } - $book = $this->_createBook(); - asrt( count( $book->alias('magazine')->ownAd ), 3 ); - $firstAd = reset( $book->alias('magazine')->ownAdList ); - unset( $book->alias('magazine')->ownAdList[ $firstAd->id ] ); - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book->alias('magazine')->ownAd ), 2 ); - $firstAd = reset( $book->alias('magazine')->ownAd ); - $book->alias('magazine')->ownAd[ $firstAd->id ] = FALSE; - try { R::store( $book ); fail(); }catch(\Exception $e) { pass(); } - $book = $book->fresh(); - asrt( count( $book->alias('magazine')->ownAd ), 1 ); - - } - - /** - * You CAN delete an own-list by assiging an empty array. - * - * @return void - */ - public function testDeleteOwnListWithEmptyArray() - { - $book = $this->_createBook(); - asrt( isset($book->ownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->ownPage ), 2 ); //when loaded has 2 - $book->ownPage = array(); //remove all - R::store( $book ); - asrt( isset($book->ownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->ownPage ), 0 ); - } - - /** - * You cannot delete an own-list by assigning NULL. - * - * @return void - */ - public function testCANTDeleteOwnListWithNULL() - { - $book = $this->_createBook(); - asrt( isset($book->ownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->ownPage ), 2 ); //when loaded has 2 - $book->ownPage = NULL; //remove all - R::store( $book ); - asrt( isset($book->ownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->ownPage ), 2 ); - } - - /** - * You cannot delete an own-list by assigning FALSE. - * - * @return void - */ - public function testCANTDeleteOwnListWithFalse() - { - $book = $this->_createBook(); - asrt( isset($book->ownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->ownPage ), 2 ); //when loaded has 2 - $book->ownPage = FALSE; //remove all - R::store( $book ); - asrt( isset($book->ownPage), TRUE ); //not loaded yet, lazy loading - asrt( $book->ownPage, '0' ); - } - - /** - * You cannot delete an own-list by unsetting it. - */ - public function testCANTDeleteOwnListWithUnset() - { - $book = $this->_createBook(); - asrt( isset($book->ownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->ownPage ), 2 ); //when loaded has 2 - unset( $book->ownPage ); //does NOT remove all - R::store( $book ); - asrt( isset($book->ownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->ownPage ), 2 ); - } - - /** - * You CAN delete an aliased own-list by assiging an empty array. - * - * @return void - */ - public function testDeleteAliasedOwnListWithEmptyArray() - { - $book = $this->_createBook(); - asrt( isset($book->alias('magazine')->ownAd), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->alias('magazine')->ownAd ), 3 ); //when loaded has 2 - $book->alias('magazine')->ownAd = array(); //remove all - $book->ownPage[] = R::dispense('page'); - R::store( $book ); - asrt( isset($book->alias('magazine')->ownAd), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->alias('magazine')->ownAd ), 0 ); - asrt( count( $book->alias('magazine')->ownPage ), 0 ); //also test possible confusion - asrt( count( $book->all()->ownPageList ), 3 ); - } - - /** - * You cannot delete an aliased own-list by assigning NULL. - * - * @return void - */ - public function testCANTDeleteAliasedOwnListWithNULL() - { - $book = $this->_createBook(); - asrt( isset($book->alias('magazine')->ownAd), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->alias('magazine')->ownAd ), 3 ); //when loaded has 2 - $book->alias('magazine')->ownAd = NULL; //remove all - R::store( $book ); - asrt( isset($book->alias('magazine')->ownAd), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->alias('magazine')->ownAd ), 3 ); - } - - /** - * You cannot delete an aliased own-list by assigning FALSE. - * - * @return void - */ - public function testCANTDeleteAliasedOwnListWithFalse() - { - $book = $this->_createBook(); - asrt( isset($book->alias('magazine')->ownAd), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->alias('magazine')->ownAd ), 3 ); //when loaded has 2 - $book->alias('magazine')->ownAd = FALSE; //remove all - R::store( $book ); - asrt( isset($book->alias('magazine')->ownAd), TRUE ); //not loaded yet, lazy loading - asrt( $book->alias('magazine')->ownAd, '0' ); - } - - /** - * You cannot delete an aliased own-list by unsetting it. - * - * @return void - */ - public function testCANTDeleteAliasedOwnListWithUnset() - { - $book = $this->_createBook(); - asrt( isset($book->alias('magazine')->ownAd), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->alias('magazine')->ownAd ), 3 ); //when loaded has 2 - unset( $book->alias('magazine')->ownAd ); //does NOT remove all - R::store( $book ); - asrt( isset($book->alias('magazine')->ownAd), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->alias('magazine')->ownAd ), 3 ); - } - - /** - * You CAN delete an x-own-list by assiging an empty array. - * - * @return void - */ - public function testDeleteXOwnListWithEmptyArray() - { - $book = $this->_createBook(); - asrt( isset($book->xownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->xownPage ), 2 ); //when loaded has 2 - $book->xownPage = array(); //remove all - R::store( $book ); - asrt( isset($book->xownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->xownPage ), 0 ); - } - - /** - * You cannot delete an x-own-list by assigning NULL. - * - * @return void - */ - public function testCANTDeleteXOwnListWithNULL() - { - $book = $this->_createBook(); - asrt( isset($book->xownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->xownPage ), 2 ); //when loaded has 2 - $book->xownPage = NULL; //remove all - R::store( $book ); - asrt( isset($book->xownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->xownPage ), 2 ); - } - - /** - * You cannot delete an x-own-list by assigning FALSE. - * - * @return void - */ - public function testCANTDeleteXOwnListWithFalse() - { - $book = $this->_createBook(); - asrt( isset($book->xownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->xownPage ), 2 ); //when loaded has 2 - $book->xownPage = FALSE; //remove all - R::store( $book ); - asrt( isset($book->xownPage), TRUE ); //not loaded yet, lazy loading - asrt( $book->xownPage, '0' ); - } - - /** - * You cannot delete an x-own-list by unsetting it. - * - * @return void - */ - public function testCANTDeleteXOwnListWithUnset() - { - $book = $this->_createBook(); - asrt( isset($book->xownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->xownPage ), 2 ); //when loaded has 2 - unset( $book->xownPage ); //does NOT remove all - R::store( $book ); - asrt( isset($book->xownPage), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->xownPage ), 2 ); - } - - /** - * You CAN delete a shared-list by assiging an empty array. - * - * @return void - */ - public function testDeleteSharedListWithEmptyArray() - { - $book = $this->_createBook(); - asrt( isset($book->sharedTag), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->sharedTag ), 2 ); //when loaded has 2 - $book->sharedTag = array(); //remove all - R::store( $book ); - asrt( isset($book->sharedTag), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->sharedTag ), 0 ); - } - - /** - * You cannot delete a shared list by assigning NULL. - * - * @return void - */ - public function testCANTDeleteSharedListWithNULL() - { - $book = $this->_createBook(); - asrt( isset($book->sharedTag), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->sharedTag ), 2 ); //when loaded has 2 - $book->sharedTag = NULL; //remove all - R::store( $book ); - asrt( isset($book->sharedTag), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->sharedTag ), 2 ); - } - - /** - * You cannot delete a shared-list by assigning FALSE. - * - * @return void - */ - public function testCANTDeleteSharedListWithFalse() - { - $book = $this->_createBook(); - asrt( isset($book->sharedTag), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->sharedTag ), 2 ); //when loaded has 2 - $book->sharedTag = FALSE; //remove all - R::store( $book ); - asrt( isset($book->sharedTag), TRUE ); //not loaded yet, lazy loading - asrt( $book->sharedTag, '0' ); - } - - /** - * You cannot delete a shared-list by unsetting it. - * - * @return void - */ - public function testCANTDeleteSharedWithUnset() - { - $book = $this->_createBook(); - asrt( isset($book->sharedTag), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->sharedTag ), 2 ); //when loaded has 2 - unset( $book->sharedTag ); //does NOT remove all - R::store( $book ); - asrt( isset($book->sharedTag), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->sharedTag ), 2 ); - } - - /** - * You CAN delete a shared-list by assiging an empty array. - * - * @return void - */ - public function testDeleteViaSharedListWithEmptyArray() - { - $book = $this->_createBook(); - asrt( isset($book->via('connection')->sharedUser), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 1 ); //when loaded has 2 - $book->via('connection')->sharedUser = array(); //remove all - R::store( $book ); - asrt( isset($book->via('connection')->sharedUser), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 0 ); - } - - /** - * You cannot delete a shared-list by assigning NULL. - * - * @return void - */ - public function testCANTDeleteViaSharedListWithNULL() - { - $book = $this->_createBook(); - asrt( isset($book->via('connection')->sharedUser), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 1 ); //when loaded has 2 - $book->via('connection')->sharedUser = NULL; //remove all - R::store( $book ); - asrt( isset($book->via('connection')->sharedUser), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 1 ); - } - - /** - * You cannot delete a shared list by assigning FALSE. - * - * @return void - */ - public function testCANTDeleteViaSharedListWithFalse() - { - $book = $this->_createBook(); - asrt( isset($book->via('connection')->sharedUser), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 1 ); //when loaded has 1 - $book->via('connection')->sharedUser = FALSE; //remove all - R::store( $book ); - asrt( isset($book->via('connection')->sharedUser), TRUE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 1 ); //when loaded has 1 - - } - - /** - * You cannot delete a shared-list by unsetting it. - * - * @return void - */ - public function testCANTDeleteViaSharedWithUnset() - { - $book = $this->_createBook(); - asrt( isset($book->via('connection')->sharedUser), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 1 ); //when loaded has 2 - unset( $book->via('connection')->sharedUser ); //does NOT remove all - R::store( $book ); - asrt( isset($book->via('connection')->sharedUser), FALSE ); //not loaded yet, lazy loading - asrt( count( $book->via('connection')->sharedUser ), 1 ); - } - - /** - * You cannot delete a parent bean by unsetting it. - * - * @return void - */ - public function testYouCANTDeleteParentBeanWithUnset() - { - $book = $this->_createBook(); - asrt( isset($book->author), FALSE ); - asrt( (boolean) ($book->author), TRUE ); - unset( $book->author ); - R::store( $book ); - $book = $book->fresh(); - asrt( isset($book->author), FALSE ); - asrt( (boolean) ($book->author), TRUE ); - } - - /** - * You cannot delete a parent bean by setting it to NULL. - * - * @return void - */ - public function testYouCANDeleteParentBeanWithNULL() - { - $book = $this->_createBook(); - asrt( isset($book->author), FALSE ); - asrt( (boolean) ($book->author), TRUE ); - $book->author = NULL; - R::store( $book ); - $book = $book->fresh(); - asrt( isset($book->author), FALSE ); - asrt( (boolean) ($book->author), FALSE ); - } - - /** - * You CAN delete a parent bean by setting it to FALSE. - * - * @return void - */ - public function testYouCANDeleteParentBeanWithFALSE() - { - $book = $this->_createBook(); - asrt( isset($book->author), FALSE ); - asrt( (boolean) ($book->author), TRUE ); - $book->author = FALSE; - R::store( $book ); - $book = $book->fresh(); - asrt( isset($book->author), FALSE ); - asrt( (boolean) ($book->author), FALSE ); - } - - /** - * You cannot delete an aliased parent bean by unsetting it. - * - * @return void - */ - public function testYouCANTDeleteAliasedParentBeanWithUnset() - { - $book = $this->_createBook(); - asrt( isset($book->fetchAs('author')->coauthor), FALSE ); - asrt( (boolean) ($book->fetchAs('author')->coauthor), TRUE ); - unset( $book->fetchAs('author')->coauthor ); - R::store( $book ); - $book = $book->fresh(); - asrt( isset($book->fetchAs('author')->coauthor), FALSE ); - asrt( (boolean) ($book->fetchAs('author')->coauthor), TRUE ); - } - - /** - * You CAN delete an aliased parent bean by setting it to NULL. - * - * @return void - */ - public function testYouCANDeleteAliasedParentBeanWithNULL() - { - $book = $this->_createBook(); - asrt( isset($book->fetchAs('author')->coauthor), FALSE ); - asrt( (boolean) ($book->fetchAs('author')->coauthor), TRUE ); - $book->fetchAs('author')->coauthor = NULL; - R::store( $book ); - $book = $book->fresh(); - asrt( isset($book->fetchAs('author')->coauthor), FALSE ); - asrt( (boolean) ($book->fetchAs('author')->coauthor), FALSE ); - } - - /** - * You cannot delete an aliased parent bean by setting it to FALSE. - * - * @return void - */ - public function testYouCANDeleteAliasedParentBeanWithFALSE() - { - $book = $this->_createBook(); - asrt( isset($book->fetchAs('author')->coauthor), FALSE ); - asrt( (boolean) ($book->fetchAs('author')->coauthor), TRUE ); - $book->fetchAs('author')->coauthor = FALSE; - R::store( $book ); - $book = $book->fresh(); - asrt( isset($book->fetchAs('author')->coauthor), FALSE ); - asrt( (boolean) ($book->fetchAs('author')->coauthor), FALSE ); - } - - /** - * Tests the effects of unsetting on the shadow of a list. - * - * @return void - */ - public function testUnsettingAListAndShadow() - { - $book = $this->_createBook(); - //should work with ownPage and ownPageList as well... - unset( $book->ownPageList ); - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book->ownPage ), 2 ); - unset( $book->ownPage ); - //shadow should be reloaded as well... - $book->with(' LIMIT 1 ')->ownPage; - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book->ownPage ), 2 ); - asrt( count( $book->getMeta('sys.shadow.ownPage') ), 2 ); - unset( $book->ownPage ); - asrt( $book->getMeta('sys.shadow.ownPage'), NULL ); - //no load must clear shadow as well... - $book->noLoad()->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->getMeta('sys.shadow.ownPage') ), 0 ); - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book->ownPage ), 3 ); - $lists = array( 'ownPage', 'ownPageList', 'xownPage', 'xownPageList', 'sharedPage', 'sharedPageList' ); - foreach( $lists as $list ) { - $book = R::dispense( 'book' ); - $book->$list; - $shadowKey = $list; - if ( strpos( $list, 'x' ) === 0) $shadowKey = substr( $shadowKey, 1 ); - $shadowKey = preg_replace( '/List$/', '', $shadowKey ); - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - unset( $book->$list ); - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - $book->$list; //reloading brings back shadow - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - $book->$list = array(); //keeps shadow (very important to compare deletions!) - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - R::store( $book ); //clears shadow - $book->alias('magazine')->$list; //reloading with alias also brings back shadow - unset( $book->$list ); - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - $book = $book->fresh(); //clears shadow, reload - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - $book->noLoad()->$list; //reloading with noload also brings back shadow - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - asrt( count( $book->getMeta('sys.shadow.'.$shadowKey) ), 0 ); - $book = $book->fresh(); //clears shadow, reload - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - $book->all()->$list; //reloading with all also brings back shadow - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - $book = $book->fresh(); //clears shadow, reload - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - $book->with(' LIMIT 1 ')->$list; //reloading with with- all also brings back shadow - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - $book = $book->fresh(); //clears shadow, reload - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - $book->$list = array(); //keeps shadow (very important to compare deletions!) - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - $book = $book->fresh(); //clears shadow, reload - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - $book->$list = array(); //keeps shadow (very important to compare deletions!) - asrt( is_array( $book->getMeta('sys.shadow.'.$shadowKey) ), TRUE ); - R::trash( $book ); - asrt( $book->getMeta('sys.shadow.'.$shadowKey), NULL ); - } - - //no shadow for parent bean - $book = $book->fresh(); - $book->author = R::dispense( 'author' ); - asrt( $book->getMeta('sys.shadow.author'), NULL ); - R::store( $book ); - $book = $book->fresh(); - unset( $book->author ); //we can unset and it does not remove - R::store( $book ); - $book = $book->fresh(); - asrt( is_object( $book->author ),TRUE ); - //but we can also remove - $book->author = NULL; - R::store( $book ); - $book = $book->fresh(); - asrt( $book->author, NULL ); - - } - - /** - * Test whether the tainted flag gets set correctly. - * - * @return void - */ - public function testAccessingTainting() - { - $book = $this->_createBook(); - asrt( $book->isTainted(), FALSE ); - $book->ownPage; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->author; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->fetchAs('author')->coauthor; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->alias('magazine')->xownAdList; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->title = 'Hello'; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->sharedTag; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->via('connection')->sharedUser; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->coauthor; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->ownFakeList; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->sharedFakeList; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->alias('fake')->ownFakeList; - asrt( $book->isTainted(), TRUE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->title; - asrt( $book->isTainted(), FALSE ); - $book = $book->fresh(); - asrt( $book->isTainted(), FALSE ); - $book->title = 1; - $book->setMeta( 'tainted', FALSE ); - asrt( $book->isTainted(), FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php deleted file mode 100644 index 33b1dd90..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Boxing.php +++ /dev/null @@ -1,74 +0,0 @@ -box(); - - R::trash( $bean ); - - pass(); - - $bean = R::dispense( 'boxedbean' ); - - $bean->sharedBoxbean = R::dispense( 'boxedbean' )->box(); - - R::store( $bean ); - - pass(); - - $bean = R::dispense( 'boxedbean' ); - - $bean->ownBoxedbean = R::dispense( 'boxedbean' )->box(); - - R::store( $bean ); - - pass(); - - $bean = R::dispense( 'boxedbean' ); - - $bean->other = R::dispense( 'boxedbean' )->box(); - - R::store( $bean ); - - pass(); - - $bean = R::dispense( 'boxedbean' ); - - $bean->title = 'MyBean'; - - $box = $bean->box(); - - asrt( ( $box instanceof \Model_Boxedbean ), TRUE ); - - R::store( $box ); - } -} - diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php deleted file mode 100644 index 86524b27..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Chill.php +++ /dev/null @@ -1,150 +0,0 @@ -col1 = '1'; - $bean->col2 = '2'; - - R::store( $bean ); - - asrt( count( R::getWriter()->getColumns( 'bean' ) ), 3 ); - - $bean->col3 = '3'; - - R::store( $bean ); - - asrt( count( R::getWriter()->getColumns( 'bean' ) ), 4 ); - - R::freeze( array( 'umbrella' ) ); - - $bean->col4 = '4'; - - R::store( $bean ); - - asrt( count( R::getWriter()->getColumns( 'bean' ) ), 5 ); - - R::freeze( array( 'bean' ) ); - - $bean->col5 = '5'; - - try { - R::store( $bean ); - fail(); - } catch (\Exception $e ) { - pass(); - } - - asrt( count( R::getWriter()->getColumns( 'bean' ) ), 5 ); - - R::freeze( array() ); - - $bean->col5 = '5'; - - R::store( $bean ); - - asrt( count( R::getWriter()->getColumns( 'bean' ) ), 6 ); - } - - /** - * Test whether we cannot add unique constraints on chilled tables, - * otherwise you cannot avoid this from happening when adding beans to the - * shared list :) -- this is almost a theoretical issue however we want it - * to work according to specifications! - * - * @return void - */ - public function testDontAddUniqueConstraintForChilledBeanTypes() - { - R::nuke(); - $person = R::dispense( 'person' ); - $role = R::dispense( 'role' ); - $person->sharedRole[] = $role; - R::store( $person ); - $person->sharedRole[] = R::dispense( 'role' ); - R::store( $person ); - $bean = R::getRedBean()->dispense('person_role'); - $bean->personId = $person->id; - $bean->roleId = $role->id; - try { - R::store( $bean ); - fail(); - } catch(\Exception $e) { - pass(); - } - asrt(R::count('person_role'), 2); - - R::nuke(); - $link = R::getRedBean()->dispense('person_role'); - $person = R::dispense( 'person' ); - $role = R::dispense( 'role' ); - $link->person = $person; - $link->role = $role; - R::store( $link ); - R::freeze(array('person_role')); - $person->sharedRole[] = R::dispense( 'role' ); - R::store( $person ); - $bean = R::getRedBean()->dispense('person_role'); - $bean->personId = $person->id; - $bean->roleId = $role->id; - try { - R::store( $bean ); - pass(); - } catch(\Exception $e) { - fail(); - } - asrt(R::count('person_role'), 3); - R::freeze( array() ); //set freeze to FALSE and clear CHILL LIST! - } - - /** - * Test whether we can set and reset the chill list and check the contents - * of the chill list. - * - * @return void - */ - public function testChillTest() - { - R::freeze( array( 'beer' ) ); - $oodb = R::getRedBean(); - asrt( $oodb->isChilled( 'beer' ), TRUE ); - asrt( $oodb->isChilled( 'wine' ), FALSE ); - R::freeze( FALSE ); - $oodb = R::getRedBean(); - asrt( $oodb->isChilled( 'beer' ), TRUE ); - asrt( $oodb->isChilled( 'wine' ), FALSE ); - R::freeze( TRUE ); - $oodb = R::getRedBean(); - asrt( $oodb->isChilled( 'beer' ), TRUE ); - asrt( $oodb->isChilled( 'wine' ), FALSE ); - R::freeze( array() ); - $oodb = R::getRedBean(); - asrt( $oodb->isChilled( 'beer' ), FALSE ); - asrt( $oodb->isChilled( 'wine' ), FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php deleted file mode 100644 index 573123ed..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Close.php +++ /dev/null @@ -1,40 +0,0 @@ -getDatabase()->isConnected(), TRUE ); - - R::close(); - - asrt( R::getDatabaseAdapter()->getDatabase()->isConnected(), FALSE ); - - } -} - diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Copy.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Copy.php deleted file mode 100644 index 70e2a967..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Copy.php +++ /dev/null @@ -1,326 +0,0 @@ -ownDocument[] = $document; - - R::store( $document ); - - $duplicate = R::dup( $document ); - pass(); //if RB cant handle this is will crash (nesting level error from PHP). - - $id2 = R::store( $duplicate ); - - $duplicate = R::load( 'document', $id ); - - asrt( (int) $document->document_id, $id ); - asrt( (int) $duplicate->document_id, $id2 ); - - // Export variant - $duplicate = R::exportAll( $document ); - - asrt( (int) $duplicate[0]['document_id'], $id ); - } - - /** - * Test real world scenario: Versioning - */ - public function testVersioning() - { - $document = R::dispense( 'document' ); - - $page = R::dispense( 'page' ); - - $document->title = 'test'; - - $page->content = 'lorem ipsum'; - - $user = R::dispense( 'user' ); - - $user->name = 'Leo'; - - $document->sharedUser[] = $user; - $document->ownPage[] = $page; - - $document->starship_id = 3; - $document->planet = R::dispense( 'planet' ); - - R::store( $document ); - - $duplicate = R::dup( $document ); - - R::store( $duplicate ); - - $duplicate = R::dup( $document ); - - R::store( $duplicate ); - - asrt( R::count( 'planet' ), 1 ); - asrt( R::count( 'user' ), 1 ); - asrt( R::count( 'document' ), 3 ); - asrt( R::count( 'page' ), 3 ); - asrt( R::count( 'spaceship' ), 0 ); - } - - /** - * Same as above but now with intermediate save, counts must be same - */ - public function testVersioningIntermediateSaves() - { - $document = R::dispense( 'document' ); - - $page = R::dispense( 'page' ); - - $document->title = 'test'; - - $page->content = 'lorem ipsum'; - - $user = R::dispense( 'user' ); - - $user->name = 'Leo'; - - $document->sharedUser[] = $user; - $document->ownPage[] = $page; - - $document->starship_id = 3; - - $document->planet = R::dispense( 'planet' ); - - R::store( $document ); - - $duplicate = R::dup( $document ); - - R::store( $document ); - R::store( $duplicate ); - R::store( $document ); - - $duplicate = R::dup( $document ); - - R::store( $document ); - R::store( $duplicate ); - - asrt( R::count( 'planet' ), 1 ); - asrt( R::count( 'user' ), 1 ); - asrt( R::count( 'document' ), 3 ); - asrt( R::count( 'page' ), 3 ); - asrt( R::count( 'spaceship' ), 0 ); - - // same, but now with intermediate save, counts must be same - R::freeze( TRUE ); - - $document = R::dispense( 'document' ); - $page = R::dispense( 'page' ); - - $document->title = 'test'; - - $page->content = 'lorem ipsum'; - - $user = R::dispense( 'user' ); - - $user->name = 'Leo'; - - $document->sharedUser[] = $user; - $document->ownPage[] = $page; - - $document->starship_id = 3; - $document->planet = R::dispense( 'planet' ); - - R::store( $document ); - - $duplicate = R::dup( $document ); - - R::store( $document ); - R::store( $duplicate ); - R::store( $document ); - - $duplicate = R::dup( $document ); - - R::store( $document ); - R::store( $duplicate ); - - asrt( R::count( 'planet' ), 2 ); - asrt( R::count( 'user' ), 2 ); - asrt( R::count( 'document' ), 6 ); - asrt( R::count( 'page' ), 6 ); - asrt( R::count( 'spaceship' ), 0 ); - - R::freeze( FALSE ); - } - - /** - * Test Recursion - */ - public function testRecursion() - { - list( $d1, $d2 ) = R::dispense( 'document', 2 ); - - $page = R::dispense( 'page' ); - - list( $p1, $p2 ) = R::dispense( 'paragraph', 2 ); - - list( $e1, $e2 ) = R::dispense( 'excerpt', 2 ); - - $id2 = R::store( $d2 ); - - $p1->name = 'a'; - $p2->name = 'b'; - - $page->title = 'my page'; - - $page->ownParagraph = array( $p1, $p2 ); - - $p1->ownExcerpt[] = $e1; - $p2->ownExcerpt[] = $e2; - - $e1->ownDocument[] = $d2; - $e2->ownDocument[] = $d1; - - $d1->ownPage[] = $page; - - $id1 = R::store( $d1 ); - - $d1 = R::load( 'document', $id1 ); - - $d = R::dup( $d1 ); - - $ids = array(); - - asrt( ( $d instanceof OODBBean ), TRUE ); - asrt( count( $d->ownPage ), 1 ); - - foreach ( end( $d->ownPage )->ownParagraph as $p ) { - foreach ( $p->ownExcerpt as $e ) { - $ids[] = end( $e->ownDocument )->id; - } - } - - sort( $ids ); - - asrt( (int) $ids[0], 0 ); - asrt( (int) $ids[1], $id1 ); - - R::store( $d ); - - pass(); - - $phillies = R::dispense( 'diner' ); - - list( $lonelyman, $man, $woman ) = R::dispense( 'guest', 3 ); - - $attendant = R::dispense( 'employee' ); - - $lonelyman->name = 'Bennie Moten'; - $man->name = 'Daddy Stovepipe'; - $woman->name = 'Mississippi Sarah'; - $attendant->name = 'Gus Cannon'; - - $phillies->sharedGuest = array( $lonelyman, $man, $woman ); - - $phillies->ownEmployee[] = $attendant; - - $props = R::dispense( 'prop', 2 ); - - $props[0]->kind = 'cigarette'; - $props[1]->kind = 'coffee'; - - $thought = R::dispense( 'thought' ); - - $thought->content = 'Blues'; - - $thought2 = R::dispense( 'thought' ); - - $thought2->content = 'Jazz'; - - $woman->ownProp[] = $props[0]; - $man->sharedProp[] = $props[1]; - - $attendant->ownThought = array( $thought, $thought2 ); - - R::store( $phillies ); - - $diner = R::findOne( 'diner' ); - $diner2 = R::dup( $diner ); - $id2 = R::store( $diner2 ); - $diner2 = R::load( 'diner', $id2 ); - - asrt( count( $diner->ownEmployee ), 1 ); - asrt( count( $diner2->ownEmployee ), 1 ); - asrt( count( $diner->sharedGuest ), 3 ); - asrt( count( $diner2->sharedGuest ), 3 ); - - $employee = reset( $diner->ownEmployee ); - - asrt( count( $employee->ownThought ), 2 ); - - $employee = reset( $diner2->ownEmployee ); - - asrt( count( $employee->ownThought ), 2 ); - - // Can we change something in the duplicate without changing the original? - $employee->name = 'Marvin'; - - $thought = R::dispense( 'thought' ); - - $thought->content = 'depression'; - - $employee->ownThought[] = $thought; - - array_pop( $diner2->sharedGuest ); - - $guest = reset( $diner2->sharedGuest ); - $guest->name = 'Arthur Dent'; - - $id2 = R::store( $diner2 ); - $diner2 = R::load( 'diner', $id2 ); - - asrt( count( $diner->ownEmployee ), 1 ); - asrt( count( $diner2->ownEmployee ), 1 ); - asrt( count( $diner->sharedGuest ), 3 ); - asrt( count( $diner2->sharedGuest ), 2 ); - - $employeeOld = reset( $diner->ownEmployee ); - - asrt( count( $employeeOld->ownThought ), 2 ); - - $employee = reset( $diner2->ownEmployee ); - - asrt( count( $employee->ownThought ), 3 ); - asrt( $employee->name, 'Marvin' ); - asrt( $employeeOld->name, 'Gus Cannon' ); - - // However the shared beans must not be copied - asrt( R::count( 'guest' ), 3 ); - asrt( R::count( 'guest_prop' ), 1 ); - - $arthur = R::findOne( 'guest', ' ' . R::getWriter()->esc( 'name' ) . ' = ? ', array( 'Arthur Dent' ) ); - - asrt( $arthur->name, 'Arthur Dent' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php deleted file mode 100644 index c914f599..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Count.php +++ /dev/null @@ -1,143 +0,0 @@ -sharedPage = R::dispense( 'page', 10 ); - R::store( $book ); - asrt( R::count('bookPage'), 10 ); - - try { - R::count( 'WrongTypeName' ); - fail(); - } catch ( RedException $ex ) { - pass(); - } - - try { - R::count( 'wrong_type_name' ); - fail(); - } catch ( RedException $ex ) { - pass(); - } - } - - /** - * Test count and wipe. - * - * @return void - */ - public function testCountAndWipe() - { - testpack( "Test count and wipe" ); - - $page = R::dispense( "page" ); - - $page->name = "ABC"; - - R::store( $page ); - - $n1 = R::count( "page" ); - - $page = R::dispense( "page" ); - - $page->name = "DEF"; - - R::store( $page ); - - $n2 = R::count( "page" ); - - asrt( $n1 + 1, $n2 ); - - R::wipe( "page" ); - - asrt( R::count( "page" ), 0 ); - asrt( R::getRedBean()->count( "page" ), 0 ); - asrt( R::getRedBean()->count( "kazoo" ), 0 ); // non existing table - - R::freeze( TRUE ); - - asrt( R::getRedBean()->count( "kazoo" ), 0 ); // non existing table - - R::freeze( FALSE ); - - $page = R::dispense( 'page' ); - - $page->name = 'foo'; - - R::store( $page ); - - $page = R::dispense( 'page' ); - - $page->name = 'bar'; - - R::store( $page ); - - asrt( R::count( 'page', ' name = ? ', array( 'foo' ) ), 1 ); - - // Now count something that does not exist, this should return 0. (just be polite) - asrt( R::count( 'teapot', ' name = ? ', array( 'flying' ) ), 0 ); - asrt( R::count( 'teapot' ), 0 ); - - $currentDriver = $this->currentlyActiveDriverID; - - // Some drivers don't support that many error codes. - if ( $currentDriver === 'mysql' || $currentDriver === 'postgres' ) { - try { - R::count( 'teaport', ' for tea ' ); - fail(); - } catch ( SQL $e ) { - pass(); - } - } - } - - public function testCountShared() { - - R::nuke(); - $book = R::dispense( 'book' ); - $book->sharedPageList = R::dispense( 'page', 5 ); - R::store( $book ); - asrt( $book->countShared('page'), 5 ); - asrt( $book->countShared('leaflet'), 0 ); - asrt( R::dispense( 'book' )->countShared('page'), 0 ); - $am = R::getRedBean()->getAssociationManager(); - asrt( $am->relatedCount( R::dispense( 'book' ), 'page' ), 0); - try { - $am->relatedCount( 'not a bean', 'type' ); - fail(); - } catch( RedException $e ) { - pass(); - } - - } - -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php deleted file mode 100644 index d8f1fae3..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cross.php +++ /dev/null @@ -1,530 +0,0 @@ -name = 'Page 3'; - $book->xownPageList[] = $page; - R::store( $book ); - $book = $book->fresh(); - $texts = $book->aggr( 'ownPageList', 'text' ); - pass(); - asrt( count( $texts ), 0 ); - asrt( is_array( $texts ), TRUE ); - R::nuke(); - $book = R::dispense( 'book' ); - $page1 = R::dispense( 'page' ); - $page1->name = 'Page 1'; - $text1 = R::dispense('text'); - $text1->content = 'Text 1'; - $page1->text = $text1; - $book->xownPageList[] = $page1; - $page2 = R::dispense( 'page' ); - $page2->name = 'Page 2'; - $text2 = R::dispense( 'text' ); - $text2->content = 'Text 2'; - $page2->text = $text2; - $book->xownPageList[] = $page2; - $page3 = R::dispense( 'page' ); - $page3->name = 'Page 3'; - $book->xownPageList[] = $page3; - R::store( $book ); - $book = $book->fresh(); - $texts = $book->aggr( 'ownPageList', 'text' ); - pass(); - asrt( count( $texts ), 2 ); - } - - /** - * Test many different scenarios with self referential - * many-to-many relations. - * - * @return void - */ - public function testSelfReferentialCRUD() - { - R::nuke(); - $buddies = R::dispense( 'buddy', 4 ); - $buddies[0]->name = 'A'; - $buddies[1]->name = 'B'; - $buddies[2]->name = 'C'; - $buddies[3]->name = 'D'; - $buddies[0]->sharedBuddyList = array( $buddies[1], $buddies[2] ); - $buddies[3]->sharedBuddyList = array( $buddies[2] ); - R::storeAll( $buddies ); - $buddies[0] = $buddies[0]->fresh(); - asrt( count( $buddies[0]->sharedBuddyList ), 2 ); - - //does this yield valid combinations - cross relations / self ref n-m - //need to symmetric.... - - $names = R::gatherLabels( $buddies[0]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'B,C' ); - - unset( $buddies[0]->sharedBuddy ); - R::storeAll( $buddies ); - $buddies[0] = $buddies[0]->fresh(); - asrt( count( $buddies[0]->sharedBuddyList ), 2 ); - - $buddies[3] = $buddies[3]->fresh(); - asrt( count( $buddies[3]->sharedBuddyList ), 1 ); - - $names = R::gatherLabels( $buddies[3]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'C' ); - - $buddies[2] = $buddies[2]->fresh(); - asrt( count( $buddies[2]->sharedBuddyList ), 2 ); - - $names = R::gatherLabels( $buddies[2]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'A,D' ); - - $buddies[1] = $buddies[1]->fresh(); - asrt( count( $buddies[1]->sharedBuddyList ), 1 ); - - $names = R::gatherLabels( $buddies[1]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'A' ); - - //Can we add one? - $buddies[1]->sharedBuddyList[] = R::dispense('buddy')->setAttr('name', 'E'); - R::store( $buddies[1] ); - - $buddies[0] = $buddies[0]->fresh(); - asrt( count( $buddies[0]->sharedBuddyList ), 2 ); - - $names = R::gatherLabels( $buddies[0]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'B,C' ); - - $buddies[1] = $buddies[1]->fresh(); - asrt( count( $buddies[1]->sharedBuddyList ), 2 ); - - $names = R::gatherLabels( $buddies[1]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'A,E' ); - - $all = R::find( 'buddy' ); - asrt( count( $all ), 5 ); - - foreach( $buddies[1]->sharedBuddy as $buddy ) { - if ( $buddy->name === 'E' ) { - $buddyE = $buddy; - } - } - - asrt( isset( $buddyE ), TRUE ); - asrt( $buddyE->name, 'E' ); - - //can we update? - foreach( $buddies[0]->sharedBuddy as $buddy ) { - if ( $buddy->name === 'C' ) { - $buddy->name = 'C2'; - } - } - - R::store( $buddies[0] ); - - $buddies[0] = $buddies[0]->fresh(); - asrt( count( $buddies[0]->sharedBuddyList ), 2 ); - - $names = R::gatherLabels( $buddies[0]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'B,C2' ); - - $buddies[2] = $buddies[2]->fresh(); - asrt( count( $buddies[2]->sharedBuddyList ), 2 ); - - $names = R::gatherLabels( $buddies[2]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'A,D' ); - - //can we delete? - foreach( $buddies[0]->sharedBuddyList as $id => $buddy ) { - if ( $buddy->name === 'B' ) { - unset( $buddies[0]->sharedBuddyList[$id] ); - } - } - - R::store( $buddies[0] ); - - $buddies[0] = $buddies[0]->fresh(); - asrt( count( $buddies[0]->sharedBuddyList ), 1 ); - - $names = R::gatherLabels( $buddies[0]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'C2' ); - - $buddies[1] = $buddies[1]->fresh(); - asrt( count( $buddies[1]->sharedBuddyList ), 1 ); - - $names = R::gatherLabels( $buddies[1]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'E' ); - - asrt( R::count( 'buddy' ), 5 ); - asrt( R::count( 'buddyBuddy' ), 3 ); - - $buddies[3] = $buddies[3]->fresh(); - asrt( count( $buddies[3]->sharedBuddyList ), 1 ); - - $names = R::gatherLabels( $buddies[3]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'C2' ); - - $buddies[2] = $buddies[2]->fresh(); - asrt( count( $buddies[2]->sharedBuddyList ), 2 ); - - $names = R::gatherLabels( $buddies[2]->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'A,D' ); - - $buddyE = $buddyE->fresh(); - asrt( count( $buddyE->sharedBuddyList ), 1 ); - - $names = R::gatherLabels( $buddyE->sharedBuddyList ); - sort( $names ); - $names = implode( ',', $names ); - asrt( $names, 'B' ); - - //can we access linked_by -- o dear mysql again! cant have alias in WHERE! - if ( $this->currentlyActiveDriverID === 'mysql' ) { - $buddyE = $buddyE->fresh(); - asrt( count( $buddyE->with(' HAVING linked_by > 0 ')->sharedBuddyList ), 1 ); - $buddyE = $buddyE->fresh(); - asrt( count( $buddyE->with(' HAVING linked_by < 0 ')->sharedBuddyList ), 0 ); - } - - //even postgres sucks. Only SQLite knows how to handle this. - //I dont give a fuck whether it's an SQL standard or not, it should just work. - if ( $this->currentlyActiveDriverID === 'sqlite' ) { - $buddyE = $buddyE->fresh(); - asrt( count( $buddyE->withCondition(' linked_by > 0 ')->sharedBuddyList ), 1 ); - $buddyE = $buddyE->fresh(); - asrt( count( $buddyE->withCondition(' linked_by < 0 ')->sharedBuddyList ), 0 ); - } - - $buddyE = $buddyE->fresh(); - asrt( count( $buddyE->withCondition(' buddy_buddy.buddy_id > 0 AND buddy_buddy.buddy2_id > 0 ')->sharedBuddyList ), 1 ); - $buddyE = $buddyE->fresh(); - asrt( count( $buddyE->withCondition(' buddy_buddy.buddy_id < 0 AND buddy_buddy.buddy2_id < 0 ')->sharedBuddyList ), 0 ); - } - - /** - * Test self referential N-M relations (page_page). - * - * @return void - */ - public function testSelfReferential() - { - $page = R::dispense( 'page' )->setAttr( 'title', 'a' ); - $page->sharedPage[] = R::dispense( 'page' )->setAttr( 'title', 'b' ); - R::store( $page ); - $page = $page->fresh(); - $page = reset( $page->sharedPage ); - asrt( $page->title, 'b' ); - $tables = array_flip( R::inspect() ); - asrt( isset( $tables['page_page'] ), true ); - $columns = R::inspect( 'page_page' ); - asrt( isset( $columns['page2_id'] ), true ); - } - - /** - * Test the unique constraint. - * Just want to make sure it is not too limiting and functions - * properly for typical RedBeanPHP usage. - * - * @return void - */ - public function testUnique() - { - R::nuke(); - $page1 = R::dispense( 'page' ); - $tag1 = R::dispense( 'tag' ); - $page2 = R::dispense( 'page' ); - $tag2 = R::dispense( 'tag' ); - $page3 = R::dispense( 'page' ); - $tag3 = R::dispense( 'tag' ); - $page1->sharedTag[] = $tag1; - R::store( $page1 ); - //can we save all combinations with unique? - asrt( R::count( 'pageTag' ), 1); - $page1->sharedTag[] = $tag2; - R::store( $page1 ); - asrt( R::count( 'pageTag' ), 2 ); - $page1->sharedTag[] = $tag3; - $page2->sharedTag[] = $tag1; - $page2->sharedTag[] = $tag2; - $page2->sharedTag[] = $tag3; - $page3->sharedTag[] = $tag1; - $page3->sharedTag[] = $tag2; - $page3->sharedTag[] = $tag3; - R::storeAll( array( $page1, $page2, $page3 ) ); - asrt( R::count('pageTag'), 9 ); - $page1 = $page1->fresh(); - $page1->sharedTag[] = $tag3; - R::store( $page1 ); - //cant add violates unique - asrt( R::count( 'pageTag' ), 9 ); - } - - /** - * Shared lists can only be formed using types. - * If you happen to have two beans of the same type you can still - * have a shared list but not with a sense of direction. - * I.e. quest->sharedQuest returns all the quests that follow the first one, - * but also the ones that are followed by the first one. - * If you want to have some sort of direction; i.e. one quest follows another one - * you'll have to use an alias: quest->target, but now you can't use the shared list - * anymore because it will start looking for a type named 'target' (which is just an alias) - * for quest, but it cant find that table and it's not possible to 'keep remembering' - * the alias throughout the system. - * - * The aggr() method solves this inconvenience. - * Aggr iterates through the list identified by its first argument ('target' -> ownQuestTargetList) - * and fetches every ID of the target (quest_target.target_id), loads these beans in batch for - * optimal performance, puts them back in the beans (questTarget->target) and returns the - * references. - * - * @return void - */ - public function testAggregationInSelfRefNM() - { - R::nuke(); - $quest1 = R::dispense( 'quest' ); - $quest1->name = 'Quest 1'; - $quest2 = R::dispense( 'quest' ); - $quest2->name = 'Quest 2'; - $quest3 = R::dispense( 'quest' ); - $quest3->name = 'Quest 3'; - $quest4 = R::dispense( 'quest' ); - $quest4->name = 'Quest 4'; - - $quest1->link( 'questTarget' )->target = $quest2; - $quest1->link( 'questTarget' )->target = $quest3; - $quest3->link( 'questTarget' )->target = $quest4; - $quest3->link( 'questTarget' )->target = $quest1; - - R::storeAll( array( $quest1, $quest3 ) ); - - //There should be 4 links - asrt( (int) R::count('questTarget'), 4 ); - - $quest1 = $quest1->fresh(); - $targets = $quest1->aggr( 'ownQuestTargetList', 'target', 'quest' ); - - //can we aggregate the targets over the link type? - asrt( count( $targets), 2 ); - - //are the all valid beans? - foreach( $targets as $target ) { - //are they beans? - asrt( ( $target instanceof OODBBean ), TRUE ); - //are they fetched as quest? - asrt( ( $target->getMeta( 'type' ) ), 'quest' ); - } - - //list target should already have been loaded, nuke has no effect - R::nuke(); - $links = $quest1->ownQuestTargetList; - - //are the links still there, have they been set in the beans as well? - asrt( count( $links ), 2); - - //are they references instead of copies, changes in the aggregation set should affect the beans in links! - foreach( $targets as $target ) { - $target->name .= 'b'; - asrt( substr( $target->name, -1 ), 'b' ); - } - - //do the names end with a 'b' here as well ? i.e. have they been changed through references? - foreach( $links as $link ) { - asrt( substr( $target->name, -1 ), 'b' ); - } - - //now test the effect on existing shadow... - R::nuke(); - $quest1 = R::dispense('quest'); - $quest1->name = 'Quest 1'; - $quest2 = R::dispense('quest'); - $quest2->name = 'Quest 2'; - $quest3 = R::dispense('quest'); - $quest3->name = 'Quest 3'; - $quest4 = R::dispense('quest'); - $quest4->name = 'Quest 4'; - - $quest1->link( 'questTarget' )->target = $quest2; - $quest1->link( 'questTarget' )->target = $quest3; - - R::store($quest1); - asrt( (int) R::count( 'questTarget' ), 2 ); - - //now lets first build a shadow - $quest1->link( 'questTarget' )->target = $quest4; - - //$quest1 = $quest1->fresh(); - $targets = $quest1->aggr( 'ownQuestTargetList', 'target', 'quest' ); - - //targets should not include the new bean... - asrt( count($targets), 2 ); - - //this should not overwrite the existing beans - R::store($quest1); - asrt( (int) R::count( 'questTarget' ), 3 ); - } - - /** - * Test aggr without the aliasing. - * - * @return void - */ - public function testAggrBasic() - { - R::nuke(); - $book = R::dispense( 'book' ); - $page1 = R::dispense( 'page' ); - $page1->name = 'Page 1'; - $text1 = R::dispense('text'); - $text1->content = 'Text 1'; - $page1->text = $text1; - $book->xownPageList[] = $page1; - $page2 = R::dispense( 'page' ); - $page2->name = 'Page 2'; - $text2 = R::dispense( 'text' ); - $text2->content = 'Text 2'; - $page2->text = $text2; - $book->xownPageList[] = $page2; - R::store( $book ); - $book = $book->fresh(); - $texts = $book->aggr( 'ownPageList', 'text' ); - R::nuke(); - asrt( count( $texts ), 2 ); - foreach( $texts as $text ) { - asrt( ( $text instanceof OODBBean ), TRUE ); - } - $pages = $book->ownPageList; - asrt( count( $pages ), 2 ); - asrt( R::count( 'page' ), 0 ); - foreach( $pages as $page ) { - asrt( ( $page instanceof OODBBean ), TRUE ); - $text = $page->text; - asrt( ( $text instanceof OODBBean ), TRUE ); - $text->content = 'CHANGED'; - } - foreach( $texts as $text ) { - asrt( $text->content, 'CHANGED' ); - } - } - - /** - * Test aggr with basic aliasing. - * - * @return void - */ - public function testAggrWithOnlyAlias() - { - R::nuke(); - $book = R::dispense( 'book' ); - $page1 = R::dispense( 'page' ); - $page1->name = 'Page 1'; - $text1 = R::dispense( 'text' ); - $text1->content = 'Text 1'; - $page1->content = $text1; - $book->xownPageList[] = $page1; - $page2 = R::dispense( 'page' ); - $page2->name = 'Page 2'; - $text2 = R::dispense( 'text' ); - $text2->content = 'Text 2'; - $page2->content = $text2; - $book->xownPageList[] = $page2; - R::store( $book ); - $book = $book->fresh(); - $texts = $book->aggr( 'ownPageList', 'content', 'text' ); - R::nuke(); - asrt( count( $texts ), 2 ); - foreach( $texts as $text ) { - asrt( ( $text instanceof OODBBean), TRUE ); - } - $pages = $book->ownPageList; - asrt( count( $pages ), 2 ); - asrt( R::count( 'page' ), 0 ); - foreach( $pages as $page ) { - asrt( ( $page instanceof OODBBean ), TRUE ); - $text = $page->content; - asrt( ( $text instanceof OODBBean ), TRUE ); - $text->content = 'CHANGED'; - } - foreach( $texts as $text ) { - asrt( $text->content, 'CHANGED' ); - } - } - - /** - * The aggr method can only be used with own-list. - * - * @return void - */ - public function testErrorHandlingAggr() - { - $wrongLists = array( 'not-an-own-list', 'OWNlist', 'Ownpage', 'ownbook', 'own book', '!', 'sharedBook' ); - foreach( $wrongLists as $wrongList ) { - $bean = R::dispense( 'bean' ); - try { - $bean->aggr( $wrongList, 'field' ); - fail(); - } catch ( \Exception $exception ) { - pass(); - asrt( ( $exception instanceof RedException ), TRUE ); - } - } - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php deleted file mode 100644 index 2168a475..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Cursors.php +++ /dev/null @@ -1,92 +0,0 @@ -number = $i; - $page->content = sha1( $i ); - R::store( $page ); - } - $collection = R::findCollection( 'page' ); - asrt( get_class( $collection ), 'RedBeanPHP\BeanCollection'); - $i = 0; - $list = array(); - while( $bean = $collection->next() ) { - asrt( ( $bean instanceof OODBBean ), TRUE ); - asrt( (string) $bean->number, strval( $i ) ); - asrt( $bean->content, sha1( $i ) ); - $list[] = $bean->content; - $i ++; - } - $collection = R::findCollection( 'page', ' ORDER BY content ASC ' ); - sort( $list ); - $i = 0; - while( $bean = $collection->next() ) { - asrt( $bean->content, $list[$i] ); - $i ++; - } - $collection = R::findCollection( 'page', ' ORDER BY content ASC LIMIT 5 ' ); - sort( $list ); - $i = 0; - while( $bean = $collection->next() ) { - asrt( $bean->content, $list[$i] ); - $i ++; - if ( $i > 5 ) break; - } - $key = array_rand( $list ); - $content = $list[ $key ]; - $collection = R::findCollection( 'page', ' content = ? ', array( $content ) ); - $bean = $collection->next(); - asrt( $bean->content, $content ); - $collection->close(); - } - - /** - * Test empty collections (NULLCursor). - * - * @return void - */ - public function testEmptyCollection() - { - R::nuke(); - $page = R::dispense( 'page' ); - $page->content = 'aaa'; - R::store( $page ); - $collection = R::findCollection( 'page' ); - asrt( get_class( $collection ), 'RedBeanPHP\BeanCollection'); - $collection = R::findCollection( 'page', ' content = ?', array( 'bbb' ) ); - asrt( get_class( $collection ), 'RedBeanPHP\BeanCollection'); - asrt( is_null( $collection->next() ), TRUE ); - $collection = R::findCollection( 'something' ); - asrt( get_class( $collection ), 'RedBeanPHP\BeanCollection'); - asrt( is_null( $collection->next() ), TRUE ); - $collection->close(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php deleted file mode 100644 index 60d0b4c8..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Database.php +++ /dev/null @@ -1,393 +0,0 @@ -getDatabase(); - $old = $driver->setMaxIntBind( 10 ); - //use SQLite to confirm... - if ( $this->currentlyActiveDriverID === 'sqlite' ) { - $type = R::getCell( 'SELECT typeof( ? ) ', array( 11 ) ); - asrt( $type, 'text' ); - $type = R::getCell( 'SELECT typeof( ? ) ', array( 10 ) ); - asrt( $type, 'integer' ); - $type = R::getCell( 'SELECT typeof( ? ) ', array( 9 ) ); - asrt( $type, 'integer' ); - } - $new = $driver->setMaxIntBind( $old ); - asrt( $new, 10 ); - try { - $driver->setMaxIntBind( '10' ); - fail(); - } catch( RedException $e ) { - pass(); - } - $new = $driver->setMaxIntBind( $old ); - asrt( $new, $old ); - $new = $driver->setMaxIntBind( $old ); - asrt( $new, $old ); - } - - /** - * Can we use colons in SQL? - * - * @return void - */ - public function testColonsInSQL() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->title = 'About :'; - R::store( $book ); - pass(); - $book = R::findOne( 'book', ' title LIKE :this ', array( - ':this' => 'About :' - ) ); - asrt( ( $book instanceof OODBBean ), TRUE ); - //without the colon? - $book = R::findOne( 'book', ' title LIKE :this ', array( - 'this' => 'About :' - ) ); - asrt( ( $book instanceof OODBBean ), TRUE ); - $book = R::findOne( 'book', ' title LIKE :this ', array( - ':this' => '%:%' - ) ); - asrt( ( $book instanceof OODBBean ), TRUE ); - $book = R::findOne( 'book', ' title LIKE :this OR title LIKE :that', array( - 'this' => '%:%', ':that' => 'That' - ) ); - asrt( ( $book instanceof OODBBean ), TRUE ); - $records = R::getAll('SELECT * FROM book WHERE title LIKE :this', array( ':this' => 'About :' ) ); - asrt( count( $records ), 1 ); - $records = R::getAll('SELECT * FROM book WHERE title LIKE :this', array( 'this' => 'About :' ) ); - asrt( count( $records ), 1 ); - $records = R::getAll('SELECT * FROM book WHERE title LIKE :this OR title LIKE :that', array( ':this' => 'About :', ':that' => 'That' ) ); - asrt( count( $records ), 1 ); - $records = R::getRow('SELECT * FROM book WHERE title LIKE :this', array( ':this' => 'About :' ) ); - asrt( count( $records ), 2 ); - $records = R::getRow('SELECT * FROM book WHERE title LIKE :this', array( 'this' => 'About :' ) ); - asrt( count( $records ), 2 ); - $records = R::getRow('SELECT * FROM book WHERE title LIKE :this OR title LIKE :that', array( ':this' => 'About :', ':that' => 'That' ) ); - asrt( count( $records ), 2 ); - } - - /** - * Test setting direct PDO. - * Not much to test actually. - * - * @return void - */ - public function testDirectPDO() - { - $pdo = R::getDatabaseAdapter()->getDatabase()->getPDO(); - R::getDatabaseAdapter()->getDatabase()->setPDO( $pdo ); - pass(); - } - - /** - * Test for testConnection() method. - * - * @return void - */ - public function testConnectionTester() - { - asrt( R::testConnection(), TRUE ); - } - - /** - * Tests the various ways to fetch (select queries) - * data using adapter methods in the facade. - * Also tests the new R::getAssocRow() method, - * as requested in issue #324. - */ - public function testFetchTypes() - { - R::nuke(); - - $page = R::dispense( 'page' ); - $page->a = 'a'; - $page->b = 'b'; - R::store( $page ); - - $page = R::dispense( 'page' ); - $page->a = 'c'; - $page->b = 'd'; - R::store( $page ); - - $expect = '[{"id":"1","a":"a","b":"b"},{"id":"2","a":"c","b":"d"}]'; - asrt( json_encode( R::getAll( 'SELECT * FROM page' ) ), $expect ); - - $expect = '{"1":"a","2":"c"}'; - asrt( json_encode( R::getAssoc( 'SELECT id, a FROM page' ) ), $expect ); - - $expect = '{"1":{"a":"a","b":"b"},"2":{"a":"c","b":"d"}}'; - asrt( json_encode( R::getAssoc( 'SELECT id, a, b FROM page' ) ), $expect ); - - $expect = '[{"id":"1","a":"a"},{"id":"2","a":"c"}]'; - asrt( json_encode( R::getAssocRow( 'SELECT id, a FROM page' ) ), $expect ); - - $expect = '[{"id":"1","a":"a","b":"b"},{"id":"2","a":"c","b":"d"}]'; - asrt( json_encode( R::getAssocRow( 'SELECT id, a, b FROM page' ) ), $expect ); - - $expect = '{"id":"1","a":"a","b":"b"}'; - asrt( json_encode( R::getRow( 'SELECT * FROM page WHERE id = 1' ) ), $expect ); - - $expect = '"a"'; - asrt( json_encode( R::getCell( 'SELECT a FROM page WHERE id = 1' ) ), $expect ); - - $expect = '"b"'; - asrt( json_encode( R::getCell( 'SELECT b FROM page WHERE id = 1') ), $expect ); - - $expect = '"c"'; - asrt( json_encode( R::getCell('SELECT a FROM page WHERE id = 2') ), $expect ); - - $expect = '["a","c"]'; - asrt( json_encode( R::getCol( 'SELECT a FROM page' ) ), $expect ); - - $expect = '["b","d"]'; - asrt( json_encode( R::getCol('SELECT b FROM page') ), $expect ); - } - - /** - * Tests whether we can store an empty bean. - * An empty bean has no properties, only ID. Normally we would - * skip the ID field in an INSERT, this test forces the driver - * to specify a value for the ID field. Different writers have to - * use different values: Mysql uses NULL to insert a new auto-generated ID, - * while Postgres has to use DEFAULT. - */ - public function testEmptyBean() - { - testpack( 'Test Empty Bean Storage.' ); - R::nuke(); - $bean = R::dispense( 'emptybean' ); - $id = R::store( $bean ); - asrt( ( $id > 0 ), TRUE ); - asrt( R::count( 'emptybean' ), 1 ); - $bean = R::dispense( 'emptybean' ); - $id = R::store( $bean ); - asrt( ( $id > 0 ), TRUE ); - asrt( R::count( 'emptybean' ), 2 ); - //also test in frozen mode - R::freeze( TRUE ); - $bean = R::dispense( 'emptybean' ); - $id = R::store( $bean ); - asrt( ( $id > 0 ), TRUE ); - asrt( R::count( 'emptybean' ), 3 ); - R::freeze( FALSE ); - } - - /** - * Test the database driver and low level functions. - * - * @return void - */ - public function testDriver() - { - $currentDriver = $this->currentlyActiveDriverID; - - R::store( R::dispense( 'justabean' ) ); - - $adapter = new TroubleDapter( R::getToolBox()->getDatabaseAdapter()->getDatabase() ); - - $adapter->setSQLState( 'HY000' ); - - $writer = new SQLiteT( $adapter ); - $redbean = new OODB( $writer ); - $toolbox = new ToolBox( $redbean, $adapter, $writer ); - - // We can only test this for a known driver... - if ( $currentDriver === 'sqlite' ) { - try { - $redbean->find( 'bean' ); - - pass(); - } catch (\Exception $e ) { - var_dump( $e->getSQLState() ); - - fail(); - } - } - - $adapter->setSQLState( -999 ); - - try { - $redbean->find( 'bean' ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - try { - $redbean->wipe( 'justabean' ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - $toolbox = R::getToolBox(); - $adapter = $toolbox->getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $page = $redbean->dispense( "page" ); - - try { - $adapter->exec( "an invalid query" ); - fail(); - } catch ( SQL $e ) { - pass(); - } - - // Special data type description should result in magic number 99 (specified) - if ( $currentDriver == 'mysql' ) { - asrt( $writer->code( MySQL::C_DATATYPE_SPECIAL_DATE ), 99 ); - } - - if ( $currentDriver == 'pgsql' ) { - asrt( $writer->code( PostgreSQL::C_DATATYPE_SPECIAL_DATE ), 99 ); - } - - if ( $currentDriver == 'CUBRID' ) { - asrt( $writer->code( CUBRID::C_DATATYPE_SPECIAL_DATE ), 99 ); - } - - asrt( (int) $adapter->getCell( "SELECT 123" ), 123 ); - - $page->aname = "my page"; - - $id = (int) $redbean->store( $page ); - - asrt( (int) $page->id, 1 ); - asrt( (int) $pdo->GetCell( "SELECT count(*) FROM page" ), 1 ); - asrt( $pdo->GetCell( "SELECT aname FROM page LIMIT 1" ), "my page" ); - asrt( (int) $id, 1 ); - - $page = $redbean->load( "page", 1 ); - - asrt( $page->aname, "my page" ); - asrt( ( (bool) $page->getMeta( "type" ) ), TRUE ); - asrt( isset( $page->id ), TRUE ); - asrt( ( $page->getMeta( "type" ) ), "page" ); - asrt( (int) $page->id, $id ); - } - - /** - * Test selecting. - * - * @return void - */ - public function testSelects() - { - $rooms = R::dispense( 'room', 2 ); - - $rooms[0]->kind = 'suite'; - $rooms[1]->kind = 'classic'; - $rooms[0]->number = 6; - $rooms[1]->number = 7; - - R::store( $rooms[0] ); - R::store( $rooms[1] ); - - $rooms = R::getAssoc('SELECT * FROM room WHERE id < -999'); - asrt(is_array($rooms), TRUE); - asrt(count($rooms), 0); - - $rooms = R::getAssoc( 'SELECT ' . R::getWriter()->esc( 'number' ) . ', kind FROM room ORDER BY kind ASC' ); - - foreach ( $rooms as $key => $room ) { - asrt( ( $key === 6 || $key === 7 ), TRUE ); - asrt( ( $room == 'classic' || $room == 'suite' ), TRUE ); - } - - $rooms = R::getDatabaseAdapter()->getAssoc( 'SELECT kind FROM room' ); - foreach ( $rooms as $key => $room ) { - asrt( ( $room == 'classic' || $room == 'suite' ), TRUE ); - asrt( $room, $key ); - } - - $rooms = R::getAssoc( 'SELECT `number`, kind FROM rooms2 ORDER BY kind ASC' ); - - asrt( count( $rooms ), 0 ); - asrt( is_array( $rooms ), TRUE ); - - // GetCell should return NULL in case of exception - asrt( NULL, R::getCell( 'SELECT dream FROM fantasy' ) ); - } -} - -/** - * Malfunctioning database adapter to test exceptions. - */ -class TroubleDapter extends DBAdapter -{ - private $sqlState; - - public function setSQLState( $sqlState ) - { - $this->sqlState = $sqlState; - } - - public function get( $sql, $values = array() ) - { - $exception = new SQL( 'Just a trouble maker' ); - $exception->setSQLState( $this->sqlState ); - throw $exception; - } - - public function getRow( $sql, $aValues = array() ) - { - $this->get( $sql, $aValues ); - } - - public function exec( $sql, $aValues = array(), $noEvent = FALSE ) - { - $this->get( $sql, $aValues ); - } -} - diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php deleted file mode 100644 index 62c270e8..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dispense.php +++ /dev/null @@ -1,168 +0,0 @@ -dispense( "page" ); - - // Does it have a meta type? - asrt( ( (bool) $page->getMeta( "type" ) ), TRUE ); - - // Does it have an ID? - asrt( isset( $page->id ), TRUE ); - - // Type should be 'page' - asrt( ( $page->getMeta( "type" ) ), "page" ); - - // ID should be 0 because bean does not exist in database yet. - asrt( ( $page->id ), 0 ); - - // Try some faulty dispense actions. - foreach ( array( "", ".", "-") as $value ) { - try { - $redbean->dispense( $value ); - - fail(); - } catch (RedException $e ) { - pass(); - } - } - - $bean = $redbean->dispense( "testbean" ); - - $bean["property"] = 123; - $bean["abc"] = "def"; - - asrt( $bean["property"], 123 ); - asrt( $bean["abc"], "def" ); - asrt( $bean->abc, "def" ); - - asrt( isset( $bean["abd"] ), FALSE ); - asrt( isset( $bean["abc"] ), TRUE ); - } - - /** - * Tests the facade-only dispenseAll method. - * - * @return void - */ - public function testDispenseAll() - { - list( $book, $page ) = Facade::dispenseAll( 'book,page' ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( ( $page instanceof OODBBean ), TRUE ); - asrt( $book->getMeta( 'type' ), 'book'); - asrt( $page->getMeta( 'type' ), 'page'); - - list( $book, $page, $texts, $mark ) = R::dispenseAll( 'book,page,text*2,mark' ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( ( $page instanceof OODBBean ), TRUE ); - asrt( is_array( $texts ), TRUE ); - asrt( ( $mark instanceof OODBBean ), TRUE ); - asrt( $book->getMeta( 'type'), 'book' ); - asrt( $page->getMeta( 'type'), 'page' ); - asrt( $mark->getMeta( 'type'), 'mark' ); - asrt( $texts[0]->getMeta( 'type'), 'text' ); - asrt( $texts[1]->getMeta( 'type'), 'text' ); - - list( $eggs, $milk, $butter ) = R::dispenseAll( 'eggs*3,milk*1,butter*9' ); - asrt( count( $eggs ), 3 ); - asrt( ( $milk instanceof OODBBean ), TRUE ); - asrt( count( $butter ), 9 ); - - list( $eggs, $milk, $butter ) = R::dispenseAll( 'eggs*3,milk*1,butter*9', TRUE ); - asrt( count( $eggs ), 3 ); - asrt( count( $milk ), 1 ); - asrt( count( $eggs ), 3 ); - - list( $beer ) = R::dispenseAll( 'beer*0', TRUE ); - asrt( is_array( $beer ), TRUE ); - asrt( count( $beer ), 0 ); - - list( $beer ) = R::dispenseAll( 'beer*0', FALSE ); - asrt( is_array( $beer ), FALSE ); - asrt( is_null( $beer ), TRUE ); - asrt( count( $beer ), 0 ); - } - - /** - * Tests different return values of dispense(). - * - * @return void - */ - public function testDispenseArray() - { - $oodb = R::getRedBean(); - $array = $oodb->dispense( 'book', 0, TRUE ); - asrt( is_array( $array ), TRUE ); - $array = $oodb->dispense( 'book', 1, TRUE ); - asrt( is_array( $array ), TRUE ); - $array = $oodb->dispense( 'book', 2, TRUE ); - asrt( is_array( $array ), TRUE ); - $array = R::dispense( 'book', 0, TRUE ); - asrt( is_array( $array ), TRUE ); - $array = R::dispense( 'book', 1, TRUE ); - asrt( is_array( $array ), TRUE ); - $array = R::dispense( 'book', 2, TRUE ); - asrt( is_array( $array ), TRUE ); - - $array = $oodb->dispense( 'book', 0, FALSE ); - asrt( is_array( $array ), FALSE ); - asrt( is_null( $array ), TRUE ); - $array = $oodb->dispense( 'book', 1, FALSE ); - asrt( is_array( $array ), FALSE ); - asrt( ( $array instanceof OODBBean ), TRUE ); - $array = $oodb->dispense( 'book', 2, FALSE ); - asrt( is_array( $array ), TRUE ); - $array = R::dispense( 'book', 0, FALSE ); - asrt( is_array( $array ), FALSE ); - $array = R::dispense( 'book', 1, FALSE ); - asrt( is_array( $array ), FALSE ); - $array = R::dispense( 'book', 2, FALSE ); - asrt( is_array( $array ), TRUE ); - - $array = $oodb->dispense( 'book', 0 ); - asrt( is_array( $array ), FALSE ); - asrt( is_null( $array ), TRUE ); - $array = $oodb->dispense( 'book', 1 ); - asrt( is_array( $array ), FALSE ); - asrt( ( $array instanceof OODBBean ), TRUE ); - $array = $oodb->dispense( 'book', 2 ); - asrt( is_array( $array ), TRUE ); - $array = R::dispense( 'book', 0 ); - asrt( is_array( $array ), FALSE ); - $array = R::dispense( 'book', 1 ); - asrt( is_array( $array ), FALSE ); - $array = R::dispense( 'book', 2 ); - asrt( is_array( $array ), TRUE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php deleted file mode 100644 index d352b720..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Dup.php +++ /dev/null @@ -1,758 +0,0 @@ -xownPageList[] = R::dispense( 'page' ); - R::store( $book ); - $bookID = $book->id; - $page = reset( $book->xownPageList ); - $pageID = $page->id; - $book = $book->fresh(); - $copy = R::duplicate( $book ); - asrt( $copy->getMeta( 'sys.dup-from-id' ), $bookID ); - $copyPage = reset( $copy->xownPageList ); - asrt( $copyPage->getMeta( 'sys.dup-from-id' ), $pageID ); - } - - /** - * Test export camelCase. - * - * @return void - */ - public function testExportCamelCase() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->isCheap = true; - $book->hasISBNCode = false; - $page = R::dispense('page'); - $page->isWrittenWell = true; - $page->containsInterestingText = true; - $book->ownPageList[] = $page; - R::store( $book ); - $book = $book->fresh(); - $export = R::exportAll( $book ); - - asrt( isset( $export[0]['id'] ), true ); - asrt( isset( $export[0]['is_cheap'] ), true ); - asrt( isset( $export[0]['has_isbn_code'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['id'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['is_written_well'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['contains_interesting_text'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['book_id'] ), true ); - - R::useExportCase( 'camel' ); - $export = R::exportAll( $book ); - asrt( isset( $export[0]['id'] ), true ); - asrt( isset( $export[0]['isCheap'] ), true ); - asrt( isset( $export[0]['hasIsbnCode'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['id'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['isWrittenWell'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['containsInterestingText'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['bookId'] ), true ); - - R::useExportCase( 'dolphin' ); - $export = R::exportAll( $book ); - asrt( isset( $export[0]['id'] ), true ); - asrt( isset( $export[0]['isCheap'] ), true ); - asrt( isset( $export[0]['hasIsbnCode'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['id'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['isWrittenWell'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['containsInterestingText'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['bookID'] ), true ); - - R::useExportCase( 'default' ); - $export = R::exportAll( $book ); - asrt( isset( $export[0]['id'] ), true ); - asrt( isset( $export[0]['is_cheap'] ), true ); - asrt( isset( $export[0]['has_isbn_code'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['id'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['is_written_well'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['contains_interesting_text'] ), true ); - asrt( isset( $export[0]['ownPage']['0']['book_id'] ), true ); - - try { - R::useExportCase( 'invalid' ); - fail(); - } catch ( RedException $exception ) { - pass(); - } - } - - /** - * Test whether we can duplicate part of a tree - * without infinite loops. - * - * @return void - */ - public function testDupPortionOfATree() - { - R::nuke(); - $article = R::dispense( 'article' ); - $article->name = 'article 1'; - list( $article2, $article3 ) = R::dispense( 'article', 2 ); - $article2->name = 'article 2'; - $article3->name = 'article 3'; - list( $article4, $article5 ) = R::dispense( 'article' , 2); - $article4->name = 'article 4'; - $article5->name = 'article 5'; - list( $article6, $article7 ) = R::dispense( 'article' , 2); - $article6->name = 'article 6'; - $article7->name = 'article 7'; - $article3->xownArticleList[] = $article7; - $article4->xownArticleList[] = $article6; - $article2->xownArticleList = array( $article5, $article4 ); - $article->xownArticleList = array( $article2, $article3 ); - R::store( $article ); - asrt( R::count( 'article' ), 7 ); - $article2 = $article2->fresh(); - $dupArticle2 = R::duplicate( $article2 ); - $dupArticle2->name = 'article 2b'; - $dupBeans = $dupArticle2->xownArticleList; - foreach( $dupBeans as $dupBean ) { - $list[] = $dupBean->name; - } - sort( $list ); - $listStr = implode( ',', $list ); - asrt( $listStr, 'article 4,article 5' ); - foreach( $dupBeans as $dupBean ) { - if ( $dupBean->name === 'article 4' ) { - $dup4 = $dupBean; - } - } - asrt( isset( $dup4 ), TRUE ); - $dupBeans = $dup4->xownArticleList; - foreach( $dupBeans as $dupBean ) { - asrt( $dupBean->name, 'article 6' ); - } - - //so we have extracted part of the tree, can we store it? - $id = R::store( $dupArticle2 ); - asrt( ( $id > 0 ), TRUE ); - asrt( R::count( 'article' ), 11 ); - - $originalArticle = $article->fresh(); - asrt( $originalArticle->name, 'article 1' ); - - $subArticles = $originalArticle->xownArticleList; - $list = array(); - foreach( $subArticles as $subArticle ) { - $list[] = $subArticle->name; - } - sort( $list ); - $listStr = implode( ',', $list ); - asrt( $listStr, 'article 2,article 2b,article 3' ); - - foreach( $subArticles as $subArticle ) { - if ( $subArticle->name === 'article 2' ) { - $sub2 = $subArticle; - } - if ( $subArticle->name === 'article 3' ) { - $sub3 = $subArticle; - } - } - - $subArticles = $sub2->xownArticleList; - $list = array(); - foreach( $subArticles as $subArticle ) { - $list[] = $subArticle->name; - } - sort( $list ); - $listStr = implode( ',', $list ); - asrt( $listStr, 'article 4,article 5' ); - - $subArticles = $sub3->xownArticleList; - $list = array(); - foreach( $subArticles as $subArticle ) { - $list[] = $subArticle->name; - } - sort( $list ); - $listStr = implode( ',', $list ); - asrt( $listStr, 'article 7' ); - - $subArticles = $sub2->xownArticleList; - foreach( $subArticles as $subArticle ) { - if ( $subArticle->name === 'article 4' ) { - $sub4 = $subArticle; - } - if ( $subArticle->name === 'article 5' ) { - $sub5 = $subArticle; - } - } - - asrt( count( $sub4->xownArticleList ), 1 ); - $subBeans = $sub4->xownArticleList; - $subBean = reset( $subBeans ); - asrt( $subBean->name, 'article 6'); - - asrt( count( $sub5->xownArticleList ), 0 ); - - $dupArticle2 = $dupArticle2->fresh(); - $subArticles = $dupArticle2->xownArticleList; - $list = array(); - foreach( $subArticles as $subArticle ) { - $list[] = $subArticle->name; - } - sort( $list ); - $listStr = implode( ',', $list ); - asrt( $listStr, 'article 4,article 5' ); - - foreach( $subArticles as $subArticle ) { - if ( $subArticle->name === 'article 4' ) { - $sub4 = $subArticle; - } - if ( $subArticle->name === 'article 5' ) { - $sub5 = $subArticle; - } - } - - asrt( count( $sub4->xownArticleList ), 1 ); - $subBeans = $sub4->xownArticleList; - $subBean = reset( $subBeans ); - asrt( $subBean->name, 'article 6'); - - asrt( count( $sub5->xownArticleList ), 0 ); - } - - /** - * Test exportAll and caching. - * - * @return void - */ - public function testExportAllAndCache() - { - testpack( 'exportAll() and Cache' ); - - $can = R::dispense( 'can' )->setAttr( 'size', 3 ); - - $can->ownCoffee[] = R::dispense( 'coffee' )->setAttr( 'color', 'black' ); - $can->sharedTag[] = R::dispense( 'tag' )->setAttr( 'name', 'cool' ); - - $id = R::store( $can ); - - R::debug( TRUE ); - - ob_start(); - - $can = R::load( 'can', $id ); - - $cache = $this->getCache(); - - $data = R::exportAll( array( $can ), TRUE ); - - $queries = ob_get_contents(); - - R::debug( FALSE ); - ob_end_clean(); - $len1 = strlen( $queries ); - - $can = R::dispense( 'can' )->setAttr( 'size', 3 ); - $can->ownCoffee[] = R::dispense( 'coffee' )->setAttr( 'color', 'black' ); - $can->sharedTag[] = R::dispense( 'tag' )->setAttr( 'name', 'cool' ); - - $id = R::store( $can ); - - R::debug( TRUE ); - - ob_start(); - - $can = R::load( 'can', $id ); - - $cache = $this->getCache(); - - $data = R::exportAll( array( $can ), TRUE ); - - $queries = ob_get_contents(); - - R::debug( FALSE ); - - ob_end_clean(); - - $len2 = strlen( $queries ); - - asrt( ( $len1 ), ( $len2 ) ); - - $can = R::dispense( 'can' )->setAttr( 'size', 3 ); - - $can->ownCoffee[] = R::dispense( 'coffee' )->setAttr( 'color', 'black' ); - $can->sharedTag[] = R::dispense( 'tag' )->setAttr( 'name', 'cool' ); - - $id = R::store( $can ); - - R::debug( TRUE ); - - ob_start(); - - $can = R::load( 'can', $id ); - - $cache = $this->getCache(); - - R::getDuplicationManager()->setTables( $cache ); - - $data = R::exportAll( array( $can ), TRUE ); - - $queries = ob_get_contents(); - - R::debug( FALSE ); - - ob_end_clean(); - - $len3 = strlen( $queries ); - - asrt( ( ( $len3 ) < ( $len2 ) ), TRUE ); - asrt( count( $data ), 1 ); - asrt( $data[0]['ownCoffee'][0]['color'], 'black' ); - - R::getDuplicationManager()->setCacheTables( FALSE ); - } - - /** - * Test duplication and caching. - * - * @return void - */ - public function DupAndCache() - { - testpack( 'Dup() and Cache' ); - - $can = R::dispense( 'can' )->setAttr( 'size', 3 ); - - $can->ownCoffee[] = R::dispense( 'coffee' )->setAttr( 'color', 'black' ); - $can->sharedTag[] = R::dispense( 'tag' )->setAttr( 'name', 'cool' ); - - $can = R::load( 'can', R::store( $can ) ); - - $d = new DuplicationManager( R::getToolBox() ); - - $d->setCacheTables( TRUE ); - - ob_start(); - - R::debug( 1 ); - - $x = $d->dup( $can ); - - $queries = ob_get_contents(); - - R::debug( 0 ); - - ob_end_clean(); - - $len1 = strlen( $queries ); - - asrt( ( $len1 > 40 ), TRUE ); - asrt( isset( $x->ownCoffee ), TRUE ); - asrt( count( $x->ownCoffee ), 1 ); - asrt( isset( $x->sharedTag ), TRUE ); - asrt( count( $x->sharedTag ), 1 ); - - $cache = $d->getSchema(); - - R::nuke(); - - $can = R::dispense( 'can' )->setAttr( 'size', 3 ); - - $can->ownCoffee[] = R::dispense( 'coffee' )->setAttr( 'color', 'black' ); - $can->sharedTag[] = R::dispense( 'tag' )->setAttr( 'name', 'cool' ); - - $can = R::load( 'can', R::store( $can ) ); - - $d = new DuplicationManager( R::getToolBox() ); - - /** - * $cache = '{"book": { - * "id": "INTEGER", - * "title": "TEXT" - * }, "bean": { - * "id": "INTEGER", - * "prop": "INTEGER" - * }, "pessoa": { - * "id": "INTEGER", - * "nome": "TEXT", - * "nome_meio": "TEXT", - * "sobrenome": "TEXT", - * "nascimento": "NUMERIC", - * "reg_owner": "TEXT" - * }, "documento": { - * "id": "INTEGER", - * "nome_documento": "TEXT", - * "numero_documento": "TEXT", - * "reg_owner": "TEXT", - * "ownPessoa_id": "INTEGER" - * }, "can": { - * "id": "INTEGER", - * "size": "INTEGER" - * }, "coffee": { - * "id": "INTEGER", - * "color": "TEXT", - * "can_id": "INTEGER" - * }, "tag": { - * "id": "INTEGER", - * "name": "TEXT" - * }, "can_tag": { - * "id": "INTEGER", - * "tag_id": "INTEGER", - * "can_id": "INTEGER" - * }}' - */ - - $d->setTables( $cache ); - - ob_start(); - - R::debug( 1 ); - - $x = $d->dup( $can ); - - $queries = ob_get_contents(); - - ob_end_clean(); - - R::debug( 0 ); - - $len2 = strlen( $queries ); - - asrt( isset( $x->ownCoffee ), TRUE ); - asrt( count( $x->ownCoffee ), 1 ); - asrt( isset( $x->sharedTag ), TRUE ); - asrt( count( $x->sharedTag ), 1 ); - asrt( json_encode( $cache ), json_encode( $d->getSchema() ) ); - asrt( ( $len1 > $len2 ), TRUE ); - } - - /** - * Test duplication and tainting. - * - * @return void - */ - public function testDupAndExportNonTainting() - { - testpack( 'Dup() and Export() should not taint beans' ); - - $p = R::dispense( 'page' ); - $b = R::dispense( 'book' ); - - $b->ownPage[] = $p; - $b->title = 'a'; - - $id = R::store( $b ); - - $b = R::load( 'book', $id ); - - asrt( ( !$b->getMeta( 'tainted' ) ), TRUE ); - - R::exportAll( $b ); - - asrt( ( !$b->getMeta( 'tainted' ) ), TRUE ); - - R::dup( $b ); - - asrt( ( !$b->getMeta( 'tainted' ) ), TRUE ); - - testpack( 'Test issue with ownItems and stealing Ids.' ); - - R::nuke(); - $bill = R::dispense( 'bill' ); - $item = R::dispense( 'item' ); - $element = R::dispense( 'element' ); - $bill->ownItem[] = $item; - $bill->sharedElement[] = $element; - R::store( $bill ); - $bill = R::load( 'bill', 1 ); - $bill->ownItem; - $bill->sharedElement; - $copy = R::dup( $bill ); - R::store( $copy ); - - $rows = ( R::getAll( 'select * from bill_element' ) ); - asrt( count( $rows ), 2 ); - - $rows = ( R::getAll( 'select * from item' ) ); - - foreach ( $rows as $row ) { - asrt( ( $row['bill_id'] > 0 ), TRUE ); - } - - R::nuke(); - - $this->runOnce(); - - R::freeze( TRUE ); - - $this->runOnce( FALSE ); - - R::freeze( FALSE ); - } - - /** - * Test exporting with filters. - * - * @return void - */ - public function ExportWithFilters() - { - testpack( 'Export with filters' ); - - $book = R::dispense( 'book' ); - $pages = R::dispense( 'page', 2 ); - $texts = R::dispense( 'text', 2 ); - $images = R::dispense( 'image', 2 ); - $author = R::dispense( 'author' ); - $pub = R::dispense( 'publisher' ); - $bookmarks = R::dispense( 'bookmark', 2 ); - - $pages[0]->ownText = array( $texts[0] ); - $pages[0]->ownImage = array( $images[0] ); - $pages[1]->ownText = array( $texts[1] ); - $pages[1]->ownImage = array( $images[1] ); - - $pages[0]->sharedBookmark[] = $bookmarks[0]; - $pages[1]->sharedBookmark[] = $bookmarks[1]; - - $bookmarks[0]->ownNote[] = R::dispense( 'note' )->setAttr( 'text', 'a note' ); - $bookmarks[1]->ownNote[] = R::dispense( 'note' )->setAttr( 'text', 'a note' ); - - $book->ownPage = $pages; - $book->author = $author; - - $author->publisher = $pub; - $bookID = R::store( $book ); - - R::getDuplicationManager()->setTables( R::getWriter()->getTables() ); - - $objects = ( R::exportAll( array( $book ), TRUE, array() ) ); - - asrt( isset( $objects[0]['ownPage'] ), TRUE ); - asrt( count( $objects[0]['ownPage'] ), 2 ); - asrt( isset( $objects[0]['author'] ), TRUE ); - asrt( isset( $objects[0]['ownPage'][0]['ownText'] ), TRUE ); - asrt( count( $objects[0]['ownPage'][0]['ownText'] ), 1 ); - asrt( isset( $objects[0]['ownPage'][0]['ownImage'] ), TRUE ); - asrt( count( $objects[0]['ownPage'][0]['ownImage'] ), 1 ); - - $objects = ( R::exportAll( array( $book ), TRUE, array( 'page', 'author', 'text', 'image' ) ) ); - - asrt( isset( $objects[0]['ownPage'] ), TRUE ); - asrt( count( $objects[0]['ownPage'] ), 2 ); - asrt( isset( $objects[0]['author'] ), TRUE ); - asrt( isset( $objects[0]['ownPage'][0]['ownText'] ), TRUE ); - asrt( count( $objects[0]['ownPage'][0]['ownText'] ), 1 ); - asrt( isset( $objects[0]['ownPage'][0]['ownImage'] ), TRUE ); - asrt( count( $objects[0]['ownPage'][0]['ownImage'] ), 1 ); - - $objects = ( R::exportAll( array( $book ), TRUE, 'author' ) ); - - asrt( isset( $objects[0]['ownPage'] ), FALSE ); - asrt( isset( $objects[0]['ownPage'][0]['ownText'] ), FALSE ); - - $objects = ( R::exportAll( array( $book ), TRUE, array( 'page' ) ) ); - - asrt( isset( $objects[0]['author'] ), FALSE ); - asrt( isset( $objects[0]['ownPage'][0]['ownText'] ), FALSE ); - - $objects = ( R::exportAll( array( $book ), TRUE, array( 'page', 'text' ) ) ); - - asrt( isset( $objects[0]['author'] ), FALSE ); - asrt( isset( $objects[0]['ownPage'] ), TRUE ); - asrt( isset( $objects[0]['ownPage'][0]['ownText'] ), TRUE ); - asrt( count( $objects[0]['ownPage'][0]['ownText'] ), 1 ); - asrt( isset( $objects[0]['ownPage'][0]['ownImage'] ), FALSE ); - - $objects = ( R::exportAll( array( $book ), TRUE, array( 'none' ) ) ); - - asrt( isset( $objects[0]['author'] ), FALSE ); - asrt( isset( $objects[0]['ownPage'] ), FALSE ); - - $texts = R::find( 'text' ); - - R::getDuplicationManager()->setCacheTables( FALSE ); - - testpack( 'Keyless export' ); - - $book = R::load( 'book', $bookID ); - - $book->ownPage; - - $export = $book->export(); - - asrt( isset( $export['ownPage'][0] ), TRUE ); - - } - - /** - * Helper function getCache(). - * - * @return array - */ - private function getCache() - { - return array( - 'coffee' => array( - 'color' => 'color', - 'id' => 'id', - 'can_id' => 'can_id' - ), - 'can' => array( - 'size' => 'size', - 'id' => 'id' - ), - 'can_tag' => array( - 'id' => 'id', - 'can_id' => 'can_id', - 'tag_id' => 'tag_id' - ), - 'tag' => array( - 'id' => 'id', - 'name' => 'name' ) - ); - } - - /** - * Compares object with export - * - * @param type $object - * @param type $array - */ - private function compare( $object, $array ) - { - foreach ( $object as $property => $value ) { - if ( is_array( $value ) ) { - foreach ( $value as $index => $nestedObject ) { - if ( $nestedObject->id ) { - $foundMatch = FALSE; - //order might be different - foreach ( $array[$property] as $k => $a ) { - if ( $a['id'] == $nestedObject->id ) { - $foundMatch = TRUE; - $index = $k; - } - } - if ( !$foundMatch ) throw new\Exception( 'failed to find match for object ' . $nestedObject->id ); - } - $this->compare( $nestedObject, $array[$property][$index] ); - } - } elseif ( !is_object( $value ) ) { - asrt( strval( $array[$property] ), strval( $value ) ); - } - } - } - - /** - * Run tests - */ - private function runOnce( $n = TRUE ) - { - - $books = R::dispense( 'book', 10 ); - $pages = R::dispense( 'page', 10 ); - $readers = R::dispense( 'reader', 10 ); - $texts = R::dispense( 'text', 10 ); - - $i = 0; - foreach ( $books as $book ) $book->name = 'book-' . ( $i++ ); - $i = 0; - foreach ( $pages as $page ) $page->name = 'page-' . ( $i++ ); - $i = 0; - foreach ( $readers as $reader ) $reader->name = 'reader-' . ( $i++ ); - $i = 0; - foreach ( $texts as $text ) $text->content = 'lorem ipsum -' . ( $i++ ); - - foreach ( $texts as $text ) { - $pages[array_rand( $pages )]->ownText[] = $text; - } - foreach ( $pages as $page ) { - $books[array_rand( $books )]->ownPage[] = $page; - } - foreach ( $readers as $reader ) { - $books[array_rand( $books )]->sharedReader[] = $reader; - } - $i = $noOfReaders = $noOfPages = $noOfTexts = 0; - foreach ( $books as $key => $book ) { - $i++; - $noOfPages += count( $book->ownPage ); - $noOfReaders += count( $book->sharedReader ); - foreach ( $book->ownPage as $page ) $noOfTexts += count( $page->ownText ); - $arr = R::exportAll( $book ); - echo "\nIntermediate info: " . json_encode( $arr ) . ": Totals = $i,$noOfPages,$noOfReaders,$noOfTexts "; - - $this->compare( $book, $arr[0] ); - $copiedBook = R::dup( $book ); - $copiedBookArray = R::exportAll( $copiedBook ); - $this->compare( $book, $copiedBookArray[0] ); - $copiedBookArrayII = $copiedBook->export(); - $this->compare( $book, $copiedBookArrayII ); - $copyFromCopy = R::dup( $copiedBook ); - $copyFromCopyArray = R::exportAll( $copyFromCopy ); - $this->compare( $book, $copyFromCopyArray[0] ); - $copyFromCopyArrayII = $copyFromCopy->export(); - $this->compare( $book, $copyFromCopyArrayII ); - $id = R::store( $book ); - $copiedBook = R::dup( $book ); - R::store( $book ); //should not be damaged - $copiedBookArray = R::exportAll( $copiedBook ); - $originalBookArray = R::exportAll( $book ); - $this->compare( $copiedBook, $copiedBookArray[0] ); - $this->compare( $book, $originalBookArray[0] ); - $book = R::load( 'book', $id ); - $this->compare( $book, $originalBookArray[0] ); - $copiedBook = R::dup( $book ); - $this->compare( $copiedBook, $copiedBook->export() ); - R::store( $copiedBook ); - $this->compare( $copiedBook, $copiedBook->export() ); - $copyFromCopy = R::dup( $copiedBook ); - $this->compare( $copyFromCopy, $copyFromCopy->export() ); - R::store( $copyFromCopy ); - $newPage = R::dispense( 'page' ); - $newPage->name = 'new'; - $copyFromCopy->ownPage[] = $newPage; - $modifiedCopy = R::dup( $copyFromCopy ); - $exportMod = R::exportAll( $modifiedCopy ); - $this->compare( $modifiedCopy, $exportMod[0] ); - asrt( count( $modifiedCopy->ownPage ), count( $copiedBook->ownPage ) + 1 ); - R::store( $modifiedCopy ); - - if ( $n ) { - asrt( (int) R::getCell( 'SELECT count(*) FROM book' ), $i * 4 ); - asrt( (int) R::getCell( 'SELECT count(*) FROM page' ), ( $noOfPages * 4 ) + $i ); - asrt( (int) R::getCell( 'SELECT count(*) FROM text' ), $noOfTexts * 4 ); - asrt( (int) R::getCell( 'SELECT count(*) FROM book_reader' ), $noOfReaders * 4 ); - asrt( (int) R::getCell( 'SELECT count(*) FROM reader' ), $noOfReaders ); - } - } - - if ( $n ) { - asrt( $noOfTexts, 10 ); - asrt( $noOfReaders, 10 ); - asrt( $noOfPages, 10 ); - asrt( $i, 10 ); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Facade.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Facade.php deleted file mode 100644 index 91a5c3b2..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Facade.php +++ /dev/null @@ -1,173 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - $a = new AssociationManager( $toolbox ); - - asrt( R::getRedBean() instanceof OODB, TRUE ); - asrt( R::getToolBox() instanceof ToolBox, TRUE ); - asrt( R::getDatabaseAdapter() instanceof Adapter, TRUE ); - asrt( R::getWriter() instanceof QueryWriter, TRUE ); - - $book = R::dispense( "book" ); - - asrt( $book instanceof OODBBean, TRUE ); - - $book->title = "a nice book"; - - $id = R::store( $book ); - - asrt( ( $id > 0 ), TRUE ); - - $book = R::load( "book", (int) $id ); - - asrt( $book->title, "a nice book" ); - - asrt( R::load( 'book', 999 )->title, NULL ); - - R::freeze( TRUE ); - - try { - R::load( 'bookies', 999 ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - R::freeze( FALSE ); - - $author = R::dispense( "author" ); - - $author->name = "me"; - - R::store( $author ); - - $book9 = R::dispense( "book" ); - $author9 = R::dispense( "author" ); - - $author9->name = "mr Nine"; - - $a9 = R::store( $author9 ); - - $book9->author_id = $a9; - - $bk9 = R::store( $book9 ); - - $book9 = R::load( "book", $bk9 ); - $author = R::load( "author", $book9->author_id ); - - asrt( $author->name, "mr Nine" ); - - R::trash( $author ); - R::trash( $book9 ); - - pass(); - - $book2 = R::dispense( "book" ); - - $book2->title = "second"; - - R::store( $book2 ); - - $book3 = R::dispense( "book" ); - - $book3->title = "third"; - - R::store( $book3 ); - - asrt( count( R::find( "book" ) ), 3 ); - asrt( count( R::findAll( "book" ) ), 3 ); - asrt( count( R::findAll( "book", " LIMIT 2" ) ), 2 ); - - asrt( count( R::find( "book", " id=id " ) ), 3 ); - asrt( count( R::find( "book", " title LIKE ?", array( "third" ) ) ), 1 ); - asrt( count( R::find( "book", " title LIKE ?", array( "%d%" ) ) ), 2 ); - - // Find without where clause - asrt( count( R::findAll( 'book', ' order by id' ) ), 3 ); - - R::trash( $book3 ); - R::trash( $book2 ); - - asrt( count( R::getAll( "SELECT * FROM book " ) ), 1 ); - asrt( count( R::getCol( "SELECT title FROM book " ) ), 1 ); - - asrt( (int) R::getCell( "SELECT 123 " ), 123 ); - - $book = R::dispense( "book" ); - - $book->title = "not so original title"; - - $author = R::dispense( "author" ); - - $author->name = "Bobby"; - - R::store( $book ); - - $aid = R::store( $author ); - - $author = R::findOne( "author", " name = ? ", array( "Bobby" ) ); - - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php deleted file mode 100644 index a5d309fd..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Finding.php +++ /dev/null @@ -1,858 +0,0 @@ -color; - if ( !$noSort) sort( $colors ); - return implode( ',', $colors ); - } - - /** - * Inserts data for findMulti-tests. - * - * @return void - */ - private function insertBookData() - { - list( $books, $pages, $texts, $categories ) = R::dispenseAll( 'book*5,page*25,text*60,category*3' ); - $texts[0]->content = 'C is a beautiful language.'; - $texts[1]->content = 'But also a bit dangerous.'; - $texts[2]->content = 'You need to know what you are doing.'; - $texts[3]->content = 'Javascript is very flexible.'; - $texts[4]->content = 'It can be anything you want...'; - $texts[5]->content = 'But it can lead to chaos.'; - $texts[6]->content = 'CSS was meant for documents'; - $texts[7]->content = 'Now we use it for applications...'; - $texts[8]->content = 'PHP is an easy language to learn,'; - $texts[9]->content = 'Maybe a bit too easy...'; - $texts[10]->content = 'SQL is much more powerful than you think.'; - $pages[0]->ownTextList = array( $texts[0], $texts[1] ); - $pages[1]->ownTextList = array( $texts[2] ); - $pages[2]->ownTextList = array( $texts[3] ); - $pages[3]->ownTextList = array( $texts[4] ); - $pages[4]->ownTextList = array( $texts[5] ); - $pages[5]->ownTextList = array( $texts[6], $texts[7] ); - $pages[6]->ownTextList = array( $texts[8] ); - $pages[7]->ownTextList = array( $texts[9] ); - $pages[8]->ownTextList = array( $texts[10] ); - $books[0]->ownPageList = array( $pages[0], $pages[1] ); - $books[1]->ownPageList = array( $pages[2], $pages[3], $pages[4] ); - $books[2]->ownPageList = array( $pages[5] ); - $books[3]->ownPageList = array( $pages[6], $pages[7] ); - $books[4]->ownPageList = array( $pages[8] ); - $books[0]->title = 'Diehard C'; - $books[1]->title = 'Adventures in JavaScript'; - $books[2]->title = 'CSS ala Picasso'; - $books[3]->title = 'PHP Tips and Tricks'; - $books[4]->title = 'Secrets of SQL'; - $categories[0]->name = 'Programming'; - $categories[1]->name = 'Design'; - $categories[2]->name = 'Web Development'; - $books[0]->sharedCategoryList = array( $categories[0] ); - $books[1]->sharedCategoryList = array( $categories[0], $categories[2] ); - $books[2]->sharedCategoryList = array( $categories[0], $categories[2], $categories[1] ); - $books[3]->sharedCategoryList = array( $categories[0], $categories[2] ); - $books[4]->sharedCategoryList = array( $categories[0], $categories[2] ); - R::storeAll( $books ); - } - - /** - * A custom record-to-bean mapping function for findMulti test. - * - * @param string $parentName name of the parent bean - * @param string $childName name of the child bean - * - * @return array - */ - private function map($parentName,$childName) { - return array( - 'a' => $parentName, - 'b' => $childName, - 'matcher' => function( $parent, $child ) use ( $parentName ) { - $property = "{$parentName}ID"; - return ( $child->$property == $parent->id ); - }, - 'do' => function( $parent, $child ) use ( $childName ) { - $list = 'own'.ucfirst( $childName ).'List'; - $parent->noLoad()->{$list}[] = $child; - } - ); - } - - /** - * FindMulti should not throw errors in case of - * a record-type mismatch. - * - * @return void - */ - public function testFindMultiErrorHandling() - { - $result = R::findMulti('a,b', array()); - asrt( is_array( $result ), TRUE ); - asrt( count( $result ), 2 ); - asrt( isset( $result['a'] ), TRUE ); - asrt( isset( $result['b'] ), TRUE ); - asrt( is_array( $result['a'] ), TRUE ); - asrt( is_array( $result['b'] ), TRUE ); - asrt( count( $result['a'] ), 0 ); - asrt( count( $result['b'] ), 0 ); - pass(); - $result = R::findMulti( 'book', array( - array( 'book__title' => 'The missing ID.' ) - ) ); - asrt( is_array( $result ), TRUE ); - asrt( count( $result ), 1 ); - asrt( isset( $result['book'] ), TRUE ); - asrt( is_array( $result['book'] ), TRUE ); - asrt( count( $result['book'] ), 0 ); - pass(); - } - - /** - * You can build your own mapping functions to remap records to bean. - * Just like the preloader once did. However now you can define the - * mapping yourself using closures. This test verifies that such a - * function would actually work. - * - * This method also tests whether empty records (resulting from LEFT JOINS for - * instance) do not produce unnecessary, empty beans. - * - * @return void - */ - public function testFindMultiExtFunc() - { - R::nuke(); - $shop = R::dispense( 'shop' ); - $shop2 = R::dispense( 'shop' ); - $products = R::dispense( 'product', 3 ); - $price = R::dispense( 'price' ); - $price->tag = 5; - $products[0]->name = 'vase'; - $products[1]->name = 'candle'; - $products[2]->name = 'plate'; - $products[1]->ownPriceList[] = $price; - $shop->ownProduct[] = $products[0]; - $shop->ownProduct[] = $products[1]; - $shop2->ownProduct[] = $products[2]; - R::storeAll( array( $shop, $shop2 ) ); - $collection = R::findMulti( 'shop,product,price', ' - SELECT shop.*, product.*, price.* FROM shop - LEFT JOIN product ON product.shop_id = shop.id - LEFT JOIN price ON price.product_id = product.id - ', array(), array( - '0' => $this->map( 'shop', 'product' ), - '1' => $this->map( 'product', 'price' ), - )); - asrt( is_array( $collection ), TRUE ); - asrt( count( $collection ), 3 ); - asrt( count( $collection['shop'] ), 2 ); - asrt( count( $collection['product'] ), 3 ); - asrt( count( $collection['price'] ), 1 ); - $shop = reset( $collection['shop'] ); - asrt( count( $shop->ownProductList ), 2 ); - $shop2 = next( $collection['shop'] ); - asrt( count( $shop2->ownProductList ), 1 ); - $candle = NULL; - foreach( $shop->ownProduct as $product ) { - if ( $product->name == 'candle' ) { - $candle = $product; - } - } - asrt( is_null( $candle ), FALSE ); - asrt( count( $candle->ownPrice ), 1 ); - asrt( $candle->name, 'candle' ); - $price = reset( $candle->ownPrice ); - asrt( (int) $price->tag, 5 ); - } - - /** - * Test findMuli with self-made arrays. - * - * @return void - */ - public function testFindMultiDirectArray() - { - R::nuke(); - $collection = R::findMulti( 'shop,product', array( - array( 'shop__id' => 1, 'product__id' => 1, 'product__name' => 'vase', 'product__shop_id' => 1 ), - array( 'shop__id' => 1, 'product__id' => 2, 'product__name' => 'candle', 'product__shop_id' => 1 ), - array( 'shop__id' => 1, 'product__id' => 3, 'product__name' => 'plate', 'product__shop_id' => 1 ), - ) ); - asrt( is_array( $collection ), TRUE ); - asrt( isset( $collection['shop'] ), TRUE ); - asrt( isset( $collection['product'] ), TRUE ); - asrt( (int) $collection['shop'][1]->id, 1 ); - asrt( (int) $collection['product'][1]->id, 1 ); - asrt( (int) $collection['product'][2]->id, 2 ); - asrt( (int) $collection['product'][3]->id, 3 ); - asrt( (int) $collection['product'][1]->shopID, 1 ); - asrt( (int) $collection['product'][2]->shopID, 1 ); - asrt( (int) $collection['product'][3]->shopID, 1 ); - asrt( $collection['product'][1]->name, 'vase' ); - asrt( $collection['product'][2]->name, 'candle' ); - asrt( $collection['product'][3]->name, 'plate' ); - R::nuke(); - $shop = R::dispense('shop'); - $shop2 = R::dispense('shop'); - $products = R::dispense('product', 3); - $price = R::dispense('price'); - $price->tag = 5; - $products[0]->name = 'vase'; - $products[1]->name = 'candle'; - $products[2]->name = 'plate'; - $products[1]->ownPriceList[] = $price; - $shop->ownProduct = $products; - R::store($shop); - $collection = R::findMulti('shop,product,price', ' - SELECT shop.*, product.*, price.* FROM shop - LEFT JOIN product ON product.shop_id = shop.id - LEFT JOIN price ON price.product_id = product.id - ', array(), array( - '0' => $this->map('shop', 'product'), - '1' => $this->map('product', 'price'), - )); - $collection = R::findMulti( 'shop,product', array( - array( 'shop__id' => 1, 'product__id' => 1, 'product__name' => 'vase', 'product__shop_id' => 1 ), - array( 'shop__id' => 1, 'product__id' => 2, 'product__name' => 'candle', 'product__shop_id' => 1 ), - array( 'shop__id' => 1, 'product__id' => 3, 'product__name' => 'plate', 'product__shop_id' => 1 ), - array( 'shop__id' => 1, 'product__id' => 2, 'product__name' => 'candle', 'product__shop_id' => 1) - ), array(), array( - array( - 'a' => 'shop', - 'b' => 'product', - 'matcher' => function( $a, $b ) { return ( $b->shopID == $a->id ); }, - 'do' => function( $a, $b ) { return $a->noLoad()->ownProductList[] = $b; } - ) - ) ); - asrt( is_array( $collection ), TRUE ); - asrt( isset( $collection['shop'] ), TRUE ); - asrt( isset( $collection['product'] ), TRUE ); - asrt( (int) $collection['shop'][1]->id, 1 ); - asrt( (int) $collection['product'][1]->id, 1 ); - asrt( (int) $collection['product'][2]->id, 2 ); - asrt( (int) $collection['product'][3]->id, 3 ); - asrt( (int) $collection['product'][1]->shopID, 1 ); - asrt( (int) $collection['product'][2]->shopID, 1 ); - asrt( (int) $collection['product'][3]->shopID, 1 ); - asrt( $collection['product'][1]->name, 'vase' ); - asrt( $collection['product'][2]->name, 'candle' ); - asrt( $collection['product'][3]->name, 'plate' ); - asrt( isset( $collection['shop'][1]->ownProductList ), TRUE ); - asrt( is_array( $collection['shop'][1]->ownProductList ), TRUE ); - asrt( count( $collection['shop'][1]->ownProductList ), 3 ); - asrt( $collection['shop'][1]->ownProductList[0]->name, 'vase' ); - asrt( $collection['shop'][1]->ownProductList[1]->name, 'candle' ); - asrt( $collection['shop'][1]->ownProductList[2]->name, 'plate' ); - } - - /** - * Test findMulti() with manual crafted fields. - * - * @return void - */ - public function testFindMultiDIY() - { - R::nuke(); - $movie = R::dispense( 'movie' ); - $review = R::dispense( 'review' ); - $movie->ownReviewList[] = $review; - $review->stars = 5; - $movie->title = 'Gambit'; - R::store( $movie ); - $stuff = R::findMulti( 'movie,review', 'SELECT - movie.id AS movie__id, - movie.title AS movie__title, - review.id AS review__id, - review.stars AS review__stars, - review.movie_id AS review__movie_id - FROM movie - LEFT JOIN review ON review.movie_id = movie.id - ' ); - asrt( count( $stuff ), 2 ); - asrt( isset( $stuff['movie'] ), TRUE ); - asrt( isset( $stuff['review'] ), TRUE ); - asrt( is_array( $stuff['movie'] ), TRUE ); - asrt( is_array( $stuff['review'] ), TRUE ); - asrt( count( $stuff['movie'] ), 1 ); - asrt( count( $stuff['review'] ), 1 ); - $movie = reset( $stuff['movie'] ); - asrt( $movie->title, 'Gambit' ); - $review = reset( $stuff['review'] ); - asrt( (int) $review->stars, 5 ); - R::nuke(); - $movie = R::dispense( 'movie' ); - $review = R::dispense( 'review' ); - $movie->ownReviewList[] = $review; - $review->stars = 5; - $movie->title = 'Gambit'; - R::store( $movie ); - $stuff = R::findMulti( array( 'movie', 'review' ), 'SELECT - movie.id AS movie__id, - movie.title AS movie__title, - review.id AS review__id, - review.stars AS review__stars, - review.movie_id AS review__movie_id - FROM movie - LEFT JOIN review ON review.movie_id = movie.id - ' ); - asrt( count( $stuff ), 2 ); - asrt( isset( $stuff['movie'] ), TRUE ); - asrt( isset( $stuff['review'] ), TRUE ); - asrt( is_array( $stuff['movie'] ), TRUE ); - asrt( is_array( $stuff['review'] ), TRUE ); - asrt( count( $stuff['movie'] ), 1 ); - asrt( count( $stuff['review'] ), 1 ); - $movie = reset( $stuff['movie'] ); - asrt( $movie->title, 'Gambit' ); - $review = reset( $stuff['review'] ); - asrt( (int) $review->stars, 5 ); - } - - /** - * Test findMulti(). Basic version. - * - * @return void - */ - public function testFindMulti() - { - $book = R::dispense( 'book' ); - $book->title = 'My Book'; - $book->ownPageList = R::dispense( 'page', 3 ); - $no = 1; - foreach( $book->ownPageList as $page ) { - $page->num = $no++; - } - R::store( $book ); - $collection = R::findMulti( 'book,page', ' - SELECT book.*, page.* FROM book - LEFT JOIN page ON page.book_id = book.id - ' ); - asrt( count( $collection ), 2 ); - asrt( isset( $collection['book'] ), TRUE ); - asrt( isset( $collection['page'] ), TRUE ); - asrt( count( $collection['book'] ), 1 ); - asrt( count( $collection['page'] ), 3 ); - foreach( $collection['book'] as $bean ) asrt( ( $bean instanceof OODBBean ), TRUE ); - foreach( $collection['page'] as $bean ) asrt( ( $bean instanceof OODBBean ), TRUE ); - $book = reset( $collection['book'] ); - asrt( $book->title, 'My Book' ); - $no = 1; - foreach( $collection['page'] as $page ) asrt( (int) $page->num, $no++ ); - R::nuke(); - $book->noLoad()->ownPageList = $collection['page']; - asrt( count( $book->ownPageList ), 3 ); - } - - /** - * Tests the complex use case for findMulti(). - * - * @return void - */ - public function testMultiAdvanced() - { - $this->insertBookData(); - $collection = R::findMulti( 'book,page,text,category', ' - SELECT book.*, page.*, text.*, category.* - FROM book - LEFT JOIN page ON page.book_id = book.id - LEFT JOIN text ON text.page_id = page.id - LEFT JOIN book_category ON book_category.book_id = book.id - LEFT JOIN category ON book_category.category_id = category.id - ' ); - asrt( count( $collection ), 4 ); - asrt( isset( $collection['book'] ), TRUE ); - asrt( isset( $collection['page'] ), TRUE ); - asrt( isset( $collection['text'] ), TRUE ); - asrt( isset( $collection['category'] ), TRUE ); - asrt( count( $collection['book'] ), 5 ); - asrt( count( $collection['page'] ), 9 ); - asrt( count( $collection['text'] ), 11 ); - asrt( count( $collection['category'] ), 3 ); - foreach( $collection['book'] as $bean ) asrt( ( $bean instanceof OODBBean ), TRUE ); - foreach( $collection['page'] as $bean ) asrt( ( $bean instanceof OODBBean ), TRUE ); - foreach( $collection['text'] as $bean ) asrt( ( $bean instanceof OODBBean ), TRUE ); - foreach( $collection['category'] as $bean ) asrt( ( $bean instanceof OODBBean ), TRUE ); - foreach( $collection['book'] as $book ) $titles[] = $book->title; - asrt( in_array( 'Diehard C', $titles ), TRUE ); - asrt( in_array( 'Adventures in JavaScript', $titles ), TRUE ); - asrt( in_array( 'CSS ala Picasso', $titles ), TRUE ); - asrt( in_array( 'PHP Tips and Tricks', $titles ), TRUE ); - asrt( in_array( 'Secrets of SQL', $titles ), TRUE ); - $collection = R::findMulti( 'book,page,text,category,book_category', ' - SELECT book.*, page.*, text.*, category.*, book_category.* - FROM book - LEFT JOIN page ON page.book_id = book.id - LEFT JOIN text ON text.page_id = page.id - LEFT JOIN book_category ON book_category.book_id = book.id - LEFT JOIN category ON book_category.category_id = category.id - WHERE category_id > ? - ORDER BY book.title ASC - ', array( 0 ), array( - array( - 'b'=>'page', - 'a'=>'text', - 'do' => function( $a, $b ) { - $b->noLoad()->ownTextList[] = $a; - $b->clearHistory(); - }, - 'matcher' => function( $a, $b ){ return ($a->page_id == $b->id); } - ), - array( - 'b'=>'book', - 'a'=>'page', - 'do' => function( $a, $b ) { - $b->noLoad()->ownPageList[] = $a; - $b->clearHistory(); - }, - 'matcher' => function( $a, $b ){ return ($a->book_id == $b->id); } - ), - array( - 'b' => 'category', - 'a' => 'book', - 'do' => function($a, $b) { - $a->noLoad()->sharedCategoryList[] = $b; - $a->clearHistory(); - }, - 'matcher' => function( $a, $b, $beans ) { - foreach( $beans['book_category'] as $bean ) { - if ( $bean->book_id == $a->id && $bean->category_id == $b->id ) return TRUE; - } - return FALSE; - } - ), - ) - ); - $books = $collection['book']; - $book = reset( $books ); - asrt( $book->title, 'Adventures in JavaScript' ); - R::nuke(); - asrt( count( $book->ownPageList ), 3 ); - $page = reset( $book->ownPageList ); - asrt( count( $page->ownTextList ), 1 ); - asrt( count( $book->sharedCategoryList ), 2); - $categories = array(); - foreach( $book->sharedCategoryList as $category ) { - $categories[] = $category->name; - } - sort( $categories ); - asrt( implode( ',', $categories ), 'Programming,Web Development' ); - $book = next( $books ); - asrt( $book->title, 'CSS ala Picasso' ); - asrt( count( $book->ownPage ), 1 ); - $page = reset( $book->ownPage ); - asrt( count( $page->ownTextList ), 2 ); - $texts = array(); - foreach( $page->ownTextList as $text ) $texts[] = $text->content; - asrt( in_array( 'Now we use it for applications...', $texts ), TRUE ); - $categories = array(); - foreach( $book->sharedCategoryList as $category ) { - $categories[] = $category->name; - } - sort( $categories ); - asrt( implode( ',', $categories ), 'Design,Programming,Web Development' ); - $book = next( $books ); - asrt( $book->title, 'Diehard C' ); - asrt( count( $book->ownPageList ), 2 ); - $page = reset( $book->ownPageList ); - asrt( count( $page->ownTextList ), 2 ); - $page = next( $book->ownPageList ); - asrt( count( $page->ownTextList ), 1 ); - $categories = array(); - foreach( $book->sharedCategoryList as $category ) { - $categories[] = $category->name; - } - sort( $categories ); - asrt( implode( ',', $categories ), 'Programming' ); - //should have no effect, nothing should have changed - R::storeAll($books); - asrt( R::count('book'), 0 ); - asrt( R::count('page'), 0 ); - asrt( R::count('text'), 0 ); - } - - /** - * Test forming IN-clause using genSlots and flat. - * - * @return void - */ - public function testINClause() - { - list( $flowers, $shop ) = R::dispenseAll( 'flower*4,shop' ); - $flowers[0]->color = 'red'; - $flowers[1]->color = 'yellow'; - $flowers[2]->color = 'blue'; - $flowers[3]->color = 'purple'; - $flowers[0]->price = 10; - $flowers[1]->price = 15; - $flowers[2]->price = 20; - $flowers[3]->price = 25; - $shop->xownFlowerList = $flowers; - R::store( $shop ); - $colors = array( 'red', 'yellow' ); - $result = $this->getColors( R::find( 'flower', ' color IN ('.R::genSlots( $colors ).' ) AND price < ?' , R::flat( array( $colors, 100 ) ) ) ); - asrt( $result, 'red,yellow' ); - $colors = array( 'red', 'yellow' ); - $result = $this->getColors( R::find( 'flower', ' color IN ('.R::genSlots( $colors ).' ) AND price < ?' , R::flat( array( $colors, 10 ) ) ) ); - asrt( $result, '' ); - $colors = array( 'red', 'yellow' ); - $result = $this->getColors( R::find( 'flower', ' color IN ('.R::genSlots( $colors ).' ) AND price < ?' , R::flat( array( $colors, 15 ) ) ) ); - asrt( $result, 'red' ); - asrt( json_encode( R::flat( array( 'a', 'b', 'c' ) ) ), '["a","b","c"]' ); - asrt( json_encode( R::flat( array( 'a', array( 'b' ), 'c' ) ) ), '["a","b","c"]' ); - asrt( json_encode( R::flat( array( 'a', array( 'b', array( 'c' ) ) ) ) ), '["a","b","c"]' ); - asrt( json_encode( R::flat( array( array( 'a', array( 'b', array( array( 'c' ) ) ) ) ) ) ), '["a","b","c"]' ); - asrt( json_encode( R::flat( array( 'a', 'b', 'c', array() ) ) ), '["a","b","c"]' ); - asrt( genslots( array( 1, 2 ) ), '?,?' ); - asrt( json_encode( array_flatten( array( array( 'a', array( 'b', array( array( 'c' ) ) ) ) ) ) ), '["a","b","c"]' ); - asrt( genslots( array( 1, 2 ), 'IN (%s) AND' ), 'IN (?,?) AND' ); - asrt( genslots( array(), ' IN (%s) AND ' ), '' ); - $colors = array( 'blue', 'purple', 'red' ); - $flowers = R::find( 'flower', genslots( $colors, ' color IN (%s) AND ' ).' price > ? ', array_flatten( array( $colors, 11 ) ) ); - asrt( $this->getColors( $flowers ), 'blue,purple' ); - $flowers = R::find( 'flower', genslots( array(), ' color IN (%s) AND ' ).' price > ? ', array_flatten( array( array(), 11 ) ) ); - asrt( $this->getColors( $flowers ), 'blue,purple,yellow' ); - $flowers = R::find( 'flower', ' id > 0 AND '.genslots( $colors, ' color IN (%s) AND ' ).' price > ? ', array_flatten( array( $colors, 11 ) ) ); - asrt( $this->getColors( $flowers ), 'blue,purple' ); - $flowers = R::find( 'flower', ' id > 0 AND '.genslots( array(), ' color IN (%s) AND ' ).' price > ? ', array_flatten( array( array(), 11 ) ) ); - asrt( $this->getColors( $flowers ), 'blue,purple,yellow' ); - } - - /** - * Test findLike. - * - * @return void - */ - public function testFindLike2() - { - list( $flowers, $shop ) = R::dispenseAll( 'flower*4,shop' ); - $flowers[0]->color = 'red'; - $flowers[1]->color = 'yellow'; - $flowers[2]->color = 'blue'; - $flowers[3]->color = 'purple'; - $flowers[0]->price = 10; - $flowers[1]->price = 15; - $flowers[2]->price = 20; - $flowers[3]->price = 25; - $shop->xownFlowerList = $flowers; - R::store( $shop ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array( 'red', 'yellow' ) ), ' price < 20' ) ), 'red,yellow' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array() ), '' ) ), 'blue,purple,red,yellow' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array() ) ) ), 'blue,purple,red,yellow' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array('blue') ), ' OR price = 25' ) ), 'blue,purple' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array() ), ' price < 25' ) ), 'blue,red,yellow' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array() ), ' price < 20' ) ), 'red,yellow' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array() ), ' ORDER BY color DESC' ), TRUE ), 'yellow,red,purple,blue' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array() ), ' ORDER BY color LIMIT 1' ) ), 'blue' ); - asrt( $this->getColors( R::findLike( 'flower', array( 'color' => array( 'yellow', 'blue' ) ), ' ORDER BY color ASC LIMIT 1' ) ), 'blue' ); - } - - /** - * Tests the findOrCreate method. - * - * @return void - */ - public function testFindOrCreate() - { - R::nuke(); - $book = R::findOrCreate( 'book', array( 'title' => 'my book', 'price' => 50 ) ); - asrt( ( $book instanceof OODBBean ), TRUE ); - $id = $book->id; - $book = R::findOrCreate( 'book', array( 'title' => 'my book', 'price' => 50 ) ); - asrt( $book->id, $id ); - asrt( $book->title, 'my book' ); - asrt( (int) $book->price, 50 ); - } - - /** - * Tests the findLike method. - * - * @return void - */ - public function testFindLike() - { - R::nuke(); - $book = R::dispense( array( - '_type' => 'book', - 'title' => 'my book', - 'price' => 80 - ) ); - R::store( $book ); - $book = R::dispense( array( - '_type' => 'book', - 'title' => 'other book', - 'price' => 80 - ) ); - R::store( $book ); - $books = R::findLike( 'book', array( 'price' => 80 ) ); - asrt( count( $books ), 2 ); - foreach( $books as $book ) { - asrt( $book->getMeta( 'type' ), 'book' ); - } - $books = R::findLike( 'book' ); - asrt( count( $books ), 2 ); - $books = R::findLike( 'book', array( 'title' => 'my book' ) ); - asrt( count( $books ), 1 ); - $books = R::findLike( 'book', array( 'title' => array( 'my book', 'other book' ) ) ); - asrt( count( $books ), 2 ); - $books = R::findLike( 'book', array( 'title' => 'strange book') ); - asrt( is_array( $books ), TRUE ); - asrt( count( $books ), 0 ); - $books = R::findLike( 'magazine' ); - asrt( is_array( $books ), TRUE ); - asrt( count( $books ), 0 ); - } - - /** - * Test whether findOne gets a LIMIT 1 - * clause. - * - * @return void - */ - public function testFindOneLimitOne() - { - R::nuke(); - list( $book1, $book2 ) = R::dispense( 'book', 2 ); - $book1->title = 'a'; - $book2->title = 'b'; - R::storeAll( array( $book1, $book2 ) ); - $logger = R::debug( 1, 1 ); - $logger->clear(); - $found = R::findOne( 'book' ); - asrt( count( $logger->grep('LIMIT 1') ), 1 ); - asrt( ( $found instanceof \RedBeanPHP\OODBBean ), TRUE ); - $logger->clear(); - $found = R::findOne( 'book', ' title = ? ', array( 'a' ) ); - asrt( count( $logger->grep('LIMIT 1') ), 1 ); - asrt( ( $found instanceof \RedBeanPHP\OODBBean ), TRUE ); - $logger->clear(); - $found = R::findOne( 'book', ' title = ? LIMIT 1', array( 'b' ) ); - asrt( count( $logger->grep('LIMIT 1') ), 1 ); - $logger->clear(); - $found = R::findOne( 'book', ' title = ? limit 1', array( 'b' ) ); - asrt( count( $logger->grep('LIMIT 1') ), 0 ); - asrt( count( $logger->grep('limit 1') ), 1 ); - asrt( ( $found instanceof \RedBeanPHP\OODBBean ), TRUE ); - $found = R::findOne( 'book', ' title = ? LIMIT 2', array( 'b' ) ); - asrt( count( $logger->grep('LIMIT 2') ), 1 ); - asrt( ( $found instanceof \RedBeanPHP\OODBBean ), TRUE ); - } - - /** - * Begin testing. - * This method runs the actual test pack. - * - * @return void - */ - public function testFinding() - { - $toolbox = R::getToolBox(); - $adapter = $toolbox->getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - $a = new AssociationManager( $toolbox ); - $page = $redbean->dispense( "page" ); - $page->name = "John's page"; - $idpage = $redbean->store( $page ); - $page2 = $redbean->dispense( "page" ); - $page2->name = "John's second page"; - $idpage2 = $redbean->store( $page2 ); - $a->associate( $page, $page2 ); - $pageOne = $redbean->dispense( "page" ); - $pageOne->name = "one"; - $pageMore = $redbean->dispense( "page" ); - $pageMore->name = "more"; - $pageEvenMore = $redbean->dispense( "page" ); - $pageEvenMore->name = "evenmore"; - $pageOther = $redbean->dispense( "page" ); - $pageOther->name = "othermore"; - set1toNAssoc( $a, $pageOther, $pageMore ); - set1toNAssoc( $a, $pageOne, $pageMore ); - set1toNAssoc( $a, $pageOne, $pageEvenMore ); - asrt( count( $redbean->find( "page", array(), " name LIKE '%more%' ", array() ) ), 3 ); - asrt( count( $redbean->find( "page", array(), " name LIKE :str ", array( ":str" => '%more%' ) ) ), 3 ); - asrt( count( $redbean->find( "page", array(), array( " name LIKE :str ", array( ":str" => '%more%' ) ) ) ), 3 ); - asrt( count( $redbean->find( "page", array(), " name LIKE :str ", array( ":str" => '%mxore%' ) ) ), 0 ); - asrt( count( $redbean->find( "page", array( "id" => array( 2, 3 ) ) ) ), 2 ); - $bean = $redbean->dispense( "wine" ); - $bean->name = "bla"; - for ( $i = 0; $i < 10; $i++ ) { - $redbean->store( $bean ); - } - $redbean->find( "wine", array( "id" => 5 ) ); // Finder:where call OODB::convertToBeans - $bean2 = $redbean->load( "anotherbean", 5 ); - asrt( $bean2->id, 0 ); - $keys = $adapter->getCol( "SELECT id FROM page WHERE " . $writer->esc( 'name' ) . " LIKE '%John%'" ); - asrt( count( $keys ), 2 ); - $pages = $redbean->batch( "page", $keys ); - asrt( count( $pages ), 2 ); - $p = R::findLast( 'page' ); - pass(); - $row = R::getRow( 'select * from page ' ); - asrt( is_array( $row ), TRUE ); - asrt( isset( $row['name'] ), TRUE ); - // Test findAll -- should not throw an exception - asrt( count( R::findAll( 'page' ) ) > 0, TRUE ); - asrt( count( R::findAll( 'page', ' ORDER BY id ' ) ) > 0, TRUE ); - $beans = R::findOrDispense( "page" ); - asrt( count( $beans ), 6 ); - asrt( is_null( R::findLast( 'nothing' ) ), TRUE ); - try { - R::find( 'bean', ' id > 0 ', 'invalid bindings argument' ); - fail(); - } catch ( RedException $exception ) { - pass(); - } - } - - /** - * Test tree traversal with searchIn(). - * - * @return void - */ - public function testTreeTraversal() - { - testpack( 'Test Tree Traversal' ); - R::nuke(); - $page = R::dispense( 'page', 10 ); - //Setup the test data for this series of tests - $i = 0; - foreach( $page as $pageItem ) { - $pageItem->name = 'page' . $i; - $pageItem->number = $i; - $i++; - R::store( $pageItem ); - } - $page[0]->ownPage = array( $page[1], $page[2] ); - $page[1]->ownPage = array( $page[3], $page[4] ); - $page[3]->ownPage = array( $page[5] ); - $page[5]->ownPage = array( $page[7] ); - $page[9]->document = $page[8]; - $page[9]->book = R::dispense('book'); - R::store( $page[9] ); - $id = R::store( $page[0] ); - $book = $page[9]->book; - } - - /** - * Test find and export. - * - * @return void - */ - public function testFindAndExport() - { - R::nuke(); - $pages = R::dispense( 'page', 3 ); - $i = 1; - foreach( $pages as $page ) { - $page->pageNumber = $i++; - } - R::storeAll( $pages ); - $pages = R::findAndExport( 'page' ); - asrt( is_array( $pages ), TRUE ); - asrt( isset( $pages[0] ), TRUE ); - asrt( is_array( $pages[0] ), TRUE ); - asrt( count( $pages ), 3 ); - } - - /** - * Test error handling of SQL states. - * - * @return void - */ - public function testFindError() - { - R::freeze( FALSE ); - $page = R::dispense( 'page' ); - $page->title = 'abc'; - R::store( $page ); - //Column does not exist, in fluid mode no error! - try { - R::find( 'page', ' xtitle = ? ', array( 'x' ) ); - pass(); - } catch ( SQL $e ) { - fail(); - } - //Table does not exist, in fluid mode no error! - try { - R::find( 'pagex', ' title = ? ', array( 'x' ) ); - pass(); - } catch ( SQL $e ) { - fail(); - } - //Syntax error, error in fluid mode if possible to infer from SQLSTATE (MySQL/Postgres) - try { - R::find( 'page', ' invalid SQL ' ); - //In SQLite only get HY000 - not very descriptive so suppress more errors in fluid mode then. - if ( - $this->currentlyActiveDriverID === 'sqlite' - || $this->currentlyActiveDriverID === 'CUBRID' ) { - pass(); - } else { - fail(); - } - } catch ( SQL $e ) { - pass(); - } - //Frozen, always error... - R::freeze( TRUE ); - //Column does not exist, in frozen mode error! - try { - R::find( 'page', ' xtitle = ? ', array( 'x' ) ); - fail(); - } catch ( SQL $e ) { - pass(); - } - //Table does not exist, in frozen mode error! - try { - R::find( 'pagex', ' title = ? ', array( 'x' ) ); - fail(); - } catch ( SQL $e ) { - pass(); - } - //Syntax error, in frozen mode error! - try { - R::find( 'page', ' invalid SQL ' ); - fail(); - } catch ( SQL $e ) { - pass(); - } - R::freeze( FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php deleted file mode 100644 index 19428da9..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Foreignkeys.php +++ /dev/null @@ -1,433 +0,0 @@ -cover = $page; - R::store( $book ); - $book = $book->fresh(); - asrt( $book->getMeta('sys.autoresolved.cover'), NULL ); - $book->cover; - asrt( $book->getMeta('sys.autoresolved.cover'), 'page' ); - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->cover = $page; - R::store( $book ); - $book = $book->fresh(); - asrt( $book->getMeta('sys.autoresolved.cover'), NULL ); - $book->fetchAs('page')->cover; - asrt( $book->getMeta('sys.autoresolved.cover'), NULL ); - R::nuke(); - R::aliases( array( 'cover' => 'page' ) ); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->cover = $page; - R::store( $book ); - $book = $book->fresh(); - asrt( $book->getMeta('sys.autoresolved.cover'), NULL ); - $book->cover; - asrt( $book->getMeta('sys.autoresolved.cover'), NULL ); - R::aliases( array() ); - R::nuke(); - R::setAutoResolve( FALSE ); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->cover = $page; - R::store( $book ); - $book = $book->fresh(); - asrt( $book->getMeta('sys.autoresolved.cover'), NULL ); - $book->cover; - asrt( $book->getMeta('sys.autoresolved.cover'), NULL ); - R::setAutoResolve( TRUE ); - } - - /** - * Test whether unique constraints are properly created using - * reflection. - * - * @return void - */ - public function testUniqueInspect() - { - $writer = R::getWriter(); - R::nuke(); - $book = R::dispense( 'book' ); - $category = R::dispense( 'category' ); - $book->sharedCategory[] = $category; - R::store( $book ); - asrt( count( get_uniques_for_type('book_category') ), 1 ); - asrt( are_cols_in_unique( 'book_category', array( 'book_id', 'category_id' ) ), TRUE ); - R::nuke(); - $book = R::dispense( 'book' ); - $category = R::dispense( 'category' ); - $book->via( 'library' )->sharedCategory[] = $category; - R::store( $book ); - asrt( count( get_uniques_for_type('book_category') ), 0 ); - asrt( are_cols_in_unique( 'book_category', array( 'book_id', 'category_id' ) ), FALSE ); - asrt( count( get_uniques_for_type('library') ), 1 ); - asrt( are_cols_in_unique( 'library', array( 'book_id', 'category_id' ) ), TRUE ); - AQueryWriter::clearRenames(); - R::nuke(); - $book = R::dispense( 'book' ); - $category = R::dispense( 'category' ); - $book->sharedCategory[] = $category; - R::store( $book ); - asrt( count( get_uniques_for_type('book_category') ), 1 ); - asrt( are_cols_in_unique( 'book_category', array( 'book_id', 'category_id' ) ), TRUE ); - asrt( count( get_uniques_for_type('library') ), 0 ); - asrt( are_cols_in_unique( 'library', array( 'book_id', 'category_id' ) ), FALSE ); - R::nuke(); - $book = R::dispense( 'book' ); - $book2 = R::dispense( 'book' ); - $book->sharedBook[] = $book2; - R::store( $book ); - asrt( count( get_uniques_for_type('book_book') ), 1 ); - asrt( are_cols_in_unique( 'book_book', array( 'book_id', 'book2_id' ) ), TRUE ); - try { - $result = R::getWriter()->addUniqueConstraint( 'nonexistant', array( 'a', 'b' ) ); - } catch( \Exception $e ) { - print_r( $e ); exit; - } - pass(); //dont crash! - asrt( $result, FALSE ); - } - - /** - * Tests foreign keys but checks using ProxyWriter. - * - * @return void - */ - public function testFKInspect() - { - $faultyWriter = new \FaultyWriter( R::getDatabaseAdapter() ); - try { - $null = \ProxyWriter::callMethod( $faultyWriter, 'getForeignKeyForTypeProperty', 'test', 'test' ); - pass(); - } catch( \Exception $e ) { - fail(); - } - asrt( is_null( $null ), TRUE ); - $writer = R::getWriter(); - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->xownPage[] = $page; - R::store( $book ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'page', 'book_id' ); - asrt( is_array( $keys ), TRUE ); - asrt( $keys['on_delete'], 'CASCADE' ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'page', 'id' ); - asrt( is_null( $keys ), TRUE ); - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->ownPage[] = $page; - R::store( $book ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'page', 'book_id' ); - asrt( is_array( $keys ), TRUE ); - asrt( $keys['on_delete'], 'SET NULL' ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'page', 'id' ); - asrt( is_null( $keys ), TRUE ); - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->alias('magazine')->xownPage[] = $page; - R::store( $book ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'page', 'magazine_id' ); - asrt( is_array( $keys ), TRUE ); - asrt( $keys['on_delete'], 'CASCADE' ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'page', 'book_id' ); - asrt( is_null( $keys ), TRUE ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'page', 'id' ); - asrt( is_null( $keys ), TRUE ); - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->cover= $page; - R::store( $book ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'book', 'cover_id' ); - asrt( is_array( $keys ), TRUE ); - asrt( $keys['on_delete'], 'SET NULL' ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'book', 'page_id' ); - asrt( is_null( $keys ), TRUE ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'book', 'id' ); - asrt( is_null( $keys ), TRUE ); - R::nuke(); - $book = R::dispense( 'book' ); - $category = R::dispense( 'category' ); - $book->sharedTag[] = $category; - R::store( $book ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'book_category', 'book_id' ); - asrt( is_array( $keys ), TRUE ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'book_category', 'category_id' ); - asrt( is_array( $keys ), TRUE ); - $keys = \ProxyWriter::callMethod( $writer, 'getForeignKeyForTypeProperty', 'book_category', 'id' ); - asrt( is_null( $keys ), TRUE ); - } - - /** - * Test dependencies. - * - * @return void - */ - public function testDependency() - { - $can = $this->createBeanInCan( FALSE ); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $can ); - - // Bean stays - asrt( R::count( 'bean' ), 1 ); - } - - /** - * Test dependencies (variation). - * - * @return void - */ - public function testDependency2() - { - $can = $this->createBeanInCan( TRUE ); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $can ); - - // Bean gone - asrt( R::count( 'bean' ), 0 ); - - $can = $this->createBeanInCan( FALSE ); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $can ); - - // Bean stays, constraint removed - asrt( R::count( 'bean' ), 0 ); - - //need to recreate table to get rid of constraint! - R::nuke(); - - $can = $this->createBeanInCan( FALSE ); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $can ); - - // Bean stays, constraint removed - asrt( R::count( 'bean' ), 1 ); - - } - - /** - * Tests dependencies (variation). - * - * @return void - */ - public function testDependency3() - { - R::nuke(); - - $can = $this->createCanForBean(); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $can ); - - asrt( R::count( 'bean' ), 1 ); - } - - /** - * Tests dependencies (variation). - * - * @return void - */ - public function testDependency4() - { - R::nuke(); - - $can = $this->createBeanInCan( TRUE ); - - R::store( $can ); - - R::trash( $can ); - - $can = $this->createCanForBean(); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $can ); - - asrt( R::count( 'bean' ), 0 ); - - $can = $this->createBeanInCan( TRUE ); - - R::store( $can ); - - R::trash( $can ); - - $can = $this->createCanForBean(); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $can ); - - asrt( R::count( 'bean' ), 0 ); - } - - /** - * Issue #171 - * The index name argument is not unique in processEmbeddedBean etc. - * - * @return void - */ - public function testIssue171() - { - R::getDatabaseAdapter()->addEventListener( 'sql_exec', $this ); - - $account = R::dispense( 'account' ); - $user = R::dispense( 'user' ); - $player = R::dispense( 'player' ); - - $account->ownUser[] = $user; - - R::store( $account ); - - asrt( strpos( implode( ',', $this->queries ), 'index_foreignkey_user_account' ) !== FALSE, TRUE ); - - $this->queries = array(); - - $account->ownPlayer[] = $player; - - R::store( $account ); - - asrt( strpos( implode( ',', $this->queries ), 'index_foreignkey_player_accou' ) !== FALSE, TRUE ); - } - - /** - * Tests whether foreign keys are created correctly for certain - * relations. - * - * @return void - */ - public function testCreationOfForeignKeys() - { - $this->queries = array(); - - $account = R::dispense( 'account' ); - $user = R::dispense( 'user' ); - $player = R::dispense( 'player' ); - - $user->account = $account; - - R::store( $user ); - - asrt( strpos( implode( ',', $this->queries ), 'index_foreignkey_user_account' ) !== FALSE, TRUE ); - - $this->queries = array(); - - $player->account = $account; - - R::store( $player ); - - asrt( strpos( implode( ',', $this->queries ), 'index_foreignkey_player_accou' ) !== FALSE, TRUE ); - } - - /** - * Test helper method. - * Creates a bean in a can. The bean will get a reference - * to the can and can be made dependent. - * - * @return OODBBean $can - */ - private function createBeanInCan( $isExcl ) - { - $can = R::dispense( 'can' ); - $bean = R::dispense( 'bean' ); - - $can->name = 'bakedbeans'; - $bean->taste = 'salty'; - - if ($isExcl) { - $can->xownBean[] = $bean; - } else { - $can->ownBean[] = $bean; - } - - R::store( $can ); - - return $can; - } - - /** - * Test helper method. - * Creates a bean in a can beginning with the bean. The bean will get a reference - * to the can and can be made dependent. - * - * @return OODBBean $can - */ - private function createCanForBean() - { - $can = R::dispense( 'can' ); - $bean = R::dispense( 'bean' ); - - $bean->can = $can; - - R::store( $bean ); - - return $can; - } - - /** - * Log queries - * - * @param string $event - * @param Adapter $info - */ - public function onEvent( $event, $info ) - { - $this->queries[] = $info->getSQL(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Frozen.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Frozen.php deleted file mode 100644 index 2cf9167c..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Frozen.php +++ /dev/null @@ -1,115 +0,0 @@ -xownPageList[] = R::dispense( 'page' ); - $book->sharedTagList[] = R::dispense( 'tag' ); - R::store( $book ); - $book = $book->fresh(); - R::freeze( TRUE ); - - $book->xownPageList = array(); - - R::store( $book ); - $book = $book->fresh(); - - asrt( R::count('page'), 0 ); - - $book->xownPageList[] = R::dispense( 'page' ); - - R::store( $book ); - $book = $book->fresh(); - - asrt( R::count('page'), 1 ); - - $book->xownPageList; - $book->sharedTagList; - R::trash( $book ); - - asrt( R::count('book'), 0 ); - asrt( R::count('page'), 0 ); - asrt( R::count('tag'), 1 ); - asrt( R::count('book_tag'), 0 ); - - R::freeze( FALSE ); - } - - /** - * Tests whether invalid list checks are - * operational in frozen mode. - * - * @return void - */ - public function testInvalidList() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->xownPageList[] = R::dispense( 'page' ); - $book->sharedTagList[] = R::dispense( 'tag' ); - R::store( $book ); - R::freeze( TRUE ); - - $book = R::dispense( 'book' ); - $book->xownPageList[] = 'nonsense'; - try { - R::store( $book ); - fail(); - } catch( \Exception $e ) { - pass(); - } - - R::freeze( FALSE ); - } - - /** - * Tests whether loading non-existant beans - * returns the same results in frozen mode. - * - * @return - */ - public function testLoadNonExistant() - { - R::nuke(); - R::store( R::dispense( 'bean' ) ); - R::freeze( TRUE ); - $bean = R::load( 'bean', 123 ); - R::freeze( FALSE ); - asrt( ( $bean instanceof OODBBean ), TRUE ); - asrt( $bean->id, 0 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php deleted file mode 100644 index f8851795..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Fuse.php +++ /dev/null @@ -1,442 +0,0 @@ -getBeanHelper(); - asrt( ( $oldBeanHelper instanceof SimpleFacadeBeanHelper ), TRUE ); - R::getRedBean()->setBeanHelper( $customBeanHelper ); - $meal = R::dispense( 'meal' ); - asrt( ( $meal->box() instanceof \Model_Soup ), TRUE ); - $cake = R::dispense( 'cake' ); - asrt( is_null( $cake->box() ), TRUE ); - $bean = R::dispense( 'coffee' ); - asrt( ( $bean->box() instanceof \Model_Coffee ), TRUE ); - $meal->setFlavour( 'tomato' ); - asrt( $meal->getFlavour(), 'tomato' ); - $meal->rating = 5; - R::store( $meal ); - asrt( $meal->getFlavour(), 'tomato' ); - $meal = $meal->unbox(); - asrt( $meal->getFlavour(), 'tomato' ); - $meal = R::findOne( 'meal' ); - asrt( ( $meal->box() instanceof \Model_Soup ), TRUE ); - asrt( $meal->getFlavour(), '' ); - $meal->setFlavour( 'tomato' ); - asrt( $meal->getFlavour(), 'tomato' ); - $meal = $meal->unbox(); - asrt( $meal->getFlavour(), 'tomato' ); - R::getRedBean()->setBeanHelper( $oldBeanHelper ); - } - - /** - * Test FUSE hooks (i.e. open, update, update_after etc..) - * - * @return void - */ - public function testHooks() - { - R::nuke(); - $probe = R::dispense( 'probe' ); - $probe->name = 'test'; - asrt( $probe->getLogActionCount(), 1 ); - asrt( $probe->getLogActionCount( 'dispense' ), 1 ); - asrt( $probe->getLogActionCount( 'open' ), 0 ); - asrt( $probe->getLogActionCount( 'update' ), 0 ); - asrt( $probe->getLogActionCount( 'after_update' ), 0 ); - asrt( $probe->getLogActionCount( 'delete' ), 0 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 0 ); - asrt( ( $probe->getDataFromLog( 0, 'bean' ) === $probe ), TRUE ); - R::store( $probe ); - asrt( $probe->getLogActionCount(), 3 ); - asrt( $probe->getLogActionCount( 'dispense' ), 1 ); - asrt( $probe->getLogActionCount( 'open' ), 0 ); - asrt( $probe->getLogActionCount( 'update' ), 1 ); - asrt( $probe->getLogActionCount( 'after_update' ), 1 ); - asrt( $probe->getLogActionCount( 'delete' ), 0 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 0 ); - asrt( ( $probe->getDataFromLog( 2, 'bean' ) === $probe ), TRUE ); - $probe = R::load( 'probe', $probe->id ); - asrt( $probe->getLogActionCount(), 2 ); - asrt( $probe->getLogActionCount( 'dispense' ), 1 ); - asrt( $probe->getLogActionCount( 'open' ), 1 ); - asrt( $probe->getLogActionCount( 'update' ), 0 ); - asrt( $probe->getLogActionCount( 'after_update' ), 0 ); - asrt( $probe->getLogActionCount( 'delete' ), 0 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 0 ); - asrt( ( $probe->getDataFromLog( 0, 'bean' ) === $probe ), TRUE ); - asrt( ( $probe->getDataFromLog( 1, 'id' ) === $probe->id ), TRUE ); - $probe->clearLog(); - R::trash( $probe ); - asrt( $probe->getLogActionCount(), 2 ); - asrt( $probe->getLogActionCount( 'dispense' ), 0 ); - asrt( $probe->getLogActionCount( 'open' ), 0 ); - asrt( $probe->getLogActionCount( 'update' ), 0 ); - asrt( $probe->getLogActionCount( 'after_update' ), 0 ); - asrt( $probe->getLogActionCount( 'delete' ), 1 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 1 ); - asrt( ( $probe->getDataFromLog( 0, 'bean' ) === $probe ), TRUE ); - asrt( ( $probe->getDataFromLog( 1, 'bean' ) === $probe ), TRUE ); - //less 'normal scenarios' - $probe = R::dispense( 'probe' ); - $probe->name = 'test'; - asrt( $probe->getLogActionCount(), 1 ); - asrt( $probe->getLogActionCount( 'dispense' ), 1 ); - asrt( $probe->getLogActionCount( 'open' ), 0 ); - asrt( $probe->getLogActionCount( 'update' ), 0 ); - asrt( $probe->getLogActionCount( 'after_update' ), 0 ); - asrt( $probe->getLogActionCount( 'delete' ), 0 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 0 ); - asrt( ( $probe->getDataFromLog( 0, 'bean' ) === $probe ), TRUE ); - R::store( $probe ); - asrt( $probe->getLogActionCount(), 3 ); - asrt( $probe->getLogActionCount( 'dispense' ), 1 ); - asrt( $probe->getLogActionCount( 'open' ), 0 ); - asrt( $probe->getLogActionCount( 'update' ), 1 ); - asrt( $probe->getLogActionCount( 'after_update' ), 1 ); - asrt( $probe->getLogActionCount( 'delete' ), 0 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 0 ); - asrt( ( $probe->getDataFromLog( 2, 'bean' ) === $probe ), TRUE ); - asrt( $probe->getMeta( 'tainted' ), FALSE ); - asrt( $probe->getMeta( 'changed' ), FALSE ); - R::store( $probe ); //not tainted, no FUSE save! - asrt( $probe->getLogActionCount(), 3 ); - asrt( $probe->getLogActionCount( 'dispense' ), 1 ); - asrt( $probe->getLogActionCount( 'open' ), 0 ); - asrt( $probe->getLogActionCount( 'update' ), 1 ); - asrt( $probe->getLogActionCount( 'after_update' ), 1 ); - asrt( $probe->getLogActionCount( 'delete' ), 0 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 0 ); - asrt( ( $probe->getDataFromLog( 2, 'bean' ) === $probe ), TRUE ); - $probe->xownProbeList[] = R::dispense( 'probe' ); - //tainted, not changed, triggers FUSE - asrt( $probe->getMeta( 'tainted' ), TRUE ); - asrt( $probe->getMeta( 'changed' ), FALSE ); - R::store( $probe ); - asrt( $probe->getMeta( 'tainted' ), FALSE ); - asrt( $probe->getMeta( 'changed' ), FALSE ); - asrt( $probe->getLogActionCount(), 5 ); - asrt( $probe->getLogActionCount( 'dispense' ), 1 ); - asrt( $probe->getLogActionCount( 'open' ), 0 ); - asrt( $probe->getLogActionCount( 'update' ), 2 ); - asrt( $probe->getLogActionCount( 'after_update' ), 2 ); - asrt( $probe->getLogActionCount( 'delete' ), 0 ); - asrt( $probe->getLogActionCount( 'after_delete' ), 0 ); - asrt( ( $probe->getDataFromLog( 2, 'bean' ) === $probe ), TRUE ); - } - - /** - * Tests the SimpleFacadeBeanHelper factory setter. - * - * @return void - */ - public function testFactory() - { - SimpleFacadeBeanHelper::setFactoryFunction( function( $name ) { - $model = new $name(); - $model->setNote( 'injected', 'dependency' ); - return $model; - } ); - - $bean = R::dispense( 'band' )->box(); - - asrt( ( $bean instanceof \Model_Band ), TRUE ); - asrt( ( $bean->getNote('injected') ), 'dependency' ); - - SimpleFacadeBeanHelper::setFactoryFunction( NULL ); - } - - /** - * Make sure that beans of type book_page can be fused with - * models like BookPage (beautified) as well as Book_Page (non-beautified). - */ - public function testBeutificationOfLinkModel() - { - $page = R::dispense( 'page' ); - $widget = R::dispense( 'widget' ); - $page->sharedWidgetList[] = $widget; - R::store( $page ); - $testReport = \Model_PageWidget::getTestReport(); - asrt( $testReport, 'didSave' ); - - $page = R::dispense( 'page' ); - $gadget = R::dispense( 'gadget' ); - $page->sharedGadgetList[] = $gadget; - R::store( $page ); - $testReport = \Model_Gadget_Page::getTestReport(); - asrt( $testReport, 'didSave' ); - } - - /** - * Only theoretical. - * - * @return void - */ - public function testTheoreticalBeautifications() - { - $bean = R::dispense('bean'); - $bean->setMeta('type', 'a_b_c'); - R::store($bean); - $testReport = \Model_A_B_C::getTestReport(); - asrt( $testReport, 'didSave' ); - } - - /** - * Test extraction of toolbox. - * - * @return void - */ - public function testGetExtractedToolBox() - { - $helper = new SimpleFacadeBeanHelper; - - list( $redbean, $database, $writer, $toolbox ) = $helper->getExtractedToolbox(); - - asrt( ( $redbean instanceof OODB ), TRUE ); - asrt( ( $database instanceof Adapter ), TRUE ); - asrt( ( $writer instanceof QueryWriter ), TRUE ); - asrt( ( $toolbox instanceof ToolBox ), TRUE ); - } - - /** - * Test FUSE and model formatting. - * - * @todo move tagging tests to tag tester. - * - * @return void - */ - public function testFUSE() - { - $toolbox = R::getToolBox(); - $adapter = $toolbox->getDatabaseAdapter(); - - $blog = R::dispense( 'blog' ); - - $blog->title = 'testing'; - $blog->blog = 'tesing'; - - R::store( $blog ); - - $blogpost = R::load( "blog", 1 ); - - $post = R::dispense( "post" ); - - $post->message = "hello"; - - $blog->sharedPost[] = $post; - R::store($blog); - - $a = R::getAll( "select * from blog " ); - - R::tag( $post, "lousy,smart" ); - - asrt( implode( ',', R::tag( $post ) ), "lousy,smart" ); - - R::tag( $post, "clever,smart" ); - - $tagz = implode( ',', R::tag( $post ) ); - - asrt( ( $tagz == "smart,clever" || $tagz == "clever,smart" ), TRUE ); - - R::tag( $blog, array( "smart", "interesting" ) ); - - asrt( implode( ',', R::tag( $blog ) ), "smart,interesting" ); - - try { - R::tag( $blog, array( "smart", "interesting", "lousy!" ) ); - - pass(); - } catch ( RedException $e ) { - fail(); - } - - asrt( implode( ',', R::tag( $blog ) ), "smart,interesting,lousy!" ); - asrt( implode( ",", R::tag( $blog ) ), "smart,interesting,lousy!" ); - - R::untag( $blog, array( "smart", "interesting" ) ); - - asrt( implode( ",", R::tag( $blog ) ), "lousy!" ); - - asrt( R::hasTag( $blog, array( "lousy!" ) ), TRUE ); - asrt( R::hasTag( $blog, array( "lousy!", "smart" ) ), TRUE ); - asrt( R::hasTag( $blog, array( "lousy!", "smart" ), TRUE ), FALSE ); - - R::tag( $blog, FALSE ); - - asrt( count( R::tag( $blog ) ), 0 ); - - R::tag( $blog, array( "funny", "comic" ) ); - - asrt( count( R::tag( $blog ) ), 2 ); - - R::addTags( $blog, array( "halloween" ) ); - - asrt( count( R::tag( $blog ) ), 3 ); - asrt( R::hasTag( $blog, array( "funny", "commic", "halloween" ), TRUE ), FALSE ); - - R::unTag( $blog, array( "funny" ) ); - R::addTags( $blog, "horror" ); - - asrt( count( R::tag( $blog ) ), 3 ); - asrt( R::hasTag( $blog, array( "horror", "commic", "halloween" ), TRUE ), FALSE ); - - // No double tags - R::addTags( $blog, "horror" ); - - asrt( R::hasTag( $blog, array( "horror", "commic", "halloween" ), TRUE ), FALSE ); - asrt( count( R::tag( $blog ) ), 3 ); - } - - /** - * Test error handling options FUSE. - */ - public function testModelErrorHandling() - { - $test = R::dispense( 'feed' ); - $test->nonExistantMethod(); - pass(); - $old = R::setErrorHandlingFUSE( OODBBean::C_ERR_LOG ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], FALSE ); - asrt( $old[1], NULL); - $test->nonExistantMethod(); //we cant really test this... :( - pass(); - - $old = R::setErrorHandlingFUSE( OODBBean::C_ERR_NOTICE ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], OODBBean::C_ERR_LOG ); - asrt( $old[1], NULL); - set_error_handler(function($error, $str) { - asrt( $str, 'FUSE: method does not exist in model: nonExistantMethod' ); - }, E_USER_NOTICE); - $test->nonExistantMethod(); - restore_error_handler(); - - $old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_WARN ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], OODBBean::C_ERR_NOTICE ); - asrt( $old[1], NULL); - set_error_handler(function($error, $str) { - asrt( $str, 'FUSE: method does not exist in model: nonExistantMethod' ); - }, E_USER_WARNING); - $test->nonExistantMethod(); - restore_error_handler(); - - $old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_FATAL ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], OODBBean::C_ERR_WARN ); - asrt( $old[1], NULL); - set_error_handler(function($error, $str) { - asrt( $str, 'FUSE: method does not exist in model: nonExistantMethod' ); - }, E_USER_ERROR); - $test->nonExistantMethod(); - restore_error_handler(); - - $old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_EXCEPTION ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], OODBBean::C_ERR_FATAL ); - asrt( $old[1], NULL); - try { - $test->nonExistantMethod(); - fail(); - } catch (\Exception $e) { - pass(); - } - - global $test_bean; - $test_bean = $test; - global $has_executed_error_func_fuse; - $has_executed_error_func_fuse = FALSE; - $old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_FUNC, function( $info ){ - global $has_executed_error_func_fuse; - global $test_bean; - $has_executed_error_func_fuse = TRUE; - asrt( is_array( $info ), TRUE ); - asrt( $info['method'], 'nonExistantMethod' ); - asrt( json_encode( $info['bean']->export() ), json_encode( $test_bean->export() ) ); - asrt( $info['message'], 'FUSE: method does not exist in model: nonExistantMethod' ); - } ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], OODBBean::C_ERR_EXCEPTION ); - asrt( $old[1], NULL); - $test->nonExistantMethod(); - asrt( $has_executed_error_func_fuse, TRUE ); - - $old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_IGNORE ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], OODBBean::C_ERR_FUNC ); - asrt( is_callable( $old[1] ), TRUE ); - - $old = OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_IGNORE ); - asrt( is_array( $old ), TRUE ); - asrt( count( $old ), 2 ); - asrt( $old[0], OODBBean::C_ERR_IGNORE ); - asrt( $old[1], NULL); - - try { - OODBBean::setErrorHandlingFUSE( 900 ); - fail(); - } catch (\Exception $e) { - pass(); - asrt( $e->getMessage(), 'Invalid error mode selected' ); - } - - try { - OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_FUNC, 'hello' ); - fail(); - } catch (\Exception $e) { - pass(); - asrt( $e->getMessage(), 'Invalid error handler' ); - } - - OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_EXCEPTION ); - //make sure ignore FUSE events - $test = R::dispense('feed'); - R::store( $test ); - $test = $test->fresh(); - R::trash( $test ); - pass(); - OODBBean::setErrorHandlingFUSE( OODBBean::C_ERR_IGNORE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Indexes.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Indexes.php deleted file mode 100644 index 934afe39..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Indexes.php +++ /dev/null @@ -1,132 +0,0 @@ -ownPageList[] = $page; - R::store( $book ); - $indexes = getIndexes( 'page' ); - asrt( in_array( 'index_foreignkey_page_book', $indexes ), TRUE ); - } - - /** - * Tests indexes on parent beans. - * - * @return void - */ - public function testIndexCreationParentBean() - { - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $page->book = $book; - R::store( $page ); - $indexes = getIndexes( 'page' ); - asrt( in_array( 'index_foreignkey_page_book', $indexes ), TRUE ); - } - - /** - * Tests indexes on link tables. - * - * @return void - */ - public function testIndexCreationMany2Many() - { - R::nuke(); - $book = R::dispense( 'book' ); - $category = R::dispense( 'category' ); - $book->sharedCategoryList[] = $category; - R::store( $book ); - $indexes = getIndexes( 'book_category' ); - asrt( in_array( 'index_foreignkey_book_category_book', $indexes ), TRUE ); - asrt( in_array( 'index_foreignkey_book_category_category', $indexes ), TRUE ); - R::nuke(); - R::nuke(); - $book = R::dispense( 'book' ); - $category = R::dispense( 'category' ); - $category->sharedBookList[] = $book; - R::store( $category ); - $indexes = getIndexes( 'book_category' ); - asrt( in_array( 'index_foreignkey_book_category_book', $indexes ), TRUE ); - asrt( in_array( 'index_foreignkey_book_category_category', $indexes ), TRUE ); - } - - /** - * Tests indexes on aliases. - * - * @return void - */ - public function testIndexCreationAlias() - { - R::nuke(); - $book = R::dispense( 'book' ); - $author = R::dispense( 'author' ); - $book->coAuthor = $author; - R::store( $book ); - $indexes = getIndexes( 'book' ); - asrt( in_array( 'index_foreignkey_book_co_author', $indexes ), TRUE ); - R::nuke(); - $project = R::dispense( 'project' ); - $person = R::dispense( 'person' ); - $person->alias( 'teacher' )->ownProject[] = $project; - $person2 = R::dispense( 'person' ); - $person2->alias( 'student' )->ownProject[] = $project; - R::store( $person ); - $indexes = getIndexes( 'project' ); - asrt( in_array( 'index_foreignkey_project_teacher', $indexes ), TRUE ); - R::store( $person2 ); - $indexes = getIndexes( 'project' ); - asrt( in_array( 'index_foreignkey_project_student', $indexes ), TRUE ); - } - - /** - * Tests index fails. - * - * @return void - */ - public function testIndexCreationFail() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->author_id = 'a'; - R::store( $book ); - $indexes = getIndexes( 'book' ); - //should just work fine - asrt( in_array( 'index_foreignkey_book_author', $indexes ), TRUE ); - //these should just pass, no indexes but no errors as well - R::getWriter()->addIndex( 'book', 'bla', 'nonexist' ); - pass(); - R::getWriter()->addIndex( 'book', '@#$', 'nonexist' ); - pass(); - R::getWriter()->addIndex( 'nonexist', 'bla', 'nonexist' ); - pass(); - $indexesAfter = getIndexes( 'book' ); - asrt( count( $indexesAfter ), count( $indexes ) ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue259.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue259.php deleted file mode 100644 index 3d4bebd4..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue259.php +++ /dev/null @@ -1,75 +0,0 @@ -desc = 'I am mother'; - - R::store( $mother ); - - $child = R::dispense( 'child' ); - - $child->mother = $mother; - $child->desc = 'I am child'; - - $id = R::store( $child ); - - R::findOne( 'child', ' id = ?', array( $id ) ); - - R::find( 'child', ' id = ? ', array( $id ) ); - - R::load( 'child', $id ); - } -} -/** - * Mock Model. - */ -class Model_Mother extends SimpleModel -{ - public function open() - { - $bean = $this->bean; - // $this & $bean are both referencing child incorrectly! - asrt( $this->bean->desc, 'I am mother' ); - } -} -/** - * Mock Model. - */ -class Model_Child extends SimpleModel -{ - public function open() - { - $this->bean->mother; - asrt( $this->bean->desc, 'I am child' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue303.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue303.php deleted file mode 100644 index 9e5dbfb4..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue303.php +++ /dev/null @@ -1,54 +0,0 @@ -setAttr( 'invalid.property', 'value' ) ); - fail(); - } catch (RedException $e ) { - asrt( $e->getMessage(), 'Invalid Bean property: property invalid.property' ); - } - - try { - R::store( R::dispense( 'invalidbean' )->setAttr( 'property', array() ) ); - fail(); - } catch (RedException $e ) { - asrt( $e->getMessage(), 'Invalid Bean value: property property' ); - } - - try { - R::store( R::dispense( 'invalidbean' )->setAttr( 'property', new \stdClass ) ); - fail(); - } catch (RedException $e ) { - asrt( $e->getMessage(), 'Invalid Bean value: property property' ); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue408.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue408.php deleted file mode 100644 index 629a8d9e..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue408.php +++ /dev/null @@ -1,79 +0,0 @@ -post = array( - 'first', - 'second' - ); - R::store( $feed ); - $rows = R::getAll('SELECT * FROM feed'); - asrt( $rows[0]['post'], '["first","second"]' ); - $feed = $feed->fresh(); - asrt( is_array( $feed->post ), TRUE ); - asrt( $feed->post[0], 'first' ); - asrt( $feed->post[1], 'second' ); - R::store( $feed ); - $rows = R::getAll('SELECT * FROM feed'); - asrt( $rows[0]['post'], '["first","second"]' ); - $feed = R::load( 'feed', $feed->id ); - $feed->post[] = 'third'; - R::store( $feed ); - $rows = R::getAll('SELECT * FROM feed'); - asrt( $rows[0]['post'], '["first","second","third"]' ); - $feed = $feed->fresh(); - asrt( is_array( $feed->post ), TRUE ); - asrt( $feed->post[0], 'first' ); - asrt( $feed->post[1], 'second' ); - asrt( $feed->post[2], 'third' ); - //now the catch: can we use export? - //PHP Fatal error: Call to a member function export() on a non-object - $feeds = R::exportAll( R::find( 'feed' ) ); - asrt( is_array( $feeds ), TRUE ); - $feed = reset( $feeds ); - asrt( $feed['post'][0], 'first' ); - asrt( $feed['post'][1], 'second' ); - asrt( $feed['post'][2], 'third' ); - //can we also dup()? - $feedOne = R::findOne( 'feed' ); - R::store( R::dup( $feedOne ) ); - asrt( R::count( 'feed' ), 2 ); - //can we delete? - R::trash( $feedOne ); - asrt( R::count( 'feed' ), 1 ); - $feedTwo = R::findOne( 'feed' ); - $feed = $feedTwo->export(); - asrt( $feed['post'][0], 'first' ); - asrt( $feed['post'][1], 'second' ); - asrt( $feed['post'][2], 'third' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue90.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue90.php deleted file mode 100644 index f6057d21..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Issue90.php +++ /dev/null @@ -1,50 +0,0 @@ -name = 'a'; - - $f = R::dispense( 'bottle' ); - - $s->ownBottle[] = $f; - - R::store( $s ); - - $s2 = R::dispense( 'box' ); - - $s2->name = 'a'; - - R::store( $s2 ); - - R::trash( $s2 ); - - pass(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php deleted file mode 100644 index 2bb4f460..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Joins.php +++ /dev/null @@ -1,235 +0,0 @@ -title = 'x'; - $author->xownBookList[] = $book; - $book->info = $info; - $book = R::dispense( 'book' ); - $info = R::dispense( 'info' ); - $info->title = 'y'; - $author->xownBookList[] = $book; - $book->info = $info; - R::store( $author ); - $author = $author->fresh(); - $books = $author->withCondition(' @joined.info.title != ? ', array('x'))->countOwn('book'); - asrt($books, 1); - $books = $author->withCondition(' @joined.info.title != ? ', array('y'))->countOwn('book'); - asrt($books, 1); - $books = $author->withCondition(' @joined.info.title IN (?,?) ', array('x','y'))->countOwn('book'); - asrt($books, 2); - } - - /** - * Test Joins. - * - * @return void - */ - public function testJoins() - { - R::nuke(); - - list($a1, $a2, $a3) = R::dispense('area', 3); - list($p1, $p2) = R::dispense('person', 2); - list($v1, $v2, $v3, $v4) = R::dispense('visit', 4); - $a1->name = 'Belgium'; - $a2->name = 'Arabia'; - $a3->name = 'France'; - $v1->person = $p1; - $v2->person = $p1; - $v3->person = $p2; - $v4->person = $p2; - $v1->area = $a3; - $v2->area = $a2; - $v3->area = $a2; - $v4->area = $a1; - $v1->label = 'v1 to France'; - $v2->label = 'v2 to Arabia'; - $v3->label = 'v3 to Arabia'; - $v4->label = 'v4 to Belgium'; - R::storeAll( array($v1,$v2,$v3,$v4) ); - $visits = $p1->ownVisit; - asrt( is_array( $visits ), TRUE ); - asrt( count( $visits ), 2 ); - $names = array(); - foreach( $visits as $visit ) { - asrt( isset( $visit->label ), TRUE ); - asrt( isset( $visit->name ), FALSE ); - asrt( isset( $visit->visit_id ), FALSE ); - $names[] = $visit->label; - } - $labelList = implode( ',', $names ); - asrt( $labelList, 'v1 to France,v2 to Arabia' ); - $visits = $p1 - ->with('ORDER BY @joined.area.name ASC')->ownVisit; - asrt( is_array( $visits ), TRUE ); - asrt( count( $visits ), 2 ); - $names = array(); - foreach( $visits as $visit ) { - asrt( isset( $visit->label ), TRUE ); - asrt( isset( $visit->name ), FALSE ); - asrt( isset( $visit->visit_id ), FALSE ); - $names[] = $visit->label; - } - $labelList = implode( ',', $names ); - asrt( $labelList, 'v2 to Arabia,v1 to France' ); - } - - /** - * Helper for the next test. - * - * @param array $books the books we are going to check - * @param string $numberList the numbers that are expected - * - * @return void - */ - private function checkBookNumbers( $books, $numberList ) - { - $numbers = explode( ',', $numberList ); - asrt( is_array( $books ), TRUE ); - asrt( count( $books ), count( $numbers ) ); - $bookNumbers = ''; - $bookNumberArray = array(); - foreach( $books as $book ) { - asrt( isset( $book->num ), TRUE ); - asrt( isset( $book->title), FALSE ); - $bookNumberArray[] = $book->num; - } - $bookNumbers = implode( ',', $bookNumberArray); - asrt( $bookNumbers, $numberList ); - } - - /** - * Tests the more complicated scenarios for - * with-joins. - * - * @return void - */ - private function testComplexCombinationsJoins() - { - $author = R::dispense( 'author' ); - $books = R::dispense( 'book', 4 ); - $books[0]->num = 0; - $books[1]->num = 1; - $books[2]->num = 2; - $books[3]->num = 3; - $books[0]->info = R::dispense('info')->setAttr('title', 'Learning PHP'); - $books[1]->info = R::dispense('info')->setAttr('title', 'Learning PHP and JavaScript'); - $books[2]->info = R::dispense('info')->setAttr('title', 'Learning Cobol'); - $books[3]->info = R::dispense('info')->setAttr('title','Gardening for Beginners'); - $books[0]->category = R::dispense('category')->setAttr('title', 'computers'); - $books[1]->category = R::dispense('category')->setAttr('title', 'computers'); - $books[2]->category = R::dispense('category')->setAttr('title', 'computers'); - $books[3]->category = R::dispense('category')->setAttr('title','gardening'); - $author->ownBookList = $books; - R::store($author); - //Base test... - $books = $author->ownBookList; - $this->checkBookNumbers( $books, '0,1,2,3' ); - //Just a basic Join... - $books = $author->withCondition(' @joined.info.title LIKE ? ORDER BY book.num ASC ', array( '%PHP%' ) )->ownBookList; - $this->checkBookNumbers( $books, '0,1' ); - //Mix Join and criteria - $books = $author->withCondition(' @joined.info.title LIKE ? AND num > 0 ORDER BY book.num ASC ', array( '%PHP%' ) )->ownBookList; - $this->checkBookNumbers( $books, '1' ); - //Basic join - $books = $author->withCondition(' @joined.info.title LIKE ? ORDER BY book.num ASC', array( '%ing%' ) )->ownBookList; - $this->checkBookNumbers( $books, '0,1,2,3' ); - //Two joins - $books = $author->withCondition(' @joined.info.title LIKE ? AND @joined.category.title = ? ORDER BY book.num ASC', array( '%ing%', 'computers' ) )->ownBookList; - $this->checkBookNumbers( $books, '0,1,2' ); - //Join the same type twice... and order - $books = $author->withCondition(' @joined.info.title LIKE ? AND @joined.category.title = ? ORDER BY @joined.info.title ASC ', array( '%ing%', 'computers' ) )->ownBookList; - $this->checkBookNumbers( $books, '2,0,1' ); - //Join the same type twice - $books = $author->withCondition(' @joined.info.title LIKE ? AND @joined.info.title LIKE ? ORDER BY book.num ASC', array( '%ing%', '%Learn%' ) )->ownBookList; - $this->checkBookNumbers( $books, '0,1,2' ); - //Join the same type 3 times and order - $books = $author->withCondition(' @joined.info.title LIKE ? AND @joined.info.title LIKE ? ORDER BY @joined.info.title DESC', array( '%ing%', '%Learn%' ) )->ownBookList; - $this->checkBookNumbers( $books, '1,0,2' ); - //Join the same type 3 times and order and limit - $books = $author->withCondition(' @joined.info.title LIKE ? AND @joined.info.title LIKE ? ORDER BY @joined.info.title DESC LIMIT 1', array( '%ing%', '%Learn%' ) )->ownBookList; - $this->checkBookNumbers( $books, '1' ); - //Other combinations I can think of... - $books = $author->withCondition(' @joined.category.title LIKE ? ORDER BY @joined.info.title DESC', array( '%ing%' ) )->ownBookList; - $this->checkBookNumbers( $books, '3' ); - $books = $author->withCondition(' @joined.category.title LIKE ? AND num < 4 ORDER BY @joined.info.title DESC', array( '%ing%' ) )->ownBookList; - $this->checkBookNumbers( $books, '3' ); - //multiple ordering - $books = $author->with(' ORDER BY @joined.category.title ASC, @joined.info.title ASC' )->ownBookList; - $this->checkBookNumbers( $books, '2,0,1,3' ); - $books = $author->with(' ORDER BY @joined.category.title DESC, @joined.info.title ASC' )->ownBookList; - $this->checkBookNumbers( $books, '3,2,0,1' ); - $books = $author->with(' ORDER BY @joined.category.title DESC, @joined.info.title ASC LIMIT 2' )->ownBookList; - $this->checkBookNumbers( $books, '3,2' ); - } - - /** - * Tests the more complicated scenarios for - * with-joins. - * - * @return void - */ - public function testComplexInFrozenMode() - { - R::freeze( FALSE ); - $this->testComplexCombinationsJoins(); - R::freeze( TRUE ); - $this->testComplexCombinationsJoins(); - R::freeze( FALSE ); - } - - /** - * Tests R::setNarrowFieldMode() and - * OODBBean::ignoreJoinFeature(). - */ - public function testSystemWideSettingsForJoins() - { - R::nuke(); - $author = R::dispense( 'author' ); - $book = R::dispense( 'book' ); - $info = R::dispense( 'info' ); - $info->title = 'x'; - $author->xownBookList[] = $book; - $book->info = $info; - R::store( $author ); - $author = $author->fresh(); - $books = $author->withCondition(' @joined.info.title != ? ', array('y1') )->xownBookList; - $firstBook = reset( $books ); - asrt( isset( $firstBook->title ), FALSE ); - R::setNarrowFieldMode( FALSE ); - $author = $author->fresh(); - $books = $author->withCondition(' @joined.info.title != ? ', array('y2') )->xownBookList; - $firstBook = reset( $books ); - asrt( isset( $firstBook->title ), TRUE ); - R::setNarrowFieldMode( TRUE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php deleted file mode 100644 index 9a5c6a1a..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Keywords.php +++ /dev/null @@ -1,79 +0,0 @@ -$k = $k; - - $id = R::store( $bean ); - - $bean = R::load( $k, $id ); - - $bean2 = R::dispense( 'other' ); - - $bean2->name = $k; - - $bean->bean = $bean2; - - $bean->ownBean[] = $bean2; - $bean->sharedBean[] = $bean2; - - $id = R::store( $bean ); - - R::trash( $bean ); - - pass(); - } - - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php deleted file mode 100644 index 9a3cb4a8..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Largenum.php +++ /dev/null @@ -1,40 +0,0 @@ -name = 'big number'; - R::store( $number ); - //This should not cause an error... (some people use LIMIT 0, HUGE to simulate OFFSET on MYSQL). - $beans = R::findAll( 'number', ' LIMIT ? ', array( PHP_INT_MAX ) ); - asrt( is_array( $beans ), TRUE ); - asrt( count( $beans ), 1 ); - pass(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php deleted file mode 100644 index 59090574..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Logging.php +++ /dev/null @@ -1,110 +0,0 @@ - 0 ), TRUE ); - asrt( ( R::getLogger() instanceof Logger ), TRUE ); - R::stopLogging(); - R::store( R::dispense( 'book' ) ); - $logs = R::getLogs(); - asrt( ( count( $logs ) === 0 ), TRUE ); - } - - /** - * Can we manually set a logger and enable logging? - * - * @return void - */ - public function testCanSetLogger() - { - R::nuke(); - R::store( R::dispense( 'bean' ) ); - $logger = new RDefault; - $logger->setMode( RDefault::C_LOGGER_ARRAY ); - $database = R::getDatabaseAdapter()->getDatabase(); - $database->setLogger( $logger ); - asrt( $database->getLogger(), $logger ); - $database->setEnableLogging( FALSE ); - $logs = $logger->getLogs(); - asrt( is_array( $logs ), TRUE ); - asrt( count( $logs ), 0 ); - $database->setEnableLogging( TRUE ); - $logs = $logger->getLogs(); - asrt( is_array( $logs ), TRUE ); - asrt( count( $logs ), 0 ); - R::findOne( 'bean' ); //writes 3 log entries - $logs = $logger->getLogs(); - asrt( is_array( $logs ), TRUE ); - asrt( count( $logs ), 3 ); - } - - /** - * Test query counter. - * - * @return void - */ - public function testQueryCount() - { - R::nuke(); - R::store( R::dispense( 'bean' ) ); - R::resetQueryCount(); - asrt( R::getQueryCount(), 0 ); - R::findOne( 'bean' ); - asrt( R::getQueryCount(), 1 ); - R::resetQueryCount(); - asrt( R::getQueryCount(), 0 ); - R::findOne( 'bean' ); - R::findOne( 'bean' ); - R::findOne( 'bean' ); - asrt( R::getQueryCount(), 0 ); - R::store( R::dispense( 'bean2' ) ); - R::resetQueryCount(); - R::findOne( 'bean' ); - R::findOne( 'bean2' ); - asrt( R::getQueryCount(), 2 ); - R::resetQueryCount(); - R::findOne( 'bean', ' id < 100' ); - R::findOne( 'bean', ' id < 101' ); - R::findOne( 'bean', ' id < 102' ); - R::findOne( 'bean', ' id < 103' ); - asrt( R::getQueryCount(), 4 ); - R::findOne( 'bean', ' id < 100' ); - R::findOne( 'bean', ' id < 101' ); - R::findOne( 'bean', ' id < 102' ); - R::findOne( 'bean', ' id < 103' ); - asrt( R::getQueryCount(), 4 ); - R::findOne( 'bean', ' id < 104' ); - asrt( R::getQueryCount(), 5 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php deleted file mode 100644 index 95caed61..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Misc.php +++ /dev/null @@ -1,677 +0,0 @@ -pages = 100; - $book->title = 'book'; - R::store( $book ); - $book = R::findOne( 'book' ); - asrt( $book->hasChanged( 'title' ), FALSE ); - $book->title = 'yes'; - R::store( $book ); - asrt( $book->hasChanged( 'title' ), TRUE ); - OODB::autoClearHistoryAfterStore( TRUE ); - $book = R::findOne( 'book' ); - asrt( $book->hasChanged( 'title' ), FALSE ); - $book->title = 'yes2'; - R::store( $book ); - asrt( $book->hasChanged( 'title' ), FALSE ); - OODB::autoClearHistoryAfterStore( FALSE ); - $book = R::findOne( 'book' ); - asrt( $book->hasChanged( 'title' ), FALSE ); - $book->title = 'yes'; - R::store( $book ); - asrt( $book->hasChanged( 'title' ), TRUE ); - } - - /** - * Tests the R::inspect() method on the Facade. - * - * @return void - */ - public function testInspect() { - - testpack( 'Test R::inspect() ' ); - - R::nuke(); - - R::store( R::dispense( 'book' )->setAttr( 'title', 'book' ) ); - - $info = R::inspect(); - asrt( count( $info ), 1 ); - asrt( strtolower( $info[0] ), 'book' ); - - $info = R::inspect( 'book' ); - asrt( count( $info ), 2 ); - - $keys = array_keys( $info ); - sort($keys); - asrt( strtolower( $keys[0] ), 'id' ); - asrt( strtolower( $keys[1] ), 'title' ); - } - - /** - * Test whether we can use the tableExist() method in OODB - * instances directly to help us determine - * the existance of a table. - * - * @return void - */ - public function testTableExist() - { - R::nuke(); - R::store( R::dispense( 'book' ) ); - R::freeze( FALSE ); - asrt( R::getRedBean()->tableExists( 'book' ), TRUE ); - asrt( R::getRedBean()->tableExists( 'book2' ), FALSE ); - R::freeze( TRUE ); - asrt( R::getRedBean()->tableExists( 'book' ), TRUE ); - asrt( R::getRedBean()->tableExists( 'book2' ), FALSE ); - R::freeze( FALSE ); - } - - /** - * Normally the check() method is always called indirectly when - * dealing with beans. This test ensures we can call check() - * directly. Even though frozen repositories do not rely on - * bean checking to improve performance the method should still - * offer the same functionality when called directly. - * - * @return void - */ - public function testCheckDirectly() - { - $bean = new OODBBean; - $bean->id = 0; - $bean->setMeta( 'type', 'book' ); - R::getRedBean()->check( $bean ); - $bean->setMeta( 'type', '.' ); - try { - R::getRedBean()->check( $bean ); - fail(); - } catch ( \Exception $e ) { - pass(); - } - //check should remain the same even if frozen repo is used, method is public after all! - //we dont want to break the API! - R::freeze( TRUE ); - try { - R::getRedBean()->check( $bean ); - fail(); - } catch ( \Exception $e ) { - pass(); - } - R::freeze( FALSE ); - } - - /** - * Test Backward compatibility writer ESC-method. - * - * @return void - */ - public function testLegacyCode() - { - testpack( 'Test Backward compatibility methods in writer.' ); - - asrt( R::getWriter()->safeColumn( 'column', TRUE ), R::getWriter()->esc( 'column', TRUE ) ); - asrt( R::getWriter()->safeColumn( 'column', FALSE ), R::getWriter()->esc( 'column', FALSE ) ); - asrt( R::getWriter()->safeTable( 'table', TRUE ), R::getWriter()->esc( 'table', TRUE ) ); - asrt( R::getWriter()->safeTable( 'table', FALSE ), R::getWriter()->esc( 'table', FALSE ) ); - } - - /** - * Test beautification and array functions. - * - * @return void - */ - public function testBeauficationAndArrayFunctions() - { - $bean = R::dispense( 'bean' ); - $bean->isReallyAwesome = TRUE; - asrt( isset( $bean->isReallyAwesome ), TRUE ); - asrt( isset( $bean->is_really_awesome ), TRUE ); - unset( $bean->is_really_awesome ); - asrt( isset( $bean->isReallyAwesome ), FALSE ); - asrt( isset( $bean->is_really_awesome ), FALSE ); - } - - /** - * Test beautification of column names. - * - * @return void - */ - public function testBeautifulColumnNames() - { - testpack( 'Beautiful column names' ); - - $town = R::dispense( 'town' ); - - $town->isCapital = FALSE; - $town->hasTrainStation = TRUE; - $town->name = 'BeautyVille'; - - $houses = R::dispense( 'house', 2 ); - - $houses[0]->isForSale = TRUE; - - $town->ownHouse = $houses; - - R::store( $town ); - - $town = R::load( 'town', $town->id ); - - asrt( ( $town->isCapital == FALSE ), TRUE ); - asrt( ( $town->hasTrainStation == TRUE ), TRUE ); - asrt( ( $town->name == 'BeautyVille' ), TRUE ); - - testpack( 'Accept datetime objects.' ); - - $cal = R::dispense( 'calendar' ); - - $cal->when = new\DateTime( '2000-01-01', new\DateTimeZone( 'Pacific/Nauru' ) ); - - asrt( $cal->when, '2000-01-01 00:00:00' ); - - testpack( 'Affected rows test' ); - - $currentDriver = $this->currentlyActiveDriverID; - - $toolbox = R::getToolBox(); - $adapter = $toolbox->getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $bean = $redbean->dispense( 'bean' ); - - $bean->prop = 3; //make test run with strict mode as well - - $redbean->store( $bean ); - - $adapter->exec( 'UPDATE bean SET prop = 2' ); - - asrt( $adapter->getAffectedRows(), 1 ); - - testpack( 'Testing Logger' ); - - R::getDatabaseAdapter()->getDatabase()->setLogger( new RDefault ); - - asrt( ( R::getDatabaseAdapter()->getDatabase()->getLogger() instanceof Logger ), TRUE ); - asrt( ( R::getDatabaseAdapter()->getDatabase()->getLogger() instanceof RDefault ), TRUE ); - - $bean = R::dispense( 'bean' ); - - $bean->property = 1; - $bean->unsetAll( array( 'property' ) ); - - asrt( $bean->property, NULL ); - - asrt( ( $bean->setAttr( 'property', 2 ) instanceof OODBBean ), TRUE ); - asrt( $bean->property, 2 ); - - asrt( preg_match( '/\d\d\d\d\-\d\d\-\d\d/', R::isoDate() ), 1 ); - asrt( preg_match( '/\d\d\d\d\-\d\d\-\d\d\s\d\d:\d\d:\d\d/', R::isoDateTime() ), 1 ); - - $redbean = R::getRedBean(); - $adapter = R::getDatabaseAdapter(); - $writer = R::getWriter(); - - asrt( ( $redbean instanceof OODB ), TRUE ); - asrt( ( $adapter instanceof Adapter ), TRUE ); - asrt( ( $writer instanceof QueryWriter ), TRUE ); - - R::setRedBean( $redbean ); - pass(); //cant really test this - - R::setDatabaseAdapter( $adapter ); - pass(); //cant really test this - - R::setWriter( $writer ); - pass(); //cant really test this - - $u1 = R::dispense( 'user' ); - - $u1->name = 'Gabor'; - $u1->login = 'g'; - - $u2 = R::dispense( 'user' ); - - $u2->name = 'Eric'; - $u2->login = 'e'; - - R::store( $u1 ); - R::store( $u2 ); - - $list = R::getAssoc( 'select login,' . R::getWriter()->esc( 'name' ) . ' from ' . R::getWriter()->esc( 'user' ) . ' ' ); - - asrt( $list['e'], 'Eric' ); - asrt( $list['g'], 'Gabor' ); - - $painting = R::dispense( 'painting' ); - - $painting->name = 'Nighthawks'; - - $id = R::store( $painting ); - - testpack( 'Testing SQL Error Types' ); - - foreach ( $writer->typeno_sqltype as $code => $text ) { - asrt( is_integer( $code ), TRUE ); - asrt( is_string( $text ), TRUE ); - } - - foreach ( $writer->sqltype_typeno as $text => $code ) { - asrt( is_integer( $code ), TRUE ); - asrt( is_string( $text ), TRUE ); - } - - testpack( 'Testing Nowhere Pt. 1 (unfrozen)' ); - - foreach ( - array( - 'exec', 'getAll', 'getCell', 'getAssoc', 'getRow', 'getCol' - ) - as $method ) { - - R::$method( 'select * from nowhere' ); - pass(); - } - - testpack( 'Testing Nowhere Pt. 2 (frozen)' ); - - R::freeze( TRUE ); - - foreach ( - array( - 'exec', 'getAll', 'getCell', 'getAssoc', 'getRow', 'getCol' - ) - as $method ) { - - try { - R::$method( 'select * from nowhere' ); - - fail(); - } catch ( SQL $e ) { - pass(); - } - } - - R::freeze( FALSE ); - } - - /** - * Test reflectional functions of database. - * - * @return void - */ - public function testDatabaseProperties() - { - testpack( 'Testing Database Properties' ); - - $adapter = R::getDatabaseAdapter(); - - if ( method_exists( R::getDatabaseAdapter()->getDatabase(), 'getPDO' ) ){ - asrt( $adapter->getDatabase()->getPDO() instanceof \PDO, TRUE ); - } - - asrt( strlen( $adapter->getDatabase()->getDatabaseVersion() ) > 0, TRUE ); - asrt( strlen( $adapter->getDatabase()->getDatabaseType() ) > 0, TRUE ); - } - - /** - * Test Transactions. - * - * @return void - */ - public function testTransactions() - { - testpack( 'transactions' ); - - R::begin(); - - $bean = R::dispense( 'bean' ); - - R::store( $bean ); - R::commit(); - - asrt( R::count( 'bean' ), 1 ); - - R::wipe( 'bean' ); - R::freeze( 1 ); - R::begin(); - - $bean = R::dispense( 'bean' ); - - R::store( $bean ); - R::rollback(); - - asrt( R::count( 'bean' ), 0 ); - - R::freeze( FALSE ); - - testpack( 'genSlots' ); - - asrt( R::genSlots( array( 'a', 'b' ) ), '?,?' ); - asrt( R::genSlots( array( 'a' ) ), '?' ); - asrt( R::genSlots( array() ), '' ); - } - - /** - * Test nested FUSE scenarios. - * - * @return void - */ - public function testFUSEnested() - { - testpack( 'FUSE models cant touch nested beans in update() - issue 106' ); - - $spoon = R::dispense( 'spoon' ); - $spoon->name = 'spoon for test bean'; - - $deep = R::dispense( 'deep' ); - $deep->name = 'deepbean'; - - $item = R::dispense( 'item' ); - $item->val = 'Test'; - $item->deep = $deep; - - $test = R::dispense( 'test' ); - - $test->item = $item; - $test->sharedSpoon[] = $spoon; - - $test->isnowtainted = TRUE; - - $id = R::store( $test ); - $test = R::load( 'test', $id ); - - asrt( $test->item->val, 'Test2' ); - - $can = reset( $test->ownCan ); - $spoon = reset( $test->sharedSpoon ); - - asrt( $can->name, 'can for bean' ); - asrt( $spoon->name, 'S2' ); - asrt( $test->item->deep->name, '123' ); - asrt( count( $test->ownCan ), 1 ); - asrt( count( $test->sharedSpoon ), 1 ); - asrt( count( $test->sharedPeas ), 10 ); - asrt( count( $test->ownChip ), 9 ); - } - - /** - * Tests FUSE and lists, FUSE enforces no more than - * 3 sugar cubes in coffee. - * - * @return void - */ - public function testCoffeeWithSugarAndFUSE() - { - $coffee = R::dispense( 'coffee' ); - - $coffee->size = 'XL'; - $coffee->ownSugar = R::dispense( 'sugar', 5 ); - - $id = R::store( $coffee ); - - $coffee = R::load( 'coffee', $id ); - - asrt( count( $coffee->ownSugar ), 3 ); - - $coffee->ownSugar = R::dispense( 'sugar', 2 ); - - $id = R::store( $coffee ); - $coffee = R::load( 'coffee', $id ); - - asrt( count( $coffee->ownSugar ), 2 ); - - $cocoa = R::dispense( 'cocoa' ); - - $cocoa->name = 'Fair Cocoa'; - - list( $taste1, $taste2 ) = R::dispense( 'taste', 2 ); - - $taste1->name = 'sweet'; - $taste2->name = 'bitter'; - - $cocoa->ownTaste = array( $taste1, $taste2 ); - - R::store( $cocoa ); - - $cocoa->name = 'Koko'; - - R::store( $cocoa ); - - if ( method_exists( R::getDatabaseAdapter()->getDatabase(), 'getPDO' ) ) { - $pdo = R::getDatabaseAdapter()->getDatabase()->getPDO(); - $driver = new RPDO( $pdo ); - - pass(); - - asrt( $pdo->getAttribute(\PDO::ATTR_ERRMODE ),\PDO::ERRMODE_EXCEPTION ); - asrt( $pdo->getAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE ),\PDO::FETCH_ASSOC ); - asrt( strval( $driver->GetCell( 'select 123' ) ), '123' ); - } - - $a = new SQL; - $a->setSqlState( 'test' ); - - $b = strval( $a ); - - asrt( ( strpos( $b, '[test] - ' ) === 0 ), TRUE ); - } - - /** - * ENUM Basic tests. - * - * @return void - */ - public function testENUMBasics() { - asrt( R::enum( 'gender:male' )->name, 'MALE' ); - asrt( R::enum( 'country:South-Africa' )->name, 'SOUTH_AFRICA' ); - asrt( R::enum( 'tester:T@E S_t' )->name, 'T_E_S_T' ); - } - - /** - * Test ENUM in Queries and with short hand notation. - * - * @return void - */ - public function testENUMInQuery() - { - testpack('Test ENUM in Query and test ENUM short notation'); - - R::nuke(); - - $coffee = R::dispense( 'coffee' ); - $coffee->taste = R::enum( 'flavour:mocca' ); - - R::store( $coffee ); - - $coffee = R::dispense( 'coffee' ); - $coffee->taste = R::enum( 'flavour:banana' ); - - R::store( $coffee ); - - $coffee = R::dispense( 'coffee' ); - $coffee->taste = R::enum( 'flavour:banana' ); - - R::store( $coffee ); - - //now we have two flavours - asrt( R::count('flavour'), 2 ); - - //use in query - asrt( R::count( 'coffee', ' taste_id = ? ', array( R::enum( 'flavour:mocca' )->id ) ), 1); - - //use in quer with short notation - asrt( R::count( 'coffee', ' taste_id = ? ', array( EID( 'flavour:mocca' ) ) ), 1); - - //use in query - asrt( R::count( 'coffee', ' taste_id = ? ', array( R::enum( 'flavour:banana' )->id ) ), 2); - - //use in quer with short notation - asrt( R::count( 'coffee', ' taste_id = ? ', array( EID( 'flavour:banana' ) ) ), 2); - - //use in query - asrt( R::count( 'coffee', ' taste_id = ? ', array( R::enum( 'flavour:strawberry' )->id ) ), 0); - - //use in quer with short notation - asrt( R::count( 'coffee', ' taste_id = ? ', array( EID( 'flavour:strawberry' ) ) ), 0); - } - - /** - * Test ENUM functionality offered by Label Maker. - * - * @return void - */ - public function testENUM() { - - testpack('test ENUM'); - - $coffee = R::dispense( 'coffee' ); - $coffee->taste = R::enum( 'flavour:mocca' ); - - //did we create an enum? - asrt( implode( '', R::gatherLabels( R::enum( 'flavour' ) ) ), 'MOCCA' ); - - R::store( $coffee ); - - $coffee = $coffee->fresh(); - - //test enum identity check - with alias - asrt( $coffee->fetchAs( 'flavour' )->taste->equals( R::enum('flavour:mocca') ), TRUE ); - asrt( $coffee->fetchAs( 'flavour' )->taste->equals( R::enum('flavour:banana') ), FALSE ); - - //now we have two flavours - asrt( R::count( 'flavour' ), 2 ); - asrt( implode( ',', R::gatherLabels( R::enum( 'flavour') ) ), 'BANANA,MOCCA' ); - - $coffee->flavour = R::enum( 'flavour:mocca' ); - - R::store($coffee); - - //same results, can we have multiple flavours? - asrt( $coffee->fetchAs( 'flavour' )->taste->equals( R::enum( 'flavour:mocca' ) ), TRUE ); - asrt( $coffee->fetchAs( 'flavour' )->taste->equals( R::enum( 'flavour:banana' ) ), FALSE ); - asrt( $coffee->flavour->equals( R::enum( 'flavour:mocca' ) ), TRUE ); - - //no additional mocca enum... - asrt( R::count( 'flavour' ), 2 ); - - $drink = R::dispense( 'drink' ); - $drink->flavour = R::enum( 'flavour:choco' ); - R::store( $drink ); - - //now we have three! - asrt( R::count('flavour'), 3 ); - - $drink = R::load( 'drink', $drink->id ); - - asrt( $drink->flavour->equals( R::enum('flavour:mint') ), FALSE ); - asrt( $drink->flavour->equals( R::enum('flavour:choco') ), TRUE ); - - asrt( R::count( 'flavour' ), 4 ); - - //trash should not affect flavour! - R::trash( $drink ); - - asrt( R::count( 'flavour' ), 4 ); - } - - /** - * Test trashAll(). - */ - public function testMultiDeleteUpdate() - { - testpack( 'test multi delete and multi update' ); - - $beans = R::dispenseLabels( 'bean', array( 'a', 'b' ) ); - $ids = R::storeAll( $beans ); - - asrt( (int) R::count( 'bean' ), 2 ); - - R::trashAll( R::batch( 'bean', $ids ) ); - - asrt( (int) R::count( 'bean' ), 0 ); - - testpack( 'test assocManager check' ); - - $rb = new OODB( R::getWriter() ); - - try { - $rb->getAssociationManager(); - - fail(); - } catch ( RedException $e ) { - pass(); - } - } - - /** - * Test Bean identity equality. - */ - public function testBeanIdentityEquality() { - $beanA = R::dispense( 'bean' ); - $beanB = R::dispense( 'bean' ); - $beanA->id = 1; - $beanB->id = 1; - - asrt( $beanA->equals( $beanB ), TRUE ); - asrt( $beanB->equals( $beanA ), TRUE ); - asrt( $beanA->equals( $beanA ), TRUE ); - asrt( $beanB->equals( $beanB ), TRUE ); - - $beanB->id = 2; - - asrt( $beanA->equals( $beanB ), FALSE ); - asrt( $beanB->equals( $beanA ), FALSE ); - - $beanA->id = '2'; - - asrt( $beanA->equals( $beanB ), TRUE ); - asrt( $beanB->equals( $beanA ), TRUE ); - - $beanB = R::dispense( 'carrot' ); - $beanB->id = $beanA->id; - - asrt( $beanA->equals( $beanB ), FALSE ); - asrt( $beanB->equals( $beanA ), FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Namedparams.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Namedparams.php deleted file mode 100644 index b0b01e6c..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Namedparams.php +++ /dev/null @@ -1,127 +0,0 @@ -title = 'book'; - $book->sharedPage[] = $page; - R::store($book); - - //should not give error like: Uncaught [HY093] - SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters - $books = $page->withCondition(' title = :title ', array( ':title' => 'book' ) )->sharedBook; - - asrt( count( $books ), 1 ); - - //should not give error... - $books = $page->withCondition( ' title = :title ', array( ':title' => 'book' ) )->sharedBook; - - asrt( count( $books ), 1 ); - - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->title = 'book'; - $book->comment = 'comment'; - $page->title = 'page'; - $book->ownPage[] = $page; - R::store( $book ); - - //should also not give error.. - $count = $book->countOwn( 'page' ); - - asrt( $count, 1 ); - - $book = $book->fresh(); - - //should also not give error.. - $count = $book->withCondition( ' title = ? ', array( 'page' ) )->countOwn( 'page' ); - - asrt( $count, 1 ); - - $book = $book->fresh(); - - //should also not give error.. - $count = $book->withCondition( ' title = :title ', array( ':title' => 'page' ) )->countOwn( 'page' ); - - asrt( $count, 1 ); - - $book = $book->fresh(); - - $pages = $book->withCondition( ' title = :title ', array( ':title' => 'page' ) )->ownPage; - - asrt( count( $pages ), 1 ); - - //test with duplicate slots... - $page = reset( $pages ); - $page2 = R::dispense( 'page' ); - $page2->ownPage[] = $page; - R::store( $page2 ); - $page2 = $page2->fresh(); - $pages = $page2->withCondition( ' title = :title ', array( ':title' => 'page' ) )->ownPage; - asrt( count( $pages ), 1 ); - - //test with find() - $books = R::getRedBean()->find( 'book', - array( - 'title' => array('book')), - ' AND title = :title ', array(':title'=>'book')); - - asrt( count( $books ), 1 ); - - $books = R::getRedBean()->find( 'book', - array( - 'title' => array('book', 'book2'), - 'comment' => array('comment', 'comment2')), - ' AND title = :title ', array(':title'=>'book')); - - asrt( count( $books ), 1 ); - - //just check numeric works as well... - $books = R::getRedBean()->find( 'book', - array( - 'title' => array('book', 'book2'), - 'comment' => array('comment', 'comment2')), - ' AND title = ? ', array('book')); - - asrt( count( $books ), 1 ); - - //just extra check to verify glue works - $books = R::getRedBean()->find( 'book', - array( - 'title' => array('book', 'book2'), - 'comment' => array('comment', 'comment2')), - ' ORDER BY id '); - - asrt( count( $books ), 1 ); - - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Nuke.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Nuke.php deleted file mode 100644 index dd0505fd..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Nuke.php +++ /dev/null @@ -1,54 +0,0 @@ -getTables() ), 1 ); - - R::nuke(); - - asrt( count( R::getWriter()->getTables() ), 0 ); - - $bean = R::dispense( 'bean' ); - - R::store( $bean ); - - asrt( count( R::getWriter()->getTables() ), 1 ); - - R::freeze(); - - R::nuke(); - - // No effect - asrt( count( R::getWriter()->getTables() ), 1 ); - - R::freeze( FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Observers.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Observers.php deleted file mode 100644 index 236cad66..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Observers.php +++ /dev/null @@ -1,62 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - - asrt( ( $adapter instanceof DBAdapter ), TRUE ); - asrt( ( $writer instanceof QueryWriter ), TRUE ); - asrt( ( $redbean instanceof OODB ), TRUE ); - - $observable = new \ObservableMock(); - $observer = new \ObserverMock(); - - $observable->addEventListener( "event1", $observer ); - $observable->addEventListener( "event3", $observer ); - - $observable->test( "event1", "testsignal1" ); - - asrt( $observer->event, "event1" ); - asrt( $observer->info, "testsignal1" ); - - $observable->test( "event2", "testsignal2" ); - - asrt( $observer->event, "event1" ); - asrt( $observer->info, "testsignal1" ); - - $observable->test( "event3", "testsignal3" ); - - asrt( $observer->event, "event3" ); - asrt( $observer->info, "testsignal3" ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php deleted file mode 100644 index 58fa3324..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Performance.php +++ /dev/null @@ -1,126 +0,0 @@ -title = 'book'; - $pages = R::dispense( 'page', 10 ); - foreach( $pages as $page ) { - $page->content = 'lorem ipsum'; - $page->title = 'data'; - $page->sequence = 'data'; - $page->order = 'data'; - $page->columns = 'data'; - $page->paragraphs = 'data'; - $page->paragraphs1 = 'data'; - $page->paragraphs2 = 'data'; - $page->paragraphs3 = 'data'; - $page->paragraphs4 = 'data'; - } - $book->xownPageList = $pages; - $tags = R::dispense( 'tag', 6 ); - foreach( $tags as $tag ) { - $tag->label = 'tag'; - } - $book->sharedTagList = $tags; - R::store( $book ); - } - - /** - * CRUD performance. - * - * @return void - */ - public function crud() - { - R::freeze( TRUE ); - - $book = R::dispense( 'book' ); - $book->title = 'Book'; - $page = R::dispense('page'); - $page->content = 'Content'; - $page->title = 'data'; - $page->sequence = 'data'; - $page->order = 'data'; - $page->columns = 'data'; - $page->paragraphs = 'data'; - $page->paragraphs1 = 'data'; - $page->paragraphs2 = 'data'; - $page->paragraphs3 = 'data'; - $page->paragraphs4 = 'data'; - $tag = R::dispense('tag'); - $tag->label = 'Tag '; - $book->noLoad()->ownPage[] = $page; - $book->noLoad()->sharedTag[] = $tag; - R::store( $book ); - $book = $book->fresh(); - $book->ownPage; - $book->sharedTag; - R::trash( $book ); - - } - - /** - * CRUD performance Array Access. - * - * @return void - */ - public function crudaa() - { - R::freeze( TRUE ); - - $book = R::dispense( 'book' ); - $book['title'] = 'Book'; - $page = R::dispense('page'); - $page['content'] = 'Content'; - $page['title'] = 'data'; - $page['sequence'] = 'data'; - $page['order'] = 'data'; - $page['columns'] = 'data'; - $page['paragraphs'] = 'data'; - $page['paragraphs1'] = 'data'; - $page['paragraphs2'] = 'data'; - $page['paragraphs3'] = 'data'; - $page['paragraphs4'] = 'data'; - $tag = R::dispense('tag'); - $tag['label'] = 'Tag '; - $book->ownPage[] = $page; - $book->noLoad()->sharedTag[] = $tag; - R::store( $book ); - $book = $book->fresh(); - $book->ownPage; - $book->sharedTag; - R::trash( $book ); - - } -} \ No newline at end of file diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php deleted file mode 100644 index d18edd6f..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Prefixes.php +++ /dev/null @@ -1,266 +0,0 @@ -dispense($type); -}); - -define('BOOK', 'tbl_book'); -define('AUTHOR', 'tbl_author'); -define('COAUTHOR', 'coAuthor'); -define('FRIEND', 'tbl_friend'); -define('PUBLISHER', 'tbl_publisher'); -define('BOOKLIST', 'ownTbl_book'); -define('FRIENDLIST', 'sharedTbl_friend'); - -/** - * Prefixes - * - * @file RedUNIT/Base/Prefixes.php - * @desc Tests whether you can use RedBeanPHP with table prefixes. - * @author Gabor de Mooij and the RedBeanPHP Community - * @license New BSD/GPLv2 - * - * (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community. - * This source file is subject to the New BSD/GPLv2 License that is bundled - * with this source code in the file license.txt. - */ -class Prefixes extends Base -{ - /** - * Test prerequisites. - */ - public function testPrerequisites() - { - R::nuke(); - $bean = R::xdispense( 'type_with_underscore' ); - asrt( ( $bean instanceof OODBBean ), TRUE ); - asrt( constant( 'BOOK' ), 'tbl_book' ); - asrt( constant( 'AUTHOR' ), 'tbl_author' ); - asrt( constant( 'PUBLISHER' ), 'tbl_publisher' ); - asrt( constant( 'FRIEND' ), 'tbl_friend' ); - asrt( constant( 'BOOKLIST' ), 'ownTbl_book' ); - asrt( constant( 'FRIENDLIST' ), 'sharedTbl_friend' ); - asrt( constant( 'COAUTHOR' ), 'coAuthor' ); - } - - /** - * Test basic CRUD operations. - */ - public function testBasicOperations() - { - //Can we dispense a naughty bean? (with underscore) - $author = R::xdispense( AUTHOR ); - asrt( ( $author instanceof OODBBean ), TRUE ); - asrt( $author->getMeta('type'), AUTHOR ); - $author->name = 'Mr. Quill'; - $book = R::xdispense( BOOK ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( $book->getMeta('type'), BOOK ); - $book->title = 'Good Stories'; - $friend = R::xdispense( FRIEND ); - $friend->name = 'Muse'; - asrt( ( $friend instanceof OODBBean ), TRUE ); - asrt( $friend->getMeta('type'), FRIEND ); - $publisher = R::xdispense( PUBLISHER ); - $publisher->name = 'Good Books'; - asrt( ( $publisher instanceof OODBBean ), TRUE ); - asrt( $publisher->getMeta('type'), PUBLISHER ); - asrt( is_array( $author->{BOOKLIST} ), TRUE ); - //add books to the book list using the constant - $author->{BOOKLIST}[] = $book; - asrt( count( $author->{BOOKLIST} ), 1 ); - //can we also add friends? (N-M) - $author->{FRIENDLIST}[] = $friend; - $author->{PUBLISHER} = $publisher; - $id = R::store( $author ); - asrt( ( $id > 0 ), TRUE ); - $author = $author->fresh(); - //Can we add another friend after reload? - $author->{FRIENDLIST}[] = R::xdispense( FRIEND )->setAttr( 'name', 'buddy' ); - R::store($author); - $author = $author->fresh(); - //Now check the contents of the bean, its lists (books,friends) and parent (publisher) - asrt( $author->name, 'Mr. Quill' ); - asrt( count( $author->{BOOKLIST} ), 1 ); - $firstBook = reset( $author->{BOOKLIST} ); - asrt( $firstBook->title, 'Good Stories' ); - asrt( count( $author->{FRIENDLIST} ), 2 ); - $firstFriend = reset( $author->{FRIENDLIST} ); - $parent = $author->{PUBLISHER}; - asrt( ( $parent instanceof OODBBean ), TRUE ); - $tables = R::inspect(); - //have all tables been prefixed? - foreach( $tables as $table ) asrt( strpos( $table, 'tbl_' ), 0 ); - //Can we make an export? - $export = R::exportAll( R::findOne( AUTHOR ), TRUE ); - $export = reset( $export ); - asrt( isset( $export[ PUBLISHER ] ), TRUE ); - asrt( isset( $export[ BOOKLIST ] ), TRUE ); - asrt( isset( $export[ FRIENDLIST ] ), TRUE ); - asrt( isset( $export[ 'ownBook' ] ), FALSE ); - asrt( isset( $export[ 'sharedFriend' ] ), FALSE ); - asrt( isset( $export[ 'publisher' ] ), FALSE ); - //Can we duplicate? - $copy = R::dup( $author ); - $copy->name = 'Mr. Clone'; - R::store( $copy ); - $copy = $copy->fresh(); - asrt( $copy->name, 'Mr. Clone' ); - asrt( count( $copy->{BOOKLIST} ), 1 ); - $firstBook = reset( $copy->{BOOKLIST} ); - asrt( $firstBook->title, 'Good Stories' ); - asrt( count( $copy->{FRIENDLIST} ), 2 ); - $firstFriend = reset( $copy->{FRIENDLIST} ); - $parent = $copy->{PUBLISHER}; - asrt( ( $parent instanceof OODBBean ), TRUE ); - //Can we count? - asrt( R::count( AUTHOR ), 2 ); - $copy = $copy->fresh(); - asrt( $copy->countOwn( BOOK ), 1 ); - asrt( $copy->countShared( FRIEND ), 2 ); - //Can we delete? - R::trash( $author ); - asrt( R::count( AUTHOR ), 1 ); - //Can we nuke? - R::nuke(); - asrt( R::count( AUTHOR ), 0 ); - asrt( count( R::inspect() ), 0 ); - } - - /** - * Test basic operations in frozen mode. - */ - public function testBasicOperationsFrozen() - { - R::nuke(); - $author = R::xdispense( AUTHOR ); - $author->name = 'Mr. Quill'; - $book = R::xdispense( BOOK ); - $book->title = 'Good Stories'; - $book2 = R::xdispense( BOOK ); - $book2->title = 'Good Stories 2'; - $friend = R::xdispense( FRIEND ); - $friend->name = 'Muse'; - $publisher = R::xdispense( PUBLISHER ); - $publisher->name = 'Good Books'; - $author->{BOOKLIST} = array( $book, $book2 ); - $author->{FRIENDLIST}[] = $friend; - $author->{PUBLISHER} = $publisher; - $coAuthor = R::xdispense( AUTHOR ); - $coAuthor->name = 'Xavier'; - $book2->{COAUTHOR} = $coAuthor; - R::store( $author ); - R::freeze( TRUE ); - asrt( $author->name, 'Mr. Quill' ); - asrt( count( $author->{BOOKLIST} ), 2 ); - $firstBook = reset( $author->{BOOKLIST} ); - asrt( $firstBook->title, 'Good Stories' ); - asrt( count( $author->{FRIENDLIST} ), 1 ); - $firstFriend = reset( $author->{FRIENDLIST} ); - $parent = $author->{PUBLISHER}; - asrt( ( $parent instanceof OODBBean ), TRUE ); - $tables = R::inspect(); - //have all tables been prefixed? - foreach( $tables as $table ) asrt( strpos( $table, 'tbl_' ), 0 ); - //Can we make an export? - $export = R::exportAll( R::findOne( AUTHOR ), TRUE ); - $export = reset( $export ); - asrt( isset( $export[ PUBLISHER ] ), TRUE ); - asrt( isset( $export[ BOOKLIST ] ), TRUE ); - asrt( isset( $export[ FRIENDLIST ] ), TRUE ); - asrt( isset( $export[ 'ownBook' ] ), FALSE ); - asrt( isset( $export[ 'sharedFriend' ] ), FALSE ); - asrt( isset( $export[ 'publisher' ] ), FALSE ); - R::freeze( FALSE ); - } - - /** - * Test conditions and aliases. - */ - public function testConditionsAndAliases() - { - R::nuke(); - $author = R::xdispense( AUTHOR ); - $author->name = 'Mr. Quill'; - $book = R::xdispense( BOOK ); - $book->title = 'Good Stories'; - $book2 = R::xdispense( BOOK ); - $book2->title = 'Good Stories 2'; - $friend = R::xdispense( FRIEND ); - $friend->name = 'Muse'; - $publisher = R::xdispense( PUBLISHER ); - $publisher->name = 'Good Books'; - $author->{BOOKLIST} = array( $book, $book2 ); - $author->{FRIENDLIST}[] = $friend; - $author->{PUBLISHER} = $publisher; - $coAuthor = R::xdispense( AUTHOR ); - $coAuthor->name = 'Xavier'; - $book2->{COAUTHOR} = $coAuthor; - R::store( $author ); - $author = $author->fresh(); - asrt( R::count( AUTHOR ), 2 ); - //Can we use with and withCondition? - asrt( count( $author->{BOOKLIST} ), 2 ); - asrt( count( $author->with(' LIMIT 1 ')->{BOOKLIST} ), 1 ); - asrt( count( $author->withCondition(' title LIKE ? ', array( '%2%' ) )->{BOOKLIST} ), 1 ); - //Can we use an alias? - $book2 = $book2->fresh(); - asrt( $book2->fetchAs( AUTHOR )->{COAUTHOR}->name, 'Xavier' ); - $coAuthor = $book2->fetchAs( AUTHOR )->{COAUTHOR}->fresh(); - asrt( count( $coAuthor->alias( COAUTHOR )->{BOOKLIST} ), 1 ); - } - - /** - * Test prettier tables using via(). - */ - public function testViaPrettification() - { - R::nuke(); - R::renameAssociation( 'tbl_author_tbl_friend', 'tbl_author_friend' ); - $author = R::xdispense( AUTHOR ); - $author->name = 'Mr. Quill'; - $friend = R::xdispense( FRIEND ); - $friend->name = 'Muse'; - $author->{FRIENDLIST}[] = $friend; - $id = R::store( $author ); - //print_r(R::inspect()); exit; - $author = R::load( AUTHOR, $id ); - $tables = array_flip( R::inspect() ); - asrt( isset( $tables[ 'tbl_author_friend' ] ), TRUE ); - asrt( isset( $tables[ 'tbl_author_tbl_friend' ] ), FALSE ); - asrt( count( $author->{FRIENDLIST} ), 1 ); - AQueryWriter::clearRenames(); - } - - /** - * Test self-referential N-M relations. - */ - public function testSelfRefNM() - { - R::nuke(); - $friend1 = R::xdispense( FRIEND ); - $friend1->name = 'f1'; - $friend2 = R::xdispense( FRIEND ); - $friend2->name = 'f2'; - $friend3 = R::xdispense( FRIEND ); - $friend3->name = 'f3'; - $friend1->{FRIENDLIST} = array( $friend2, $friend3 ); - $friend3->{FRIENDLIST} = array( $friend1 ); - R::storeAll( array( $friend1, $friend2, $friend3 ) ); - $friend1 = $friend1->fresh(); - $friend2 = $friend2->fresh(); - $friend3 = $friend3->fresh(); - asrt( count( $friend1->{FRIENDLIST} ), 2 ); - asrt( count( $friend2->{FRIENDLIST} ), 1 ); - asrt( count( $friend3->{FRIENDLIST} ), 1 ); - $friend = reset( $friend3->{FRIENDLIST} ); - asrt( $friend->name, 'f1' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php deleted file mode 100644 index b5c7de38..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Relations.php +++ /dev/null @@ -1,1757 +0,0 @@ -author = $author; - $book->author->name = 'x'; - $book->author->setMeta( 'tainted', false ); - R::store( $book ); - $author = $author->fresh(); - asrt( isset( $author->name ), false ); - } - - /** - * Tests whether via() applies camelcase-to-snakecase - * conversion. Although most of the time you do not need - * this since via() is meant to remap typical link tables - * to bean - but alas. - * - * @return void - */ - public function testCamelCasingVia() - { - R::nuke(); - $book = R::dispense('book'); - $book->sharedPage[] = R::dispense('page'); - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book->via('bookPage')->sharedPage ), 1 ); - $book = $book->fresh(); - asrt( count( $book->via('book_page')->sharedPage ), 1 ); - } - - /** - * Test whether we can't add more than one FK. - */ - public function testDuplicateFK() - { - R::nuke(); - list( $book, $page ) = R::dispenseAll( 'book,page' ); - $book->sharedPage[] = $page; - R::store( $page ); - R::store( $book ); - $writer = R::getWriter(); - $added1 = $writer->addFK( 'book_page', 'book', 'book_id', 'id', TRUE ); - $added2 = $writer->addFK( 'book_page', 'page', 'page_id', 'id', TRUE ); - $added = ( $added1 && $added2 ); - asrt( $added, FALSE ); - } - - /** - * Test whether ->all() reloads a list. - * - * @return void - */ - public function testAllPrefix() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->ownPage = R::dispense( 'page', 10 ); - $book->sharedTag = R::dispense( 'tag', 2 ); - $i = 0; - foreach( $book->ownPage as $page ) { - $page->pageno = $i++; - } - R::store( $book ); - $book = $book->fresh(); - asrt( count( $book->ownPage ), 10 ); - asrt( count( $book->withCondition(' pageno < 5 ')->ownPage ), 5 ); - asrt( count( $book->ownPage ), 5 ); - asrt( count( $book->all()->ownPage ), 10 ); - asrt( count( $book->with(' LIMIT 3 ')->ownPage ), 3 ); - asrt( count( $book->ownPage ), 3 ); - asrt( count( $book->all()->ownPage ), 10 ); - asrt( count( $book->sharedTag ), 2 ); - asrt( count( $book->with( ' LIMIT 1 ' )->sharedTag ), 1 ); - asrt( count( $book->sharedTag ), 1 ); - asrt( count( $book->all()->sharedTag ), 2 ); - } - - /** - * Test Relations and conditions. - * - * @return void - */ - public function testRelationsAndConditions() - { - list( $book1, $book2 ) = R::dispense( 'book', 2 ); - - list( $page1, $page2, $page3, $page4 ) = R::dispense( 'page', 4 ); - - list( $author1, $author2 ) = R::dispense( 'author', 2 ); - - $book1->title = 'a'; - $book2->title = 'b'; - - $page1->thename = '1'; - $page2->thename = '2'; - $page3->thename = '3'; - $page3->thename = '4'; - - $book1->ownPage = array( $page1, $page2 ); - $book2->ownPage = array( $page3, $page4 ); - - $author1->sharedBook = array( $book1, $book2 ); - $author2->sharedBook = array( $book2 ); - - R::storeAll( array( $author1, $author2 ) ); - - asrt( count( $author1->sharedBook ), 2 ); - asrt( count( $author1->withCondition( ' title = ? ', array( 'a' ) )->sharedBook ), 1 ); - - R::store( $author1 ); - - asrt( count( $author1->sharedBook ), 2 ); - asrt( count( $author1->withCondition( ' xtitle = ? ', array( 'a' ) )->sharedBook ), 0 ); - - R::store( $author1 ); - - asrt( count( $author1->sharedBook ), 2 ); - - $book1 = R::load( 'book', $book1->id ); - - $book2 = $book2->fresh(); - - asrt( count( $book1->ownPage ), 2 ); - asrt( count( $book1->with( ' LIMIT 1 ' )->ownPage ), 1 ); - - $book1 = $book1->fresh(); - - asrt( count( $book1->ownPage ), 2 ); - asrt( count( $book1->withCondition( ' thename = ? ', array( '1' ) )->ownPage ), 1 ); - } - - /** - * Test filtering relations on links (using columns in the link table). - * - * @return void - */ - public function testSharedLinkCond() - { - testpack( 'Test new shared relations with link conditions' ); - - $w = R::getWriter(); - - list( $b1, $b2 ) = R::dispense( 'book', 2 ); - - $b1->name = 'book1'; - $b2->name = 'book2'; - - list( $p1, $p2, $p3 ) = R::dispense( 'page', 3 ); - - $p1->text = 'page1'; - $p1->number = 3; - $p2->text = 'page2'; - $p3->text = 'page3'; - - $b1->link( 'book_page', array( 'order' => 1 ) )->page = $p1; - $b1->link( 'bookPage', array( 'order' => 2 ) )->page = $p2; - $b2->link( 'book_page', array( 'order' => 1 ) )->page = $p3; - $b2->link( 'bookPage', array( 'order' => 2 ) )->page = $p2; - $b2->link( 'book_page', array( 'order' => 3 ) )->page = $p1; - - R::storeAll( array( $b1, $b2 ) ); - - $b1 = R::load( 'book', $b1->id ); - $b2 = R::load( 'book', $b2->id ); - - $pages = $b1->withCondition( ' book_page.' . $w->esc( 'order' ) . ' = 2 ' )->sharedPage; - - $page = reset( $pages ); - - asrt( $page->text, 'page2' ); - - $pages = $b2->withCondition( ' ' . $w->esc( 'order' ) . ' = 3 ' )->sharedPage; - - $page = reset( $pages ); - - asrt( $page->text, 'page1' ); - - $b1 = R::load( 'book', $b1->id ); - $b2 = R::load( 'book', $b2->id ); - - $pages = $b1->withCondition( ' book_page.' . $w->esc( 'order' ) . ' < 3 AND page.number = 3' )->sharedPage; - - $page = reset( $pages ); - - asrt( $page->text, 'page1' ); - - $pages = $b2->withCondition( ' ' . $w->esc( 'order' ) . ' > 1 ORDER BY book_page.' . $w->esc( 'order' ) . ' ASC ' )->sharedPage; - - $page = array_shift( $pages ); - - asrt( $page->text, 'page2' ); - - $page = array_shift( $pages ); - - asrt( $page->text, 'page1' ); - - testpack( 'Test new shared relations and cache' ); - - /** - * why does this not destroy cache in psql? - * ah: An error occurred: SQLSTATE[42703]: Undefined column: 7 - * ERROR: column "page" of relation "page" does not exist - */ - R::exec( 'UPDATE page SET ' . $w->esc( 'number' ) . ' = 1 ' ); - - R::getWriter()->setUseCache( TRUE ); - - $p1 = R::load( 'page', (int) $p1->id ); - - // Someone else changes the records. Cache remains. - R::exec( ' UPDATE page SET ' . $w->esc( 'number' ) . ' = 9 -- keep-cache' ); - - $b1 = R::load( 'book', $b1->id ); - $p1 = R::load( 'page', (int) $p1->id ); - - // Yupz a stale cache, phantom read! - asrt( (int) $p1->number, 1 ); - - $pages = $b1->withCondition( ' book_page.' . $w->esc( 'order' ) . ' = 1 ' )->sharedPage; - - $page = reset( $pages ); - - // Inconsistent, sad but TRUE, different query -> cache key is different - asrt( (int) $page->number, 9 ); - - // However, cache must have been invalidated by this query - $p1 = R::load( 'page', (int) $p1->id ); - - // Yes! we're consistent again! -- as if the change just happened later! - asrt( (int) $page->number, 9 ); - - // By doing this we keep getting 9 instead of 8 - $b1->fresh()->withCondition( ' book_page.' . $w->esc( 'order' ) . ' = 1 ' )->sharedPage; - - // Someone else is busy again... - R::exec( ' UPDATE page SET ' . $w->esc( 'number' ) . ' = 8 -- keep-cache' ); - - $b1 = R::load( 'book', $b1->id ); - - $pages = $b1->withCondition( ' book_page.' . $w->esc( 'order' ) . ' = 1 ' )->sharedPage; - - $page = reset( $pages ); - - /** - * yes! we get 9 instead of 8, why because the cache key has not changed, - * our last query was PAGE-BOOK-RELATION and now we ask for - * PAGE-BOOK-RELATION again. if we would have used just a load page - * query we would have gotten the new value (8).... let's test that! - */ - asrt( (int) $page->number, 9 ); - - R::exec( ' UPDATE page SET ' . $w->esc( 'number' ) . ' = 9' ); - - $p1 = R::load( 'page', (int) $p1->id ); - - asrt( (int) $page->number, 9 ); - - // Someone else is busy again... - R::exec( ' UPDATE page SET ' . $w->esc( 'number' ) . ' = 8 -- keep-cache' ); - - $b1 = R::load( 'book', $b1->id ); - - $pages = $b1->withCondition( ' book_page.' . $w->esc( 'order' ) . ' = 1 ' )->sharedPage; - - $page = reset( $pages ); - - // Yes, keep-cache wont help, cache key changed! - asrt( (int) $page->number, 8 ); - - R::getWriter()->setUseCache( FALSE ); - - } - - /** - * Test related count using via(). - * - * @return void - */ - public function testRelatedCountVia() - { - testpack( 'Test relatedCount with via()' ); - - $shop = R::dispense( 'shop' ); - $shop->ownRelation = R::dispense( 'relation', 13 ); - foreach ( $shop->ownRelation as $relation ) { - $relation->shop = $shop; - $relation->customer = R::dispense( 'customer' ); - } - R::store( $shop ); - $shop = $shop->fresh(); - - asrt( $shop->via( 'relation' )->countShared( 'customer' ), 13 ); - } - - /** - * Test counting and aliasing. - * - * @return void - */ - public function testCountingAndAliasing() - { - $book = R::dispense( 'book' ); - - $book->ownPage = R::dispense( 'page', 10 ); - - $book2 = R::dispense( 'book' ); - - $book2->ownPage = R::dispense( 'page', 4 ); - - list( $Bill, $James, $Andy ) = R::dispense( 'person', 3 ); - - $book->author = $Bill; - $book->coAuthor = $James; - - $book2->author = $Bill; - $book2->coAuthor = $Andy; - - $book->price = 25; - $book2->price = 50; - - $notes = R::dispense( 'note', 10 ); - - $book->sharedNote = array( $notes[0], $notes[1], $notes[2] ); - $book2->sharedNote = array( $notes[3], $notes[4], $notes[1], $notes[0] ); - - $books = R::dispense( 'book', 5 ); - - $books[2]->title = 'boe'; - - $book->sharedBook = array( $books[0], $books[1] ); - - $book2->sharedBook = array( $books[0], $books[2], $books[4] ); - - R::storeAll( array( $book, $book2 ) ); - - asrt( $book->countOwn( 'page' ), 10 ); - asrt( $book->withCondition( ' id < 5 ' )->countOwn( 'page' ), 4 ); - - asrt( $Bill->alias( 'author' )->countOwn( 'book' ), 2 ); - asrt( $Andy->alias( 'coAuthor' )->countOwn( 'book' ), 1 ); - asrt( $James->alias( 'coAuthor' )->countOwn( 'book' ), 1 ); - asrt( $Bill->alias( 'author' )->countOwn( 'book' ), 2 ); - - asrt( $book->countShared( 'note' ), 3 ); - - asrt( $book2->countShared( 'note' ), 4 ); - asrt( $book2->countShared( 'book' ), 3 ); - - $book2 = $book2->fresh(); - - asrt( $book2->withCondition( ' title = ? ', array( 'boe' ) )->countShared( 'book' ), 1 ); - } - - /** - * Test via. - * - * @return void - */ - public function testVia() - { - testpack( 'Test via()' ); - - $d = R::dispense( 'doctor' )->setAttr( 'name', 'd1' ); - $p = R::dispense( 'patient' )->setAttr( 'name', 'p1' ); - - $d->via( 'consult' )->sharedPatient[] = $p; - - R::store( $d ); - - $d = R::load( 'doctor', $d->id ); - - asrt( count( $d->sharedPatient ), 1 ); - asrt( in_array( 'consult', R::getWriter()->getTables() ), TRUE ); - } - - public function testIssue348() - { - //issue #348 via() should reload shared list - - $product = R::dispense( 'product' ); - $product->name = 'test'; - $color = R::dispense( 'color' ); - $color->name = 'cname'; - $color->code = 'ccode'; - R::store( $product ); - R::store( $color ); - $product->link( 'productColor', array( - 'stock' => 1, - 'position' => 0 - ) )->color = $color; - R::store( $product ); - asrt( count( $product->sharedColor ), 0 ); - asrt( count( $product->via( 'product_color' )->sharedColor ), 1 ); - asrt( count( $product->sharedColor ), 1 ); - R::renameAssociation( 'color_product', NULL ); - } - - /** - * Test creation of link table. - * - * @return void - */ - public function testCreationOfLinkTable() - { - asrt( in_array( 'consult', R::getWriter()->getTables() ), FALSE ); - - $d = R::dispense( 'doctor' )->setAttr( 'name', 'd1' ); - $p = R::dispense( 'patient' )->setAttr( 'name', 'p1' ); - - $d->sharedPatient[] = $p; - R::store($d); - - asrt( in_array( 'consult', R::getWriter()->getTables() ), TRUE ); - } - - /** - * Fast track link block code should not affect self-referential N-M relations. - * - * @return void - */ - public function testFastTrackRelations() - { - testpack( 'Test fast-track linkBlock exceptions' ); - - list( $donald, $mickey, $goofy, $pluto ) = R::dispense( 'friend', 4 ); - - $donald->name = 'D'; - $mickey->name = 'M'; - $goofy->name = 'G'; - $pluto->name = 'P'; - - $donald->sharedFriend = array( $mickey, $goofy ); - $mickey->sharedFriend = array( $pluto, $goofy ); - $mickey->sharedBook = array( R::dispense( 'book' ) ); - - R::storeAll( array( $mickey, $donald, $goofy, $pluto ) ); - - $donald = R::load( 'friend', $donald->id ); - $mickey = R::load( 'friend', $mickey->id ); - $goofy = R::load( 'friend', $goofy->id ); - $pluto = R::load( 'friend', $pluto->id ); - - $names = implode( ',', R::gatherLabels( $donald->sharedFriend ) ); - - asrt( $names, 'G,M' ); - - $names = implode( ',', R::gatherLabels( $goofy->sharedFriend ) ); - - asrt( $names, 'D,M' ); - - $names = implode( ',', R::gatherLabels( $mickey->sharedFriend ) ); - - asrt( $names, 'D,G,P' ); - - $names = implode( ',', R::gatherLabels( $pluto->sharedFriend ) ); - - asrt( $names, 'M' ); - - // Now in combination with with() conditions... - $donald = R::load( 'friend', $donald->id ); - - $names = implode( ',', R::gatherLabels( $donald->withCondition( ' name = ? ', array( 'M' ) )->sharedFriend ) ); - - asrt( $names, 'M' ); - - // Now in combination with with() conditions... - $donald = R::load( 'friend', $donald->id ); - - $names = implode( ',', R::gatherLabels( $donald->with( ' ORDER BY name ' )->sharedFriend ) ); - - asrt( $names, 'G,M' ); - - // Now counting - $goofy = R::load( 'friend', $goofy->id ); - - asrt( (int) $goofy->countShared( 'friend' ), 2 ); - asrt( (int) $donald->countShared( 'friend' ), 2 ); - asrt( (int) $mickey->countShared( 'friend' ), 3 ); - asrt( (int) $pluto->countShared( 'friend' ), 1 ); - } - - /** - * Test list beautifications. - * - * @return void - */ - public function testListBeautifications() - { - testpack( 'Test list beautifications' ); - - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' )->setAttr( 'name', 'a' ); - $book->sharedPage[] = $page; - - $id = R::store( $book ); - - $book = R::load( 'book', $id ); - - $p = reset( $book->ownBookPage ); - - asrt( $p->page->name, 'a' ); - - $bean = R::dispense( 'bean' ); - - $bean->sharedAclRole[] = R::dispense( 'role' )->setAttr( 'name', 'x' ); - - R::store( $bean ); - - asrt( R::count( 'role' ), 1 ); - - $aclrole = R::getRedBean()->dispense( 'acl_role' ); - - $aclrole->name = 'role'; - - $bean = R::dispense( 'bean' ); - - $bean->sharedAclRole[] = $aclrole; - - R::store( $bean ); - - asrt( count( $bean->sharedAclRole ), 1 ); - } - - /** - * Test list add and delete. - * - * @return void - */ - public function testListAddDelete() - { - testpack( 'Test list add/delete scenarios.' ); - - R::nuke(); - $b = R::dispense( 'book' ); - $p = R::dispense( 'page' ); - - $b->title = 'a'; - $p->name = 'b'; - - $b->xownPage[] = $p; - - R::store( $b ); - - $b->xownPage = array(); - - R::store( $b ); - - asrt( R::count( 'page' ), 0 ); - - $p = R::dispense( 'page' ); - $z = R::dispense( 'paper' ); - - $z->xownPage[] = $p; - - R::store( $z ); - - asrt( R::count( 'page' ), 1 ); - - $z->xownPage = array(); - - R::store( $z ); - - asrt( R::count( 'page' ), 0 ); - - $i = R::dispense( 'magazine' ); - - $i->ownPage[] = R::dispense( 'page' ); - - R::store( $i ); - - asrt( R::count( 'page' ), 1 ); - - $i->ownPage = array(); - - R::store( $i ); - - asrt( R::count( 'page' ), 1 ); - - } - - /** - * Test basic and complex common usage scenarios for - * relations and associations. - * - * @return void - */ - public function testScenarios() - { - list( $q1, $q2 ) = R::dispense( 'quote', 2 ); - - list( $pic1, $pic2 ) = R::dispense( 'picture', 2 ); - - list( $book, $book2, $book3 ) = R::dispense( 'book', 4 ); - - list( $topic1, $topic2, $topic3, $topic4, $topic5 ) = R::dispense( 'topic', 5 ); - - list( $page1, $page2, $page3, $page4, $page5, $page6, $page7 ) = R::dispense( 'page', 7 ); - - $q1->text = 'lorem'; - $q2->text = 'ipsum'; - - $book->title = 'abc'; - $book2->title = 'def'; - $book3->title = 'ghi'; - - $page1->title = 'pagina1'; - $page2->title = 'pagina2'; - $page3->title = 'pagina3'; - $page4->title = 'pagina4'; - $page5->title = 'pagina5'; - $page6->title = 'cover1'; - $page7->title = 'cover2'; - - $topic1->name = 'holiday'; - $topic2->name = 'cooking'; - $topic3->name = 'gardening'; - $topic4->name = 'computing'; - $topic5->name = 'christmas'; - - // Add one page to the book - $book->ownPage[] = $page1; - - $id = R::store( $book ); - - asrt( count( $book->ownPage ), 1 ); - asrt( reset( $book->ownPage )->getMeta( 'type' ), 'page' ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->ownPage ), 1 ); - asrt( reset( $book->ownPage )->getMeta( 'type' ), 'page' ); - - // Performing an own addition - $book->ownPage[] = $page2; - - $id = R::store( $book ); - $book = R::load( 'book', $id ); - - asrt( count( $book->ownPage ), 2 ); - - // Performing a deletion - $book = R::load( 'book', $id ); - - unset( $book->ownPage[1] ); - - $id = R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->ownPage ), 1 ); - asrt( reset( $book->ownPage )->getMeta( 'type' ), 'page' ); - asrt( R::count( 'page' ), 2 ); //still exists - asrt( reset( $book->ownPage )->id, '2' ); - - // Doing a change in one of the owned items - $book->ownPage[2]->title = 'page II'; - - $id = R::store( $book ); - $book = R::load( 'book', $id ); - - asrt( reset( $book->ownPage )->title, 'page II' ); - - // Change by reference now... don't copy! - $refToPage2 = $book->ownPage[2]; - - $refToPage2->title = 'page II b'; - - $id = R::store( $book ); - $book = R::load( 'book', $id ); - - asrt( reset( $book->ownPage )->title, 'page II b' ); - - // Doing all actions combined - $book->ownPage[] = $page3; - - R::store( $book ); - - $book = R::load( 'book', $id ); - - unset( $book->ownPage[2] ); - - // And test custom key - $book->ownPage['customkey'] = $page4; - $book->ownPage[3]->title = "THIRD"; - - R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->ownPage ), 2 ); - - $p4 = $book->ownPage[4]; - $p3 = $book->ownPage[3]; - - asrt( $p4->title, 'pagina4' ); - asrt( $p3->title, 'THIRD' ); - - // Test replacing an element - $book = R::load( 'book', $id ); - - $book->ownPage[4] = $page5; - - R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->ownPage ), 2 ); - - $p5 = $book->ownPage[5]; - - asrt( $p5->title, 'pagina5' ); - - // Other way around - single bean - asrt( $p5->book->title, 'abc' ); - asrt( R::load( 'page', 5 )->book->title, 'abc' ); - asrt( R::load( 'page', 3 )->book->title, 'abc' ); - - // Add the other way around - single bean - $page1->id = 0; - - $page1->book = $book2; - - $page1 = R::load( 'page', R::store( $page1 ) ); - - asrt( $page1->book->title, 'def' ); - - $b2 = R::load( 'book', $id ); - - asrt( count( $b2->ownPage ), 2 ); - - // Remove the other way around - single bean - unset( $page1->book ); - - R::store( $page1 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 1 ); //does not work - $page1->book = NULL; - - R::store( $page1 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 0 ); //works - - // Re-add the page - $b2->ownPage[] = $page1; - - R::store( $b2 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 1 ); - - // Different, less elegant way to remove - $page1 = reset( $b2->ownPage ); - - $page1->book_id = NULL; - - R::store( $page1 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 0 ); - - // Re-add the page - $b2->ownPage[] = $page1; - - R::store( $b2 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 1 ); - - // Another less elegant way to remove - $page1->book = NULL; - - R::store( $page1 ); - - $cols = R::getColumns( 'page' ); - - asrt( isset( $cols['book'] ), FALSE ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 0 ); - - // Re-add the page - $b2->ownPage[] = $page1; - - R::store( $b2 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 1 ); - - // Another less elegant... just plain ugly... way to remove - $page1->book = FALSE; - - R::store( $page1 ); - - $cols = R::getColumns( 'page' ); - - asrt( isset( $cols['book'] ), FALSE ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 0 ); - - // Re-add the page - $b2->ownPage[] = $page1; - - R::store( $b2 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 1 ); - - // You are not allowed to re-use the field for something else - foreach ( - array( - 1, -2.1, array(), - TRUE, 'NULL', new \stdClass, - 'just a string', array( 'a' => 1 ), 0 - ) as $value - ) { - try { - $page1->book = $value; - fail(); - } catch ( RedException $e ) { - pass(); - } - } - - // Test fk, not allowed to set to 0 - $page1 = reset( $b2->ownPage ); - - $page1->book_id = 0; - - // Even uglier way, but still needs to work - $page1 = reset( $b2->ownPage ); - - $page1->book_id = NULL; - - R::store( $b2 ); - - $b2 = R::load( 'book', $book2->id ); - - asrt( count( $b2->ownPage ), 0 ); - - // Test shared items - $book = R::load( 'book', $id ); - - $book->sharedTopic[] = $topic1; - - $id = R::store( $book ); - - // Add an item - asrt( count( $book->sharedTopic ), 1 ); - asrt( reset( $book->sharedTopic )->name, 'holiday' ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->sharedTopic ), 1 ); - asrt( reset( $book->sharedTopic )->name, 'holiday' ); - - // Add another item - $book->sharedTopic[] = $topic2; - - $id = R::store( $book ); - $tidx = R::store( R::dispense( 'topic' ) ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->sharedTopic ), 2 ); - - $t1 = $book->sharedTopic[1]; - $t2 = $book->sharedTopic[2]; - - asrt( $t1->name, 'holiday' ); - asrt( $t2->name, 'cooking' ); - - // Remove an item - unset( $book->sharedTopic[2] ); - - asrt( count( $book->sharedTopic ), 1 ); - - $id = R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->sharedTopic ), 1 ); - asrt( reset( $book->sharedTopic )->name, 'holiday' ); - - // Add and change - $book->sharedTopic[] = $topic3; - $book->sharedTopic[1]->name = 'tropics'; - - $id = R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->sharedTopic ), 2 ); - asrt( $book->sharedTopic[1]->name, 'tropics' ); - - testids( $book->sharedTopic ); - - R::trash( R::load( 'topic', $tidx ) ); - - $id = R::store( $book ); - - $book = R::load( 'book', $id ); - - // Delete without save - unset( $book->sharedTopic[1] ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->sharedTopic ), 2 ); - - $book = R::load( 'book', $id ); - - // Delete without init - asrt( ( R::count( 'topic' ) ), 3 ); - - unset( $book->sharedTopic[1] ); - - $id = R::store( $book ); - - asrt( ( R::count( 'topic' ) ), 3 ); - asrt( count( $book->sharedTopic ), 1 ); - asrt( count( $book2->sharedTopic ), 0 ); - - // Add same topic to other book - $book2->sharedTopic[] = $topic3; - - asrt( count( $book2->sharedTopic ), 1 ); - - $id2 = R::store( $book2 ); - - asrt( count( $book2->sharedTopic ), 1 ); - - $book2 = R::load( 'book', $id2 ); - - asrt( count( $book2->sharedTopic ), 1 ); - - // Get books for topic - asrt( $topic3->countShared('book'), 2 ); - - $t3 = R::load( 'topic', $topic3->id ); - - asrt( count( $t3->sharedBook ), 2 ); - - // Nuke an own-array, replace entire array at once without getting first - $page2->id = 0; - $page2->title = 'yet another page 2'; - $page4->id = 0; - $page4->title = 'yet another page 4'; - - $book = R::load( 'book', $id ); - - $book->ownPage = array( $page2, $page4 ); - - R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->ownPage ), 2 ); - asrt( reset( $book->ownPage )->title, 'yet another page 2' ); - asrt( end( $book->ownPage )->title, 'yet another page 4' ); - - testids( $book->ownPage ); - - // Test with alias format - $book3->cover = $page6; - - $idb3 = R::store( $book3 ); - - $book3 = R::load( 'book', $idb3 ); - - $justACover = $book3->fetchAs( 'page' )->cover; - - asrt( ( $book3->cover instanceof OODBBean ), TRUE ); - asrt( $justACover->title, 'cover1' ); - - // No page property - asrt( isset( $book3->page ), FALSE ); - - // Test doubling and other side effects ... should not occur.. - $book3->sharedTopic = array( $topic1, $topic2 ); - - $book3 = R::load( 'book', R::store( $book3 ) ); - - $book3->sharedTopic = array(); - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->sharedTopic ), 0 ); - - $book3->sharedTopic[] = $topic1; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - // Added only one, not more? - asrt( count( $book3->sharedTopic ), 1 ); - asrt( intval( R::getCell( "select count(*) from book_topic where book_id = $idb3" ) ), 1 ); - - // Add the same - $book3->sharedTopic[] = $topic1; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->sharedTopic ), 1 ); - asrt( intval( R::getCell( "select count(*) from book_topic where book_id = $idb3" ) ), 1 ); - - $book3->sharedTopic['differentkey'] = $topic1; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->sharedTopic ), 1 ); - asrt( intval( R::getCell( "select count(*) from book_topic where book_id = $idb3" ) ), 1 ); - - // Ugly assign, auto array generation - $book3->ownPage[] = $page1; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->ownPage ), 1 ); - asrt( intval( R::getCell( "select count(*) from page where book_id = $idb3 " ) ), 1 ); - - $book3 = R::load( 'book', $idb3 ); - - $book3->ownPage = array(); - - // No change until saved - asrt( intval( R::getCell( "select count(*) from page where book_id = $idb3 " ) ), 1 ); - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( intval( R::getCell( "select count(*) from page where book_id = $idb3 " ) ), 0 ); - asrt( count( $book3->ownPage ), 0 ); - - $book3 = R::load( 'book', $idb3 ); - - /** - * Why do I need to do this ---> why does trash() not set id -> 0? - * Because you unset() so trash is done on origin not bean - */ - $page1->id = 0; - $page2->id = 0; - $page3->id = 0; - - $book3->ownPage[] = $page1; - $book3->ownPage[] = $page2; - $book3->ownPage[] = $page3; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( intval( R::getCell( "select count(*) from page where book_id = $idb3 " ) ), 3 ); - - asrt( count( $book3->ownPage ), 3 ); - - unset( $book3->ownPage[$page2->id] ); - - $book3->ownPage[] = $page3; - $book3->ownPage['try_to_trick_ya'] = $page3; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( intval( R::getCell( "select count(*) from page where book_id = $idb3 " ) ), 2 ); - - asrt( count( $book3->ownPage ), 2 ); - - // Delete and re-add - $book3 = R::load( 'book', $idb3 ); - - unset( $book3->ownPage[10] ); - - $book3->ownPage[] = $page1; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->ownPage ), 2 ); - - $book3 = R::load( 'book', $idb3 ); - - unset( $book3->sharedTopic[1] ); - - $book3->sharedTopic[] = $topic1; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->sharedTopic ), 1 ); - - // Test performance - $logger = R::debug( true, 1 ); - - $book = R::load( 'book', 1 ); - - $book->sharedTopic = array(); - - R::store( $book ); - - // No more than 1 update - asrt( count( $logger->grep( 'UPDATE' ) ), 1 ); - - $book = R::load( 'book', 1 ); - - $logger->clear(); - - print_r( $book->sharedTopic, 1 ); - - // No more than 1 select - asrt( count( $logger->grep( 'SELECT' ) ), 1 ); - $logger->clear(); - - $book->sharedTopic[] = $topic1; - $book->sharedTopic[] = $topic2; - - asrt( count( $logger->grep( 'SELECT' ) ), 0 ); - - R::store( $book ); - - $book->sharedTopic[] = $topic3; - - // Now do NOT clear all and then add one, just add the one - $logger->clear(); - - R::store( $book ); - - $book = R::load( 'book', 1 ); - - asrt( count( $book->sharedTopic ), 3 ); - - // No deletes - asrt( count( $logger->grep( "DELETE FROM" ) ), 0 ); - - $book->sharedTopic['a'] = $topic3; - - unset( $book->sharedTopic['a'] ); - - R::store( $book ); - - $book = R::load( 'book', 1 ); - - asrt( count( $book->sharedTopic ), 3 ); - - // No deletes - asrt( count( $logger->grep( "DELETE FROM" ) ), 0 ); - - $book->ownPage = array(); - - R::store( $book ); - - asrt( count( $book->ownPage ), 0 ); - - $book->ownPage[] = $page1; - $book->ownPage['a'] = $page2; - - asrt( count( $book->ownPage ), 2 ); - - R::store( $book ); - - unset( $book->ownPage['a'] ); - - asrt( count( $book->ownPage ), 2 ); - - unset( $book->ownPage[11] ); - - R::store( $book ); - - $book = R::load( 'book', 1 ); - - asrt( count( $book->ownPage ), 1 ); - - $aPage = $book->ownPage[10]; - - unset( $book->ownPage[10] ); - - $aPage->title .= ' changed '; - - $book->ownPage['anotherPage'] = $aPage; - - $logger->clear(); - - R::store( $book ); - - // if ($db=="mysql") asrt(count($logger->grep("SELECT")),0); - $book = R::load( 'book', 1 ); - - asrt( count( $book->ownPage ), 1 ); - - $ap = reset( $book->ownPage ); - - asrt( $ap->title, "pagina1 changed " ); - - // Fix udiff instead of diff - $book3->ownPage = array( $page3, $page1 ); - - $i = R::store( $book3 ); - - $book3 = R::load( 'book', $i ); - - asrt( intval( R::getCell( "select count(*) from page where book_id = $idb3 " ) ), 2 ); - asrt( count( $book3->ownPage ), 2 ); - - $pic1->name = 'aaa'; - $pic2->name = 'bbb'; - - R::store( $pic1 ); - R::store( $q1 ); - - $book3->ownPicture[] = $pic1; - $book3->ownQuote[] = $q1; - - $book3 = R::load( 'book', R::store( $book3 ) ); - - // two own-arrays -->forgot array_merge - asrt( count( $book3->ownPicture ), 1 ); - asrt( count( $book3->ownQuote ), 1 ); - asrt( count( $book3->ownPage ), 2 ); - - $book3 = R::load( 'book', R::store( $book3 ) ); - - unset( $book3->ownPicture[1] ); - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->ownPicture ), 0 ); - asrt( count( $book3->ownQuote ), 1 ); - asrt( count( $book3->ownPage ), 2 ); - - $book3 = R::load( 'book', R::store( $book3 ) ); - - $NOTE = 0; - - $quotes = R::dispense( 'quote', 10 ); - - foreach ( $quotes as &$justSomeQuote ) { - $justSomeQuote->note = 'note' . ( ++$NOTE ); - } - - $pictures = R::dispense( 'picture', 10 ); - foreach ( $pictures as &$justSomePic ) { - $justSomePic->note = 'note' . ( ++$NOTE ); - } - - $topics = R::dispense( 'topic', 10 ); - foreach ( $topics as &$justSomeTopic ) { - $justSomeTopic->note = 'note' . ( ++$NOTE ); - } - - for ( $j = 0; $j < 10; $j++ ) { - // Do several mutations - for ( $x = 0; $x < rand( 1, 20 ); $x++ ) { - modgr( $book3, $quotes, $pictures, $topics ); - } - - $qbefore = count( $book3->ownQuote ); - $pbefore = count( $book3->ownPicture ); - $tbefore = count( $book3->sharedTopic ); - - $qjson = json_encode( $book->ownQuote ); - $pjson = json_encode( $book->ownPicture ); - $tjson = json_encode( $book->sharedTopic ); - - $book3 = R::load( 'book', R::store( $book3 ) ); - - asrt( count( $book3->ownQuote ), $qbefore ); - asrt( count( $book3->ownPicture ), $pbefore ); - asrt( count( $book3->sharedTopic ), $tbefore ); - - asrt( json_encode( $book->ownQuote ), $qjson ); - asrt( json_encode( $book->ownPicture ), $pjson ); - asrt( json_encode( $book->sharedTopic ), $tjson ); - - testids( $book->ownQuote ); - testids( $book->ownPicture ); - testids( $book->sharedTopic ); - } - } - - /** - * Test parent bean relations. - * - * @return void - */ - public function testParentBean() - { - $village = R::dispense( 'village' ); - - $village->name = 'village'; - - $home = R::dispense( 'building' ); - - $home->village = $village; - - $id = R::store( $home ); - - $home = R::load( 'building', $id ); - - asrt( $home->village->name, 'village' ); - asrt( R::count( 'village' ), 1 ); - asrt( R::count( 'building' ), 1 ); - - R::trash( $home ); - - pass(); - - asrt( R::count( 'village' ), 1 ); - asrt( R::count( 'building' ), 0 ); - } - - /** - * test N-M relations through intermediate beans - * - * @return void - */ - public function testNMRelationsIntermediate() - { - list( $mrA, $mrB, $mrC ) = R::dispense( 'person', 3 ); - list( $projA, $projB, $projC ) = R::dispense( 'project', 3 ); - - $projA->title = 'A'; - $projB->title = 'B'; - $projC->title = 'C'; - - $participant = R::dispense( 'participant' ); - - $projA->link( 'participant', array( 'role' => 'manager' ) )->person = $mrA; - $projA->link( $participant->setAttr( 'role', 'developer' ) )->person = $mrB; - $projB->link( R::dispense( 'participant' )->setAttr( 'role', 'developer' ) )->person = $mrB; - $projB->link( 'participant', '{"role":"helpdesk"}' )->person = $mrC; - $projC->link( 'participant', '{"role":"sales"}' )->person = $mrC; - - R::storeAll( array( $projA, $projB, $projC ) ); - - $a = R::findOne( 'project', ' title = ? ', array( 'A' ) ); - $b = R::findOne( 'project', ' title = ? ', array( 'B' ) ); - $c = R::findOne( 'project', ' title = ? ', array( 'C' ) ); - - asrt( count( $a->ownParticipant ), 2 ); - asrt( count( $b->ownParticipant ), 2 ); - asrt( count( $c->ownParticipant ), 1 ); - - $managers = $developers = 0; - - foreach ( $a->ownParticipant as $p ) { - if ( $p->role === 'manager' ) { - $managers++; - } - if ( $p->role === 'developer' ) { - $developers++; - } - } - $p = reset( $a->ownParticipant ); - - asrt( $p->person->getMeta( 'type' ), 'person' ); - - asrt( ( $p->person->id > 0 ), TRUE ); - - asrt( $managers, 1 ); - asrt( $developers, 1 ); - - asrt( (int) R::count( 'participant' ), 5 ); - asrt( (int) R::count( 'person' ), 3 ); - } - - /** - * test emulation of sharedList through intermediate beans - * - * @return void - */ - public function testSharedListIntermediate() - { - list( $v1, $v2, $v3 ) = R::dispense( 'village', 3 ); - list( $a1, $a2, $a3 ) = R::dispense( 'army', 3 ); - - $a1->name = 'one'; - $a2->name = 'two'; - $a3->name = 'three'; - - $v1->name = 'Ville 1'; - $v2->name = 'Ville 2'; - $v3->name = 'Ville 3'; - - $v1->link( 'armyVillage' )->army = $a3; - $v2->link( 'army_village' )->army = $a2; - $v3->link( 'armyVillage' )->army = $a1; - $a2->link( 'army_village' )->village = $v1; - - $id1 = R::store( $v1 ); - $id2 = R::store( $v2 ); - $id3 = R::store( $v3 ); - - $village1 = R::load( 'village', $id1 ); - $village2 = R::load( 'village', $id2 ); - $village3 = R::load( 'village', $id3 ); - - asrt( count( $village1->sharedArmy ), 2 ); - asrt( count( $village2->sharedArmy ), 1 ); - asrt( count( $village3->sharedArmy ), 1 ); - } - - /** - * test emulation via association renaming - * - * @return void - */ - public function testAssociationRenaming() - { - list( $p1, $p2, $p3 ) = R::dispense( 'painting', 3 ); - - list( $m1, $m2, $m3 ) = R::dispense( 'museum', 3 ); - - $p1->name = 'painting1'; - $p2->name = 'painting2'; - $p3->name = 'painting3'; - - $m1->thename = 'a'; - $m2->thename = 'b'; - $m3->thename = 'c'; - - R::renameAssociation( 'museum_painting', 'exhibited' ); - - // Also test array syntax - R::renameAssociation( array( 'museum_museum' => 'center' ) ); - - $m1->link( 'center', array( 'name' => 'History Center' ) )->museum2 = $m2; - $m1->link( 'exhibited', '{"from":"2014-02-01","til":"2014-07-02"}' )->painting = $p3; - $m2->link( 'exhibited', '{"from":"2014-07-03","til":"2014-10-02"}' )->painting = $p3; - $m3->link( 'exhibited', '{"from":"2014-02-01","til":"2014-07-02"}' )->painting = $p1; - $m2->link( 'exhibited', '{"from":"2014-02-01","til":"2014-07-02"}' )->painting = $p2; - - R::storeAll( array( $m1, $m2, $m3 ) ); - - list( $m1, $m2, $m3 ) = array_values( R::findAll( 'museum', ' ORDER BY thename ASC' ) ); - - asrt( count( $m1->sharedMuseum ), 1 ); - asrt( count( $m1->sharedPainting ), 1 ); - asrt( count( $m2->sharedPainting ), 2 ); - asrt( count( $m3->sharedPainting ), 1 ); - - $p3 = reset( $m1->sharedPainting ); - - asrt( count( $p3->ownExhibited ), 2 ); - asrt( count( $m2->ownExhibited ), 2 ); - - R::storeAll( array( $m1, $m2, $m3 ) ); - - list( $m1, $m2, $m3 ) = array_values( R::findAll( 'museum', ' ORDER BY thename ASC' ) ); - - asrt( count( $m1->sharedPainting ), 1 ); - asrt( count( $m2->sharedPainting ), 2 ); - asrt( count( $m3->sharedPainting ), 1 ); - - $p3 = reset( $m1->sharedPainting ); - - asrt( count( $p3->ownExhibited ), 2 ); - - $paintings = $m2->sharedPainting; - - foreach ( $paintings as $painting ) { - if ( $painting->name === 'painting2' ) { - pass(); - $paintingX = $painting; - } - } - - unset( $m2->sharedPainting[$paintingX->id] ); - - R::store( $m2 ); - - $m2 = R::load( 'museum', $m2->id ); - - asrt( count( $m2->sharedPainting ), 1 ); - - $left = reset( $m2->sharedPainting ); - - asrt( $left->name, 'painting3' ); - asrt( count( $m2->ownExhibited ), 1 ); - - $exhibition = reset( $m2->ownExhibited ); - - asrt( $exhibition->from, '2014-07-03' ); - asrt( $exhibition->til, '2014-10-02' ); - } - - /** - * Test don't try to store other things in shared list. - * - * @return void - */ - public function testDontTryToStoreOtherThingsInSharedList() { - - $book = R::dispense( 'book' ); - $book->sharedPage[] = 'nonsense'; - - try { - R::store( $book ); - fail(); - } catch( RedException $exception) { - pass(); - } - - $book->sharedPageList = R::dispense( 'page', 2 ); - R::store( $book ); - $book->sharedPageList; - R::trash( $book ); - asrt( R::count('page'), 2 ); - } - - /** - * Test whether magic array interface functions like isset() and - * unset work correctly with the x-own-list and the List-suffix. - * - * Array functions do not reveal x-own-lists and list-alias because - * you dont want duplicate entries in foreach-loops. - * Also offers a slight performance improvement for array access. - * - * @return void - */ - public function testWhetherIssetWorksWithXList() - { - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - - asrt( isset( $book->xownPageList ), FALSE ); - asrt( isset( $book->ownPageList ), FALSE ); - asrt( isset( $book->xownPage ), FALSE ); - asrt( isset( $book->ownPage ), FALSE ); - - $book->xownPageList[] = $page; - - asrt( isset( $book->xownPageList ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPage ), TRUE ); - - //Test array access - asrt( isset( $book['xownPageList'] ), TRUE ); - asrt( isset( $book['ownPageList'] ), TRUE ); - asrt( isset( $book['xownPage'] ), TRUE ); - asrt( isset( $book['ownPage'] ), TRUE ); - - R::store( $book ); - $book = $book->fresh(); - - asrt( isset( $book->xownPageList ), FALSE ); - asrt( isset( $book->ownPageList ), FALSE ); - asrt( isset( $book->xownPage ), FALSE ); - asrt( isset( $book->ownPage ), FALSE ); - - asrt( isset( $book['xownPageList'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['ownPage'] ), FALSE ); - - $book->xownPageList; - - asrt( isset( $book->xownPageList ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPage ), TRUE ); - - asrt( isset( $book['xownPageList'] ), TRUE ); - asrt( isset( $book['ownPageList'] ), TRUE ); - asrt( isset( $book['xownPage'] ), TRUE ); - asrt( isset( $book['ownPage'] ), TRUE ); - - $book = $book->fresh(); - - asrt( isset( $book->xownPageList ), FALSE ); - asrt( isset( $book->ownPageList ), FALSE ); - asrt( isset( $book->xownPage ), FALSE ); - asrt( isset( $book->ownPage ), FALSE ); - - asrt( isset( $book['xownPageList'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['ownPage'] ), FALSE ); - - $book->noLoad()->xownPageList; - - asrt( isset( $book->xownPageList ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - - //but empty - asrt( count( $book->ownPageList ), 0 ); - asrt( count( $book->xownPageList ), 0 ); - asrt( count( $book->ownPage ), 0 ); - asrt( count( $book->xownPage ), 0 ); - - $book->xownPageList[] = $page; - asrt( isset( $book->xownPageList ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPage ), TRUE ); - - asrt( isset( $book['xownPageList'] ), TRUE ); - asrt( isset( $book['ownPageList'] ), TRUE ); - asrt( isset( $book['xownPage'] ), TRUE ); - asrt( isset( $book['ownPage'] ), TRUE ); - - unset( $book->xownPageList ); - - asrt( isset( $book->xownPageList ), FALSE ); - asrt( isset( $book->ownPageList ), FALSE ); - asrt( isset( $book->xownPage ), FALSE ); - asrt( isset( $book->ownPage ), FALSE ); - - asrt( isset( $book['xownPageList'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['ownPage'] ), FALSE ); - - $book->xownPageList[] = $page; - - asrt( isset( $book->xownPageList ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPage ), TRUE ); - - asrt( isset( $book['xownPageList'] ), TRUE ); - asrt( isset( $book['ownPageList'] ), TRUE ); - asrt( isset( $book['xownPage'] ), TRUE ); - asrt( isset( $book['ownPage'] ), TRUE ); - - unset( $book->xownPage ); - - asrt( isset( $book->xownPageList ), FALSE ); - asrt( isset( $book->ownPageList ), FALSE ); - asrt( isset( $book->xownPage ), FALSE ); - asrt( isset( $book->ownPage ), FALSE ); - - asrt( isset( $book['xownPageList'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['ownPage'] ), FALSE ); - - $book = $book->fresh(); - asrt( isset( $book->xownPageList ), FALSE ); - asrt( isset( $book->ownPageList ), FALSE ); - asrt( isset( $book->xownPage ), FALSE ); - asrt( isset( $book->ownPage ), FALSE ); - - asrt( isset( $book['xownPageList'] ), FALSE ); - asrt( isset( $book['ownPageList'] ), FALSE ); - asrt( isset( $book['xownPage'] ), FALSE ); - asrt( isset( $book['ownPage'] ), FALSE ); - - $book->ownPageList; - asrt( isset( $book->xownPageList ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPage ), TRUE ); - - asrt( isset( $book['xownPageList'] ), TRUE ); - asrt( isset( $book['ownPageList'] ), TRUE ); - asrt( isset( $book['xownPage'] ), TRUE ); - asrt( isset( $book['ownPage'] ), TRUE ); - } - - /** - * Test whether you can still set items starting with 'xown' or - * 'own' not followed by an uppercase character. - * - * @return void - */ - public function testConfusionWithXOwnList() - { - $book = R::dispense( 'book' ); - $book->xownitem = 1; - asrt( isset( $book->xownitem ), TRUE ); - asrt( (int) $book->xownitem, 1 ); - asrt( isset( $book->xownItem ), FALSE ); - asrt( isset( $book->xownItemList ), FALSE ); - $book->ownitem = 1; - asrt( isset( $book->ownitem ), TRUE ); - asrt( (int) $book->ownitem, 1 ); - asrt( isset( $book->ownItemList ), FALSE ); - R::store( $book ); - $book = $book->fresh(); - asrt( isset( $book->xownitem ), TRUE ); - asrt( (int) $book->xownitem, 1 ); - asrt( isset( $book->xownItem ), FALSE ); - asrt( isset( $book->xownItemList ), FALSE ); - asrt( isset( $book->ownitem ), TRUE ); - asrt( (int) $book->ownitem, 1 ); - asrt( isset( $book->ownItemList ), FALSE ); - } - - /** - * Test whether we can determine the mode of a list. - * - * @return void - */ - public function testModeCheckerOfLists() - { - foreach( array( 'ownPage', 'xownPage', 'ownPageList', 'xownPageList' ) as $listName ) { - $book = R::dispense( 'book' ); - asrt( $book->isListInExclusiveMode( $listName ), FALSE ); - $book->ownPageList[] = R::dispense( 'page' ); - asrt( $book->isListInExclusiveMode( $listName ), FALSE ); - - $book = R::dispense( 'book' ); - asrt( $book->isListInExclusiveMode( $listName ), FALSE ); - $book->xownPageList[] = R::dispense( 'page' ); - asrt( $book->isListInExclusiveMode( $listName ), TRUE ); - - $book = R::dispense( 'book' ); - asrt( $book->isListInExclusiveMode( $listName ), FALSE ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( $book->isListInExclusiveMode( $listName ), FALSE ); - - $book = R::dispense( 'book' ); - asrt( $book->isListInExclusiveMode( $listName ), FALSE ); - $book->xownPage[] = R::dispense( 'page' ); - asrt( $book->isListInExclusiveMode( $listName ), TRUE ); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Tags.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Tags.php deleted file mode 100644 index 64a20f3d..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Tags.php +++ /dev/null @@ -1,220 +0,0 @@ -title = 'Frankenstein'; - $m2->title = 'Fall of the House Usher'; - $m3->title = 'Sleepy Hollow'; - R::tag($m1, 'horror,gothic'); - R::tag($m2, 'horror,gothic,short'); - R::tag($m3, 'horror,legend'); - asrt( count( R::tagged( 'movie', 'horror' ) ), 3); - asrt( count( R::tagged( 'movie', 'horror', ' LIMIT 2' ) ), 2); - asrt( count( R::tagged( 'movie', 'horror', ' LIMIT ?', array( 2 ) ) ), 2); - asrt( count( R::tagged( 'movie', 'horror', ' ORDER BY movie.title DESC LIMIT ?', array( 2 ) ) ), 2); - asrt( count( R::tagged( 'movie', 'horror,gothic', ' ORDER BY movie.title DESC LIMIT ?', array( 1 ) ) ), 1); - asrt( count( R::tagged( 'movie', 'horror,gothic') ), 3 ); - asrt( count( R::taggedAll( 'movie', 'horror,gothic') ), 2 ); - asrt( count( R::tagged( 'movie', 'horror,gothic', ' LIMIT ? ', array( 2 ) ) ), 2 ); - asrt( count( R::taggedAll( 'movie', 'horror,gothic', ' LIMIT ? ', array( 2 ) ) ), 2 ); - asrt( count( R::tagged( 'movie', 'horror,gothic', ' LIMIT ? ', array( 1 ) ) ), 1 ); - asrt( count( R::taggedAll( 'movie', 'horror,gothic', ' LIMIT ? ', array( 1 ) ) ), 1 ); - asrt( count( R::tagged( 'movie', 'horror,legend', ' LIMIT ? ', array( 1 ) ) ), 1 ); - asrt( count( R::taggedAll( 'movie', 'horror,legend', ' LIMIT ? ', array( 1 ) ) ), 1 ); - asrt( count( R::tagged( 'movie', 'gothic,legend', ' LIMIT ? ', array( 1 ) ) ), 1 ); - asrt( count( R::taggedAll( 'movie', 'gothic,legend', ' LIMIT ? ', array( 1 ) ) ), 0 ); - asrt( count( R::tagged( 'movie', 'romance', ' LIMIT ? ', array( 1 ) ) ), 0 ); - asrt( count( R::taggedAll( 'movie', 'romance', ' LIMIT ? ', array( 1 ) ) ), 0 ); - asrt( count( R::tagged( 'movie', 'romance,xmas', ' LIMIT ? ', array( 1 ) ) ), 0 ); - asrt( count( R::taggedAll( 'movie', 'romance,xmas', ' LIMIT ? ', array( 1 ) ) ), 0 ); - asrt( count( R::tagged( 'movie', 'gothic,short', ' LIMIT ? ', array( 4 ) ) ), 2 ); - asrt( count( R::taggedAll( 'movie', 'gothic,short', ' LIMIT ? ', array( 4 ) ) ), 1 ); - asrt( count( R::tagged( 'movie', 'gothic,short', ' LIMIT 4 ' ) ), 2 ); - asrt( count( R::taggedAll( 'movie', 'gothic,short', ' LIMIT 4 ' ) ), 1 ); - asrt( count( R::tagged( 'movie', 'gothic,short', ' ORDER BY movie.id DESC LIMIT 4 ' ) ), 2 ); - asrt( count( R::taggedAll( 'movie', 'gothic,short', ' ORDER BY movie.id DESC LIMIT 4 ' ) ), 1 ); - asrt( count( R::tagged( 'movie', 'short', ' LIMIT ? ', array( 4 ) ) ), 1 ); - asrt( count( R::taggedAll( 'movie', 'short', ' LIMIT ? ', array( 4 ) ) ), 1 ); - asrt( count( R::tagged( 'movie', '', ' LIMIT ? ', array( 4 ) ) ), 0 ); - asrt( count( R::taggedAll( 'movie', '', ' LIMIT ? ', array( 4 ) ) ), 0 ); - asrt( count( R::tagged( 'movie', '', ' LIMIT 4 ' ) ), 0 ); - asrt( count( R::taggedAll( 'movie', '', ' LIMIT 4 ' ) ), 0 ); - asrt( count( R::tagged( 'movie', '', '' ) ), 0 ); - asrt( count( R::taggedAll( 'movie', '', '' ) ), 0 ); - asrt( count( R::tagged( 'movie', '' ) ), 0 ); - asrt( count( R::taggedAll( 'movie', '' ) ), 0 ); - } - - /** - * Some basic tests. - * - * @return void - */ - public function testTags() - { - list( $c, $d, $e, $f ) = R::dispense( 'coffee', 4 ); - - R::tag( $c, 'strong,black' ); - R::tag( $d, 'black' ); - R::tag( $e, 'strong,sweet' ); - R::tag( $f, 'black,strong' ); - asrt( count( R::taggedAll( 'coffee', 'strong,sweet' ) ), 1 ); - - asrt( count( R::taggedAll( 'coffee', 'strong' ) ), 3 ); - - asrt( count( R::taggedAll( 'coffee', '' ) ), 0 ); - - asrt( count( R::taggedAll( 'coffee', 'sweet' ) ), 1 ); - - asrt( count( R::taggedAll( 'coffee', 'sweet,strong' ) ), 1 ); - - asrt( count( R::taggedAll( 'coffee', 'black,strong' ) ), 2 ); - - asrt( count( R::taggedAll( 'coffee', array( 'black', 'strong' ) ) ), 2 ); - - asrt( count( R::taggedAll( 'coffee', 'salty' ) ), 0 ); - - $blog = R::dispense( 'blog' ); - - $blog->title = 'testing'; - $blog->blog = 'tesing'; - - R::store( $blog ); - - $blogpost = ( R::load( "blog", 1 ) ); - - $post = R::dispense( "post" ); - - $post->message = "hello"; - - R::tag( $post, "lousy,smart" ); - - asrt( implode( ',', R::tag( $post ) ), "lousy,smart" ); - - R::tag( $post, "clever,smart" ); - - $tagz = implode( ',', R::tag( $post ) ); - - asrt( ( $tagz == "smart,clever" || $tagz == "clever,smart" ), TRUE ); - - R::tag( $blog, array( "smart", "interesting" ) ); - - asrt( implode( ',', R::tag( $blog ) ), "smart,interesting" ); - - try { - R::tag( $blog, array( "smart", "interesting", "lousy!" ) ); - - pass(); - } catch ( RedException $e ) { - fail(); - } - - asrt( implode( ',', R::tag( $blog ) ), "smart,interesting,lousy!" ); - - R::untag( $blog, array( "smart", "interesting" ) ); - - asrt( implode( ",", R::tag( $blog ) ), "lousy!" ); - - asrt( R::hasTag( $blog, array( "lousy!" ) ), TRUE ); - asrt( R::hasTag( $blog, array( "lousy!", "smart" ) ), TRUE ); - asrt( R::hasTag( $blog, array( "lousy!", "smart" ), TRUE ), FALSE ); - - R::tag( $blog, FALSE ); - - asrt( count( R::tag( $blog ) ), 0 ); - - R::tag( $blog, array( "funny", "comic" ) ); - - asrt( count( R::tag( $blog ) ), 2 ); - - R::addTags( $blog, array( "halloween" ) ); - - asrt( count( R::tag( $blog ) ), 3 ); - asrt( R::hasTag( $blog, array( "funny", "commic", "halloween" ), TRUE ), FALSE ); - - R::unTag( $blog, "funny" ); - R::addTags( $blog, "horror" ); - - asrt( count( R::tag( $blog ) ), 3 ); - asrt( R::hasTag( $blog, array( "horror", "commic", "halloween" ), TRUE ), FALSE ); - - //no double tags - R::addTags( $blog, "horror" ); - - asrt( R::hasTag( $blog, array( "horror", "commic", "halloween" ), TRUE ), FALSE ); - asrt( R::hasTag( $blog, "horror,commic,halloween", TRUE ), FALSE ); - - asrt( count( R::tag( $blog ) ), 3 ); - - testpack( "fetch tagged items" ); - } - - /** - * Fetching tagged items. - * - * @return void - */ - public function fetchTaggedItems() - { - $b = R::dispense( "book" ); - - $b->title = 'horror'; - - R::store( $b ); - - $c = R::dispense( "book" ); - - $c->title = 'creepy'; - - R::store( $c ); - - $d = R::dispense( "book" ); - - $d->title = "chicklit"; - - R::store( $d ); - - R::tag( $b, "horror,classic" ); - R::tag( $d, "women,classic" ); - R::tag( $c, "horror" ); - - $x = R::tagged( "book", "classic" ); - - asrt( count( $x ), 2 ); - - $x = R::tagged( "book", "classic,horror" ); - - asrt( count( $x ), 3 ); - - $x = R::tagged( "book", array( "classic", "horror" ) ); - - asrt( count( $x ), 3 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Threeway.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Threeway.php deleted file mode 100644 index a74e1424..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Threeway.php +++ /dev/null @@ -1,145 +0,0 @@ -sharedRole[] = $role; - R::store( $person ); - - $person->link( 'person_role', array( - 'unit' => R::dispense('unit') - ))->role = $role; - - //Can we add a duplicate role now? - No because we started with a simple N-M table - //and unique constraint has been applied accordingly, manually change database. - asrt( R::count( 'person_role' ), 1 ); - - R::nuke(); - - $person = R::dispense( 'person' ); - $role = R::dispense( 'role' ); - $person->via('participant')->sharedRole[] = $role; - R::store( $person ); - - $person->link( 'participant', array( - 'unit' => R::dispense('unit') - ))->role = $role; - - //Can we add a duplicate role now? - No because we started with a simple N-M table - //and unique constraint has been applied accordingly, manually change database. - asrt( R::count( 'participant' ), 1 ); - - R::nuke(); - - $participant = R::dispense( 'participant' ); - $person = R::dispense( 'person' ); - $role = R::dispense( 'role' ); - $unit = R::dispense( 'unit' ); - $participant->person = $person; - $participant->role = $role; - $participant->unit = $unit; - R::store( $participant ); - - $person->link( 'participant', array( - 'unit' => R::dispense('unit') - ))->role = $role; - - R::store( $person ); - - //Can we add a duplicate role now? - asrt( R::count( 'participant' ), 2 ); - AQueryWriter::clearRenames(); - } - - /** - * Test whether a duplicate bean in the list isnt saved. - * This was an issue with Postgres while testing the threeway tables. - * Postgres returned the ID as a string while other drivers returned - * a numeric value causing different outcome in array_diff when - * calculating the shared additions. - * - * @return void - */ - public function testIssueWithDriverReturnID() - { - AQueryWriter::clearRenames(); - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->sharedPageList[] = $page; - R::store( $book ); - asrt( R::count( 'page' ), 1 ); - $book = $book->fresh(); - $book->sharedPageList[] = $page; - R::store( $book ); - - //don't save the duplicate bean! - asrt( R::count( 'page' ), 1 ); - - $book = $book->fresh(); - $page->item = 2; //even if we change a property ? - $book->sharedPageList[] = $page; - R::store( $book ); - - foreach( $book->sharedPageList as $listItem) { - asrt( is_string( $listItem->id ), TRUE ); - } - - //same test but for own-list - R::nuke(); - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $book->ownPageList[] = $page; - R::store( $book ); - asrt( R::count( 'page' ), 1 ); - $book = $book->fresh(); - $book->ownPageList[] = $page; - R::store( $book ); - //don't save the duplicate bean! - asrt( R::count( 'page' ), 1 ); - - $book = $book->fresh(); - $book->ownPageList[] = $page; - $page->item = 3; - R::store( $book ); - //don't save the duplicate bean! - asrt( R::count( 'page' ), 1 ); - - foreach( $book->ownPageList as $listItem) { - asrt( is_string( $listItem->id ), TRUE ); - } - AQueryWriter::clearRenames(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php deleted file mode 100644 index fa3c5692..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Traverse.php +++ /dev/null @@ -1,252 +0,0 @@ -title = 'Book ' . ( $i++ ); - } - - $books[5]->marked = TRUE; - - $shelf = R::dispense( 'shelf' ); - $shelf->ownBook = $books; - - $found = NULL; - $shelf->traverse('ownBookList', function( $book ) use ( &$found ) { - if ( $book->marked ) $found = $book; - }); - - asrt( ( $found->marked == TRUE ), TRUE ); - asrt( $found->title, 'Book 6' ); - } - - /** - * Tests basic traversal. - * - * @return void - */ - public function testBasicTraversal() - { - R::nuke(); - $pageA = R::dispense( 'page' )->setAttr( 'title', 'a' ); - $pageB = R::dispense( 'page' )->setAttr( 'title', 'b' ); - $pageC = R::dispense( 'page' )->setAttr( 'title', 'c' ); - $pageD = R::dispense( 'page' )->setAttr( 'title', 'd' ); - $pageE = R::dispense( 'page' )->setAttr( 'title', 'e' ); - $pageF = R::dispense( 'page' )->setAttr( 'title', 'f' ); - $pageG = R::dispense( 'page' )->setAttr( 'title', 'g' ); - $pageH = R::dispense( 'page' )->setAttr( 'title', 'h' ); - - $pageA->ownPage = array( $pageB, $pageC ); - $pageB->ownPage = array( $pageD ); - $pageC->ownPage = array( $pageE, $pageF ); - $pageD->ownPage = array( $pageG ); - $pageF->ownPage = array( $pageH ); - - R::store( $pageA ); - $pageA = $pageA->fresh(); - - //also tests non-existant column handling by count(). - asrt( R::count( 'page', ' price = ? ', array( '5' ) ), 0); - asrt( R::count( 'tag', ' title = ? ', array( 'new' ) ), 0); - - $pageA->traverse( 'ownPageList', function( $bean ) { - $bean->price = 5; - }); - - R::store( $pageA ); - - asrt( R::count( 'page', ' price = ? ', array( '5' ) ), 7); - } - - /** - * Test traversing paths, ancestry. - * - * @return void - */ - public function testTraversePaths() - { - R::nuke(); - $pageA = R::dispense( 'page' )->setAttr( 'title', 'a' ); - $pageB = R::dispense( 'page' )->setAttr( 'title', 'b' ); - $pageC = R::dispense( 'page' )->setAttr( 'title', 'c' ); - $pageD = R::dispense( 'page' )->setAttr( 'title', 'd' ); - $pageE = R::dispense( 'page' )->setAttr( 'title', 'e' ); - $pageF = R::dispense( 'page' )->setAttr( 'title', 'f' ); - $pageG = R::dispense( 'page' )->setAttr( 'title', 'g' ); - $pageH = R::dispense( 'page' )->setAttr( 'title', 'h' ); - - $pageA->ownPage = array( $pageB, $pageC ); - $pageB->ownPage = array( $pageD ); - $pageC->ownPage = array( $pageE, $pageF ); - $pageD->ownPage = array( $pageG ); - $pageF->ownPage = array( $pageH ); - - R::store( $pageA ); - - $parents = array(); - $pageF->traverse( 'page', function( $page ) use ( &$parents ) { - $parents[] = $page->title; - } ); - - asrt( implode( ',', $parents ), 'c,a' ); - - $parents = array(); - $pageH->traverse( 'page', function( $page ) use ( &$parents ) { - $parents[] = $page->title; - } ); - - asrt( implode( ',', $parents ), 'f,c,a' ); - - $parents = array(); - $pageG->traverse( 'page', function( $page ) use ( &$parents ) { - $parents[] = $page->title; - } ); - - asrt( implode( ',', $parents ), 'd,b,a' ); - - $path = array(); - $pageA->traverse( 'ownPageList', function( $page ) use ( &$path ) { - $path[] = $page->title; - } ); - - asrt( implode( ',', $path ), 'b,d,g,c,e,f,h' ); - - $path = array(); - $pageC->traverse( 'ownPageList', function( $page ) use ( &$path ) { - $path[] = $page->title; - } ); - - asrt( implode( ',', $path ), 'e,f,h' ); - - $path = array(); - $pageA->traverse( 'ownPageList', function( $page ) use ( &$path ) { - $path[] = $page->title; - }, 2 ); - - asrt( implode( ',', $path ), 'b,d,c,e,f' ); - } - - /** - * Test traversal with embedded SQL snippets. - * - * @return void - */ - public function testTraversalWithSQL() - { - $tasks = R::dispense('task', 10); - foreach( $tasks as $key => $task ) { - $task->descr = 't'.$key; - } - $tasks[0]->ownTask = array( $tasks[1], $tasks[9], $tasks[7] ); - $tasks[1]->ownTask = array( $tasks[5] ); - $tasks[9]->ownTask = array( $tasks[3], $tasks[8] ); - $tasks[2]->ownTask = array( $tasks[4] ); - $tasks[7]->ownTask = array( $tasks[6] ); - R::storeAll( $tasks ); - $task = R::load('task', $tasks[0]->id); - - $todo = array(); - $task->with(' ORDER BY descr ASC ')->traverse('ownTaskList', function( $t ) use ( &$todo ) { - $todo[] = $t->descr; - } ); - - asrt( implode( ',', $todo ), 't1,t5,t7,t6,t9,t3,t8' ); - - $task = R::load( 'task', $tasks[0]->id ); - $todo = array(); - $task->withCondition( ' ( descr = ? OR descr = ? ) ', array( 't7','t6' ) ) - ->traverse( 'ownTaskList', function( $task ) use( &$todo ){ - $todo[] = $task->descr; - } ); - - asrt( implode( ',', $todo ), 't7,t6' ); - } - - /** - * Test traversal with aliases. - * - * @return void - */ - public function testTraversalWithAlias() - { - R::nuke(); - $book = R::dispense( 'book' ); - $cats = R::dispense( 'category', 3 ); - $cats[0]->gname = 'SF'; - $cats[1]->gname = 'Fantasy'; - $cats[2]->gname = 'Horror'; - $book->genre = $cats[0]; - $book->name = 'Space Story'; - $cats[0]->genre = $cats[1]; - $cats[2]->genre = $cats[1]; - R::store( $book ); - - $book2 = R::dispense( 'book' ); - $book2->genre = $cats[2]; - $book2->name = 'Ghost Story'; - R::store( $book2 ); - $fantasy = R::load( 'category', $cats[1]->id ); - - $cats = array(); - $book = $book->fresh(); - $book->fetchAs( 'category' )->traverse( 'genre', function( $cat ) use ( &$cats ) { - $cats[] = $cat->gname; - } ); - asrt( implode( ',', $cats ), 'SF,Fantasy' ); - - $catList = array(); - $fantasy->alias( 'genre' ) - ->with( ' ORDER BY gname ASC ' ) - ->traverse( 'ownCategory', function( $cat ) use ( &$catList ) { - $catList[] = $cat->gname; - } ); - asrt( implode( ',', $catList ), 'Horror,SF' ); - } - - /** - * Traverse can only work with own-lists, otherwise infinite loops. - * - * @return void - */ - public function testSharedTraversal() - { - $friend = R::dispense( 'friend' ); - try { - $friend->traverse( 'sharedFriend', function( $friend ){ } ); - fail(); - } catch( RedException $e ) { - pass(); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Typechecking.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Typechecking.php deleted file mode 100644 index 78ab2bc5..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Typechecking.php +++ /dev/null @@ -1,177 +0,0 @@ - STRING - * NULL -> NULL - * - * @note Why not simply return bean->id in store()? Because not every driver returns the same type: - * databases without insert_id support require a separate query or a suffix returning STRINGS, not INTEGERS. - * - * @note Why not preserve types? I.e. I store integer, why do I get back a string? - * Answer: types are handled different across database platforms, would cause overhead to inspect every value for type, - * also PHP is a dynamically typed language so types should not matter that much. Another reason: due to the nature - * of RB columns in the database might change (INT -> STRING) this would cause return types to change as well which would - * cause 'cascading errors', i.e. a column gets widened and suddenly your code would break. - * - * @note Unfortunately the 32/64-bit issue cannot be tested fully. Return-strategy store() is probably the safest - * solution. - * - * @return void - */ - public function testTypes() - { - testpack( 'Beans can only contain STRING and NULL after reload' ); - - R::nuke(); - - $bean = R::dispense( 'bean' ); - - $bean->number = 123; - $bean->float = 12.3; - $bean->bool = false; - $bean->bool2 = true; - $bean->text = 'abc'; - $bean->null = null; - $bean->datetime = new\DateTime( 'NOW', new\DateTimeZone( 'Europe/Amsterdam' ) ); - - $id = R::store( $bean ); - - asrt( is_int( $id ), TRUE ); - asrt( is_float( $bean->float ), TRUE ); - asrt( is_integer( $bean->number ), TRUE ); - asrt( is_string( $bean->bool ), TRUE ); - asrt( is_string( $bean->bool2 ), TRUE ); - asrt( is_string( $bean->datetime ), TRUE ); - asrt( is_string( $bean->text ), TRUE ); - asrt( is_null( $bean->null ), TRUE ); - - $bean = R::load('bean', $id ); - - asrt( is_string( $bean->id ), TRUE ); - asrt( is_string( $bean->float ), TRUE ); - asrt( is_string( $bean->number ), TRUE ); - asrt( is_string( $bean->bool ), TRUE ); - asrt( is_string( $bean->bool2 ), TRUE ); - asrt( is_string( $bean->datetime ), TRUE ); - asrt( is_string( $bean->text ), TRUE ); - asrt( is_null( $bean->null ), TRUE ); - asrt( $bean->bool, '0' ); - asrt( $bean->bool2, '1' ); - } - - /** - * Test bean type checking. - * - * @return void - */ - public function testBeanTypeChecking() - { - $redbean = R::getRedBean(); - - $bean = $redbean->dispense( "page" ); - - // Set some illegal values in the bean; this should trigger Security exceptions. - // Arrays are not allowed. - $bean->name = array( "1" ); - - try { - $redbean->store( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - - try { - $redbean->check( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - - $bean->name = new OODBBean; - - try { - $redbean->check( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - - // Property names should be alphanumeric - $prop = "."; - - $bean->$prop = 1; - - try { - $redbean->store( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - - try { - $redbean->check( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - - // Really... - $prop = "-"; - - $bean->$prop = 1; - - try { - $redbean->store( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - - try { - $redbean->check( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php deleted file mode 100644 index faab8124..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Update.php +++ /dev/null @@ -1,542 +0,0 @@ - array( - 'book' => array( 'title' => ' LOWER(book.title) '), - ), - QueryWriter::C_SQLFILTER_WRITE => array( - 'book' => array( 'title' => ' UPPER(?) '), - ), - )); - - $book = R::dispense( 'book' ); - $book->title = 'story'; - R::store( $book ); - asrt( R::getCell( 'SELECT title FROM book WHERE id = ?', array( $book->id ) ), 'STORY' ); - $book = $book->fresh(); - asrt( $book->title, 'story' ); - $library = R::dispense( 'library' ); - $library->sharedBookList[] = $book; - R::store( $library ); - $library = $library->fresh(); - $books = $library->sharedBookList; - $book = reset( $books ); - asrt( $book->title, 'story' ); - $otherBook = R::dispense('book'); - $otherBook->sharedBook[] = $book; - R::store( $otherBook ); - $otherBook = $otherBook->fresh(); - $books = $otherBook->sharedBookList; - $book = reset( $books ); - asrt( $book->title, 'story' ); - $links = $book->ownBookBookList; - $link = reset( $links ); - $link->shelf = 'x13'; - AQueryWriter::setSQLFilters(array( - QueryWriter::C_SQLFILTER_READ => array( - 'book' => array( 'title' => ' LOWER(book.title) '), - 'book_book' => array( 'shelf' => ' LOWER(book_book.shelf) '), - ), - QueryWriter::C_SQLFILTER_WRITE => array( - 'book' => array( 'title' => ' UPPER(?) '), - 'book_book' => array( 'shelf' => ' UPPER(?) ') - ), - )); - R::store( $link ); - asrt( R::getCell( 'SELECT shelf FROM book_book WHERE id = ?', array( $link->id ) ), 'X13' ); - $otherBook = $otherBook->fresh(); - unset($book->sharedBookList[$otherBook->id]); - R::store( $book ); - AQueryWriter::setSQLFilters(array()); - } - - /** - * Test unsetting properties. - * - * @return void - */ - public function testUnsetUpdate() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->name = 'x'; - $book->price = 40; - R::store( $book ); - $book = $book->fresh(); - $book->name = 'y'; - unset( $book->name ); - R::store( $book ); - $book = $book->fresh(); - asrt( $book->name, 'x' ); - asrt( (int) $book->price, 40 ); - $book->price = 30; - R::store( $book ); - $book = $book->fresh(); - asrt( $book->name, 'x' ); - asrt( (int) $book->price, 30 ); - $book->price = 20; - unset( $book->price ); - $book->name = 'y'; - R::store( $book ); - $book = $book->fresh(); - asrt( $book->name, 'y' ); - asrt( (int) $book->price, 30 ); - } - - /** - * Tests whether we can update or unset a parent bean - * with an alias without having to use fetchAs and - * without loading the aliased bean causing table-not-found - * errors. - */ - public function testUpdatingParentBeansWithAliases() - { - testpack( 'Test updating parent beans with aliases' ); - R::nuke(); - - $trans = R::dispense( 'transaction' ); - $seller = R::dispense( 'user' ); - - $trans->seller = $seller; - - $id = R::store( $trans ); - - R::freeze( true ); - - $trans = R::load( 'transaction', $id ); - - //should not try to load seller, should not require fetchAs(). - try { - $trans->seller = R::dispense( 'user' ); - pass(); - } catch( Exception $e ) { - fail(); - } - - $trans = R::load( 'transaction', $id ); - - //same for unset... - try { - unset( $trans->seller ); - pass(); - } catch ( Exception $e ) { - fail(); - } - - R::freeze( false ); - - $account = R::dispense( 'user' ); - - asrt( count( $account->alias( 'seller' )->ownTransaction ), 0 ); - - $account->alias( 'seller' )->ownTransaction = R::dispense( 'transaction', 10 ); - $account->alias( 'boo' ); //try to trick me... - - $id = R::store( $account ); - - R::freeze( true ); - - $account = R::load( 'user', $id ); - asrt( count( $account->alias( 'seller' )->ownTransaction ), 10 ); - - //you cannot unset a list - unset( $account->alias( 'seller' )->ownTransaction ); - $id = R::store( $account ); - - $account = R::load( 'user', $id ); - asrt( count( $account->alias( 'seller' )->ownTransaction ), 10 ); - - $account->alias( 'seller' )->ownTransaction = array(); - - $id = R::store( $account ); - $account = R::load( 'user', $id ); - asrt(count($account->alias( 'seller' )->ownTransaction), 0 ); - asrt(count($account->ownTransaction), 0 ); - - R::freeze( false ); - - //but also make sure we don't cause extra column issue #335 - - R::nuke(); - - $building = R::dispense('building'); - $village = R::dispense('village'); - - $building->village = $village; - - R::store($building); - - $building = $building->fresh(); - $building->village = NULL; - - R::store($building); - - $building = $building->fresh(); - - $columns = R::inspect('building'); - asrt( isset( $columns['village'] ), false ); - asrt( isset( $building->village ), false ); - - R::nuke(); - - $building = R::dispense('building'); - $village = R::dispense('village'); - - $building->village = $village; - - R::store($building); - - $building = $building->fresh(); - unset($building->village); - - R::store($building); - - $building = $building->fresh(); - - $columns = R::inspect('building'); - asrt( isset( $columns['village'] ), false ); - asrt( isset( $building->village ), false ); - - $building = R::dispense('building'); - $village = R::dispense('village'); - - $building->village = $village; - - R::store($building); - - $building = $building->fresh(); - $building->village = false; - - R::store($building); - - $building = $building->fresh(); - - $columns = R::inspect('building'); - asrt( isset( $columns['village'] ), false ); - asrt( isset( $building->village ), false ); - - } - - /** - * All kinds of tests for basic CRUD. - * - * Does the data survive? - * - * @return void - */ - public function testUpdatingBeans() - { - testpack( 'Test basic support UUID/override ID default value' ); - - $bean = R::dispense( 'bean' ); - - R::store( $bean ); - - if ($this->currentlyActiveDriverID === 'mysql') { - //otherwise UTF8 causes index overflow in mysql: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes - R::exec('alter table bean modify column id char(3);'); - } else { - R::getWriter()->widenColumn( 'bean', 'id', R::getWriter()->scanType( 'abc' ) ); - } - - $bean->id = 'abc'; - - R::store( $bean ); - - asrt( $bean->id, 'abc' ); - - testpack( 'Test Update' ); - - try { - R::store( array() ); - fail(); - } catch ( RedException $e ) { - pass(); - } - - $toolbox = R::getToolBox(); - $adapter = $toolbox->getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - $page = $redbean->dispense( "page" ); - - $page->name = "old name"; - - $id = $redbean->store( $page ); - - asrt( $page->getMeta( 'tainted' ), FALSE ); - - $page->setAttr( 'name', "new name" ); - - asrt( $page->getMeta( 'tainted' ), TRUE ); - - $id = $redbean->store( $page ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - - // Null should == NULL after saving - $page->rating = NULL; - - $newid = $redbean->store( $page ); - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( ( $page->rating === NULL ), TRUE ); - asrt( !$page->rating, TRUE ); - - $page->rating = FALSE; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( (bool) $page->rating, FALSE ); - asrt( ( $page->rating == FALSE ), TRUE ); - asrt( !$page->rating, TRUE ); - - $page->rating = TRUE; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( (bool) $page->rating, TRUE ); - - asrt( ( $page->rating == TRUE ), TRUE ); - asrt( ( $page->rating == TRUE ), TRUE ); - - $page->rating = NULL; - - R::store( $page ); - - $page = R::load( 'page', $page->id ); - - asrt( $page->rating, NULL ); - - $page->rating = "1"; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( $page->rating, "1" ); - - $page->rating = "0"; - - $newid = $redbean->store( $page ); - - asrt( $page->rating, "0" ); - - $page->rating = 0; - - $newid = $redbean->store( $page ); - - asrt( $page->rating, 0 ); - - $page->rating = "0"; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( !$page->rating, TRUE ); - - asrt( ( $page->rating == 0 ), TRUE ); - asrt( ( $page->rating == FALSE ), TRUE ); - - $page->rating = 5; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( strval( $page->rating ), "5" ); - - $page->rating = 300; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( strval( $page->rating ), "300" ); - - $page->rating = -2; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( strval( $page->rating ), "-2" ); - - $page->rating = 2.5; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( ( $page->rating == 2.5 ), TRUE ); - - $page->rating = -3.3; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( ( $page->rating == -3.3 ), TRUE ); - - $page->rating = "good"; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( $page->rating, "good" ); - - $longtext = str_repeat( 'great! because..', 100 ); - - $page->rating = $longtext; - - $newid = $redbean->store( $page ); - - asrt( $newid, $id ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->name, "new name" ); - asrt( $page->rating, $longtext ); - - // Test leading zeros - $numAsString = "0001"; - - $page->numasstring = $numAsString; - - $redbean->store( $page ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->numasstring, "0001" ); - - $page->numnotstring = "0.123"; - - $redbean->store( $page ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->numnotstring == 0.123, TRUE ); - - $page->numasstring2 = "00.123"; - - $redbean->store( $page ); - - $page = $redbean->load( "page", $id ); - - asrt( $page->numasstring2, "00.123" ); - - try { - $redbean->trash( array() ); - - fail(); - } catch ( RedException $e ) { - pass(); - } - - $redbean->trash( $page ); - - asrt( (int) $pdo->GetCell( "SELECT count(*) FROM page" ), 0 ); - } - - public function testEmptyStringShouldNotBeStoredAsInteger() - { - R::nuke(); - $bean = R::dispense('bean'); - $bean->str = ''; - R::store($bean); - $bean = $bean->fresh(); - asrt( ( $bean->str === '' ), TRUE); - } - - /** - * Test handling of infinity values. - * - * @return void - */ - public function testStoringInf() - { - R::nuke(); - $bean = R::dispense( 'bean' ); - $bean->inf = INF; - R::store( $bean ); - $bean = $bean->fresh(); - asrt( ( $bean->inf === 'INF' ), TRUE ); - asrt( ( $bean->inf == 'INF' ), TRUE ); - $bean->modifyme = 'yes'; - R::store( $bean ); - $bean = $bean->fresh(); - asrt( ( $bean->inf === 'INF' ), TRUE ); - asrt( ( $bean->inf == 'INF' ), TRUE ); - $bean->modifyme = 'yes'; - } -} - diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Utf8.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Utf8.php deleted file mode 100644 index 8a947694..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Utf8.php +++ /dev/null @@ -1,39 +0,0 @@ -bla = $str; - - R::store( $bean ); - $bean = R::load( 'bean', $bean->id ); - asrt( $bean->bla, $str ); - - pass(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php deleted file mode 100644 index 319b3b2f..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Via.php +++ /dev/null @@ -1,397 +0,0 @@ -sharedPersonList[] = $fooPerson; - R::store($mediaBean); - asrt( count( $mediaBean->sharedPersonList ), 1 ); - - $person = R::findOne('person'); - $person->via('relation')->sharedMarriageList[] = R::dispense('marriage'); - //this second one caused the via property to not get cleared - $person->via('relation')->sharedMarriageList; - - asrt( count( $person->sharedMediaList ), 1 ); - - //also found this scenario, non-existing property - $book = R::dispense('book'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->nothing; - asrt( count( $book->sharedPageList ), 1 ); - - //yet another - $book = R::dispense('magazine'); - $book->ownAdList[] = R::dispense('ad'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->ownAdList; - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('folder'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->sharedItemList[] = R::dispense('item'); - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('folder2'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->sharedItemList[] = R::dispense('item'); - $book->via('garbage')->sharedItemList[] = R::dispense('item'); - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('folder3'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->item = R::dispense('item'); - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('folder3'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->item = 'test'; - asrt( count( $book->sharedPageList ), 1 ); - - //yet another - $book = R::dispense('leaflet'); - $book->title = 'leaflet'; - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->title; - asrt( count( $book->sharedPageList ), 1 ); - - //yet another - $book = R::dispense('paper'); - $book->author = R::dispense('author'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->author; - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('paper2'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('garbage')->author; - asrt( count( $book->sharedPageList ), 1 ); - - //yet another one - $book = R::dispense('archive'); - $book->sharedItem[] = R::dispense('item'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - unset( $book->via('garbage')->sharedItem ); - asrt( count( $book->sharedPageList ), 1 ); - - //theoretic cases - $book = R::dispense('guide'); - $book->sharedItem[] = R::dispense('item'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('relation')->countShared('item'); - $book->via('relation')->countShared('item'); - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('catalogue'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('relation')->countShared('item'); - $book->via('relation')->countShared('item'); - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('tabloid'); - $book->ownItemList[] = R::dispense('item'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('relation')->countOwn('item'); - $book->via('relation')->countOwn('item'); - asrt( count( $book->sharedPageList ), 1 ); - - $book = R::dispense('booklet'); - $book->ownItemList[] = R::dispense('item'); - $book->sharedPage[] = R::dispense('page'); - R::store($book); - $book = $book->fresh(); - $book->via('relation')->countOwn('item'); - $book->via('relation')->countOwn('item'); - asrt( count( $book->sharedPageList ), 1 ); - AQueryWriter::clearRenames(); - } - - /** - * Via specific tests. - * - * @return void - */ - public function testViaAndSQL() - { - R::nuke(); - list($p1, $p2) = R::dispense('participant', 2); - list($e1, $e2) = R::dispense('employee', 2); - list($x1, $x2) = R::dispense('project', 2); - - $e1->name = 'Anna'; - $e2->name = 'John'; - - $p1->project = $x1; - $p1->employee = $e1; - $p1->arole = 'designer'; - - $p2->project = $x1; - $p2->employee = $e2; - $p2->arole = 'coder'; - - R::storeAll(array( $p1, $p2 )); - - $project = R::load('project', $x1->id); - - $designers = $project - ->withCondition(' participant.arole = ? ', array( 'designer' ) ) - ->via( 'participant' ) - ->sharedEmployeeList; - - $anna = reset( $designers ); - asrt(count($designers), 1); - asrt($anna->name, 'Anna'); - - $coders = $project - ->withCondition(' participant.arole = ? ', array( 'coder' ) ) - ->via( 'participant' ) - ->sharedEmployeeList; - - $john = reset( $coders ); - asrt(count($coders), 1); - asrt($john->name, 'John'); - } - - /** - * Test Via and Link together. - * - * @return void - */ - public function testViaAndLink() - { - R::nuke(); - list( $John, $Anna, $Celine ) = R::dispense( 'employee', 3 ); - $John->badge = 'John'; - $Anna->badge = 'Anna'; - $Celine->badge = 'Celine'; - - $project = R::dispense( 'project' ); - $project->name = 'x'; - - $project2 = R::dispense( 'project' ); - $project2->name = 'y'; - - $John->link( 'participant', array( - 'arole' => 'designer' - ) )->project = $project; - - $Anna->link( 'participant', array( - 'arole' => 'developer' - ) )->project = $project; - - $Celine->link( 'participant', array( - 'arole' => 'sales' - ) )->project = $project2; - - $Anna->link('participant', array( - 'arole' => 'lead' - ) )->project = $project2; - - R::storeAll( array( $project, $project2, $John, $Anna, $Celine ) ); - - $employees = $project - ->with(' ORDER BY badge ASC ') - ->via( 'participant' ) - ->sharedEmployee; - - asrt( is_array( $employees ), TRUE ); - asrt( count( $employees ), 2 ); - - $badges = array(); - foreach( $employees as $employee ) { - $badges[] = $employee->badge; - } - - asrt( implode( ',', $badges ), 'Anna,John' ); - - $employees = $project2 - ->with(' ORDER BY badge ASC ') - ->via( 'participant' ) - ->sharedEmployee; - - asrt( is_array( $employees ), TRUE ); - asrt( count( $employees ), 2 ); - - $badges = array(); - foreach( $employees as $employee ) { - $badges[] = $employee->badge; - } - - asrt( implode( ',', $badges ), 'Anna,Celine' ); - - $projects = $John->sharedProject; - - asrt( is_array( $projects ), TRUE ); - asrt( count( $projects ), 1 ); - - $projectList = array(); - foreach( $projects as $project ) { - $projectList[] = $project->name; - } - - sort( $projectList ); - asrt( implode( ',', $projectList ), 'x' ); - - $projects = $Anna->sharedProject; - - asrt( is_array( $projects ), TRUE ); - asrt( count( $projects ), 2 ); - - $projectList = array(); - foreach( $projects as $project ) { - $projectList[] = $project->name; - } - - sort( $projectList ); - asrt( implode( ',', $projectList ), 'x,y' ); - - $projects = $Anna->via( 'participant' )->sharedProject; - - asrt( is_array( $projects ), TRUE ); - asrt( count( $projects ), 2 ); - - $projectList = array(); - foreach( $projects as $project ) { - $projectList[] = $project->name; - } - - sort( $projectList ); - asrt( implode( ',', $projectList ), 'x,y' ); - - $projects = $Celine->via( 'participant' )->sharedProject; - - asrt( is_array( $projects ), TRUE ); - asrt( count( $projects ), 1 ); - - $projectList = array(); - foreach( $projects as $project ) { - $projectList[] = $project->name; - } - - sort( $projectList ); - asrt( implode( ',', $projectList ), 'y' ); - - $roles = $Anna->ownParticipant; - - asrt( is_array( $roles ), TRUE ); - asrt( count( $roles ), 2 ); - - $roleList = array(); - foreach( $roles as $role ) { - $roleList[] = $role->arole; - } - - sort( $roleList ); - asrt( implode( ',', $roleList ), 'developer,lead' ); - - $project2->sharedEmployee[] = $John; - R::store( $project2 ); - - $projects = $John->sharedProject; - - asrt( is_array( $projects ), TRUE ); - asrt( count( $projects ), 2 ); - - $projectList = array(); - foreach( $projects as $project ) { - $projectList[] = $project->name; - } - - sort( $projectList ); - asrt( implode( ',', $projectList ), 'x,y' ); - - $projects = $John->via( 'participant' )->sharedProject; - - asrt( is_array( $projects ), TRUE ); - asrt( count( $projects ), 2 ); - - $projectList = array(); - foreach( $projects as $project ) { - $projectList[] = $project->name; - } - - sort( $projectList ); - asrt( implode( ',', $projectList ), 'x,y' ); - } - - /** - * Test effect of via on shared list removal of beans. - * - * @return void - */ - public function testViaAndRemove() - { - R::nuke(); - $project = R::dispense( 'project' ); - $employees = R::dispense( 'employee', 2); - $project->via( 'partcipant' )->sharedEmployeeList = $employees; - R::store( $project ); - - asrt( R::count('employee'), 2 ); - asrt( R::count('participant'), 2 ); - - $project = $project->fresh(); - $project->sharedEmployee = array(); - R::store( $project ); - - asrt( R::count( 'employee' ), 2 ); - asrt( R::count( 'participant' ), 0 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php deleted file mode 100644 index 10817f1c..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/With.php +++ /dev/null @@ -1,709 +0,0 @@ - 'book', - 'title' => 'Book of Lorem Ipsum', - 'ownPage' => array( - array( - '_type' => 'page', - 'content' => 'Lorem Ipsum', - ) - ), - 'sharedTag' => array( - array( - '_type' => 'tag', - 'label' => 'testing' - ) - ) - ) ); - - R::store( $book ); - $book = $book->fresh(); - asrt( R::count( 'book' ), 1 ); - asrt( count( $book->ownPage ), 1 ); - - //now try with no-load - $book = $book->fresh(); - asrt( count( $book->noLoad()->ownPage ), 0 ); - asrt( count( $book->noLoad()->sharedTag ), 0 ); - - //now try to add with no-load - $book = $book->fresh(); - $book->noLoad()->xownPageList[] = R::dispense( 'page' ); - $book->noLoad()->sharedTagList[] = R::dispense( 'tag' ); - R::store( $book ); - - $book = $book->fresh(); - asrt( count( $book->ownPage ), 2 ); - asrt( count( $book->sharedTagList ), 2 ); - - //no-load overrides with and withCondition - $book = $book->fresh(); - asrt( count( $book->with(' invalid sql ')->noLoad()->ownPage ), 0 ); - asrt( count( $book->withCondition(' invalid sql ')->noLoad()->sharedTag ), 0 ); - - //no-load overrides all and alias - $book = $book->fresh(); - asrt( count( $book->all()->noLoad()->ownPage ), 0 ); - asrt( count( $book->alias('nothing')->noLoad()->sharedTag ), 0 ); - - //no-load gets cleared - $book = $book->fresh(); - asrt( count( $book->ownPage ), 2 ); - asrt( count( $book->sharedTagList ), 2 ); - - //We cant clear with no-load accidentally? - $book = $book->fresh(); - $book->noLoad()->ownPage = array(); - $book->noLoad()->sharedTagList = array(); - R::store( $book ); - - asrt( count( $book->ownPage ), 2 ); - asrt( count( $book->sharedTagList ), 2 ); - - //No-load does not have effect if list is already cached - $book = $book->fresh(); - $book->ownPage; - $book->sharedTag; - asrt( count( $book->ownPage ), 2 ); - asrt( count( $book->sharedTagList ), 2 ); - - } - - /** - * Test all(). - * - * @return void - */ - public function testAll() - { - $book = R::dispense( 'book' ); - $book->ownPage = R::dispense( 'page', 10 ); - R::store( $book ); - asrt( count( $book->with( ' LIMIT 3 ' )->ownPage ), 3 ); - asrt( count( $book->ownPage ), 3 ); - asrt( count( $book->all()->ownPage ), 10 ); - asrt( count( $book->ownPage ), 10 ); - R::nuke(); - asrt( count( $book->ownPage ), 10 ); - asrt( count( $book->all()->ownPage ), 0 ); - } - - /** - * Test embedded SQL snippets using with and withCondition. - * - * @return void - */ - public function testEmbeddedSQL() - { - list( $page1, $page2, $page3 ) = R::dispense( 'page', 3 ); - - list( $ad1, $ad2, $ad3 ) = R::dispense( 'ad', 3 ); - - $ad2->name = 'shampoo'; - $page3->name = 'homepage'; - - $page1->sharedAd = array( $ad1, $ad3 ); - $page2->sharedAd = array( $ad2, $ad3 ); - $page3->sharedAd = array( $ad3, $ad2, $ad1 ); - - R::storeAll( array( $page1, $page2, $page3 ) ); - - $page1 = R::load( 'page', $page1->id ); - - asrt( 1, count( $page1->with( ' LIMIT 1 ' )->sharedAd ) ); - - $page2 = R::load( 'page', $page2->id ); - - $adsOnPage2 = $page2->withCondition( ' `name` = ? ', array( 'shampoo' ) )->sharedAd; - - asrt( 1, count( $adsOnPage2 ) ); - - $ad = reset( $adsOnPage2 ); - - asrt( $ad->name, 'shampoo' ); - - $ad = R::load( 'ad', $ad->id ); - - asrt( count( $ad->sharedPage ), 2 ); - - $ad = R::load( 'ad', $ad->id ); - - $homepage = reset( $ad->withCondition( ' `name` LIKE ? AND page.id > 0 ORDER BY id DESC ', array( '%ome%' ) )->sharedPage ); - - asrt( $homepage->name, 'homepage' ); - } - - /** - * More variations... - * - * @return void - */ - public function testEmbeddedSQLPart2() - { - list( $book1, $book2, $book3 ) = R::dispense( 'book', 3 ); - - $book1->position = 1; - $book2->position = 2; - $book3->position = 3; - - $shelf = R::dispense( 'shelf' ); - - $shelf->ownBook = array( $book1, $book2, $book3 ); - - $id = R::store( $shelf ); - - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->with( ' ORDER BY position ASC ' )->ownBook; - - $book1 = array_shift( $books ); - - asrt( (int) $book1->position, 1 ); - - $book2 = array_shift( $books ); - - asrt( (int) $book2->position, 2 ); - - $book3 = array_shift( $books ); - - asrt( (int) $book3->position, 3 ); - - $books = $shelf->with( ' ORDER BY position DESC ' )->ownBook; - - $book1 = array_shift( $books ); - - asrt( (int) $book1->position, 3 ); - - $book2 = array_shift( $books ); - - asrt( (int) $book2->position, 2 ); - - $book3 = array_shift( $books ); - - asrt( (int) $book3->position, 1 ); - - //R::debug(1); - - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->with( ' AND position > 2 ' )->ownBook; - - asrt( count( $books ), 1 ); - - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->with( ' AND position < ? ', array( 3 ) )->ownBook; - - asrt( count( $books ), 2 ); - - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->with( ' AND position = 1 ' )->ownBook; - - asrt( count( $books ), 1 ); - - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->withCondition( ' position > -1 ' )->ownBook; - - asrt( count( $books ), 3 ); - - // With-condition should not affect storing - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->with( ' AND position = 1 ' )->ownBook; - - asrt( count( $books ), 1 ); - asrt( count( $shelf->ownBook ), 1 ); - - $book = reset( $shelf->ownBook ); - - $book->title = 'Trees and other Poems'; - - R::store( $shelf ); - - $books = $shelf->withCondition( ' position > -1 ' )->ownBook; - - asrt( count( $books ), 3 ); - asrt( count( $shelf->ownBook ), 3 ); - - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->with( ' AND position = 1 ' )->ownBook; - - // Also with trashing -- just trash one! - $shelf->ownBook = array(); - - R::store( $shelf ); - - $books = $shelf->withCondition( ' position > -1 ' )->ownBook; - - asrt( count( $books ), 2 ); - - // With should cause a reload of a list - $shelf = R::load( 'shelf', $id ); - - $books = $shelf->with( ' AND position = 2 ' )->ownBook; - - asrt( count( $books ), 1 ); - - $books = $shelf->withCondition( ' position > -1 ' )->ownBook; - - asrt( count( $books ), 2 ); - - $book = reset( $books ); - - $book->title = 'Venetian Music'; - - // Should not affect storage (fact that we used with twice, unsetting prop) - R::store( $shelf ); - - $shelf = R::load( 'shelf', $id ); - - asrt( count( $shelf->ownBook ), 2 ); - - // Alias - list( $game1, $game2, $game3 ) = R::dispense( 'game', 3 ); - - list( $t1, $t2, $t3 ) = R::dispense( 'team', 3 ); - - $t1->name = 'Bats'; - $t2->name = 'Tigers'; - $t3->name = 'Eagles'; - - $game1->name = 'a'; - $game1->team1 = $t1; - $game1->team2 = $t2; - - $game2->name = 'b'; - $game2->team1 = $t1; - $game2->team2 = $t3; - - $game3->name = 'c'; - $game3->team1 = $t2; - $game3->team2 = $t3; - - R::storeAll( array( $game1, $game2, $game3 ) ); - - $team1 = R::load( 'team', $t1->id ); - $team2 = R::load( 'team', $t2->id ); - $team3 = R::load( 'team', $t3->id ); - - asrt( count( $team1->alias( 'team1' )->ownGame ), 2 ); - asrt( count( $team2->alias( 'team1' )->ownGame ), 1 ); - - $team1 = R::load( 'team', $t1->id ); - $team2 = R::load( 'team', $t2->id ); - - asrt( count( $team1->alias( 'team2' )->ownGame ), 0 ); - asrt( count( $team2->alias( 'team2' )->ownGame ), 1 ); - asrt( count( $team3->alias( 'team1' )->ownGame ), 0 ); - - $team3 = R::load( 'team', $t3->id ); - - asrt( count( $team3->alias( 'team2' )->ownGame ), 2 ); - - $team1 = R::load( 'team', $t1->id ); - - $games = $team1->alias( 'team1' )->ownGame; - - $game4 = R::dispense( 'game' ); - - $game4->name = 'd'; - $game4->team2 = $t3; - - $team1->alias( 'team1' )->ownGame[] = $game4; - - R::store( $team1 ); - - $team1 = R::load( 'team', $t1->id ); - - asrt( count( $team1->alias( 'team1' )->ownGame ), 3 ); - - foreach ( $team1->ownGame as $g ) { - if ( $g->name == 'a' ) $game = $g; - } - - $game->name = 'match'; - - R::store( $team1 ); - - $team1 = R::load( 'team', $t1->id ); - - asrt( count( $team1->alias( 'team1' )->ownGame ), 3 ); - - $found = 0; - foreach ( $team1->ownGame as $g ) { - if ( $g->name == 'match' ) $found = 1; - } - - if ( $found ) pass(); - - $team1->ownGame = array(); - - R::store( $team1 ); - - $team1 = R::load( 'team', $t1->id ); - - asrt( count( $team1->alias( 'team1' )->ownGame ), 0 ); - - $team1->ownBook[] = $book1; - - R::store( $team1 ); - - $team1 = R::load( 'team', $t1->id ); - - asrt( count( $team1->alias( 'team1' )->ownGame ), 0 ); - asrt( count( $team1->ownBook ), 1 ); - } - - /** - * Test when to reload and when to NOT reload beans. - * Use UNSET to reload a parent bean. Use UNSET or - * a modifier (with, withCondition, all) to reload a list. - * Use noLoad() to obtain an empty list - does not reload - * but sets an empty array. - * - * @return void - */ - public function testWhenToReload() - { - $book = R::dispense( 'book' ); - $book->ownPage = R::dispense( 'page', 3 ); - $book->author = R::dispense( 'author' ); - $book->coauthor = R::dispense( 'author' ); - R::store( $book ); - $book = $book->fresh(); - $firstPage = reset( $book->ownPage ); - $id = $firstPage->id; - $book->ownPage[ $id ]->title = 'a'; - - //Do not reload an own list after manipulations - asrt( $book->ownPage[ $id ]->title, 'a' ); //dont reload! - $book->ownPage[] = R::dispense( 'page' ); //dont reload! - asrt( $book->ownPage[ $id ]->title, 'a' ); //dont reload! - asrt( $book->ownPageList[ $id ]->title, 'a' ); //dont reload! - asrt( $book->xownPageList[ $id ]->title, 'a' ); //dont reload! - asrt( $book->xownPage[ $id ]->title, 'a' ); //dont reload! - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - unset( $book->ownPageList ); - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - unset( $book->xownPageList ); - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - unset( $book->xownPage ); - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - unset( $book->ownPage ); - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - $book->all()->ownPage; - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - $book->all()->xownPage; - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - $book->all()->ownPageList; - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - //now trigger reload - $book->all()->xownPageList; - asrt( count( $book->ownPageList ), 3 ); - $book->ownPage[] = R::dispense( 'page' ); - asrt( count( $book->ownPageList ), 4 ); - - //Do not reload an own list if told to not reload using noLoad() - $book->noLoad()->with(' LIMIT 1 ')->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->noLoad()->all()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->noLoad()->alias('magazine')->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->noLoad()->withCondition('')->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - - //even if modifiers proceed noLoad() - $book->with(' LIMIT 1 ')->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->all()->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->alias('magazine')->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->withCondition('')->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - - //even in combinations - $book->all()->with(' LIMIT 1 ')->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->alias('magazine')->all()->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->alias('magazine')->with('LIMIT 1')->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - $book->alias('magazine')->withCondition('')->noLoad()->ownPage; //dont reload! - asrt( count( $book->xownPage ), 0); //dont reload! - - //now test shared list - $book->sharedTag = R::dispense( 'tag', 16 ); - asrt( count( $book->sharedTag ), 16 ); - $book->sharedTag[] = R::dispense( 'tag' ); - asrt( count( $book->sharedTag ), 17 ); //dont reload after adding - $last = end( $book->sharedTagList ); - $id = $last->id; - $book->sharedTag[ $id ]->title = 'b'; - asrt( count( $book->sharedTag ), 17 ); //dont reload after manipulation - unset( $book->sharedTagList[ $id ] ); - asrt( count( $book->sharedTag ), 16 ); //dont reload after manipulation - //now trigger reload - unset( $book->sharedTagList ); - asrt( count( $book->sharedTag ), 0 ); - $book->sharedTag = R::dispense( 'tag', 16 ); - asrt( count( $book->sharedTag ), 16 ); - //now trigger reload - unset( $book->sharedTag ); - asrt( count( $book->sharedTag ), 0 ); - $book->sharedTag = R::dispense( 'tag', 16 ); - asrt( count( $book->sharedTag ), 16 ); - //now trigger reload - $book->all()->sharedTag; - asrt( count( $book->sharedTag ), 0 ); - $book->sharedTag = R::dispense( 'tag', 16 ); - asrt( count( $book->sharedTag ), 16 ); - //now trigger reload - $book->all()->sharedTagList; - asrt( count( $book->sharedTag ), 0 ); - $book->sharedTag = R::dispense( 'tag', 16 ); - asrt( count( $book->sharedTag ), 16 ); - - //Do not reload a sharedTag list if told to not reload using noLoad() - $book->noLoad()->with(' LIMIT 1 ')->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->noLoad()->all()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->noLoad()->alias('magazine')->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->noLoad()->withCondition('')->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - - //even if modifiers proceed noLoad() - $book->with(' LIMIT 1 ')->noLoad()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->all()->noLoad()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->alias('magazine')->noLoad()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->withCondition('')->noLoad()->ownPage; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - - //even in combinations - $book->all()->with(' LIMIT 1 ')->noLoad()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->alias('magazine')->all()->noLoad()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->alias('magazine')->with('LIMIT 1')->noLoad()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - $book->alias('magazine')->withCondition('')->noLoad()->sharedTag; //dont reload! - asrt( count( $book->sharedTag ), 0); //dont reload! - - //test do not reload parent bean - $book->author->name = 'me'; - asrt( $book->author->name, 'me' ); - $book->fetchAs('author')->coauthor; - asrt( $book->author->name, 'me' ); - $book->fetchAs('author')->author; - asrt( $book->author->name, 'me' ); - $book->with(' LIMIT 1 ')->author; - asrt( $book->author->name, 'me' ); - $book->withCondition('')->author; - asrt( $book->author->name, 'me' ); - $book->all()->author; - asrt( $book->author->name, 'me' ); - $book->noLoad()->author; - asrt( $book->author->name, 'me' ); - $book->noLoad()->all()->author; - asrt( $book->author->name, 'me' ); - $book->with('LIMIT 1')->noLoad()->all()->author; - asrt( $book->author->name, 'me' ); - //now trigger reload - unset( $book->author ); - asrt( $book->author->name, NULL ); - $book->author->name = 'me'; - asrt( $book->author->name, 'me' ); - } - - /** - * Tests whether modifiers are cleared after reading or - * writing a bean property. - * - * @return void - */ - public function testClearanceOfModFlags() - { - //test base condition, retrieving list or parent should not set flags - $book = R::dispense( 'book' ); - asrt( $book->getModFlags(), '' ); - $book->ownPage = R::dispense( 'page', 2 ); - asrt( $book->getModFlags(), '' ); - $book->xownPage = R::dispense( 'page', 2 ); - asrt( $book->getModFlags(), '' ); - $book->ownPageList = R::dispense( 'page', 2 ); - asrt( $book->getModFlags(), '' ); - $book->xownPageList = R::dispense( 'page', 2 ); - asrt( $book->getModFlags(), '' ); - $book->ownPage[] = R::dispense( 'page', 1 ); - asrt( $book->getModFlags(), '' ); - $book->xownPage[] = R::dispense( 'page', 1 ); - asrt( $book->getModFlags(), '' ); - $book->ownPageList[] = R::dispense( 'page', 1 ); - asrt( $book->getModFlags(), '' ); - $book->xownPageList[] = R::dispense( 'page', 1 ); - asrt( $book->getModFlags(), '' ); - $book->sharedPage = R::dispense( 'page', 2 ); - asrt( $book->getModFlags(), '' ); - $book->sharedPageList = R::dispense( 'page', 2 ); - asrt( $book->getModFlags(), '' ); - $book->sharedPage[] = R::dispense( 'page', 1 ); - asrt( $book->getModFlags(), '' ); - $book->sharedPageList[] = R::dispense( 'page', 1 ); - asrt( $book->getModFlags(), '' ); - $book->author = R::dispense( 'author' ); - asrt( $book->getModFlags(), '' ); - $book->title = 'title'; - - //Test whether appropriate flags are set and whether they are cleared after - //accessing a property. - $modifiers = array('with'=>'w', 'withCondition'=>'w', 'alias'=>'a', 'fetchAs'=>'f', 'all'=>'r', 'noLoad'=>'n'); - $properties = array('ownPage', 'ownPageList', 'xownPage', 'xownPageList', 'sharedPage', 'sharedPageList', 'author', 'title'); - foreach( $modifiers as $modifier => $flag ) { - foreach( $properties as $property ) { - $book = R::dispense( 'book' ); - $book->$modifier('something'); - $flags = $book->getModFlags(); - $expect = $flag; - asrt( $flags, $expect ); - $book->$property; - $flags = $book->getModFlags(); - asrt( $flags, '' ); - } - } - //now test combinations and also test whether we can - //clear modifiers manually using the clearModifiers() method. - foreach( $modifiers as $modifier => $flag ) { - foreach( $modifiers as $modifier2 => $flag2 ) { - foreach( $properties as $property ) { - $book = R::dispense( 'book' ); - $book->$modifier( 'something' )->$modifier2( 'something' ); - $flags = $book->getModFlags(); - $expect = array($flag, $flag2); - $expect = array_unique( $expect ); - sort( $expect ); - $expect = implode( '', $expect ); - asrt( $flags, $expect ); - $book->$modifier( 'something' )->$modifier2( 'something' )->clearModifiers(); - $flags = $book->getModFlags(); - asrt( $flags, '' ); - $book->$modifier( 'something' )->$modifier2( 'something' )->clearModifiers(); - $book->$property; - $flags = $book->getModFlags(); - asrt( $flags, '' ); - } - } - } - - $book = R::dispense( 'book' ); - $book->ownPage = R::dispense( 'page', 2 ); - $book->sharedPage = R::dispense( 'page', 2 ); - R::store( $book ); - $book = R::dispense( 'book' ); - $book->alias('magazine')->ownPage = R::dispense( 'page', 2 ); - R::store( $book ); - - //test modifier with countOwn and countShared methods - foreach( $modifiers as $modifier => $flag ) { - $book = R::dispense( 'book' ); - if ($modifier === 'withCondition') $book->$modifier( ' 1 ' ); - elseif ($modifier === 'with') $book->$modifier( ' LIMIT 1 ' ); - elseif ($modifier === 'alias') $book->$modifier('magazine'); - else $book->$modifier('something'); - $flags = $book->getModFlags(); - $expect = $flag; - asrt( $flags, $expect ); - $book->countOwn('page'); - $flags = $book->getModFlags(); - asrt( $flags, '' ); - if ($modifier === 'withCondition') $book->$modifier( ' 1 ' ); - elseif ($modifier === 'with') $book->$modifier( ' LIMIT 1 ' ); - elseif ($modifier === 'alias') $book->$modifier('magazine'); - else $book->$modifier('something'); - $flags = $book->getModFlags(); - $expect = $flag; - asrt( $flags, $expect ); - $book->countShared('page'); - $flags = $book->getModFlags(); - asrt( $flags, '' ); - if ($modifier === 'withCondition') $book->$modifier( ' 1 ' ); - elseif ($modifier === 'with') $book->$modifier( ' LIMIT 1 ' ); - elseif ($modifier === 'alias') $book->$modifier('magazine'); - else $book->$modifier('something'); - $flags = $book->getModFlags(); - $expect = $flag; - asrt( $flags, $expect ); - unset( $book->author ); - $flags = $book->getModFlags(); - asrt( $flags, '' ); - } - - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Writecache.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Writecache.php deleted file mode 100644 index 00f40769..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Writecache.php +++ /dev/null @@ -1,537 +0,0 @@ -prop = 1; - R::store( $bean ); - $writer->flushCache( 20 ); - $count = $writer->flushCache(); - asrt( $count, 0 ); - R::find( 'bean', ' prop < ? ', array( 1 ) ); - $count = $writer->flushCache(); - asrt( $count, 2 ); - R::find( 'bean', ' prop < ? ', array( 2 ) ); - $count = $writer->flushCache(); - asrt( $count, 5 ); - R::find( 'bean', ' prop < ? ', array( 2 ) ); - $count = $writer->flushCache(); - asrt( $count, 5 ); - for( $i = 0; $i < 40; $i ++ ) { - R::find( 'bean', ' prop < ? ', array( $i ) ); - } - $count = $writer->flushCache(); - asrt( $count, 85 ); - for( $i = 0; $i < 120; $i ++ ) { - R::find( 'bean', ' prop < ? ', array( $i ) ); - } - $count = $writer->flushCache( 1 ); - asrt( $count, 85 ); - for( $i = 0; $i < 20; $i ++ ) { - R::find( 'bean', ' prop < ? ', array( $i ) ); - } - $count = $writer->flushCache( 20 ); - asrt( $count, 9 ); - } - - /** - * When using fetchAs(), Query Cache does not recognize objects - * that have been previously fetched, see issue #400. - */ - public function testCachingAndFetchAs() - { - testpack( 'Testing whether you can cache multiple records of the same type' ); - R::debug( true, 1 ); - $logger = R::getDatabaseAdapter()->getDatabase()->getLogger(); - R::nuke(); - $coauthor1 = R::dispense( 'author' ); - $coauthor1->name = 'John'; - $book = R::dispense( 'book' ); - $book->title = 'a Funny Tale'; - $book->coauthor = $coauthor1; - $id = R::store( $book ); - $coauthor = R::dispense( 'author' ); - $coauthor->name = 'Pete'; - $book = R::dispense( 'book' ); - $book->title = 'a Funny Tale 2'; - $book->coauthor = $coauthor; - $id = R::store( $book ); - $book = R::dispense( 'book' ); - $book->title = 'a Funny Tale 3'; - $book->coauthor = $coauthor1; - $id = R::store( $book ); - $books = R::find( 'book' ); - $logger->clear(); - $authors = array(); - $authorsByName = array(); - foreach($books as $book) { - $coAuthor = $book->with( ' ORDER BY title ASC ' ) - ->fetchAs( 'author' )->coauthor; - $authors[] = $coAuthor->name; - $authorsByName[ $coAuthor->name ] = $coAuthor; - } - asrt( count( $logger->grep( 'SELECT' ) ), 2 ); //must be 2! 3 if cache does not work! - asrt( count( $authors ), 3 ); - asrt( isset( $authorsByName[ 'John' ] ), TRUE ); - asrt( isset( $authorsByName[ 'Pete' ] ), TRUE ); - $logger->clear(); - $authors = array(); - $authorsByName = array(); - foreach($books as $book) { - $coAuthor = $book->with( ' ORDER BY title DESC ' ) - ->fetchAs( 'author' )->coauthor; - $authors[] = $coAuthor->name; - $authorsByName[ $coAuthor->name ] = $coAuthor; - } - asrt( count( $logger->grep( 'SELECT' ) ), 0 ); //must be 0! - asrt( count( $authors ), 3 ); - asrt( isset( $authorsByName[ 'John' ] ), TRUE ); - asrt( isset( $authorsByName[ 'Pete' ] ), TRUE ); - } - - /** - * Test effects of cache. - * - * @return void - */ - public function testCachingEffects() - { - testpack( 'Testing WriteCache Query Writer Cache' ); - - R::setNarrowFieldMode( FALSE ); - R::useWriterCache( FALSE ); - - R::debug( true, 1 ); - $logger = R::getDatabaseAdapter()->getDatabase()->getLogger(); - - $book = R::dispense( 'book' )->setAttr( 'title', 'ABC' ); - - $book->ownPage[] = R::dispense( 'page' ); - - $id = R::store( $book ); - - // Test load cache -- without - $logger->clear(); - - $book = R::load( 'book', $id ); - $book = R::load( 'book', $id ); - - asrt( count( $logger->grep( 'SELECT' ) ), 2 ); - - // With cache - R::useWriterCache( TRUE ); - - $logger->clear(); - - $book = R::load( 'book', $id ); - $book = R::load( 'book', $id ); - - asrt( count( $logger->grep( 'SELECT' ) ), 1 ); - - R::useWriterCache( FALSE ); - - // Test find cache - $logger->clear(); - - $book = R::find( 'book' ); - $book = R::find( 'book' ); - - asrt( count( $logger->grep( 'SELECT' ) ), 2 ); - - // With cache - R::getWriter()->setUseCache( TRUE ); - - $logger->clear(); - - $book = R::find( 'book' ); - $book = R::find( 'book' ); - - asrt( count( $logger->grep( 'SELECT' ) ), 1 ); - - R::getWriter()->setUseCache( FALSE ); - - // Test combinations - $logger->clear(); - - $book = R::findOne( 'book', ' id = ? ', array( $id ) ); - - $book->ownPage; - - R::batch( 'book', array( $id ) ); - - $book = R::findOne( 'book', ' id = ? ', array( $id ) ); - - $book->ownPage; - - R::batch( 'book', array( $id ) ); - - asrt( count( $logger->grep( 'SELECT' ) ), 6 ); - - // With cache - R::getWriter()->setUseCache( TRUE ); - - $logger->clear(); - - R::batch( 'book', array( $id ) ); - - $book = R::findOne( 'book', ' id = ? ', array( $id ) ); - - $book->ownPage; - - $book = R::findOne( 'book', ' id = ? ', array( $id ) ); - - $book->ownPage; - - asrt( count( $logger->grep( 'SELECT' ) ), 3 ); - - R::getWriter()->setUseCache( FALSE ); - - // Test auto flush - $logger->clear(); - - $book = R::findOne( 'book' ); - - $book->name = 'X'; - - R::store( $book ); - - $book = R::findOne( 'book' ); - - asrt( count( $logger->grep( 'SELECT *' ) ), 2 ); - - // With cache - R::getWriter()->setUseCache( TRUE ); - - $logger->clear(); - - $book = R::findOne( 'book' ); - - $book->name = 'Y'; - - // Will flush - R::store( $book ); - - $book = R::findOne( 'book' ); - - // Now the same, auto flushed - asrt( count( $logger->grep( 'SELECT *' ) ), 2 ); - - R::getWriter()->setUseCache( FALSE ); - - // Test whether delete flushes as well (because uses selectRecord - might be a gotcha!) - R::store( R::dispense( 'garbage' ) ); - - $garbage = R::findOne( 'garbage' ); - - $logger->clear(); - - $book = R::findOne( 'book' ); - - R::trash( $garbage ); - - $book = R::findOne( 'book' ); - - asrt( count( $logger->grep( 'SELECT *' ) ), 2 ); - - R::store( R::dispense( 'garbage' ) ); - - $garbage = R::findOne( 'garbage' ); - - // With cache - R::getWriter()->setUseCache( TRUE ); - - $logger->clear(); - - $book = R::findOne( 'book' ); - - R::trash( $garbage ); - - $book = R::findOne( 'book' ); - - // Now the same, auto flushed - asrt( count( $logger->grep( 'SELECT *' ) ), 2 ); - - R::getWriter()->setUseCache( FALSE ); - - R::store( R::dispense( 'garbage' ) ); - - $garbage = R::findOne( 'garbage' ); - - // With cache - R::getWriter()->setUseCache( TRUE ); - - $logger->clear(); - - $book = R::findOne( 'book' ); - - R::getWriter()->queryRecord( 'garbage', array( 'id' => array( $garbage->id ) ) ); - - $book = R::findOne( 'book' ); - - // Now the same, auto flushed - asrt( count( $logger->grep( 'SELECT *' ) ), 2 ); - - $page = R::dispense('page'); - $book->sharedPage[] = $page; - - R::store( $book ); - - $logger->clear(); - $link = R::getWriter()->queryRecordLink( 'book', 'page', $book->id, $page->id ); - - asrt( count( $logger->grep( 'SELECT' ) ), 1 ); - - $link = R::getWriter()->queryRecordLink( 'book', 'page', $book->id, $page->id ); - - asrt( count( $logger->grep( 'SELECT' ) ), 1 ); - - R::getWriter()->setUseCache( FALSE ); - - $link = R::getWriter()->queryRecordLink( 'book', 'page', $book->id, $page->id ); - - asrt( count( $logger->grep( 'SELECT' ) ), 2 ); - - R::getWriter()->setUseCache( TRUE ); - R::setNarrowFieldMode( TRUE ); - } - - /** - * Try to fool the cache :) - * - * @return void - */ - public function testRegressions() - { - testpack( 'Testing possible regressions: Try to fool the cache' ); - - $str = 'SELECT * FROM ' . R::getWriter()->esc( 'bean', TRUE ) . ' WHERE ( ' . R::getWriter()->esc( 'id', TRUE ) . ' IN ( 1) ) '; - - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc'; - - $id = R::store( $bean ); - - $bean = R::load( 'bean', $id ); - - $bean->title = 'xxx'; - - R::store( $bean ); - - // Fire exact same query so cache may think no other query has been fired - R::exec( $str ); - - $bean = R::load( 'bean', $id ); - - asrt( $bean->title, 'xxx' ); - } - - /** - * Test keep-cache comment. - * - * @return void - */ - public function testKeepCacheCommentInSQL() - { - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc'; - - $id = R::store( $bean ); - - $bean = R::load( 'bean', $id ); - - $bean->title = 'xxx'; - - R::store( $bean ); - - // Causes flush even though it contains -- keep-cache (not at the end, not intended) - R::findOne( 'bean', ' title = ? ', array( '-- keep-cache' ) ); - - $bean = R::load( 'bean', $id ); - - asrt( $bean->title, 'xxx' ); - } - - /** - * - * Same as above.. test keep cache. - * - * @return void - */ - public function testInstructNoDrop() - { - $str = 'SELECT * FROM ' . R::getWriter()->esc( 'bean', TRUE ) . ' -- keep-cache'; - - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc'; - - $id = R::store( $bean ); - - $bean = R::load( 'bean', $id ); - - $bean->title = 'xxx'; - - R::store( $bean ); - - R::exec( $str ); - - $bean = R::load( 'bean', $id ); - - asrt( $bean->title, 'abc' ); - - R::nuke(); - - // Now INSTRUCT the cache to not drop the cache CASE 2 - $str = 'SELECT * FROM ' . R::getWriter()->esc( 'bean', TRUE ) . ' -- keep-cache'; - - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc'; - - $id = R::store( $bean ); - - $bean = R::load( 'bean', $id ); - - $bean->title = 'xxx'; - - R::store( $bean ); - - R::findOne( 'bean', ' title = ? ', array( 'cache' ) ); - - $bean = R::load( 'bean', $id ); - - asrt( $bean->title, 'xxx' ); - } - - /** - * Can we confuse the cache? - * - * @return void - */ - public function testConfusionRegression() - { - testpack( 'Testing possible confusion regression' ); - - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc'; - - $id1 = R::store( $bean ); - - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc2'; - - $id2 = R::store( $bean ); - - $bean = R::load( 'bean', $id1 ); - - asrt( $bean->title, 'abc' ); - - $bean = R::load( 'bean', $id2 ); - - asrt( $bean->title, 'abc2' ); - } - - /** - * Test Ghost beans.... - * - * @return void - */ - public function testGhostBeans() - { - testpack( 'Testing ghost beans' ); - - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc'; - - $id1 = R::store( $bean ); - - R::trash( $bean ); - - $bean = R::load( 'bean', $id1 ); - - asrt( (int) $bean->id, 0 ); - } - - /** - * Test explicit flush. - * - * @return void - */ - public function testExplicitCacheFlush() - { - testpack( 'Test cache flush (explicit)' ); - - R::setNarrowFieldMode( FALSE ); - R::debug( true, 1 ); - $logger = R::getDatabaseAdapter()->getDatabase()->getLogger(); - - $bean = R::dispense( 'bean' ); - - $bean->title = 'abc'; - - $id1 = R::store( $bean ); - - $logger->clear(); - - $bean = R::load( 'bean', $id1 ); - - asrt( $bean->title, 'abc' ); - asrt( count( $logger->grep( 'SELECT *' ) ), 1 ); - - $bean = R::load( 'bean', $id1 ); - - asrt( count( $logger->grep( 'SELECT *' ) ), 1 ); - - R::getWriter()->flushCache(); - - $bean = R::load( 'bean', $id1 ); - - asrt( count( $logger->grep( 'SELECT *' ) ), 2 ); - - R::getWriter()->flushCache(); - R::getWriter()->setUseCache( FALSE ); - R::setNarrowFieldMode( TRUE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Xnull.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Xnull.php deleted file mode 100644 index e8f432b0..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Base/Xnull.php +++ /dev/null @@ -1,282 +0,0 @@ -content = NULL; - //can we store a NULL? - asrt( is_null( $book->content ), TRUE ); - R::store( $book ); - //did we really store the NULL value ? - $book = R::findOne( 'book', ' content IS NULL ' ); - asrt( ( $book instanceof OODBBean ), TRUE ); - //still NULL, not empty STRING ? - asrt( is_null( $book->content ), TRUE ); - $book->pages = 100; - R::store( $book ); - //did we save it once again as NULL? - $book = R::findOne( 'book', ' content IS NULL ' ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( is_null( $book->content ), TRUE ); - asrt( gettype( $book->pages ), 'string' ); - $otherBook = R::dispense( 'book' ); - $otherBook->pages = 99; - //also if the column is VARCHAR-like? - $otherBook->content = 'blah blah'; - R::store( $otherBook ); - $book = R::findOne( 'book', ' content IS NULL ' ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( is_null( $book->content ), TRUE ); - asrt( intval( $book->pages ), 100 ); - //can we query not NULL as well? - $book = R::findOne( 'book', ' content IS NOT NULL ' ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( is_null( $book->content ), FALSE ); - asrt( intval( $book->pages ), 99 ); - asrt( $book->content, 'blah blah' ); - //Can we bind NULL directly? - $book->isGood = FALSE; - //Is NULL the default? And... no confusion with boolean FALSE? - R::store( $book ); - $book = R::findOne( 'book', ' is_good IS NULL' ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( is_null( $book->content ), TRUE ); - asrt( intval( $book->pages ), 100 ); - $book = R::findOne( 'book', ' is_good = ?', array( 0 ) ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( is_null( $book->content ), FALSE ); - asrt( intval( $book->pages ), 99 ); - } - - /** - * Tests whether we can NULLify a parent bean - * page->book if the parent (book) is already - * NULL. (isset vs array_key_exists bug). - * - * @return void - */ - public function testUnsetParent() - { - R::nuke(); - $book = R::dispense( 'book' ); - $book->title = 'My Book'; - $page = R::dispense( 'page' ); - $page->text = 'Lorem Ipsum'; - $book->ownPage[] = $page; - R::store( $book ); - $page = $page->fresh(); - R::freeze( TRUE ); - asrt( (int) $page->book->id, (int) $book->id ); - unset( $page->book ); - R::store( $page ); - $page = $page->fresh(); - asrt( (int) $page->book->id, (int) $book->id ); - $page->book = NULL; - R::store( $page ); - $page = $page->fresh(); - asrt( $page->book, NULL ); - asrt( $page->book_id, NULL ); - asrt( $page->bookID, NULL ); - asrt( $page->bookId, NULL ); - $page = R::dispense( 'page' ); - $page->text = 'Another Page'; - $page->book = NULL; - try { - R::store( $page ); - fail(); - } catch( \Exception $exception ) { - pass(); - } - unset($page->book); - R::store($page); - $page = $page->fresh(); - $page->book = NULL; //this must set field id to NULL not ADD column! - try { - R::store($page); - pass(); - } catch( \Exception $exception ) { - fail(); - } - $page = $page->fresh(); - $page->book = NULL; - R::store( $page ); - $page = $page->fresh(); - asrt( is_null( $page->book_id ), TRUE ); - $page->book = $book; - R::store( $page ); - $page = $page->fresh(); - asrt( (int) $page->book->id, (int) $book->id ); - $page->book = NULL; - R::store( $page ); - asrt( is_null( $page->book_id ), TRUE ); - asrt( is_null( $page->book ), TRUE ); - R::freeze( FALSE ); - } - - /** - * Test nullifying aliased parent. - * - * @return void - */ - public function testUnsetAliasedParent() - { - R::nuke(); - $book = R::dispense( 'book' ); - $author = R::dispense( 'author' ); - $book->coauthor = $author; - R::store( $book ); - $book = $book->fresh(); - asrt( is_null( $book->fetchAs('author')->coauthor ), FALSE ); - unset( $book->coauthor ); - R::store( $book ); - $book = $book->fresh(); - asrt( is_null( $book->fetchAs('author')->coauthor ), FALSE ); - $book->coauthor = NULL; - R::store( $book ); - $book = $book->fresh(); - asrt( is_null( $book->fetchAs('author')->coauthor ), TRUE ); - R::trash( $book ); - R::trash( $author ); - R::freeze( TRUE ); - $book = R::dispense( 'book' ); - $author = R::dispense( 'author' ); - $book->coauthor = $author; - R::store( $book ); - $book = $book->fresh(); - asrt( is_null( $book->fetchAs('author')->coauthor ), FALSE ); - unset( $book->coauthor ); - R::store( $book ); - $book = $book->fresh(); - asrt( is_null( $book->fetchAs('author')->coauthor ), FALSE ); - $book->coauthor = NULL; - R::store( $book ); - $book = $book->fresh(); - asrt( is_null( $book->fetchAs('author')->coauthor ), TRUE ); - R::trash( $book ); - R::trash( $author ); - R::freeze( FALSE ); - } - - /** - * Test NULL handling, setting a property to NULL must - * cause a change. - * - * @return void - */ - public function testBasicNullHandling() - { - // NULL can change bean - $bean = R::dispense( 'bean' ); - $bean->bla = 'a'; - - R::store( $bean ); - - $bean = $bean->fresh(); - - asrt( $bean->hasChanged( 'bla' ), FALSE ); - - $bean->bla = NULL; - - asrt( $bean->hasChanged( 'bla' ), TRUE ); - - // NULL test - $page = R::dispense( 'page' ); - $book = R::dispense( 'book' ); - - $page->title = 'a NULL page'; - $page->book = $book; - $book->title = 'Why NUll is painful..'; - - R::store( $page ); - - $bookid = $page->book->id; - - unset( $page->book ); - - $id = R::store( $page ); - - $page = R::load( 'page', $id ); - - $page->title = 'another title'; - - R::store( $page ); - - pass(); - - $page = R::load( 'page', $id ); - - $page->title = 'another title'; - $page->book_id = NULL; - - R::store( $page ); - - pass(); - } - - /** - * Here we test whether the column type is set correctly. - * Normally if you store NULL, the smallest type (bool/set) will - * be selected. However in case of a foreign key type INT should - * be selected because fks columns require matching types. - * - * @return void - */ - public function ColumnType() - { - - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - - $book->ownPage[] = $page; - - R::store( $book ); - - pass(); - - asrt( $page->getMeta( 'cast.book_id' ), 'id' ); - } - - /** - * Test meta column type. - * - * @return void - */ - public function TypeColumn() - { - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - - $page->book = $book; - - R::store( $page ); - - pass(); - - asrt( $page->getMeta( 'cast.book_id' ), 'id' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole.php deleted file mode 100644 index f85207c1..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole.php +++ /dev/null @@ -1,28 +0,0 @@ -setMode( 1 ); - $debugger->setParamStringLength( 20 ); - if (!is_null($bindings)) { - $debugger->log($query, $bindings); - } else { - $debugger->log($query); - } - $logs = $debugger->getLogs(); - $log = reset($logs); - asrt($log, $expected); - $debugger->clear(); - } - - /** - * Test dump(). - * - * @return void - */ - public function testDump() - { - $beans = R::dispense( 'bean', 2 ); - $beans[0]->name = 'hello'; - $beans[1]->name = 'world'; - $array = R::dump($beans); - asrt( is_array( $array ), TRUE ); - foreach( $array as $item ) { - asrt( is_string( $item ), TRUE ); - } - $beans[1]->name = 'world, and a very long string that should be shortened'; - $array = R::dump($beans); - asrt( is_array( $array ), TRUE ); - asrt( strpos( $array[1], '...' ), 35 ); - - //just to get 100% test cov, we dont need to test this - dmp( $beans ); - pass(); - - //test wrong input - asrt( is_array( R::dump( NULL ) ), TRUE ); - asrt( count( R::dump( NULL ) ), 0 ); - asrt( is_array( R::dump( '' ) ), TRUE ); - asrt( count( R::dump( '' ) ), 0 ); - asrt( is_array( R::dump( 1 ) ), TRUE ); - asrt( count( R::dump( 1 ) ), 0 ); - asrt( is_array( R::dump( TRUE ) ), TRUE ); - asrt( count( R::dump( FALSE ) ), 0 ); - } - - /** - * Performs tests for debugger. - * - * @return void - */ - public function testDebugger2() - { - testpack( 'Test debugger with params.' ); - $this->testDebug('SELECT * FROM table', NULL, 'SELECT * FROM table'); - $this->testDebug('SELECT * FROM book WHERE title = ?', array('my book'), 'SELECT * FROM book WHERE title = \'my book\''); - $this->testDebug('title = ? OR title = ?', array('book1', 'book2'), 'title = \'book1\' OR title = \'book2\''); - $this->testDebug('title = ? OR price = ?', array('book1', 20), 'title = \'book1\' OR price = 20'); - $this->testDebug('number IN (?,?)', array(8,900), 'number IN (8,900)'); - $this->testDebug('?', array(20), '20'); - $this->testDebug('?,?', array('test',20), '\'test\',20'); - $this->testDebug('?', array( NULL ), 'NULL'); - $this->testDebug('title = ?', array( NULL ), 'title = NULL'); - $this->testDebug('?,?', array( NULL,NULL ), 'NULL,NULL'); - $this->testDebug('title = ?', array('a very long title that should be shortened'), 'title = \'a very long title th... \''); - $this->testDebug('title = ? OR title = ?', array('a very long title that should be shortened', 'another long title that should be shortened'), 'title = \'a very long title th... \' OR title = \'another long title t... \''); - $this->testDebug('title = ? OR ?', array('a very long title that should be shortened', NULL), 'title = \'a very long title th... \' OR NULL'); - $this->testDebug('?,?', array('hello'), '\'hello\',:slot1'); - - $this->testDebug('title = :first OR title = :second', array(':first'=>'book1', ':second'=>'book2'), 'title = \'book1\' OR title = \'book2\''); - $this->testDebug('title = :first OR price = :second', array(':first'=>'book1', ':second'=>20), 'title = \'book1\' OR price = 20'); - $this->testDebug('number IN (:one,:two)', array(':one'=>8, ':two'=>900), 'number IN (8,900)'); - $this->testDebug('number IN (:one,:two)', array(':one'=>8, ':two'=>900, ':three'=>999), 'number IN (8,900)'); - $this->testDebug('number IN (:one,:two)', array(':three'=>999, ':one'=>8, ':two'=>900), 'number IN (8,900)'); - $this->testDebug('number IN (:one,:two)', array(':one'=>8, ':three'=>999, ':two'=>900), 'number IN (8,900)'); - - $this->testDebug(':a', array(':a'=>20), '20'); - $this->testDebug(':a,?', array(':a'=>20, 30), '20,30'); - $this->testDebug(':a,?', array(30, ':a'=>20), '20,30'); - - $this->testDebug('?,?', array('test',20), '\'test\',20'); - $this->testDebug('?', array( NULL ), 'NULL'); - $this->testDebug('title = ?', array( NULL ), 'title = NULL'); - $this->testDebug('?,?', array( NULL,NULL ), 'NULL,NULL'); - $this->testDebug('title = ?', array('a very long title that should be shortened'), 'title = \'a very long title th... \''); - $this->testDebug('title = ? OR title = ?', array('a very long title that should be shortened', 'another long title that should be shortened'), 'title = \'a very long title th... \' OR title = \'another long title t... \''); - $this->testDebug('title = ? OR ?', array('a very long title that should be shortened', NULL), 'title = \'a very long title th... \' OR NULL'); - $this->testDebug('?,?', array('hello'), '\'hello\',:slot1'); - - $this->testDebug('hello ?', 'world', 'hello ?'); - - $this->testDebug(':slot0 :slot1 :slot2 :slot3 :slot4 :slot5 :slot6 :slot7 :slot8 :slot9 :slot10', array( - 'a','b','c','d','e','f','g','h','i','j','k' - ),"'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k'"); - $this->testDebug('? ? ? ? ? ? ? ? ? ? ?', array( - 'a','b','c','d','e','f','g','h','i','j','k' - ),"'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k'"); - $this->testDebug(':a :aaa :ab', array(':a'=>1,':aaa'=>2,':ab'=>3),'1 2 3'); - } - - /** - * Test facade fancyDebug function - */ - public function testDebug2InFacade() - { - R::fancyDebug( TRUE ); - pass(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Export.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Export.php deleted file mode 100644 index 0c35f800..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Export.php +++ /dev/null @@ -1,197 +0,0 @@ -import( array( "a" => 1, "b" => 2 ) ); - - $bean->setMeta( "justametaproperty", "hellothere" ); - - $arr = $bean->export(); - - asrt( is_array( $arr ), TRUE ); - - asrt( isset( $arr["a"] ), TRUE ); - asrt( isset( $arr["b"] ), TRUE ); - - asrt( $arr["a"], 1 ); - asrt( $arr["b"], 2 ); - - asrt( isset( $arr["__info"] ), FALSE ); - - $arr = $bean->export( TRUE ); - - asrt( isset( $arr["__info"] ), TRUE ); - - asrt( $arr["a"], 1 ); - asrt( $arr["b"], 2 ); - - $exportBean = $redbean->dispense( "abean" ); - - $exportBean->setMeta( "metaitem.bla", 1 ); - - $exportedBean = $exportBean->export( TRUE ); - - asrt( $exportedBean["__info"]["metaitem.bla"], 1 ); - asrt( $exportedBean["__info"]["type"], "abean" ); - - // Can we determine whether a bean is empty? - testpack( 'test $bean->isEmpty() function' ); - - $bean = R::dispense( 'bean' ); - - asrt( $bean->isEmpty(), TRUE ); - asrt( ( count( $bean ) > 0 ), TRUE ); - - $bean->property = 1; - - asrt( $bean->isEmpty(), FALSE ); - asrt( ( count( $bean ) > 0 ), TRUE ); - - $bean->property = 0; - - asrt( $bean->isEmpty(), TRUE ); - asrt( ( count( $bean ) > 0 ), TRUE ); - - $bean->property = FALSE; - - asrt( $bean->isEmpty(), TRUE ); - asrt( ( count( $bean ) > 0 ), TRUE ); - - $bean->property = NULL; - - asrt( $bean->isEmpty(), TRUE ); - asrt( ( count( $bean ) > 0 ), TRUE ); - - unset( $bean->property ); - - asrt( $bean->isEmpty(), TRUE ); - asrt( ( count( $bean ) > 0 ), TRUE ); - - // Export bug I found - $bandmember = R::dispense( 'bandmember' ); - $bandmember->name = 'Duke'; - $instrument = R::dispense( 'instrument' ); - $instrument->name = 'Piano'; - $bandmember->ownInstrument[] = $instrument; - - $a = R::exportAll( $bandmember ); - - pass(); - - asrt( isset( $a[0] ), TRUE ); - asrt( (int) $a[0]['id'], 0 ); - - asrt( $a[0]['name'], 'Duke' ); - - asrt( $a[0]['ownInstrument'][0]['name'], 'Piano' ); - - R::nuke(); - - $v = R::dispense( 'village' ); - $b = R::dispense( 'building' ); - - $v->name = 'a'; - $b->name = 'b'; - - $v->ownBuilding[] = $b; - - $id = R::store( $v ); - - $a = R::exportAll( $v ); - - asrt( $a[0]['name'], 'a' ); - asrt( $a[0]['ownBuilding'][0]['name'], 'b' ); - - $v = R::load( 'village', $id ); - - $b2 = R::dispense( 'building' ); - - $b2->name = 'c'; - - $v->ownBuilding[] = $b2; - - $a = R::exportAll( $v ); - - asrt( $a[0]['name'], 'a' ); - asrt( $a[0]['ownBuilding'][0]['name'], 'b' ); - - asrt( count( $a[0]['ownBuilding'] ), 2 ); - - list( $r1, $r2 ) = R::dispense( 'army', 2 ); - - $r1->name = '1'; - $r2->name = '2'; - - $v->sharedArmy[] = $r2; - - $a = R::exportAll( $v ); - - asrt( count( $a[0]['sharedArmy'] ), 1 ); - - R::store( $v ); - - $v = R::load( 'village', $id ); - - $a = R::exportAll( $v ); - - asrt( count( $a[0]['sharedArmy'] ), 1 ); - - asrt( $a[0]['name'], 'a' ); - asrt( $a[0]['ownBuilding'][0]['name'], 'b' ); - - asrt( count( $a[0]['ownBuilding'] ), 2 ); - - $v->sharedArmy[] = $r1; - - $a = R::exportAll( $v ); - - asrt( count( $a[0]['sharedArmy'] ), 2 ); - - $v = R::load( 'village', $id ); - - $a = R::exportAll( $v ); - - asrt( count( $a[0]['sharedArmy'] ), 1 ); - - $v->sharedArmy[] = $r1; - - R::store( $v ); - - $v = R::load( 'village', $id ); - - $a = R::exportAll( $v ); - - asrt( count( $a[0]['sharedArmy'] ), 2 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php deleted file mode 100644 index 350ca444..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Fusebox.php +++ /dev/null @@ -1,71 +0,0 @@ -flavour = 'tomato'; - - $this->giveMeSoup( $soup->box() ); - - $this->giveMeBean( $soup->box()->unbox() ); - - $this->giveMeBean( $soup ); - } - - /** - * Test type hinting with boxed model - * - * @param Model_Soup $soup - */ - private function giveMeSoup( \Model_Soup $soup ) - { - asrt( ( $soup instanceof \Model_Soup ), TRUE ); - - asrt( 'A bit too salty', $soup->taste() ); - - asrt( 'tomato', $soup->flavour ); - } - - /** - * Test unboxing - * - * @param OODBBean $bean - */ - private function giveMeBean( OODBBean $bean ) - { - asrt( ( $bean instanceof OODBBean ), TRUE ); - - asrt( 'A bit too salty', $bean->taste() ); - - asrt( 'tomato', $bean->flavour ); - } -} - diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Glue.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Glue.php deleted file mode 100644 index d38b8693..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Glue.php +++ /dev/null @@ -1,55 +0,0 @@ -glueSQLCondition(' name = ? '), ' WHERE name = ? ' ); - asrt( $writer->glueSQLCondition(' value1 > ? OR value < ? '), ' WHERE value1 > ? OR value < ? ' ); - - //Does it recognize NON-WHERE conditions? - usual suspects - asrt( $writer->glueSQLCondition(' ORDER BY name '), ' ORDER BY name ' ); - asrt( $writer->glueSQLCondition(' LIMIT 10 '), ' LIMIT 10 ' ); - asrt( $writer->glueSQLCondition(' OFFSET 20 '), ' OFFSET 20 ' ); - - //highly doubtful but who knows... - I think nobody will ever use this in a query snippet. - asrt( $writer->glueSQLCondition(' GROUP BY grp '), ' GROUP BY grp ' ); - asrt( $writer->glueSQLCondition(' HAVING x = ? '), ' HAVING x = ? ' ); - - //can we replace WHERE with AND ? - asrt( $writer->glueSQLCondition(' AND name = ? ', QueryWriter::C_GLUE_WHERE ), ' WHERE name = ? ' ); - - //can we glue with AND instead of WHERE ? - asrt( $writer->glueSQLCondition(' value1 > ? OR value < ? ', QueryWriter::C_GLUE_AND ), ' AND value1 > ? OR value < ? ' ); - - //non-cases - asrt( $writer->glueSQLCondition(' GROUP BY grp ', QueryWriter::C_GLUE_WHERE ), ' GROUP BY grp ' ); - asrt( $writer->glueSQLCondition(' GROUP BY grp ', QueryWriter::C_GLUE_AND ), ' GROUP BY grp ' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Import.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Import.php deleted file mode 100644 index bcff06d7..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Import.php +++ /dev/null @@ -1,313 +0,0 @@ - 'book', 'title' => 'book one' ), - array( '_type' => 'book', 'title' => 'book two' ), - ) ); - asrt( is_array( $books ), TRUE ); - asrt( count( $books ), 2 ); - $book = reset( $books ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( $book->title, 'book one' ); - $book = next( $books ); - asrt( ( $book instanceof OODBBean ), TRUE ); - asrt( $book->title, 'book two' ); - } - - /** - * Test recursive imports (formely known as R::graph). - * - * @return void - */ - public function testRecursiveImport() - { - $book = R::dispense( - array( - '_type'=>'book', - 'title'=>'The magic book', - 'ownPageList' => array( - array( - '_type' => 'page', - 'content' => 'magic potions', - ), - array( - '_type' => 'page', - 'content' => 'magic spells', - ) - ) - ) - ); - - $id = R::store( $book ); - $book = R::load( 'book', $id ); - asrt( $book->title, 'The magic book' ); - $pages = $book->with(' ORDER BY content ASC ')->ownPageList; - asrt( count($pages), 2 ); - $page1 = array_shift( $pages ); - asrt( $page1->content, 'magic potions' ); - $page2 = array_shift( $pages ); - asrt( $page2->content, 'magic spells' ); - - R::nuke(); - - $book = R::dispense( - array( - '_type'=>'book', - 'title'=>'The magic book', - 'author' => array( - '_type' => 'author', - 'name' => 'Dr. Evil' - ), - 'coAuthor' => array( - '_type' => 'author', - 'name' => 'Dr. Creepy' - ), - 'ownPageList' => array( - array( - '_type' => 'page', - 'content' => 'magic potions', - 'ownRecipe' => array( - 'a' => array('_type'=>'recipe', 'name'=>'Invisibility Salad'), - 'b' => array('_type'=>'recipe', 'name'=>'Soup of Madness'), - 'c' => array('_type'=>'recipe', 'name'=>'Love cake'), - ) - ), - array( - '_type' => 'page', - 'content' => 'magic spells', - ) - ), - 'sharedCategory' => array( - array( - '_type' => 'category', - 'label' => 'wizardry' - ), - ) - ) - ); - - $id = R::store( $book ); - $book = R::load( 'book', $id ); - asrt( $book->title, 'The magic book' ); - $pages = $book->with(' ORDER BY content ASC ')->ownPageList; - asrt( count($pages), 2 ); - $page1 = array_shift( $pages ); - asrt( $page1->content, 'magic potions' ); - $page2 = array_shift( $pages ); - asrt( $page2->content, 'magic spells' ); - $recipes = $page1->with(' ORDER BY name ASC ')->ownRecipeList; - asrt( count( $recipes ), 3 ); - $recipe1 = array_shift( $recipes ); - asrt( $recipe1->name, 'Invisibility Salad' ); - $recipe2 = array_shift( $recipes ); - asrt( $recipe2->name, 'Love cake' ); - $recipe3 = array_shift( $recipes ); - asrt( $recipe3->name, 'Soup of Madness' ); - $categories = $book->sharedCategoryList; - asrt( count($categories), 1 ); - $category = reset( $categories ); - asrt( $category->label, 'wizardry' ); - asrt( $book->author->name, 'Dr. Evil' ); - asrt( $book->fetchAs('author')->coAuthor->name, 'Dr. Creepy' ); - - try { - $list = R::dispense( array() ); - pass(); - asrt( is_array( $list ), TRUE ); - asrt( count( $list ), 0 ); - } catch ( RedException $ex ) { - pass(); - } - - try { - R::dispense( array( array() ) ); - fail(); - } catch ( RedException $ex ) { - pass(); - } - - try { - R::dispense( array( 'a' ) ); - fail(); - } catch ( RedException $ex ) { - pass(); - } - - try { - R::dispense( array( 'property' => 'value' ) ); - fail(); - } catch ( RedException $ex ) { - pass(); - } - } - - /** - * Test import from and tainted. - * - * @return void - */ - public function testImportFromAndTainted() - { - testpack( 'Test importFrom() and Tainted' ); - - $bean = R::dispense( 'bean' ); - - R::store( $bean ); - - $bean->name = 'abc'; - - asrt( $bean->getMeta( 'tainted' ), TRUE ); - - R::store( $bean ); - - asrt( $bean->getMeta( 'tainted' ), FALSE ); - - $copy = R::dispense( 'bean' ); - - R::store( $copy ); - - $copy = R::load( 'bean', $copy->id ); - - asrt( $copy->getMeta( 'tainted' ), FALSE ); - - $copy->import( array( 'name' => 'xyz' ) ); - - asrt( $copy->getMeta( 'tainted' ), TRUE ); - - $copy->setMeta( 'tainted', FALSE ); - - asrt( $copy->getMeta( 'tainted' ), FALSE ); - - $copy->importFrom( $bean ); - - asrt( $copy->getMeta( 'tainted' ), TRUE ); - - testpack( 'Test basic import() feature.' ); - - $bean = new OODBBean; - - $bean->import( array( "a" => 1, "b" => 2 ) ); - - asrt( $bean->a, 1 ); - asrt( $bean->b, 2 ); - - $bean->import( array( "a" => 3, "b" => 4 ), "a,b" ); - - asrt( $bean->a, 3 ); - asrt( $bean->b, 4 ); - - $bean->import( array( "a" => 5, "b" => 6 ), " a , b " ); - - asrt( $bean->a, 5 ); - asrt( $bean->b, 6 ); - - $bean->import( array( "a" => 1, "b" => 2 ) ); - - testpack( 'Test inject() feature.' ); - - $coffee = R::dispense( 'coffee' ); - - $coffee->id = 2; - $coffee->liquid = 'black'; - - $cup = R::dispense( 'cup' ); - - $cup->color = 'green'; - - // Pour coffee in cup - $cup->inject( $coffee ); - - // Do we still have our own property? - asrt( $cup->color, 'green' ); - - // Did we pour the liquid in the cup? - asrt( $cup->liquid, 'black' ); - - // Id should not be transferred - asrt( $cup->id, 0 ); - } - - /** - * Test import using array access functions - * - * @return void - */ - public function testArrayAccess() - { - $book = R::dispense( 'book' ); - $book->isAwesome = TRUE; - asrt( isset( $book->isAwesome ), TRUE ); - $book = R::dispense( 'book' ); - $book['isAwesome'] = TRUE; - asrt( isset( $book->isAwesome ), TRUE ); - - $book = R::dispense( 'book' ); - $book['xownPageList'] = R::dispense( 'page', 2 ); - asrt( isset( $book->ownPage ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPageList ), TRUE ); - - $book = R::dispense( 'book' ); - $book['ownPageList'] = R::dispense( 'page', 2 ); - asrt( isset( $book->ownPage ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPageList ), TRUE ); - - $book = R::dispense( 'book' ); - $book['xownPage'] = R::dispense( 'page', 2 ); - asrt( isset( $book->ownPage ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPageList ), TRUE ); - - $book = R::dispense( 'book' ); - $book['ownPage'] = R::dispense( 'page', 2 ); - asrt( isset( $book->ownPage ), TRUE ); - asrt( isset( $book->xownPage ), TRUE ); - asrt( isset( $book->ownPageList ), TRUE ); - asrt( isset( $book->xownPageList ), TRUE ); - - $book = R::dispense( 'book' ); - $book['sharedTag'] = R::dispense( 'tag', 2 ); - asrt( isset( $book->sharedTag ), TRUE ); - asrt( isset( $book->sharedTagList ), TRUE ); - - $book = R::dispense( 'book' ); - $book['sharedTagList'] = R::dispense( 'tag', 2 ); - asrt( isset( $book->sharedTag ), TRUE ); - asrt( isset( $book->sharedTagList ), TRUE ); - - } - -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Labels.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Labels.php deleted file mode 100644 index 1933cdd0..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Labels.php +++ /dev/null @@ -1,47 +0,0 @@ -setMeta( "this.is.a.custom.metaproperty", "yes" ); - - asrt( $bean->getMeta( "this.is.a.custom.metaproperty" ), "yes" ); - - asrt( $bean->getMeta( "nonexistant" ), NULL ); - asrt( $bean->getMeta( "nonexistant", "abc" ), "abc" ); - - asrt( $bean->getMeta( "nonexistant.nested" ), NULL ); - asrt( $bean->getMeta( "nonexistant,nested", "abc" ), "abc" ); - - $bean->setMeta( "test.two", "second" ); - - asrt( $bean->getMeta( "test.two" ), "second" ); - - $bean->setMeta( "another.little.property", "yes" ); - - asrt( $bean->getMeta( "another.little.property" ), "yes" ); - - asrt( $bean->getMeta( "test.two" ), "second" ); - - // Copy Metadata - $bean = new OODBBean; - - $bean->setMeta( "meta.meta", "123" ); - - $bean2 = new OODBBean; - - asrt( $bean2->getMeta( "meta.meta" ), NULL ); - - $bean2->copyMetaFrom( $bean ); - - asrt( $bean2->getMeta( "meta.meta" ), "123" ); - } - - /** - * Meta properties should not be saved. - * - * @return void - */ - public function testMetaPersist() - { - $bean = R::dispense( 'bean' ); - $bean->property = 'test'; - $bean->setMeta( 'meta', 'hello' ); - R::store( $bean ); - asrt( $bean->getMeta( 'meta' ), 'hello' ); - $bean = $bean->fresh(); - asrt( $bean->getMeta( 'meta' ), NULL ); - } - - /** - * You cant access meta data using the array accessors. - * - * @return void - */ - public function testNoArrayMetaAccess() - { - $bean = R::dispense( 'bean' ); - $bean->setMeta( 'greet', 'hello' ); - asrt( isset( $bean['greet'] ), FALSE ); - asrt( isset( $bean['__info']['greet'] ), FALSE ); - asrt( isset( $bean['__info'] ), FALSE ); - asrt( isset( $bean['meta'] ), FALSE ); - asrt( count( $bean ), 1 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php deleted file mode 100644 index cac84133..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Misc.php +++ /dev/null @@ -1,613 +0,0 @@ -getIntegerBindingMax(); - asrt( $max, 2147483647 ); - $driver = new RPDO( 'cubrid', 'user', 'pass' ); - $max = $driver->getIntegerBindingMax(); - asrt( $max, 2147483647 ); - $driver = new RPDO( 'other', 'user', 'pass' ); - $max = $driver->getIntegerBindingMax(); - asrt( $max, PHP_INT_MAX ); - } - - /** - * Should not be able to pass invalid mode (must be 0 or 1). - * - */ - public function testInvalidDebugModeException() - { - try { - R::debug( TRUE, 6 ); - fail(); - } catch ( RedException $e ) { - pass(); - } - R::debug( FALSE ); - } - - /** - * Adding a database twice no longer allowed, causes confusion - * and possible damage. - */ - public function testAddingTwice() - { - testpack( 'Test adding DB twice.' ); - - try { - R::addDatabase( 'sqlite', '' ); - fail(); - } catch ( RedException $ex ) { - pass(); - } - } - - /** - * Tests whether getID never produces a notice. - * - * @return void - */ - public function testGetIDShouldNeverPrintNotice() - { - set_error_handler(function($err, $errStr){ - die('>>>>FAIL :'.$err.' '.$errStr); - }); - $bean = new OODBBean; - $bean->getID(); - restore_error_handler(); - pass(); - } - - /** - * Tests setProperty. - * - * @return void - */ - public function testSetProperty() - { - $bean = R::dispense( 'bean' ); - $bean->item = 2; - $bean->ownBean = R::dispense( 'bean', 2 ); - R::store( $bean ); - $bean = $bean->fresh(); - $bean->ownBean; - - $bean->setProperty( 'ownBean', array(), FALSE, FALSE ); - asrt( count( $bean->ownBean ), 0 ); - asrt( count( $bean->getMeta( 'sys.shadow.ownBean' ) ), 2 ); - asrt( $bean->isTainted(), TRUE ); - - $bean->setProperty( 'ownBean', array(), TRUE, FALSE ); - asrt( count( $bean->ownBean ), 0 ); - asrt( count( $bean->getMeta( 'sys.shadow.ownBean' ) ), 0 ); - asrt( $bean->isTainted(), TRUE ); - - $bean = $bean->fresh(); - $bean->setProperty( 'ownBean', array(), TRUE, FALSE ); - asrt( count( $bean->ownBean ), 0 ); - asrt( count( $bean->getMeta( 'sys.shadow.ownBean' ) ), 0 ); - asrt( $bean->isTainted(), FALSE ); - - $bean = $bean->fresh(); - $bean->setProperty( 'ownBean', array(), TRUE, TRUE ); - asrt( count( $bean->ownBean ), 0 ); - asrt( count( $bean->getMeta( 'sys.shadow.ownBean' ) ), 0 ); - asrt( $bean->isTainted(), TRUE ); - } - - /** - * Tests beansToArray(). - * - * @return void - */ - public function testBeansToArray() - { - testpack('Test R::beansToArray method'); - - $bean1 = R::dispense( 'bean' ); - $bean1->name = 'hello'; - $bean2 = R::dispense( 'bean' ); - $bean2->name = 'world'; - - $beans = array( $bean1, $bean2 ); - $array = R::beansToArray( $beans ); - asrt( $array[0]['name'], 'hello' ); - asrt( $array[1]['name'], 'world' ); - } - - /** - * Test debugging with custom logger. - * - * @return void - */ - public function testDebugCustomLogger() - { - testpack( 'Test debug mode with custom logger' ); - - $pdoDriver = new RPDO( R::getDatabaseAdapter()->getDatabase()->getPDO() ); - - $customLogger = new CustomLogger; - - $pdoDriver->setDebugMode( TRUE, $customLogger ); - - $pdoDriver->Execute( 'SELECT 123' ); - - asrt( count( $customLogger->getLogMessage() ), 1 ); - - $pdoDriver->setDebugMode( TRUE, NULL ); - asrt( ( $pdoDriver->getLogger() instanceof RDefault ), TRUE ); - - testpack( 'Test bean->getProperties method' ); - - $bean = R::dispense( 'bean' ); - - $bean->property = 'hello'; - - $props = $bean->getProperties(); - - asrt( isset( $props['property'] ), TRUE ); - - asrt( $props['property'], 'hello' ); - - } - - /** - * Test Facade transactions. - * - * @return void - * - * @throws\Exception - */ - public function testTransactionInFacade() - { - testpack( 'Test transaction in facade' ); - - $bean = R::dispense( 'bean' ); - - $bean->name = 'a'; - - R::store( $bean ); - - R::trash( $bean ); - - R::freeze( TRUE ); - - $bean = R::dispense( 'bean' ); - - $bean->name = 'a'; - - R::store( $bean ); - - asrt( R::count( 'bean' ), 1 ); - - R::trash( $bean ); - - asrt( R::count( 'bean' ), 0 ); - - $bean = R::dispense( 'bean' ); - - $bean->name = 'a'; - - $id = R::transaction( function() use( &$bean ) { - return R::transaction( function() use( &$bean ) { - return R::store( $bean ); - } ); - } ); - - asrt( (int) $id, (int) $bean->id ); - - R::trash( $bean ); - - $bean = R::dispense( 'bean' ); - - $bean->name = 'a'; - - $id = R::transaction( function() use( &$bean ) { - return R::store( $bean ); - } ); - - asrt( (int) $id, (int) $bean->id ); - - R::trash( $bean ); - - $bean = R::dispense( 'bean' ); - - $bean->name = 'a'; - - try { - R::transaction( function () use ( $bean ) { - R::store( $bean ); - - R::transaction( function () { - throw new\Exception(); - } ); - } ); - } catch (\Exception $e ) { - pass(); - } - asrt( R::count( 'bean' ), 0 ); - - $bean = R::dispense( 'bean' ); - - $bean->name = 'a'; - - try { - R::transaction( function () use ( $bean ) { - R::transaction( function () use ( $bean ) { - R::store( $bean ); - throw new\Exception(); - } ); - } ); - } catch (\Exception $e ) { - pass(); - } - - asrt( R::count( 'bean' ), 0 ); - - $bean = R::dispense( 'bean' ); - - $bean->name = 'a'; - - try { - R::transaction( function () use ( $bean ) { - R::transaction( function () use ( $bean ) { - R::store( $bean ); - } ); - } ); - } catch (\Exception $e ) { - pass(); - } - - asrt( R::count( 'bean' ), 1 ); - - R::freeze( FALSE ); - - try { - R::transaction( 'nope' ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - testpack( 'Test Camelcase 2 underscore' ); - - $names = array( - 'oneACLRoute' => 'one_acl_route', - 'ALLUPPERCASE' => 'alluppercase', - 'clientServerArchitecture' => 'client_server_architecture', - 'camelCase' => 'camel_case', - 'peer2peer' => 'peer2peer', - 'fromUs4You' => 'from_us4_you', - 'lowercase' => 'lowercase', - 'a1A2b' => 'a1a2b', - ); - - $bean = R::dispense( 'bean' ); - - foreach ( $names as $name => $becomes ) { - $bean->$name = 1; - - asrt( isset( $bean->$becomes ), TRUE ); - } - - testpack( 'Misc Tests' ); - - R::debug( 1 ); - - flush(); - ob_start(); - - R::exec( 'SELECT 123' ); - - $out = ob_get_contents(); - - ob_end_clean(); - flush(); - - pass(); - - asrt( ( strpos( $out, 'SELECT 123' ) !== FALSE ), TRUE ); - - R::debug( 0 ); - - flush(); - ob_start(); - - R::exec( 'SELECT 123' ); - - $out = ob_get_contents(); - ob_end_clean(); - - flush(); - - pass(); - - asrt( $out, '' ); - - R::debug( 0 ); - - pass(); - - testpack( 'test to string override' ); - - $band = R::dispense( 'band' ); - - $str = strval( $band ); - - asrt( $str, 'bigband' ); - - testpack( 'test whether we can use isset/set in model' ); - - $band->setProperty( 'property1', 123 ); - - asrt( $band->property1, 123 ); - - asrt( $band->checkProperty( 'property1' ), TRUE ); - asrt( $band->checkProperty( 'property2' ), FALSE ); - - $band = new \Model_Band; - - $bean = R::dispense( 'band' ); - - $bean->property3 = 123; - - $band->loadBean( $bean ); - - $bean->property4 = 345; - - $band->setProperty( 'property1', 123 ); - - asrt( $band->property1, 123 ); - - asrt( $band->checkProperty( 'property1' ), TRUE ); - asrt( $band->checkProperty( 'property2' ), FALSE ); - - asrt( $band->property3, 123 ); - asrt( $band->property4, 345 ); - - testpack( 'Can we pass a\PDO object to Setup?' ); - - $pdo = new\PDO( 'sqlite:test.db' ); - - R::addDatabase( 'pdo', $pdo ); - R::selectDatabase( 'pdo' ); - - R::getCell('SELECT 123;'); - - testpack( 'Test array interface of beans' ); - - $bean = R::dispense( 'bean' ); - - $bean->hello = 'hi'; - $bean->world = 'planet'; - - asrt( $bean['hello'], 'hi' ); - - asrt( isset( $bean['hello'] ), TRUE ); - asrt( isset( $bean['bye'] ), FALSE ); - - $bean['world'] = 'sphere'; - - asrt( $bean->world, 'sphere' ); - - foreach ( $bean as $key => $el ) { - if ( $el == 'sphere' || $el == 'hi' || $el == 0 ) { - pass(); - } else { - fail(); - } - - if ( $key == 'hello' || $key == 'world' || $key == 'id' ) { - pass(); - } else { - fail(); - } - } - - asrt( count( $bean ), 3 ); - - unset( $bean['hello'] ); - - asrt( count( $bean ), 2 ); - - asrt( count( R::dispense( 'countable' ) ), 1 ); - - // Otherwise untestable... - $bean->setBeanHelper( new SimpleFacadeBeanHelper() ); - - R::getRedBean()->setBeanHelper( new SimpleFacadeBeanHelper() ); - - pass(); - - // Test whether properties like owner and shareditem are still possible - testpack( 'Test Bean Interface for Lists' ); - - $bean = R::dispense( 'bean' ); - - // Must not be list, because first char after own is lowercase - asrt( is_array( $bean->owner ), FALSE ); - - // Must not be list, because first char after shared is lowercase - asrt( is_array( $bean->shareditem ), FALSE ); - - asrt( is_array( $bean->own ), FALSE ); - asrt( is_array( $bean->shared ), FALSE ); - - asrt( is_array( $bean->own_item ), FALSE ); - asrt( is_array( $bean->shared_item ), FALSE ); - - asrt( is_array( $bean->{'own item'} ), FALSE ); - asrt( is_array( $bean->{'shared Item'} ), FALSE ); - } - - public function testConv2Beans() - { - $row1 = array('id' => 1, 'title'=>'test'); - $row2 = array('id' => 2, 'title'=>'test2'); - $beans = R::convertToBeans('page', array($row1, $row2)); - asrt(count($beans), 2); - asrt($beans[2]->title, 'test2'); - } - - /** - * Test the most important invalid bean combinations. - * - * @return void - */ - public function testInvalidType() - { - $invalid = array( - 'book_page', //no link beans - 'a_b_c', //no prefix - 'a b', //no space - 'bean@', //no invalid symbols - 'bean#', //no invalid symbols - 'bean$', //sometimes used in DB, not allowed - '__bean',//no prefixes - '.bean', //no object notation - 'bean-item', //no dash - 'beanOther'); //no camelcase (uppercase because of file system issues) - - foreach( $invalid as $j ) { - try { - R::dispense( $j ); - fail(); - } catch( RedException $e ) { - pass(); - } - } - } - - /** - * Test whether batch still works if no IDs have been passed. - * - * @return void - */ - public function testBatch0() - { - $zero = R::batch( 'page', array() ); - asrt( is_array( $zero ), TRUE ); - asrt( count( $zero ), 0 ); - $zero = R::batch( 'page', FALSE ); - asrt( is_array( $zero ), TRUE ); - asrt( count( $zero ), 0 ); - $zero = R::batch( 'page', NULL); - asrt( is_array( $zero ), TRUE ); - asrt( count( $zero ), 0 ); - } - - /** - * Test whether connection failure does not reveal - * credentials. - * - * @return void - */ - public function testConnect() - { - $driver = new RPDO( 'dsn:invalid', 'usr', 'psst' ); - try { - $driver->connect(); - fail(); - } - catch( \PDOException $e ) { - asrt( strpos( $e->getMessage(), 'invalid' ), FALSE ); - asrt( strpos( $e->getMessage(), 'usr' ), FALSE ); - asrt( strpos( $e->getMessage(), 'psst' ), FALSE ); - } - } - - /** - * Test whether we can create an instant database using - * R::setup(). - * - * Probably only works on *NIX systems. - * - * @return void - */ - public function testSetup() - { - $tmpDir = sys_get_temp_dir(); - R::setup(); - } - - /** - * Test camelCase to snake_case conversions. - * - * @return void - */ - public function testCamel2Snake() - { - asrt( AQueryWriter::camelsSnake('bookPage'), 'book_page' ); - asrt( AQueryWriter::camelsSnake('FTP'), 'ftp' ); - asrt( AQueryWriter::camelsSnake('ACLRules'), 'acl_rules' ); - asrt( AQueryWriter::camelsSnake('SSHConnectionProxy'), 'ssh_connection_proxy' ); - asrt( AQueryWriter::camelsSnake('proxyServerFacade'), 'proxy_server_facade' ); - asrt( AQueryWriter::camelsSnake('proxySSHClient'), 'proxy_ssh_client' ); - asrt( AQueryWriter::camelsSnake('objectACL2Factory'), 'object_acl2_factory' ); - asrt( AQueryWriter::camelsSnake('bookItems4Page'), 'book_items4_page' ); - asrt( AQueryWriter::camelsSnake('book☀Items4Page'), 'book☀_items4_page' ); - } -} - -/** - * Custom Logger class. - * For testing purposes. - */ -class CustomLogger extends RDefault -{ - - private $log; - - public function getLogMessage() - { - return $this->log; - } - - public function log() - { - $this->log = func_get_args(); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Plugins.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Plugins.php deleted file mode 100644 index fa539814..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Plugins.php +++ /dev/null @@ -1,79 +0,0 @@ -getMessage(), 'Plugin name may only contain alphanumeric characters.' ); - } - - try { - R::__callStatic( '---', function() {} ); - fail(); - } catch ( RedException $e ) { - asrt( $e->getMessage(), 'Plugin name may only contain alphanumeric characters.' ); - } - - try { - R::invalidMethod(); - fail(); - } catch ( RedException $e ) { - asrt( $e->getMessage(), 'Plugin \'invalidMethod\' does not exist, add this plugin using: R::ext(\'invalidMethod\')' ); - } - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Tainted.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Tainted.php deleted file mode 100644 index ba6f79f3..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Tainted.php +++ /dev/null @@ -1,158 +0,0 @@ -hasListChanged( 'ownPage' ), FALSE ); - $book->ownPage[] = $page; - asrt( $book->hasListChanged( 'ownPage' ), TRUE ); - R::store( $book ); - $book = $book->fresh(); - asrt( $book->hasListChanged( 'ownPage' ), FALSE ); - $page = R::dispense( 'page' ); - $book->ownPageList[] = $page; - asrt( $book->hasListChanged( 'ownPage' ), TRUE ); - R::store( $book ); - $book = $book->fresh(); - asrt( $book->hasListChanged( 'ownPage' ), FALSE ); - asrt( count( $book->ownPageList ), 2 ); - array_pop( $book->ownPageList ); - asrt( count( $book->ownPageList ), 1 ); - asrt( $book->hasListChanged( 'ownPage' ), TRUE ); - array_pop( $book->ownPageList ); - asrt( count( $book->ownPageList ), 0 ); - asrt( $book->hasListChanged( 'ownPage' ), TRUE ); - $book = $book->fresh(); - asrt( $book->hasListChanged( 'ownPage' ), FALSE ); - asrt( count( $book->ownPageList ), 2 ); - $otherPage = R::dispense( 'page' ); - array_pop( $book->ownPageList ); - $book->ownPageList[] = $otherPage; - asrt( count( $book->ownPageList ), 2 ); - asrt( $book->hasListChanged( 'ownPage' ), TRUE ); - $book = $book->fresh(); - $firstPage = reset( $book->ownPageList ); - $firstPage->content = 'abc'; - asrt( $book->hasListChanged( 'ownPage' ), FALSE ); - $book = $book->fresh(); - asrt( $book->hasListChanged( 'ownPage' ), FALSE ); - $lastPage = end( $book->ownPageList ); - $lastPage->ownText[] = R::dispense( 'text' ); - asrt( $book->hasListChanged( 'ownPage' ), FALSE ); - } - - /** - * Tests whether we can clear the history of a bean. - * - * @return void - */ - public function testClearHist() - { - R::nuke(); - $book = R::dispense( 'book' ); - asrt( $book->hasChanged( 'title' ), FALSE ); - $book->title = 'book'; - asrt( $book->hasChanged( 'title' ), TRUE ); - R::store( $book ); - asrt( $book->hasChanged( 'title' ), TRUE ); - $book->clearHistory(); - asrt( $book->hasChanged( 'title' ), FALSE ); - } - - /** - * Test tainted. - * - * @return void - */ - public function testTainted() - { - testpack( 'Original Tainted Tests' ); - - $redbean = R::getRedBean(); - - $spoon = $redbean->dispense( "spoon" ); - - asrt( $spoon->getMeta( "tainted" ), TRUE ); - - $spoon->dirty = "yes"; - - asrt( $spoon->getMeta( "tainted" ), TRUE ); - - testpack( 'Tainted List test' ); - - $note = R::dispense( 'note' ); - - $note->text = 'abc'; - - $note->ownNote[] = R::dispense( 'note' )->setAttr( 'text', 'def' ); - - $id = R::store( $note ); - - $note = R::load( 'note', $id ); - - asrt( $note->isTainted(), FALSE ); - - // Shouldn't affect tainted - $note->text; - - asrt( $note->isTainted(), FALSE ); - - $note->ownNote; - - asrt( $note->isTainted(), TRUE ); - - testpack( 'Tainted Test Old Value' ); - - $text = $note->old( 'text' ); - - asrt( $text, 'abc' ); - - asrt( $note->hasChanged( 'text' ), FALSE ); - - $note->text = 'xxx'; - - asrt( $note->hasChanged( 'text' ), TRUE ); - - $text = $note->old( 'text' ); - - asrt( $text, 'abc' ); - - testpack( 'Tainted Non-exist' ); - - asrt( $note->hasChanged( 'text2' ), FALSE ); - - testpack( 'Misc Tainted Tests' ); - - $bean = R::dispense( 'bean' ); - - $bean->hasChanged( 'prop' ); - - $bean->old( 'prop' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php deleted file mode 100644 index 58719ddf..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Toolbox.php +++ /dev/null @@ -1,131 +0,0 @@ -getToolbox(); - asrt( ( $toolbox2 instanceof TB), TRUE ); - asrt( $toolbox, $toolbox2 ); - $extractedToolbox = $beanHelper->getExtractedToolbox(); - asrt( is_array( $extractedToolbox ), TRUE ); - asrt( count( $extractedToolbox ), 4 ); - asrt( ( $extractedToolbox[0] instanceof OODB ), TRUE ); - asrt( ( $extractedToolbox[1] instanceof Adapter ), TRUE ); - asrt( ( $extractedToolbox[2] instanceof QueryWriter ), TRUE ); - asrt( ( $extractedToolbox[3] instanceof TB ), TRUE ); - } - - /** - * Does the toolbox contain the necessary tools ? - * - * @return void - */ - public function testDoesToolboxContainTheTools() - { - $toolbox = R::getToolBox(); - asrt( ( $toolbox->getDatabaseAdapter() instanceof Adapter ), TRUE ); - asrt( ( $toolbox->getRedBean() instanceof OODB ), TRUE ); - asrt( ( $toolbox->getWriter() instanceof QueryWriter ), TRUE ); - } - - /** - * Tests whether freeze() switches the repository object - * as it is supposed to do. - * - * @return void - */ - public function testRepoSwitching() - { - asrt( class_exists( 'RedBeanPHP\Repository' ), TRUE ); - asrt( class_exists( 'RedBeanPHP\Repository\Fluid' ), TRUE ); - asrt( class_exists( 'RedBeanPHP\Repository\Frozen' ), TRUE ); - R::freeze( FALSE ); - $redbean = R::getRedBean(); - $repo = $redbean->getCurrentRepository(); - asrt( is_object( $repo ), TRUE ); - asrt( ( $repo instanceof Repository ), TRUE ); - asrt( ( $repo instanceof FluidRepo ), TRUE ); - R::freeze( TRUE ); - $fluid = $repo; - $repo = $redbean->getCurrentRepository(); - asrt( is_object( $repo ), TRUE ); - asrt( ( $repo instanceof Repository ), TRUE ); - asrt( ( $repo instanceof FrozenRepo ), TRUE ); - $frozen = $repo; - R::freeze( FALSE ); - $redbean = R::getRedBean(); - $repo = $redbean->getCurrentRepository(); - asrt( is_object( $repo ), TRUE ); - asrt( ( $repo instanceof Repository ), TRUE ); - asrt( ( $repo instanceof FluidRepo ), TRUE ); - asrt( $repo, $fluid ); - R::freeze( TRUE ); - $fluid = $repo; - $repo = $redbean->getCurrentRepository(); - asrt( is_object( $repo ), TRUE ); - asrt( ( $repo instanceof Repository ), TRUE ); - asrt( ( $repo instanceof FrozenRepo ), TRUE ); - asrt( $repo, $frozen ); - R::freeze( FALSE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Version.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Version.php deleted file mode 100644 index e19365da..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Blackhole/Version.php +++ /dev/null @@ -1,45 +0,0 @@ -sqlStateIn( '000', array() ); - - // Unknown state must return FALSE. - asrt( $a, FALSE ); - - try { - R::getWriter()->esc( '`aaa`' ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - asrt( ( $e instanceof RedException ), TRUE ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID/Writer.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID/Writer.php deleted file mode 100644 index e1da377c..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/CUBRID/Writer.php +++ /dev/null @@ -1,52 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $writer->createTable( "testtable" ); - - $writer->addColumn( "testtable", "special", CUBRID::C_DATATYPE_SPECIAL_DATE ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols['special'], TRUE ), CUBRID::C_DATATYPE_SPECIAL_DATE ); - - asrt( $writer->code( $cols['special'], FALSE ), CUBRID::C_DATATYPE_SPECIFIED ); - - $writer->addColumn( "testtable", "special2", CUBRID::C_DATATYPE_SPECIAL_DATETIME ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols['special2'], TRUE ), CUBRID::C_DATATYPE_SPECIAL_DATETIME ); - - asrt( $writer->code( $cols['special'], FALSE ), CUBRID::C_DATATYPE_SPECIFIED ); - - } - -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql.php deleted file mode 100644 index f2824827..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql.php +++ /dev/null @@ -1,28 +0,0 @@ -id, $book1ID ); - asrt( $book1->title, 'book 1' ); - - $book2 = R::load( 'book', $book2ID ); - - asrt( $book2->id, $book2ID ); - asrt( $book2->title, 'book 2' ); - - asrt( count( $book1->ownPage ), 2 ); - asrt( count( $book1->fresh()->with( 'LIMIT 1' )->ownPage ), 1 ); - asrt( count( $book1->fresh()->withCondition( ' title = ? ', array('page 2 of book 1'))->ownPage ), 1 ); - - asrt( count($book2->ownPage), 1 ); - asrt( $book2->fresh()->countOwn( 'page' ), 1 ); - - $page1 = R::load( 'page', $page1ID ); - asrt( count( $page1->sharedPage ), 0 ); - asrt( $page1->fetchAs( 'book' )->magazine->id, $book2ID ); - - $page2 = R::load( 'page', $page2ID ); - asrt( count($page2->sharedPage), 1 ); - asrt( $page2->fresh()->countShared( 'page' ), 1 ); - - $page3 = R::findOne( 'page', ' title = ? ', array( 'page 1 of book 2' ) ); - asrt( $page3->id, $page3ID ); - asrt( $page3->book->id, $book2ID ); - - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Double.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Double.php deleted file mode 100644 index 902bd20d..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Double.php +++ /dev/null @@ -1,59 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $largeDouble = 999999888889999922211111; //8.88889999922211e+17; - - $page = $redbean->dispense( "page" ); - - $page->weight = $largeDouble; - - $id = $redbean->store( $page ); - - $cols = $writer->getColumns( "page" ); - - asrt( $cols["weight"], "double" ); - - $page = $redbean->load( "page", $id ); - - $page->name = "dont change the numbers!"; - - $redbean->store( $page ); - - $page = $redbean->load( "page", $id ); - - $cols = $writer->getColumns( "page" ); - - asrt( $cols["weight"], "double" ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php deleted file mode 100644 index 6ee4ae64..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Foreignkeys.php +++ /dev/null @@ -1,408 +0,0 @@ -name = '1'; - $g2->name = '2'; - - $book->ownPage = array( $page ); - - $book->cover = $cover; - - $book->sharedGenre = array( $g1, $g2 ); - - R::store( $book ); - - $fkbook = R::getAll( 'describe book' ); - $fkgenre = R::getAll( 'describe book_genre' ); - $fkpage = R::getAll( 'describe cover' ); - - $j = json_encode( R::getAll( 'SELECT - ke.referenced_table_name parent, - ke.table_name child, - ke.constraint_name - FROM - information_schema.KEY_COLUMN_USAGE ke - WHERE - ke.referenced_table_name IS NOT NULL - AND ke.CONSTRAINT_SCHEMA="oodb" - ORDER BY - constraint_name;' ) ); - - $json = '[ - { - "parent": "genre", - "child": "book_genre", - "constraint_name": "c_fk_book_genre_genre_id" - }, - { - "parent": "book", - "child": "book_genre", - "constraint_name": "c_fk_book_genre_book_id" - }, - { - "parent": "cover", - "child": "book", - "constraint_name": "c_fk_book_cover_id" - }, - { - "parent": "book", - "child": "page", - "constraint_name": "c_fk_page_book_id" - } - ]'; - - $j1 = json_decode( $j, TRUE ); - - $j2 = json_decode( $json, TRUE ); - - foreach ( $j1 as $jrow ) { - $s = json_encode( $jrow ); - - $found = 0; - - foreach ( $j2 as $k => $j2row ) { - - if ( json_encode( $j2row ) === $s ) { - pass(); - - unset( $j2[$k] ); - - $found = 1; - break; - } - } - - if ( !$found ) fail(); - } - } - - /** - * Test widen for constraint. - * - * @return void - */ - public function testWideningColumnForConstraint() - { - testpack( 'widening column for constraint' ); - - $bean1 = R::dispense( 'project' ); - $bean2 = R::dispense( 'invoice' ); - - $bean3 = R::getRedBean()->dispense( 'invoice_project' ); - - $bean3->project_id = false; - $bean3->invoice_id = true; - - R::store( $bean3 ); - - $cols = R::getColumns( 'invoice_project' ); - - asrt( $cols['project_id'], "int(11) unsigned" ); - asrt( $cols['invoice_id'], "int(11) unsigned" ); - } - - /** - * Test adding of constraints directly by invoking - * the writer method. - * - * @return void - */ - public function testContrain() - { - R::nuke(); - - $sql = ' - CREATE TABLE book ( - id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $sql = ' - CREATE TABLE page ( - id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $sql = ' - CREATE TABLE book_page ( - id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, - book_id INT( 11 ) UNSIGNED NOT NULL, - page_id INT( 11 ) UNSIGNED NOT NULL, - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "book_page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 0 ); - - $writer = R::getWriter(); - - $writer->addFK( 'book_page', 'book', 'book_id', 'id', TRUE ); - $writer->addFK( 'book_page', 'page', 'page_id', 'id', TRUE ); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "book_page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 2 ); - - $writer->addFK( 'book_page', 'book', 'book_id', 'id', TRUE ); - $writer->addFK( 'book_page', 'page', 'page_id', 'id', TRUE ); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "book_page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 2 ); - } - - /** - * Test adding foreign keys. - * - * @return void - */ - public function testAddingForeignKey() - { - R::nuke(); - - $sql = ' - CREATE TABLE book ( - id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $sql = ' - CREATE TABLE page ( - id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, - book_id INT( 11 ) UNSIGNED NOT NULL, - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 0 ); - - $writer = R::getWriter(); - - //Can we add a foreign key with cascade? - $writer->addFK('page', 'book', 'book_id', 'id', TRUE); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 1 ); - - //dont add it twice - $writer->addFK('page', 'book', 'book_id', 'id', TRUE); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 1 ); - - //even if different - $writer->addFK('page', 'book', 'book_id', 'id', FALSE); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" '); - - asrt( (int) $numOfFKS, 1 ); - - //Now add non-dep key - R::nuke(); - - $sql = ' - CREATE TABLE book ( - id INT( 11 ) UNSIGNED NULL AUTO_INCREMENT, - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $sql = ' - CREATE TABLE page ( - id INT( 11 ) UNSIGNED AUTO_INCREMENT, - book_id INT( 11 ) UNSIGNED NULL, - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 0 ); - - //even if different - $writer->addFK('page', 'book', 'book_id', 'id', FALSE); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" AND DELETE_RULE = "CASCADE"'); - - asrt( (int) $numOfFKS, 0 ); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" AND DELETE_RULE = "SET NULL"'); - - asrt( (int) $numOfFKS, 1 ); - - $writer->addFK('page', 'book', 'book_id', 'id', TRUE); - - $numOfFKS = R::getCell(' - SELECT COUNT(*) - FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS - WHERE TABLE_NAME = "page" '); - } - - /** - * Test whether we can manually create indexes. - * - * @return void - */ - public function testAddingIndex() - { - R::nuke(); - - $sql = ' - CREATE TABLE song ( - id INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT, - album_id INT( 11 ) UNSIGNED NOT NULL, - category VARCHAR( 255 ), - PRIMARY KEY ( id ) - ) - ENGINE = InnoDB - '; - - R::exec( $sql ); - - $sql = 'SHOW INDEX FROM song'; - - $indexes = R::getAll( $sql ); - - asrt( count( $indexes ), 1 ); - asrt( $indexes[0]['Table'], 'song' ); - asrt( $indexes[0]['Key_name'], 'PRIMARY' ); - - $writer = R::getWriter(); - - $writer->addIndex('song', 'index1', 'album_id'); - - $indexes = R::getAll( 'SHOW INDEX FROM song' ); - - asrt( count( $indexes ), 2 ); - asrt( $indexes[0]['Table'], 'song' ); - asrt( $indexes[0]['Key_name'], 'PRIMARY' ); - asrt( $indexes[1]['Table'], 'song' ); - asrt( $indexes[1]['Key_name'], 'index1' ); - - //Cant add the same index twice - $writer->addIndex('song', 'index2', 'category'); - - $indexes = R::getAll( 'SHOW INDEX FROM song' ); - - asrt( count( $indexes ), 3 ); - - //Dont fail, just dont - try { - $writer->addIndex('song', 'index3', 'nonexistant'); - pass(); - } catch( \Exception $e ) { - fail(); - } - - asrt( count( $indexes ), 3 ); - - try { - $writer->addIndex('nonexistant', 'index4', 'nonexistant'); - pass(); - } catch( \Exception $e ) { - fail(); - } - - asrt( count( $indexes ), 3 ); - - try { - $writer->addIndex('nonexistant', '', 'nonexistant'); - pass(); - } catch( \Exception $e ) { - fail(); - } - - asrt( count( $indexes ), 3 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Freeze.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Freeze.php deleted file mode 100644 index 7ed09406..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Freeze.php +++ /dev/null @@ -1,150 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $a = new AssociationManager( $toolbox ); - - $post = $redbean->dispense( 'post' ); - - $post->title = 'title'; - - $redbean->store( $post ); - - $page = $redbean->dispense( 'page' ); - - $page->name = 'title'; - - $redbean->store( $page ); - - $page = $redbean->dispense( "page" ); - - $page->name = "John's page"; - - $idpage = $redbean->store( $page ); - - $page2 = $redbean->dispense( "page" ); - - $page2->name = "John's second page"; - - $idpage2 = $redbean->store( $page2 ); - - $a->associate( $page, $page2 ); - - $redbean->freeze( TRUE ); - - $page = $redbean->dispense( "page" ); - - $page->sections = 10; - - $page->name = "half a page"; - - try { - $id = $redbean->store( $page ); - - fail(); - } catch ( SQL $e ) { - pass(); - } - - $post = $redbean->dispense( "post" ); - - $post->title = "existing table"; - - try { - $id = $redbean->store( $post ); - - pass(); - } catch ( SQL $e ) { - fail(); - } - - asrt( in_array( "name", array_keys( $writer->getColumns( "page" ) ) ), TRUE ); - asrt( in_array( "sections", array_keys( $writer->getColumns( "page" ) ) ), FALSE ); - - $newtype = $redbean->dispense( "newtype" ); - - $newtype->property = 1; - - try { - $id = $redbean->store( $newtype ); - - fail(); - } catch ( SQL $e ) { - pass(); - } - - $logger = R::debug( true, 1 ); - - // Now log and make sure no 'describe SQL' happens - $page = $redbean->dispense( "page" ); - - $page->name = "just another page that has been frozen..."; - - $id = $redbean->store( $page ); - - $page = $redbean->load( "page", $id ); - - $page->name = "just a frozen page..."; - - $redbean->store( $page ); - - $page2 = $redbean->dispense( "page" ); - - $page2->name = "an associated frozen page"; - - $a->associate( $page, $page2 ); - - $a->related( $page, "page" ); - - $a->unassociate( $page, $page2 ); - - $a->clearRelations( $page, "page" ); - - $items = $redbean->find( "page", array(), array( "1" ) ); - - $redbean->trash( $page ); - - $redbean->freeze( FALSE ); - - asrt( count( $logger->grep( "SELECT" ) ) > 0, TRUE ); - asrt( count( $logger->grep( "describe" ) ) < 1, TRUE ); - - asrt( is_array( $logger->getLogs() ), TRUE ); - - R::debug( false ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php deleted file mode 100644 index cc93bb52..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Issue411.php +++ /dev/null @@ -1,57 +0,0 @@ -text = 'abcd'; - R::store( $book ); - $columns = R::inspect( 'book' ); - asrt( isset( $columns['text'] ), TRUE ); - asrt( $columns['text'], 'varchar(191)' ); - $book = $book->fresh(); - $book->text = str_repeat( 'x', 190 ); - R::store( $book ); - $columns = R::inspect( 'book' ); - asrt( isset( $columns['text'] ), TRUE ); - asrt( $columns['text'], 'varchar(191)' ); - $book = $book->fresh(); - $book->text = str_repeat( 'x', 191 ); - R::store( $book ); - $columns = R::inspect( 'book' ); - asrt( isset( $columns['text'] ), TRUE ); - asrt( $columns['text'], 'varchar(191)' ); - $book = $book->fresh(); - $book->text = str_repeat( 'x', 192 ); - R::store( $book ); - $columns = R::inspect( 'book' ); - asrt( isset( $columns['text'] ), TRUE ); - asrt( $columns['text'], 'varchar(255)' ); - } -} - diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php deleted file mode 100644 index 102fefdc..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Mix.php +++ /dev/null @@ -1,147 +0,0 @@ -getDatabaseAdapter(); - - $mixer = new SQLHelper( $adapter ); - - $now = $mixer->now(); - - asrt( is_string( $now ), TRUE ); - - asrt( ( strlen( $now ) > 5 ), TRUE ); - - $bean = R::dispense( 'bean' ); - - $bean->field1 = 'a'; - $bean->field2 = 'b'; - - R::store( $bean ); - - $data = $mixer->begin()->select( '*' )->from( 'bean' ) - ->where( ' field1 = ? ' )->put( 'a' )->get(); - - asrt( is_array( $data ), TRUE ); - - $row = array_pop( $data ); - - asrt( is_array( $row ), TRUE ); - - asrt( $row['field1'], 'a' ); - asrt( $row['field2'], 'b' ); - - $row = $mixer->begin()->select( 'field1', 'field2' )->from( 'bean' ) - ->where( ' 1 ' )->limit( '1' )->get( 'row' ); - - asrt( is_array( $row ), TRUE ); - - asrt( $row['field1'], 'a' ); - asrt( $row['field2'], 'b' ); - - $cell = $mixer->begin()->select( 'field1' )->from( 'bean' ) - ->get( 'cell' ); - - asrt( $cell, 'a' ); - - $cell = $mixer->begin()->select_field1_from( 'bean' ) - ->get( 'cell' ); - - asrt( $cell, 'a' ); - - // Now switch back to non-capture mode (issue #142) - $value = $mixer->now(); - - asrt( is_object( $value ), FALSE ); - asrt( is_scalar( $value ), TRUE ); - - asrt( $value > 0, TRUE ); - - $mixer->begin()->select_field1_from( 'bean' ); - - $mixer->clear(); - - $value = $mixer->now(); - - asrt( is_scalar( $value ), TRUE ); - - // Test open and close block commands - $bean = R::dispense( 'bean' ); - - $bean->num = 2; - - R::store( $bean ); - - $value = $mixer->begin() - ->select( 'num' )->from( 'bean' )->where( 'num IN' ) - ->open() - ->addSQL( '2' ) - ->close() - ->get( 'cell' ); - - asrt( ( $value == 2 ), TRUE ); - - // Test nesting - $bean = R::dispense( 'bean' ); - - $bean->num = 2; - - R::store( $bean ); - - $value = $mixer->begin() - ->select( 'num' )->from( 'bean' )->where( 'num IN' ) - ->nest( $mixer->getNew()->begin()->addSQL( ' ( 2 ) ' ) ) - ->get( 'cell' ); - - asrt( ( $value == 2 ), TRUE ); - } - - /** - * Test the __toString method of the SQLHelper. - */ - public function testToString() - { - $toolbox = R::getToolBox(); - $adapter = $toolbox->getDatabaseAdapter(); - $sqlHelper = new SQLHelper( $adapter ); - $sqlHelper->begin() - ->select( '*' ) - ->from( 'table' ) - ->where( 'name = ?' ) - ->put( 'name' ); - $str = (string) $sqlHelper; - asrt( ( strpos( $str, 'query' ) !== false ), true ); - asrt( ( strpos( $str, 'select * from table where name = ?' ) !== false ), true ); - asrt( ( strpos( $str, '=> Array') !== false ), true ); - asrt( ( strpos( $str, 'params') !== false ), true ); - } -} - diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Parambind.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Parambind.php deleted file mode 100644 index 82a95abb..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Parambind.php +++ /dev/null @@ -1,152 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - R::getDatabaseAdapter()->getDatabase()->setUseStringOnlyBinding( TRUE ); - - try { - R::getAll( "select * from job limit ? ", array( 1 ) ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - try { - R::getAll( "select * from job limit :l ", array( ":l" => 1 ) ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - try { - R::exec( "select * from job limit ? ", array( 1 ) ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - try { - R::exec( "select * from job limit :l ", array( ":l" => 1 ) ); - - fail(); - } catch (\Exception $e ) { - pass(); - } - - R::getDatabaseAdapter()->getDatabase()->setUseStringOnlyBinding( FALSE ); - - try { - R::getAll( "select * from job limit ? ", array( 1 ) ); - - pass(); - } catch (\Exception $e ) { - print_r( $e ); - - fail(); - } - - try { - R::getAll( "select * from job limit :l ", array( ":l" => 1 ) ); - - pass(); - } catch (\Exception $e ) { - fail(); - } - - try { - R::exec( "select * from job limit ? ", array( 1 ) ); - - pass(); - } catch (\Exception $e ) { - fail(); - } - - try { - R::exec( "select * from job limit :l ", array( ":l" => 1 ) ); - - pass(); - } catch (\Exception $e ) { - fail(); - } - - testpack( "Test findOrDispense" ); - - $person = R::findOrDispense( "person", " job = ? ", array( "developer" ) ); - - asrt( ( count( $person ) > 0 ), TRUE ); - - $person = R::findOrDispense( "person", " job = ? ", array( "musician" ) ); - - asrt( ( count( $person ) > 0 ), TRUE ); - - $musician = array_pop( $person ); - - asrt( intval( $musician->id ), 0 ); - - try { - $adapter->exec( "an invalid query" ); - - fail(); - } catch ( SQL $e ) { - pass(); - } - - asrt( (int) $adapter->getCell( "SELECT 123" ), 123 ); - asrt( (int) $adapter->getCell( "SELECT ?", array( "987" ) ), 987 ); - asrt( (int) $adapter->getCell( "SELECT ?+?", array( "987", "2" ) ), 989 ); - - asrt( (int) $adapter->getCell( "SELECT :numberOne+:numberTwo", array( - ":numberOne" => 42, ":numberTwo" => 50 ) ), 92 ); - - $pair = $adapter->getAssoc( "SELECT 'thekey','thevalue' " ); - - asrt( is_array( $pair ), TRUE ); - asrt( count( $pair ), 1 ); - - asrt( isset( $pair["thekey"] ), TRUE ); - - asrt( $pair["thekey"], "thevalue" ); - - testpack( 'Test whether we can properly bind and receive NULL values' ); - - asrt( $adapter->getCell( 'SELECT :nil ', array( ':nil' => 'NULL' ) ), 'NULL' ); - asrt( $adapter->getCell( 'SELECT :nil ', array( ':nil' => NULL ) ), NULL ); - - asrt( $adapter->getCell( 'SELECT ? ', array( 'NULL' ) ), 'NULL' ); - asrt( $adapter->getCell( 'SELECT ? ', array( NULL ) ), NULL ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Preexist.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Preexist.php deleted file mode 100644 index ba077a96..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Preexist.php +++ /dev/null @@ -1,74 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $a = new AssociationManager( $toolbox ); - - $page = $redbean->dispense( "page" ); - - $page->name = "John's page"; - - $idpage = $redbean->store( $page ); - - $page2 = $redbean->dispense( "page" ); - - $page2->name = "John's second page"; - - $idpage2 = $redbean->store( $page2 ); - - $a->associate( $page, $page2 ); - - $adapter->exec( "ALTER TABLE " . $writer->esc( 'page' ) . " - CHANGE " . $writer->esc( 'name' ) . " " . $writer->esc( 'name' ) . " - VARCHAR( 254 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL " ); - - $page = $redbean->dispense( "page" ); - - $page->name = "Just Another Page In a Table"; - - $cols = $writer->getColumns( "page" ); - - asrt( $cols["name"], "varchar(254)" ); - - //$pdo->SethMode(1); - - $redbean->store( $page ); - - pass(); // No crash? - - $cols = $writer->getColumns( "page" ); - - asrt( $cols["name"], "varchar(254)" ); //must still be same - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php deleted file mode 100644 index cbf2db08..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Setget.php +++ /dev/null @@ -1,152 +0,0 @@ -id, $book1ID ); - asrt( $book1->title, 'book 1' ); - - $book2 = R::load( 'book', $book2ID ); - - asrt( $book2->id, $book2ID ); - asrt( $book2->title, 'book 2' ); - - asrt( count( $book1->ownPage ), 2 ); - asrt( count( $book1->fresh()->with( 'LIMIT 1' )->ownPage ), 1 ); - asrt( count( $book1->fresh()->withCondition( ' title = ? ', array('page 2 of book 1'))->ownPage ), 1 ); - - asrt( count($book2->ownPage), 1 ); - asrt( $book2->fresh()->countOwn( 'page' ), 1 ); - - $page1 = R::load( 'page', $page1ID ); - asrt( count( $page1->sharedPage ), 0 ); - asrt( $page1->fetchAs( 'book' )->magazine->id, $book2ID ); - - $page2 = R::load( 'page', $page2ID ); - asrt( count($page2->sharedPage), 1 ); - asrt( $page2->fresh()->countShared( 'page' ), 1 ); - - $page3 = R::findOne( 'page', ' title = ? ', array( 'page 1 of book 2' ) ); - asrt( $page3->id, $page3ID ); - asrt( $page3->book->id, $book2ID ); - } - - /** - * Test Full fluid UUID support. - * - */ - public function testFullSupport() - { - R::nuke(); - //Rewire objects to support UUIDs. - $oldToolBox = R::getToolBox(); - $oldAdapter = $oldToolBox->getDatabaseAdapter(); - $uuidWriter = new \UUIDWriterMySQL( $oldAdapter ); - $newRedBean = new OODB( $uuidWriter ); - $newToolBox = new ToolBox( $newRedBean, $oldAdapter, $uuidWriter ); - R::configureFacadeWithToolbox( $newToolBox ); - - list( $mansion, $rooms, $ghosts, $key ) = R::dispenseAll( 'mansion,room*3,ghost*4,key' ); - $mansion->name = 'Haunted Mansion'; - $mansion->xownRoomList = $rooms; - $rooms[0]->name = 'Green Room'; - $rooms[1]->name = 'Red Room'; - $rooms[2]->name = 'Blue Room'; - $ghosts[0]->name = 'zero'; - $ghosts[1]->name = 'one'; - $ghosts[2]->name = 'two'; - $ghosts[3]->name = 'three'; - $rooms[0]->sharedGhostList = array( $ghosts[0], $ghosts[1] ); - $rooms[1]->sharedGhostList = array( $ghosts[0], $ghosts[2] ); - $rooms[2]->sharedGhostList = array( $ghosts[1], $ghosts[3], $ghosts[2] ); - $rooms[2]->xownKey = array( $key ); - //Can we store a bean hierachy with UUIDs? - $id = R::store( $mansion ); - asrt( is_string( $id ), TRUE ); - asrt( strlen( $id ), 36 ); - $haunted = R::load( 'mansion', $id ); - asrt( $haunted->name, 'Haunted Mansion' ); - asrt( is_string( $haunted->id ), TRUE ); - asrt( strlen( $haunted->id ), 36 ); - asrt( is_array( $haunted->xownRoomList ), TRUE ); - asrt( count( $haunted->ownRoom ), 3 ); - $rooms = $haunted->xownRoomList; - - //Do some counting... - $greenRoom = NULL; - foreach( $rooms as $room ) { - if ( $room->name === 'Green Room' ) { - $greenRoom = $room; - break; - } - } - asrt( !is_null( $greenRoom ), TRUE ); - asrt( is_array( $greenRoom->with(' ORDER BY id ')->sharedGhostList ), TRUE ); - asrt( count( $greenRoom->sharedGhostList ), 2 ); - $names = array(); - foreach( $greenRoom->sharedGhost as $ghost ) $names[] = $ghost->name; - sort($names); - $names = implode(',', $names); - asrt($names, 'one,zero'); - $rooms = $haunted->xownRoomList; - $blueRoom = NULL; - foreach( $rooms as $room ) { - if ( $room->name === 'Blue Room' ) { - $blueRoom = $room; - break; - } - } - asrt( !is_null( $blueRoom ), TRUE ); - asrt( is_array( $blueRoom->sharedGhostList ), TRUE ); - asrt( count( $blueRoom->sharedGhostList ), 3 ); - $names = array(); - foreach( $blueRoom->sharedGhost as $ghost ) $names[] = $ghost->name; - sort($names); - $names = implode(',', $names); - asrt($names, 'one,three,two'); - $rooms = $haunted->xownRoomList; - $redRoom = NULL; - foreach( $rooms as $room ) { - if ( $room->name === 'Red Room' ) { - $redRoom = $room; break; - } - } - $names = array(); - foreach( $redRoom->sharedGhost as $ghost ) $names[] = $ghost->name; - sort($names); - $names = implode(',', $names); - asrt($names, 'two,zero'); - asrt( !is_null( $redRoom ), TRUE ); - asrt( is_array( $redRoom->sharedGhostList ), TRUE ); - asrt( count( $redRoom->sharedGhostList ), 2 ); - - //Can we repaint a room? - $redRoom->name = 'Yellow Room'; - $id = R::store($redRoom); - $yellowRoom = R::load( 'room', $id ); - asrt( $yellowRoom->name, 'Yellow Room'); - asrt( !is_null( $yellowRoom ), TRUE ); - asrt( is_array( $yellowRoom->sharedGhostList ), TRUE ); - asrt( count( $yellowRoom->sharedGhostList ), 2 ); - - //Can we throw one ghost out? - array_pop( $yellowRoom->sharedGhost ); - R::store( $yellowRoom ); - $yellowRoom = $yellowRoom->fresh(); - asrt( $yellowRoom->name, 'Yellow Room'); - asrt( !is_null( $yellowRoom ), TRUE ); - asrt( is_array( $yellowRoom->sharedGhostList ), TRUE ); - asrt( count( $yellowRoom->sharedGhostList ), 1 ); - - //can we remove one of the rooms? - asrt( R::count('key'), 1); - $list = $mansion->withCondition(' `name` = ? ', array('Blue Room'))->xownRoomList; - $room = reset($list); - unset($mansion->xownRoomList[$room->id]); - R::store($mansion); - asrt(R::count('room'), 2); - - //and what about its dependent beans? - asrt(R::count('key'), 0); - asrt(R::count('ghost_room'), 3); - - //and can we find ghosts? - $ghosts = R::find('ghost'); - asrt(count($ghosts), 4); - $ghosts = R::findAll('ghost', 'ORDER BY id'); - asrt(count($ghosts), 4); - $ghosts = R::findAll('ghost', 'ORDER BY id LIMIT 2'); - asrt(count($ghosts), 2); - $ghostZero = R::findOne('ghost', ' `name` = ? ', array( 'zero' ) ); - asrt( ($ghostZero instanceof OODBBean), TRUE ); - - //can we create link properties on existing tables? - $blackRoom = R::dispense( 'room' ); - $blackRoom->name = 'Black Room'; - $ghostZero->link('ghost_room', array('mood'=>'grumpy'))->room = $blackRoom; - R::store($ghostZero); - $ghostZero = $ghostZero->fresh(); - $list = $ghostZero->sharedRoomList; - asrt(count($list), 3); - $ghostZero = $ghostZero->fresh(); - $list = $ghostZero->withCondition(' ghost_room.mood = ? ', array('grumpy'))->sharedRoomList; - asrt(count($list), 1); - - //can we load a batch? - $ids = R::getCol('SELECT id FROM ghost'); - $ghosts = R::batch('ghost', $ids); - asrt(count($ghosts), 4); - - //can we do an aggregation? - $ghosts = $greenRoom->aggr('ownGhostRoom', 'ghost', 'ghost'); - asrt(count($ghosts), 2); - - //can we duplicate the mansion? - asrt(R::count('mansion'), 1); - asrt(R::count('room'), 3); - asrt(R::count('ghost'), 4); - $copy = R::dup($mansion); - R::store($copy); - asrt(R::count('mansion'), 2); - asrt(R::count('room'), 5); //black room does not belong to mansion 1 - asrt(R::count('ghost'), 4); - - //can we do some counting using the list? - asrt( $copy->countOwn('room'), 2); - $rooms = $copy->withCondition(' `name` = ? ', array('Green Room'))->xownRoomList; - $room = reset($rooms); - asrt($room->countShared('ghost'), 2); - - //Finally restore old toolbox - R::configureFacadeWithToolbox( $oldToolBox ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php deleted file mode 100644 index e1f2c82b..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Mysql/Writer.php +++ /dev/null @@ -1,662 +0,0 @@ -point = 'POINT(14 6)'; - R::store($location); - $columns = R::inspect( 'location' ); - asrt( $columns['point'], 'point' ); - $location = $location->fresh(); - asrt( $location->point, 'POINT(14 6)' ); - R::nuke(); - $location = R::dispense( 'location' ); - $location->point = 'LINESTRING(0 0,1 1,2 2)'; - R::store($location); - $columns = R::inspect( 'location' ); - asrt( $columns['point'], 'linestring' ); - $location->bustcache = 2; - R::store($location); - $location = $location->fresh(); - asrt( $location->point, 'LINESTRING(0 0,1 1,2 2)' ); - R::nuke(); - $location = R::dispense( 'location' ); - $location->point = 'POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))'; - R::store($location); - $columns = R::inspect( 'location' ); - asrt( $columns['point'], 'polygon' ); - $location->bustcache = 4; - R::store($location); - $location = $location->fresh(); - asrt( $location->point, 'POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))' ); - R::bindFunc( 'read', 'location.point', NULL ); - $location->bustcache = 1; - R::store($location); - $location = $location->fresh(); - asrt( ( $location->point === 'POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7,5 5))' ), FALSE ); - $filters = AQueryWriter::getSQLFilters(); - asrt( is_array( $filters ), TRUE ); - asrt( count( $filters ), 2 ); - asrt( isset( $filters[ QueryWriter::C_SQLFILTER_READ] ), TRUE ); - asrt( isset( $filters[ QueryWriter::C_SQLFILTER_WRITE] ), TRUE ); - R::bindFunc( 'read', 'place.point', 'asText' ); - R::bindFunc( 'write', 'place.point', 'GeomFromText' ); - R::bindFunc( 'read', 'place.line', 'asText' ); - R::bindFunc( 'write', 'place.line', 'GeomFromText' ); - R::nuke(); - $place = R::dispense( 'place' ); - $place->point = 'POINT(13.2 666.6)'; - $place->line = 'LINESTRING(9.2 0,3 1.33)'; - R::store( $place ); - $columns = R::inspect( 'place' ); - asrt( $columns['point'], 'point' ); - asrt( $columns['line'], 'linestring' ); - $place = R::findOne('place'); - asrt( $place->point, 'POINT(13.2 666.6)' ); - asrt( $place->line, 'LINESTRING(9.2 0,3 1.33)' ); - R::bindFunc( 'read', 'place.point', NULL ); - R::bindFunc( 'write', 'place.point', NULL ); - R::bindFunc( 'read', 'place.line', NULL ); - R::bindFunc( 'write', 'place.line', NULL ); - } - - /** - * Test scanning and coding of values. - * - * @return void - */ - public function testScanningAndCoding() - { - $toolbox = R::getToolBox(); - $adapter = $toolbox->getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $a = new AssociationManager( $toolbox ); - - $adapter->exec( "DROP TABLE IF EXISTS testtable" ); - - asrt( in_array( "testtable", $adapter->getCol( "show tables" ) ), FALSE ); - - $writer->createTable( "testtable" ); - - asrt( in_array( "testtable", $adapter->getCol( "show tables" ) ), TRUE ); - - asrt( count( array_diff( $writer->getTables(), $adapter->getCol( "show tables" ) ) ), 0 ); - asrt( count( array_keys( $writer->getColumns( "testtable" ) ) ), 1 ); - - asrt( in_array( "id", array_keys( $writer->getColumns( "testtable" ) ) ), TRUE ); - asrt( in_array( "c1", array_keys( $writer->getColumns( "testtable" ) ) ), FALSE ); - - $writer->addColumn( "testtable", "c1", MySQL::C_DATATYPE_UINT32 ); - - asrt( count( array_keys( $writer->getColumns( "testtable" ) ) ), 2 ); - - asrt( in_array( "c1", array_keys( $writer->getColumns( "testtable" ) ) ), TRUE ); - - foreach ( $writer->sqltype_typeno as $key => $type ) { - if ( $type < 100 ) { - asrt( $writer->code( $key, TRUE ), $type ); - } else { - asrt( $writer->code( $key, TRUE ), MySQL::C_DATATYPE_SPECIFIED ); - } - } - - asrt( $writer->code( MySQL::C_DATATYPE_SPECIAL_DATETIME ), MySQL::C_DATATYPE_SPECIFIED ); - - asrt( $writer->code( "unknown" ), MySQL::C_DATATYPE_SPECIFIED ); - - asrt( $writer->scanType( FALSE ), MySQL::C_DATATYPE_BOOL ); - asrt( $writer->scanType( TRUE ), MySQL::C_DATATYPE_BOOL ); - asrt( $writer->scanType( INF ), MySQL::C_DATATYPE_TEXT7 ); - - asrt( $writer->scanType( NULL ), MySQL::C_DATATYPE_BOOL ); - - asrt( $writer->scanType( 2 ), MySQL::C_DATATYPE_UINT32 ); - asrt( $writer->scanType( 255 ), MySQL::C_DATATYPE_UINT32 ); //no more uint8 - asrt( $writer->scanType( 256 ), MySQL::C_DATATYPE_UINT32 ); - - asrt( $writer->scanType( -1 ), MySQL::C_DATATYPE_DOUBLE ); - asrt( $writer->scanType( 1.5 ), MySQL::C_DATATYPE_DOUBLE ); - - asrt( $writer->scanType( "abc" ), MySQL::C_DATATYPE_TEXT7 ); - - asrt( $writer->scanType( str_repeat( 'abcd', 100000 ) ), MySQL::C_DATATYPE_TEXT32 ); - - asrt( $writer->scanType( "2001-10-10", TRUE ), MySQL::C_DATATYPE_SPECIAL_DATE ); - - asrt( $writer->scanType( "2001-10-10 10:00:00", TRUE ), MySQL::C_DATATYPE_SPECIAL_DATETIME ); - - asrt( $writer->scanType( "2001-10-10" ), MySQL::C_DATATYPE_TEXT7 ); - - asrt( $writer->scanType( "2001-10-10 10:00:00" ), MySQL::C_DATATYPE_TEXT7 ); - - asrt( $writer->scanType( "1.23", TRUE ), MySQL::C_DATATYPE_SPECIAL_MONEY ); - asrt( $writer->scanType( "12.23", TRUE ), MySQL::C_DATATYPE_SPECIAL_MONEY ); - asrt( $writer->scanType( "124.23", TRUE ), MySQL::C_DATATYPE_SPECIAL_MONEY ); - - asrt( $writer->scanType( str_repeat( "lorem ipsum", 100 ) ), MySQL::C_DATATYPE_TEXT16 ); - - $writer->widenColumn( "testtable", "c1", MySQL::C_DATATYPE_UINT32 ); - - $writer->addColumn( "testtable", "special", MySQL::C_DATATYPE_SPECIAL_DATE ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols['special'], TRUE ), MySQL::C_DATATYPE_SPECIAL_DATE ); - - asrt( $writer->code( $cols['special'], FALSE ), MySQL::C_DATATYPE_SPECIFIED ); - - $writer->addColumn( "testtable", "special2", MySQL::C_DATATYPE_SPECIAL_DATETIME ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols['special2'], TRUE ), MySQL::C_DATATYPE_SPECIAL_DATETIME ); - - asrt( $writer->code( $cols['special'], FALSE ), MySQL::C_DATATYPE_SPECIFIED ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols["c1"] ), MySQL::C_DATATYPE_UINT32 ); - - $writer->widenColumn( "testtable", "c1", MySQL::C_DATATYPE_DOUBLE ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols["c1"] ), MySQL::C_DATATYPE_DOUBLE ); - - $writer->widenColumn( "testtable", "c1", MySQL::C_DATATYPE_TEXT7 ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols["c1"] ), MySQL::C_DATATYPE_TEXT7 ); - - $writer->widenColumn( "testtable", "c1", MySQL::C_DATATYPE_TEXT8 ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols["c1"] ), MySQL::C_DATATYPE_TEXT8 ); - - $id = $writer->updateRecord( "testtable", array( array( "property" => "c1", "value" => "lorem ipsum" ) ) ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( $row[0]["c1"], "lorem ipsum" ); - - $writer->updateRecord( "testtable", array( array( "property" => "c1", "value" => "ipsum lorem" ) ), $id ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( $row[0]["c1"], "ipsum lorem" ); - - $writer->deleteRecord( "testtable", array( "id" => array( $id ) ) ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( empty( $row ), TRUE ); - - $writer->addColumn( "testtable", "c2", MySQL::C_DATATYPE_UINT32 ); - } - - /** - * (FALSE should be stored as 0 not as '') - * - * @return voids - */ - public function testZeroIssue() - { - testpack( "Zero issue" ); - - $toolbox = R::getToolBox(); - $redbean = $toolbox->getRedBean(); - $adapter = $toolbox->getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $pdo = $adapter->getDatabase(); - - $pdo->Execute( "DROP TABLE IF EXISTS `zero`" ); - - $bean = $redbean->dispense( "zero" ); - - $bean->zero = FALSE; - $bean->title = "bla"; - - $redbean->store( $bean ); - - asrt( count( $redbean->find( "zero", array(), " zero = 0 " ) ), 1 ); - - R::store( R::dispense( 'hack' ) ); - - testpack( "Test RedBean Security - bean interface " ); - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - $bean = $redbean->load( "page", "13; drop table hack" ); - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - try { - $bean = $redbean->load( "page where 1; drop table hack", 1 ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - $bean = $redbean->dispense( "page" ); - - $evil = "; drop table hack"; - - $bean->id = $evil; - - try { - $redbean->store( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - unset( $bean->id ); - - $bean->name = "\"" . $evil; - - try { - $redbean->store( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - $bean->name = "'" . $evil; - - try { - $redbean->store( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - $bean->$evil = 1; - - try { - $redbean->store( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - unset( $bean->$evil ); - - $bean->id = 1; - $bean->name = "\"" . $evil; - - try { - $redbean->store( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - $bean->name = "'" . $evil; - - try { - $redbean->store( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - $bean->$evil = 1; - - try { - $redbean->store( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - try { - $redbean->trash( $bean ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - try { - $redbean->find( "::", array(), "" ); - } catch (\Exception $e ) { - pass(); - } - - $adapter->exec( "drop table if exists sometable" ); - - testpack( "Test RedBean Security - query writer" ); - - try { - $writer->createTable( "sometable` ( `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT , PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; drop table hack; --" ); - } catch (\Exception $e ) { - } - - asrt( in_array( "hack", $adapter->getCol( "show tables" ) ), TRUE ); - - testpack( "Test ANSI92 issue in clearrelations" ); - - $pdo->Execute( "DROP TABLE IF EXISTS book_group" ); - $pdo->Execute( "DROP TABLE IF EXISTS author_book" ); - $pdo->Execute( "DROP TABLE IF EXISTS book" ); - $pdo->Execute( "DROP TABLE IF EXISTS author" ); - - $redbean = $toolbox->getRedBean(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - set1toNAssoc( $a, $book, $author1 ); - set1toNAssoc( $a, $book, $author2 ); - - pass(); - - $pdo->Execute( "DROP TABLE IF EXISTS book_group" ); - $pdo->Execute( "DROP TABLE IF EXISTS book_author" ); - $pdo->Execute( "DROP TABLE IF EXISTS author_book" ); - $pdo->Execute( "DROP TABLE IF EXISTS book" ); - $pdo->Execute( "DROP TABLE IF EXISTS author" ); - - $redbean = $toolbox->getRedBean(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - $a->associate( $book, $author1 ); - $a->associate( $book, $author2 ); - - pass(); - - testpack( "Test Association Issue Group keyword (Issues 9 and 10)" ); - - $pdo->Execute( "DROP TABLE IF EXISTS `book_group`" ); - $pdo->Execute( "DROP TABLE IF EXISTS `group`" ); - - $group = $redbean->dispense( "group" ); - - $group->name = "mygroup"; - - $redbean->store( $group ); - - try { - $a->associate( $group, $book ); - - pass(); - } catch ( SQL $e ) { - fail(); - } - - // Test issue SQL error 23000 - try { - $a->associate( $group, $book ); - - pass(); - } catch ( SQL $e ) { - fail(); - } - - asrt( (int) $adapter->getCell( "select count(*) from book_group" ), 1 ); //just 1 rec! - - $pdo->Execute( "DROP TABLE IF EXISTS book_group" ); - $pdo->Execute( "DROP TABLE IF EXISTS author_book" ); - $pdo->Execute( "DROP TABLE IF EXISTS book" ); - $pdo->Execute( "DROP TABLE IF EXISTS author" ); - - $redbean = $toolbox->getRedBean(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - $a->unassociate( $book, $author1 ); - $a->unassociate( $book, $author2 ); - - pass(); - - $redbean->trash( $redbean->dispense( "bla" ) ); - - pass(); - - $bean = $redbean->dispense( "bla" ); - - $bean->name = 1; - $bean->id = 2; - - $redbean->trash( $bean ); - - pass(); - } - - /** - * Test special data types. - * - * @return void - */ - public function testTypes() - { - testpack( 'Special data types' ); - - $bean = R::dispense( 'bean' ); - - $bean->date = 'someday'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'varchar(191)' ); - - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'varchar(191)' ); - } - - /** - * Test date types. - * - * @return void - */ - public function testTypesDates() - { - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'date' ); - } - - /** - * Test money types. - * - * @return void - */ - public function testTypesMon() - { - $bean = R::dispense( 'bean' ); - - $bean->amount = '22.99'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['amount'], 'decimal(10,2)' ); - - R::nuke(); - - $bean = R::dispense( 'bean' ); - - $bean->amount = '-22.99'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['amount'], 'decimal(10,2)' ); - } - - - /** - * Date-time - * - * @return void - */ - public function testTypesDateTimes() - { - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10 10:00:00'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'datetime' ); - - $bean = R::dispense( 'bean' ); - - try { - $bean = R::dispense( 'bean' ); - - $bean->title = 123; - - $bean->setMeta( 'cast.title', 'invalid' ); - - R::store( $bean ); - - fail(); - } catch ( RedException $e ) { - pass(); - } catch (\Exception $e ) { - fail(); - } - - $bean = R::dispense( 'bean' ); - - $bean->title = 123; - - $bean->setMeta( 'cast.title', 'text' ); - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['title'], 'text' ); - - R::nuke(); - - $bean = R::dispense( 'bean' ); - - $bean->title = 123; - - $bean->setMeta( 'cast.title', 'string' ); - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['title'], 'varchar(191)' ); - } - - /** - * Stored and reloads spatial data to see if the - * value is preserved correctly. - * - * @return void - */ - protected function setGetSpatial( $data ) - { - R::nuke(); - - $place = R::dispense( 'place' ); - - $place->location = $data; - - R::store( $place ); - - asrt( R::getCell( 'SELECT AsText(location) FROM place LIMIT 1' ), $data ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres.php deleted file mode 100644 index e09077fe..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres.php +++ /dev/null @@ -1,28 +0,0 @@ -id, $book1ID ); - asrt( $book1->title, 'book 1' ); - - $book2 = R::load( 'book', $book2ID ); - - asrt( $book2->id, $book2ID ); - asrt( $book2->title, 'book 2' ); - - asrt( count( $book1->ownPage ), 2 ); - asrt( count( $book1->fresh()->with( 'LIMIT 1' )->ownPage ), 1 ); - asrt( count( $book1->fresh()->withCondition( ' title = ? ', array('page 2 of book 1'))->ownPage ), 1 ); - - asrt( count($book2->ownPage), 1 ); - asrt( $book2->fresh()->countOwn( 'page' ), 1 ); - - $page1 = R::load( 'page', $page1ID ); - asrt( count( $page1->sharedPage ), 0 ); - asrt( $page1->fetchAs( 'book' )->magazine->id, $book2ID ); - - $page2 = R::load( 'page', $page2ID ); - asrt( count($page2->sharedPage), 1 ); - asrt( $page2->fresh()->countShared( 'page' ), 1 ); - - $page3 = R::findOne( 'page', ' title = ? ', array( 'page 1 of book 2' ) ); - asrt( $page3->id, $page3ID ); - asrt( $page3->book->id, $book2ID ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Foreignkeys.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Foreignkeys.php deleted file mode 100644 index 00d291e0..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Foreignkeys.php +++ /dev/null @@ -1,374 +0,0 @@ -addFK( 'a', 'b', 'c', 'd' ); //must fail - - pass(); //survive without exception - - asrt( $a, FALSE ); //must return false - - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $cover = R::dispense( 'cover' ); - - list( $g1, $g2 ) = R::dispense( 'genre', 2 ); - - $g1->name = '1'; - $g2->name = '2'; - - $book->ownPage = array( $page ); - $book->cover = $cover; - $book->sharedGenre = array( $g1, $g2 ); - - R::store( $book ); - - $sql = "SELECT - tc.constraint_name, tc.table_name, kcu.column_name, - ccu.table_name AS foreign_table_name, - ccu.column_name AS foreign_column_name - FROM - information_schema.table_constraints AS tc - JOIN information_schema.key_column_usage AS kcu ON tc.constraint_name = kcu.constraint_name - JOIN information_schema.constraint_column_usage AS ccu ON ccu.constraint_name = tc.constraint_name - WHERE constraint_type = 'FOREIGN KEY' AND (tc.table_name='book' OR tc.table_name='book_genre' OR tc.table_name='page');"; - - $fks = R::getAll( $sql ); - - $json = '[ - { - "constraint_name": "book_cover_id_fkey", - "table_name": "book", - "column_name": "cover_id", - "foreign_table_name": "cover", - "foreign_column_name": "id" - }, - { - "constraint_name": "page_book_id_fkey", - "table_name": "page", - "column_name": "book_id", - "foreign_table_name": "book", - "foreign_column_name": "id" - }, - { - "constraint_name": "book_genre_genre_id_fkey", - "table_name": "book_genre", - "column_name": "genre_id", - "foreign_table_name": "genre", - "foreign_column_name": "id" - }, - { - "constraint_name": "book_genre_book_id_fkey", - "table_name": "book_genre", - "column_name": "book_id", - "foreign_table_name": "book", - "foreign_column_name": "id" - } - ]'; - - $j = json_encode( $fks ); - $j1 = json_decode( $j, TRUE ); - $j2 = json_decode( $json, TRUE ); - - foreach ( $j1 as $jrow ) { - $s = json_encode( $jrow ); - - $found = 0; - foreach ( $j2 as $k => $j2row ) { - if ( json_encode( $j2row ) === $s ) { - pass(); - - unset( $j2[$k] ); - - $found = 1; - } - } - - if ( !$found ) fail(); - } - } - - /** - * Test constraint function directly in Writer. - * - * @return void - */ - public function testConstraint() - { - R::nuke(); - - $database = R::getCell('SELECT current_database()'); - - $sql = 'CREATE TABLE book (id SERIAL PRIMARY KEY)'; - - R::exec( $sql ); - - $sql = 'CREATE TABLE page (id SERIAL PRIMARY KEY)'; - - R::exec( $sql ); - - $sql = 'CREATE TABLE book_page ( - id SERIAL PRIMARY KEY, - book_id INTEGER, - page_id INTEGER - )'; - - R::exec( $sql ); - - $writer = R::getWriter(); - - $sql = " - SELECT - COUNT(*) - FROM information_schema.key_column_usage AS k - LEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name - WHERE k.table_catalog = '$database' - AND k.table_schema = 'public' - AND k.table_name = 'book_page' - AND c.constraint_type = 'FOREIGN KEY'"; - - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 0 ); - - $writer->addFK( 'book_page', 'book', 'book_id', 'id', TRUE ); - $writer->addFK( 'book_page', 'page', 'page_id', 'id', TRUE ); - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 2 ); - - $writer->addFK( 'book_page', 'book', 'book_id', 'id', TRUE ); - $writer->addFK( 'book_page', 'page', 'page_id', 'id', TRUE ); - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 2 ); - } - - /** - * Test adding foreign keys. - * - * @return void - */ - public function testAddingForeignKey() - { - R::nuke(); - - $database = R::getCell('SELECT current_database()'); - - $sql = 'CREATE TABLE book ( - id SERIAL PRIMARY KEY - )'; - - R::exec( $sql ); - - $sql = 'CREATE TABLE page ( - id SERIAL PRIMARY KEY, - book_id INTEGER - )'; - - R::exec( $sql ); - - $writer = R::getWriter(); - - $sql = " - SELECT - COUNT(*) - FROM information_schema.key_column_usage AS k - LEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name - WHERE k.table_catalog = '$database' - AND k.table_schema = 'public' - AND k.table_name = 'page' - AND c.constraint_type = 'FOREIGN KEY'"; - - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 0 ); - - $writer->addFK('page', 'page', 'book_id', 'id', TRUE); - - $sql = " - SELECT - COUNT(*) - FROM information_schema.key_column_usage AS k - LEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name - WHERE k.table_catalog = '$database' - AND k.table_schema = 'public' - AND k.table_name = 'page' - AND c.constraint_type = 'FOREIGN KEY'"; - - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 1 ); - - //dont add twice - $writer->addFK('page', 'page', 'book_id', 'id', TRUE); - - $sql = " - SELECT - COUNT(*) - FROM information_schema.key_column_usage AS k - LEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name - WHERE k.table_catalog = '$database' - AND k.table_schema = 'public' - AND k.table_name = 'page' - AND c.constraint_type = 'FOREIGN KEY'"; - - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 1 ); - - //even if it is different - $writer->addFK('page', 'page', 'book_id', 'id', FALSE); - - $sql = " - SELECT - COUNT(*) - FROM information_schema.key_column_usage AS k - LEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name - WHERE k.table_catalog = '$database' - AND k.table_schema = 'public' - AND k.table_name = 'page' - AND c.constraint_type = 'FOREIGN KEY'"; - - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 1 ); - - R::nuke(); - - $sql = 'CREATE TABLE book ( - id SERIAL PRIMARY KEY - )'; - - R::exec( $sql ); - - $sql = 'CREATE TABLE page ( - id SERIAL PRIMARY KEY, - book_id INTEGER - )'; - - R::exec( $sql ); - - $writer = R::getWriter(); - - $sql = " - SELECT - COUNT(*) - FROM information_schema.key_column_usage AS k - LEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name - WHERE k.table_catalog = '$database' - AND k.table_schema = 'public' - AND k.table_name = 'page' - AND c.constraint_type = 'FOREIGN KEY'"; - - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 0 ); - - $writer->addFK('page', 'page', 'book_id', 'id', FALSE); - - $sql = " - SELECT - COUNT(*) - FROM information_schema.key_column_usage AS k - LEFT JOIN information_schema.table_constraints AS c ON c.constraint_name = k.constraint_name - WHERE k.table_catalog = '$database' - AND k.table_schema = 'public' - AND k.table_name = 'page' - AND c.constraint_type = 'FOREIGN KEY'"; - - $numFKS = R::getCell( $sql ); - - asrt( (int) $numFKS, 1 ); - - } - - /** - * Test whether we can manually create indexes. - * - * @return void - */ - public function testAddingIndex() - { - R::nuke(); - - $sql = 'CREATE TABLE song ( - id SERIAL PRIMARY KEY, - album_id INTEGER, - category VARCHAR(255) - )'; - - R::exec( $sql ); - - $indexes = R::getAll( " SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' "); - - asrt( count( $indexes ), 1 ); - - $writer = R::getWriter(); - - $writer->addIndex( 'song', 'index1', 'album_id' ); - - $indexes = R::getAll( " SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' "); - - asrt( count( $indexes ), 2 ); - - //Cant add the same index twice - $writer->addIndex( 'song', 'index1', 'album_id' ); - - $indexes = R::getAll( " SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' "); - - asrt( count( $indexes ), 2 ); - - $writer->addIndex( 'song', 'index2', 'category' ); - - $indexes = R::getAll( " SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' "); - - asrt( count( $indexes ), 3 ); - - //Dont fail, just dont - try { - $writer->addIndex( 'song', 'index3', 'nonexistant' ); - pass(); - } catch( \Exception $e ) { - fail(); - } - - $indexes = R::getAll( " SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' "); - asrt( count( $indexes ), 3 ); - - try { - $writer->addIndex( 'nonexistant', 'index4', 'nonexistant' ); - pass(); - } catch( \Exception $e ) { - fail(); - } - - $indexes = R::getAll( " SELECT * FROM pg_indexes WHERE schemaname = 'public' AND tablename = 'song' "); - asrt( count( $indexes ), 3 ); - - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Parambind.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Parambind.php deleted file mode 100644 index b70ac781..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Parambind.php +++ /dev/null @@ -1,55 +0,0 @@ -name = "abc"; - $page->number = 2; - - R::store( $page ); - - R::exec( "insert into page (name) values(:name) ", array( ":name" => "my name" ) ); - R::exec( "insert into page (number) values(:one) ", array( ":one" => 1 ) ); - R::exec( "insert into page (number) values(:one) ", array( ":one" => "1" ) ); - R::exec( "insert into page (number) values(:one) ", array( ":one" => "1234" ) ); - R::exec( "insert into page (number) values(:one) ", array( ":one" => "-21" ) ); - - pass(); - - testpack( 'Test whether we can properly bind and receive NULL values' ); - - $adapter = R::getDatabaseAdapter(); - - asrt( $adapter->getCell( 'SELECT TEXT( :nil ) ', array( ':nil' => 'NULL' ) ), 'NULL' ); - asrt( $adapter->getCell( 'SELECT TEXT( :nil ) ', array( ':nil' => NULL ) ), NULL ); - asrt( $adapter->getCell( 'SELECT TEXT( ? ) ', array( 'NULL' ) ), 'NULL' ); - asrt( $adapter->getCell( 'SELECT TEXT( ? ) ', array( NULL ) ), NULL ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php deleted file mode 100644 index 25a485cc..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Setget.php +++ /dev/null @@ -1,126 +0,0 @@ -id, $book1ID ); - asrt( $book1->title, 'book 1' ); - - $book2 = R::load( 'book', $book2ID ); - - asrt( $book2->id, $book2ID ); - asrt( $book2->title, 'book 2' ); - - asrt( count( $book1->ownPage ), 2 ); - asrt( count( $book1->fresh()->with( 'LIMIT 1' )->ownPage ), 1 ); - asrt( count( $book1->fresh()->withCondition( ' title = ? ', array('page 2 of book 1'))->ownPage ), 1 ); - - asrt( count($book2->ownPage), 1 ); - asrt( $book2->fresh()->countOwn( 'page' ), 1 ); - - $page1 = R::load( 'page', $page1ID ); - asrt( count( $page1->sharedPage ), 0 ); - asrt( $page1->fetchAs( 'book' )->magazine->id, $book2ID ); - - $page2 = R::load( 'page', $page2ID ); - asrt( count($page2->sharedPage), 1 ); - asrt( $page2->fresh()->countShared( 'page' ), 1 ); - - $page3 = R::findOne( 'page', ' title = ? ', array( 'page 1 of book 2' ) ); - asrt( $page3->id, $page3ID ); - asrt( $page3->book->id, $book2ID ); - } - - /** - * Test Full fluid UUID support. - * - */ - public function testFullSupport() - { - - //Rewire objects to support UUIDs. - $oldToolBox = R::getToolBox(); - $oldAdapter = $oldToolBox->getDatabaseAdapter(); - $uuidWriter = new \UUIDWriterPostgres( $oldAdapter ); - $newRedBean = new OODB( $uuidWriter ); - $newToolBox = new ToolBox( $newRedBean, $oldAdapter, $uuidWriter ); - R::configureFacadeWithToolbox( $newToolBox ); - - list( $mansion, $rooms, $ghosts, $key ) = R::dispenseAll( 'mansion,room*3,ghost*4,key' ); - $mansion->name = 'Haunted Mansion'; - $mansion->xownRoomList = $rooms; - $rooms[0]->name = 'Green Room'; - $rooms[1]->name = 'Red Room'; - $rooms[2]->name = 'Blue Room'; - $ghosts[0]->name = 'zero'; - $ghosts[1]->name = 'one'; - $ghosts[2]->name = 'two'; - $ghosts[3]->name = 'three'; - $rooms[0]->noLoad()->sharedGhostList = array( $ghosts[0], $ghosts[1] ); - $rooms[1]->noLoad()->sharedGhostList = array( $ghosts[0], $ghosts[2] ); - $rooms[2]->noLoad()->sharedGhostList = array( $ghosts[1], $ghosts[3], $ghosts[2] ); - $rooms[2]->xownKey = array( $key ); - //Can we store a bean hierachy with UUIDs? - - R::debug(1); - $id = R::store( $mansion ); - //exit; - - asrt( is_string( $id ), TRUE ); - asrt( strlen( $id ), 36 ); - $haunted = R::load( 'mansion', $id ); - asrt( $haunted->name, 'Haunted Mansion' ); - asrt( is_string( $haunted->id ), TRUE ); - asrt( strlen( $haunted->id ), 36 ); - asrt( is_array( $haunted->xownRoomList ), TRUE ); - asrt( count( $haunted->ownRoom ), 3 ); - $rooms = $haunted->xownRoomList; - - //Do some counting... - $greenRoom = NULL; - foreach( $rooms as $room ) { - if ( $room->name === 'Green Room' ) { - $greenRoom = $room; - break; - } - } - asrt( !is_null( $greenRoom ), TRUE ); - asrt( is_array( $greenRoom->with(' ORDER BY id ')->sharedGhostList ), TRUE ); - asrt( count( $greenRoom->sharedGhostList ), 2 ); - $names = array(); - foreach( $greenRoom->sharedGhost as $ghost ) $names[] = $ghost->name; - sort($names); - $names = implode(',', $names); - asrt($names, 'one,zero'); - $rooms = $haunted->xownRoomList; - $blueRoom = NULL; - foreach( $rooms as $room ) { - if ( $room->name === 'Blue Room' ) { - $blueRoom = $room; - break; - } - } - asrt( !is_null( $blueRoom ), TRUE ); - asrt( is_array( $blueRoom->sharedGhostList ), TRUE ); - asrt( count( $blueRoom->sharedGhostList ), 3 ); - $names = array(); - foreach( $blueRoom->sharedGhost as $ghost ) $names[] = $ghost->name; - sort($names); - $names = implode(',', $names); - asrt($names, 'one,three,two'); - $rooms = $haunted->xownRoomList; - $redRoom = NULL; - foreach( $rooms as $room ) { - if ( $room->name === 'Red Room' ) { - $redRoom = $room; break; - } - } - $names = array(); - foreach( $redRoom->sharedGhost as $ghost ) $names[] = $ghost->name; - sort($names); - $names = implode(',', $names); - asrt($names, 'two,zero'); - asrt( !is_null( $redRoom ), TRUE ); - asrt( is_array( $redRoom->sharedGhostList ), TRUE ); - asrt( count( $redRoom->sharedGhostList ), 2 ); - - //Can we repaint a room? - $redRoom->name = 'Yellow Room'; - $id = R::store($redRoom); - $yellowRoom = R::load( 'room', $id ); - asrt( $yellowRoom->name, 'Yellow Room'); - asrt( !is_null( $yellowRoom ), TRUE ); - asrt( is_array( $yellowRoom->sharedGhostList ), TRUE ); - asrt( count( $yellowRoom->sharedGhostList ), 2 ); - - //Can we throw one ghost out? - array_pop( $yellowRoom->sharedGhost ); - R::store( $yellowRoom ); - $yellowRoom = $yellowRoom->fresh(); - asrt( $yellowRoom->name, 'Yellow Room'); - asrt( !is_null( $yellowRoom ), TRUE ); - asrt( is_array( $yellowRoom->sharedGhostList ), TRUE ); - asrt( count( $yellowRoom->sharedGhostList ), 1 ); - - //can we remove one of the rooms? - asrt( R::count('key'), 1); - $list = $mansion->withCondition(' "name" = ? ', array('Blue Room'))->xownRoomList; - $room = reset($list); - unset($mansion->xownRoomList[$room->id]); - R::store($mansion); - asrt(R::count('room'), 2); - - //and what about its dependent beans? - asrt(R::count('key'), 0); - asrt(R::count('ghost_room'), 3); - - //and can we find ghosts? - $ghosts = R::find('ghost'); - asrt(count($ghosts), 4); - $ghosts = R::findAll('ghost', 'ORDER BY id'); - asrt(count($ghosts), 4); - $ghosts = R::findAll('ghost', 'ORDER BY id LIMIT 2'); - asrt(count($ghosts), 2); - $ghostZero = R::findOne('ghost', ' "name" = ? ', array( 'zero' ) ); - asrt( ($ghostZero instanceof OODBBean), TRUE ); - - //can we create link properties on existing tables? - $blackRoom = R::dispense( 'room' ); - $blackRoom->name = 'Black Room'; - $ghostZero->link('ghost_room', array('mood'=>'grumpy'))->room = $blackRoom; - R::store($ghostZero); - $ghostZero = $ghostZero->fresh(); - $list = $ghostZero->sharedRoomList; - asrt(count($list), 3); - $ghostZero = $ghostZero->fresh(); - $list = $ghostZero->withCondition(' ghost_room.mood = ? ', array('grumpy'))->sharedRoomList; - asrt(count($list), 1); - - //can we load a batch? - $ids = R::getCol('SELECT id FROM ghost'); - $ghosts = R::batch('ghost', $ids); - asrt(count($ghosts), 4); - - //can we do an aggregation? - $ghosts = $greenRoom->aggr('ownGhostRoom', 'ghost', 'ghost'); - asrt(count($ghosts), 2); - - //can we duplicate the mansion? - asrt(R::count('mansion'), 1); - asrt(R::count('room'), 3); - asrt(R::count('ghost'), 4); - $copy = R::dup($mansion); - R::store($copy); - asrt(R::count('mansion'), 2); - asrt(R::count('room'), 5); //black room does not belong to mansion 1 - asrt(R::count('ghost'), 4); - - //can we do some counting using the list? - asrt( $copy->countOwn('room'), 2); - $rooms = $copy->withCondition(' "name" = ? ', array('Green Room'))->xownRoomList; - $room = reset($rooms); - asrt($room->countShared('ghost'), 2); - - //Finally restore old toolbox - R::configureFacadeWithToolbox( $oldToolBox ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php deleted file mode 100644 index fbc2ed1a..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Postgres/Writer.php +++ /dev/null @@ -1,699 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $a = new AssociationManager( $toolbox ); - - $adapter->exec( "DROP TABLE IF EXISTS testtable" ); - - asrt( in_array( "testtable", $writer->getTables() ), FALSE ); - - $writer->createTable( "testtable" ); - - asrt( in_array( "testtable", $writer->getTables() ), TRUE ); - - asrt( count( array_keys( $writer->getColumns( "testtable" ) ) ), 1 ); - - asrt( in_array( "id", array_keys( $writer->getColumns( "testtable" ) ) ), TRUE ); - asrt( in_array( "c1", array_keys( $writer->getColumns( "testtable" ) ) ), FALSE ); - - $writer->addColumn( "testtable", "c1", 1 ); - - asrt( count( array_keys( $writer->getColumns( "testtable" ) ) ), 2 ); - - asrt( in_array( "c1", array_keys( $writer->getColumns( "testtable" ) ) ), TRUE ); - - foreach ( $writer->sqltype_typeno as $key => $type ) { - if ( $type < 100 ) { - asrt( $writer->code( $key, TRUE ), $type ); - } else { - asrt( $writer->code( $key ), PostgreSQL::C_DATATYPE_SPECIFIED ); - } - } - - asrt( $writer->code( PostgreSQL::C_DATATYPE_SPECIAL_DATETIME ), PostgreSQL::C_DATATYPE_SPECIFIED ); - - asrt( $writer->code( "unknown" ), PostgreSQL::C_DATATYPE_SPECIFIED ); - - asrt( $writer->scanType( FALSE ), PostgreSQL::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( TRUE ), PostgreSQL::C_DATATYPE_INTEGER ); - - asrt( $writer->scanType( NULL ), PostgreSQL::C_DATATYPE_INTEGER ); - - asrt( $writer->scanType( 2 ), PostgreSQL::C_DATATYPE_INTEGER ); - - asrt( $writer->scanType( 255 ), PostgreSQL::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( 256 ), PostgreSQL::C_DATATYPE_INTEGER ); - - asrt( $writer->scanType( -1 ), PostgreSQL::C_DATATYPE_INTEGER ); - - asrt( $writer->scanType( 1.5 ), PostgreSQL::C_DATATYPE_DOUBLE ); - - asrt( $writer->scanType( INF ), PostgreSQL::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( "abc" ), PostgreSQL::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( "2001-10-10", TRUE ), PostgreSQL::C_DATATYPE_SPECIAL_DATE ); - - asrt( $writer->scanType( "2001-10-10 10:00:00", TRUE ), PostgreSQL::C_DATATYPE_SPECIAL_DATETIME ); - - asrt( $writer->scanType( "2001-10-10 10:00:00" ), PostgreSQL::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( "2001-10-10" ), PostgreSQL::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( str_repeat( "lorem ipsum", 100 ) ), PostgreSQL::C_DATATYPE_TEXT ); - - $writer->widenColumn( "testtable", "c1", PostgreSQL::C_DATATYPE_TEXT ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols["c1"] ), PostgreSQL::C_DATATYPE_TEXT ); - - $writer->addColumn( "testtable", "special", PostgreSQL::C_DATATYPE_SPECIAL_DATE ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols['special'], TRUE ), PostgreSQL::C_DATATYPE_SPECIAL_DATE ); - - asrt( $writer->code( $cols['special'], FALSE ), PostgreSQL::C_DATATYPE_SPECIFIED ); - - $writer->addColumn( "testtable", "special2", PostgreSQL::C_DATATYPE_SPECIAL_DATETIME ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols['special2'], TRUE ), PostgreSQL::C_DATATYPE_SPECIAL_DATETIME ); - - asrt( $writer->code( $cols['special'], FALSE ), PostgreSQL::C_DATATYPE_SPECIFIED ); - - //$id = $writer->insertRecord("testtable", array("c1"), array(array("lorem ipsum"))); - - $id = $writer->updateRecord( "testtable", array( array( "property" => "c1", "value" => "lorem ipsum" ) ) ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( $row[0]["c1"], "lorem ipsum" ); - - $writer->updateRecord( "testtable", array( array( "property" => "c1", "value" => "ipsum lorem" ) ), $id ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( $row[0]["c1"], "ipsum lorem" ); - - $writer->deleteRecord( "testtable", array( "id" => array( $id ) ) ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( empty( $row ), TRUE ); - } - - /** - * (FALSE should be stored as 0 not as '') - * - * @return void - */ - public function testZeroIssue() - { - testpack( "Zero issue" ); - - $toolbox = R::getToolBox(); - $redbean = $toolbox->getRedBean(); - - $bean = $redbean->dispense( "zero" ); - - $bean->zero = FALSE; - $bean->title = "bla"; - - $redbean->store( $bean ); - - asrt( count( $redbean->find( "zero", array(), " zero = 0 " ) ), 1 ); - - testpack( "Test ANSI92 issue in clearrelations" ); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - set1toNAssoc( $a, $book, $author1 ); - set1toNAssoc( $a, $book, $author2 ); - - pass(); - } - - /** - * Various. - * Tests whether writer correctly handles keyword 'group' and SQL state 23000 issue. - * These tests remain here to make sure issues 9 and 10 never happen again. - * However this bug will probably never re-appear due to changed architecture. - * - * @return void - */ - public function testIssue9and10() - { - $toolbox = R::getToolBox(); - $redbean = $toolbox->getRedBean(); - $adapter = $toolbox->getDatabaseAdapter(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - $a->associate( $book, $author1 ); - $a->associate( $book, $author2 ); - - pass(); - - testpack( "Test Association Issue Group keyword (Issues 9 and 10)" ); - - R::nuke(); - - $group = $redbean->dispense( "group" ); - - $group->name = "mygroup"; - - $redbean->store( $group ); - - try { - $a->associate( $group, $book ); - - pass(); - } catch ( SQL $e ) { - fail(); - } - - // Test issue SQL error 23000 - try { - $a->associate( $group, $book ); - - pass(); - } catch ( SQL $e ) { - fail(); - } - - asrt( (int) $adapter->getCell( "select count(*) from book_group" ), 1 ); //just 1 rec! - } - - /** - * Test various. - * Test various somewhat uncommon trash/unassociate scenarios. - * (i.e. unassociate unrelated beans, trash non-persistant beans etc). - * Should be handled gracefully - no output checking. - * - * @return void - */ - public function testVaria() - { - $toolbox = R::getToolBox(); - $redbean = $toolbox->getRedBean(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - $a->unassociate( $book, $author1 ); - $a->unassociate( $book, $author2 ); - - pass(); - - $redbean->trash( $redbean->dispense( "bla" ) ); - - pass(); - - $bean = $redbean->dispense( "bla" ); - - $bean->name = 1; - $bean->id = 2; - - $redbean->trash( $bean ); - - pass(); - } - - /** - * Test special types. - * - * @return void - */ - public function testTypes() - { - testpack( 'Special data types' ); - - $bean = R::dispense( 'bean' ); - - $bean->date = 'someday'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'text' ); - - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'text' ); - } - - /** - * Test dates. - * - * @return void - */ - public function testTypesDates() - { - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'date' ); - } - - /** - * Datetime. - * - * @return void - */ - public function testTypesDateTimes() - { - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10 10:00:00'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'timestamp without time zone' ); - } - - /** - * Test spatial data types. - * - * @return void - */ - public function testTypesPoints() - { - $bean = R::dispense( 'bean' ); - - $bean->point = '(92,12)'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['point'], 'point' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->point, '(92,12)' ); - - $bean->note = 'taint'; - - R::store( $bean ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->point, '(92,12)' ); - } - - /** - * Test points. - * - * @return void - */ - public function testTypesDecPoints() - { - $bean = R::dispense( 'bean' ); - - $bean->point = '(9.2,1.2)'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['point'], 'point' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->point, '(9.2,1.2)' ); - - $bean->note = 'taint'; - - R::store( $bean ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->point, '(9.2,1.2)' ); - } - - /** - * Test polygons. - * - * @return void - */ - public function testPolygons() - { - $bean = R::dispense( 'bean' ); - $bean->polygon = '((0,0),(1,1),(2,0))'; - R::store( $bean ); - $cols = R::getColumns( 'bean' ); - asrt( $cols['polygon'], 'polygon' ); - $bean = R::load( 'bean', $bean->id ); - asrt( $bean->polygon, '((0,0),(1,1),(2,0))' ); - $bean->note = 'taint'; - R::store( $bean ); - $bean = R::load( 'bean', $bean->id ); - asrt( $bean->polygon, '((0,0),(1,1),(2,0))' ); - $bean = R::dispense( 'bean' ); - $bean->polygon = '((0,0),(1.2,1),(2,0.3))'; - R::store( $bean ); - $cols = R::getColumns( 'bean' ); - asrt( $cols['polygon'], 'polygon' ); - $bean = R::load( 'bean', $bean->id ); - asrt( $bean->polygon, '((0,0),(1.2,1),(2,0.3))' ); - $bean->note = 'taint'; - R::store( $bean ); - $bean = R::load( 'bean', $bean->id ); - asrt( $bean->polygon, '((0,0),(1.2,1),(2,0.3))' ); - } - - /** - * Test multi points. - * - * @return void - */ - public function testTypesMultiDecPoints() - { - $bean = R::dispense( 'bean' ); - - $bean->line = '[(1.2,1.4),(2.2,34)]'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['line'], 'lseg' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->line, '[(1.2,1.4),(2.2,34)]' ); - - $bean->note = 'taint'; - - R::store( $bean ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->line, '[(1.2,1.4),(2.2,34)]' ); - } - - /** - * More points... - * - * @return void - */ - public function testTypesWeirdPoints() - { - $bean = R::dispense( 'bean' ); - - $bean->circle = '<(9.2,1.2),7.9>'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['circle'], 'circle' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->circle, '<(9.2,1.2),7.9>' ); - - $bean->note = 'taint'; - - R::store( $bean ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->circle, '<(9.2,1.2),7.9>' ); - } - - /** - * Test money types. - * - * @return void - */ - public function testTypesMon() - { - $bean = R::dispense( 'bean' ); - - $bean->amount = '22.99'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['amount'], 'numeric' ); - - R::nuke(); - - $bean = R::dispense( 'bean' ); - - $bean->amount = '-22.99'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['amount'], 'numeric' ); - } - - /** - * Test money data type. - * - * @return void - */ - public function testTypesMoney() - { - $bean = R::dispense( 'bean' ); - - $bean->money = '$123.45'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['money'], 'money' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->money, '$123.45' ); - - $bean->note = 'taint'; - - R::store( $bean ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->money, '$123.45' ); - - $bean->money = '$123,455.01'; - - R::store($bean); - - $bean = $bean->fresh(); - - asrt( $bean->money, '$123,455.01' ); - - } - - /** - * Test negative money data type. - * - * @return void - */ - public function testTypesNegativeMoney() - { - $bean = R::dispense( 'bean' ); - - $bean->money = '-$123.45'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['money'], 'money' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->money, '-$123.45' ); - - $bean->note = 'taint'; - - R::store( $bean ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->money, '-$123.45' ); - } - - /** - * Issue #340 - * Redbean is currently picking up bcrypt hashed passwords - * (which look like this: $2y$12$85lAS....SnpDNVGPAC7w0G) - * as PostgreSQL money types. - * Then, once R::store is called on the bean, it chokes and throws the following error: - * PHP Fatal error: Uncaught [22P02] - SQLSTATE[22P02]: Invalid text representation: 7 ERROR: - * invalid input syntax for type money: .... - * - * @return void - */ - public function testTypesInvalidMoney() - { - $bean = R::dispense( 'bean' ); - - $bean->nomoney = '$2y$12$85lAS'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['nomoney'], 'text' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->nomoney, '$2y$12$85lAS' ); - - $bean->note = 'taint'; - - R::store( $bean ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->nomoney, '$2y$12$85lAS' ); - } - - /** - * Test types of strings. - * - * @return void - */ - public function testTypesStrings() - { - $bean = R::dispense( 'bean' ); - - $bean->data = 'abcdefghijk'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['data'], 'text' ); - - $bean = R::load( 'bean', $bean->id ); - - asrt( $bean->data, 'abcdefghijk' ); - - $bean->data = '(1,2)'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['data'], 'text' ); - - $bean->data = '[(1.2,1.4),(2.2,34)]'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['data'], 'text' ); - - $bean->data = '<(9.2,1.2),7.9>'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['data'], 'text' ); - - $bean->data = '$25'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['data'], 'text' ); - - $bean->data = '2012-10-10 10:00:00'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['data'], 'text' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Pretest.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Pretest.php deleted file mode 100644 index ff88f00e..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Pretest.php +++ /dev/null @@ -1,32 +0,0 @@ -title = 'a'; - R::store( $book ); - try { - R::getWriter()->addIndex( 'book' , '\'', 'title' ); - pass(); - } catch( \Exception $e ) { - fail(); - } - R::getWriter()->addIndex( 'book' , '\'', 'title' ); - pass(); - } - - /** - * Test foreign keys with SQLite. - * - * @return void - */ - public function testForeignKeysWithSQLite() - { - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - $cover = R::dispense( 'cover' ); - - list( $g1, $g2 ) = R::dispense( 'genre', 2 ); - - $g1->name = '1'; - $g2->name = '2'; - - $book->ownPage = array( $page ); - - $book->cover = $cover; - - $book->sharedGenre = array( $g1, $g2 ); - - R::store( $book ); - - $fkbook = R::getAll( 'pragma foreign_key_list(book)' ); - $fkgenre = R::getAll( 'pragma foreign_key_list(book_genre)' ); - $fkpage = R::getAll( 'pragma foreign_key_list(page)' ); - - asrt( $fkpage[0]['from'], 'book_id' ); - asrt( $fkpage[0]['to'], 'id' ); - asrt( $fkpage[0]['table'], 'book' ); - - asrt( count( $fkgenre ), 2 ); - - if ( $fkgenre[0]['from'] == 'book' ) { - asrt( $fkgenre[0]['to'], 'id' ); - asrt( $fkgenre[0]['table'], 'book' ); - } - - if ( $fkgenre[0]['from'] == 'genre' ) { - asrt( $fkgenre[0]['to'], 'id' ); - asrt( $fkgenre[0]['table'], 'genre' ); - } - - asrt( $fkbook[0]['from'], 'cover_id' ); - asrt( $fkbook[0]['to'], 'id' ); - asrt( $fkbook[0]['table'], 'cover' ); - } - - /** - * Constrain test for SQLite Writer. - * - * @return void - */ - public function testConstrain() - { - R::nuke(); - - $sql = 'CREATE TABLE book ( id INTEGER PRIMARY KEY AUTOINCREMENT ) '; - - R::exec( $sql ); - - $sql = 'CREATE TABLE page ( id INTEGER PRIMARY KEY AUTOINCREMENT ) '; - - R::exec( $sql ); - - $sql = 'CREATE TABLE book_page ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - book_id INTEGER, - page_id INTEGER - ) '; - - R::exec( $sql ); - - $sql = 'PRAGMA foreign_key_list("book_page")'; - - $fkList = R::getAll( $sql ); - - asrt( count( $fkList), 0 ); - - $writer = R::getWriter(); - - $writer->addFK( 'book_page', 'book', 'book_id', 'id', TRUE ); - $writer->addFK( 'book_page', 'page', 'page_id', 'id', TRUE ); - - $sql = 'PRAGMA foreign_key_list("book_page")'; - - $fkList = R::getAll( $sql ); - - asrt( count( $fkList), 2 ); - - $writer->addFK( 'book_page', 'book', 'book_id', 'id', TRUE ); - $writer->addFK( 'book_page', 'page', 'page_id', 'id', TRUE ); - - $sql = 'PRAGMA foreign_key_list("book_page")'; - - $fkList = R::getAll( $sql ); - - asrt( count( $fkList), 2 ); - } - - /** - * Test adding foreign keys. - * - * @return void - */ - public function testAddingForeignKeys() - { - R::nuke(); - - $sql = 'CREATE TABLE book ( id INTEGER PRIMARY KEY AUTOINCREMENT ) '; - - R::exec( $sql ); - - $sql = 'CREATE TABLE page ( id INTEGER PRIMARY KEY AUTOINCREMENT, book_id INTEGER ) '; - - R::exec( $sql ); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 0 ); - - $writer = R::getWriter(); - - $writer->addFK('page', 'book', 'book_id', 'id', TRUE); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 1 ); - - $writer->addFK('page', 'book', 'book_id', 'id', TRUE); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 1 ); - - $writer->addFK('page', 'book', 'book_id', 'id', FALSE); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 1 ); - - R::nuke(); - - $sql = 'CREATE TABLE book ( id INTEGER PRIMARY KEY AUTOINCREMENT ) '; - - R::exec( $sql ); - - $sql = 'CREATE TABLE page ( id INTEGER PRIMARY KEY AUTOINCREMENT, book_id INTEGER ) '; - - R::exec( $sql ); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 0 ); - - $writer = R::getWriter(); - - $writer->addFK('page', 'book', 'book_id', 'id', FALSE); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 1 ); - - $writer->addFK('page', 'book', 'book_id', 'id', TRUE); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 1 ); - - $writer->addFK('page', 'book', 'book_id', 'id', FALSE); - - asrt( count( R::getAll(' PRAGMA foreign_key_list("page") ') ), 1 ); - - } - - /** - * Test whether we can manually create indexes. - * - * @return void - */ - public function testAddingIndex() - { - R::nuke(); - - $sql = 'CREATE TABLE song ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - album_id INTEGER, - category TEXT - ) '; - - R::exec( $sql ); - - $writer = R::getWriter(); - - $indexes = R::getAll('PRAGMA index_list("song") '); - - asrt( count( $indexes ), 0 ); - - $writer->addIndex( 'song', 'index1', 'album_id' ); - - $indexes = R::getAll('PRAGMA index_list("song") '); - - asrt( count( $indexes ), 1 ); - - $writer->addIndex( 'song', 'index1', 'album_id' ); - - $indexes = R::getAll('PRAGMA index_list("song") '); - - asrt( count( $indexes ), 1 ); - - $writer->addIndex( 'song', 'index2', 'category' ); - - $indexes = R::getAll('PRAGMA index_list("song") '); - - asrt( count( $indexes ), 2 ); - - try { - $writer->addIndex( 'song', 'index1', 'nonexistant' ); - pass(); - } catch ( \Exception $ex ) { - fail(); - } - - $indexes = R::getAll('PRAGMA index_list("song") '); - asrt( count( $indexes ), 2 ); - - try { - $writer->addIndex( 'nonexistant', 'index1', 'nonexistant' ); - pass(); - } catch ( \Exception $ex ) { - fail(); - } - - $indexes = R::getAll('PRAGMA index_list("song") '); - asrt( count( $indexes ), 2 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Parambind.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Parambind.php deleted file mode 100644 index b4c3b6ea..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Parambind.php +++ /dev/null @@ -1,66 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - asrt( (int) $adapter->getCell( "SELECT 123" ), 123 ); - asrt( (int) $adapter->getCell( "SELECT ?", array( "987" ) ), 987 ); - asrt( (int) $adapter->getCell( "SELECT ?+?", array( "987", "2" ) ), 989 ); - - asrt( (int) $adapter->getCell( - "SELECT :numberOne+:numberTwo", - array( - ":numberOne" => 42, - ":numberTwo" => 50 ) - ), - 92 - ); - - $pair = $adapter->getAssoc( "SELECT 'thekey','thevalue' " ); - - asrt( is_array( $pair ), TRUE ); - - asrt( count( $pair ), 1 ); - - asrt( isset( $pair["thekey"] ), TRUE ); - - asrt( $pair["thekey"], "thevalue" ); - - testpack( 'Test whether we can properly bind and receive NULL values' ); - - asrt( $adapter->getCell( 'SELECT :nil ', array( ':nil' => 'NULL' ) ), 'NULL' ); - asrt( $adapter->getCell( 'SELECT :nil ', array( ':nil' => NULL ) ), NULL ); - - asrt( $adapter->getCell( 'SELECT ? ', array( 'NULL' ) ), 'NULL' ); - asrt( $adapter->getCell( 'SELECT ? ', array( NULL ) ), NULL ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Rebuild.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Rebuild.php deleted file mode 100644 index 83eb6a2b..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Rebuild.php +++ /dev/null @@ -1,77 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - - $book->xownPage[] = $page; - - $id = R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->xownPage ), 1 ); - - asrt( (int) R::getCell( 'SELECT COUNT(*) FROM page' ), 1 ); - - R::trash( $book ); - - asrt( (int) R::getCell( 'SELECT COUNT(*) FROM page' ), 0 ); - - $book = R::dispense( 'book' ); - $page = R::dispense( 'page' ); - - $book->xownPage[] = $page; - - $id = R::store( $book ); - - $book = R::load( 'book', $id ); - - asrt( count( $book->xownPage ), 1 ); - - asrt( (int) R::getCell( 'SELECT COUNT(*) FROM page' ), 1 ); - - $book->added = 2; - - R::store( $book ); - - $book->added = 'added'; - - R::store( $book ); - - R::trash( $book ); - - asrt( (int) R::getCell( 'SELECT COUNT(*) FROM page' ), 0 ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Setget.php b/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Setget.php deleted file mode 100644 index 54ca7e58..00000000 --- a/server/vendor/gabordemooij/redbean/testing/RedUNIT/Sqlite/Setget.php +++ /dev/null @@ -1,116 +0,0 @@ -getDatabaseAdapter(); - $writer = $toolbox->getWriter(); - $redbean = $toolbox->getRedBean(); - $pdo = $adapter->getDatabase(); - - $a = new AssociationManager( $toolbox ); - - asrt( in_array( "testtable", $writer->getTables() ), FALSE ); - - $writer->createTable( "testtable" ); - - asrt( in_array( "testtable", $writer->getTables() ), TRUE ); - - asrt( count( array_keys( $writer->getColumns( "testtable" ) ) ), 1 ); - - asrt( in_array( "id", array_keys( $writer->getColumns( "testtable" ) ) ), TRUE ); - asrt( in_array( "c1", array_keys( $writer->getColumns( "testtable" ) ) ), FALSE ); - - $writer->addColumn( "testtable", "c1", 1 ); - - asrt( count( array_keys( $writer->getColumns( "testtable" ) ) ), 2 ); - - asrt( in_array( "c1", array_keys( $writer->getColumns( "testtable" ) ) ), TRUE ); - - foreach ( $writer->sqltype_typeno as $key => $type ) { - asrt( $writer->code( $key ), $type ); - } - - asrt( $writer->code( "unknown" ), 99 ); - - asrt( $writer->scanType( FALSE ), SQLiteT::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( NULL ), SQLiteT::C_DATATYPE_INTEGER ); - - asrt( $writer->scanType( 2 ), SQLiteT::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( 255 ), SQLiteT::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( 256 ), SQLiteT::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( -1 ), SQLiteT::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( 1.5 ), SQLiteT::C_DATATYPE_NUMERIC ); - - asrt( $writer->scanType( 2147483648 - 1 ), SQLiteT::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( 2147483648 ), SQLiteT::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( -2147483648 + 1), SQLiteT::C_DATATYPE_INTEGER ); - asrt( $writer->scanType( -2147483648 ), SQLiteT::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( INF ), SQLiteT::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( "abc" ), SQLiteT::C_DATATYPE_TEXT ); - - asrt( $writer->scanType( '2010-10-10' ), SQLiteT::C_DATATYPE_NUMERIC ); - asrt( $writer->scanType( '2010-10-10 10:00:00' ), SQLiteT::C_DATATYPE_NUMERIC ); - - asrt( $writer->scanType( str_repeat( "lorem ipsum", 100 ) ), SQLiteT::C_DATATYPE_TEXT ); - - $writer->widenColumn( "testtable", "c1", 2 ); - - $cols = $writer->getColumns( "testtable" ); - - asrt( $writer->code( $cols["c1"] ), 2 ); - - //$id = $writer->insertRecord("testtable", array("c1"), array(array("lorem ipsum"))); - $id = $writer->updateRecord( "testtable", array( array( "property" => "c1", "value" => "lorem ipsum" ) ) ); - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( $row[0]["c1"], "lorem ipsum" ); - - $writer->updateRecord( "testtable", array( array( "property" => "c1", "value" => "ipsum lorem" ) ), $id ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( $row[0]["c1"], "ipsum lorem" ); - - $writer->deleteRecord( "testtable", array( "id" => array( $id ) ) ); - - $row = $writer->queryRecord( "testtable", array( "id" => array( $id ) ) ); - - asrt( empty( $row ), TRUE ); - } - - /** - * (FALSE should be stored as 0 not as '') - * - * @return void - */ - public function testZeroIssue() - { - testpack( "Zero issue" ); - - $toolbox = R::getToolBox(); - $redbean = $toolbox->getRedBean(); - - $bean = $redbean->dispense( "zero" ); - - $bean->zero = FALSE; - $bean->title = "bla"; - - $redbean->store( $bean ); - - asrt( count( $redbean->find( "zero", array(), " zero = 0 " ) ), 1 ); - - testpack( "Test ANSI92 issue in clearrelations" ); - - $redbean = $toolbox->getRedBean(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - set1toNAssoc( $a, $book, $author1 ); - set1toNAssoc( $a, $book, $author2 ); - - pass(); - } - - /** - * Various. - * Tests whether writer correctly handles keyword 'group' and SQL state 23000 issue. - * These tests remain here to make sure issues 9 and 10 never happen again. - * However this bug will probably never re-appear due to changed architecture. - * - * @return void - */ - public function testIssue9and10() - { - $toolbox = R::getToolBox(); - $redbean = $toolbox->getRedBean(); - $adapter = $toolbox->getDatabaseAdapter(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - $a->associate( $book, $author1 ); - $a->associate( $book, $author2 ); - - pass(); - - testpack( "Test Association Issue Group keyword (Issues 9 and 10)" ); - - $group = $redbean->dispense( "group" ); - $group->name = "mygroup"; - - $redbean->store( $group ); - - try { - $a->associate( $group, $book ); - - pass(); - } catch ( SQL $e ) { - fail(); - } - - // Test issue SQL error 23000 - try { - $a->associate( $group, $book ); - - pass(); - } catch ( SQL $e ) { - print_r( $e ); - - fail(); - } - - asrt( (int) $adapter->getCell( "select count(*) from book_group" ), 1 ); //just 1 rec! - } - - /** - * Test various. - * Test various somewhat uncommon trash/unassociate scenarios. - * (i.e. unassociate unrelated beans, trash non-persistant beans etc). - * Should be handled gracefully - no output checking. - * - * @return void - */ - public function testVaria2() - { - $toolbox = R::getToolBox(); - $redbean = $toolbox->getRedBean(); - - $a = new AssociationManager( $toolbox ); - - $book = $redbean->dispense( "book" ); - $author1 = $redbean->dispense( "author" ); - $author2 = $redbean->dispense( "author" ); - - $book->title = "My First Post"; - - $author1->name = "Derek"; - $author2->name = "Whoever"; - - $a->unassociate( $book, $author1 ); - $a->unassociate( $book, $author2 ); - - pass(); - - $redbean->trash( $redbean->dispense( "bla" ) ); - - pass(); - - $bean = $redbean->dispense( "bla" ); - - $bean->name = 1; - $bean->id = 2; - - $redbean->trash( $bean ); - - pass(); - } - - /** - * Test special data types. - * - * @return void - */ - public function testSpecialDataTypes() - { - testpack( 'Special data types' ); - - $bean = R::dispense( 'bean' ); - - $bean->date = 'someday'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'TEXT' ); - - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10'; - - R::nuke(); - - $bean = R::dispense( 'bean' ); - - $bean->date = '2011-10-10'; - - R::store( $bean ); - - $cols = R::getColumns( 'bean' ); - - asrt( $cols['date'], 'NUMERIC' ); - } -} diff --git a/server/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php b/server/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php deleted file mode 100644 index 38699946..00000000 --- a/server/vendor/gabordemooij/redbean/testing/cli/plugins/myhooks.php +++ /dev/null @@ -1,27 +0,0 @@ - 'localhost', - 'schema' => 'cubase', - 'user' => 'dba', - 'pass' => '' -); - -$colorMap[ 'CUBRID' ] = '0;35'; - -$dsn = "cubrid:host={$ini['CUBRID']['host']};port=33000;dbname={$ini['CUBRID']['schema']}"; -R::addDatabase( 'CUBRID', $dsn, $ini['CUBRID']['user'], $ini['CUBRID']['pass'], FALSE ); -R::selectDatabase( 'CUBRID' ); -R::exec( 'AUTOCOMMIT IS ON' ); diff --git a/server/vendor/gabordemooij/redbean/testing/cli/runperf.php b/server/vendor/gabordemooij/redbean/testing/cli/runperf.php deleted file mode 100644 index 1d584d56..00000000 --- a/server/vendor/gabordemooij/redbean/testing/cli/runperf.php +++ /dev/null @@ -1,96 +0,0 @@ -getTargetDrivers(); - -foreach ( $drivers as $driver ) { - - if ( !isset( $ini[$driver] ) ) continue; - if ( !isset( $_SERVER['argv'][1])) die('Missing parameter. Usage: php runperf.php '); - - $method = $_SERVER['argv'][1]; - - if ($method === 'setup') { - - echo 'Setup...'.PHP_EOL; - - $test->$method(); - - echo 'READY'.PHP_EOL; - - } else { - - $times = 100; - if (isset($_SERVER['argv'][2])) { - $times = (int) $_SERVER['argv'][2]; - } - - echo "Performing test: $method with driver $driver ".PHP_EOL; - - for ($j=0; $j<$times; $j++) { - - $t1 = microtime( TRUE ); - - $test->$method(); - - $t2 = microtime( TRUE ); - - $d[] = ($t2 - $t1); - - } - - $s = array_sum($d); - $a = ($s / $times); - $mx = max($d); - $mn = min($d); - - echo PHP_EOL."AVG: $a, MAX: $mx, MIN: $mn, TOTAL: $s, TIMES: $times ".PHP_EOL; - } -} \ No newline at end of file diff --git a/server/vendor/gabordemooij/redbean/testing/cli/runtests.php b/server/vendor/gabordemooij/redbean/testing/cli/runtests.php deleted file mode 100644 index c754e3a5..00000000 --- a/server/vendor/gabordemooij/redbean/testing/cli/runtests.php +++ /dev/null @@ -1,336 +0,0 @@ - '0;31', - 'pgsql' => '0;32', - 'sqlite' => '0;34', -); - -@include 'cli/test_hook.php'; - -//Configure the databases -if ( isset( $ini['mysql'] ) ) { - $dsn = "mysql:host={$ini['mysql']['host']};dbname={$ini['mysql']['schema']}"; - - R::addDatabase( 'mysql', $dsn, $ini['mysql']['user'], $ini['mysql']['pass'], FALSE ); - - R::selectDatabase( 'mysql' ); - - R::exec( ' SET GLOBAL sql_mode="" ' ); -} - -//HHVM on Travis does not yet support PostgreSQL. -if ( defined( 'HHVM_VERSION' ) ) { - unset( $ini['pgsql'] ); -} else { - if ( isset( $ini['pgsql'] ) ) { - $dsn = "pgsql:host={$ini['pgsql']['host']};dbname={$ini['pgsql']['schema']}"; - R::addDatabase( 'pgsql', $dsn, $ini['pgsql']['user'], $ini['pgsql']['pass'], FALSE ); - } -} - -if ( isset( $ini['sqlite'] ) ) { - R::addDatabase( 'sqlite', 'sqlite:' . $ini['sqlite']['file'], NULL, NULL, FALSE ); -} - -R::selectDatabase( 'sqlite' ); - -// Function to activate a driver -function activate_driver( $d ) -{ - R::selectDatabase( $d ); -} - -$arguments = $_SERVER['argc']; - -$mode = 'all'; -if ( $arguments > 1 ) { - $mode = $_SERVER['argv'][1]; -} - -$classSpec = null; -if ( $arguments > 2 ) { - $classSpec = $_SERVER['argv'][2]; -} - -$covFilter = null; -if ( $arguments > 3 ) { - $covFilter = $_SERVER['argv'][3]; -} - -$path = 'RedUNIT/'; - -// Possible Selections -$packList = array(); - -$allPacks = array( - 'Blackhole/Version', - 'Blackhole/Toolbox', - 'Blackhole/Fusebox', - 'Blackhole/Labels', - 'Blackhole/Tainted', - 'Blackhole/Meta', - 'Blackhole/Import', - 'Blackhole/Export', - 'Blackhole/Glue', - 'Blackhole/Plugins', - 'Blackhole/Debug', - 'Base/Dispense', - 'Base/Logging', - 'Base/Cursors', - 'Base/Indexes', - 'Base/Issue408', - 'Base/Threeway', - 'Base/Chill', - 'Base/Arrays', - 'Base/Boxing', - 'Base/Typechecking', - 'Base/Observers', - 'Base/Database', - 'Base/Foreignkeys', - 'Base/Namedparams', - 'Base/Prefixes', - 'Base/Copy', - 'Base/Dup', - 'Base/Update', - 'Base/Utf8', - 'Base/Batch', - 'Base/Bean', - 'Base/Writecache', - 'Base/Relations', - 'Base/Association', - 'Base/Aliasing', - 'Base/Cross', - 'Base/Finding', - 'Base/Facade', - 'Base/Frozen', - 'Base/Fuse', - 'Base/Tags', - 'Base/Xnull', - 'Base/Largenum', - 'Base/Issue90', - 'Base/Issue259', - 'Base/Issue303', - 'Base/Nuke', - 'Base/Keywords', - 'Base/Count', - 'Base/With', - 'Base/Joins', - 'Base/Traverse', - 'Base/Misc', - 'Base/Via', - 'Mysql/Preexist', - 'Mysql/Double', - 'Mysql/Writer', - 'Mysql/Freeze', - 'Mysql/Setget', - 'Mysql/Foreignkeys', - 'Mysql/Parambind', - 'Mysql/Uuid', - 'Mysql/Bigint', - 'Mysql/Issue411', - 'Postgres/Setget', - 'Postgres/Foreignkeys', - 'Postgres/Parambind', - 'Postgres/Writer', - 'Postgres/Uuid', - 'Postgres/Bigint', - 'Sqlite/Setget', - 'Sqlite/Foreignkeys', - 'Sqlite/Parambind', - 'Sqlite/Writer', - 'Sqlite/Rebuild', -); - -$suffix = array( - 'Blackhole/Misc', - 'Base/Close' -); - -// Default (mode == all) -if ( $mode == 'all' ) { - $packList = $allPacks; -} else { - foreach ( $allPacks as $pack ) { - if ( strpos( $pack, $mode ) === 0 ) $packList[] = $pack; - } - //Add plugin pack to list. - if ( count($packList) === 0 && count($extraTestsFromHook) === 0 ) { - $packList[] = $mode; - } -} - -// Always include the last ones. -$packList = array_unique(array_merge( $packList, $suffix, $extraTestsFromHook )); -$j = 0; -foreach ( $packList as $testPack ) { - $j ++; - - if ( file_exists( $path . $testPack . '.php' ) ) require( $path . $testPack . '.php' ); - elseif ( file_exists( $hookPath . $testPack . '.php') ) require( $hookPath . $testPack . '.php' ); - - $testPack = str_replace( '../', '', $testPack ); - - if ($j === 1 && $classSpec) { - $testClass = $classSpec; - } else { - $testClassName = str_replace( ' ', '\\', ( str_replace( '/', ' ', $testPack ) ) ); - $testClass = '\\RedUNIT\\' . ucfirst( $testClassName ); - } - - $test = new $testClass(); - - $drivers = $test->getTargetDrivers(); - - maintestpack( str_replace( '_', ' ', get_class( $test ) ) ); - - $round = 0; - $test->setRound( $round ); - - if ( $drivers && is_array( $drivers ) ) { - foreach ( $drivers as $driver ) { - if ( !isset( $ini[$driver] ) ) continue; - - echo PHP_EOL; - - echo '===== DRIVER : (' . $driver . ') ====='; - - echo PHP_EOL; - echo PHP_EOL; - - if ( isset( $colorMap[$driver] ) ) { - echo "\033[{$colorMap[$driver]}m"; - } - - activate_driver( $driver ); - - $currentDriver = $driver; - - $test->setCurrentDriver( $driver ); - - $test->prepare(); - $test->run(); - $test->cleanUp(); - - if ( isset ( $colorMap[$driver] ) ) { - echo "\033[0m"; - } - - echo PHP_EOL; - $test->setRound( ++$round ); - - } - } else { - $test->prepare(); - $test->run(); - $test->cleanUp(); - } -} - -if (!$xdebugSupported) { - echo 'Done. No report - XDEBUG not installed.'; - exit(0); -} - -$report = xdebug_get_code_coverage(); -$misses = 0; -$hits = 0; - -$covLines = array(); -foreach( $report as $file => $lines ) { - - $pi = pathinfo( $file ); - - if ( $covFilter !== null ) { - if ( strpos( $file, $covFilter ) === false ) continue; - } else { - if ( strpos( $file, '/rb.php' ) === false) { - if ( strpos( $file, 'phar/' ) === false ) continue; - if ( strpos( $file, '.php' ) === false ) continue; - if ( strpos( $file, 'RedBeanPHP' ) === false ) continue; - } - } - - $covLines[] = '***** File:'.$file.' ******'; - - $fileData = file_get_contents( $file ); - $fileLines = explode( "\n", $fileData ); - $i = 1; - foreach( $fileLines as $covLine ) { - if ( isset( $lines [$i] ) ) { - if ( $lines[$i] === 1 ) { - $covLines[] = '[ OK ] '.$covLine; - $hits ++; - } else if ( $lines[$i] === -1 ){ - $covLines[] = '[ MISSED! ] '.$covLine; - $misses ++; - } else { - $covLines[] = '[ - ] '.$covLine; - } - } else { - $covLines[] = '[ - ] '.$covLine; - } - $i ++; - } -} -$covFile = implode( "\n", $covLines ); -@file_put_contents( 'cli/coverage_log.txt', $covFile ); - -if ( $hits > 0 ) { - $perc = ( $hits / ( $hits + $misses ) ) * 100; -} else { - $perc = 0; -} - -echo 'Code Coverage: '.PHP_EOL; -echo 'Hits: '.$hits.PHP_EOL; -echo 'Misses: '.$misses.PHP_EOL; -echo 'Percentage: '.$perc.' %'.PHP_EOL; -exit( 0 ); diff --git a/server/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php b/server/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php deleted file mode 100644 index ab86d265..00000000 --- a/server/vendor/gabordemooij/redbean/testing/cli/test_hook_example.php +++ /dev/null @@ -1,14 +0,0 @@ - add 1 additional path which will be searched for unit tests - * $extraTestsFromHook -> array with additional test packs (will be executed if you pass 'all' argument to CLI runner) - * - * - */ \ No newline at end of file diff --git a/server/vendor/gabordemooij/redbean/testing/cli/testcontainer/put-rb-file-here.txt b/server/vendor/gabordemooij/redbean/testing/cli/testcontainer/put-rb-file-here.txt deleted file mode 100644 index 796d8aac..00000000 --- a/server/vendor/gabordemooij/redbean/testing/cli/testcontainer/put-rb-file-here.txt +++ /dev/null @@ -1,5 +0,0 @@ -/* - -Put the rb.php file in this directory - -*/ diff --git a/server/vendor/gabordemooij/redbean/testing/config/test-dist.ini b/server/vendor/gabordemooij/redbean/testing/config/test-dist.ini deleted file mode 100644 index e2d1b8a4..00000000 --- a/server/vendor/gabordemooij/redbean/testing/config/test-dist.ini +++ /dev/null @@ -1,17 +0,0 @@ -; Test suite database config -; Rename this file to test.ini if you are done - -[mysql] -host = "localhost" -schema = "" -user = "" -pass = "" - -[pgsql] -host = "localhost" -schema = "" -user = "" -pass = "" - -[sqlite] -file = "/tmp/database.db" diff --git a/server/vendor/gabordemooij/redbean/testing/config/test-travis.ini b/server/vendor/gabordemooij/redbean/testing/config/test-travis.ini deleted file mode 100644 index f6dd1ed5..00000000 --- a/server/vendor/gabordemooij/redbean/testing/config/test-travis.ini +++ /dev/null @@ -1,18 +0,0 @@ -; Test suite database config -; Rename this file to test.ini if you are done - -[mysql] -host = "localhost" -schema = "oodb" -user = "root" -pass = "" - -[pgsql] -host = "localhost" -schema = "oodb" -user = "postgres" -pass = "" - -[sqlite] -file = "/tmp/oodb.db" - diff --git a/server/vendor/gabordemooij/redbean/testing/helpers/classes.php b/server/vendor/gabordemooij/redbean/testing/helpers/classes.php deleted file mode 100644 index d3a897b9..00000000 --- a/server/vendor/gabordemooij/redbean/testing/helpers/classes.php +++ /dev/null @@ -1,669 +0,0 @@ -signal( $eventname, $info ); - } -} - -/** - * Observer Mock - * This is just for testing - */ -class ObserverMock implements \RedBeanPHP\Observer -{ - /** - * @var bool - */ - public $event = FALSE; - - /** - * @var bool - */ - public $info = FALSE; - - /** - * @param string $event - * @param $info - */ - public function onEvent( $event, $info ) - { - $this->event = $event; - $this->info = $info; - } -} - -/** - * Shared helper class for tests. - * A test model to test FUSE functions. - */ -class Model_Band extends RedBeanPHP\SimpleModel -{ - public function after_update() { } - - private $notes = array(); - - /** - * @throws Exception - */ - public function update() - { - if ( count( $this->ownBandmember ) > 4 ) { - throw new Exception( 'too many!' ); - } - } - - /** - * @return string - */ - public function __toString() - { - return 'bigband'; - } - - /** - * @param $prop - * @param $value - */ - public function setProperty( $prop, $value ) - { - $this->$prop = $value; - } - - /** - * @param $prop - * - * @return bool - */ - public function checkProperty( $prop ) - { - return isset( $this->$prop ); - } - - /** - * Sets a note. - * - * @param string $note - * - * @param mixed $value - * - * @return void - */ - public function setNote( $note, $value ) - { - $this->notes[ $note ] = $value; - } - - /** - * Returns the value of a note. - * - * @param string $note - * - * @return string - */ - public function getNote( $note ) - { - return $this->notes[ $note ]; - } -} - -/** - * Shared helper class for tests. - * A Model class for testing Models/FUSE and related features. - */ -class Model_Box extends RedBeanPHP\SimpleModel -{ - public function delete() { $a = $this->bean->ownBottle; } -} - -/** - * Shared helper class for tests. - * A Model class for testing Models/FUSE and related features. - */ -class Model_Cocoa extends RedBeanPHP\SimpleModel -{ - public function update(){} -} - -/** - * Shared helper class for tests. - * A Model class for testing Models/FUSE and related features. - */ -class Model_Taste extends RedBeanPHP\SimpleModel -{ - public function after_update() - { - asrt( count( $this->bean->ownCocoa ), 0 ); - } -} - -/** - * Shared helper class for tests. - * A Model class for testing Models/FUSE and related features. - */ -class Model_Coffee extends RedBeanPHP\SimpleModel -{ - public function update() - { - while ( count( $this->bean->ownSugar ) > 3 ) { - array_pop( $this->bean->ownSugar ); - } - } -} - -/** - * Shared helper class for tests. - * A Model class for testing Models/FUSE and related features. - */ -class Model_Test extends RedBeanPHP\SimpleModel -{ - public function update() - { - if ( $this->bean->item->val ) { - $this->bean->item->val = 'Test2'; - $can = R::dispense( 'can' ); - $can->name = 'can for bean'; - $s = reset( $this->bean->sharedSpoon ); - $s->name = "S2"; - $this->bean->item->deep->name = '123'; - $this->bean->ownCan[] = $can; - $this->bean->sharedPeas = R::dispense( 'peas', 10 ); - $this->bean->ownChip = R::dispense( 'chip', 9 ); - } - } -} - -global $lifeCycle; - -/** - * Shared helper class for tests. - * A Model class for testing Models/FUSE and related features. - */ -class Model_Bandmember extends RedBeanPHP\SimpleModel -{ - public function open() - { - global $lifeCycle; - - $lifeCycle .= "\n called open: " . $this->id; - } - - public function dispense() - { - global $lifeCycle; - - $lifeCycle .= "\n called dispense() " . $this->bean; - } - - public function update() - { - global $lifeCycle; - - $lifeCycle .= "\n called update() " . $this->bean; - } - - public function after_update() - { - global $lifeCycle; - - $lifeCycle .= "\n called after_update() " . $this->bean; - } - - public function delete() - { - global $lifeCycle; - - $lifeCycle .= "\n called delete() " . $this->bean; - } - - public function after_delete() - { - global $lifeCycle; - - $lifeCycle .= "\n called after_delete() " . $this->bean; - } -} - -/** - * A model to box soup models :) - */ -class Model_Soup extends \RedBeanPHP\SimpleModel -{ - private $flavour = ''; - - public function taste() - { - return 'A bit too salty'; - } - - public function setFlavour( $flavour ) - { - $this->flavour = $flavour; - } - - public function getFlavour() - { - return $this->flavour; - } -} - -/** - * A custom BeanHelper to test custom FUSE operations. - */ -class SoupBeanHelper extends \RedBeanPHP\BeanHelper\SimpleFacadeBeanHelper -{ - /** - * Returns a model for a bean based on its type. - * - * @param OODBBean $bean - * - * @return object - */ - public function getModelForBean( \RedBeanPHP\OODBBean $bean ) - { - if ( $bean->getMeta( 'type' ) === 'meal' ) { - $model = new Model_Soup; - $model->loadBean( $bean ); - return $model; - } else { - return parent::getModelForBean( $bean ); - } - } -} - -/** - * Test Model. - */ -class Model_Boxedbean extends \RedBeanPHP\SimpleModel -{ -} - -/** - * Mock class for testing purposes. - */ -class Model_Ghost_House extends \RedBeanPHP\SimpleModel -{ - public static $deleted = FALSE; - - public function delete() - { - self::$deleted = TRUE; - } -} - -/** - * Mock class for testing purposes. - */ -class Model_Ghost_Ghost extends \RedBeanPHP\SimpleModel -{ - public static $deleted = FALSE; - - public function delete() - { - self::$deleted = TRUE; - } -} - -/** - * Mock class for testing purposes. - */ -class FaultyWriter extends \RedBeanPHP\QueryWriter\MySQL -{ - - protected $sqlState; - - /** - * Mock method. - * - * @param string $sqlState sql state - */ - public function setSQLState( $sqlState ) - { - $this->sqlState = $sqlState; - } - - /** - * Mock method - * - * @param string $sourceType destination type - * @param string $destType source type - * - * @throws SQL - */ - public function addUniqueConstraint( $sourceType, $destType ) - { - $exception = new \RedBeanPHP\RedException\SQL; - $exception->setSQLState( $this->sqlState ); - throw $exception; - } - - /** - * Mock method. - * Generates an exception when trying to invoke - * getKeyMapForType via getForeignKeyForTypeProperty. - * - * @return void - */ - protected function getKeyMapForType( $type ) - { - throw new \RedBeanPHP\RedException\SQL; - } -} - -/** - * Mock class to test default implementations in AQueryWriter. - */ -class NullWriter extends \RedBeanPHP\QueryWriter\AQueryWriter { -} - -class ProxyWriter extends \RedBeanPHP\QueryWriter\AQueryWriter { - - public static function callMethod( $object, $method, $arg1 = NULL, $arg2 = NULL, $arg3 = NULL ) { - return $object->$method( $arg1, $arg2, $arg3 ); - } - -} - -/** - * Mock class to test proper model name - * beautificattion for link table beans in FUSE. - */ -class Model_PageWidget extends RedBean_SimpleModel { - /** - * @var string - */ - private static $test = ''; - - /** - * Returns the test flag. - * - * @return string - */ - public static function getTestReport() - { - return self::$test; - } - - /** - * Update method to set the flag. - */ - public function update() - { - self::$test = 'didSave'; - } -} - -/** - * Mock class to test proper model name - * beautificattion for link table beans in FUSE. - */ -class Model_Gadget_Page extends RedBean_SimpleModel { - /** - * @var string - */ - private static $test = ''; - - /** - * Returns the test flag. - * - * @return string - */ - public static function getTestReport() - { - return self::$test; - } - - /** - * Update method to set the flag. - */ - public function update() - { - self::$test = 'didSave'; - } -} - -/** - * Mock class to test proper model name - * beautificattion for link table beans in FUSE. - */ -class Model_A_B_C extends RedBean_SimpleModel { - /** - * @var string - */ - private static $test = ''; - - /** - * Returns the test flag. - * - * @return string - */ - public static function getTestReport() - { - return self::$test; - } - - /** - * Update method to set the flag. - */ - public function update() - { - self::$test = 'didSave'; - } -} - -class Model_BookBook extends \RedBean_SimpleModel { - public function delete() { - asrt($this->bean->shelf, 'x13'); - } -} - -class Model_Feed extends \RedbeanPHP\SimpleModel { - public function update() { - $this->bean->post = json_encode($this->bean->post); - } - - public function open() { - $this->bean->post = json_decode($this->bean->post, true); - } -} - -/** - * UUID QueryWriter for MySQL for testing purposes. - */ -class UUIDWriterMySQL extends \RedBeanPHP\QueryWriter\MySQL { - - protected $defaultValue = '@uuid'; - const C_DATATYPE_SPECIAL_UUID = 97; - - public function __construct( \RedBeanPHP\Adapter $adapter ) - { - parent::__construct( $adapter ); - $this->addDataType( self::C_DATATYPE_SPECIAL_UUID, 'char(36)' ); - } - - public function createTable( $table ) - { - $table = $this->esc( $table ); - $sql = " - CREATE TABLE {$table} ( - id char(36) NOT NULL, - PRIMARY KEY ( id )) - ENGINE = InnoDB DEFAULT - CHARSET=utf8mb4 - COLLATE=utf8mb4_unicode_ci "; - $this->adapter->exec( $sql ); - } - - public function updateRecord($table, $updateValues, $id = NULL) - { - $flagNeedsReturnID = (!$id); - if ($flagNeedsReturnID) R::exec('SET @uuid = uuid() '); - $id = parent::updateRecord( $table, $updateValues, $id ); - if ( $flagNeedsReturnID ) $id = R::getCell('SELECT @uuid'); - return $id; - } - - public function getTypeForID() - { - return self::C_DATATYPE_SPECIAL_UUID; - } -} - -/** - * UUID QueryWriter for PostgreSQL for testing purposes. - */ -class UUIDWriterPostgres extends \RedBeanPHP\QueryWriter\PostgreSQL { - - protected $defaultValue = 'uuid_generate_v4()'; - const C_DATATYPE_SPECIAL_UUID = 97; - - public function __construct( \RedBeanPHP\Adapter $adapter ) - { - parent::__construct( $adapter ); - $this->addDataType( self::C_DATATYPE_SPECIAL_UUID, 'uuid' ); - } - - public function createTable( $table ) - { - $table = $this->esc( $table ); - $this->adapter->exec( " CREATE TABLE $table (id uuid PRIMARY KEY); " ); - } - - public function getTypeForID() - { - return self::C_DATATYPE_SPECIAL_UUID; - } -} - -class DiagnosticBean extends \RedBeanPHP\OODBBean { - - /** - * Returns current status of modification flags. - * - * @return string - */ - public function getModFlags() - { - $modFlags = ''; - if ($this->aliasName !== NULL) $modFlags .= 'a'; - if ($this->fetchType !== NULL) $modFlags .= 'f'; - if ($this->noLoad === TRUE) $modFlags .= 'n'; - if ($this->all === TRUE) $modFlags .= 'r'; - if ($this->withSql !== '') $modFlags .= 'w'; - - return $modFlags; - } - -} - -class DiagnosticModel extends \RedBeanPHP\SimpleModel -{ - - private $logs = array(); - - public function open() - { - $this->logs[] = array( - 'action' => 'open', - 'data' => array( - 'id' => $this->id - ) - ); - } - - public function dispense() - { - $this->logs[] = array( - 'action' => 'dispense', - 'data' => array( - 'bean' => $this->bean - ) - ); - } - - public function update() - { - $this->logs[] = array( - 'action' => 'update', - 'data' => array( - 'bean' => $this->bean - ) - ); - } - - public function after_update() - { - $this->logs[] = array( - 'action' => 'after_update', - 'data' => array( - 'bean' => $this->bean - ) - ); - } - - public function delete() - { - $this->logs[] = array( - 'action' => 'delete', - 'data' => array( - 'bean' => $this->bean - ) - ); - } - - public function after_delete() - { - $this->logs[] = array( - 'action' => 'after_delete', - 'data' => array( - 'bean' => $this->bean - ) - ); - } - - public function getLogs() - { - return $this->logs; - } - - public function getLogActionCount( $action = NULL ) - { - if ( is_null( $action ) ) return count( $this->logs ); - $counter = 0; - foreach( $this->logs as $log ) { - if ( $log['action'] == $action ) $counter ++; - } - return $counter; - } - - public function clearLog() - { - return $this->logs = array(); - } - - public function getDataFromLog( $logIndex = 0, $property ) - { - return $this->logs[$logIndex]['data'][$property]; - } - -} - -class Model_Probe extends DiagnosticModel {}; - -define('REDBEAN_OODBBEAN_CLASS', '\DiagnosticBean'); diff --git a/server/vendor/gabordemooij/redbean/testing/helpers/functions.php b/server/vendor/gabordemooij/redbean/testing/helpers/functions.php deleted file mode 100644 index cdde31e7..00000000 --- a/server/vendor/gabordemooij/redbean/testing/helpers/functions.php +++ /dev/null @@ -1,513 +0,0 @@ -" . $text; - } else { - echo "\n" . $text; - } -} - -/** - * Tests whether a === b. The minimalistic core of this little - * unit test framework. - * - * @global integer $tests - * - * @param mixed $a value for A - * @param mixed $b value for B - */ -function asrt( $a, $b ) -{ - if ( $a === $b ) { - global $tests; - - $tests++; - - print( "[" . $tests . "]" ); - } else { - printtext( "FAILED TEST: EXPECTED $b BUT GOT: $a " ); - - fail(); - } -} - -/** - * called when a test is passed. prints the test number to the screen. - */ -function pass() -{ - global $tests; - - $tests++; - - print( "[" . $tests . "]" ); -} - -/** - * called when a test fails. shows debug info and exits. - */ -function fail() -{ - printtext( "FAILED TEST" ); - - debug_print_backtrace(); - - exit( 1 ); -} - -/** - * prints out the name of the current test pack. - * - * @param string $name name of the test pack - */ -function testpack( $name ) -{ - printtext( "\n\tSub testpack: " . $name . " \n\t" ); -} - -/** - * prints out the name of the current test pack. - * - * @param string $name name of the test pack - */ -function maintestpack( $name ) -{ - printtext( "\n\nTestpack: " . $name . " \n\t" ); -} - -/** - * Quickly resolves the formatted table name - */ -function tbl( $table ) -{ - return R::$writer->getFormattedTableName( $table ); -} - -/** - * Quickly resolves the formatted ID - */ -function ID( $table ) -{ - return R::$writer->getIDField( $table ); -} - -/** - * Emulates legacy function for use with older tests. - */ -function set1toNAssoc( $a, \RedBeanPHP\OODBBean $bean1, \RedBeanPHP\OODBBean $bean2 ) -{ - $type = $bean1->getMeta( "type" ); - - $a->clearRelations( $bean2, $type ); - $a->associate( $bean1, $bean2 ); - - if ( count( $a->related( $bean2, $type ) ) === 1 ) { - // return $this; - } else { - throw new \RedBeanPHP\RedException\SQL( "Failed to enforce 1-N Relation for $type " ); - } -} - -/** - * Returns all property values of beans as a - * comma separated string sorted. - * - * @param array $beans beans - * @param string $property name of the property - * - * @return string $values values - */ -function getList( $beans, $property ) -{ - $items = array(); - - foreach ( $beans as $bean ) { - $items[] = $bean->$property; - } - - sort( $items ); - - return implode( ",", $items ); -} - -/** - * Helper function to test IDs - * - * @param array $array array - */ -function testids( $array ) -{ - foreach ( $array as $key => $bean ) { - asrt( intval( $key ), intval( $bean->getID() ) ); - } -} - -/** - * Group modifier function. Tests random modifications - * of groups of beans. For use with tests that test N:1 relation mapping - * features. - * - * @param mixed $book3 book - * @param mixed $quotes quotes - * @param mixed $pictures pictures - * @param mixed $topics topics - */ -function modgr( $book3, $quotes, $pictures, $topics ) -{ - $key = array_rand( $quotes ); - - $quote = $quotes[$key]; - - $keyPic = array_rand( $pictures ); - - $picture = $pictures[$keyPic]; - - $keyTop = array_rand( $topics ); - - $topic = $topics[$keyTop]; - - if ( rand( 0, 1 ) ) { - $f = 0; - - foreach ( $book3->ownQuote as $z ) { - if ( $z->note == $quote->note ) { - $f = 1; - - break; - } - } - if ( !$f ) { - //echo "\n add a quote "; - - $book3->ownQuote[] = $quote; - } - } - - if ( rand( 0, 1 ) ) { - $f = 0; - - foreach ( $book3->ownPicture as $z ) { - if ( $z->note == $picture->note ) { - $f = 1; - - break; - } - } - if ( !$f ) { - // echo "\n add a picture "; - - $book3->ownPicture[] = $picture; - } - } - - if ( rand( 0, 1 ) ) { - $f = 0; - - foreach ( $book3->sharedTopic as $z ) { - if ( $z->note == $topic->note ) { - $f = 1; - - break; - } - } - - if ( !$f ) { - $book3->sharedTopic[] = $topic; - } - } - - if ( rand( 0, 1 ) && count( $book3->ownQuote ) > 0 ) { - $key = array_rand( $book3->ownQuote ); - - unset( $book3->ownQuote[$key] ); - } - - if ( rand( 0, 1 ) && count( $book3->ownPicture ) > 0 ) { - $key = array_rand( $book3->ownPicture ); - - unset( $book3->ownPicture[$key] ); - } - - if ( rand( 0, 1 ) && count( $book3->sharedTopic ) > 0 ) { - $key = array_rand( $book3->sharedTopic ); - - unset( $book3->sharedTopic[$key] ); - } - - if ( rand( 0, 1 ) && count( $book3->ownPicture ) > 0 ) { - $key = array_rand( $book3->ownPicture ); - - $book3->ownPicture[$key]->change = rand( 0, 100 ); - } - - if ( rand( 0, 1 ) && count( $book3->ownQuote ) > 0 ) { - $key = array_rand( $book3->ownQuote ); - - $book3->ownQuote[$key]->change = 'note ch ' . rand( 0, 100 ); - } - - if ( rand( 0, 1 ) && count( $book3->sharedTopic ) > 0 ) { - $key = array_rand( $book3->sharedTopic ); - - $book3->sharedTopic[$key]->change = rand( 0, 100 ); - } -} - -/** - * SetGet function, sets a value in a bean and retrieves it again - * after storage, useful for tests that want to make sure the same value - * that gets in, comes out again. - * - * @param mixed $val the value that needs to be preserved - * - * @return mixed $val the value as returned after storage-retrieval cycle. - */ -function setget( $val ) -{ - R::nuke(); - - $bean = R::dispense( "page" ); - - $bean->prop = $val; - - $id = R::store( $bean ); - - $bean = R::load( "page", $id ); - - return $bean->prop; -} - -/** - * Wrapper function to test BeanCan Server, does the boring - * plumming work. - * - * @param mixed $data Data for JSON-RPC request object - * @param mixed $params Parameters for JSON-RPC request object - * @param string $id Identification of JSON-RPC request to connect to response - * - * @return string $out Output JSON from BeanCan server. - */ -function fakeBeanCanServerRequest( $data, $params = NULL, $id = "1234", $whiteList = 'all' ) -{ - $j = array( - "jsonrpc" => "2.0", - "method" => $data, - "params" => $params, - "id" => $id - ); - - $can = new \RedBeanPHP\Plugin\BeanCan; - - $request = json_encode( $j ); - - $can->setWhitelist( $whiteList ); - - $out = $can->handleJSONRequest( $request ); - - return $out; -} - -/** - * Candy Cane Factory. Produces lots of candy canes. - * - * @return array $canes canes - */ -function candy_canes() -{ - $canes = R::dispense( 'cane', 10 ); - - $i = 0; - - foreach ( $canes as $k => $cane ) { - $canes[$k]->label = 'Cane No. ' . ( $i++ ); - } - - $canes[0]->cane = $canes[1]; - $canes[1]->cane = $canes[4]; - $canes[9]->cane = $canes[4]; - $canes[6]->cane = $canes[4]; - $canes[4]->cane = $canes[7]; - $canes[8]->cane = $canes[7]; - - return $canes; -} - -/** - * Returns an array containing the index names of all - * indexes on the specified table name. - * - * @param $tableNoQ table name without quotes or backticks - * - * @return array - */ -function getIndexes( $tableNoQ ) -{ - $writer = R::getWriter(); - - if ( ( $writer instanceof \RedBeanPHP\QueryWriter\MySQL ) || ( $writer instanceof \RedBeanPHP\QueryWriter\CUBRID ) ) { - $indexes = array(); - $list = R::getAll( "SHOW INDEX FROM `{$tableNoQ}`" ); - foreach( $list as $listItem ) { - $indexes[] = $listItem['Key_name']; - } - return $indexes; - } - - if ( ( $writer instanceof \RedBeanPHP\QueryWriter\SQLiteT ) ) { - $indexes = array(); - $list = R::getAll( " pragma index_list(`{$tableNoQ}`) " ); - foreach( $list as $listItem ) { - $indexes[] = $listItem['name']; - } - return $indexes; - } - - if ( ( $writer instanceof \RedBeanPHP\QueryWriter\PostgreSQL ) ) { - return R::getCol( " SELECT indexname FROM pg_indexes WHERE tablename = '{$tableNoQ}' AND schemaname = 'public' " ); - } - - return array(); -} - -function are_cols_in_unique( $type, $properties ) -{ - sort( $properties ); - $propertyFootprint = implode( ',', $properties ); - $uniques = get_uniques_for_type( $type ); - foreach( $uniques as $unique ) { - sort( $unique ); - $uniqueFootprint = implode( ',', $unique ); - if ( $uniqueFootprint === $propertyFootprint ) return TRUE; - } - return FALSE; -} - -function get_uniques_for_type( $type ) -{ - $list = array(); - $writer = R::getWriter(); - $adapter = R::getDatabaseAdapter(); - global $currentDriver; - switch( $currentDriver ) { - case 'mysql': - $table = $writer->esc( $type, TRUE ); - $columns = $adapter->get(' - SELECT - information_schema.key_column_usage.constraint_name, - information_schema.key_column_usage.column_name - FROM - information_schema.table_constraints - INNER JOIN information_schema.key_column_usage - ON ( - information_schema.table_constraints.constraint_name = information_schema.key_column_usage.constraint_name - AND information_schema.table_constraints.constraint_schema = information_schema.key_column_usage.constraint_schema - AND information_schema.table_constraints.constraint_catalog = information_schema.key_column_usage.constraint_catalog - ) - WHERE - information_schema.table_constraints.table_schema IN (SELECT DATABASE()) - AND information_schema.table_constraints.table_name = ? - AND information_schema.table_constraints.constraint_type = \'UNIQUE\' - ', array( $table ) ); - $uniques = array(); - foreach( $columns as $column ) { - if ( !isset( $uniques[ $column['constraint_name'] ] ) ) $uniques[ $column['constraint_name'] ] = array(); - $uniques[ $column['constraint_name'] ][] = $column['column_name']; - } - $list = $uniques; - break; - case 'pgsql': - $table = $writer->esc( $type, TRUE ); - $columns = $adapter->get(' - SELECT - information_schema.key_column_usage.constraint_name, - information_schema.key_column_usage.column_name - FROM - information_schema.table_constraints - INNER JOIN information_schema.key_column_usage - ON ( - information_schema.table_constraints.constraint_name = information_schema.key_column_usage.constraint_name - AND information_schema.table_constraints.constraint_schema = information_schema.key_column_usage.constraint_schema - AND information_schema.table_constraints.constraint_catalog = information_schema.key_column_usage.constraint_catalog - ) - WHERE - information_schema.table_constraints.table_catalog = current_database() - AND information_schema.key_column_usage.table_schema = ANY( current_schemas( FALSE ) ) - AND information_schema.table_constraints.table_name = ? - AND information_schema.table_constraints.constraint_type = \'UNIQUE\' - ', array( $table ) ); - $uniques = array(); - foreach( $columns as $column ) { - if ( !isset( $uniques[ $column['constraint_name'] ] ) ) $uniques[ $column['constraint_name'] ] = array(); - $uniques[ $column['constraint_name'] ][] = $column['column_name']; - } - $list= $uniques; - break; - case 'sqlite': - $uniques = array(); - $table = $writer->esc( $type, TRUE ); - $indexes = $adapter->get( "PRAGMA index_list({$table})" ); - foreach( $indexes as $index ) { - if ( $index['unique'] == 1 ) { - $info = $adapter->get( "PRAGMA index_info({$index['name']})" ); - if ( !isset( $uniques[$index['name']] ) ) $uniques[$index['name']] = array(); - foreach( $info as $piece ) { - $uniques[$index['name']][] = $piece['name']; - } - } - } - $list = $uniques; - break; - case 'CUBRID': - try { - $sqlCode = $adapter->get("SHOW CREATE TABLE `{$type}`"); - } catch ( \Exception $e ) { - $sqlCode = ''; - } - if (!isset($sqlCode[0])) return array(); - $matches = array(); - preg_match_all('/CONSTRAINT\s+\[([\w_]+)\]\s+UNIQUE\s+KEY\s+\(([^\)]+)\)/', $sqlCode[0]['CREATE TABLE'], $matches); - $list = array(); - if (!isset($matches[0])) return $list; - $max = count($matches[0]); - for($i = 0; $i < $max; $i++) { - $columns = explode(',', $matches[2][$i]); - foreach( $columns as $key => $column ) { - $columns[$key] = trim( $column, '[] '); - } - $list[ $matches[1][$i] ] = $columns; - } - break; - } - return $list; -} diff --git a/server/vendor/gabordemooij/redbean/testing/notes.txt b/server/vendor/gabordemooij/redbean/testing/notes.txt deleted file mode 100644 index c3ea8104..00000000 --- a/server/vendor/gabordemooij/redbean/testing/notes.txt +++ /dev/null @@ -1,8 +0,0 @@ - -Test notes -========== - -* PostgreSQL tests perform a text-to-money cast test, make sure lc_monetary is set to en_US -in your postgres.conf -* PostgreSQL tests need the ossp extension, to enable this, install the postgres-contrib package and run SQL: CREATE EXTENSION "uuid-ossp"; -* XDebug is NOT required but recommended diff --git a/server/vendor/gabordemooij/redbean/testing/readme.txt b/server/vendor/gabordemooij/redbean/testing/readme.txt deleted file mode 100644 index 82d6feed..00000000 --- a/server/vendor/gabordemooij/redbean/testing/readme.txt +++ /dev/null @@ -1,11 +0,0 @@ - - -To start testing add PHP Coverage lib: - - -testing/cli/phpcoverage.inc.php -testing/phpcoverage/ - - -Download from: -http://sourceforge.net/projects/phpcoverage/ \ No newline at end of file diff --git a/server/vendor/myclabs/deep-copy/.gitattributes b/server/vendor/myclabs/deep-copy/.gitattributes deleted file mode 100755 index 8018068b..00000000 --- a/server/vendor/myclabs/deep-copy/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -*.png binary - -tests/ export-ignore -phpunit.xml.dist export-ignore diff --git a/server/vendor/myclabs/deep-copy/.gitignore b/server/vendor/myclabs/deep-copy/.gitignore deleted file mode 100755 index 93541710..00000000 --- a/server/vendor/myclabs/deep-copy/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -.idea/* - -vendor/* -composer.phar -composer.lock diff --git a/server/vendor/myclabs/deep-copy/.travis.yml b/server/vendor/myclabs/deep-copy/.travis.yml deleted file mode 100755 index 4b9c7c05..00000000 --- a/server/vendor/myclabs/deep-copy/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php - -php: - - 5.4 - - 5.5 - - 5.6 - - hhvm - -matrix: - allow_failures: - - php: hhvm - -install: - - composer install - - composer require satooshi/php-coveralls:dev-master --dev --no-progress - -before_script: - - mkdir -p build/logs - -script: - - phpunit --coverage-clover build/logs/clover.xml - -after_script: - - php vendor/bin/coveralls -v diff --git a/server/vendor/myclabs/deep-copy/LICENSE b/server/vendor/myclabs/deep-copy/LICENSE deleted file mode 100644 index c3e83500..00000000 --- a/server/vendor/myclabs/deep-copy/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 My C-Sense - -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/server/vendor/myclabs/deep-copy/README.md b/server/vendor/myclabs/deep-copy/README.md deleted file mode 100644 index a9d70f6b..00000000 --- a/server/vendor/myclabs/deep-copy/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# DeepCopy - -DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph. - -[![Build Status](https://travis-ci.org/myclabs/DeepCopy.png?branch=master)](https://travis-ci.org/myclabs/DeepCopy) [![Coverage Status](https://coveralls.io/repos/myclabs/DeepCopy/badge.png?branch=master)](https://coveralls.io/r/myclabs/DeepCopy?branch=master) [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/myclabs/DeepCopy/badges/quality-score.png?s=2747100c19b275f93a777e3297c6c12d1b68b934)](https://scrutinizer-ci.com/g/myclabs/DeepCopy/) -[![Total Downloads](https://poser.pugx.org/myclabs/deep-copy/downloads.svg)](https://packagist.org/packages/myclabs/deep-copy) - - -## How? - -Install with Composer: - -```json -composer require myclabs/deep-copy -``` - -Use simply: - -```php -use DeepCopy\DeepCopy; - -$deepCopy = new DeepCopy(); -$myCopy = $deepCopy->copy($myObject); -``` - - -## Why? - -- How do you create copies of your objects? - -```php -$myCopy = clone $myObject; -``` - -- How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)? - -You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior yourself. - -- But how do you handle **cycles** in the association graph? - -Now you're in for a big mess :( - -![association graph](doc/graph.png) - -### Using simply `clone` - -![Using clone](doc/clone.png) - -### Overridding `__clone()` - -![Overridding __clone](doc/deep-clone.png) - -### With DeepCopy - -![With DeepCopy](doc/deep-copy.png) - - -## How it works - -DeepCopy traverses recursively all your object's properties and clones them. - -To avoid cloning the same object twice (and thus, keep you object graph), it keeps a hash-map of all instances. - - -## Going further - -You can add filters to customize the copy process. - -The method to add a filter is `$deepCopy->addFilter($filter, $matcher)`, -with `$filter` implementing `DeepCopy\Filter\Filter` -and `$matcher` implementing `DeepCopy\Matcher\Matcher`. - -We provide some generic filters and matchers. - -### Matchers - -#### Property name - -The `PropertyNameMatcher` will match a property by its name: - -```php -use DeepCopy\Matcher\PropertyNameMatcher; - -$matcher = new PropertyNameMatcher('id'); -// will apply a filter to any property of any objects named "id" -``` - -#### Specific property - -The `PropertyMatcher` will match a specific property of a specific class: - -```php -use DeepCopy\Matcher\PropertyMatcher; - -$matcher = new PropertyMatcher('MyClass', 'id'); -// will apply a filter to the property "id" of any objects of the class "MyClass" -``` - -#### Property type - -The `PropertyTypeMatcher` will match a property by its type (instance of a class): - -```php -use DeepCopy\Matcher\PropertyTypeMatcher; - -$matcher = new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'); -// will apply a filter to any property that is an instance of Doctrine\Common\Collections\Collection -``` - -### Filters - -#### `SetNullFilter` - -Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have any ID: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\SetNullFilter; -use DeepCopy\Matcher\PropertyNameMatcher; - -$myObject = MyClass::load(123); -echo $myObject->id; // 123 - -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new SetNullFilter(), new PropertyNameMatcher('id')); -$myCopy = $deepCopy->copy($myObject); - -echo $myCopy->id; // null -``` - -#### `KeepFilter` - -If you want a property to remain untouched (for example, an association to an object): - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\KeepFilter; -use DeepCopy\Matcher\PropertyMatcher; - -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category')); -$myCopy = $deepCopy->copy($myObject); - -// $myCopy->category has not been touched -``` - -#### `ReplaceFilter` - -If you want to replace the value of a property: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\ReplaceFilter; -use DeepCopy\Matcher\PropertyMatcher; - -$deepCopy = new DeepCopy(); -$callback = function ($currentValue) { - return $currentValue . ' (copy)' -}; -$deepCopy->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title')); -$myCopy = $deepCopy->copy($myObject); - -// $myCopy->title will contain the data returned by the callback, e.g. 'The title (copy)' -``` - -The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable. - - -#### `DoctrineCollectionFilter` - -If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`: - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter; -use DeepCopy\Matcher\PropertyTypeMatcher; - -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection')); -$myCopy = $deepCopy->copy($myObject); -``` - -#### `DoctrineEmptyCollectionFilter` - -If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the `DoctrineEmptyCollectionFilter` - -```php -use DeepCopy\DeepCopy; -use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter; -use DeepCopy\Matcher\PropertyMatcher; - -$deepCopy = new DeepCopy(); -$deepCopy->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty')); -$myCopy = $deepCopy->copy($myObject); - -// $myCopy->myProperty will return an empty collection -``` - -## Contributing - -DeepCopy is distributed under the MIT license. - -### Tests - -Running the tests is simple: - -```php -phpunit -``` diff --git a/server/vendor/myclabs/deep-copy/composer.json b/server/vendor/myclabs/deep-copy/composer.json deleted file mode 100644 index d20287ab..00000000 --- a/server/vendor/myclabs/deep-copy/composer.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "myclabs/deep-copy", - "type": "library", - "description": "Create deep copies (clones) of your objects", - "keywords": ["clone", "copy", "duplicate", "object", "object graph"], - "homepage": "https://github.com/myclabs/DeepCopy", - "license": "MIT", - "autoload": { - "psr-4": { "DeepCopy\\": "src/DeepCopy/" } - }, - "autoload-dev": { - "psr-4": { "DeepCopyTest\\": "tests/DeepCopyTest/" } - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "doctrine/collections": "1.*", - "phpunit/phpunit": "~4.1" - } -} diff --git a/server/vendor/myclabs/deep-copy/doc/clone.png b/server/vendor/myclabs/deep-copy/doc/clone.png deleted file mode 100644 index 376afd491257d44a8c3772b0b7b0bd7b6c747086..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12380 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�+9eLb17NhZax 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 diff --git a/server/vendor/myclabs/deep-copy/doc/graph.png b/server/vendor/myclabs/deep-copy/doc/graph.png deleted file mode 100644 index 4d5c9428f719bf6ad68f25a46d6e935c2362c4a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6436 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 diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php deleted file mode 100644 index 3e9092b8..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php +++ /dev/null @@ -1,223 +0,0 @@ -skipUncloneable = $skipUncloneable; - return $this; - } - - /** - * Perform a deep copy of the object. - * @param mixed $object - * @return mixed - */ - public function copy($object) - { - $this->hashMap = []; - - return $this->recursiveCopy($object); - } - - public function addFilter(Filter $filter, Matcher $matcher) - { - $this->filters[] = [ - 'matcher' => $matcher, - 'filter' => $filter, - ]; - } - - public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher) - { - $this->typeFilters[] = [ - 'matcher' => $matcher, - 'filter' => $filter, - ]; - } - - - private function recursiveCopy($var) - { - // Matches Type Filter - if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) { - return $filter->apply($var); - } - - // Resource - if (is_resource($var)) { - return $var; - } - // Array - if (is_array($var)) { - return $this->copyArray($var); - } - // Scalar - if (! is_object($var)) { - return $var; - } - // Object - return $this->copyObject($var); - } - - /** - * Copy an array - * @param array $array - * @return array - */ - private function copyArray(array $array) - { - $copier = function($item) { - return $this->recursiveCopy($item); - }; - - return array_map($copier, $array); - } - - /** - * Copy an object - * @param object $object - * @return object - */ - private function copyObject($object) - { - $objectHash = spl_object_hash($object); - - if (isset($this->hashMap[$objectHash])) { - return $this->hashMap[$objectHash]; - } - - $reflectedObject = new \ReflectionObject($object); - - if (false === $isCloneable = $reflectedObject->isCloneable() and $this->skipUncloneable) { - $this->hashMap[$objectHash] = $object; - return $object; - } - - if (false === $isCloneable) { - throw new CloneException(sprintf( - 'Class "%s" is not cloneable.', - $object->getName() - )); - } - - $newObject = clone $object; - $this->hashMap[$objectHash] = $newObject; - - foreach (ReflectionHelper::getProperties($reflectedObject) as $property) { - $this->copyObjectProperty($newObject, $property); - } - - return $newObject; - } - - private function copyObjectProperty($object, ReflectionProperty $property) - { - // Ignore static properties - if ($property->isStatic()) { - return; - } - - // Apply the filters - foreach ($this->filters as $item) { - /** @var Matcher $matcher */ - $matcher = $item['matcher']; - /** @var Filter $filter */ - $filter = $item['filter']; - - if ($matcher->matches($object, $property->getName())) { - $filter->apply( - $object, - $property->getName(), - function ($object) { - return $this->recursiveCopy($object); - } - ); - // If a filter matches, we stop processing this property - return; - } - } - - $property->setAccessible(true); - $propertyValue = $property->getValue($object); - - // Copy the property - $property->setValue($object, $this->recursiveCopy($propertyValue)); - } - - /** - * Returns first filter that matches variable, NULL if no such filter found. - * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and - * 'matcher' with value of type {@see TypeMatcher} - * @param mixed $var - * @return TypeFilter|null - */ - private function getFirstMatchedTypeFilter(array $filterRecords, $var) - { - $matched = $this->first( - $filterRecords, - function (array $record) use ($var) { - /* @var TypeMatcher $matcher */ - $matcher = $record['matcher']; - - return $matcher->matches($var); - } - ); - - return isset($matched) ? $matched['filter'] : null; - } - - /** - * Returns first element that matches predicate, NULL if no such element found. - * @param array $elements - * @param callable $predicate Predicate arguments are: element. - * @return mixed|null - */ - private function first(array $elements, callable $predicate) - { - foreach ($elements as $element) { - if (call_user_func($predicate, $element)) { - return $element; - } - } - - return null; - } -} diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php deleted file mode 100644 index dd3b617b..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php +++ /dev/null @@ -1,6 +0,0 @@ -setAccessible(true); - $oldCollection = $reflectionProperty->getValue($object); - - $newCollection = $oldCollection->map( - function ($item) use ($objectCopier) { - return $objectCopier($item); - } - ); - - $reflectionProperty->setValue($object, $newCollection); - } -} diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php deleted file mode 100644 index f9b3f7ac..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php +++ /dev/null @@ -1,24 +0,0 @@ -setAccessible(true); - - $reflectionProperty->setValue($object, new ArrayCollection()); - } -} \ No newline at end of file diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php deleted file mode 100644 index 48076a1b..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php +++ /dev/null @@ -1,17 +0,0 @@ -callback = $callable; - } - - /** - * {@inheritdoc} - */ - public function apply($object, $property, $objectCopier) - { - $reflectionProperty = new \ReflectionProperty($object, $property); - $reflectionProperty->setAccessible(true); - - $value = call_user_func($this->callback, $reflectionProperty->getValue($object)); - - $reflectionProperty->setValue($object, $value); - } -} diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php deleted file mode 100644 index d48f15b6..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php +++ /dev/null @@ -1,22 +0,0 @@ -setAccessible(true); - $reflectionProperty->setValue($object, null); - } -} diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php deleted file mode 100644 index 91eb7c90..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Matcher.php +++ /dev/null @@ -1,16 +0,0 @@ -class = $class; - $this->property = $property; - } - - /** - * {@inheritdoc} - */ - public function matches($object, $property) - { - return ($object instanceof $this->class) && ($property == $this->property); - } -} diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php deleted file mode 100644 index 9d9575f0..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php +++ /dev/null @@ -1,30 +0,0 @@ -property = $property; - } - - /** - * {@inheritdoc} - */ - public function matches($object, $property) - { - return $property == $this->property; - } -} diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php deleted file mode 100644 index 6935541d..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php +++ /dev/null @@ -1,38 +0,0 @@ -propertyType = $propertyType; - } - - /** - * {@inheritdoc} - */ - public function matches($object, $property) - { - $reflectionProperty = new ReflectionProperty($object, $property); - $reflectionProperty->setAccessible(true); - - return $reflectionProperty->getValue($object) instanceof $this->propertyType; - } -} diff --git a/server/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/server/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php deleted file mode 100644 index 110acaf8..00000000 --- a/server/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php +++ /dev/null @@ -1,36 +0,0 @@ -getProperties() does not return private properties from ancestor classes. - * - * @author muratyaman@gmail.com - * @see http://php.net/manual/en/reflectionclass.getproperties.php - * - * @param \ReflectionClass $ref - * @return \ReflectionProperty[] - */ - public static function getProperties(\ReflectionClass $ref) - { - $props = $ref->getProperties(); - $propsArr = array(); - - foreach ($props as $prop) { - $f = $prop->getName(); - $propsArr[$f] = $prop; - } - - if ($parentClass = $ref->getParentClass()) { - $parentPropsArr = self::getProperties($parentClass); - if (count($parentPropsArr) > 0) { - $propsArr = array_merge($parentPropsArr, $propsArr); - } - } - return $propsArr; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/.gitignore b/server/vendor/phpdocumentor/reflection-docblock/.gitignore deleted file mode 100644 index 3ce5adbb..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.idea -vendor diff --git a/server/vendor/phpdocumentor/reflection-docblock/.travis.yml b/server/vendor/phpdocumentor/reflection-docblock/.travis.yml deleted file mode 100644 index eef782c4..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/.travis.yml +++ /dev/null @@ -1,32 +0,0 @@ -language: php -php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - - hhvm-nightly - -matrix: - allow_failures: - - php: hhvm - - php: hhvm-nightly - -script: - - vendor/bin/phpunit - -before_script: - - sudo apt-get -qq update > /dev/null - - phpenv rehash > /dev/null - - composer selfupdate --quiet - - composer install --no-interaction --prefer-source --dev - - vendor/bin/phpunit - - composer update --no-interaction --prefer-source --dev - -notifications: - irc: "irc.freenode.org#phpdocumentor" - email: - - mike.vanriel@naenius.com - - ashnazg@php.net - - boen.robot@gmail.com diff --git a/server/vendor/phpdocumentor/reflection-docblock/LICENSE b/server/vendor/phpdocumentor/reflection-docblock/LICENSE deleted file mode 100644 index 792e4040..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2010 Mike van Riel - -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/server/vendor/phpdocumentor/reflection-docblock/README.md b/server/vendor/phpdocumentor/reflection-docblock/README.md deleted file mode 100644 index 6405d1a1..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/README.md +++ /dev/null @@ -1,57 +0,0 @@ -The ReflectionDocBlock Component [![Build Status](https://secure.travis-ci.org/phpDocumentor/ReflectionDocBlock.png)](https://travis-ci.org/phpDocumentor/ReflectionDocBlock) -================================ - -Introduction ------------- - -The ReflectionDocBlock component of phpDocumentor provides a DocBlock parser -that is 100% compatible with the [PHPDoc standard](http://phpdoc.org/docs/latest). - -With this component, a library can provide support for annotations via DocBlocks -or otherwise retrieve information that is embedded in a DocBlock. - -> **Note**: *this is a core component of phpDocumentor and is constantly being -> optimized for performance.* - -Installation ------------- - -You can install the component in the following ways: - -* Use the official Github repository (https://github.com/phpDocumentor/ReflectionDocBlock) -* Via Composer (http://packagist.org/packages/phpdocumentor/reflection-docblock) - -Usage ------ - -The ReflectionDocBlock component is designed to work in an identical fashion to -PHP's own Reflection extension (http://php.net/manual/en/book.reflection.php). - -Parsing can be initiated by instantiating the -`\phpDocumentor\Reflection\DocBlock()` class and passing it a string containing -a DocBlock (including asterisks) or by passing an object supporting the -`getDocComment()` method. - -> *Examples of objects having the `getDocComment()` method are the -> `ReflectionClass` and the `ReflectionMethod` classes of the PHP -> Reflection extension* - -Example: - - $class = new ReflectionClass('MyClass'); - $phpdoc = new \phpDocumentor\Reflection\DocBlock($class); - -or - - $docblock = <<=5.3.3" - }, - "autoload": { - "psr-0": {"phpDocumentor": ["src/"]} - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/composer.lock b/server/vendor/phpdocumentor/reflection-docblock/composer.lock deleted file mode 100644 index 4c6a8bb7..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/composer.lock +++ /dev/null @@ -1,827 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "ea1734d11b8c878445c2c6e58de8b85f", - "packages": [], - "packages-dev": [ - { - "name": "ocramius/instantiator", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/Instantiator.git", - "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/Instantiator/zipball/a7abbb5fc9df6e7126af741dd6c140d1a7369435", - "reference": "a7abbb5fc9df6e7126af741dd6c140d1a7369435", - "shasum": "" - }, - "require": { - "ocramius/lazy-map": "1.0.*", - "php": "~5.3" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Instantiator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/Ocramius/Instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2014-08-14 15:10:55" - }, - { - "name": "ocramius/lazy-map", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/LazyMap.git", - "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/LazyMap/zipball/7fe3d347f5e618bcea7d39345ff83f3651d8b752", - "reference": "7fe3d347f5e618bcea7d39345ff83f3651d8b752", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "athletic/athletic": "~0.1.6", - "phpmd/phpmd": "1.5.*", - "phpunit/phpunit": ">=3.7", - "satooshi/php-coveralls": "~0.6", - "squizlabs/php_codesniffer": "1.4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "LazyMap\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/", - "role": "Developer" - } - ], - "description": "A library that provides lazy instantiation logic for a map of objects", - "homepage": "https://github.com/Ocramius/LazyMap", - "keywords": [ - "lazy", - "lazy instantiation", - "lazy loading", - "map", - "service location" - ], - "time": "2013-11-09 22:30:54" - }, - { - "name": "phpunit/php-code-coverage", - "version": "2.0.10", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6d196af48e8c100a3ae881940123e693da5a9217" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6d196af48e8c100a3ae881940123e693da5a9217", - "reference": "6d196af48e8c100a3ae881940123e693da5a9217", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3.1", - "phpunit/php-text-template": "~1.2.0", - "phpunit/php-token-stream": "~1.2.2", - "sebastian/environment": "~1.0.0", - "sebastian/version": "~1.0.3" - }, - "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4.0.14" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "time": "2014-08-06 06:39:42" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.3.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "File/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2013-10-10 15:34:57" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "Text/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2014-01-30 17:20:04" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2013-08-02 07:42:54" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "classmap": [ - "PHP/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2014-03-03 05:10:30" - }, - { - "name": "phpunit/phpunit", - "version": "4.2.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a33fa68ece9f8c68589bfc2da8d2794e27b820bc", - "reference": "a33fa68ece9f8c68589bfc2da8d2794e27b820bc", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpunit/php-code-coverage": "~2.0", - "phpunit/php-file-iterator": "~1.3.1", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "~1.0.2", - "phpunit/phpunit-mock-objects": "~2.2", - "sebastian/comparator": "~1.0", - "sebastian/diff": "~1.1", - "sebastian/environment": "~1.0", - "sebastian/exporter": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" - }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2014-08-18 05:12:30" - }, - { - "name": "phpunit/phpunit-mock-objects", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "42e589e08bc86e3e9bdf20d385e948347788505b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/42e589e08bc86e3e9bdf20d385e948347788505b", - "reference": "42e589e08bc86e3e9bdf20d385e948347788505b", - "shasum": "" - }, - "require": { - "ocramius/instantiator": "~1.0", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "4.2.*@dev" - }, - "suggest": { - "ext-soap": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", - "keywords": [ - "mock", - "xunit" - ], - "time": "2014-08-02 13:50:58" - }, - { - "name": "sebastian/comparator", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2", - "reference": "f7069ee51fa9fb6c038e16a9d0e3439f5449dcf2", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.1", - "sebastian/exporter": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2014-05-02 07:05:58" - }, - { - "name": "sebastian/diff", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d", - "reference": "1e091702a5a38e6b4c1ba9ca816e3dd343df2e2d", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2013-08-03 16:46:33" - }, - { - "name": "sebastian/environment", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/79517609ec01139cd7e9fded0dd7ce08c952ef6a", - "reference": "79517609ec01139cd7e9fded0dd7ce08c952ef6a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "time": "2014-02-18 16:17:19" - }, - { - "name": "sebastian/exporter", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529", - "reference": "1f9a98e6f5dfe0524cb8c6166f7c82f3e9ae1529", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "4.0.*@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net", - "role": "Lead" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2014-02-16 08:26:31" - }, - { - "name": "sebastian/version", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "time": "2014-03-07 15:35:33" - }, - { - "name": "symfony/yaml", - "version": "v2.5.3", - "target-dir": "Symfony/Component/Yaml", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", - "reference": "5a75366ae9ca8b4792cd0083e4ca4dff9fe96f1f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2014-08-05 09:00:40" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "platform": { - "php": ">=5.3.3" - }, - "platform-dev": [] -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist b/server/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist deleted file mode 100644 index f67ad2a2..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/phpunit.xml.dist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - ./tests/ - - - - - ./src/ - - - diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php deleted file mode 100644 index 02968b16..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock.php +++ /dev/null @@ -1,468 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use phpDocumentor\Reflection\DocBlock\Tag; -use phpDocumentor\Reflection\DocBlock\Context; -use phpDocumentor\Reflection\DocBlock\Location; - -/** - * Parses the DocBlock for any structure. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class DocBlock implements \Reflector -{ - /** @var string The opening line for this docblock. */ - protected $short_description = ''; - - /** - * @var DocBlock\Description The actual - * description for this docblock. - */ - protected $long_description = null; - - /** - * @var Tag[] An array containing all - * the tags in this docblock; except inline. - */ - protected $tags = array(); - - /** @var Context Information about the context of this DocBlock. */ - protected $context = null; - - /** @var Location Information about the location of this DocBlock. */ - protected $location = null; - - /** @var bool Is this DocBlock (the start of) a template? */ - protected $isTemplateStart = false; - - /** @var bool Does this DocBlock signify the end of a DocBlock template? */ - protected $isTemplateEnd = false; - - /** - * Parses the given docblock and populates the member fields. - * - * The constructor may also receive namespace information such as the - * current namespace and aliases. This information is used by some tags - * (e.g. @return, @param, etc.) to turn a relative Type into a FQCN. - * - * @param \Reflector|string $docblock A docblock comment (including - * asterisks) or reflector supporting the getDocComment method. - * @param Context $context The context in which the DocBlock - * occurs. - * @param Location $location The location within the file that this - * DocBlock occurs in. - * - * @throws \InvalidArgumentException if the given argument does not have the - * getDocComment method. - */ - public function __construct( - $docblock, - Context $context = null, - Location $location = null - ) { - if (is_object($docblock)) { - if (!method_exists($docblock, 'getDocComment')) { - throw new \InvalidArgumentException( - 'Invalid object passed; the given reflector must support ' - . 'the getDocComment method' - ); - } - - $docblock = $docblock->getDocComment(); - } - - $docblock = $this->cleanInput($docblock); - - list($templateMarker, $short, $long, $tags) = $this->splitDocBlock($docblock); - $this->isTemplateStart = $templateMarker === '#@+'; - $this->isTemplateEnd = $templateMarker === '#@-'; - $this->short_description = $short; - $this->long_description = new DocBlock\Description($long, $this); - $this->parseTags($tags); - - $this->context = $context; - $this->location = $location; - } - - /** - * Strips the asterisks from the DocBlock comment. - * - * @param string $comment String containing the comment text. - * - * @return string - */ - protected function cleanInput($comment) - { - $comment = trim( - preg_replace( - '#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', - '$1', - $comment - ) - ); - - // reg ex above is not able to remove */ from a single line docblock - if (substr($comment, -2) == '*/') { - $comment = trim(substr($comment, 0, -2)); - } - - // normalize strings - $comment = str_replace(array("\r\n", "\r"), "\n", $comment); - - return $comment; - } - - /** - * Splits the DocBlock into a template marker, summary, description and block of tags. - * - * @param string $comment Comment to split into the sub-parts. - * - * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split. - * @author Mike van Riel for extending the regex with template marker support. - * - * @return string[] containing the template marker (if any), summary, description and a string containing the tags. - */ - protected function splitDocBlock($comment) - { - // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This - // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the - // performance impact of running a regular expression - if (strpos($comment, '@') === 0) { - return array('', '', '', $comment); - } - - // clears all extra horizontal whitespace from the line endings to prevent parsing issues - $comment = preg_replace('/\h*$/Sum', '', $comment); - - /* - * Splits the docblock into a template marker, short description, long description and tags section - * - * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may - * occur after it and will be stripped). - * - The short description is started from the first character until a dot is encountered followed by a - * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing - * errors). This is optional. - * - The long description, any character until a new line is encountered followed by an @ and word - * characters (a tag). This is optional. - * - Tags; the remaining characters - * - * Big thanks to RichardJ for contributing this Regular Expression - */ - preg_match( - '/ - \A - # 1. Extract the template marker - (?:(\#\@\+|\#\@\-)\n?)? - - # 2. Extract the summary - (?: - (?! @\pL ) # The summary may not start with an @ - ( - [^\n.]+ - (?: - (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines - [\n.] (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line - [^\n.]+ # Include anything else - )* - \.? - )? - ) - - # 3. Extract the description - (?: - \s* # Some form of whitespace _must_ precede a description because a summary must be there - (?! @\pL ) # The description may not start with an @ - ( - [^\n]+ - (?: \n+ - (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line - [^\n]+ # Include anything else - )* - ) - )? - - # 4. Extract the tags (anything that follows) - (\s+ [\s\S]*)? # everything that follows - /ux', - $comment, - $matches - ); - array_shift($matches); - - while (count($matches) < 4) { - $matches[] = ''; - } - - return $matches; - } - - /** - * Creates the tag objects. - * - * @param string $tags Tag block to parse. - * - * @return void - */ - protected function parseTags($tags) - { - $result = array(); - $tags = trim($tags); - if ('' !== $tags) { - if ('@' !== $tags[0]) { - throw new \LogicException( - 'A tag block started with text instead of an actual tag,' - . ' this makes the tag block invalid: ' . $tags - ); - } - foreach (explode("\n", $tags) as $tag_line) { - if (isset($tag_line[0]) && ($tag_line[0] === '@')) { - $result[] = $tag_line; - } else { - $result[count($result) - 1] .= "\n" . $tag_line; - } - } - - // create proper Tag objects - foreach ($result as $key => $tag_line) { - $result[$key] = Tag::createInstance(trim($tag_line), $this); - } - } - - $this->tags = $result; - } - - /** - * Gets the text portion of the doc block. - * - * Gets the text portion (short and long description combined) of the doc - * block. - * - * @return string The text portion of the doc block. - */ - public function getText() - { - $short = $this->getShortDescription(); - $long = $this->getLongDescription()->getContents(); - - if ($long) { - return "{$short}\n\n{$long}"; - } else { - return $short; - } - } - - /** - * Set the text portion of the doc block. - * - * Sets the text portion (short and long description combined) of the doc - * block. - * - * @param string $docblock The new text portion of the doc block. - * - * @return $this This doc block. - */ - public function setText($comment) - { - list(,$short, $long) = $this->splitDocBlock($comment); - $this->short_description = $short; - $this->long_description = new DocBlock\Description($long, $this); - return $this; - } - /** - * Returns the opening line or also known as short description. - * - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * Returns the full description or also known as long description. - * - * @return DocBlock\Description - */ - public function getLongDescription() - { - return $this->long_description; - } - - /** - * Returns whether this DocBlock is the start of a Template section. - * - * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker - * (`#@+`) that is appended directly after the opening `/**` of a DocBlock. - * - * An example of such an opening is: - * - * ``` - * /**#@+ - * * My DocBlock - * * / - * ``` - * - * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all - * elements that follow until another DocBlock is found that contains the closing marker (`#@-`). - * - * @see self::isTemplateEnd() for the check whether a closing marker was provided. - * - * @return boolean - */ - public function isTemplateStart() - { - return $this->isTemplateStart; - } - - /** - * Returns whether this DocBlock is the end of a Template section. - * - * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality. - * - * @return boolean - */ - public function isTemplateEnd() - { - return $this->isTemplateEnd; - } - - /** - * Returns the current context. - * - * @return Context - */ - public function getContext() - { - return $this->context; - } - - /** - * Returns the current location. - * - * @return Location - */ - public function getLocation() - { - return $this->location; - } - - /** - * Returns the tags for this DocBlock. - * - * @return Tag[] - */ - public function getTags() - { - return $this->tags; - } - - /** - * Returns an array of tags matching the given name. If no tags are found - * an empty array is returned. - * - * @param string $name String to search by. - * - * @return Tag[] - */ - public function getTagsByName($name) - { - $result = array(); - - /** @var Tag $tag */ - foreach ($this->getTags() as $tag) { - if ($tag->getName() != $name) { - continue; - } - - $result[] = $tag; - } - - return $result; - } - - /** - * Checks if a tag of a certain type is present in this DocBlock. - * - * @param string $name Tag name to check for. - * - * @return bool - */ - public function hasTag($name) - { - /** @var Tag $tag */ - foreach ($this->getTags() as $tag) { - if ($tag->getName() == $name) { - return true; - } - } - - return false; - } - - /** - * Appends a tag at the end of the list of tags. - * - * @param Tag $tag The tag to add. - * - * @return Tag The newly added tag. - * - * @throws \LogicException When the tag belongs to a different DocBlock. - */ - public function appendTag(Tag $tag) - { - if (null === $tag->getDocBlock()) { - $tag->setDocBlock($this); - } - - if ($tag->getDocBlock() === $this) { - $this->tags[] = $tag; - } else { - throw new \LogicException( - 'This tag belongs to a different DocBlock object.' - ); - } - - return $tag; - } - - - /** - * Builds a string representation of this object. - * - * @todo determine the exact format as used by PHP Reflection and - * implement it. - * - * @return string - * @codeCoverageIgnore Not yet implemented - */ - public static function export() - { - throw new \Exception('Not yet implemented'); - } - - /** - * Returns the exported information (we should use the export static method - * BUT this throws an exception at this point). - * - * @return string - * @codeCoverageIgnore Not yet implemented - */ - public function __toString() - { - return 'Not yet implemented'; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php deleted file mode 100644 index 81aa83ce..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php +++ /dev/null @@ -1,154 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -/** - * The context in which a DocBlock occurs. - * - * @author Vasil Rangelov - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class Context -{ - /** @var string The current namespace. */ - protected $namespace = ''; - - /** @var array List of namespace aliases => Fully Qualified Namespace. */ - protected $namespace_aliases = array(); - - /** @var string Name of the structural element, within the namespace. */ - protected $lsen = ''; - - /** - * Cteates a new context. - * @param string $namespace The namespace where this DocBlock - * resides in. - * @param array $namespace_aliases List of namespace aliases => Fully - * Qualified Namespace. - * @param string $lsen Name of the structural element, within - * the namespace. - */ - public function __construct( - $namespace = '', - array $namespace_aliases = array(), - $lsen = '' - ) { - if (!empty($namespace)) { - $this->setNamespace($namespace); - } - $this->setNamespaceAliases($namespace_aliases); - $this->setLSEN($lsen); - } - - /** - * @return string The namespace where this DocBlock resides in. - */ - public function getNamespace() - { - return $this->namespace; - } - - /** - * @return array List of namespace aliases => Fully Qualified Namespace. - */ - public function getNamespaceAliases() - { - return $this->namespace_aliases; - } - - /** - * Returns the Local Structural Element Name. - * - * @return string Name of the structural element, within the namespace. - */ - public function getLSEN() - { - return $this->lsen; - } - - /** - * Sets a new namespace. - * - * Sets a new namespace for the context. Leading and trailing slashes are - * trimmed, and the keywords "global" and "default" are treated as aliases - * to no namespace. - * - * @param string $namespace The new namespace to set. - * - * @return $this - */ - public function setNamespace($namespace) - { - if ('global' !== $namespace - && 'default' !== $namespace - ) { - // Srip leading and trailing slash - $this->namespace = trim((string)$namespace, '\\'); - } else { - $this->namespace = ''; - } - return $this; - } - - /** - * Sets the namespace aliases, replacing all previous ones. - * - * @param array $namespace_aliases List of namespace aliases => Fully - * Qualified Namespace. - * - * @return $this - */ - public function setNamespaceAliases(array $namespace_aliases) - { - $this->namespace_aliases = array(); - foreach ($namespace_aliases as $alias => $fqnn) { - $this->setNamespaceAlias($alias, $fqnn); - } - return $this; - } - - /** - * Adds a namespace alias to the context. - * - * @param string $alias The alias name (the part after "as", or the last - * part of the Fully Qualified Namespace Name) to add. - * @param string $fqnn The Fully Qualified Namespace Name for this alias. - * Any form of leading/trailing slashes are accepted, but what will be - * stored is a name, prefixed with a slash, and no trailing slash. - * - * @return $this - */ - public function setNamespaceAlias($alias, $fqnn) - { - $this->namespace_aliases[$alias] = '\\' . trim((string)$fqnn, '\\'); - return $this; - } - - /** - * Sets a new Local Structural Element Name. - * - * Sets a new Local Structural Element Name. A local name also contains - * punctuation determining the kind of structural element (e.g. trailing "(" - * and ")" for functions and methods). - * - * @param string $lsen The new local name of a structural element. - * - * @return $this - */ - public function setLSEN($lsen) - { - $this->lsen = (string)$lsen; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php deleted file mode 100644 index d41142e2..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Description.php +++ /dev/null @@ -1,223 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use phpDocumentor\Reflection\DocBlock; - -/** - * Parses a Description of a DocBlock or tag. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class Description implements \Reflector -{ - /** @var string */ - protected $contents = ''; - - /** @var array The contents, as an array of strings and Tag objects. */ - protected $parsedContents = null; - - /** @var DocBlock The DocBlock which this description belongs to. */ - protected $docblock = null; - - /** - * Populates the fields of a description. - * - * @param string $content The description's conetnts. - * @param DocBlock $docblock The DocBlock which this description belongs to. - */ - public function __construct($content, DocBlock $docblock = null) - { - $this->setContent($content)->setDocBlock($docblock); - } - - /** - * Gets the text of this description. - * - * @return string - */ - public function getContents() - { - return $this->contents; - } - - /** - * Sets the text of this description. - * - * @param string $content The new text of this description. - * - * @return $this - */ - public function setContent($content) - { - $this->contents = trim($content); - - $this->parsedContents = null; - return $this; - } - - /** - * Returns the parsed text of this description. - * - * @return array An array of strings and tag objects, in the order they - * occur within the description. - */ - public function getParsedContents() - { - if (null === $this->parsedContents) { - $this->parsedContents = preg_split( - '/\{ - # "{@}" is not a valid inline tag. This ensures that - # we do not treat it as one, but treat it literally. - (?!@\}) - # We want to capture the whole tag line, but without the - # inline tag delimiters. - (\@ - # Match everything up to the next delimiter. - [^{}]* - # Nested inline tag content should not be captured, or - # it will appear in the result separately. - (?: - # Match nested inline tags. - (?: - # Because we did not catch the tag delimiters - # earlier, we must be explicit with them here. - # Notice that this also matches "{}", as a way - # to later introduce it as an escape sequence. - \{(?1)?\} - | - # Make sure we match hanging "{". - \{ - ) - # Match content after the nested inline tag. - [^{}]* - )* # If there are more inline tags, match them as well. - # We use "*" since there may not be any nested inline - # tags. - ) - \}/Sux', - $this->contents, - null, - PREG_SPLIT_DELIM_CAPTURE - ); - - $count = count($this->parsedContents); - for ($i=1; $i<$count; $i += 2) { - $this->parsedContents[$i] = Tag::createInstance( - $this->parsedContents[$i], - $this->docblock - ); - } - - //In order to allow "literal" inline tags, the otherwise invalid - //sequence "{@}" is changed to "@", and "{}" is changed to "}". - //See unit tests for examples. - for ($i=0; $i<$count; $i += 2) { - $this->parsedContents[$i] = str_replace( - array('{@}', '{}'), - array('@', '}'), - $this->parsedContents[$i] - ); - } - } - return $this->parsedContents; - } - - /** - * Return a formatted variant of the Long Description using MarkDown. - * - * @todo this should become a more intelligent piece of code where the - * configuration contains a setting what format long descriptions are. - * - * @codeCoverageIgnore Will be removed soon, in favor of adapters at - * PhpDocumentor itself that will process text in various formats. - * - * @return string - */ - public function getFormattedContents() - { - $result = $this->contents; - - // if the long description contains a plain HTML element, surround - // it with a pre element. Please note that we explicitly used str_replace - // and not preg_replace to gain performance - if (strpos($result, '') !== false) { - $result = str_replace( - array('', "\r\n", "\n", "\r", ''), - array('

', '', '', '', '
'), - $result - ); - } - - if (class_exists('Parsedown')) { - $markdown = \Parsedown::instance(); - $result = $markdown->parse($result); - } elseif (class_exists('dflydev\markdown\MarkdownExtraParser')) { - $markdown = new \dflydev\markdown\MarkdownExtraParser(); - $result = $markdown->transformMarkdown($result); - } - - return trim($result); - } - - /** - * Gets the docblock this tag belongs to. - * - * @return DocBlock The docblock this description belongs to. - */ - public function getDocBlock() - { - return $this->docblock; - } - - /** - * Sets the docblock this tag belongs to. - * - * @param DocBlock $docblock The new docblock this description belongs to. - * Setting NULL removes any association. - * - * @return $this - */ - public function setDocBlock(DocBlock $docblock = null) - { - $this->docblock = $docblock; - - return $this; - } - - /** - * Builds a string representation of this object. - * - * @todo determine the exact format as used by PHP Reflection - * and implement it. - * - * @return void - * @codeCoverageIgnore Not yet implemented - */ - public static function export() - { - throw new \Exception('Not yet implemented'); - } - - /** - * Returns the long description as a string. - * - * @return string - */ - public function __toString() - { - return $this->getContents(); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php deleted file mode 100644 index 966ed44d..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php +++ /dev/null @@ -1,76 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -/** - * The location a DocBlock occurs within a file. - * - * @author Vasil Rangelov - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class Location -{ - /** @var int Line where the DocBlock text starts. */ - protected $lineNumber = 0; - - /** @var int Column where the DocBlock text starts. */ - protected $columnNumber = 0; - - public function __construct( - $lineNumber = 0, - $columnNumber = 0 - ) { - $this->setLineNumber($lineNumber)->setColumnNumber($columnNumber); - } - - /** - * @return int Line where the DocBlock text starts. - */ - public function getLineNumber() - { - return $this->lineNumber; - } - - /** - * - * @param type $lineNumber - * @return $this - */ - public function setLineNumber($lineNumber) - { - $this->lineNumber = (int)$lineNumber; - - return $this; - } - - /** - * @return int Column where the DocBlock text starts. - */ - public function getColumnNumber() - { - return $this->columnNumber; - } - - /** - * - * @param int $columnNumber - * @return $this - */ - public function setColumnNumber($columnNumber) - { - $this->columnNumber = (int)$columnNumber; - - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php deleted file mode 100644 index c1617850..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php +++ /dev/null @@ -1,198 +0,0 @@ - - * @copyright 2013 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use phpDocumentor\Reflection\DocBlock; - -/** - * Serializes a DocBlock instance. - * - * @author Barry vd. Heuvel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class Serializer -{ - - /** @var string The string to indent the comment with. */ - protected $indentString = ' '; - - /** @var int The number of times the indent string is repeated. */ - protected $indent = 0; - - /** @var bool Whether to indent the first line. */ - protected $isFirstLineIndented = true; - - /** @var int|null The max length of a line. */ - protected $lineLength = null; - - /** - * Create a Serializer instance. - * - * @param int $indent The number of times the indent string is - * repeated. - * @param string $indentString The string to indent the comment with. - * @param bool $indentFirstLine Whether to indent the first line. - * @param int|null $lineLength The max length of a line or NULL to - * disable line wrapping. - */ - public function __construct( - $indent = 0, - $indentString = ' ', - $indentFirstLine = true, - $lineLength = null - ) { - $this->setIndentationString($indentString); - $this->setIndent($indent); - $this->setIsFirstLineIndented($indentFirstLine); - $this->setLineLength($lineLength); - } - - /** - * Sets the string to indent comments with. - * - * @param string $indentationString The string to indent comments with. - * - * @return $this This serializer object. - */ - public function setIndentationString($indentString) - { - $this->indentString = (string)$indentString; - return $this; - } - - /** - * Gets the string to indent comments with. - * - * @return string The indent string. - */ - public function getIndentationString() - { - return $this->indentString; - } - - /** - * Sets the number of indents. - * - * @param int $indent The number of times the indent string is repeated. - * - * @return $this This serializer object. - */ - public function setIndent($indent) - { - $this->indent = (int)$indent; - return $this; - } - - /** - * Gets the number of indents. - * - * @return int The number of times the indent string is repeated. - */ - public function getIndent() - { - return $this->indent; - } - - /** - * Sets whether or not the first line should be indented. - * - * Sets whether or not the first line (the one with the "/**") should be - * indented. - * - * @param bool $indentFirstLine The new value for this setting. - * - * @return $this This serializer object. - */ - public function setIsFirstLineIndented($indentFirstLine) - { - $this->isFirstLineIndented = (bool)$indentFirstLine; - return $this; - } - - /** - * Gets whether or not the first line should be indented. - * - * @return bool Whether or not the first line should be indented. - */ - public function isFirstLineIndented() - { - return $this->isFirstLineIndented; - } - - /** - * Sets the line length. - * - * Sets the length of each line in the serialization. Content will be - * wrapped within this limit. - * - * @param int|null $lineLength The length of each line. NULL to disable line - * wrapping altogether. - * - * @return $this This serializer object. - */ - public function setLineLength($lineLength) - { - $this->lineLength = null === $lineLength ? null : (int)$lineLength; - return $this; - } - - /** - * Gets the line length. - * - * @return int|null The length of each line or NULL if line wrapping is - * disabled. - */ - public function getLineLength() - { - return $this->lineLength; - } - - /** - * Generate a DocBlock comment. - * - * @param DocBlock The DocBlock to serialize. - * - * @return string The serialized doc block. - */ - public function getDocComment(DocBlock $docblock) - { - $indent = str_repeat($this->indentString, $this->indent); - $firstIndent = $this->isFirstLineIndented ? $indent : ''; - - $text = $docblock->getText(); - if ($this->lineLength) { - //3 === strlen(' * ') - $wrapLength = $this->lineLength - strlen($indent) - 3; - $text = wordwrap($text, $wrapLength); - } - $text = str_replace("\n", "\n{$indent} * ", $text); - - $comment = "{$firstIndent}/**\n{$indent} * {$text}\n{$indent} *\n"; - - /** @var Tag $tag */ - foreach ($docblock->getTags() as $tag) { - $tagText = (string) $tag; - if ($this->lineLength) { - $tagText = wordwrap($tagText, $wrapLength); - } - $tagText = str_replace("\n", "\n{$indent} * ", $tagText); - - $comment .= "{$indent} * {$tagText}\n"; - } - - $comment .= $indent . ' */'; - - return $comment; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php deleted file mode 100644 index a96db095..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php +++ /dev/null @@ -1,377 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use phpDocumentor\Reflection\DocBlock; - -/** - * Parses a tag definition for a DocBlock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class Tag implements \Reflector -{ - /** - * PCRE regular expression matching a tag name. - */ - const REGEX_TAGNAME = '[\w\-\_\\\\]+'; - - /** @var string Name of the tag */ - protected $tag = ''; - - /** - * @var string|null Content of the tag. - * When set to NULL, it means it needs to be regenerated. - */ - protected $content = ''; - - /** @var string Description of the content of this tag */ - protected $description = ''; - - /** - * @var array|null The description, as an array of strings and Tag objects. - * When set to NULL, it means it needs to be regenerated. - */ - protected $parsedDescription = null; - - /** @var Location Location of the tag. */ - protected $location = null; - - /** @var DocBlock The DocBlock which this tag belongs to. */ - protected $docblock = null; - - /** - * @var array An array with a tag as a key, and an FQCN to a class that - * handles it as an array value. The class is expected to inherit this - * class. - */ - private static $tagHandlerMappings = array( - 'author' - => '\phpDocumentor\Reflection\DocBlock\Tag\AuthorTag', - 'covers' - => '\phpDocumentor\Reflection\DocBlock\Tag\CoversTag', - 'deprecated' - => '\phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag', - 'example' - => '\phpDocumentor\Reflection\DocBlock\Tag\ExampleTag', - 'link' - => '\phpDocumentor\Reflection\DocBlock\Tag\LinkTag', - 'method' - => '\phpDocumentor\Reflection\DocBlock\Tag\MethodTag', - 'param' - => '\phpDocumentor\Reflection\DocBlock\Tag\ParamTag', - 'property-read' - => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyReadTag', - 'property' - => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyTag', - 'property-write' - => '\phpDocumentor\Reflection\DocBlock\Tag\PropertyWriteTag', - 'return' - => '\phpDocumentor\Reflection\DocBlock\Tag\ReturnTag', - 'see' - => '\phpDocumentor\Reflection\DocBlock\Tag\SeeTag', - 'since' - => '\phpDocumentor\Reflection\DocBlock\Tag\SinceTag', - 'source' - => '\phpDocumentor\Reflection\DocBlock\Tag\SourceTag', - 'throw' - => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag', - 'throws' - => '\phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag', - 'uses' - => '\phpDocumentor\Reflection\DocBlock\Tag\UsesTag', - 'var' - => '\phpDocumentor\Reflection\DocBlock\Tag\VarTag', - 'version' - => '\phpDocumentor\Reflection\DocBlock\Tag\VersionTag' - ); - - /** - * Factory method responsible for instantiating the correct sub type. - * - * @param string $tag_line The text for this tag, including description. - * @param DocBlock $docblock The DocBlock which this tag belongs to. - * @param Location $location Location of the tag. - * - * @throws \InvalidArgumentException if an invalid tag line was presented. - * - * @return static A new tag object. - */ - final public static function createInstance( - $tag_line, - DocBlock $docblock = null, - Location $location = null - ) { - if (!preg_match( - '/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)?/us', - $tag_line, - $matches - )) { - throw new \InvalidArgumentException( - 'Invalid tag_line detected: ' . $tag_line - ); - } - - $handler = __CLASS__; - if (isset(self::$tagHandlerMappings[$matches[1]])) { - $handler = self::$tagHandlerMappings[$matches[1]]; - } elseif (isset($docblock)) { - $tagName = (string)new Type\Collection( - array($matches[1]), - $docblock->getContext() - ); - - if (isset(self::$tagHandlerMappings[$tagName])) { - $handler = self::$tagHandlerMappings[$tagName]; - } - } - - return new $handler( - $matches[1], - isset($matches[2]) ? $matches[2] : '', - $docblock, - $location - ); - } - - /** - * Registers a handler for tags. - * - * Registers a handler for tags. The class specified is autoloaded if it's - * not available. It must inherit from this class. - * - * @param string $tag Name of tag to regiser a handler for. When - * registering a namespaced tag, the full name, along with a prefixing - * slash MUST be provided. - * @param string|null $handler FQCN of handler. Specifing NULL removes the - * handler for the specified tag, if any. - * - * @return bool TRUE on success, FALSE on failure. - */ - final public static function registerTagHandler($tag, $handler) - { - $tag = trim((string)$tag); - - if (null === $handler) { - unset(self::$tagHandlerMappings[$tag]); - return true; - } - - if ('' !== $tag - && class_exists($handler, true) - && is_subclass_of($handler, __CLASS__) - && !strpos($tag, '\\') //Accept no slash, and 1st slash at offset 0. - ) { - self::$tagHandlerMappings[$tag] = $handler; - return true; - } - - return false; - } - - /** - * Parses a tag and populates the member variables. - * - * @param string $name Name of the tag. - * @param string $content The contents of the given tag. - * @param DocBlock $docblock The DocBlock which this tag belongs to. - * @param Location $location Location of the tag. - */ - public function __construct( - $name, - $content, - DocBlock $docblock = null, - Location $location = null - ) { - $this - ->setName($name) - ->setContent($content) - ->setDocBlock($docblock) - ->setLocation($location); - } - - /** - * Gets the name of this tag. - * - * @return string The name of this tag. - */ - public function getName() - { - return $this->tag; - } - - /** - * Sets the name of this tag. - * - * @param string $name The new name of this tag. - * - * @return $this - * @throws \InvalidArgumentException When an invalid tag name is provided. - */ - public function setName($name) - { - if (!preg_match('/^' . self::REGEX_TAGNAME . '$/u', $name)) { - throw new \InvalidArgumentException( - 'Invalid tag name supplied: ' . $name - ); - } - - $this->tag = $name; - - return $this; - } - - /** - * Gets the content of this tag. - * - * @return string - */ - public function getContent() - { - if (null === $this->content) { - $this->content = $this->description; - } - - return $this->content; - } - - /** - * Sets the content of this tag. - * - * @param string $content The new content of this tag. - * - * @return $this - */ - public function setContent($content) - { - $this->setDescription($content); - $this->content = $content; - - return $this; - } - - /** - * Gets the description component of this tag. - * - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Sets the description component of this tag. - * - * @param string $description The new description component of this tag. - * - * @return $this - */ - public function setDescription($description) - { - $this->content = null; - $this->parsedDescription = null; - $this->description = trim($description); - - return $this; - } - - /** - * Gets the parsed text of this description. - * - * @return array An array of strings and tag objects, in the order they - * occur within the description. - */ - public function getParsedDescription() - { - if (null === $this->parsedDescription) { - $description = new Description($this->description, $this->docblock); - $this->parsedDescription = $description->getParsedContents(); - } - return $this->parsedDescription; - } - - /** - * Gets the docblock this tag belongs to. - * - * @return DocBlock The docblock this tag belongs to. - */ - public function getDocBlock() - { - return $this->docblock; - } - - /** - * Sets the docblock this tag belongs to. - * - * @param DocBlock $docblock The new docblock this tag belongs to. Setting - * NULL removes any association. - * - * @return $this - */ - public function setDocBlock(DocBlock $docblock = null) - { - $this->docblock = $docblock; - - return $this; - } - - /** - * Gets the location of the tag. - * - * @return Location The tag's location. - */ - public function getLocation() - { - return $this->location; - } - - /** - * Sets the location of the tag. - * - * @param Location $location The new location of the tag. - * - * @return $this - */ - public function setLocation(Location $location = null) - { - $this->location = $location; - - return $this; - } - - /** - * Builds a string representation of this object. - * - * @todo determine the exact format as used by PHP Reflection and implement it. - * - * @return void - * @codeCoverageIgnore Not yet implemented - */ - public static function export() - { - throw new \Exception('Not yet implemented'); - } - - /** - * Returns the tag as a serialized string - * - * @return string - */ - public function __toString() - { - return "@{$this->getName()} {$this->getContent()}"; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php deleted file mode 100644 index bacf52eb..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php +++ /dev/null @@ -1,131 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for an @author tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class AuthorTag extends Tag -{ - /** - * PCRE regular expression matching any valid value for the name component. - */ - const REGEX_AUTHOR_NAME = '[^\<]*'; - - /** - * PCRE regular expression matching any valid value for the email component. - */ - const REGEX_AUTHOR_EMAIL = '[^\>]*'; - - /** @var string The name of the author */ - protected $authorName = ''; - - /** @var string The email of the author */ - protected $authorEmail = ''; - - public function getContent() - { - if (null === $this->content) { - $this->content = $this->authorName; - if ('' != $this->authorEmail) { - $this->content .= "<{$this->authorEmail}>"; - } - } - - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function setContent($content) - { - parent::setContent($content); - if (preg_match( - '/^(' . self::REGEX_AUTHOR_NAME . - ')(\<(' . self::REGEX_AUTHOR_EMAIL . - ')\>)?$/u', - $this->description, - $matches - )) { - $this->authorName = trim($matches[1]); - if (isset($matches[3])) { - $this->authorEmail = trim($matches[3]); - } - } - - return $this; - } - - /** - * Gets the author's name. - * - * @return string The author's name. - */ - public function getAuthorName() - { - return $this->authorName; - } - - /** - * Sets the author's name. - * - * @param string $authorName The new author name. - * An invalid value will set an empty string. - * - * @return $this - */ - public function setAuthorName($authorName) - { - $this->content = null; - $this->authorName - = preg_match('/^' . self::REGEX_AUTHOR_NAME . '$/u', $authorName) - ? $authorName : ''; - - return $this; - } - - /** - * Gets the author's email. - * - * @return string The author's email. - */ - public function getAuthorEmail() - { - return $this->authorEmail; - } - - /** - * Sets the author's email. - * - * @param string $authorEmail The new author email. - * An invalid value will set an empty string. - * - * @return $this - */ - public function setAuthorEmail($authorEmail) - { - $this->authorEmail - = preg_match('/^' . self::REGEX_AUTHOR_EMAIL . '$/u', $authorEmail) - ? $authorEmail : ''; - - $this->content = null; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php deleted file mode 100644 index bd31b56b..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @covers tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class CoversTag extends SeeTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php deleted file mode 100644 index 7226316b..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag\VersionTag; - -/** - * Reflection class for a @deprecated tag in a Docblock. - * - * @author Vasil Rangelov - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class DeprecatedTag extends VersionTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php deleted file mode 100644 index 0e163ea0..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php +++ /dev/null @@ -1,156 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @example tag in a Docblock. - * - * @author Vasil Rangelov - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ExampleTag extends SourceTag -{ - /** - * @var string Path to a file to use as an example. - * May also be an absolute URI. - */ - protected $filePath = ''; - - /** - * @var bool Whether the file path component represents an URI. - * This determines how the file portion appears at {@link getContent()}. - */ - protected $isURI = false; - - /** - * {@inheritdoc} - */ - public function getContent() - { - if (null === $this->content) { - $filePath = ''; - if ($this->isURI) { - if (false === strpos($this->filePath, ':')) { - $filePath = str_replace( - '%2F', - '/', - rawurlencode($this->filePath) - ); - } else { - $filePath = $this->filePath; - } - } else { - $filePath = '"' . $this->filePath . '"'; - } - - $this->content = $filePath . ' ' . parent::getContent(); - } - - return $this->content; - } - /** - * {@inheritdoc} - */ - public function setContent($content) - { - Tag::setContent($content); - if (preg_match( - '/^ - # File component - (?: - # File path in quotes - \"([^\"]+)\" - | - # File URI - (\S+) - ) - # Remaining content (parsed by SourceTag) - (?:\s+(.*))? - $/sux', - $this->description, - $matches - )) { - if ('' !== $matches[1]) { - $this->setFilePath($matches[1]); - } else { - $this->setFileURI($matches[2]); - } - - if (isset($matches[3])) { - parent::setContent($matches[3]); - } else { - $this->setDescription(''); - } - $this->content = $content; - } - - return $this; - } - - /** - * Returns the file path. - * - * @return string Path to a file to use as an example. - * May also be an absolute URI. - */ - public function getFilePath() - { - return $this->filePath; - } - - /** - * Sets the file path. - * - * @param string $filePath The new file path to use for the example. - * - * @return $this - */ - public function setFilePath($filePath) - { - $this->isURI = false; - $this->filePath = trim($filePath); - - $this->content = null; - return $this; - } - - /** - * Sets the file path as an URI. - * - * This function is equivalent to {@link setFilePath()}, except that it - * convers an URI to a file path before that. - * - * There is no getFileURI(), as {@link getFilePath()} is compatible. - * - * @param type $uri The new file URI to use as an example. - */ - public function setFileURI($uri) - { - $this->isURI = true; - if (false === strpos($uri, ':')) { - //Relative URL - $this->filePath = rawurldecode( - str_replace(array('/', '\\'), '%2F', $uri) - ); - } else { - //Absolute URL or URI. - $this->filePath = $uri; - } - - $this->content = null; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php deleted file mode 100644 index f79f25dd..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @link tag in a Docblock. - * - * @author Ben Selby - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class LinkTag extends Tag -{ - /** @var string */ - protected $link = ''; - - /** - * {@inheritdoc} - */ - public function getContent() - { - if (null === $this->content) { - $this->content = "{$this->link} {$this->description}"; - } - - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function setContent($content) - { - parent::setContent($content); - $parts = preg_split('/\s+/Su', $this->description, 2); - - $this->link = $parts[0]; - - $this->setDescription(isset($parts[1]) ? $parts[1] : $parts[0]); - - $this->content = $content; - return $this; - } - - /** - * Gets the link - * - * @return string - */ - public function getLink() - { - return $this->link; - } - - /** - * Sets the link - * - * @param string $link The link - * - * @return $this - */ - public function setLink($link) - { - $this->link = $link; - - $this->content = null; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php deleted file mode 100644 index 7a5ce790..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php +++ /dev/null @@ -1,209 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @method in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class MethodTag extends ReturnTag -{ - - /** @var string */ - protected $method_name = ''; - - /** @var string */ - protected $arguments = ''; - - /** @var bool */ - protected $isStatic = false; - - /** - * {@inheritdoc} - */ - public function getContent() - { - if (null === $this->content) { - $this->content = ''; - if ($this->isStatic) { - $this->content .= 'static '; - } - $this->content .= $this->type . - " {$this->method_name}({$this->arguments}) " . - $this->description; - } - - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function setContent($content) - { - Tag::setContent($content); - // 1. none or more whitespace - // 2. optionally the keyword "static" followed by whitespace - // 3. optionally a word with underscores followed by whitespace : as - // type for the return value - // 4. then optionally a word with underscores followed by () and - // whitespace : as method name as used by phpDocumentor - // 5. then a word with underscores, followed by ( and any character - // until a ) and whitespace : as method name with signature - // 6. any remaining text : as description - if (preg_match( - '/^ - # Static keyword - # Declates a static method ONLY if type is also present - (?: - (static) - \s+ - )? - # Return type - (?: - ([\w\|_\\\\]+) - \s+ - )? - # Legacy method name (not captured) - (?: - [\w_]+\(\)\s+ - )? - # Method name - ([\w\|_\\\\]+) - # Arguments - \(([^\)]*)\) - \s* - # Description - (.*) - $/sux', - $this->description, - $matches - )) { - list( - , - $static, - $this->type, - $this->method_name, - $this->arguments, - $this->description - ) = $matches; - if ($static) { - if (!$this->type) { - $this->type = 'static'; - } else { - $this->isStatic = true; - } - } else { - if (!$this->type) { - $this->type = 'void'; - } - } - $this->parsedDescription = null; - } - - return $this; - } - - /** - * Sets the name of this method. - * - * @param string $method_name The name of the method. - * - * @return $this - */ - public function setMethodName($method_name) - { - $this->method_name = $method_name; - - $this->content = null; - return $this; - } - - /** - * Retrieves the method name. - * - * @return string - */ - public function getMethodName() - { - return $this->method_name; - } - - /** - * Sets the arguments for this method. - * - * @param string $arguments A comma-separated arguments line. - * - * @return void - */ - public function setArguments($arguments) - { - $this->arguments = $arguments; - - $this->content = null; - return $this; - } - - /** - * Returns an array containing each argument as array of type and name. - * - * Please note that the argument sub-array may only contain 1 element if no - * type was specified. - * - * @return string[] - */ - public function getArguments() - { - if (empty($this->arguments)) { - return array(); - } - - $arguments = explode(',', $this->arguments); - foreach ($arguments as $key => $value) { - $arguments[$key] = explode(' ', trim($value)); - } - - return $arguments; - } - - /** - * Checks whether the method tag describes a static method or not. - * - * @return bool TRUE if the method declaration is for a static method, FALSE - * otherwise. - */ - public function isStatic() - { - return $this->isStatic; - } - - /** - * Sets a new value for whether the method is static or not. - * - * @param bool $isStatic The new value to set. - * - * @return $this - */ - public function setIsStatic($isStatic) - { - $this->isStatic = $isStatic; - - $this->content = null; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php deleted file mode 100644 index 9bc0270d..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php +++ /dev/null @@ -1,119 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @param tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ParamTag extends ReturnTag -{ - /** @var string */ - protected $variableName = ''; - - /** @var bool determines whether this is a variadic argument */ - protected $isVariadic = false; - - /** - * {@inheritdoc} - */ - public function getContent() - { - if (null === $this->content) { - $this->content - = "{$this->type} {$this->variableName} {$this->description}"; - } - return $this->content; - } - /** - * {@inheritdoc} - */ - public function setContent($content) - { - Tag::setContent($content); - $parts = preg_split( - '/(\s+)/Su', - $this->description, - 3, - PREG_SPLIT_DELIM_CAPTURE - ); - - // if the first item that is encountered is not a variable; it is a type - if (isset($parts[0]) - && (strlen($parts[0]) > 0) - && ($parts[0][0] !== '$') - ) { - $this->type = array_shift($parts); - array_shift($parts); - } - - // if the next item starts with a $ or ...$ it must be the variable name - if (isset($parts[0]) - && (strlen($parts[0]) > 0) - && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$') - ) { - $this->variableName = array_shift($parts); - array_shift($parts); - - if (substr($this->variableName, 0, 3) === '...') { - $this->isVariadic = true; - $this->variableName = substr($this->variableName, 3); - } - } - - $this->setDescription(implode('', $parts)); - - $this->content = $content; - return $this; - } - - /** - * Returns the variable's name. - * - * @return string - */ - public function getVariableName() - { - return $this->variableName; - } - - /** - * Sets the variable's name. - * - * @param string $name The new name for this variable. - * - * @return $this - */ - public function setVariableName($name) - { - $this->variableName = $name; - - $this->content = null; - return $this; - } - - /** - * Returns whether this tag is variadic. - * - * @return boolean - */ - public function isVariadic() - { - return $this->isVariadic; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php deleted file mode 100644 index 33406026..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @property-read tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class PropertyReadTag extends PropertyTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php deleted file mode 100644 index 288ecff8..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @property tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class PropertyTag extends ParamTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php deleted file mode 100644 index ec4e866d..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @property-write tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class PropertyWriteTag extends PropertyTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php deleted file mode 100644 index 9293db92..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php +++ /dev/null @@ -1,99 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; -use phpDocumentor\Reflection\DocBlock\Type\Collection; - -/** - * Reflection class for a @return tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ReturnTag extends Tag -{ - /** @var string The raw type component. */ - protected $type = ''; - - /** @var Collection The parsed type component. */ - protected $types = null; - - /** - * {@inheritdoc} - */ - public function getContent() - { - if (null === $this->content) { - $this->content = "{$this->type} {$this->description}"; - } - - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function setContent($content) - { - parent::setContent($content); - - $parts = preg_split('/\s+/Su', $this->description, 2); - - // any output is considered a type - $this->type = $parts[0]; - $this->types = null; - - $this->setDescription(isset($parts[1]) ? $parts[1] : ''); - - $this->content = $content; - return $this; - } - - /** - * Returns the unique types of the variable. - * - * @return string[] - */ - public function getTypes() - { - return $this->getTypesCollection()->getArrayCopy(); - } - - /** - * Returns the type section of the variable. - * - * @return string - */ - public function getType() - { - return (string) $this->getTypesCollection(); - } - - /** - * Returns the type collection. - * - * @return void - */ - protected function getTypesCollection() - { - if (null === $this->types) { - $this->types = new Collection( - array($this->type), - $this->docblock ? $this->docblock->getContext() : null - ); - } - return $this->types; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php deleted file mode 100644 index 4f5f22ce..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @see tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class SeeTag extends Tag -{ - /** @var string */ - protected $refers = null; - - /** - * {@inheritdoc} - */ - public function getContent() - { - if (null === $this->content) { - $this->content = "{$this->refers} {$this->description}"; - } - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function setContent($content) - { - parent::setContent($content); - $parts = preg_split('/\s+/Su', $this->description, 2); - - // any output is considered a type - $this->refers = $parts[0]; - - $this->setDescription(isset($parts[1]) ? $parts[1] : ''); - - $this->content = $content; - return $this; - } - - /** - * Gets the structural element this tag refers to. - * - * @return string - */ - public function getReference() - { - return $this->refers; - } - - /** - * Sets the structural element this tag refers to. - * - * @param string $refers The new type this tag refers to. - * - * @return $this - */ - public function setReference($refers) - { - $this->refers = $refers; - - $this->content = null; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php deleted file mode 100644 index ba009c44..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php +++ /dev/null @@ -1,26 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag\VersionTag; - -/** - * Reflection class for a @since tag in a Docblock. - * - * @author Vasil Rangelov - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class SinceTag extends VersionTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php deleted file mode 100644 index 3400220e..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php +++ /dev/null @@ -1,137 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @source tag in a Docblock. - * - * @author Vasil Rangelov - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class SourceTag extends Tag -{ - /** - * @var int The starting line, relative to the structural element's - * location. - */ - protected $startingLine = 1; - - /** - * @var int|null The number of lines, relative to the starting line. NULL - * means "to the end". - */ - protected $lineCount = null; - - /** - * {@inheritdoc} - */ - public function getContent() - { - if (null === $this->content) { - $this->content - = "{$this->startingLine} {$this->lineCount} {$this->description}"; - } - - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function setContent($content) - { - parent::setContent($content); - if (preg_match( - '/^ - # Starting line - ([1-9]\d*) - \s* - # Number of lines - (?: - ((?1)) - \s+ - )? - # Description - (.*) - $/sux', - $this->description, - $matches - )) { - $this->startingLine = (int)$matches[1]; - if (isset($matches[2]) && '' !== $matches[2]) { - $this->lineCount = (int)$matches[2]; - } - $this->setDescription($matches[3]); - $this->content = $content; - } - - return $this; - } - - /** - * Gets the starting line. - * - * @return int The starting line, relative to the structural element's - * location. - */ - public function getStartingLine() - { - return $this->startingLine; - } - - /** - * Sets the starting line. - * - * @param int $startingLine The new starting line, relative to the - * structural element's location. - * - * @return $this - */ - public function setStartingLine($startingLine) - { - $this->startingLine = $startingLine; - - $this->content = null; - return $this; - } - - /** - * Returns the number of lines. - * - * @return int|null The number of lines, relative to the starting line. NULL - * means "to the end". - */ - public function getLineCount() - { - return $this->lineCount; - } - - /** - * Sets the number of lines. - * - * @param int|null $lineCount The new number of lines, relative to the - * starting line. NULL means "to the end". - * - * @return $this - */ - public function setLineCount($lineCount) - { - $this->lineCount = $lineCount; - - $this->content = null; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php deleted file mode 100644 index 58ee44a4..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @throws tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ThrowsTag extends ReturnTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php deleted file mode 100644 index da0d6638..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @uses tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class UsesTag extends SeeTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php deleted file mode 100644 index 236b2c8b..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php +++ /dev/null @@ -1,24 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @var tag in a Docblock. - * - * @author Mike van Riel - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class VarTag extends ParamTag -{ -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php deleted file mode 100644 index 260f6984..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php +++ /dev/null @@ -1,108 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -use phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Reflection class for a @version tag in a Docblock. - * - * @author Vasil Rangelov - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class VersionTag extends Tag -{ - /** - * PCRE regular expression matching a version vector. - * Assumes the "x" modifier. - */ - const REGEX_VECTOR = '(?: - # Normal release vectors. - \d\S* - | - # VCS version vectors. Per PHPCS, they are expected to - # follow the form of the VCS name, followed by ":", followed - # by the version vector itself. - # By convention, popular VCSes like CVS, SVN and GIT use "$" - # around the actual version vector. - [^\s\:]+\:\s*\$[^\$]+\$ - )'; - - /** @var string The version vector. */ - protected $version = ''; - - public function getContent() - { - if (null === $this->content) { - $this->content = "{$this->version} {$this->description}"; - } - - return $this->content; - } - - /** - * {@inheritdoc} - */ - public function setContent($content) - { - parent::setContent($content); - - if (preg_match( - '/^ - # The version vector - (' . self::REGEX_VECTOR . ') - \s* - # The description - (.+)? - $/sux', - $this->description, - $matches - )) { - $this->version = $matches[1]; - $this->setDescription(isset($matches[2]) ? $matches[2] : ''); - $this->content = $content; - } - - return $this; - } - - /** - * Gets the version section of the tag. - * - * @return string The version section of the tag. - */ - public function getVersion() - { - return $this->version; - } - - /** - * Sets the version section of the tag. - * - * @param string $version The new version section of the tag. - * An invalid value will set an empty string. - * - * @return $this - */ - public function setVersion($version) - { - $this->version - = preg_match('/^' . self::REGEX_VECTOR . '$/ux', $version) - ? $version - : ''; - - $this->content = null; - return $this; - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php b/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php deleted file mode 100644 index 90ead3ff..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php +++ /dev/null @@ -1,221 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Type; - -use phpDocumentor\Reflection\DocBlock\Context; - -/** - * Collection - * - * @author Mike van Riel - * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class Collection extends \ArrayObject -{ - /** @var string Definition of the OR operator for types */ - const OPERATOR_OR = '|'; - - /** @var string Definition of the ARRAY operator for types */ - const OPERATOR_ARRAY = '[]'; - - /** @var string Definition of the NAMESPACE operator in PHP */ - const OPERATOR_NAMESPACE = '\\'; - - /** @var string[] List of recognized keywords */ - protected static $keywords = array( - 'string', 'int', 'integer', 'bool', 'boolean', 'float', 'double', - 'object', 'mixed', 'array', 'resource', 'void', 'null', 'scalar', - 'callback', 'callable', 'false', 'true', 'self', '$this', 'static' - ); - - /** - * Current invoking location. - * - * This is used to prepend to type with a relative location. - * May also be 'default' or 'global', in which case they are ignored. - * - * @var Context - */ - protected $context = null; - - /** - * Registers the namespace and aliases; uses that to add and expand the - * given types. - * - * @param string[] $types Array containing a list of types to add to this - * container. - * @param Context $location The current invoking location. - */ - public function __construct( - array $types = array(), - Context $context = null - ) { - $this->context = null === $context ? new Context() : $context; - - foreach ($types as $type) { - $this->add($type); - } - } - - /** - * Returns the current invoking location. - * - * @return Context - */ - public function getContext() - { - return $this->context; - } - - /** - * Adds a new type to the collection and expands it if it contains a - * relative namespace. - * - * If a class in the type contains a relative namespace than this collection - * will try to expand that into a FQCN. - * - * @param string $type A 'Type' as defined in the phpDocumentor - * documentation. - * - * @throws \InvalidArgumentException if a non-string argument is passed. - * - * @see http://phpdoc.org/docs/latest/for-users/types.html for the - * definition of a type. - * - * @return void - */ - public function add($type) - { - if (!is_string($type)) { - throw new \InvalidArgumentException( - 'A type should be represented by a string, received: ' - .var_export($type, true) - ); - } - - // separate the type by the OR operator - $type_parts = explode(self::OPERATOR_OR, $type); - foreach ($type_parts as $part) { - $expanded_type = $this->expand($part); - if ($expanded_type) { - $this[] = $expanded_type; - } - } - } - - /** - * Returns a string representation of the collection. - * - * @return string The resolved types across the collection, separated with - * {@link self::OPERATOR_OR}. - */ - public function __toString() - { - return implode(self::OPERATOR_OR, $this->getArrayCopy()); - } - - /** - * Analyzes the given type and returns the FQCN variant. - * - * When a type is provided this method checks whether it is not a keyword or - * Fully Qualified Class Name. If so it will use the given namespace and - * aliases to expand the type to a FQCN representation. - * - * This method only works as expected if the namespace and aliases are set; - * no dynamic reflection is being performed here. - * - * @param string $type The relative or absolute type. - * - * @uses getNamespace to determine with what to prefix the type name. - * @uses getNamespaceAliases to check whether the first part of the relative - * type name should not be replaced with another namespace. - * - * @return string - */ - protected function expand($type) - { - $type = trim($type); - if (!$type) { - return ''; - } - - if ($this->isTypeAnArray($type)) { - return $this->expand(substr($type, 0, -2)) . self::OPERATOR_ARRAY; - } - - if ($this->isRelativeType($type) && !$this->isTypeAKeyword($type)) { - $type_parts = explode(self::OPERATOR_NAMESPACE, $type, 2); - - $namespace_aliases = $this->context->getNamespaceAliases(); - // if the first segment is not an alias; prepend namespace name and - // return - if (!isset($namespace_aliases[$type_parts[0]])) { - $namespace = $this->context->getNamespace(); - if ('' !== $namespace) { - $namespace .= self::OPERATOR_NAMESPACE; - } - return self::OPERATOR_NAMESPACE . $namespace . $type; - } - - $type_parts[0] = $namespace_aliases[$type_parts[0]]; - $type = implode(self::OPERATOR_NAMESPACE, $type_parts); - } - - return $type; - } - - /** - * Detects whether the given type represents an array. - * - * @param string $type A relative or absolute type as defined in the - * phpDocumentor documentation. - * - * @return bool - */ - protected function isTypeAnArray($type) - { - return substr($type, -2) === self::OPERATOR_ARRAY; - } - - /** - * Detects whether the given type represents a PHPDoc keyword. - * - * @param string $type A relative or absolute type as defined in the - * phpDocumentor documentation. - * - * @return bool - */ - protected function isTypeAKeyword($type) - { - return in_array(strtolower($type), static::$keywords, true); - } - - /** - * Detects whether the given type represents a relative or absolute path. - * - * This method will detect keywords as being absolute; even though they are - * not preceeded by a namespace separator. - * - * @param string $type A relative or absolute type as defined in the - * phpDocumentor documentation. - * - * @return bool - */ - protected function isRelativeType($type) - { - return ($type[0] !== self::OPERATOR_NAMESPACE) - || $this->isTypeAKeyword($type); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php deleted file mode 100644 index a6ca7b37..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php +++ /dev/null @@ -1,245 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Description - * - * @author Vasil Rangelov - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class DescriptionTest extends \PHPUnit_Framework_TestCase -{ - public function testConstruct() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(1, $parsedContents); - $this->assertSame($fixture, $parsedContents[0]); - } - - public function testInlineTagParsing() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(3, $parsedContents); - $this->assertSame('This is text for a ', $parsedContents[0]); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag\LinkTag', - $parsedContents[1] - ); - $this->assertSame( - ' that uses inline -tags.', - $parsedContents[2] - ); - } - - public function testInlineTagAtStartParsing() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(3, $parsedContents); - - $this->assertSame('', $parsedContents[0]); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag\LinkTag', - $parsedContents[1] - ); - $this->assertSame( - ' is text for a description that uses inline -tags.', - $parsedContents[2] - ); - } - - public function testNestedInlineTagParsing() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(3, $parsedContents); - - $this->assertSame( - 'This is text for a description with ', - $parsedContents[0] - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $parsedContents[1] - ); - $this->assertSame('.', $parsedContents[2]); - - $parsedDescription = $parsedContents[1]->getParsedDescription(); - $this->assertCount(3, $parsedDescription); - $this->assertSame("inline tag with\n", $parsedDescription[0]); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag\LinkTag', - $parsedDescription[1] - ); - $this->assertSame(' in it', $parsedDescription[2]); - } - - public function testLiteralOpeningDelimiter() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(1, $parsedContents); - $this->assertSame($fixture, $parsedContents[0]); - } - - public function testNestedLiteralOpeningDelimiter() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(3, $parsedContents); - $this->assertSame( - 'This is text for a description containing ', - $parsedContents[0] - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $parsedContents[1] - ); - $this->assertSame('.', $parsedContents[2]); - - $this->assertSame( - array('inline tag that has { that -is literal'), - $parsedContents[1]->getParsedDescription() - ); - } - - public function testLiteralClosingDelimiter() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(1, $parsedContents); - $this->assertSame( - 'This is text for a description with } that is not a tag.', - $parsedContents[0] - ); - } - - public function testNestedLiteralClosingDelimiter() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(3, $parsedContents); - $this->assertSame( - 'This is text for a description with ', - $parsedContents[0] - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $parsedContents[1] - ); - $this->assertSame('.', $parsedContents[2]); - - $this->assertSame( - array('inline tag with } that is not an -inline tag'), - $parsedContents[1]->getParsedDescription() - ); - } - - public function testInlineTagEscapingSequence() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(1, $parsedContents); - $this->assertSame( - 'This is text for a description with literal {@link}.', - $parsedContents[0] - ); - } - - public function testNestedInlineTagEscapingSequence() - { - $fixture = <<assertSame($fixture, $object->getContents()); - - $parsedContents = $object->getParsedContents(); - $this->assertCount(3, $parsedContents); - $this->assertSame( - 'This is text for a description with an ', - $parsedContents[0] - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $parsedContents[1] - ); - $this->assertSame('.', $parsedContents[2]); - - $this->assertSame( - array('inline tag with literal -{@link} in it'), - $parsedContents[1]->getParsedDescription() - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php deleted file mode 100644 index ff257aa1..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\CoversTag - * - * @author Daniel O'Connor - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class CoversTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\CoversTag can create - * a link for the covers doc block. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exReference - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\CoversTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exReference - ) { - $tag = new CoversTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exReference, $tag->getReference()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exReference - return array( - array( - 'covers', - 'Foo::bar()', - 'Foo::bar()', - '', - 'Foo::bar()' - ), - array( - 'covers', - 'Foo::bar() Testing', - 'Foo::bar() Testing', - 'Testing', - 'Foo::bar()', - ), - array( - 'covers', - 'Foo::bar() Testing comments', - 'Foo::bar() Testing comments', - 'Testing comments', - 'Foo::bar()', - ), - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php deleted file mode 100644 index 7a75e79c..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php +++ /dev/null @@ -1,115 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag - * - * @author Vasil Rangelov - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class DeprecatedTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create - * a link for the @deprecated doc block. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exDescription - * @param string $exVersion - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\DeprecatedTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exVersion - ) { - $tag = new DeprecatedTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exVersion, $tag->getVersion()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exVersion - return array( - array( - 'deprecated', - '1.0 First release.', - '1.0 First release.', - 'First release.', - '1.0' - ), - array( - 'deprecated', - "1.0\nFirst release.", - "1.0\nFirst release.", - 'First release.', - '1.0' - ), - array( - 'deprecated', - "1.0\nFirst\nrelease.", - "1.0\nFirst\nrelease.", - "First\nrelease.", - '1.0' - ), - array( - 'deprecated', - 'Unfinished release', - 'Unfinished release', - 'Unfinished release', - '' - ), - array( - 'deprecated', - '1.0', - '1.0', - '', - '1.0' - ), - array( - 'deprecated', - 'GIT: $Id$', - 'GIT: $Id$', - '', - 'GIT: $Id$' - ), - array( - 'deprecated', - 'GIT: $Id$ Dev build', - 'GIT: $Id$ Dev build', - 'Dev build', - 'GIT: $Id$' - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php deleted file mode 100644 index 519a61b3..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php +++ /dev/null @@ -1,203 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag - * - * @author Vasil Rangelov - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ExampleTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can - * understand the @source DocBlock. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exStartingLine - * @param string $exLineCount - * @param string $exFilepath - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\ExampleTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exStartingLine, - $exLineCount, - $exFilePath - ) { - $tag = new ExampleTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exStartingLine, $tag->getStartingLine()); - $this->assertEquals($exLineCount, $tag->getLineCount()); - $this->assertEquals($exFilePath, $tag->getFilePath()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, - // $content, - // $exContent, - // $exDescription, - // $exStartingLine, - // $exLineCount, - // $exFilePath - return array( - array( - 'example', - 'file.php', - 'file.php', - '', - 1, - null, - 'file.php' - ), - array( - 'example', - 'Testing comments', - 'Testing comments', - 'comments', - 1, - null, - 'Testing' - ), - array( - 'example', - 'file.php 2 Testing', - 'file.php 2 Testing', - 'Testing', - 2, - null, - 'file.php' - ), - array( - 'example', - 'file.php 2 3 Testing comments', - 'file.php 2 3 Testing comments', - 'Testing comments', - 2, - 3, - 'file.php' - ), - array( - 'example', - 'file.php 2 -1 Testing comments', - 'file.php 2 -1 Testing comments', - '-1 Testing comments', - 2, - null, - 'file.php' - ), - array( - 'example', - 'file.php -1 1 Testing comments', - 'file.php -1 1 Testing comments', - '-1 1 Testing comments', - 1, - null, - 'file.php' - ), - array( - 'example', - '"file with spaces.php" Testing comments', - '"file with spaces.php" Testing comments', - 'Testing comments', - 1, - null, - 'file with spaces.php' - ), - array( - 'example', - '"file with spaces.php" 2 Testing comments', - '"file with spaces.php" 2 Testing comments', - 'Testing comments', - 2, - null, - 'file with spaces.php' - ), - array( - 'example', - '"file with spaces.php" 2 3 Testing comments', - '"file with spaces.php" 2 3 Testing comments', - 'Testing comments', - 2, - 3, - 'file with spaces.php' - ), - array( - 'example', - '"file with spaces.php" 2 -3 Testing comments', - '"file with spaces.php" 2 -3 Testing comments', - '-3 Testing comments', - 2, - null, - 'file with spaces.php' - ), - array( - 'example', - '"file with spaces.php" -2 3 Testing comments', - '"file with spaces.php" -2 3 Testing comments', - '-2 3 Testing comments', - 1, - null, - 'file with spaces.php' - ), - array( - 'example', - 'file%20with%20spaces.php Testing comments', - 'file%20with%20spaces.php Testing comments', - 'Testing comments', - 1, - null, - 'file with spaces.php' - ), - array( - 'example', - 'folder/file%20with%20spaces.php Testing comments', - 'folder/file%20with%20spaces.php Testing comments', - 'Testing comments', - 1, - null, - 'folder/file with spaces.php' - ), - array( - 'example', - 'http://example.com/file%20with%20spaces.php Testing comments', - 'http://example.com/file%20with%20spaces.php Testing comments', - 'Testing comments', - 1, - null, - 'http://example.com/file%20with%20spaces.php' - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php deleted file mode 100644 index 0c64ed08..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php +++ /dev/null @@ -1,87 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\LinkTag - * - * @author Ben Selby - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class LinkTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create - * a link for the @link doc block. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exDescription - * @param string $exLink - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\LinkTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exLink - ) { - $tag = new LinkTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exLink, $tag->getLink()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exLink - return array( - array( - 'link', - 'http://www.phpdoc.org/', - 'http://www.phpdoc.org/', - 'http://www.phpdoc.org/', - 'http://www.phpdoc.org/' - ), - array( - 'link', - 'http://www.phpdoc.org/ Testing', - 'http://www.phpdoc.org/ Testing', - 'Testing', - 'http://www.phpdoc.org/' - ), - array( - 'link', - 'http://www.phpdoc.org/ Testing comments', - 'http://www.phpdoc.org/ Testing comments', - 'Testing comments', - 'http://www.phpdoc.org/' - ), - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php deleted file mode 100644 index efc3a15b..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php +++ /dev/null @@ -1,146 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\MethodTag - * - * @author Mike van Riel - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class MethodTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * @param string $signature The signature to test. - * @param bool $valid Whether the given signature is expected to - * be valid. - * @param string $expected_name The method name that is expected from this - * signature. - * @param string $expected_return The return type that is expected from this - * signature. - * @param bool $paramCount Number of parameters in the signature. - * @param string $description The short description mentioned in the - * signature. - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\MethodTag - * @dataProvider getTestSignatures - * - * @return void - */ - public function testConstruct( - $signature, - $valid, - $expected_name, - $expected_return, - $expected_isStatic, - $paramCount, - $description - ) { - ob_start(); - $tag = new MethodTag('method', $signature); - $stdout = ob_get_clean(); - - $this->assertSame( - $valid, - empty($stdout), - 'No error should have been output if the signature is valid' - ); - - if (!$valid) { - return; - } - - $this->assertEquals($expected_name, $tag->getMethodName()); - $this->assertEquals($expected_return, $tag->getType()); - $this->assertEquals($description, $tag->getDescription()); - $this->assertEquals($expected_isStatic, $tag->isStatic()); - $this->assertCount($paramCount, $tag->getArguments()); - } - - public function getTestSignatures() - { - return array( - // TODO: Verify this case -// array( -// 'foo', -// false, 'foo', '', false, 0, '' -// ), - array( - 'foo()', - true, 'foo', 'void', false, 0, '' - ), - array( - 'foo() description', - true, 'foo', 'void', false, 0, 'description' - ), - array( - 'int foo()', - true, 'foo', 'int', false, 0, '' - ), - array( - 'int foo() description', - true, 'foo', 'int', false, 0, 'description' - ), - array( - 'int foo($a, $b)', - true, 'foo', 'int', false, 2, '' - ), - array( - 'int foo() foo(int $a, int $b)', - true, 'foo', 'int', false, 2, '' - ), - array( - 'int foo(int $a, int $b)', - true, 'foo', 'int', false, 2, '' - ), - array( - 'null|int foo(int $a, int $b)', - true, 'foo', 'null|int', false, 2, '' - ), - array( - 'int foo(null|int $a, int $b)', - true, 'foo', 'int', false, 2, '' - ), - array( - '\Exception foo() foo(Exception $a, Exception $b)', - true, 'foo', '\Exception', false, 2, '' - ), - array( - 'int foo() foo(Exception $a, Exception $b) description', - true, 'foo', 'int', false, 2, 'description' - ), - array( - 'int foo() foo(\Exception $a, \Exception $b) description', - true, 'foo', 'int', false, 2, 'description' - ), - array( - 'void()', - true, 'void', 'void', false, 0, '' - ), - array( - 'static foo()', - true, 'foo', 'static', false, 0, '' - ), - array( - 'static void foo()', - true, 'foo', 'void', true, 0, '' - ), - array( - 'static static foo()', - true, 'foo', 'static', true, 0, '' - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php deleted file mode 100644 index 0e05382f..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php +++ /dev/null @@ -1,118 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\ParamTag - * - * @author Mike van Riel - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ParamTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ParamTag can - * understand the @param DocBlock. - * - * @param string $type - * @param string $content - * @param string $extractedType - * @param string $extractedTypes - * @param string $extractedVarName - * @param string $extractedDescription - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\ParamTag - * @dataProvider provideDataForConstructor - * - * @return void - */ - public function testConstructorParsesInputsIntoCorrectFields( - $type, - $content, - $extractedType, - $extractedTypes, - $extractedVarName, - $extractedDescription - ) { - $tag = new ParamTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($extractedType, $tag->getType()); - $this->assertEquals($extractedTypes, $tag->getTypes()); - $this->assertEquals($extractedVarName, $tag->getVariableName()); - $this->assertEquals($extractedDescription, $tag->getDescription()); - } - - /** - * Data provider for testConstructorParsesInputsIntoCorrectFields() - * - * @return array - */ - public function provideDataForConstructor() - { - return array( - array('param', 'int', 'int', array('int'), '', ''), - array('param', '$bob', '', array(), '$bob', ''), - array( - 'param', - 'int Number of bobs', - 'int', - array('int'), - '', - 'Number of bobs' - ), - array( - 'param', - 'int $bob', - 'int', - array('int'), - '$bob', - '' - ), - array( - 'param', - 'int $bob Number of bobs', - 'int', - array('int'), - '$bob', - 'Number of bobs' - ), - array( - 'param', - "int Description \n on multiple lines", - 'int', - array('int'), - '', - "Description \n on multiple lines" - ), - array( - 'param', - "int \n\$bob Variable name on a new line", - 'int', - array('int'), - '$bob', - "Variable name on a new line" - ), - array( - 'param', - "\nint \$bob Type on a new line", - 'int', - array('int'), - '$bob', - "Type on a new line" - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php deleted file mode 100644 index 9e2aec0d..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php +++ /dev/null @@ -1,102 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\ReturnTag - * - * @author Mike van Riel - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ReturnTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag can - * understand the @return DocBlock. - * - * @param string $type - * @param string $content - * @param string $extractedType - * @param string $extractedTypes - * @param string $extractedDescription - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\ReturnTag - * @dataProvider provideDataForConstructor - * - * @return void - */ - public function testConstructorParsesInputsIntoCorrectFields( - $type, - $content, - $extractedType, - $extractedTypes, - $extractedDescription - ) { - $tag = new ReturnTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($extractedType, $tag->getType()); - $this->assertEquals($extractedTypes, $tag->getTypes()); - $this->assertEquals($extractedDescription, $tag->getDescription()); - } - - /** - * Data provider for testConstructorParsesInputsIntoCorrectFields() - * - * @return array - */ - public function provideDataForConstructor() - { - return array( - array('return', '', '', array(), ''), - array('return', 'int', 'int', array('int'), ''), - array( - 'return', - 'int Number of Bobs', - 'int', - array('int'), - 'Number of Bobs' - ), - array( - 'return', - 'int|double Number of Bobs', - 'int|double', - array('int', 'double'), - 'Number of Bobs' - ), - array( - 'return', - "int Number of \n Bobs", - 'int', - array('int'), - "Number of \n Bobs" - ), - array( - 'return', - " int Number of Bobs", - 'int', - array('int'), - "Number of Bobs" - ), - array( - 'return', - "int\nNumber of Bobs", - 'int', - array('int'), - "Number of Bobs" - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php deleted file mode 100644 index 6829b046..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SeeTag - * - * @author Daniel O'Connor - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class SeeTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the phpDocumentor_Reflection_DocBlock_Tag_See can create a link - * for the @see doc block. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exReference - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\SeeTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exReference - ) { - $tag = new SeeTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exReference, $tag->getReference()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exReference - return array( - array( - 'see', - 'Foo::bar()', - 'Foo::bar()', - '', - 'Foo::bar()' - ), - array( - 'see', - 'Foo::bar() Testing', - 'Foo::bar() Testing', - 'Testing', - 'Foo::bar()', - ), - array( - 'see', - 'Foo::bar() Testing comments', - 'Foo::bar() Testing comments', - 'Testing comments', - 'Foo::bar()', - ), - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php deleted file mode 100644 index 8caf25d1..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php +++ /dev/null @@ -1,115 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SinceTag - * - * @author Vasil Rangelov - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class SinceTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create - * a link for the @since doc block. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exDescription - * @param string $exVersion - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\SinceTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exVersion - ) { - $tag = new SinceTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exVersion, $tag->getVersion()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exVersion - return array( - array( - 'since', - '1.0 First release.', - '1.0 First release.', - 'First release.', - '1.0' - ), - array( - 'since', - "1.0\nFirst release.", - "1.0\nFirst release.", - 'First release.', - '1.0' - ), - array( - 'since', - "1.0\nFirst\nrelease.", - "1.0\nFirst\nrelease.", - "First\nrelease.", - '1.0' - ), - array( - 'since', - 'Unfinished release', - 'Unfinished release', - 'Unfinished release', - '' - ), - array( - 'since', - '1.0', - '1.0', - '', - '1.0' - ), - array( - 'since', - 'GIT: $Id$', - 'GIT: $Id$', - '', - 'GIT: $Id$' - ), - array( - 'since', - 'GIT: $Id$ Dev build', - 'GIT: $Id$ Dev build', - 'Dev build', - 'GIT: $Id$' - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php deleted file mode 100644 index 2a40e0aa..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php +++ /dev/null @@ -1,116 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\SourceTag - * - * @author Vasil Rangelov - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class SourceTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\SourceTag can - * understand the @source DocBlock. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exStartingLine - * @param string $exLineCount - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\SourceTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exStartingLine, - $exLineCount - ) { - $tag = new SourceTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exStartingLine, $tag->getStartingLine()); - $this->assertEquals($exLineCount, $tag->getLineCount()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exStartingLine, $exLineCount - return array( - array( - 'source', - '2', - '2', - '', - 2, - null - ), - array( - 'source', - 'Testing', - 'Testing', - 'Testing', - 1, - null - ), - array( - 'source', - '2 Testing', - '2 Testing', - 'Testing', - 2, - null - ), - array( - 'source', - '2 3 Testing comments', - '2 3 Testing comments', - 'Testing comments', - 2, - 3 - ), - array( - 'source', - '2 -1 Testing comments', - '2 -1 Testing comments', - '-1 Testing comments', - 2, - null - ), - array( - 'source', - '-1 1 Testing comments', - '-1 1 Testing comments', - '-1 1 Testing comments', - 1, - null - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php deleted file mode 100644 index 3c669d55..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php +++ /dev/null @@ -1,102 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\ThrowsTag - * - * @author Mike van Riel - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class ThrowsTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag can - * understand the @throws DocBlock. - * - * @param string $type - * @param string $content - * @param string $extractedType - * @param string $extractedTypes - * @param string $extractedDescription - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\ThrowsTag - * @dataProvider provideDataForConstructor - * - * @return void - */ - public function testConstructorParsesInputsIntoCorrectFields( - $type, - $content, - $extractedType, - $extractedTypes, - $extractedDescription - ) { - $tag = new ThrowsTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($extractedType, $tag->getType()); - $this->assertEquals($extractedTypes, $tag->getTypes()); - $this->assertEquals($extractedDescription, $tag->getDescription()); - } - - /** - * Data provider for testConstructorParsesInputsIntoCorrectFields() - * - * @return array - */ - public function provideDataForConstructor() - { - return array( - array('throws', '', '', array(), ''), - array('throws', 'int', 'int', array('int'), ''), - array( - 'throws', - 'int Number of Bobs', - 'int', - array('int'), - 'Number of Bobs' - ), - array( - 'throws', - 'int|double Number of Bobs', - 'int|double', - array('int', 'double'), - 'Number of Bobs' - ), - array( - 'throws', - "int Number of \n Bobs", - 'int', - array('int'), - "Number of \n Bobs" - ), - array( - 'throws', - " int Number of Bobs", - 'int', - array('int'), - "Number of Bobs" - ), - array( - 'throws', - "int\nNumber of Bobs", - 'int', - array('int'), - "Number of Bobs" - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php deleted file mode 100644 index 45868d73..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php +++ /dev/null @@ -1,86 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\UsesTag - * - * @author Daniel O'Connor - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class UsesTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\UsesTag can create - * a link for the @uses doc block. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exReference - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\UsesTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exReference - ) { - $tag = new UsesTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exReference, $tag->getReference()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exReference - return array( - array( - 'uses', - 'Foo::bar()', - 'Foo::bar()', - '', - 'Foo::bar()' - ), - array( - 'uses', - 'Foo::bar() Testing', - 'Foo::bar() Testing', - 'Testing', - 'Foo::bar()', - ), - array( - 'uses', - 'Foo::bar() Testing comments', - 'Foo::bar() Testing comments', - 'Testing comments', - 'Foo::bar()', - ), - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php deleted file mode 100644 index 9ae2aa5f..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php +++ /dev/null @@ -1,94 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag - * - * @author Daniel O'Connor - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class VarTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can - * understand the @var doc block. - * - * @param string $type - * @param string $content - * @param string $exType - * @param string $exVariable - * @param string $exDescription - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\VarTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exType, - $exVariable, - $exDescription - ) { - $tag = new VarTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exType, $tag->getType()); - $this->assertEquals($exVariable, $tag->getVariableName()); - $this->assertEquals($exDescription, $tag->getDescription()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exType, $exVariable, $exDescription - return array( - array( - 'var', - 'int', - 'int', - '', - '' - ), - array( - 'var', - 'int $bob', - 'int', - '$bob', - '' - ), - array( - 'var', - 'int $bob Number of bobs', - 'int', - '$bob', - 'Number of bobs' - ), - array( - 'var', - '', - '', - '', - '' - ), - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php deleted file mode 100644 index e145386d..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php +++ /dev/null @@ -1,115 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Tag; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VersionTag - * - * @author Vasil Rangelov - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class VersionTagTest extends \PHPUnit_Framework_TestCase -{ - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\LinkTag can create - * a link for the @version doc block. - * - * @param string $type - * @param string $content - * @param string $exContent - * @param string $exDescription - * @param string $exVersion - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag\VersionTag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exContent, - $exDescription, - $exVersion - ) { - $tag = new VersionTag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($exContent, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - $this->assertEquals($exVersion, $tag->getVersion()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exContent, $exDescription, $exVersion - return array( - array( - 'version', - '1.0 First release.', - '1.0 First release.', - 'First release.', - '1.0' - ), - array( - 'version', - "1.0\nFirst release.", - "1.0\nFirst release.", - 'First release.', - '1.0' - ), - array( - 'version', - "1.0\nFirst\nrelease.", - "1.0\nFirst\nrelease.", - "First\nrelease.", - '1.0' - ), - array( - 'version', - 'Unfinished release', - 'Unfinished release', - 'Unfinished release', - '' - ), - array( - 'version', - '1.0', - '1.0', - '', - '1.0' - ), - array( - 'version', - 'GIT: $Id$', - 'GIT: $Id$', - '', - 'GIT: $Id$' - ), - array( - 'version', - 'GIT: $Id$ Dev build', - 'GIT: $Id$ Dev build', - 'Dev build', - 'GIT: $Id$' - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php deleted file mode 100644 index 9e873ecb..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php +++ /dev/null @@ -1,313 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock; - -use phpDocumentor\Reflection\DocBlock; -use phpDocumentor\Reflection\DocBlock\Context; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Tag\VarTag - * - * @author Daniel O'Connor - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class TagTest extends \PHPUnit_Framework_TestCase -{ - - /** - * @expectedException \InvalidArgumentException - * - * @return void - */ - public function testInvalidTagLine() - { - Tag::createInstance('Invalid tag line'); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler - * - * @return void - */ - public function testTagHandlerUnregistration() - { - $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; - $tagPreUnreg = Tag::createInstance('@var mixed'); - $this->assertInstanceOf( - $currentHandler, - $tagPreUnreg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPreUnreg - ); - - Tag::registerTagHandler('var', null); - - $tagPostUnreg = Tag::createInstance('@var mixed'); - $this->assertNotInstanceOf( - $currentHandler, - $tagPostUnreg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPostUnreg - ); - - Tag::registerTagHandler('var', $currentHandler); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler - * - * @return void - */ - public function testTagHandlerCorrectRegistration() - { - if (0 == ini_get('allow_url_include')) { - $this->markTestSkipped('"data" URIs for includes are required.'); - } - $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; - $tagPreReg = Tag::createInstance('@var mixed'); - $this->assertInstanceOf( - $currentHandler, - $tagPreReg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPreReg - ); - - include 'data:text/plain;base64,'. base64_encode( -<<assertTrue(Tag::registerTagHandler('var', '\MyTagHandler')); - - $tagPostReg = Tag::createInstance('@var mixed'); - $this->assertNotInstanceOf( - $currentHandler, - $tagPostReg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPostReg - ); - $this->assertInstanceOf( - '\MyTagHandler', - $tagPostReg - ); - - $this->assertTrue(Tag::registerTagHandler('var', $currentHandler)); - } - - /** - * @depends testTagHandlerCorrectRegistration - * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler - * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance - * - * @return void - */ - public function testNamespacedTagHandlerCorrectRegistration() - { - $tagPreReg = Tag::createInstance('@T something'); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPreReg - ); - $this->assertNotInstanceOf( - '\MyTagHandler', - $tagPreReg - ); - - $this->assertTrue( - Tag::registerTagHandler('\MyNamespace\MyTag', '\MyTagHandler') - ); - - $tagPostReg = Tag::createInstance( - '@T something', - new DocBlock( - '', - new Context('', array('T' => '\MyNamespace\MyTag')) - ) - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPostReg - ); - $this->assertInstanceOf( - '\MyTagHandler', - $tagPostReg - ); - - $this->assertTrue( - Tag::registerTagHandler('\MyNamespace\MyTag', null) - ); - } - - /** - * @depends testTagHandlerCorrectRegistration - * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler - * @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance - * - * @return void - */ - public function testNamespacedTagHandlerIncorrectRegistration() - { - $tagPreReg = Tag::createInstance('@T something'); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPreReg - ); - $this->assertNotInstanceOf( - '\MyTagHandler', - $tagPreReg - ); - - $this->assertFalse( - Tag::registerTagHandler('MyNamespace\MyTag', '\MyTagHandler') - ); - - $tagPostReg = Tag::createInstance( - '@T something', - new DocBlock( - '', - new Context('', array('T' => '\MyNamespace\MyTag')) - ) - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPostReg - ); - $this->assertNotInstanceOf( - '\MyTagHandler', - $tagPostReg - ); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler - * - * @return void - */ - public function testNonExistentTagHandlerRegistration() - { - $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; - $tagPreReg = Tag::createInstance('@var mixed'); - $this->assertInstanceOf( - $currentHandler, - $tagPreReg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPreReg - ); - - $this->assertFalse(Tag::registerTagHandler('var', 'Non existent')); - - $tagPostReg = Tag::createInstance('@var mixed'); - $this->assertInstanceOf( - $currentHandler, - $tagPostReg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPostReg - ); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler - * - * @return void - */ - public function testIncompatibleTagHandlerRegistration() - { - $currentHandler = __NAMESPACE__ . '\Tag\VarTag'; - $tagPreReg = Tag::createInstance('@var mixed'); - $this->assertInstanceOf( - $currentHandler, - $tagPreReg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPreReg - ); - - $this->assertFalse( - Tag::registerTagHandler('var', __NAMESPACE__ . '\TagTest') - ); - - $tagPostReg = Tag::createInstance('@var mixed'); - $this->assertInstanceOf( - $currentHandler, - $tagPostReg - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\Tag', - $tagPostReg - ); - } - - /** - * Test that the \phpDocumentor\Reflection\DocBlock\Tag\VarTag can - * understand the @var doc block. - * - * @param string $type - * @param string $content - * @param string $exDescription - * - * @covers \phpDocumentor\Reflection\DocBlock\Tag - * @dataProvider provideDataForConstuctor - * - * @return void - */ - public function testConstructorParesInputsIntoCorrectFields( - $type, - $content, - $exDescription - ) { - $tag = new Tag($type, $content); - - $this->assertEquals($type, $tag->getName()); - $this->assertEquals($content, $tag->getContent()); - $this->assertEquals($exDescription, $tag->getDescription()); - } - - /** - * Data provider for testConstructorParesInputsIntoCorrectFields - * - * @return array - */ - public function provideDataForConstuctor() - { - // $type, $content, $exDescription - return array( - array( - 'unknown', - 'some content', - 'some content', - ), - array( - 'unknown', - '', - '', - ) - ); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php deleted file mode 100644 index 78c7306d..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php +++ /dev/null @@ -1,195 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection\DocBlock\Type; - -use phpDocumentor\Reflection\DocBlock\Context; - -/** - * Test class for \phpDocumentor\Reflection\DocBlock\Type\Collection - * - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection - * - * @author Mike van Riel - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class CollectionTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::getContext - * - * @return void - */ - public function testConstruct() - { - $collection = new Collection(); - $this->assertCount(0, $collection); - $this->assertEquals('', $collection->getContext()->getNamespace()); - $this->assertCount(0, $collection->getContext()->getNamespaceAliases()); - } - - /** - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct - * - * @return void - */ - public function testConstructWithTypes() - { - $collection = new Collection(array('integer', 'string')); - $this->assertCount(2, $collection); - } - - /** - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct - * - * @return void - */ - public function testConstructWithNamespace() - { - $collection = new Collection(array(), new Context('\My\Space')); - $this->assertEquals('My\Space', $collection->getContext()->getNamespace()); - - $collection = new Collection(array(), new Context('My\Space')); - $this->assertEquals('My\Space', $collection->getContext()->getNamespace()); - - $collection = new Collection(array(), null); - $this->assertEquals('', $collection->getContext()->getNamespace()); - } - - /** - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::__construct - * - * @return void - */ - public function testConstructWithNamespaceAliases() - { - $fixture = array('a' => 'b'); - $collection = new Collection(array(), new Context(null, $fixture)); - $this->assertEquals( - array('a' => '\b'), - $collection->getContext()->getNamespaceAliases() - ); - } - - /** - * @param string $fixture - * @param array $expected - * - * @dataProvider provideTypesToExpand - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add - * - * @return void - */ - public function testAdd($fixture, $expected) - { - $collection = new Collection( - array(), - new Context('\My\Space', array('Alias' => '\My\Space\Aliasing')) - ); - $collection->add($fixture); - - $this->assertSame($expected, $collection->getArrayCopy()); - } - - /** - * @param string $fixture - * @param array $expected - * - * @dataProvider provideTypesToExpandWithoutNamespace - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add - * - * @return void - */ - public function testAddWithoutNamespace($fixture, $expected) - { - $collection = new Collection( - array(), - new Context(null, array('Alias' => '\My\Space\Aliasing')) - ); - $collection->add($fixture); - - $this->assertSame($expected, $collection->getArrayCopy()); - } - - /** - * @covers phpDocumentor\Reflection\DocBlock\Type\Collection::add - * @expectedException InvalidArgumentException - * - * @return void - */ - public function testAddWithInvalidArgument() - { - $collection = new Collection(); - $collection->add(array()); - } - - /** - * Returns the types and their expected values to test the retrieval of - * types. - * - * @param string $method Name of the method consuming this data provider. - * @param string $namespace Name of the namespace to user as basis. - * - * @return string[] - */ - public function provideTypesToExpand($method, $namespace = '\My\Space\\') - { - return array( - array('', array()), - array(' ', array()), - array('int', array('int')), - array('int ', array('int')), - array('string', array('string')), - array('DocBlock', array($namespace.'DocBlock')), - array('DocBlock[]', array($namespace.'DocBlock[]')), - array(' DocBlock ', array($namespace.'DocBlock')), - array('\My\Space\DocBlock', array('\My\Space\DocBlock')), - array('Alias\DocBlock', array('\My\Space\Aliasing\DocBlock')), - array( - 'DocBlock|Tag', - array($namespace .'DocBlock', $namespace .'Tag') - ), - array( - 'DocBlock|null', - array($namespace.'DocBlock', 'null') - ), - array( - '\My\Space\DocBlock|Tag', - array('\My\Space\DocBlock', $namespace.'Tag') - ), - array( - 'DocBlock[]|null', - array($namespace.'DocBlock[]', 'null') - ), - array( - 'DocBlock[]|int[]', - array($namespace.'DocBlock[]', 'int[]') - ), - ); - } - - /** - * Returns the types and their expected values to test the retrieval of - * types when no namespace is available. - * - * @param string $method Name of the method consuming this data provider. - * - * @return string[] - */ - public function provideTypesToExpandWithoutNamespace($method) - { - return $this->provideTypesToExpand($method, '\\'); - } -} diff --git a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php b/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php deleted file mode 100644 index 30eedfc5..00000000 --- a/server/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php +++ /dev/null @@ -1,337 +0,0 @@ - - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ - -namespace phpDocumentor\Reflection; - -use phpDocumentor\Reflection\DocBlock\Context; -use phpDocumentor\Reflection\DocBlock\Location; -use phpDocumentor\Reflection\DocBlock\Tag\ReturnTag; - -/** - * Test class for phpDocumentor\Reflection\DocBlock - * - * @author Mike van Riel - * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com) - * @license http://www.opensource.org/licenses/mit-license.php MIT - * @link http://phpdoc.org - */ -class DocBlockTest extends \PHPUnit_Framework_TestCase -{ - /** - * @covers \phpDocumentor\Reflection\DocBlock - * - * @return void - */ - public function testConstruct() - { - $fixture = << '\phpDocumentor')), - new Location(2) - ); - $this->assertEquals( - 'This is a short description', - $object->getShortDescription() - ); - $this->assertEquals( - 'This is a long description', - $object->getLongDescription()->getContents() - ); - $this->assertCount(2, $object->getTags()); - $this->assertTrue($object->hasTag('see')); - $this->assertTrue($object->hasTag('return')); - $this->assertFalse($object->hasTag('category')); - - $this->assertSame('MyNamespace', $object->getContext()->getNamespace()); - $this->assertSame( - array('PHPDoc' => '\phpDocumentor'), - $object->getContext()->getNamespaceAliases() - ); - $this->assertSame(2, $object->getLocation()->getLineNumber()); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock::splitDocBlock - * - * @return void - */ - public function testConstructWithTagsOnly() - { - $fixture = <<assertEquals('', $object->getShortDescription()); - $this->assertEquals('', $object->getLongDescription()->getContents()); - $this->assertCount(2, $object->getTags()); - $this->assertTrue($object->hasTag('see')); - $this->assertTrue($object->hasTag('return')); - $this->assertFalse($object->hasTag('category')); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock::isTemplateStart - */ - public function testIfStartOfTemplateIsDiscovered() - { - $fixture = <<assertEquals('', $object->getShortDescription()); - $this->assertEquals('', $object->getLongDescription()->getContents()); - $this->assertCount(2, $object->getTags()); - $this->assertTrue($object->hasTag('see')); - $this->assertTrue($object->hasTag('return')); - $this->assertFalse($object->hasTag('category')); - $this->assertTrue($object->isTemplateStart()); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock::isTemplateEnd - */ - public function testIfEndOfTemplateIsDiscovered() - { - $fixture = <<assertEquals('', $object->getShortDescription()); - $this->assertEquals('', $object->getLongDescription()->getContents()); - $this->assertTrue($object->isTemplateEnd()); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock::cleanInput - * - * @return void - */ - public function testConstructOneLiner() - { - $fixture = '/** Short description and nothing more. */'; - $object = new DocBlock($fixture); - $this->assertEquals( - 'Short description and nothing more.', - $object->getShortDescription() - ); - $this->assertEquals('', $object->getLongDescription()->getContents()); - $this->assertCount(0, $object->getTags()); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock::__construct - * - * @return void - */ - public function testConstructFromReflector() - { - $object = new DocBlock(new \ReflectionClass($this)); - $this->assertEquals( - 'Test class for phpDocumentor\Reflection\DocBlock', - $object->getShortDescription() - ); - $this->assertEquals('', $object->getLongDescription()->getContents()); - $this->assertCount(4, $object->getTags()); - $this->assertTrue($object->hasTag('author')); - $this->assertTrue($object->hasTag('copyright')); - $this->assertTrue($object->hasTag('license')); - $this->assertTrue($object->hasTag('link')); - $this->assertFalse($object->hasTag('category')); - } - - /** - * @expectedException \InvalidArgumentException - * - * @return void - */ - public function testExceptionOnInvalidObject() - { - new DocBlock($this); - } - - public function testDotSeperation() - { - $fixture = <<assertEquals( - 'This is a short description.', - $object->getShortDescription() - ); - $this->assertEquals( - "This is a long description.\nThis is a continuation of the long " - ."description.", - $object->getLongDescription()->getContents() - ); - } - - /** - * @covers \phpDocumentor\Reflection\DocBlock::parseTags - * @expectedException \LogicException - * - * @return void - */ - public function testInvalidTagBlock() - { - if (0 == ini_get('allow_url_include')) { - $this->markTestSkipped('"data" URIs for includes are required.'); - } - - include 'data:text/plain;base64,'. base64_encode( - <<assertEquals( - 'This is a short description.', - $object->getShortDescription() - ); - $this->assertEquals( - 'This is a long description.', - $object->getLongDescription()->getContents() - ); - $tags = $object->getTags(); - $this->assertCount(2, $tags); - $this->assertTrue($object->hasTag('method')); - $this->assertTrue($object->hasTag('Method')); - $this->assertInstanceOf( - __NAMESPACE__ . '\DocBlock\Tag\MethodTag', - $tags[0] - ); - $this->assertInstanceOf( - __NAMESPACE__ . '\DocBlock\Tag', - $tags[1] - ); - $this->assertNotInstanceOf( - __NAMESPACE__ . '\DocBlock\Tag\MethodTag', - $tags[1] - ); - } - - /** - * @depends testConstructFromReflector - * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName - * - * @return void - */ - public function testGetTagsByNameZeroAndOneMatch() - { - $object = new DocBlock(new \ReflectionClass($this)); - $this->assertEmpty($object->getTagsByName('category')); - $this->assertCount(1, $object->getTagsByName('author')); - } - - /** - * @depends testConstructWithTagsOnly - * @covers \phpDocumentor\Reflection\DocBlock::parseTags - * - * @return void - */ - public function testParseMultilineTag() - { - $fixture = <<assertCount(1, $object->getTags()); - } - - /** - * @depends testConstructWithTagsOnly - * @covers \phpDocumentor\Reflection\DocBlock::parseTags - * - * @return void - */ - public function testParseMultilineTagWithLineBreaks() - { - $fixture = <<assertCount(1, $tags = $object->getTags()); - /** @var ReturnTag $tag */ - $tag = reset($tags); - $this->assertEquals("Content on\n multiple lines.\n\n One more, after the break.", $tag->getDescription()); - } - - /** - * @depends testConstructWithTagsOnly - * @covers \phpDocumentor\Reflection\DocBlock::getTagsByName - * - * @return void - */ - public function testGetTagsByNameMultipleMatch() - { - $fixture = <<assertEmpty($object->getTagsByName('category')); - $this->assertCount(1, $object->getTagsByName('return')); - $this->assertCount(2, $object->getTagsByName('param')); - } -} diff --git a/server/vendor/phpspec/prophecy/.gitignore b/server/vendor/phpspec/prophecy/.gitignore deleted file mode 100644 index c50c8c4a..00000000 --- a/server/vendor/phpspec/prophecy/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.tgz -*.phar -bin -vendor diff --git a/server/vendor/phpspec/prophecy/.travis.yml b/server/vendor/phpspec/prophecy/.travis.yml deleted file mode 100644 index 004e612a..00000000 --- a/server/vendor/phpspec/prophecy/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: php - -php: [5.3, 5.4, 5.5, 5.6, 7, hhvm] - -sudo: false - -cache: - directories: - - $HOME/.composer/cache - -branches: - except: - - /^bugfix\/.*$/ - - /^feature\/.*$/ - - /^optimization\/.*$/ - -before_script: travis_retry composer install --no-interaction - -script: vendor/bin/phpspec run -fpretty -v diff --git a/server/vendor/phpspec/prophecy/CHANGES.md b/server/vendor/phpspec/prophecy/CHANGES.md deleted file mode 100644 index c293f0d4..00000000 --- a/server/vendor/phpspec/prophecy/CHANGES.md +++ /dev/null @@ -1,122 +0,0 @@ -1.5.0 / 2015-04-27 -================== - - * Add support for PHP7 scalar type hints (thanks @trowski) - * Add support for PHP7 return types (thanks @trowski) - * Update internal test suite to support PHP7 - -1.4.1 / 2015-04-27 -================== - - * Fixed bug in closure-based argument tokens (#181) - -1.4.0 / 2015-03-27 -================== - - * Fixed errors in return type phpdocs (thanks @sobit) - * Fixed stringifying of hash containing one value (thanks @avant1) - * Improved clarity of method call expectation exception (thanks @dantleech) - * Add ability to specify which argument is returned in willReturnArgument (thanks @coderbyheart) - * Add more information to MethodNotFound exceptions (thanks @ciaranmcnulty) - * Support for mocking classes with methods that return references (thanks @edsonmedina) - * Improved object comparison (thanks @whatthejeff) - * Adopted '^' in composer dependencies (thanks @GrahamCampbell) - * Fixed non-typehinted arguments being treated as optional (thanks @whatthejeff) - * Magic methods are now filtered for keywords (thanks @seagoj) - * More readable errors for failure when expecting single calls (thanks @dantleech) - -1.3.1 / 2014-11-17 -================== - - * Fix the edge case when failed predictions weren't recorded for `getCheckedPredictions()` - -1.3.0 / 2014-11-14 -================== - - * Add a way to get checked predictions with `MethodProphecy::getCheckedPredictions()` - * Fix HHVM compatibility - * Remove dead code (thanks @stof) - * Add support for DirectoryIterators (thanks @shanethehat) - -1.2.0 / 2014-07-18 -================== - - * Added support for doubling magic methods documented in the class phpdoc (thanks @armetiz) - * Fixed a segfault appearing in some cases (thanks @dmoreaulf) - * Fixed the doubling of methods with typehints on non-existent classes (thanks @gquemener) - * Added support for internal classes using keywords as method names (thanks @milan) - * Added IdenticalValueToken and Argument::is (thanks @florianv) - * Removed the usage of scalar typehints in HHVM as HHVM 3 does not support them anymore in PHP code (thanks @whatthejeff) - -1.1.2 / 2014-01-24 -================== - - * Spy automatically promotes spied method call to an expected one - -1.1.1 / 2014-01-15 -================== - - * Added support for HHVM - -1.1.0 / 2014-01-01 -================== - - * Changed the generated class names to use a static counter instead of a random number - * Added a clss patch for ReflectionClass::newInstance to make its argument optional consistently (thanks @docteurklein) - * Fixed mirroring of classes with typehints on non-existent classes (thanks @docteurklein) - * Fixed the support of array callables in CallbackPromise and CallbackPrediction (thanks @ciaranmcnulty) - * Added support for properties in ObjectStateToken (thanks @adrienbrault) - * Added support for mocking classes with a final constructor (thanks @ciaranmcnulty) - * Added ArrayEveryEntryToken and Argument::withEveryEntry() (thanks @adrienbrault) - * Added an exception when trying to prophesize on a final method instead of ignoring silently (thanks @docteurklein) - * Added StringContainToken and Argument::containingString() (thanks @peterjmit) - * Added ``shouldNotHaveBeenCalled`` on the MethodProphecy (thanks @ciaranmcnulty) - * Fixed the comparison of objects in ExactValuetoken (thanks @sstok) - * Deprecated ``shouldNotBeenCalled`` in favor of ``shouldNotHaveBeenCalled`` - -1.0.4 / 2013-08-10 -================== - - * Better randomness for generated class names (thanks @sstok) - * Add support for interfaces into TypeToken and Argument::type() (thanks @sstok) - * Add support for old-style (method name === class name) constructors (thanks @l310 for report) - -1.0.3 / 2013-07-04 -================== - - * Support callable typehints (thanks @stof) - * Do not attempt to autoload arrays when generating code (thanks @MarcoDeBortoli) - * New ArrayEntryToken (thanks @kagux) - -1.0.2 / 2013-05-19 -================== - - * Logical `AND` token added (thanks @kagux) - * Logical `NOT` token added (thanks @kagux) - * Add support for setting custom constructor arguments - * Properly stringify hashes - * Record calls that throw exceptions - * Migrate spec suite to PhpSpec 2.0 - -1.0.1 / 2013-04-30 -================== - - * Fix broken UnexpectedCallException message - * Trim AggregateException message - -1.0.0 / 2013-04-29 -================== - - * Improve exception messages - -1.0.0-BETA2 / 2013-04-03 -======================== - - * Add more debug information to CallTimes and Call prediction exception messages - * Fix MethodNotFoundException wrong namespace (thanks @gunnarlium) - * Fix some typos in the exception messages (thanks @pborreli) - -1.0.0-BETA1 / 2013-03-25 -======================== - - * Initial release diff --git a/server/vendor/phpspec/prophecy/CONTRIBUTING.md b/server/vendor/phpspec/prophecy/CONTRIBUTING.md deleted file mode 100644 index 3674aac4..00000000 --- a/server/vendor/phpspec/prophecy/CONTRIBUTING.md +++ /dev/null @@ -1,21 +0,0 @@ -Contributing ------------- - -Prophecy is an open source, community-driven project. If you'd like to contribute, -feel free to do this, but remember to follow this few simple rules: - -- Make your feature addition or bug fix, -- Add either specs or examples for any changes you're making (bugfixes or additions) - (please look into `spec/` folder for some examples). This is important so we don't break - it in a future version unintentionally, -- Commit your code, but do not mess with `CHANGES.md`, - -Running tests -------------- - -Make sure that you don't break anything with your changes by running: - -```bash -$> composer install --dev --prefer-dist -$> vendor/bin/phpspec run -``` diff --git a/server/vendor/phpspec/prophecy/LICENSE b/server/vendor/phpspec/prophecy/LICENSE deleted file mode 100644 index c8b36471..00000000 --- a/server/vendor/phpspec/prophecy/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2013 Konstantin Kudryashov - Marcello Duarte - -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/server/vendor/phpspec/prophecy/README.md b/server/vendor/phpspec/prophecy/README.md deleted file mode 100644 index 17e57c31..00000000 --- a/server/vendor/phpspec/prophecy/README.md +++ /dev/null @@ -1,390 +0,0 @@ -# Prophecy - -[![Build Status](https://travis-ci.org/phpspec/prophecy.svg?branch=master)](https://travis-ci.org/phpspec/prophecy) - -Prophecy is a highly opinionated yet very powerful and flexible PHP object mocking -framework. Though initially it was created to fulfil phpspec2 needs, it is flexible -enough to be used inside any testing framework out there with minimal effort. - -## A simple example - -```php -prophet->prophesize('App\Security\Hasher'); - $user = new App\Entity\User($hasher->reveal()); - - $hasher->generateHash($user, 'qwerty')->willReturn('hashed_pass'); - - $user->setPassword('qwerty'); - - $this->assertEquals('hashed_pass', $user->getPassword()); - } - - protected function setup() - { - $this->prophet = new \Prophecy\Prophet; - } - - protected function tearDown() - { - $this->prophet->checkPredictions(); - } -} -``` - -## Installation - -### Prerequisites - -Prophecy requires PHP 5.3.3 or greater. - -### Setup through composer - -First, add Prophecy to the list of dependencies inside your `composer.json`: - -```json -{ - "require-dev": { - "phpspec/prophecy": "~1.0" - } -} -``` - -Then simply install it with composer: - -```bash -$> composer install --prefer-dist -``` - -You can read more about Composer on its [official webpage](http://getcomposer.org). - -## How to use it - -First of all, in Prophecy every word has a logical meaning, even the name of the library -itself (Prophecy). When you start feeling that, you'll become very fluid with this -tool. - -For example, Prophecy has been named that way because it concentrates on describing the future -behavior of objects with very limited knowledge about them. But as with any other prophecy, -those object prophecies can't create themselves - there should be a Prophet: - -```php -$prophet = new Prophecy\Prophet; -``` - -The Prophet creates prophecies by *prophesizing* them: - -```php -$prophecy = $prophet->prophesize(); -``` - -The result of the `prophesize()` method call is a new object of class `ObjectProphecy`. Yes, -that's your specific object prophecy, which describes how your object would behave -in the near future. But first, you need to specify which object you're talking about, -right? - -```php -$prophecy->willExtend('stdClass'); -$prophecy->willImplement('SessionHandlerInterface'); -``` - -There are 2 interesting calls - `willExtend` and `willImplement`. The first one tells -object prophecy that our object should extend specific class, the second one says that -it should implement some interface. Obviously, objects in PHP can implement multiple -interfaces, but extend only one parent class. - -### Dummies - -Ok, now we have our object prophecy. What can we do with it? First of all, we can get -our object *dummy* by revealing its prophecy: - -```php -$dummy = $prophecy->reveal(); -``` - -The `$dummy` variable now holds a special dummy object. Dummy objects are objects that extend -and/or implement preset classes/interfaces by overriding all their public methods. The key -point about dummies is that they do not hold any logic - they just do nothing. Any method -of the dummy will always return `null` and the dummy will never throw any exceptions. -Dummy is your friend if you don't care about the actual behavior of this double and just need -a token object to satisfy a method typehint. - -You need to understand one thing - a dummy is not a prophecy. Your object prophecy is still -assigned to `$prophecy` variable and in order to manipulate with your expectations, you -should work with it. `$dummy` is a dummy - a simple php object that tries to fulfil your -prophecy. - -### Stubs - -Ok, now we know how to create basic prophecies and reveal dummies from them. That's -awesome if we don't care about our _doubles_ (objects that reflect originals) -interactions. If we do, we need to use *stubs* or *mocks*. - -A stub is an object double, which doesn't have any expectations about the object behavior, -but when put in specific environment, behaves in specific way. Ok, I know, it's cryptic, -but bear with me for a minute. Simply put, a stub is a dummy, which depending on the called -method signature does different things (has logic). To create stubs in Prophecy: - -```php -$prophecy->read('123')->willReturn('value'); -``` - -Oh wow. We've just made an arbitrary call on the object prophecy? Yes, we did. And this -call returned us a new object instance of class `MethodProphecy`. Yep, that's a specific -method with arguments prophecy. Method prophecies give you the ability to create method -promises or predictions. We'll talk about method predictions later in the _Mocks_ section. - -#### Promises - -Promises are logical blocks, that represent your fictional methods in prophecy terms -and they are handled by the `MethodProphecy::will(PromiseInterface $promise)` method. -As a matter of fact, the call that we made earlier (`willReturn('value')`) is a simple -shortcut to: - -```php -$prophecy->read('123')->will(new Prophecy\Promise\ReturnPromise(array('value'))); -``` - -This promise will cause any call to our double's `read()` method with exactly one -argument - `'123'` to always return `'value'`. But that's only for this -promise, there's plenty others you can use: - -- `ReturnPromise` or `->willReturn(1)` - returns a value from a method call -- `ReturnArgumentPromise` or `->willReturnArgument($index)` - returns the nth method argument from call -- `ThrowPromise` or `->willThrow` - causes the method to throw specific exception -- `CallbackPromise` or `->will($callback)` - gives you a quick way to define your own custom logic - -Keep in mind, that you can always add even more promises by implementing -`Prophecy\Promise\PromiseInterface`. - -#### Method prophecies idempotency - -Prophecy enforces same method prophecies and, as a consequence, same promises and -predictions for the same method calls with the same arguments. This means: - -```php -$methodProphecy1 = $prophecy->read('123'); -$methodProphecy2 = $prophecy->read('123'); -$methodProphecy3 = $prophecy->read('321'); - -$methodProphecy1 === $methodProphecy2; -$methodProphecy1 !== $methodProphecy3; -``` - -That's interesting, right? Now you might ask me how would you define more complex -behaviors where some method call changes behavior of others. In PHPUnit or Mockery -you do that by predicting how many times your method will be called. In Prophecy, -you'll use promises for that: - -```php -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName('everzet')->will(function () { - $this->getName()->willReturn('everzet'); -}); - -// For PHP 5.3 -$user->setName('everzet')->will(function ($args, $user) { - $user->getName()->willReturn('everzet'); -}); - -// Or -$user->setName('everzet')->will(function ($args) use ($user) { - $user->getName()->willReturn('everzet'); -}); -``` - -And now it doesn't matter how many times or in which order your methods are called. -What matters is their behaviors and how well you faked it. - -#### Arguments wildcarding - -The previous example is awesome (at least I hope it is for you), but that's not -optimal enough. We hardcoded `'everzet'` in our expectation. Isn't there a better -way? In fact there is, but it involves understanding what this `'everzet'` -actually is. - -You see, even if method arguments used during method prophecy creation look -like simple method arguments, in reality they are not. They are argument token -wildcards. As a matter of fact, `->setName('everzet')` looks like a simple call just -because Prophecy automatically transforms it under the hood into: - -```php -$user->setName(new Prophecy\Argument\Token\ExactValueToken('everzet')); -``` - -Those argument tokens are simple PHP classes, that implement -`Prophecy\Argument\Token\TokenInterface` and tell Prophecy how to compare real arguments -with your expectations. And yes, those classnames are damn big. That's why there's a -shortcut class `Prophecy\Argument`, which you can use to create tokens like that: - -```php -use Prophecy\Argument; - -$user->setName(Argument::exact('everzet')); -``` - -`ExactValueToken` is not very useful in our case as it forced us to hardcode the username. -That's why Prophecy comes bundled with a bunch of other tokens: - -- `IdenticalValueToken` or `Argument::is($value)` - checks that the argument is identical to a specific value -- `ExactValueToken` or `Argument::exact($value)` - checks that the argument matches a specific value -- `TypeToken` or `Argument::type($typeOrClass)` - checks that the argument matches a specific type or - classname -- `ObjectStateToken` or `Argument::which($method, $value)` - checks that the argument method returns - a specific value -- `CallbackToken` or `Argument::that(callback)` - checks that the argument matches a custom callback -- `AnyValueToken` or `Argument::any()` - matches any argument -- `AnyValuesToken` or `Argument::cetera()` - matches any arguments to the rest of the signature -- `StringContainsToken` or `Argument::containingString($value)` - checks that the argument contains a specific string value - -And you can add even more by implementing `TokenInterface` with your own custom classes. - -So, let's refactor our initial `{set,get}Name()` logic with argument tokens: - -```php -use Prophecy\Argument; - -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName(Argument::type('string'))->will(function ($args) { - $this->getName()->willReturn($args[0]); -}); - -// For PHP 5.3 -$user->setName(Argument::type('string'))->will(function ($args, $user) { - $user->getName()->willReturn($args[0]); -}); - -// Or -$user->setName(Argument::type('string'))->will(function ($args) use ($user) { - $user->getName()->willReturn($args[0]); -}); -``` - -That's it. Now our `{set,get}Name()` prophecy will work with any string argument provided to it. -We've just described how our stub object should behave, even though the original object could have -no behavior whatsoever. - -One last bit about arguments now. You might ask, what happens in case of: - -```php -use Prophecy\Argument; - -$user->getName()->willReturn(null); - -// For PHP 5.4 -$user->setName(Argument::type('string'))->will(function ($args) { - $this->getName()->willReturn($args[0]); -}); - -// For PHP 5.3 -$user->setName(Argument::type('string'))->will(function ($args, $user) { - $user->getName()->willReturn($args[0]); -}); - -// Or -$user->setName(Argument::type('string'))->will(function ($args) use ($user) { - $user->getName()->willReturn($args[0]); -}); - -$user->setName(Argument::any())->will(function () { -}); -``` - -Nothing. Your stub will continue behaving the way it did before. That's because of how -arguments wildcarding works. Every argument token type has a different score level, which -wildcard then uses to calculate the final arguments match score and use the method prophecy -promise that has the highest score. In this case, `Argument::type()` in case of success -scores `5` and `Argument::any()` scores `3`. So the type token wins, as does the first -`setName()` method prophecy and its promise. The simple rule of thumb - more precise token -always wins. - -#### Getting stub objects - -Ok, now we know how to define our prophecy method promises, let's get our stub from -it: - -```php -$stub = $prophecy->reveal(); -``` - -As you might see, the only difference between how we get dummies and stubs is that with -stubs we describe every object conversation instead of just agreeing with `null` returns -(object being *dummy*). As a matter of fact, after you define your first promise -(method call), Prophecy will force you to define all the communications - it throws -the `UnexpectedCallException` for any call you didn't describe with object prophecy before -calling it on a stub. - -### Mocks - -Now we know how to define doubles without behavior (dummies) and doubles with behavior, but -no expectations (stubs). What's left is doubles for which we have some expectations. These -are called mocks and in Prophecy they look almost exactly the same as stubs, except that -they define *predictions* instead of *promises* on method prophecies: - -```php -$entityManager->flush()->shouldBeCalled(); -``` - -#### Predictions - -The `shouldBeCalled()` method here assigns `CallPrediction` to our method prophecy. -Predictions are a delayed behavior check for your prophecies. You see, during the entire lifetime -of your doubles, Prophecy records every single call you're making against it inside your -code. After that, Prophecy can use this collected information to check if it matches defined -predictions. You can assign predictions to method prophecies using the -`MethodProphecy::should(PredictionInterface $prediction)` method. As a matter of fact, -the `shouldBeCalled()` method we used earlier is just a shortcut to: - -```php -$entityManager->flush()->should(new Prophecy\Prediction\CallPrediction()); -``` - -It checks if your method of interest (that matches both the method name and the arguments wildcard) -was called 1 or more times. If the prediction failed then it throws an exception. When does this -check happen? Whenever you call `checkPredictions()` on the main Prophet object: - -```php -$prophet->checkPredictions(); -``` - -In PHPUnit, you would want to put this call into the `tearDown()` method. If no predictions -are defined, it would do nothing. So it won't harm to call it after every test. - -There are plenty more predictions you can play with: - -- `CallPrediction` or `shouldBeCalled()` - checks that the method has been called 1 or more times -- `NoCallsPrediction` or `shouldNotBeCalled()` - checks that the method has not been called -- `CallTimesPrediction` or `shouldBeCalledTimes($count)` - checks that the method has been called - `$count` times -- `CallbackPrediction` or `should($callback)` - checks the method against your own custom callback - -Of course, you can always create your own custom prediction any time by implementing -`PredictionInterface`. - -### Spies - -The last bit of awesomeness in Prophecy is out-of-the-box spies support. As I said in the previous -section, Prophecy records every call made during the double's entire lifetime. This means -you don't need to record predictions in order to check them. You can also do it -manually by using the `MethodProphecy::shouldHave(PredictionInterface $prediction)` method: - -```php -$em = $prophet->prophesize('Doctrine\ORM\EntityManager'); - -$controller->createUser($em->reveal()); - -$em->flush()->shouldHaveBeenCalled(); -``` - -Such manipulation with doubles is called spying. And with Prophecy it just works. diff --git a/server/vendor/phpspec/prophecy/composer.json b/server/vendor/phpspec/prophecy/composer.json deleted file mode 100644 index 654aaadc..00000000 --- a/server/vendor/phpspec/prophecy/composer.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "phpspec/prophecy", - "description": "Highly opinionated mocking framework for PHP 5.3+", - "keywords": ["Mock", "Stub", "Dummy", "Double", "Fake", "Spy"], - "homepage": "https://github.com/phpspec/prophecy", - "type": "library", - "license": "MIT", - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "require": { - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1", - "doctrine/instantiator": "^1.0.2" - }, - - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - - "autoload": { - "psr-0": { - "Prophecy\\": "src/" - } - }, - - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - } -} diff --git a/server/vendor/phpspec/prophecy/composer.lock b/server/vendor/phpspec/prophecy/composer.lock deleted file mode 100644 index 0c5521a8..00000000 --- a/server/vendor/phpspec/prophecy/composer.lock +++ /dev/null @@ -1,731 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "642fa332c5fa99e1d5086035641b5a74", - "packages": [ - { - "name": "doctrine/instantiator", - "version": "1.0.5", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", - "shasum": "" - }, - "require": { - "php": ">=5.3,<8.0-DEV" - }, - "require-dev": { - "athletic/athletic": "~0.1.8", - "ext-pdo": "*", - "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://github.com/doctrine/instantiator", - "keywords": [ - "constructor", - "instantiate" - ], - "time": "2015-06-14 21:17:01" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03 12:10:50" - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "time": "2015-07-26 15:48:44" - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-02-22 15:13:53" - }, - { - "name": "sebastian/exporter", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "time": "2015-06-21 07:55:53" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" - } - ], - "packages-dev": [ - { - "name": "phpspec/php-diff", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/phpspec/php-diff.git", - "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a", - "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Diff": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Chris Boulton", - "homepage": "http://github.com/chrisboulton", - "role": "Original developer" - } - ], - "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", - "time": "2013-11-01 13:02:21" - }, - { - "name": "phpspec/phpspec", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/phpspec/phpspec.git", - "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/phpspec/zipball/e9a40577323e67f1de2e214abf32976a0352d8f8", - "reference": "e9a40577323e67f1de2e214abf32976a0352d8f8", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.1", - "php": ">=5.3.3", - "phpspec/php-diff": "~1.0.0", - "phpspec/prophecy": "~1.4", - "sebastian/exporter": "~1.0", - "symfony/console": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.1", - "symfony/yaml": "~2.1" - }, - "require-dev": { - "behat/behat": "^3.0.11", - "bossa/phpspec2-expect": "~1.0", - "phpunit/phpunit": "~4.4", - "symfony/filesystem": "~2.1", - "symfony/process": "~2.1" - }, - "suggest": { - "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" - }, - "bin": [ - "bin/phpspec" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "psr-0": { - "PhpSpec": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "homepage": "http://marcelloduarte.net/" - } - ], - "description": "Specification-oriented BDD framework for PHP 5.3+", - "homepage": "http://phpspec.net/", - "keywords": [ - "BDD", - "SpecBDD", - "TDD", - "spec", - "specification", - "testing", - "tests" - ], - "time": "2015-05-30 15:21:40" - }, - { - "name": "symfony/console", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/d6cf02fe73634c96677e428f840704bfbcaec29e", - "reference": "d6cf02fe73634c96677e428f840704bfbcaec29e", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/phpunit-bridge": "~2.7", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - } - }, - "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 Console Component", - "homepage": "https://symfony.com", - "time": "2015-07-28 15:18:12" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", - "reference": "9310b5f9a87ec2ea75d20fec0b0017c77c66dac3", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/phpunit-bridge": "~2.7", - "symfony/stopwatch": "~2.3" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "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 EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2015-06-18 19:21:56" - }, - { - "name": "symfony/finder", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/ae0f363277485094edc04c9f3cbe595b183b78e4", - "reference": "ae0f363277485094edc04c9f3cbe595b183b78e4", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - } - }, - "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 Finder Component", - "homepage": "https://symfony.com", - "time": "2015-07-09 16:07:40" - }, - { - "name": "symfony/process", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/48aeb0e48600321c272955132d7606ab0a49adb3", - "reference": "48aeb0e48600321c272955132d7606ab0a49adb3", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - } - }, - "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 Process Component", - "homepage": "https://symfony.com", - "time": "2015-07-01 11:25:50" - }, - { - "name": "symfony/yaml", - "version": "v2.7.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "71340e996171474a53f3d29111d046be4ad8a0ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/71340e996171474a53f3d29111d046be4ad8a0ff", - "reference": "71340e996171474a53f3d29111d046be4ad8a0ff", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - } - }, - "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 Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-07-28 14:07:07" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [] -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php deleted file mode 100644 index 5d6a2da3..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php +++ /dev/null @@ -1,146 +0,0 @@ -beConstructedWith(array(42, 'zet', $object)); - - $class = get_class($object->getWrappedObject()); - $hash = spl_object_hash($object->getWrappedObject()); - - $this->__toString()->shouldReturn("exact(42), exact(\"zet\"), exact($class:$hash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - * @param \Prophecy\Argument\Token\TokenInterface $token3 - */ - function it_generates_string_representation_from_all_tokens_imploded($token1, $token2, $token3) - { - $token1->__toString()->willReturn('token_1'); - $token2->__toString()->willReturn('token_2'); - $token3->__toString()->willReturn('token_3'); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->__toString()->shouldReturn('token_1, token_2, token_3'); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token - */ - function it_exposes_list_of_tokens($token) - { - $this->beConstructedWith(array($token)); - - $this->getTokens()->shouldReturn(array($token)); - } - - function it_returns_score_of_1_if_there_are_no_tokens_and_arguments() - { - $this->beConstructedWith(array()); - - $this->scoreArguments(array())->shouldReturn(1); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - * @param \Prophecy\Argument\Token\TokenInterface $token3 - */ - function it_should_return_match_score_based_on_all_tokens_score($token1, $token2, $token3) - { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(5); - $token2->isLast()->willReturn(false); - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj))->shouldReturn(18); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - * @param \Prophecy\Argument\Token\TokenInterface $token3 - */ - function it_returns_false_if_there_is_less_arguments_than_tokens($token1, $token2, $token3) - { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(5); - $token2->isLast()->willReturn(false); - $token3->scoreArgument(null)->willReturn(false); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2))->shouldReturn(false); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - * @param \Prophecy\Argument\Token\TokenInterface $token3 - */ - function it_returns_false_if_there_is_less_tokens_than_arguments($token1, $token2, $token3) - { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(5); - $token2->isLast()->willReturn(false); - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj, 4))->shouldReturn(false); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - * @param \Prophecy\Argument\Token\TokenInterface $token3 - */ - function it_should_return_false_if_one_of_the_tokens_returns_false($token1, $token2, $token3) - { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - $token2->scoreArgument(2)->willReturn(false); - $token2->isLast()->willReturn(false); - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj))->shouldReturn(false); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - * @param \Prophecy\Argument\Token\TokenInterface $token3 - */ - function it_should_calculate_score_until_last_token($token1, $token2, $token3) - { - $token1->scoreArgument('one')->willReturn(3); - $token1->isLast()->willReturn(false); - - $token2->scoreArgument(2)->willReturn(7); - $token2->isLast()->willReturn(true); - - $token3->scoreArgument($obj = new \stdClass())->willReturn(10); - $token3->isLast()->willReturn(false); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->scoreArguments(array('one', 2, $obj))->shouldReturn(10); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php deleted file mode 100644 index a43e923c..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php +++ /dev/null @@ -1,28 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function its_string_representation_is_star() - { - $this->__toString()->shouldReturn('*'); - } - - function it_scores_any_argument_as_3() - { - $this->scoreArgument(42)->shouldReturn(3); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php deleted file mode 100644 index c29076f5..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php +++ /dev/null @@ -1,28 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_last() - { - $this->shouldBeLast(); - } - - function its_string_representation_is_star_with_followup() - { - $this->__toString()->shouldReturn('* [, ...]'); - } - - function it_scores_any_argument_as_2() - { - $this->scoreArgument(42)->shouldReturn(2); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php deleted file mode 100644 index 5d040d59..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php +++ /dev/null @@ -1,64 +0,0 @@ -beConstructedWith(2); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_6_if_argument_array_has_proper_count() - { - $this->scoreArgument(array(1,2))->shouldReturn(6); - } - - /** - * @param \Countable $countable - */ - function it_scores_6_if_argument_countable_object_has_proper_count($countable) - { - $countable->count()->willReturn(2); - $this->scoreArgument($countable)->shouldReturn(6); - } - - function it_does_not_score_if_argument_is_neither_array_nor_countable_object() - { - $this->scoreArgument('string')->shouldBe(false); - $this->scoreArgument(5)->shouldBe(false); - $this->scoreArgument(new \stdClass)->shouldBe(false); - } - - function it_does_not_score_if_argument_array_has_wrong_count() - { - $this->scoreArgument(array(1))->shouldReturn(false); - } - - /** - * @param \Countable $countable - */ - function it_does_not_score_if_argument_countable_object_has_wrong_count($countable) - { - $countable->count()->willReturn(3); - $this->scoreArgument($countable)->shouldReturn(false); - } - - function it_has_simple_string_representation() - { - $this->__toString()->shouldBe('count(2)'); - } - -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php deleted file mode 100644 index 8ff0f158..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php +++ /dev/null @@ -1,229 +0,0 @@ -beConstructedWith($key, $value); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_holds_key_and_value($key, $value) - { - $this->getKey()->shouldBe($key); - $this->getValue()->shouldBe($value); - } - - function its_string_representation_tells_that_its_an_array_containing_the_key_value_pair($key, $value) - { - $key->__toString()->willReturn('key'); - $value->__toString()->willReturn('value'); - $this->__toString()->shouldBe('[..., key => value, ...]'); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $key - * @param \stdClass $object - */ - function it_wraps_non_token_value_into_ExactValueToken($key, $object) - { - $this->beConstructedWith($key, $object); - $this->getValue()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken'); - } - - /** - * @param \stdClass $object - * @param \Prophecy\Argument\Token\TokenInterface $value - */ - function it_wraps_non_token_key_into_ExactValueToken($object, $value) - { - $this->beConstructedWith($object, $value); - $this->getKey()->shouldHaveType('\Prophecy\Argument\Token\ExactValueToken'); - } - - function it_scores_array_half_of_combined_scores_from_key_and_value_tokens($key, $value) - { - $key->scoreArgument('key')->willReturn(4); - $value->scoreArgument('value')->willReturn(6); - $this->scoreArgument(array('key'=>'value'))->shouldBe(5); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $key - * @param \Prophecy\Argument\Token\TokenInterface $value - * @param \Iterator $object - */ - function it_scores_traversable_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object) - { - $object->current()->will(function () use ($object) { - $object->valid()->willReturn(false); - - return 'value'; - }); - $object->key()->willReturn('key'); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $key->scoreArgument('key')->willReturn(6); - $value->scoreArgument('value')->willReturn(2); - $this->scoreArgument($object)->shouldBe(4); - } - - /** - * @param \Prophecy\Argument\Token\AnyValuesToken $key - * @param \Prophecy\Argument\Token\TokenInterface $value - * @param \ArrayAccess $object - */ - function it_throws_exception_during_scoring_of_array_accessible_object_if_key_is_not_ExactValueToken($key, $value, $object) - { - $key->__toString()->willReturn('any_token'); - $this->beConstructedWith($key,$value); - $errorMessage = 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. - 'But you used `any_token`.'; - $this->shouldThrow(new InvalidArgumentException($errorMessage))->duringScoreArgument($object); - } - - /** - * @param \Prophecy\Argument\Token\ExactValueToken $key - * @param \Prophecy\Argument\Token\TokenInterface $value - * @param \ArrayAccess $object - */ - function it_scores_array_accessible_object_half_of_combined_scores_from_key_and_value_tokens($key, $value, $object) - { - $object->offsetExists('key')->willReturn(true); - $object->offsetGet('key')->willReturn('value'); - $key->getValue()->willReturn('key'); - $key->scoreArgument('key')->willReturn(3); - $value->scoreArgument('value')->willReturn(1); - $this->scoreArgument($object)->shouldBe(2); - } - - /** - * @param \Prophecy\Argument\Token\AnyValuesToken $key - * @param \Prophecy\Argument\Token\TokenInterface $value - * @param \ArrayIterator $object - */ - function it_accepts_any_key_token_type_to_score_object_that_is_both_traversable_and_array_accessible($key, $value, $object) - { - $this->beConstructedWith($key, $value); - $object->current()->will(function () use ($object) { - $object->valid()->willReturn(false); - - return 'value'; - }); - $object->key()->willReturn('key'); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $this->shouldNotThrow(new InvalidArgumentException)->duringScoreArgument($object); - } - - function it_does_not_score_if_argument_is_neither_array_nor_traversable_nor_array_accessible() - { - $this->scoreArgument('string')->shouldBe(false); - $this->scoreArgument(new \stdClass)->shouldBe(false); - } - - function it_does_not_score_empty_array() - { - $this->scoreArgument(array())->shouldBe(false); - } - - function it_does_not_score_array_if_key_and_value_tokens_do_not_score_same_entry($key, $value) - { - $argument = array(1 => 'foo', 2 => 'bar'); - $key->scoreArgument(1)->willReturn(true); - $key->scoreArgument(2)->willReturn(false); - $value->scoreArgument('foo')->willReturn(false); - $value->scoreArgument('bar')->willReturn(true); - $this->scoreArgument($argument)->shouldBe(false); - } - - /** - * @param \Iterator $object - */ - function it_does_not_score_traversable_object_without_entries($object) - { - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(false); - $this->scoreArgument($object)->shouldBe(false); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $key - * @param \Prophecy\Argument\Token\TokenInterface $value - * @param \Iterator $object - */ - function it_does_not_score_traversable_object_if_key_and_value_tokens_do_not_score_same_entry($key, $value, $object) - { - $object->current()->willReturn('foo'); - $object->current()->will(function () use ($object) { - $object->valid()->willReturn(false); - - return 'bar'; - }); - $object->key()->willReturn(1); - $object->key()->willReturn(2); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $key->scoreArgument(1)->willReturn(true); - $key->scoreArgument(2)->willReturn(false); - $value->scoreArgument('foo')->willReturn(false); - $value->scoreArgument('bar')->willReturn(true); - $this->scoreArgument($object)->shouldBe(false); - } - - /** - * @param \Prophecy\Argument\Token\ExactValueToken $key - * @param \ArrayAccess $object - */ - function it_does_not_score_array_accessible_object_if_it_has_no_offset_with_key_token_value($key, $object) - { - $object->offsetExists('key')->willReturn(false); - $key->getValue()->willReturn('key'); - $this->scoreArgument($object)->shouldBe(false); - } - - /** - * @param \Prophecy\Argument\Token\ExactValueToken $key - * @param \Prophecy\Argument\Token\TokenInterface $value - * @param \ArrayAccess $object - */ - function it_does_not_score_array_accessible_object_if_key_and_value_tokens_do_not_score_same_entry($key, $value, $object) - { - $object->offsetExists('key')->willReturn(true); - $object->offsetGet('key')->willReturn('value'); - $key->getValue()->willReturn('key'); - $value->scoreArgument('value')->willReturn(false); - $key->scoreArgument('key')->willReturn(true); - $this->scoreArgument($object)->shouldBe(false); - } - - function its_score_is_capped_at_8($key, $value) - { - $key->scoreArgument('key')->willReturn(10); - $value->scoreArgument('value')->willReturn(10); - $this->scoreArgument(array('key'=>'value'))->shouldBe(8); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php deleted file mode 100644 index 8662e7d1..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php +++ /dev/null @@ -1,109 +0,0 @@ -beConstructedWith($value); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_holds_value($value) - { - $this->getValue()->shouldBe($value); - } - - function its_string_representation_tells_that_its_an_array_containing_only_value($value) - { - $value->__toString()->willReturn('value'); - $this->__toString()->shouldBe('[value, ..., value]'); - } - - /** - * @param \stdClass $stdClass - */ - function it_wraps_non_token_value_into_ExactValueToken($stdClass) - { - $this->beConstructedWith($stdClass); - $this->getValue()->shouldHaveType('Prophecy\Argument\Token\ExactValueToken'); - } - - function it_does_not_score_if_argument_is_neither_array_nor_traversable() - { - $this->scoreArgument('string')->shouldBe(false); - $this->scoreArgument(new \stdClass)->shouldBe(false); - } - - function it_does_not_score_empty_array() - { - $this->scoreArgument(array())->shouldBe(false); - } - - /** - * @param \Iterator $object - */ - function it_does_not_score_traversable_object_without_entries($object) - { - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(false); - $this->scoreArgument($object)->shouldBe(false); - } - - function it_scores_avg_of_scores_from_value_tokens($value) - { - $value->scoreArgument('value1')->willReturn(6); - $value->scoreArgument('value2')->willReturn(3); - $this->scoreArgument(array('value1', 'value2'))->shouldBe(4.5); - } - - function it_scores_false_if_entry_scores_false($value) - { - $value->scoreArgument('value1')->willReturn(6); - $value->scoreArgument('value2')->willReturn(false); - $this->scoreArgument(array('value1', 'value2'))->shouldBe(false); - } - - function it_does_not_score_array_keys($value) - { - $value->scoreArgument('value')->willReturn(6); - $value->scoreArgument('key')->shouldNotBeCalled(0); - $this->scoreArgument(array('key' => 'value'))->shouldBe(6); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $value - * @param \Iterator $object - */ - function it_scores_traversable_object_from_value_token($value, $object) - { - $object->current()->will(function ($args, $object) { - $object->valid()->willReturn(false); - - return 'value'; - }); - $object->key()->willReturn('key'); - $object->rewind()->willReturn(null); - $object->next()->willReturn(null); - $object->valid()->willReturn(true); - $value->scoreArgument('value')->willReturn(2); - $this->scoreArgument($object)->shouldBe(2); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php deleted file mode 100644 index 4395bf09..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php +++ /dev/null @@ -1,42 +0,0 @@ -beConstructedWith('get_class'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_7_if_argument_matches_callback() - { - $this->beConstructedWith(function ($argument) { return 2 === $argument; }); - - $this->scoreArgument(2)->shouldReturn(7); - } - - function it_does_not_scores_if_argument_does_not_match_callback() - { - $this->beConstructedWith(function ($argument) { return 2 === $argument; }); - - $this->scoreArgument(5)->shouldReturn(false); - } - - function its_string_representation_should_tell_that_its_callback() - { - $this->__toString()->shouldReturn('callback()'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php deleted file mode 100644 index 9e46e021..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php +++ /dev/null @@ -1,155 +0,0 @@ -beConstructedWith(42); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_holds_value() - { - $this->getValue()->shouldReturn(42); - } - - function it_scores_10_if_value_is_equal_to_argument() - { - $this->scoreArgument(42)->shouldReturn(10); - $this->scoreArgument('42')->shouldReturn(10); - } - - function it_scores_10_if_value_is_an_object_and_equal_to_argument() - { - $value = new \DateTime(); - $value2 = clone $value; - - $this->beConstructedWith($value); - $this->scoreArgument($value2)->shouldReturn(10); - } - - function it_does_not_scores_if_value_is_not_equal_to_argument() - { - $this->scoreArgument(50)->shouldReturn(false); - $this->scoreArgument(new \stdClass())->shouldReturn(false); - } - - function it_does_not_scores_if_value_an_object_and_is_not_equal_to_argument() - { - $value = new ExactValueTokenFixtureB('ABC'); - $value2 = new ExactValueTokenFixtureB('CBA'); - - $this->beConstructedWith($value); - $this->scoreArgument($value2)->shouldReturn(false); - } - - function it_does_not_scores_if_value_type_and_is_not_equal_to_argument() - { - $this->beConstructedWith(false); - $this->scoreArgument(0)->shouldReturn(false); - } - - function it_generates_proper_string_representation_for_integer() - { - $this->beConstructedWith(42); - $this->__toString()->shouldReturn('exact(42)'); - } - - function it_generates_proper_string_representation_for_string() - { - $this->beConstructedWith('some string'); - $this->__toString()->shouldReturn('exact("some string")'); - } - - function it_generates_single_line_representation_for_multiline_string() - { - $this->beConstructedWith("some\nstring"); - $this->__toString()->shouldReturn('exact("some\\nstring")'); - } - - function it_generates_proper_string_representation_for_double() - { - $this->beConstructedWith(42.3); - $this->__toString()->shouldReturn('exact(42.3)'); - } - - function it_generates_proper_string_representation_for_boolean_true() - { - $this->beConstructedWith(true); - $this->__toString()->shouldReturn('exact(true)'); - } - - function it_generates_proper_string_representation_for_boolean_false() - { - $this->beConstructedWith(false); - $this->__toString()->shouldReturn('exact(false)'); - } - - function it_generates_proper_string_representation_for_null() - { - $this->beConstructedWith(null); - $this->__toString()->shouldReturn('exact(null)'); - } - - function it_generates_proper_string_representation_for_empty_array() - { - $this->beConstructedWith(array()); - $this->__toString()->shouldReturn('exact([])'); - } - - function it_generates_proper_string_representation_for_array() - { - $this->beConstructedWith(array('zet', 42)); - $this->__toString()->shouldReturn('exact(["zet", 42])'); - } - - function it_generates_proper_string_representation_for_resource() - { - $resource = fopen(__FILE__, 'r'); - $this->beConstructedWith($resource); - $this->__toString()->shouldReturn('exact(stream:'.$resource.')'); - } - - /** - * @param \stdClass $object - */ - function it_generates_proper_string_representation_for_object($object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ); - - $this->beConstructedWith($object); - $this->__toString()->shouldReturn("exact($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); - } -} - -class ExactValueTokenFixtureA -{ - public $errors; -} - -class ExactValueTokenFixtureB extends ExactValueTokenFixtureA -{ - public $errors; - public $value = null; - - public function __construct($value) - { - $this->value = $value; - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php deleted file mode 100644 index 00c3a215..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php +++ /dev/null @@ -1,152 +0,0 @@ -beConstructedWith(42); - } - - function it_is_initializable() - { - $this->shouldHaveType('Prophecy\Argument\Token\IdenticalValueToken'); - } - - function it_scores_11_if_string_value_is_identical_to_argument() - { - $this->beConstructedWith('foo'); - $this->scoreArgument('foo')->shouldReturn(11); - } - - function it_scores_11_if_boolean_value_is_identical_to_argument() - { - $this->beConstructedWith(false); - $this->scoreArgument(false)->shouldReturn(11); - } - - function it_scores_11_if_integer_value_is_identical_to_argument() - { - $this->beConstructedWith(31); - $this->scoreArgument(31)->shouldReturn(11); - } - - function it_scores_11_if_float_value_is_identical_to_argument() - { - $this->beConstructedWith(31.12); - $this->scoreArgument(31.12)->shouldReturn(11); - } - - function it_scores_11_if_array_value_is_identical_to_argument() - { - $this->beConstructedWith(array('foo' => 'bar')); - $this->scoreArgument(array('foo' => 'bar'))->shouldReturn(11); - } - - function it_scores_11_if_object_value_is_identical_to_argument() - { - $object = new \stdClass(); - - $this->beConstructedWith($object); - $this->scoreArgument($object)->shouldReturn(11); - } - - function it_scores_false_if_value_is_not_identical_to_argument() - { - $this->beConstructedWith(new \stdClass()); - $this->scoreArgument('foo')->shouldReturn(false); - } - - function it_scores_false_if_object_value_is_not_the_same_instance_than_argument() - { - $this->beConstructedWith(new \stdClass()); - $this->scoreArgument(new \stdClass())->shouldReturn(false); - } - - function it_scores_false_if_integer_value_is_not_identical_to_boolean_argument() - { - $this->beConstructedWith(1); - $this->scoreArgument(true)->shouldReturn(false); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_generates_proper_string_representation_for_integer() - { - $this->beConstructedWith(42); - $this->__toString()->shouldReturn('identical(42)'); - } - - function it_generates_proper_string_representation_for_string() - { - $this->beConstructedWith('some string'); - $this->__toString()->shouldReturn('identical("some string")'); - } - - function it_generates_single_line_representation_for_multiline_string() - { - $this->beConstructedWith("some\nstring"); - $this->__toString()->shouldReturn('identical("some\\nstring")'); - } - - function it_generates_proper_string_representation_for_double() - { - $this->beConstructedWith(42.3); - $this->__toString()->shouldReturn('identical(42.3)'); - } - - function it_generates_proper_string_representation_for_boolean_true() - { - $this->beConstructedWith(true); - $this->__toString()->shouldReturn('identical(true)'); - } - - function it_generates_proper_string_representation_for_boolean_false() - { - $this->beConstructedWith(false); - $this->__toString()->shouldReturn('identical(false)'); - } - - function it_generates_proper_string_representation_for_null() - { - $this->beConstructedWith(null); - $this->__toString()->shouldReturn('identical(null)'); - } - - function it_generates_proper_string_representation_for_empty_array() - { - $this->beConstructedWith(array()); - $this->__toString()->shouldReturn('identical([])'); - } - - function it_generates_proper_string_representation_for_array() - { - $this->beConstructedWith(array('zet', 42)); - $this->__toString()->shouldReturn('identical(["zet", 42])'); - } - - function it_generates_proper_string_representation_for_resource() - { - $resource = fopen(__FILE__, 'r'); - $this->beConstructedWith($resource); - $this->__toString()->shouldReturn('identical(stream:'.$resource.')'); - } - - function it_generates_proper_string_representation_for_object($object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ); - - $this->beConstructedWith($object); - $this->__toString()->shouldReturn("identical($objHash Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n))"); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php deleted file mode 100644 index bb5e3840..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php +++ /dev/null @@ -1,78 +0,0 @@ -beConstructedWith(array()); - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->beConstructedWith(array()); - $this->shouldNotBeLast(); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - * @param \Prophecy\Argument\Token\TokenInterface $token3 - */ - function it_generates_string_representation_from_all_tokens_imploded($token1, $token2, $token3) - { - $token1->__toString()->willReturn('token_1'); - $token2->__toString()->willReturn('token_2'); - $token3->__toString()->willReturn('token_3'); - - $this->beConstructedWith(array($token1, $token2, $token3)); - $this->__toString()->shouldReturn('bool(token_1 AND token_2 AND token_3)'); - } - - function it_wraps_non_token_arguments_into_ExactValueToken() - { - $this->beConstructedWith(array(15, '1985')); - $this->__toString()->shouldReturn("bool(exact(15) AND exact(\"1985\"))"); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - */ - function it_scores_the_maximum_score_from_all_scores_returned_by_tokens($token1, $token2) - { - $token1->scoreArgument(1)->willReturn(10); - $token2->scoreArgument(1)->willReturn(5); - $this->beConstructedWith(array($token1, $token2)); - $this->scoreArgument(1)->shouldReturn(10); - } - - function it_does_not_score_if_there_are_no_arguments_or_tokens() - { - $this->beConstructedWith(array()); - $this->scoreArgument('any')->shouldReturn(false); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $token1 - * @param \Prophecy\Argument\Token\TokenInterface $token2 - */ - function it_does_not_score_if_either_of_tokens_does_not_score($token1, $token2) - { - $token1->scoreArgument(1)->willReturn(10); - $token1->scoreArgument(2)->willReturn(false); - - $token2->scoreArgument(1)->willReturn(false); - $token2->scoreArgument(2)->willReturn(10); - - $this->beConstructedWith(array($token1, $token2)); - - $this->scoreArgument(1)->shouldReturn(false); - $this->scoreArgument(2)->shouldReturn(false); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php deleted file mode 100644 index 7ce7f3d8..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php +++ /dev/null @@ -1,65 +0,0 @@ -beConstructedWith($token); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_holds_originating_token($token) - { - $this->getOriginatingToken()->shouldReturn($token); - } - - function it_has_simple_string_representation($token) - { - $token->__toString()->willReturn('value'); - $this->__toString()->shouldBe('not(value)'); - } - - function it_wraps_non_token_argument_into_ExactValueToken() - { - $this->beConstructedWith(5); - $token = $this->getOriginatingToken(); - $token->shouldhaveType('Prophecy\Argument\Token\ExactValueToken'); - $token->getValue()->shouldBe(5); - } - - function it_scores_4_if_preset_token_does_not_match_the_argument($token) - { - $token->scoreArgument('argument')->willReturn(false); - $this->scoreArgument('argument')->shouldBe(4); - } - - function it_does_not_score_if_preset_token_matches_argument($token) - { - $token->scoreArgument('argument')->willReturn(5); - $this->scoreArgument('argument')->shouldBe(false); - } - - function it_is_last_if_preset_token_is_last($token) - { - $token->isLast()->willReturn(true); - $this->shouldBeLast(); - } - - function it_is_not_last_if_preset_token_is_not_last($token) - { - $token->isLast()->willReturn(false); - $this->shouldNotBeLast(); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php deleted file mode 100644 index a783a15f..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php +++ /dev/null @@ -1,101 +0,0 @@ -beConstructedWith('getName', 'stdClass'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - /** - * @param \ReflectionClass $reflection - */ - function it_scores_8_if_argument_object_has_specific_method_state($reflection) - { - $reflection->getName()->willReturn('stdClass'); - - $this->scoreArgument($reflection)->shouldReturn(8); - } - - /** - * @param \stdClass $class - */ - function it_scores_8_if_argument_object_has_specific_property_state($class) - { - $class->getName = 'stdClass'; - - $this->scoreArgument($class)->shouldReturn(8); - } - - function it_does_not_score_if_argument_method_state_does_not_match() - { - $value = new ObjectStateTokenFixtureB('ABC'); - $value2 = new ObjectStateTokenFixtureB('CBA'); - - $this->beConstructedWith('getSelf', $value); - $this->scoreArgument($value2)->shouldReturn(false); - } - - /** - * @param \stdClass $class - */ - function it_does_not_score_if_argument_property_state_does_not_match($class) - { - $class->getName = 'SplFileInfo'; - - $this->scoreArgument($class)->shouldReturn(false); - } - - /** - * @param \spec\Prophecy\Argument\Token\ObjectStateTokenFixtureA $class - */ - function it_does_not_score_if_argument_object_does_not_have_method_or_property($class) - { - $this->scoreArgument($class)->shouldReturn(false); - } - - function it_does_not_score_if_argument_is_not_object() - { - $this->scoreArgument(42)->shouldReturn(false); - } - - function it_has_simple_string_representation() - { - $this->__toString()->shouldReturn('state(getName(), "stdClass")'); - } -} - -class ObjectStateTokenFixtureA -{ - public $errors; -} - -class ObjectStateTokenFixtureB extends ObjectStateTokenFixtureA -{ - public $errors; - public $value = null; - - public function __construct($value) - { - $this->value = $value; - } - - public function getSelf() - { - return $this; - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php deleted file mode 100644 index c7fd2652..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php +++ /dev/null @@ -1,49 +0,0 @@ -beConstructedWith('a substring'); - } - - function it_is_initializable() - { - $this->shouldHaveType('Prophecy\Argument\Token\StringContainsToken'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_holds_value() - { - $this->getValue()->shouldReturn('a substring'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_6_if_the_argument_contains_the_value() - { - $this->scoreArgument('Argument containing a substring')->shouldReturn(6); - } - - function it_does_not_score_if_the_argument_does_not_contain_the_value() - { - $this->scoreArgument('Argument will not match')->shouldReturn(false); - } - - function its_string_representation_shows_substring() - { - $this->__toString()->shouldReturn('contains("a substring")'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php deleted file mode 100644 index ae3e26e4..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php +++ /dev/null @@ -1,62 +0,0 @@ -beConstructedWith('integer'); - } - - function it_implements_TokenInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Argument\Token\TokenInterface'); - } - - function it_is_not_last() - { - $this->shouldNotBeLast(); - } - - function it_scores_5_if_argument_matches_simple_type() - { - $this->beConstructedWith('integer'); - - $this->scoreArgument(42)->shouldReturn(5); - } - - function it_does_not_scores_if_argument_does_not_match_simple_type() - { - $this->beConstructedWith('integer'); - - $this->scoreArgument(42.0)->shouldReturn(false); - } - - /** - * @param \ReflectionObject $object - */ - function it_scores_5_if_argument_is_an_instance_of_specified_class($object) - { - $this->beConstructedWith('ReflectionClass'); - - $this->scoreArgument($object)->shouldReturn(5); - } - - function it_has_simple_string_representation() - { - $this->__toString()->shouldReturn('type(integer)'); - } - - /** - * @param \Prophecy\Argument\Token\TokenInterface $interface - */ - function it_scores_5_if_argument_is_an_instance_of_specified_interface($interface) - { - $this->beConstructedWith('Prophecy\Argument\Token\TokenInterface'); - - $this->scoreArgument($interface)->shouldReturn(5); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php deleted file mode 100644 index 990aa80a..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php +++ /dev/null @@ -1,101 +0,0 @@ -exact(42); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ExactValueToken'); - $token->getValue()->shouldReturn(42); - } - - function it_has_a_shortcut_for_any_argument_token() - { - $token = $this->any(); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValueToken'); - } - - function it_has_a_shortcut_for_multiple_arguments_token() - { - $token = $this->cetera(); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\AnyValuesToken'); - } - - function it_has_a_shortcut_for_type_token() - { - $token = $this->type('integer'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\TypeToken'); - } - - function it_has_a_shortcut_for_callback_token() - { - $token = $this->that('get_class'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\CallbackToken'); - } - - function it_has_a_shortcut_for_object_state_token() - { - $token = $this->which('getName', 'everzet'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ObjectStateToken'); - } - - function it_has_a_shortcut_for_logical_and_token() - { - $token = $this->allOf('integer', 5); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalAndToken'); - } - - function it_has_a_shortcut_for_array_count_token() - { - $token = $this->size(5); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayCountToken'); - } - - function it_has_a_shortcut_for_array_entry_token() - { - $token = $this->withEntry('key', 'value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); - } - - function it_has_a_shortcut_for_array_every_entry_token() - { - $token = $this->withEveryEntry('value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEveryEntryToken'); - } - - function it_has_a_shortcut_for_identical_value_token() - { - $token = $this->is('value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\IdenticalValueToken'); - } - - function it_has_a_shortcut_for_array_entry_token_matching_any_key() - { - $token = $this->containing('value'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); - $token->getKey()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken'); - } - - function it_has_a_shortcut_for_array_entry_token_matching_any_value() - { - $token = $this->withKey('key'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\ArrayEntryToken'); - $token->getValue()->shouldHaveType('Prophecy\Argument\Token\AnyValueToken'); - } - - function it_has_a_shortcut_for_logical_not_token() - { - $token = $this->not('kagux'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\LogicalNotToken'); - } - - function it_has_a_shortcut_for_string_contains_token() - { - $token = $this->containingString('string'); - $token->shouldBeAnInstanceOf('Prophecy\Argument\Token\StringContainsToken'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php deleted file mode 100644 index acf8d783..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php +++ /dev/null @@ -1,195 +0,0 @@ -scoreArguments(array(5, 2, 3))->willReturn(10); - $objectProphecy->getMethodProphecies()->willReturn(array()); - - $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3)); - - $calls = $this->findCalls('setValues', $wildcard); - $calls->shouldHaveCount(1); - - $calls[0]->shouldBeAnInstanceOf('Prophecy\Call\Call'); - $calls[0]->getMethodName()->shouldReturn('setValues'); - $calls[0]->getArguments()->shouldReturn(array(5, 2, 3)); - $calls[0]->getReturnValue()->shouldReturn(null); - } - - function it_returns_null_for_any_call_through_makeCall_if_no_method_prophecies_added( - $objectProphecy - ) - { - $objectProphecy->getMethodProphecies()->willReturn(array()); - - $this->makeCall($objectProphecy, 'setValues', array(5, 2, 3))->shouldReturn(null); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $method1 - * @param \Prophecy\Prophecy\MethodProphecy $method2 - * @param \Prophecy\Prophecy\MethodProphecy $method3 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments1 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments2 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments3 - * @param \Prophecy\Promise\PromiseInterface $promise - */ - function it_executes_promise_of_method_prophecy_that_matches_signature_passed_to_makeCall( - $objectProphecy, $method1, $method2, $method3, $arguments1, $arguments2, $arguments3, - $promise - ) - { - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments1); - $arguments1->scoreArguments(array('world', 'everything'))->willReturn(false); - - $method2->getMethodName()->willReturn('setTitle'); - $method2->getArgumentsWildcard()->willReturn($arguments2); - $arguments2->scoreArguments(array('world', 'everything'))->willReturn(false); - - $method3->getMethodName()->willReturn('getName'); - $method3->getArgumentsWildcard()->willReturn($arguments3); - $method3->getPromise()->willReturn($promise); - $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200); - - $objectProphecy->getMethodProphecies()->willReturn(array( - 'method1' => array($method1), - 'method2' => array($method2, $method3) - )); - $objectProphecy->getMethodProphecies('getName')->willReturn(array($method1, $method3)); - $objectProphecy->reveal()->willReturn(new \stdClass()); - - $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method3)->willReturn(42); - - $this->makeCall($objectProphecy, 'getName', array('world', 'everything'))->shouldReturn(42); - - $calls = $this->findCalls('getName', $arguments3); - $calls->shouldHaveCount(1); - $calls[0]->getReturnValue()->shouldReturn(42); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $method1 - * @param \Prophecy\Prophecy\MethodProphecy $method2 - * @param \Prophecy\Prophecy\MethodProphecy $method3 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments1 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments2 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments3 - * @param \Prophecy\Promise\PromiseInterface $promise - */ - function it_executes_promise_of_method_prophecy_that_matches_with_highest_score_to_makeCall( - $objectProphecy, $method1, $method2, $method3, $arguments1, $arguments2, $arguments3, - $promise - ) - { - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments1); - $arguments1->scoreArguments(array('world', 'everything'))->willReturn(50); - - $method2->getMethodName()->willReturn('getName'); - $method2->getArgumentsWildcard()->willReturn($arguments2); - $method2->getPromise()->willReturn($promise); - $arguments2->scoreArguments(array('world', 'everything'))->willReturn(300); - - $method3->getMethodName()->willReturn('getName'); - $method3->getArgumentsWildcard()->willReturn($arguments3); - $arguments3->scoreArguments(array('world', 'everything'))->willReturn(200); - - $objectProphecy->getMethodProphecies()->willReturn(array( - 'method1' => array($method1), - 'method2' => array($method2, $method3) - )); - $objectProphecy->getMethodProphecies('getName')->willReturn(array( - $method1, $method2, $method3 - )); - $objectProphecy->reveal()->willReturn(new \stdClass()); - - $promise->execute(array('world', 'everything'), $objectProphecy->getWrappedObject(), $method2) - ->willReturn('second'); - - $this->makeCall($objectProphecy, 'getName', array('world', 'everything')) - ->shouldReturn('second'); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - */ - function it_throws_exception_if_call_does_not_match_any_of_defined_method_prophecies( - $objectProphecy, $method, $arguments - ) - { - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->scoreArguments(array('world', 'everything'))->willReturn(false); - $arguments->__toString()->willReturn('arg1, arg2'); - - $objectProphecy->getMethodProphecies()->willReturn(array('method1' => array($method))); - $objectProphecy->getMethodProphecies('getName')->willReturn(array($method)); - - $this->shouldThrow('Prophecy\Exception\Call\UnexpectedCallException') - ->duringMakeCall($objectProphecy, 'getName', array('world', 'everything')); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - */ - function it_returns_null_if_method_prophecy_that_matches_makeCall_arguments_has_no_promise( - $objectProphecy, $method, $arguments - ) - { - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $method->getPromise()->willReturn(null); - $arguments->scoreArguments(array('world', 'everything'))->willReturn(100); - - $objectProphecy->getMethodProphecies()->willReturn(array($method)); - $objectProphecy->getMethodProphecies('getName')->willReturn(array($method)); - - $this->makeCall($objectProphecy, 'getName', array('world', 'everything')) - ->shouldReturn(null); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $wildcard - */ - function it_finds_recorded_calls_by_a_method_name_and_arguments_wildcard( - $objectProphecy, $wildcard - ) - { - $objectProphecy->getMethodProphecies()->willReturn(array()); - - $this->makeCall($objectProphecy, 'getName', array('world')); - $this->makeCall($objectProphecy, 'getName', array('everything')); - $this->makeCall($objectProphecy, 'setName', array(42)); - - $wildcard->scoreArguments(array('world'))->willReturn(false); - $wildcard->scoreArguments(array('everything'))->willReturn(10); - - $calls = $this->findCalls('getName', $wildcard); - - $calls->shouldHaveCount(1); - $calls[0]->getMethodName()->shouldReturn('getName'); - $calls[0]->getArguments()->shouldReturn(array('everything')); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php deleted file mode 100644 index d1a85391..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php +++ /dev/null @@ -1,54 +0,0 @@ -beConstructedWith('setValues', array(5, 2), 42, $exception, 'some_file.php', 23); - } - - function it_exposes_method_name_through_getter() - { - $this->getMethodName()->shouldReturn('setValues'); - } - - function it_exposes_arguments_through_getter() - { - $this->getArguments()->shouldReturn(array(5, 2)); - } - - function it_exposes_return_value_through_getter() - { - $this->getReturnValue()->shouldReturn(42); - } - - function it_exposes_exception_through_getter($exception) - { - $this->getException()->shouldReturn($exception); - } - - function it_exposes_file_and_line_through_getter() - { - $this->getFile()->shouldReturn('some_file.php'); - $this->getLine()->shouldReturn(23); - } - - function it_returns_shortpath_to_callPlace() - { - $this->getCallPlace()->shouldReturn('some_file.php:23'); - } - - function it_returns_unknown_as_callPlace_if_no_file_or_line_provided() - { - $this->beConstructedWith('setValues', array(), 0, null, null, null); - - $this->getCallPlace()->shouldReturn('unknown'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php deleted file mode 100644 index c174e73c..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php +++ /dev/null @@ -1,39 +0,0 @@ -shouldHaveType('SebastianBergmann\Comparator\Comparator'); - } - - function it_accepts_only_closures() - { - $this->accepts(123, 321)->shouldReturn(false); - $this->accepts('string', 'string')->shouldReturn(false); - $this->accepts(false, true)->shouldReturn(false); - $this->accepts(true, false)->shouldReturn(false); - $this->accepts((object)array(), (object)array())->shouldReturn(false); - $this->accepts(function(){}, (object)array())->shouldReturn(false); - $this->accepts(function(){}, (object)array())->shouldReturn(false); - - $this->accepts(function(){}, function(){})->shouldReturn(true); - } - - function it_asserts_that_all_closures_are_different() - { - $this->shouldThrow()->duringAssertEquals(function(){}, function(){}); - } - - function it_asserts_that_all_closures_are_different_even_if_its_the_same_closure() - { - $closure = function(){}; - - $this->shouldThrow()->duringAssertEquals($closure, $closure); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php deleted file mode 100644 index 6b13336d..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php +++ /dev/null @@ -1,20 +0,0 @@ -shouldHaveType('SebastianBergmann\Comparator\Factory'); - } - - function it_should_have_ClosureComparator_registered() - { - $comparator = $this->getInstance()->getComparatorFor(function(){}, function(){}); - $comparator->shouldHaveType('Prophecy\Comparator\ClosureComparator'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php deleted file mode 100644 index 2d7d934d..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php +++ /dev/null @@ -1,59 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_100() - { - $this->getPriority()->shouldReturn(100); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_supports_anything($node) - { - $this->supports($node)->shouldReturn(true); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg1 - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg2 - */ - function it_makes_all_constructor_arguments_optional($class, $method, $arg1, $arg2) - { - $class->hasMethod('__construct')->willReturn(true); - $class->getMethod('__construct')->willReturn($method); - $method->getArguments()->willReturn(array($arg1, $arg2)); - - $arg1->setDefault(null)->shouldBeCalled(); - $arg2->setDefault(null)->shouldBeCalled(); - - $method->setCode(Argument::type('string'))->shouldBeCalled(); - - $this->apply($class); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - */ - function it_creates_new_constructor_if_object_has_none($class) - { - $class->hasMethod('__construct')->willReturn(false); - $class->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode')) - ->shouldBeCalled(); - - $this->apply($class); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php deleted file mode 100644 index 8c348b86..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php +++ /dev/null @@ -1,37 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_minus_50() - { - $this->getPriority()->shouldReturn(-50); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - * @param \Prophecy\Doubler\Generator\Node\MethodNode $getterMethod - */ - function it_uses_parent_code_for_setTraceOptions($node, $method, $getterMethod) - { - $node->hasMethod('setTraceOptions')->willReturn(true); - $node->getMethod('setTraceOptions')->willReturn($method); - $node->hasMethod('getTraceOptions')->willReturn(true); - $node->getMethod('getTraceOptions')->willReturn($getterMethod); - - $method->useParentCode()->shouldBeCalled(); - $getterMethod->useParentCode()->shouldBeCalled(); - - $this->apply($node); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php deleted file mode 100644 index 200d9619..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php +++ /dev/null @@ -1,44 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_49() - { - $this->getPriority()->shouldReturn(49); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1 - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2 - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method3 - */ - function it_will_remove_echo_and_eval_methods($node, $method1, $method2, $method3) - { - $node->removeMethod('eval')->shouldBeCalled(); - $node->removeMethod('echo')->shouldBeCalled(); - - $method1->getName()->willReturn('echo'); - $method2->getName()->willReturn('eval'); - $method3->getName()->willReturn('notKeyword'); - - $node->getMethods()->willReturn(array( - 'echo' => $method1, - 'eval' => $method2, - 'notKeyword' => $method3, - )); - - $this->apply($node); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php deleted file mode 100644 index cb1d0f01..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php +++ /dev/null @@ -1,76 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_supports_anything($node) - { - $this->supports($node)->shouldReturn(true); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_discovers_api_using_phpdoc($node) - { - $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApi'); - - $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled(); - - $this->apply($node); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_ignores_existing_methods($node) - { - $node->getParentClass()->willReturn('spec\Prophecy\Doubler\ClassPatch\MagicalApiExtended'); - - $node->addMethod(new MethodNode('undefinedMethod'))->shouldBeCalled(); - $node->addMethod(new MethodNode('definedMethod'))->shouldNotBeCalled(); - - $this->apply($node); - } - - function it_has_50_priority() - { - $this->getPriority()->shouldReturn(50); - } -} - -/** - * @method void undefinedMethod() - */ -class MagicalApi -{ - /** - * @return void - */ - public function definedMethod() - { - - } -} - -/** - * @method void undefinedMethod() - * @method void definedMethod() - */ -class MagicalApiExtended extends MagicalApi -{ - -} \ No newline at end of file diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php deleted file mode 100644 index c460814c..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php +++ /dev/null @@ -1,83 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function it_has_priority_of_0() - { - $this->getPriority()->shouldReturn(0); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_supports_any_class($node) - { - $this->supports($node)->shouldReturn(true); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_forces_class_to_implement_ProphecySubjectInterface($node) - { - $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->shouldBeCalled(); - - $node->addProperty('objectProphecy', 'private')->willReturn(null); - $node->getMethods()->willReturn(array()); - $node->hasMethod(Argument::any())->willReturn(false); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - - $this->apply($node); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - * @param \Prophecy\Doubler\Generator\Node\MethodNode $constructor - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1 - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2 - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method3 - */ - function it_forces_all_class_methods_except_constructor_to_proxy_calls_into_prophecy_makeCall( - $node, $constructor, $method1, $method2, $method3 - ) - { - $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface')->willReturn(null); - $node->addProperty('objectProphecy', 'private')->willReturn(null); - $node->hasMethod(Argument::any())->willReturn(false); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - - $constructor->getName()->willReturn('__construct'); - $method1->getName()->willReturn('method1'); - $method2->getName()->willReturn('method2'); - $method3->getName()->willReturn('method3'); - - $node->getMethods()->willReturn(array( - 'method1' => $method1, - 'method2' => $method2, - 'method3' => $method3, - )); - - $constructor->setCode(Argument::any())->shouldNotBeCalled(); - - $method1->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') - ->shouldBeCalled(); - $method2->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') - ->shouldBeCalled(); - $method3->setCode('return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());') - ->shouldBeCalled(); - - $this->apply($node); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php deleted file mode 100644 index 4116e4df..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php +++ /dev/null @@ -1,47 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_50() - { - $this->getPriority()->shouldReturn(50); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $reflectionClassNode - * @param \Prophecy\Doubler\Generator\Node\ClassNode $anotherClassNode - */ - function it_supports_ReflectionClass_only($reflectionClassNode, $anotherClassNode) - { - $reflectionClassNode->getParentClass()->willReturn('ReflectionClass'); - $anotherClassNode->getParentClass()->willReturn('stdClass'); - - $this->supports($reflectionClassNode)->shouldReturn(true); - $this->supports($anotherClassNode)->shouldReturn(false); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg1 - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $arg2 - */ - function it_makes_all_newInstance_arguments_optional($class, $method, $arg1, $arg2) - { - $class->getMethod('newInstance')->willReturn($method); - $method->getArguments()->willReturn(array($arg1)); - $arg1->setDefault(null)->shouldBeCalled(); - - $this->apply($class); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php deleted file mode 100644 index 37fe82f6..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php +++ /dev/null @@ -1,91 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - function its_priority_is_50() - { - $this->getPriority()->shouldReturn(50); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_does_not_support_nodes_without_parent_class($node) - { - $node->getParentClass()->willReturn('stdClass'); - $this->supports($node)->shouldReturn(false); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_supports_nodes_with_SplFileInfo_as_parent_class($node) - { - $node->getParentClass()->willReturn('SplFileInfo'); - $this->supports($node)->shouldReturn(true); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_supports_nodes_with_derivative_of_SplFileInfo_as_parent_class($node) - { - $node->getParentClass()->willReturn('SplFileInfo'); - $this->supports($node)->shouldReturn(true); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_adds_a_method_to_node_if_not_exists($node) - { - $node->hasMethod('__construct')->willReturn(false); - $node->addMethod(Argument::any())->shouldBeCalled(); - $node->getParentClass()->shouldBeCalled(); - - $this->apply($node); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - */ - function it_updates_existing_method_if_found($node, $method) - { - $node->hasMethod('__construct')->willReturn(true); - $node->getMethod('__construct')->willReturn($method); - $node->getParentClass()->shouldBeCalled(); - - $method->useParentCode()->shouldBeCalled(); - - $this->apply($node); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - */ - function it_should_not_supply_a_file_for_a_directory_iterator($node, $method) - { - $node->hasMethod('__construct')->willReturn(true); - $node->getMethod('__construct')->willReturn($method); - $node->getParentClass()->willReturn('DirectoryIterator'); - - $method->setCode(Argument::that(function($value) { - return strpos($value, '.php') === false; - }))->shouldBeCalled(); - - $this->apply($node); - } - -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php deleted file mode 100644 index 2279b720..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php +++ /dev/null @@ -1,61 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Doubler\ClassPatch\ClassPatchInterface'); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_supports_class_that_implements_only_Traversable($node) - { - $node->getInterfaces()->willReturn(array('Traversable')); - - $this->supports($node)->shouldReturn(true); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_does_not_support_class_that_implements_Iterator($node) - { - $node->getInterfaces()->willReturn(array('Traversable', 'Iterator')); - - $this->supports($node)->shouldReturn(false); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_does_not_support_class_that_implements_IteratorAggregate($node) - { - $node->getInterfaces()->willReturn(array('Traversable', 'IteratorAggregate')); - - $this->supports($node)->shouldReturn(false); - } - - function it_has_100_priority() - { - $this->getPriority()->shouldReturn(100); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_forces_node_to_implement_IteratorAggregate($node) - { - $node->addInterface('Iterator')->shouldBeCalled(); - - $node->addMethod(Argument::type('Prophecy\Doubler\Generator\Node\MethodNode'))->willReturn(null); - - $this->apply($node); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php deleted file mode 100644 index a39fa87f..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php +++ /dev/null @@ -1,122 +0,0 @@ -beConstructedWith($mirror, $creator, $namer); - } - - function it_does_not_have_patches_by_default() - { - $this->getClassPatches()->shouldHaveCount(0); - } - - /** - * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $patch - */ - function its_registerClassPatch_adds_a_patch_to_the_doubler($patch) - { - $this->registerClassPatch($patch); - $this->getClassPatches()->shouldReturn(array($patch)); - } - - /** - * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt1 - * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt2 - * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt3 - * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt4 - */ - function its_getClassPatches_sorts_patches_by_priority($alt1, $alt2, $alt3, $alt4) - { - $alt1->getPriority()->willReturn(2); - $alt2->getPriority()->willReturn(50); - $alt3->getPriority()->willReturn(10); - $alt4->getPriority()->willReturn(0); - - $this->registerClassPatch($alt1); - $this->registerClassPatch($alt2); - $this->registerClassPatch($alt3); - $this->registerClassPatch($alt4); - - $this->getClassPatches()->shouldReturn(array($alt2, $alt3, $alt1, $alt4)); - } - - /** - * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt1 - * @param \Prophecy\Doubler\ClassPatch\ClassPatchInterface $alt2 - * @param \ReflectionClass $class - * @param \ReflectionClass $interface1 - * @param \ReflectionClass $interface2 - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function its_double_mirrors_alterates_and_instantiates_provided_class( - $mirror, $creator, $namer, $alt1, $alt2, $class, $interface1, $interface2, $node - ) - { - $mirror->reflect($class, array($interface1, $interface2))->willReturn($node); - $alt1->supports($node)->willReturn(true); - $alt2->supports($node)->willReturn(false); - $alt1->getPriority()->willReturn(1); - $alt2->getPriority()->willReturn(2); - $namer->name($class, array($interface1, $interface2))->willReturn('SplStack'); - $class->getName()->willReturn('stdClass'); - $interface1->getName()->willReturn('ArrayAccess'); - $interface2->getName()->willReturn('Iterator'); - - $alt1->apply($node)->shouldBeCalled(); - $alt2->apply($node)->shouldNotBeCalled(); - $creator->create('SplStack', $node)->shouldBeCalled(); - - $this->registerClassPatch($alt1); - $this->registerClassPatch($alt2); - - $this->double($class, array($interface1, $interface2)) - ->shouldReturnAnInstanceOf('SplStack'); - } - - /** - * @param \ReflectionClass $class - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_double_instantiates_a_class_with_constructor_argument($mirror, $class, $node, $namer) - { - $class->getName()->willReturn('ReflectionClass'); - $mirror->reflect($class, array())->willReturn($node); - $namer->name($class, array())->willReturn('ReflectionClass'); - - $double = $this->double($class, array(), array('stdClass')); - $double->shouldBeAnInstanceOf('ReflectionClass'); - $double->getName()->shouldReturn('stdClass'); - } - - /** - * @param \ReflectionClass $class - * @param \Prophecy\Doubler\Generator\Node\ClassNode $node - */ - function it_can_instantiate_class_with_final_constructor($mirror, $class, $node, $namer) - { - $class->getName()->willReturn('spec\Prophecy\Doubler\WithFinalConstructor'); - $mirror->reflect($class, array())->willReturn($node); - $namer->name($class, array())->willReturn('spec\Prophecy\Doubler\WithFinalConstructor'); - - $double = $this->double($class, array()); - - $double->shouldBeAnInstanceOf('spec\Prophecy\Doubler\WithFinalConstructor'); - } -} - -class WithFinalConstructor -{ - final public function __construct() {} -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php deleted file mode 100644 index fa65bc15..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php +++ /dev/null @@ -1,191 +0,0 @@ -getParentClass()->willReturn('RuntimeException'); - $class->getInterfaces()->willReturn(array( - 'Prophecy\Doubler\Generator\MirroredInterface', 'ArrayAccess', 'ArrayIterator' - )); - $class->getProperties()->willReturn(array('name' => 'public', 'email' => 'private')); - $class->getMethods()->willReturn(array($method1, $method2, $method3)); - - $method1->getName()->willReturn('getName'); - $method1->getVisibility()->willReturn('public'); - $method1->returnsReference()->willReturn(false); - $method1->isStatic()->willReturn(true); - $method1->getArguments()->willReturn(array($argument11, $argument12)); - $method1->hasReturnType()->willReturn(true); - $method1->getReturnType()->willReturn('string'); - $method1->getCode()->willReturn('return $this->name;'); - - $method2->getName()->willReturn('getEmail'); - $method2->getVisibility()->willReturn('protected'); - $method2->returnsReference()->willReturn(false); - $method2->isStatic()->willReturn(false); - $method2->getArguments()->willReturn(array($argument21)); - $method2->hasReturnType()->willReturn(false); - $method2->getCode()->willReturn('return $this->email;'); - - $method3->getName()->willReturn('getRefValue'); - $method3->getVisibility()->willReturn('public'); - $method3->returnsReference()->willReturn(true); - $method3->isStatic()->willReturn(false); - $method3->getArguments()->willReturn(array($argument31)); - $method3->hasReturnType()->willReturn(false); - $method3->getCode()->willReturn('return $this->refValue;'); - - $argument11->getName()->willReturn('fullname'); - $argument11->getTypeHint()->willReturn('array'); - $argument11->isOptional()->willReturn(true); - $argument11->getDefault()->willReturn(null); - $argument11->isPassedByReference()->willReturn(false); - - $argument12->getName()->willReturn('class'); - $argument12->getTypeHint()->willReturn('ReflectionClass'); - $argument12->isOptional()->willReturn(false); - $argument12->isPassedByReference()->willReturn(false); - - $argument21->getName()->willReturn('default'); - $argument21->getTypeHint()->willReturn(null); - $argument21->isOptional()->willReturn(true); - $argument21->getDefault()->willReturn('ever.zet@gmail.com'); - $argument21->isPassedByReference()->willReturn(false); - - $argument31->getName()->willReturn('refValue'); - $argument31->getTypeHint()->willReturn(null); - $argument31->isOptional()->willReturn(false); - $argument31->getDefault()->willReturn(); - $argument31->isPassedByReference()->willReturn(false); - - $code = $this->generate('CustomClass', $class); - $expected = <<<'PHP' -namespace { -class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface, \ArrayAccess, \ArrayIterator { -public $name; -private $email; - -public static function getName(array $fullname = NULL, \ReflectionClass $class): string { -return $this->name; -} -protected function getEmail( $default = 'ever.zet@gmail.com') { -return $this->email; -} -public function &getRefValue( $refValue) { -return $this->refValue; -} - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument - */ - function it_overrides_properly_methods_with_args_passed_by_reference( - $class, $method, $argument - ) - { - $class->getParentClass()->willReturn('RuntimeException'); - $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); - $class->getProperties()->willReturn(array()); - $class->getMethods()->willReturn(array($method)); - - $method->getName()->willReturn('getName'); - $method->getVisibility()->willReturn('public'); - $method->isStatic()->willReturn(false); - $method->getArguments()->willReturn(array($argument)); - $method->hasReturnType()->willReturn(false); - $method->returnsReference()->willReturn(false); - $method->getCode()->willReturn('return $this->name;'); - - $argument->getName()->willReturn('fullname'); - $argument->getTypeHint()->willReturn('array'); - $argument->isOptional()->willReturn(true); - $argument->getDefault()->willReturn(null); - $argument->isPassedByReference()->willReturn(true); - - $code = $this->generate('CustomClass', $class); - $expected =<<<'PHP' -namespace { -class CustomClass extends \RuntimeException implements \Prophecy\Doubler\Generator\MirroredInterface { - -public function getName(array &$fullname = NULL) { -return $this->name; -} - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - */ - function it_generates_empty_class_for_empty_ClassNode($class) - { - $class->getParentClass()->willReturn('stdClass'); - $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); - $class->getProperties()->willReturn(array()); - $class->getMethods()->willReturn(array()); - - $code = $this->generate('CustomClass', $class); - $expected =<<<'PHP' -namespace { -class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface { - - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - */ - function it_wraps_class_in_namespace_if_it_is_namespaced($class) - { - $class->getParentClass()->willReturn('stdClass'); - $class->getInterfaces()->willReturn(array('Prophecy\Doubler\Generator\MirroredInterface')); - $class->getProperties()->willReturn(array()); - $class->getMethods()->willReturn(array()); - - $code = $this->generate('My\Awesome\CustomClass', $class); - $expected =<<<'PHP' -namespace My\Awesome { -class CustomClass extends \stdClass implements \Prophecy\Doubler\Generator\MirroredInterface { - - -} -} -PHP; - $expected = strtr($expected, array("\r\n" => "\n", "\r" => "\n")); - $code->shouldBe($expected); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php deleted file mode 100644 index c7b57009..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php +++ /dev/null @@ -1,44 +0,0 @@ -beConstructedWith($generator); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - */ - function it_evaluates_code_generated_by_ClassCodeGenerator($generator, $class) - { - $generator->generate('stdClass', $class)->shouldBeCalled()->willReturn( - 'return 42;' - ); - - $this->create('stdClass', $class)->shouldReturn(42); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ClassNode $class - */ - function it_throws_an_exception_if_class_does_not_exist_after_evaluation($generator, $class) - { - $generator->generate('CustomClass', $class)->shouldBeCalled()->willReturn( - 'return 42;' - ); - - $class->getParentClass()->willReturn('stdClass'); - $class->getInterfaces()->willReturn(array('Interface1', 'Interface2')); - - $this->shouldThrow('Prophecy\Exception\Doubler\ClassCreatorException') - ->duringCreate('CustomClass', $class); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php deleted file mode 100644 index 161f8509..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php +++ /dev/null @@ -1,610 +0,0 @@ -getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array( - $method1, $method2, $method3 - )); - - $method1->getName()->willReturn('getName'); - $method2->getName()->willReturn('isPublic'); - $method3->getName()->willReturn('isAbstract'); - - $method1->isFinal()->willReturn(false); - $method2->isFinal()->willReturn(false); - $method3->isFinal()->willReturn(false); - - $method1->isProtected()->willReturn(false); - $method2->isProtected()->willReturn(false); - $method3->isProtected()->willReturn(false); - - $method1->isStatic()->willReturn(false); - $method2->isStatic()->willReturn(false); - $method3->isStatic()->willReturn(false); - - $method1->returnsReference()->willReturn(false); - $method2->returnsReference()->willReturn(false); - $method3->returnsReference()->willReturn(false); - - $method1->getParameters()->willReturn(array()); - $method2->getParameters()->willReturn(array()); - $method3->getParameters()->willReturn(array()); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method1->hasReturnType()->willReturn(false); - $method2->hasReturnType()->willReturn(false); - $method3->hasReturnType()->willReturn(false); - } - - $classNode = $this->reflect($class, array()); - $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); - $classNode->getParentClass()->shouldReturn('Custom\ClassName'); - - $methodNodes = $classNode->getMethods(); - $methodNodes->shouldHaveCount(3); - - $classNode->hasMethod('getName')->shouldReturn(true); - $classNode->hasMethod('isPublic')->shouldReturn(true); - $classNode->hasMethod('isAbstract')->shouldReturn(true); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - * @param ReflectionParameter $parameter - */ - function it_changes_argument_names_if_they_are_varying($class, $method, $parameter) - { - - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - - $method->getParameters()->willReturn(array($parameter)); - $method->getName()->willReturn('methodName'); - $method->isFinal()->willReturn(false); - $method->isProtected()->willReturn(false); - $method->isStatic()->willReturn(false); - $method->returnsReference()->willReturn(false); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method->hasReturnType()->willReturn(false); - } - - $parameter->getName()->willReturn('...'); - $parameter->isDefaultValueAvailable()->willReturn(true); - $parameter->getDefaultValue()->willReturn(null); - $parameter->isPassedByReference()->willReturn(false); - $parameter->getClass()->willReturn($class); - - $classNode = $this->reflect($class, array()); - - $methodNodes = $classNode->getMethods(); - - $argumentNodes = $methodNodes['methodName']->getArguments(); - $argumentNode = $argumentNodes[0]; - - $argumentNode->getName()->shouldReturn('__dot_dot_dot__'); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - */ - function it_reflects_protected_abstract_methods($class, $method) - { - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array($method)); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array()); - - $method->isProtected()->willReturn(true); - $method->isStatic()->willReturn(false); - $method->getParameters()->willReturn(array()); - $method->getName()->willReturn('innerDetail'); - $method->returnsReference()->willReturn(false); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method->hasReturnType()->willReturn(false); - } - - $classNode = $this->reflect($class, array()); - $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); - $classNode->getParentClass()->shouldReturn('Custom\ClassName'); - - $methodNodes = $classNode->getMethods(); - $methodNodes->shouldHaveCount(1); - - $methodNodes['innerDetail']->getVisibility()->shouldReturn('protected'); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - */ - function it_reflects_public_static_methods($class, $method) - { - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array($method)); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array()); - - $method->isProtected()->willReturn(true); - $method->isStatic()->willReturn(true); - $method->getParameters()->willReturn(array()); - $method->getName()->willReturn('innerDetail'); - $method->returnsReference()->willReturn(false); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method->hasReturnType()->willReturn(false); - } - - $classNode = $this->reflect($class, array()); - $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); - $classNode->getParentClass()->shouldReturn('Custom\ClassName'); - - $methodNodes = $classNode->getMethods(); - $methodNodes->shouldHaveCount(1); - - $methodNodes['innerDetail']->getVisibility()->shouldReturn('protected'); - $methodNodes['innerDetail']->isStatic()->shouldReturn(true); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - * @param ReflectionParameter $param1 - * @param ReflectionParameter $param2 - * @param ReflectionClass $typeHint - * @param ReflectionParameter $param3 - */ - function it_properly_reads_methods_arguments_with_types( - $class, $method, $param1, $param2, $typeHint, $param3 - ) - { - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); - - $method->getName()->willReturn('methodWithArgs'); - $method->isFinal()->willReturn(false); - $method->isProtected()->willReturn(true); - $method->isStatic()->willReturn(false); - $method->returnsReference()->willReturn(false); - $method->getParameters()->willReturn(array($param1, $param2, $param3)); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method->hasReturnType()->willReturn(false); - } - - $param1->getName()->willReturn('arg_1'); - $param1->isArray()->willReturn(true); - $param1->getClass()->willReturn(null); - $param1->isDefaultValueAvailable()->willReturn(true); - $param1->isPassedByReference()->willReturn(false); - $param1->allowsNull()->willReturn(false); - $param1->getDefaultValue()->willReturn(array()); - - $param2->getName()->willReturn('arg2'); - $param2->isArray()->willReturn(false); - $param2->getClass()->willReturn($typeHint); - $param2->isDefaultValueAvailable()->willReturn(false); - $param2->isOptional()->willReturn(false); - $param2->isPassedByReference()->willReturn(false); - $param2->allowsNull()->willReturn(false); - $typeHint->getName()->willReturn('ArrayAccess'); - - $param3->getName()->willReturn('arg_3'); - $param3->isArray()->willReturn(false); - if (version_compare(PHP_VERSION, '5.4', '>=')) { - $param3->isCallable()->willReturn(true); - } - $param3->getClass()->willReturn(null); - $param3->isOptional()->willReturn(false); - $param3->isDefaultValueAvailable()->willReturn(false); - $param3->isPassedByReference()->willReturn(false); - $param3->allowsNull()->willReturn(true); - - $classNode = $this->reflect($class, array()); - $methodNodes = $classNode->getMethods(); - $argNodes = $methodNodes['methodWithArgs']->getArguments(); - - $argNodes[0]->getName()->shouldReturn('arg_1'); - $argNodes[0]->getTypeHint()->shouldReturn('array'); - $argNodes[0]->isOptional()->shouldReturn(true); - $argNodes[0]->getDefault()->shouldReturn(array()); - - $argNodes[1]->getName()->shouldReturn('arg2'); - $argNodes[1]->getTypeHint()->shouldReturn('ArrayAccess'); - $argNodes[1]->isOptional()->shouldReturn(false); - - $argNodes[2]->getName()->shouldReturn('arg_3'); - if (version_compare(PHP_VERSION, '5.4', '>=')) { - $argNodes[2]->getTypeHint()->shouldReturn('callable'); - $argNodes[2]->isOptional()->shouldReturn(true); - $argNodes[2]->getDefault()->shouldReturn(null); - } else { - $argNodes[2]->isOptional()->shouldReturn(false); - } - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - * @param ReflectionParameter $param1 - */ - function it_marks_required_args_without_types_as_not_optional( - $class, $method, $param1 - ) - { - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); - - $method->getName()->willReturn('methodWithArgs'); - $method->isFinal()->willReturn(false); - $method->isProtected()->willReturn(false); - $method->isStatic()->willReturn(false); - $method->returnsReference()->willReturn(false); - $method->getParameters()->willReturn(array($param1)); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method->hasReturnType()->willReturn(false); - } - - $param1->getName()->willReturn('arg_1'); - $param1->isArray()->willReturn(false); - if (version_compare(PHP_VERSION, '5.4', '>=')) { - $param1->isCallable()->willReturn(false); - } - $param1->getClass()->willReturn(null); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $param1->hasType()->willReturn(false); - } - - $param1->isDefaultValueAvailable()->willReturn(false); - $param1->isOptional()->willReturn(false); - $param1->isPassedByReference()->willReturn(false); - $param1->allowsNull()->willReturn(true); - if (defined('HHVM_VERSION')) { - $param1->getTypehintText()->willReturn(null); - } - - $classNode = $this->reflect($class, array()); - $methodNodes = $classNode->getMethods(); - $argNodes = $methodNodes['methodWithArgs']->getArguments(); - - $argNodes[0]->isOptional()->shouldReturn(false); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - * @param ReflectionParameter $param1 - * @param ReflectionParameter $param2 - * @param ReflectionClass $typeHint - */ - function it_marks_passed_by_reference_args_as_passed_by_reference( - $class, $method, $param1, $param2, $typeHint - ) - { - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); - - $method->getName()->willReturn('methodWithArgs'); - $method->isFinal()->willReturn(false); - $method->isProtected()->willReturn(false); - $method->isStatic()->willReturn(false); - $method->returnsReference()->willReturn(false); - $method->getParameters()->willReturn(array($param1, $param2)); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method->hasReturnType()->willReturn(false); - } - - $param1->getName()->willReturn('arg_1'); - $param1->isArray()->willReturn(false); - if (version_compare(PHP_VERSION, '5.4', '>=')) { - $param1->isCallable()->willReturn(false); - } - $param1->getClass()->willReturn(null); - $param1->isDefaultValueAvailable()->willReturn(false); - $param1->isOptional()->willReturn(true); - $param1->isPassedByReference()->willReturn(true); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $param1->hasType()->willReturn(false); - } - - $param1->allowsNull()->willReturn(false); - if (defined('HHVM_VERSION')) { - $param1->getTypehintText()->willReturn(null); - } - - $param2->getName()->willReturn('arg2'); - $param2->isArray()->willReturn(false); - $param2->getClass()->willReturn($typeHint); - $param2->isDefaultValueAvailable()->willReturn(false); - $param2->isOptional()->willReturn(false); - $param2->isPassedByReference()->willReturn(false); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $param2->hasType()->willReturn(false); - } - - $param2->allowsNull()->willReturn(false); - $typeHint->getName()->willReturn('ArrayAccess'); - - $classNode = $this->reflect($class, array()); - $methodNodes = $classNode->getMethods(); - $argNodes = $methodNodes['methodWithArgs']->getArguments(); - - $argNodes[0]->isPassedByReference()->shouldReturn(true); - $argNodes[1]->isPassedByReference()->shouldReturn(false); - } - - /** - * @param ReflectionClass $class - */ - function it_throws_an_exception_if_class_is_final($class) - { - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(true); - $class->getName()->willReturn('Custom\ClassName'); - - $this->shouldThrow('Prophecy\Exception\Doubler\ClassMirrorException') - ->duringReflect($class, array()); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - */ - function it_ignores_final_methods($class, $method) - { - $class->getName()->willReturn('Custom\ClassName'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); - - $method->isFinal()->willReturn(true); - $method->getName()->willReturn('finalImplementation'); - - $classNode = $this->reflect($class, array()); - $classNode->getMethods()->shouldHaveCount(0); - } - - /** - * @param ReflectionClass $interface - */ - function it_throws_an_exception_if_interface_provided_instead_of_class($interface) - { - $interface->isInterface()->willReturn(true); - $interface->getName()->willReturn('Custom\ClassName'); - - $this->shouldThrow('Prophecy\Exception\InvalidArgumentException') - ->duringReflect($interface, array()); - } - - /** - * @param ReflectionClass $interface1 - * @param ReflectionClass $interface2 - * @param ReflectionMethod $method1 - * @param ReflectionMethod $method2 - * @param ReflectionMethod $method3 - */ - function it_reflects_all_interfaces_methods( - $interface1, $interface2, $method1, $method2, $method3 - ) - { - $interface1->getName()->willReturn('MyInterface1'); - $interface2->getName()->willReturn('MyInterface2'); - - $interface1->isInterface()->willReturn(true); - $interface2->isInterface()->willReturn(true); - - $interface1->getMethods()->willReturn(array($method1)); - $interface2->getMethods()->willReturn(array($method2, $method3)); - - $method1->getName()->willReturn('getName'); - $method2->getName()->willReturn('isPublic'); - $method3->getName()->willReturn('isAbstract'); - - $method1->isProtected()->willReturn(false); - $method2->isProtected()->willReturn(false); - $method3->isProtected()->willReturn(false); - - $method1->returnsReference()->willReturn(false); - $method2->returnsReference()->willReturn(false); - $method3->returnsReference()->willReturn(false); - - $method1->isStatic()->willReturn(false); - $method2->isStatic()->willReturn(false); - $method3->isStatic()->willReturn(false); - - $method1->getParameters()->willReturn(array()); - $method2->getParameters()->willReturn(array()); - $method3->getParameters()->willReturn(array()); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method1->hasReturnType()->willReturn(false); - $method2->hasReturnType()->willReturn(false); - $method3->hasReturnType()->willReturn(false); - } - - $classNode = $this->reflect(null, array($interface1, $interface2)); - - $classNode->shouldBeAnInstanceOf('Prophecy\Doubler\Generator\Node\ClassNode'); - $classNode->getParentClass()->shouldReturn('stdClass'); - $classNode->getInterfaces()->shouldReturn(array( - 'Prophecy\Doubler\Generator\ReflectionInterface', 'MyInterface2', 'MyInterface1', - )); - - $methodNodes = $classNode->getMethods(); - $methodNodes->shouldHaveCount(3); - - $classNode->hasMethod('getName')->shouldReturn(true); - $classNode->hasMethod('isPublic')->shouldReturn(true); - $classNode->hasMethod('isAbstract')->shouldReturn(true); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method1 - * @param ReflectionMethod $method2 - * @param ReflectionMethod $method3 - */ - function it_ignores_virtually_private_methods($class, $method1, $method2, $method3) - { - $class->getName()->willReturn('SomeClass'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method1, $method2, $method3)); - - $method1->getName()->willReturn('_getName'); - $method2->getName()->willReturn('__toString'); - $method3->getName()->willReturn('isAbstract'); - - $method1->isFinal()->willReturn(false); - $method2->isFinal()->willReturn(false); - $method3->isFinal()->willReturn(false); - - $method1->isProtected()->willReturn(false); - $method2->isProtected()->willReturn(false); - $method3->isProtected()->willReturn(false); - - $method1->isStatic()->willReturn(false); - $method2->isStatic()->willReturn(false); - $method3->isStatic()->willReturn(false); - - $method1->returnsReference()->willReturn(false); - $method2->returnsReference()->willReturn(false); - $method3->returnsReference()->willReturn(false); - - $method1->getParameters()->willReturn(array()); - $method2->getParameters()->willReturn(array()); - $method3->getParameters()->willReturn(array()); - - if (version_compare(PHP_VERSION, '7.0', '>=')) { - $method1->hasReturnType()->willReturn(false); - $method2->hasReturnType()->willReturn(false); - $method3->hasReturnType()->willReturn(false); - } - - $classNode = $this->reflect($class, array()); - $methodNodes = $classNode->getMethods(); - $methodNodes->shouldHaveCount(2); - - $classNode->hasMethod('isAbstract')->shouldReturn(true); - } - - /** - * @param ReflectionClass $class - * @param ReflectionMethod $method - */ - function it_does_not_throw_exception_for_virtually_private_finals($class, $method) - { - $class->getName()->willReturn('SomeClass'); - $class->isInterface()->willReturn(false); - $class->isFinal()->willReturn(false); - $class->getMethods(ReflectionMethod::IS_ABSTRACT)->willReturn(array()); - $class->getMethods(ReflectionMethod::IS_PUBLIC)->willReturn(array($method)); - - $method->getName()->willReturn('__toString'); - $method->isFinal()->willReturn(true); - - $this->shouldNotThrow()->duringReflect($class, array()); - } - - /** - * @param ReflectionClass $class - */ - function it_throws_an_exception_if_class_provided_in_interfaces_list($class) - { - $class->getName()->willReturn('MyClass'); - $class->isInterface()->willReturn(false); - - $this->shouldThrow('InvalidArgumentException') - ->duringReflect(null, array($class)); - } - - function it_throws_an_exception_if_not_reflection_provided_as_interface() - { - $this->shouldThrow('InvalidArgumentException') - ->duringReflect(null, array(null)); - } - - function it_doesnt_fail_to_typehint_nonexistent_FQCN() - { - $classNode = $this->reflect(new ReflectionClass('spec\Prophecy\Doubler\Generator\OptionalDepsClass'), array()); - $method = $classNode->getMethod('iHaveAStrangeTypeHintedArg'); - $arguments = $method->getArguments(); - $arguments[0]->getTypeHint()->shouldBe('I\Simply\Am\Nonexistent'); - } - - function it_doesnt_fail_to_typehint_nonexistent_RQCN() - { - $classNode = $this->reflect(new ReflectionClass('spec\Prophecy\Doubler\Generator\OptionalDepsClass'), array()); - $method = $classNode->getMethod('iHaveAnEvenStrangerTypeHintedArg'); - $arguments = $method->getArguments(); - $arguments[0]->getTypeHint()->shouldBe('I\Simply\Am\Not'); - } - - function it_doesnt_use_scalar_typehints() - { - $classNode = $this->reflect(new ReflectionClass('ReflectionMethod'), array()); - $method = $classNode->getMethod('export'); - $arguments = $method->getArguments(); - $arguments[0]->getTypeHint()->shouldReturn(null); - $arguments[1]->getTypeHint()->shouldReturn(null); - $arguments[2]->getTypeHint()->shouldReturn(null); - } -} - -class OptionalDepsClass -{ - public function iHaveAStrangeTypeHintedArg(\I\Simply\Am\Nonexistent $class) - { - } - - public function iHaveAnEvenStrangerTypeHintedArg(Simply\Am\Not $class) - { - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php deleted file mode 100644 index cea578fa..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php +++ /dev/null @@ -1,62 +0,0 @@ -beConstructedWith('name'); - } - - function it_is_not_be_passed_by_reference_by_default() - { - $this->shouldNotBePassedByReference(); - } - - function it_is_passed_by_reference_if_marked() - { - $this->setAsPassedByReference(); - $this->shouldBePassedByReference(); - } - - function it_has_name_with_which_it_was_been_constructed() - { - $this->getName()->shouldReturn('name'); - } - - function it_has_no_typehint_by_default() - { - $this->getTypeHint()->shouldReturn(null); - } - - function its_typeHint_is_mutable() - { - $this->setTypeHint('array'); - $this->getTypeHint()->shouldReturn('array'); - } - - function it_does_not_have_default_value_by_default() - { - $this->getDefault()->shouldReturn(null); - } - - function it_is_not_optional_by_default() - { - $this->isOptional()->shouldReturn(false); - } - - function its_default_is_mutable() - { - $this->setDefault(array()); - $this->getDefault()->shouldReturn(array()); - } - - function it_is_marked_as_optional_when_default_is_set() - { - $this->setDefault(null); - $this->isOptional()->shouldReturn(true); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php deleted file mode 100644 index 18f0e1cc..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php +++ /dev/null @@ -1,154 +0,0 @@ -getParentClass()->shouldReturn('stdClass'); - } - - function its_parentClass_is_mutable() - { - $this->setParentClass('Exception'); - $this->getParentClass()->shouldReturn('Exception'); - } - - function its_parentClass_is_set_to_stdClass_if_user_set_null() - { - $this->setParentClass(null); - $this->getParentClass()->shouldReturn('stdClass'); - } - - function it_does_not_implement_any_interface_by_default() - { - $this->getInterfaces()->shouldHaveCount(0); - } - - function its_addInterface_adds_item_to_the_list_of_implemented_interfaces() - { - $this->addInterface('MyInterface'); - $this->getInterfaces()->shouldHaveCount(1); - } - - function its_hasInterface_returns_true_if_class_implements_interface() - { - $this->addInterface('MyInterface'); - $this->hasInterface('MyInterface')->shouldReturn(true); - } - - function its_hasInterface_returns_false_if_class_does_not_implements_interface() - { - $this->hasInterface('MyInterface')->shouldReturn(false); - } - - function it_supports_implementation_of_multiple_interfaces() - { - $this->addInterface('MyInterface'); - $this->addInterface('MySecondInterface'); - $this->getInterfaces()->shouldHaveCount(2); - } - - function it_ignores_same_interfaces_added_twice() - { - $this->addInterface('MyInterface'); - $this->addInterface('MyInterface'); - - $this->getInterfaces()->shouldHaveCount(1); - $this->getInterfaces()->shouldReturn(array('MyInterface')); - } - - function it_does_not_have_methods_by_default() - { - $this->getMethods()->shouldHaveCount(0); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method1 - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method2 - */ - function it_can_has_methods($method1, $method2) - { - $method1->getName()->willReturn('__construct'); - $method2->getName()->willReturn('getName'); - - $this->addMethod($method1); - $this->addMethod($method2); - - $this->getMethods()->shouldReturn(array( - '__construct' => $method1, - 'getName' => $method2 - )); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - */ - function its_hasMethod_returns_true_if_method_exists($method) - { - $method->getName()->willReturn('getName'); - - $this->addMethod($method); - - $this->hasMethod('getName')->shouldReturn(true); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - */ - function its_getMethod_returns_method_by_name($method) - { - $method->getName()->willReturn('getName'); - - $this->addMethod($method); - - $this->getMethod('getName')->shouldReturn($method); - } - - function its_hasMethod_returns_false_if_method_does_not_exists() - { - $this->hasMethod('getName')->shouldReturn(false); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\MethodNode $method - */ - function its_hasMethod_returns_false_if_method_has_been_removed($method) - { - $method->getName()->willReturn('getName'); - $this->addMethod($method); - $this->removeMethod('getName'); - - $this->hasMethod('getName')->shouldReturn(false); - } - - - function it_does_not_have_properties_by_default() - { - $this->getProperties()->shouldHaveCount(0); - } - - function it_is_able_to_have_properties() - { - $this->addProperty('title'); - $this->addProperty('text', 'private'); - $this->getProperties()->shouldReturn(array( - 'title' => 'public', - 'text' => 'private' - )); - } - - function its_addProperty_does_not_accept_unsupported_visibility() - { - $this->shouldThrow('InvalidArgumentException')->duringAddProperty('title', 'town'); - } - - function its_addProperty_lowercases_visibility_before_setting() - { - $this->addProperty('text', 'PRIVATE'); - $this->getProperties()->shouldReturn(array('text' => 'private')); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php deleted file mode 100644 index d67646da..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php +++ /dev/null @@ -1,138 +0,0 @@ -beConstructedWith('getTitle'); - } - - function it_has_a_name() - { - $this->getName()->shouldReturn('getTitle'); - } - - function it_has_public_visibility_by_default() - { - $this->getVisibility()->shouldReturn('public'); - } - - function its_visibility_is_mutable() - { - $this->setVisibility('private'); - $this->getVisibility()->shouldReturn('private'); - } - - function it_is_not_static_by_default() - { - $this->shouldNotBeStatic(); - } - - function it_does_not_return_a_reference_by_default() - { - $this->returnsReference()->shouldReturn(false); - } - - function it_should_be_settable_as_returning_a_reference_through_setter() - { - $this->setReturnsReference(); - $this->returnsReference()->shouldReturn(true); - } - - function it_should_be_settable_as_static_through_setter() - { - $this->setStatic(); - $this->shouldBeStatic(); - } - - function it_accepts_only_supported_visibilities() - { - $this->shouldThrow('InvalidArgumentException')->duringSetVisibility('stealth'); - } - - function it_lowercases_visibility_before_setting_it() - { - $this->setVisibility('Public'); - $this->getVisibility()->shouldReturn('public'); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument1 - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument2 - */ - function its_useParentCode_causes_method_to_call_parent($argument1, $argument2) - { - $argument1->getName()->willReturn('objectName'); - $argument2->getName()->willReturn('default'); - - $this->addArgument($argument1); - $this->addArgument($argument2); - - $this->useParentCode(); - - $this->getCode()->shouldReturn( - 'return parent::getTitle($objectName, $default);' - ); - } - - function its_code_is_mutable() - { - $this->setCode('echo "code";'); - $this->getCode()->shouldReturn('echo "code";'); - } - - function its_reference_returning_methods_will_generate_exceptions() - { - $this->setCode('echo "code";'); - $this->setReturnsReference(); - $this->getCode()->shouldReturn("throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), 'getTitle');"); - } - - function its_setCode_provided_with_null_cleans_method_body() - { - $this->setCode(null); - $this->getCode()->shouldReturn(''); - } - - function it_is_constructable_with_code() - { - $this->beConstructedWith('getTitle', 'die();'); - $this->getCode()->shouldReturn('die();'); - } - - function it_does_not_have_arguments_by_default() - { - $this->getArguments()->shouldHaveCount(0); - } - - /** - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument1 - * @param \Prophecy\Doubler\Generator\Node\ArgumentNode $argument2 - */ - function it_supports_adding_arguments($argument1, $argument2) - { - $this->addArgument($argument1); - $this->addArgument($argument2); - - $this->getArguments()->shouldReturn(array($argument1, $argument2)); - } - - function it_does_not_have_return_type_by_default() - { - $this->hasReturnType()->shouldReturn(false); - } - - function it_setReturnType_sets_return_type() - { - $returnType = 'string'; - - $this->setReturnType($returnType); - - $this->hasReturnType()->shouldReturn(true); - $this->getReturnType()->shouldReturn($returnType); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php deleted file mode 100644 index 7026126f..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php +++ /dev/null @@ -1,96 +0,0 @@ -beConstructedWith($doubler); - } - - /** - * @param \Prophecy\Prophecy\ProphecySubjectInterface $double - */ - function it_returns_anonymous_double_instance_by_default($doubler, $double) - { - $doubler->double(null, array())->willReturn($double); - - $this->getInstance()->shouldReturn($double); - } - - /** - * @param \Prophecy\Prophecy\ProphecySubjectInterface $double - * @param \ReflectionClass $class - */ - function it_returns_class_double_instance_if_set($doubler, $double, $class) - { - $doubler->double($class, array())->willReturn($double); - - $this->setParentClass($class); - - $this->getInstance()->shouldReturn($double); - } - - /** - * @param \Prophecy\Prophecy\ProphecySubjectInterface $double1 - * @param \Prophecy\Prophecy\ProphecySubjectInterface $double2 - */ - function it_returns_same_double_instance_if_called_2_times( - $doubler, $double1, $double2 - ) - { - $doubler->double(null, array())->willReturn($double1); - $doubler->double(null, array())->willReturn($double2); - - $this->getInstance()->shouldReturn($double2); - $this->getInstance()->shouldReturn($double2); - } - - function its_setParentClass_throws_ClassNotFoundException_if_class_not_found() - { - $this->shouldThrow('Prophecy\Exception\Doubler\ClassNotFoundException') - ->duringSetParentClass('SomeUnexistingClass'); - } - - /** - * @param \Prophecy\Prophecy\ProphecySubjectInterface $double - */ - function its_setParentClass_throws_exception_if_prophecy_is_already_created( - $doubler, $double - ) - { - $doubler->double(null, array())->willReturn($double); - - $this->getInstance(); - - $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException') - ->duringSetParentClass('stdClass'); - } - - function its_addInterface_throws_InterfaceNotFoundException_if_no_interface_found() - { - $this->shouldThrow('Prophecy\Exception\Doubler\InterfaceNotFoundException') - ->duringAddInterface('SomeUnexistingInterface'); - } - - /** - * @param \Prophecy\Prophecy\ProphecySubjectInterface $double - */ - function its_addInterface_throws_exception_if_prophecy_is_already_created( - $doubler, $double - ) - { - $doubler->double(null, array())->willReturn($double); - - $this->getInstance(); - - $this->shouldThrow('Prophecy\Exception\Doubler\DoubleException') - ->duringAddInterface('ArrayAccess'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php deleted file mode 100644 index a3e74919..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php +++ /dev/null @@ -1,72 +0,0 @@ -getName()->willReturn('stdClass'); - $this->name($class, array())->shouldStartWith('Double\stdClass\\'); - } - - /** - * @param \ReflectionClass $class - */ - function its_name_generates_name_based_on_namespaced_class_reflection($class) - { - $class->getName()->willReturn('Some\Custom\Class'); - $this->name($class, array())->shouldStartWith('Double\Some\Custom\Class\P'); - } - - /** - * @param \ReflectionClass $interface1 - * @param \ReflectionClass $interface2 - */ - function its_name_generates_name_based_on_interface_shortnames($interface1, $interface2) - { - $interface1->getShortName()->willReturn('HandlerInterface'); - $interface2->getShortName()->willReturn('LoaderInterface'); - - $this->name(null, array($interface1, $interface2))->shouldStartWith( - 'Double\HandlerInterface\LoaderInterface\P' - ); - } - - function it_generates_proper_name_for_no_class_and_interfaces_list() - { - $this->name(null, array())->shouldStartWith('Double\stdClass\P'); - } - - /** - * @param \ReflectionClass $class - * @param \ReflectionClass $interface1 - * @param \ReflectionClass $interface2 - */ - function its_name_generates_name_based_only_on_class_if_its_available( - $class, $interface1, $interface2 - ) - { - $class->getName()->willReturn('Some\Custom\Class'); - $interface1->getShortName()->willReturn('HandlerInterface'); - $interface2->getShortName()->willReturn('LoaderInterface'); - - $this->name($class, array($interface1, $interface2))->shouldStartWith( - 'Double\Some\Custom\Class\P' - ); - } - - public function getMatchers() - { - return array( - 'startWith' => function ($subject, $string) { - return 0 === strpos($subject, $string); - }, - ); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php deleted file mode 100644 index 6fd1a5c3..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php +++ /dev/null @@ -1,32 +0,0 @@ -beConstructedWith('msg', $objectProphecy, 'getName', array('arg1', 'arg2')); - } - - function it_is_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException'); - } - - function it_exposes_method_name_through_getter() - { - $this->getMethodName()->shouldReturn('getName'); - } - - function it_exposes_arguments_through_getter() - { - $this->getArguments()->shouldReturn(array('arg1', 'arg2')); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php deleted file mode 100644 index 58241385..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php +++ /dev/null @@ -1,28 +0,0 @@ -beConstructedWith('', $node); - } - - function it_is_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); - } - - function it_contains_a_reflected_node($node) - { - $this->getClassNode()->shouldReturn($node); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php deleted file mode 100644 index 21e31a34..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php +++ /dev/null @@ -1,27 +0,0 @@ -beConstructedWith('', $class); - } - - function it_is_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); - } - - function it_contains_a_reflected_class_link($class) - { - $this->getReflectedClass()->shouldReturn($class); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php deleted file mode 100644 index 251512b9..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php +++ /dev/null @@ -1,25 +0,0 @@ -beConstructedWith('msg', 'CustomClass'); - } - - function it_is_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Exception'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoubleException'); - } - - function its_getClassname_returns_classname() - { - $this->getClassname()->shouldReturn('CustomClass'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php deleted file mode 100644 index 6fe5a19a..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php +++ /dev/null @@ -1,14 +0,0 @@ -shouldBeAnInstanceOf('RuntimeException'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php deleted file mode 100644 index ad1a439e..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php +++ /dev/null @@ -1,24 +0,0 @@ -beConstructedWith('msg', 'CustomInterface'); - } - - function it_extends_ClassNotFoundException() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\ClassNotFoundException'); - } - - function its_getClassname_returns_classname() - { - $this->getClassname()->shouldReturn('CustomInterface'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php deleted file mode 100644 index a889dd7e..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php +++ /dev/null @@ -1,40 +0,0 @@ -beConstructedWith('', 'User', 'getName', array(1, 2, 3)); - } - - function it_is_DoubleException() - { - $this->shouldHaveType('Prophecy\Exception\Doubler\DoubleException'); - } - - function it_has_MethodName() - { - $this->getMethodName()->shouldReturn('getName'); - } - - function it_has_classnamej() - { - $this->getClassname()->shouldReturn('User'); - } - - function it_has_an_arguments_list() - { - $this->getArguments()->shouldReturn(array(1, 2, 3)); - } - - function it_has_a_default_null_argument_list() - { - $this->beConstructedWith('', 'User', 'getName'); - $this->getArguments()->shouldReturn(null); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php deleted file mode 100644 index 22a5ebdb..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php +++ /dev/null @@ -1,57 +0,0 @@ -beConstructedWith(null); - } - - function it_is_prediction_exception() - { - $this->shouldBeAnInstanceOf('RuntimeException'); - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\PredictionException'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - */ - function it_can_store_objectProphecy_link($object) - { - $this->setObjectProphecy($object); - $this->getObjectProphecy()->shouldReturn($object); - } - - function it_should_not_have_exceptions_at_the_beginning() - { - $this->getExceptions()->shouldHaveCount(0); - } - - /** - * @param \Prophecy\Exception\Prediction\PredictionException $exception - */ - function it_should_append_exception_through_append_method($exception) - { - $exception->getMessage()->willReturn('Exception #1'); - - $this->append($exception); - - $this->getExceptions()->shouldReturn(array($exception)); - } - - /** - * @param \Prophecy\Exception\Prediction\PredictionException $exception - */ - function it_should_update_message_during_append($exception) - { - $exception->getMessage()->willReturn('Exception #1'); - - $this->append($exception); - - $this->getMessage()->shouldReturn(" Exception #1"); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php deleted file mode 100644 index 473f1a2d..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php +++ /dev/null @@ -1,29 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy); - } - - function it_is_PredictionException() - { - $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException'); - } - - function it_extends_MethodProphecyException() - { - $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php deleted file mode 100644 index adad975b..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php +++ /dev/null @@ -1,31 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy, 5, array($call1, $call2)); - } - - function it_extends_UnexpectedCallsException() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prediction\UnexpectedCallsException'); - } - - function it_should_expose_expectedCount_through_getter() - { - $this->getExpectedCount()->shouldReturn(5); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php deleted file mode 100644 index c0fe24d7..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php +++ /dev/null @@ -1,36 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy, array($call1, $call2)); - } - - function it_is_PredictionException() - { - $this->shouldHaveType('Prophecy\Exception\Prediction\PredictionException'); - } - - function it_extends_MethodProphecyException() - { - $this->shouldHaveType('Prophecy\Exception\Prophecy\MethodProphecyException'); - } - - function it_should_expose_calls_list_through_getter($call1, $call2) - { - $this->getCalls()->shouldReturn(array($call1, $call2)); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php deleted file mode 100644 index 97cf9e10..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php +++ /dev/null @@ -1,30 +0,0 @@ -getObjectProphecy()->willReturn($objectProphecy); - - $this->beConstructedWith('message', $methodProphecy); - } - - function it_extends_DoubleException() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ObjectProphecyException'); - } - - function it_holds_a_stub_reference($methodProphecy) - { - $this->getMethodProphecy()->shouldReturn($methodProphecy); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php deleted file mode 100644 index bcacfedc..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php +++ /dev/null @@ -1,27 +0,0 @@ -beConstructedWith('message', $objectProphecy); - } - - function it_should_be_a_prophecy_exception() - { - $this->shouldBeAnInstanceOf('Prophecy\Exception\Prophecy\ProphecyException'); - } - - function it_holds_double_reference($objectProphecy) - { - $this->getObjectProphecy()->shouldReturn($objectProphecy); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php deleted file mode 100644 index 3da8c599..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php +++ /dev/null @@ -1,42 +0,0 @@ -shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Call\Call $call - */ - function it_does_nothing_if_there_is_more_than_one_call_been_made($object, $method, $call) - { - $this->check(array($call), $object, $method)->shouldReturn(null); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - */ - function it_throws_NoCallsException_if_no_calls_found($object, $method, $arguments) - { - $method->getObjectProphecy()->willReturn($object); - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->__toString()->willReturn('123'); - $object->reveal()->willReturn(new \stdClass()); - $object->findProphecyMethodCalls('getName', Argument::any())->willReturn(array()); - - $this->shouldThrow('Prophecy\Exception\Prediction\NoCallsException') - ->duringCheck(array(), $object, $method); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php deleted file mode 100644 index c6708927..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php +++ /dev/null @@ -1,54 +0,0 @@ -beConstructedWith(2); - } - - function it_is_prediction() - { - $this->shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - */ - function it_does_nothing_if_there_were_exact_amount_of_calls_being_made( - $object, $method, $call1, $call2 - ) - { - $this->check(array($call1, $call2), $object, $method)->shouldReturn(null); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Call\Call $call - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - */ - function it_throws_UnexpectedCallsCountException_if_calls_found( - $object, $method, $call, $arguments - ) - { - $method->getObjectProphecy()->willReturn($object); - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->__toString()->willReturn('123'); - - $call->getMethodName()->willReturn('getName'); - $call->getArguments()->willReturn(array(5, 4, 'three')); - $call->getCallPlace()->willReturn('unknown'); - - $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsCountException') - ->duringCheck(array($call), $object, $method); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php deleted file mode 100644 index 7fe475ef..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php +++ /dev/null @@ -1,36 +0,0 @@ -beConstructedWith('get_class'); - } - - function it_is_prediction() - { - $this->shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Call\Call $call - */ - function it_proxies_call_to_callback($object, $method, $call) - { - $returnFirstCallCallback = function ($calls, $object, $method) { - throw new RuntimeException; - }; - - $this->beConstructedWith($returnFirstCallCallback); - - $this->shouldThrow('RuntimeException')->duringCheck(array($call), $object, $method); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php deleted file mode 100644 index a3ef9bcb..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php +++ /dev/null @@ -1,43 +0,0 @@ -shouldHaveType('Prophecy\Prediction\PredictionInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_does_nothing_if_there_is_no_calls_made($object, $method) - { - $this->check(array(), $object, $method)->shouldReturn(null); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - * @param \Prophecy\Call\Call $call - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - */ - function it_throws_UnexpectedCallsException_if_calls_found($object, $method, $call, $arguments) - { - $method->getObjectProphecy()->willReturn($object); - $method->getMethodName()->willReturn('getName'); - $method->getArgumentsWildcard()->willReturn($arguments); - $arguments->__toString()->willReturn('123'); - - $call->getMethodName()->willReturn('getName'); - $call->getArguments()->willReturn(array(5, 4, 'three')); - $call->getCallPlace()->willReturn('unknown'); - - $this->shouldThrow('Prophecy\Exception\Prediction\UnexpectedCallsException') - ->duringCheck(array($call), $object, $method); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php deleted file mode 100644 index 5d99b1b1..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php +++ /dev/null @@ -1,110 +0,0 @@ -beConstructedWith('get_class'); - } - - function it_is_promise() - { - $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_should_execute_closure_callback($object, $method) - { - $firstArgumentCallback = function ($args) { - return $args[0]; - }; - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_should_execute_static_array_callback($object, $method) - { - $firstArgumentCallback = array('spec\Prophecy\Promise\ClassCallback', 'staticCallbackMethod'); - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_should_execute_instance_array_callback($object, $method) - { - $class = new ClassCallback(); - $firstArgumentCallback = array($class, 'callbackMethod'); - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_should_execute_string_function_callback($object, $method) - { - $firstArgumentCallback = 'spec\Prophecy\Promise\functionCallbackFirstArgument'; - - $this->beConstructedWith($firstArgumentCallback); - - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - -} - -/** - * Class used to test callbackpromise - * - * @param array - * @return string - */ -class ClassCallback -{ - /** - * @param array $args - */ - function callbackMethod($args) - { - return $args[0]; - } - - /** - * @param array $args - */ - static function staticCallbackMethod($args) - { - return $args[0]; - } -} - -/** - * Callback function used to test callbackpromise - * - * @param array - * @return string - */ -function functionCallbackFirstArgument($args) -{ - return $args[0]; -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php deleted file mode 100644 index 4acb7bb0..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php +++ /dev/null @@ -1,41 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_should_return_first_argument_if_provided($object, $method) - { - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('one'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_should_return_null_if_no_arguments_provided($object, $method) - { - $this->execute(array(), $object, $method)->shouldReturn(null); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_should_return_nth_argument_if_provided($object, $method) - { - $this->beConstructedWith(1); - $this->execute(array('one', 'two'), $object, $method)->shouldReturn('two'); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php deleted file mode 100644 index 18bfd87a..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php +++ /dev/null @@ -1,61 +0,0 @@ -beConstructedWith(array(42)); - } - - function it_is_promise() - { - $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_returns_value_it_was_constructed_with($object, $method) - { - $this->execute(array(), $object, $method)->shouldReturn(42); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_always_returns_last_value_left_in_the_return_values($object, $method) - { - $this->execute(array(), $object, $method)->shouldReturn(42); - $this->execute(array(), $object, $method)->shouldReturn(42); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_consequently_returns_multiple_values_it_was_constructed_with($object, $method) - { - $this->beConstructedWith(array(42, 24, 12)); - - $this->execute(array(), $object, $method)->shouldReturn(42); - $this->execute(array(), $object, $method)->shouldReturn(24); - $this->execute(array(), $object, $method)->shouldReturn(12); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_returns_null_if_constructed_with_empty_array($object, $method) - { - $this->beConstructedWith(array()); - - $this->execute(array(), $object, $method)->shouldReturn(null); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php deleted file mode 100644 index 5f448979..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php +++ /dev/null @@ -1,58 +0,0 @@ -beConstructedWith('RuntimeException'); - } - - function it_is_promise() - { - $this->shouldBeAnInstanceOf('Prophecy\Promise\PromiseInterface'); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_instantiates_and_throws_exception_from_provided_classname($object, $method) - { - $this->beConstructedWith('InvalidArgumentException'); - - $this->shouldThrow('InvalidArgumentException') - ->duringExecute(array(), $object, $method); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_instantiates_exceptions_with_required_arguments($object, $method) - { - $this->beConstructedWith('spec\Prophecy\Promise\RequiredArgumentException'); - - $this->shouldThrow('spec\Prophecy\Promise\RequiredArgumentException') - ->duringExecute(array(), $object, $method); - } - - /** - * @param \Prophecy\Prophecy\ObjectProphecy $object - * @param \Prophecy\Prophecy\MethodProphecy $method - */ - function it_throws_provided_exception($object, $method) - { - $this->beConstructedWith($exc = new \RuntimeException('Some exception')); - - $this->shouldThrow($exc)->duringExecute(array(), $object, $method); - } -} - -class RequiredArgumentException extends \Exception -{ - final public function __construct($message, $code) {} -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php deleted file mode 100644 index 41ee8cde..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php +++ /dev/null @@ -1,384 +0,0 @@ -reveal()->willReturn($reflection); - - $this->beConstructedWith($objectProphecy, 'getName', null); - } - - function it_is_initializable() - { - $this->shouldHaveType('Prophecy\Prophecy\MethodProphecy'); - } - - function its_constructor_throws_MethodNotFoundException_for_unexisting_method($objectProphecy) - { - $this->shouldThrow('Prophecy\Exception\Doubler\MethodNotFoundException')->during( - '__construct', array($objectProphecy, 'getUnexisting', null) - ); - } - - /** - * @param ClassWithFinalMethod $subject - */ - function its_constructor_throws_MethodProphecyException_for_final_methods($objectProphecy, $subject) - { - $objectProphecy->reveal()->willReturn($subject); - - $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->during( - '__construct', array($objectProphecy, 'finalMethod', null) - ); - } - - function its_constructor_transforms_array_passed_as_3rd_argument_to_ArgumentsWildcard( - $objectProphecy - ) - { - $this->beConstructedWith($objectProphecy, 'getName', array(42, 33)); - - $wildcard = $this->getArgumentsWildcard(); - $wildcard->shouldNotBe(null); - $wildcard->__toString()->shouldReturn('exact(42), exact(33)'); - } - - function its_constructor_does_not_touch_third_argument_if_it_is_null($objectProphecy) - { - $this->beConstructedWith($objectProphecy, 'getName', null); - - $wildcard = $this->getArgumentsWildcard(); - $wildcard->shouldBe(null); - } - - /** - * @param \Prophecy\Promise\PromiseInterface $promise - */ - function it_records_promise_through_will_method($promise, $objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->will($promise); - $this->getPromise()->shouldReturn($promise); - } - - /** - * @param \Prophecy\Promise\PromiseInterface $promise - */ - function it_adds_itself_to_ObjectProphecy_during_call_to_will($objectProphecy, $promise) - { - $objectProphecy->addMethodProphecy($this)->shouldBeCalled(); - - $this->will($promise); - } - - function it_adds_ReturnPromise_during_willReturn_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willReturn(42); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnPromise'); - } - - function it_adds_ThrowPromise_during_willThrow_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willThrow('RuntimeException'); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ThrowPromise'); - } - - function it_adds_ReturnArgumentPromise_during_willReturnArgument_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willReturnArgument(); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise'); - } - - function it_adds_ReturnArgumentPromise_during_willReturnArgument_call_with_index_argument($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->willReturnArgument(1); - $promise = $this->getPromise(); - $promise->shouldBeAnInstanceOf('Prophecy\Promise\ReturnArgumentPromise'); - $promise->execute(array('one', 'two'), $objectProphecy, $this)->shouldReturn('two'); - } - - function it_adds_CallbackPromise_during_will_call_with_callback_argument($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $callback = function () {}; - - $this->will($callback); - $this->getPromise()->shouldBeAnInstanceOf('Prophecy\Promise\CallbackPromise'); - } - - /** - * @param \Prophecy\Prediction\PredictionInterface $prediction - */ - function it_records_prediction_through_should_method($prediction, $objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('should', array($prediction)); - $this->getPrediction()->shouldReturn($prediction); - } - - function it_adds_CallbackPrediction_during_should_call_with_callback_argument($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $callback = function () {}; - - $this->callOnWrappedObject('should', array($callback)); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallbackPrediction'); - } - - /** - * @param \Prophecy\Prediction\PredictionInterface $prediction - */ - function it_adds_itself_to_ObjectProphecy_during_call_to_should($objectProphecy, $prediction) - { - $objectProphecy->addMethodProphecy($this)->shouldBeCalled(); - - $this->callOnWrappedObject('should', array($prediction)); - } - - function it_adds_CallPrediction_during_shouldBeCalled_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('shouldBeCalled', array()); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallPrediction'); - } - - function it_adds_NoCallsPrediction_during_shouldNotBeCalled_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('shouldNotBeCalled', array()); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\NoCallsPrediction'); - } - - function it_adds_CallTimesPrediction_during_shouldBeCalledTimes_call($objectProphecy) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->callOnWrappedObject('shouldBeCalledTimes', array(5)); - $this->getPrediction()->shouldBeAnInstanceOf('Prophecy\Prediction\CallTimesPrediction'); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - * @param \Prophecy\Prediction\PredictionInterface $prediction - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - */ - function it_checks_prediction_via_shouldHave_method_call( - $objectProphecy, $arguments, $prediction, $call1, $call2 - ) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction)); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - * @param \Prophecy\Prediction\PredictionInterface $prediction - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - */ - function it_sets_return_promise_during_shouldHave_call_if_none_was_set_before( - $objectProphecy, $arguments, $prediction, $call1, $call2 - ) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction)); - - $this->getPromise()->shouldReturnAnInstanceOf('Prophecy\Promise\ReturnPromise'); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - * @param \Prophecy\Prediction\PredictionInterface $prediction - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - * @param \Prophecy\Promise\PromiseInterface $promise - */ - function it_does_not_set_return_promise_during_shouldHave_call_if_it_was_set_before( - $objectProphecy, $arguments, $prediction, $call1, $call2, $promise - ) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->will($promise); - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction)); - - $this->getPromise()->shouldReturn($promise); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - * @param \Prophecy\Prediction\PredictionInterface $prediction1 - * @param \Prophecy\Prediction\PredictionInterface $prediction2 - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - * @param \Prophecy\Promise\PromiseInterface $promise - */ - function it_records_checked_predictions( - $objectProphecy, $arguments, $prediction1, $prediction2, $call1, $call2, $promise - ) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction1->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn(); - $prediction2->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willReturn(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->will($promise); - $this->withArguments($arguments); - $this->callOnWrappedObject('shouldHave', array($prediction1)); - $this->callOnWrappedObject('shouldHave', array($prediction2)); - - $this->getCheckedPredictions()->shouldReturn(array($prediction1, $prediction2)); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - * @param \Prophecy\Prediction\PredictionInterface $prediction - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - * @param \Prophecy\Promise\PromiseInterface $promise - */ - function it_records_even_failed_checked_predictions( - $objectProphecy, $arguments, $prediction, $call1, $call2, $promise - ) - { - $objectProphecy->addMethodProphecy($this)->willReturn(null); - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->willThrow(new \RuntimeException()); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->will($promise); - $this->withArguments($arguments); - - try { - $this->callOnWrappedObject('shouldHave', array($prediction)); - } catch (\Exception $e) {} - - $this->getCheckedPredictions()->shouldReturn(array($prediction)); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - * @param \Prophecy\Prediction\PredictionInterface $prediction - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - */ - function it_checks_prediction_via_shouldHave_method_call_with_callback( - $objectProphecy, $arguments, $prediction, $call1, $call2 - ) - { - $callback = function ($calls, $object, $method) { - throw new \RuntimeException; - }; - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - - $this->withArguments($arguments); - $this->shouldThrow('RuntimeException')->duringShouldHave($callback); - } - - function it_does_nothing_during_checkPrediction_if_no_prediction_set() - { - $this->checkPrediction()->shouldReturn(null); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - * @param \Prophecy\Prediction\PredictionInterface $prediction - * @param \Prophecy\Call\Call $call1 - * @param \Prophecy\Call\Call $call2 - */ - function it_checks_set_prediction_during_checkPrediction( - $objectProphecy, $arguments, $prediction, $call1, $call2 - ) - { - $prediction->check(array($call1, $call2), $objectProphecy->getWrappedObject(), $this)->shouldBeCalled(); - $objectProphecy->findProphecyMethodCalls('getName', $arguments)->willReturn(array($call1, $call2)); - $objectProphecy->addMethodProphecy($this)->willReturn(null); - - $this->withArguments($arguments); - $this->callOnWrappedObject('should', array($prediction)); - $this->checkPrediction(); - } - - function it_links_back_to_ObjectProphecy_through_getter($objectProphecy) - { - $this->getObjectProphecy()->shouldReturn($objectProphecy); - } - - function it_has_MethodName() - { - $this->getMethodName()->shouldReturn('getName'); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $wildcard - */ - function it_contains_ArgumentsWildcard_it_was_constructed_with($objectProphecy, $wildcard) - { - $this->beConstructedWith($objectProphecy, 'getName', $wildcard); - - $this->getArgumentsWildcard()->shouldReturn($wildcard); - } - - /** - * @param \Prophecy\Argument\ArgumentsWildcard $wildcard - */ - function its_ArgumentWildcard_is_mutable_through_setter($wildcard) - { - $this->withArguments($wildcard); - - $this->getArgumentsWildcard()->shouldReturn($wildcard); - } - - function its_withArguments_transforms_passed_array_into_ArgumentsWildcard() - { - $this->withArguments(array(42, 33)); - - $wildcard = $this->getArgumentsWildcard(); - $wildcard->shouldNotBe(null); - $wildcard->__toString()->shouldReturn('exact(42), exact(33)'); - } - - function its_withArguments_throws_exception_if_wrong_arguments_provided() - { - $this->shouldThrow('Prophecy\Exception\InvalidArgumentException')->duringWithArguments(42); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php deleted file mode 100644 index 7e249d9b..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php +++ /dev/null @@ -1,319 +0,0 @@ -beConstructedWith($lazyDouble); - - $lazyDouble->getInstance()->willReturn($double); - } - - function it_implements_ProphecyInterface() - { - $this->shouldBeAnInstanceOf('Prophecy\Prophecy\ProphecyInterface'); - } - - function it_sets_parentClass_during_willExtend_call($lazyDouble) - { - $lazyDouble->setParentClass('123')->shouldBeCalled(); - - $this->willExtend('123'); - } - - function it_adds_interface_during_willImplement_call($lazyDouble) - { - $lazyDouble->addInterface('222')->shouldBeCalled(); - - $this->willImplement('222'); - } - - function it_sets_constructor_arguments_during_willBeConstructedWith_call($lazyDouble) - { - $lazyDouble->setArguments(array(1, 2, 5))->shouldBeCalled(); - - $this->willBeConstructedWith(array(1, 2, 5)); - } - - function it_does_not_have_method_prophecies_by_default() - { - $this->getMethodProphecies()->shouldHaveCount(0); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $method1 - * @param \Prophecy\Prophecy\MethodProphecy $method2 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments - */ - function it_should_get_method_prophecies_by_method_name($method1, $method2, $arguments) - { - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments); - $method2->getMethodName()->willReturn('setName'); - $method2->getArgumentsWildcard()->willReturn($arguments); - - $this->addMethodProphecy($method1); - $this->addMethodProphecy($method2); - - $methods = $this->getMethodProphecies('setName'); - $methods->shouldHaveCount(1); - $methods[0]->getMethodName()->shouldReturn('setName'); - } - - function it_should_return_empty_array_if_no_method_prophecies_found() - { - $methods = $this->getMethodProphecies('setName'); - $methods->shouldHaveCount(0); - } - - /** - * @param \Prophecy\Call\CallCenter $callCenter - */ - function it_should_proxy_makeProphecyMethodCall_to_CallCenter($lazyDouble, $callCenter) - { - $this->beConstructedWith($lazyDouble, $callCenter); - - $callCenter->makeCall($this->getWrappedObject(), 'setName', array('everzet'))->willReturn(42); - - $this->makeProphecyMethodCall('setName', array('everzet'))->shouldReturn(42); - } - - /** - * @param \Prophecy\Call\CallCenter $callCenter - * @param \Prophecy\Prophecy\RevealerInterface $revealer - */ - function it_should_reveal_arguments_and_return_values_from_callCenter( - $lazyDouble, $callCenter, $revealer - ) - { - $this->beConstructedWith($lazyDouble, $callCenter, $revealer); - - $revealer->reveal(array('question'))->willReturn(array('life')); - $revealer->reveal('answer')->willReturn(42); - - $callCenter->makeCall($this->getWrappedObject(), 'setName', array('life'))->willReturn('answer'); - - $this->makeProphecyMethodCall('setName', array('question'))->shouldReturn(42); - } - - /** - * @param \Prophecy\Call\CallCenter $callCenter - * @param \Prophecy\Argument\ArgumentsWildcard $wildcard - * @param \Prophecy\Call\Call $call - */ - function it_should_proxy_getProphecyMethodCalls_to_CallCenter( - $lazyDouble, $callCenter, $wildcard, $call - ) - { - $this->beConstructedWith($lazyDouble, $callCenter); - - $callCenter->findCalls('setName', $wildcard)->willReturn(array($call)); - - $this->findProphecyMethodCalls('setName', $wildcard)->shouldReturn(array($call)); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy - * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard - */ - function its_addMethodProphecy_adds_method_prophecy( - $methodProphecy, $argumentsWildcard - ) - { - $methodProphecy->getArgumentsWildcard()->willReturn($argumentsWildcard); - $methodProphecy->getMethodName()->willReturn('getUsername'); - - $this->addMethodProphecy($methodProphecy); - - $this->getMethodProphecies()->shouldReturn(array( - 'getUsername' => array($methodProphecy) - )); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1 - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2 - * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1 - * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2 - */ - function its_addMethodProphecy_handles_prophecies_with_different_arguments( - $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2 - ) - { - $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); - $methodProphecy1->getMethodName()->willReturn('getUsername'); - - $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); - $methodProphecy2->getMethodName()->willReturn('getUsername'); - - $this->addMethodProphecy($methodProphecy1); - $this->addMethodProphecy($methodProphecy2); - - $this->getMethodProphecies()->shouldReturn(array( - 'getUsername' => array( - $methodProphecy1, - $methodProphecy2, - ) - )); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1 - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2 - * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1 - * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2 - */ - function its_addMethodProphecy_handles_prophecies_for_different_methods( - $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2 - ) - { - $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); - $methodProphecy1->getMethodName()->willReturn('getUsername'); - - $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); - $methodProphecy2->getMethodName()->willReturn('isUsername'); - - $this->addMethodProphecy($methodProphecy1); - $this->addMethodProphecy($methodProphecy2); - - $this->getMethodProphecies()->shouldReturn(array( - 'getUsername' => array( - $methodProphecy1 - ), - 'isUsername' => array( - $methodProphecy2 - ) - )); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy - */ - function its_addMethodProphecy_throws_exception_when_method_has_no_ArgumentsWildcard( - $methodProphecy - ) - { - $methodProphecy->getArgumentsWildcard()->willReturn(null); - $methodProphecy->getObjectProphecy()->willReturn($this); - $methodProphecy->getMethodName()->willReturn('getTitle'); - - $this->shouldThrow('Prophecy\Exception\Prophecy\MethodProphecyException')->duringAddMethodProphecy( - $methodProphecy - ); - } - - function it_returns_null_after_checkPredictions_call_if_there_is_no_method_prophecies() - { - $this->checkProphecyMethodsPredictions()->shouldReturn(null); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy1 - * @param \Prophecy\Prophecy\MethodProphecy $methodProphecy2 - * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard1 - * @param \Prophecy\Argument\ArgumentsWildcard $argumentsWildcard2 - */ - function it_throws_AggregateException_during_checkPredictions_if_predictions_fail( - $methodProphecy1, $methodProphecy2, $argumentsWildcard1, $argumentsWildcard2 - ) - { - $methodProphecy1->getMethodName()->willReturn('getName'); - $methodProphecy1->getArgumentsWildcard()->willReturn($argumentsWildcard1); - $methodProphecy1->checkPrediction() - ->willThrow('Prophecy\Exception\Prediction\AggregateException'); - - $methodProphecy2->getMethodName()->willReturn('setName'); - $methodProphecy2->getArgumentsWildcard()->willReturn($argumentsWildcard2); - $methodProphecy2->checkPrediction() - ->willThrow('Prophecy\Exception\Prediction\AggregateException'); - - $this->addMethodProphecy($methodProphecy1); - $this->addMethodProphecy($methodProphecy2); - - $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException') - ->duringCheckProphecyMethodsPredictions(); - } - - /** - * @param \Prophecy\Doubler\Doubler $doubler - * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection - */ - function it_returns_new_MethodProphecy_instance_for_arbitrary_call($doubler, $reflection) - { - $doubler->double(Argument::any())->willReturn($reflection); - - $return = $this->getProphecy(); - $return->shouldBeAnInstanceOf('Prophecy\Prophecy\MethodProphecy'); - $return->getMethodName()->shouldReturn('getProphecy'); - } - - /** - * @param \Prophecy\Doubler\Doubler $doubler - * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection - */ - function it_returns_same_MethodProphecy_for_same_registered_signature($doubler, $reflection) - { - $doubler->double(Argument::any())->willReturn($reflection); - - $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3)); - $methodProphecy2 = $this->getProphecy(1, 2, 3); - - $methodProphecy2->shouldBe($methodProphecy1); - } - - /** - * @param \Prophecy\Doubler\Doubler $doubler - * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection - */ - function it_returns_new_MethodProphecy_for_different_signatures($doubler, $reflection) - { - $doubler->double(Argument::any())->willReturn($reflection); - - $value = new ObjectProphecySpecFixtureB('ABC'); - $value2 = new ObjectProphecySpecFixtureB('CBA'); - - $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(1, 2, 3, $value)); - $methodProphecy2 = $this->getProphecy(1, 2, 3, $value2); - - $methodProphecy2->shouldNotBe($methodProphecy1); - } - - /** - * @param \Prophecy\Doubler\Doubler $doubler - * @param \Prophecy\Prophecy\ProphecySubjectInterface $reflection - */ - function it_returns_new_MethodProphecy_for_all_callback_signatures($doubler, $reflection) - { - $doubler->double(Argument::any())->willReturn($reflection); - - $this->addMethodProphecy($methodProphecy1 = $this->getProphecy(function(){})); - $methodProphecy2 = $this->getProphecy(function(){}); - - $methodProphecy2->shouldNotBe($methodProphecy1); - } -} - -class ObjectProphecySpecFixtureA -{ - public $errors; -} - -class ObjectProphecySpecFixtureB extends ObjectProphecySpecFixtureA -{ - public $errors; - public $value = null; - - public function __construct($value) - { - $this->value = $value; - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php deleted file mode 100644 index 4d83d739..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php +++ /dev/null @@ -1,51 +0,0 @@ -shouldBeAnInstanceOf('Prophecy\Prophecy\RevealerInterface'); - } - - /** - * @param \Prophecy\Prophecy\ProphecyInterface $prophecy - * @param \stdClass $object - */ - function it_reveals_single_instance_of_ProphecyInterface($prophecy, $object) - { - $prophecy->reveal()->willReturn($object); - - $this->reveal($prophecy)->shouldReturn($object); - } - - /** - * @param \Prophecy\Prophecy\ProphecyInterface $prophecy1 - * @param \Prophecy\Prophecy\ProphecyInterface $prophecy2 - * @param \stdClass $object1 - * @param \stdClass $object2 - */ - function it_reveals_instances_of_ProphecyInterface_inside_array( - $prophecy1, $prophecy2, $object1, $object2 - ) - { - $prophecy1->reveal()->willReturn($object1); - $prophecy2->reveal()->willReturn($object2); - - $this->reveal(array( - array('item' => $prophecy2), - $prophecy1 - ))->shouldReturn(array( - array('item' => $object2), - $object1 - )); - } - - function it_does_not_touch_non_prophecy_interface() - { - $this->reveal(42)->shouldReturn(42); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php deleted file mode 100644 index 74d5976a..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php +++ /dev/null @@ -1,91 +0,0 @@ -double(null, array())->willReturn($double); - - $this->beConstructedWith($doubler); - } - - function it_constructs_new_prophecy_on_prophesize_call() - { - $prophecy = $this->prophesize(); - $prophecy->shouldBeAnInstanceOf('Prophecy\Prophecy\ObjectProphecy'); - } - - /** - * @param \Prophecy\Prophecy\ProphecySubjectInterface $newDouble - */ - function it_constructs_new_prophecy_with_parent_class_if_specified($doubler, $newDouble) - { - $doubler->double(Argument::any(), array())->willReturn($newDouble); - - $this->prophesize('Prophecy\Prophet')->reveal()->shouldReturn($newDouble); - } - - /** - * @param \Prophecy\Prophecy\ProphecySubjectInterface $newDouble - */ - function it_constructs_new_prophecy_with_interface_if_specified($doubler, $newDouble) - { - $doubler->double(null, Argument::any())->willReturn($newDouble); - - $this->prophesize('ArrayAccess')->reveal()->shouldReturn($newDouble); - } - - function it_exposes_all_created_prophecies_through_getter() - { - $prophecy1 = $this->prophesize(); - $prophecy2 = $this->prophesize(); - - $this->getProphecies()->shouldReturn(array($prophecy1, $prophecy2)); - } - - function it_does_nothing_during_checkPredictions_call_if_no_predictions_defined() - { - $this->checkPredictions()->shouldReturn(null); - } - - /** - * @param \Prophecy\Prophecy\MethodProphecy $method1 - * @param \Prophecy\Prophecy\MethodProphecy $method2 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments1 - * @param \Prophecy\Argument\ArgumentsWildcard $arguments2 - */ - function it_throws_AggregateException_if_defined_predictions_fail( - $method1, $method2, $arguments1, $arguments2 - ) - { - $method1->getMethodName()->willReturn('getName'); - $method1->getArgumentsWildcard()->willReturn($arguments1); - $method1->checkPrediction()->willReturn(null); - - $method2->getMethodName()->willReturn('isSet'); - $method2->getArgumentsWildcard()->willReturn($arguments2); - $method2->checkPrediction()->willThrow( - 'Prophecy\Exception\Prediction\AggregateException' - ); - - $this->prophesize()->addMethodProphecy($method1); - $this->prophesize()->addMethodProphecy($method2); - - $this->shouldThrow('Prophecy\Exception\Prediction\AggregateException') - ->duringCheckPredictions(); - } - - function it_exposes_doubler_through_getter($doubler) - { - $this->getDoubler()->shouldReturn($doubler); - } -} diff --git a/server/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php b/server/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php deleted file mode 100644 index a4eef59f..00000000 --- a/server/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php +++ /dev/null @@ -1,97 +0,0 @@ -stringify(42)->shouldReturn('42'); - } - - function it_generates_proper_string_representation_for_string() - { - $this->stringify('some string')->shouldReturn('"some string"'); - } - - function it_generates_single_line_representation_for_multiline_string() - { - $this->stringify("some\nstring")->shouldReturn('"some\\nstring"'); - } - - function it_generates_proper_string_representation_for_double() - { - $this->stringify(42.3)->shouldReturn('42.3'); - } - - function it_generates_proper_string_representation_for_boolean_true() - { - $this->stringify(true)->shouldReturn('true'); - } - - function it_generates_proper_string_representation_for_boolean_false() - { - $this->stringify(false)->shouldReturn('false'); - } - - function it_generates_proper_string_representation_for_null() - { - $this->stringify(null)->shouldReturn('null'); - } - - function it_generates_proper_string_representation_for_empty_array() - { - $this->stringify(array())->shouldReturn('[]'); - } - - function it_generates_proper_string_representation_for_array() - { - $this->stringify(array('zet', 42))->shouldReturn('["zet", 42]'); - } - - function it_generates_proper_string_representation_for_hash_containing_one_value() - { - $this->stringify(array('ever' => 'zet'))->shouldReturn('["ever" => "zet"]'); - } - - function it_generates_proper_string_representation_for_hash() - { - $this->stringify(array('ever' => 'zet', 52 => 'hey', 'num' => 42))->shouldReturn( - '["ever" => "zet", 52 => "hey", "num" => 42]' - ); - } - - function it_generates_proper_string_representation_for_resource() - { - $resource = fopen(__FILE__, 'r'); - $this->stringify($resource)->shouldReturn('stream:'.$resource); - } - - /** - * @param \stdClass $object - */ - function it_generates_proper_string_representation_for_object($object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ) . " Object (\n 'objectProphecy' => Prophecy\Prophecy\ObjectProphecy Object (*Prophecy*)\n)"; - - $this->stringify($object)->shouldReturn("$objHash"); - } - - /** - * @param stdClass $object - */ - function it_generates_proper_string_representation_for_object_without_exporting($object) - { - $objHash = sprintf('%s:%s', - get_class($object->getWrappedObject()), - spl_object_hash($object->getWrappedObject()) - ); - - $this->stringify($object, false)->shouldReturn("$objHash"); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument.php deleted file mode 100644 index f2b33648..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument.php +++ /dev/null @@ -1,198 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy; - -use Prophecy\Argument\Token; - -/** - * Argument tokens shortcuts. - * - * @author Konstantin Kudryashov - */ -class Argument -{ - /** - * Checks that argument is exact value or object. - * - * @param mixed $value - * - * @return Token\ExactValueToken - */ - public static function exact($value) - { - return new Token\ExactValueToken($value); - } - - /** - * Checks that argument is of specific type or instance of specific class. - * - * @param string $type Type name (`integer`, `string`) or full class name - * - * @return Token\TypeToken - */ - public static function type($type) - { - return new Token\TypeToken($type); - } - - /** - * Checks that argument object has specific state. - * - * @param string $methodName - * @param mixed $value - * - * @return Token\ObjectStateToken - */ - public static function which($methodName, $value) - { - return new Token\ObjectStateToken($methodName, $value); - } - - /** - * Checks that argument matches provided callback. - * - * @param callable $callback - * - * @return Token\CallbackToken - */ - public static function that($callback) - { - return new Token\CallbackToken($callback); - } - - /** - * Matches any single value. - * - * @return Token\AnyValueToken - */ - public static function any() - { - return new Token\AnyValueToken; - } - - /** - * Matches all values to the rest of the signature. - * - * @return Token\AnyValuesToken - */ - public static function cetera() - { - return new Token\AnyValuesToken; - } - - /** - * Checks that argument matches all tokens - * - * @param mixed ... a list of tokens - * - * @return Token\LogicalAndToken - */ - public static function allOf() - { - return new Token\LogicalAndToken(func_get_args()); - } - - /** - * Checks that argument array or countable object has exact number of elements. - * - * @param integer $value array elements count - * - * @return Token\ArrayCountToken - */ - public static function size($value) - { - return new Token\ArrayCountToken($value); - } - - /** - * Checks that argument array contains (key, value) pair - * - * @param mixed $key exact value or token - * @param mixed $value exact value or token - * - * @return Token\ArrayEntryToken - */ - public static function withEntry($key, $value) - { - return new Token\ArrayEntryToken($key, $value); - } - - /** - * Checks that arguments array entries all match value - * - * @param mixed $value - * - * @return Token\ArrayEveryEntryToken - */ - public static function withEveryEntry($value) - { - return new Token\ArrayEveryEntryToken($value); - } - - /** - * Checks that argument array contains value - * - * @param mixed $value - * - * @return Token\ArrayEntryToken - */ - public static function containing($value) - { - return new Token\ArrayEntryToken(self::any(), $value); - } - - /** - * Checks that argument array has key - * - * @param mixed $key exact value or token - * - * @return Token\ArrayEntryToken - */ - public static function withKey($key) - { - return new Token\ArrayEntryToken($key, self::any()); - } - - /** - * Checks that argument does not match the value|token. - * - * @param mixed $value either exact value or argument token - * - * @return Token\LogicalNotToken - */ - public static function not($value) - { - return new Token\LogicalNotToken($value); - } - - /** - * @param string $value - * - * @return Token\StringContainsToken - */ - public static function containingString($value) - { - return new Token\StringContainsToken($value); - } - - /** - * Checks that argument is identical value. - * - * @param mixed $value - * - * @return Token\IdenticalValueToken - */ - public static function is($value) - { - return new Token\IdenticalValueToken($value); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php deleted file mode 100644 index a088f21d..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php +++ /dev/null @@ -1,101 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument; - -/** - * Arguments wildcarding. - * - * @author Konstantin Kudryashov - */ -class ArgumentsWildcard -{ - /** - * @var Token\TokenInterface[] - */ - private $tokens = array(); - private $string; - - /** - * Initializes wildcard. - * - * @param array $arguments Array of argument tokens or values - */ - public function __construct(array $arguments) - { - foreach ($arguments as $argument) { - if (!$argument instanceof Token\TokenInterface) { - $argument = new Token\ExactValueToken($argument); - } - - $this->tokens[] = $argument; - } - } - - /** - * Calculates wildcard match score for provided arguments. - * - * @param array $arguments - * - * @return false|int False OR integer score (higher - better) - */ - public function scoreArguments(array $arguments) - { - if (0 == count($arguments) && 0 == count($this->tokens)) { - return 1; - } - - $arguments = array_values($arguments); - $totalScore = 0; - foreach ($this->tokens as $i => $token) { - $argument = isset($arguments[$i]) ? $arguments[$i] : null; - if (1 >= $score = $token->scoreArgument($argument)) { - return false; - } - - $totalScore += $score; - - if (true === $token->isLast()) { - return $totalScore; - } - } - - if (count($arguments) > count($this->tokens)) { - return false; - } - - return $totalScore; - } - - /** - * Returns string representation for wildcard. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = implode(', ', array_map(function ($token) { - return (string) $token; - }, $this->tokens)); - } - - return $this->string; - } - - /** - * @return array - */ - public function getTokens() - { - return $this->tokens; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php deleted file mode 100644 index 50988112..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Any single value token. - * - * @author Konstantin Kudryashov - */ -class AnyValueToken implements TokenInterface -{ - /** - * Always scores 3 for any argument. - * - * @param $argument - * - * @return int - */ - public function scoreArgument($argument) - { - return 3; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return '*'; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php deleted file mode 100644 index f76b17bc..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Any values token. - * - * @author Konstantin Kudryashov - */ -class AnyValuesToken implements TokenInterface -{ - /** - * Always scores 2 for any argument. - * - * @param $argument - * - * @return int - */ - public function scoreArgument($argument) - { - return 2; - } - - /** - * Returns true to stop wildcard from processing other tokens. - * - * @return bool - */ - public function isLast() - { - return true; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return '* [, ...]'; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php deleted file mode 100644 index 96b4befd..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php +++ /dev/null @@ -1,86 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Array elements count token. - * - * @author Boris Mikhaylov - */ - -class ArrayCountToken implements TokenInterface -{ - private $count; - - /** - * @param integer $value - */ - public function __construct($value) - { - $this->count = $value; - } - - /** - * Scores 6 when argument has preset number of elements. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return $this->isCountable($argument) && $this->hasProperCount($argument) ? 6 : false; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('count(%s)', $this->count); - } - - /** - * Returns true if object is either array or instance of \Countable - * - * @param $argument - * @return bool - */ - private function isCountable($argument) - { - return (is_array($argument) || $argument instanceof \Countable); - } - - /** - * Returns true if $argument has expected number of elements - * - * @param array|\Countable $argument - * - * @return bool - */ - private function hasProperCount($argument) - { - return $this->count === count($argument); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php deleted file mode 100644 index 0305fc72..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php +++ /dev/null @@ -1,143 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Array entry token. - * - * @author Boris Mikhaylov - */ -class ArrayEntryToken implements TokenInterface -{ - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $key; - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $value; - - /** - * @param mixed $key exact value or token - * @param mixed $value exact value or token - */ - public function __construct($key, $value) - { - $this->key = $this->wrapIntoExactValueToken($key); - $this->value = $this->wrapIntoExactValueToken($value); - } - - /** - * Scores half of combined scores from key and value tokens for same entry. Capped at 8. - * If argument implements \ArrayAccess without \Traversable, then key token is restricted to ExactValueToken. - * - * @param array|\ArrayAccess|\Traversable $argument - * - * @throws \Prophecy\Exception\InvalidArgumentException - * @return bool|int - */ - public function scoreArgument($argument) - { - if ($argument instanceof \Traversable) { - $argument = iterator_to_array($argument); - } - - if ($argument instanceof \ArrayAccess) { - $argument = $this->convertArrayAccessToEntry($argument); - } - - if (!is_array($argument) || empty($argument)) { - return false; - } - - $keyScores = array_map(array($this->key,'scoreArgument'), array_keys($argument)); - $valueScores = array_map(array($this->value,'scoreArgument'), $argument); - $scoreEntry = function ($value, $key) { - return $value && $key ? min(8, ($key + $value) / 2) : false; - }; - - return max(array_map($scoreEntry, $valueScores, $keyScores)); - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('[..., %s => %s, ...]', $this->key, $this->value); - } - - /** - * Returns key - * - * @return TokenInterface - */ - public function getKey() - { - return $this->key; - } - - /** - * Returns value - * - * @return TokenInterface - */ - public function getValue() - { - return $this->value; - } - - /** - * Wraps non token $value into ExactValueToken - * - * @param $value - * @return TokenInterface - */ - private function wrapIntoExactValueToken($value) - { - return $value instanceof TokenInterface ? $value : new ExactValueToken($value); - } - - /** - * Converts instance of \ArrayAccess to key => value array entry - * - * @param \ArrayAccess $object - * - * @return array|null - * @throws \Prophecy\Exception\InvalidArgumentException - */ - private function convertArrayAccessToEntry(\ArrayAccess $object) - { - if (!$this->key instanceof ExactValueToken) { - throw new InvalidArgumentException(sprintf( - 'You can only use exact value tokens to match key of ArrayAccess object'.PHP_EOL. - 'But you used `%s`.', - $this->key - )); - } - - $key = $this->key->getValue(); - - return $object->offsetExists($key) ? array($key => $object[$key]) : array(); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php deleted file mode 100644 index 5d41fa48..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php +++ /dev/null @@ -1,82 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Array every entry token. - * - * @author Adrien Brault - */ -class ArrayEveryEntryToken implements TokenInterface -{ - /** - * @var TokenInterface - */ - private $value; - - /** - * @param mixed $value exact value or token - */ - public function __construct($value) - { - if (!$value instanceof TokenInterface) { - $value = new ExactValueToken($value); - } - - $this->value = $value; - } - - /** - * {@inheritdoc} - */ - public function scoreArgument($argument) - { - if (!$argument instanceof \Traversable && !is_array($argument)) { - return false; - } - - $scores = array(); - foreach ($argument as $key => $argumentEntry) { - $scores[] = $this->value->scoreArgument($argumentEntry); - } - - if (empty($scores) || in_array(false, $scores, true)) { - return false; - } - - return array_sum($scores) / count($scores); - } - - /** - * {@inheritdoc} - */ - public function isLast() - { - return false; - } - - /** - * {@inheritdoc} - */ - public function __toString() - { - return sprintf('[%s, ..., %s]', $this->value, $this->value); - } - - /** - * @return TokenInterface - */ - public function getValue() - { - return $this->value; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php deleted file mode 100644 index f45ba20b..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php +++ /dev/null @@ -1,75 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Callback-verified token. - * - * @author Konstantin Kudryashov - */ -class CallbackToken implements TokenInterface -{ - private $callback; - - /** - * Initializes token. - * - * @param callable $callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackToken, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Scores 7 if callback returns true, false otherwise. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return call_user_func($this->callback, $argument) ? 7 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return 'callback()'; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php deleted file mode 100644 index aa960f3f..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php +++ /dev/null @@ -1,116 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Util\StringUtil; - -/** - * Exact value token. - * - * @author Konstantin Kudryashov - */ -class ExactValueToken implements TokenInterface -{ - private $value; - private $string; - private $util; - private $comparatorFactory; - - /** - * Initializes token. - * - * @param mixed $value - * @param StringUtil $util - * @param ComparatorFactory $comparatorFactory - */ - public function __construct($value, StringUtil $util = null, ComparatorFactory $comparatorFactory = null) - { - $this->value = $value; - $this->util = $util ?: new StringUtil(); - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Scores 10 if argument matches preset value. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (is_object($argument) && is_object($this->value)) { - $comparator = $this->comparatorFactory->getComparatorFor( - $argument, $this->value - ); - - try { - $comparator->assertEquals($argument, $this->value); - return 10; - } catch (ComparisonFailure $failure) {} - } - - // If either one is an object it should be castable to a string - if (is_object($argument) xor is_object($this->value)) { - if (is_object($argument) && !method_exists($argument, '__toString')) { - return false; - } - - if (is_object($this->value) && !method_exists($this->value, '__toString')) { - return false; - } - } elseif (is_numeric($argument) && is_numeric($this->value)) { - // noop - } elseif (gettype($argument) !== gettype($this->value)) { - return false; - } - - return $argument == $this->value ? 10 : false; - } - - /** - * Returns preset value against which token checks arguments. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = sprintf('exact(%s)', $this->util->stringify($this->value)); - } - - return $this->string; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php deleted file mode 100644 index 0b6d23ab..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php +++ /dev/null @@ -1,74 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Util\StringUtil; - -/** - * Identical value token. - * - * @author Florian Voutzinos - */ -class IdenticalValueToken implements TokenInterface -{ - private $value; - private $string; - private $util; - - /** - * Initializes token. - * - * @param mixed $value - * @param StringUtil $util - */ - public function __construct($value, StringUtil $util = null) - { - $this->value = $value; - $this->util = $util ?: new StringUtil(); - } - - /** - * Scores 11 if argument matches preset value. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return $argument === $this->value ? 11 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - if (null === $this->string) { - $this->string = sprintf('identical(%s)', $this->util->stringify($this->value)); - } - - return $this->string; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php deleted file mode 100644 index 4ee1b25e..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php +++ /dev/null @@ -1,80 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Logical AND token. - * - * @author Boris Mikhaylov - */ -class LogicalAndToken implements TokenInterface -{ - private $tokens = array(); - - /** - * @param array $arguments exact values or tokens - */ - public function __construct(array $arguments) - { - foreach ($arguments as $argument) { - if (!$argument instanceof TokenInterface) { - $argument = new ExactValueToken($argument); - } - $this->tokens[] = $argument; - } - } - - /** - * Scores maximum score from scores returned by tokens for this argument if all of them score. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (0 === count($this->tokens)) { - return false; - } - - $maxScore = 0; - foreach ($this->tokens as $token) { - $score = $token->scoreArgument($argument); - if (false === $score) { - return false; - } - $maxScore = max($score, $maxScore); - } - - return $maxScore; - } - - /** - * Returns false. - * - * @return boolean - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('bool(%s)', implode(' AND ', $this->tokens)); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php deleted file mode 100644 index 623efa57..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php +++ /dev/null @@ -1,73 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Logical NOT token. - * - * @author Boris Mikhaylov - */ -class LogicalNotToken implements TokenInterface -{ - /** @var \Prophecy\Argument\Token\TokenInterface */ - private $token; - - /** - * @param mixed $value exact value or token - */ - public function __construct($value) - { - $this->token = $value instanceof TokenInterface? $value : new ExactValueToken($value); - } - - /** - * Scores 4 when preset token does not match the argument. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - return false === $this->token->scoreArgument($argument) ? 4 : false; - } - - /** - * Returns true if preset token is last. - * - * @return bool|int - */ - public function isLast() - { - return $this->token->isLast(); - } - - /** - * Returns originating token. - * - * @return TokenInterface - */ - public function getOriginatingToken() - { - return $this->token; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('not(%s)', $this->token); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php deleted file mode 100644 index 8d93bfd6..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php +++ /dev/null @@ -1,104 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Util\StringUtil; - -/** - * Object state-checker token. - * - * @author Konstantin Kudryashov - */ -class ObjectStateToken implements TokenInterface -{ - private $name; - private $value; - private $util; - private $comparatorFactory; - - /** - * Initializes token. - * - * @param string $methodName - * @param mixed $value Expected return value - * @param null|StringUtil $util - * @param ComparatorFactory $comparatorFactory - */ - public function __construct( - $methodName, - $value, - StringUtil $util = null, - ComparatorFactory $comparatorFactory = null - ) { - $this->name = $methodName; - $this->value = $value; - $this->util = $util ?: new StringUtil; - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Scores 8 if argument is an object, which method returns expected value. - * - * @param mixed $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - if (is_object($argument) && method_exists($argument, $this->name)) { - $actual = call_user_func(array($argument, $this->name)); - - $comparator = $this->comparatorFactory->getComparatorFor( - $actual, $this->value - ); - - try { - $comparator->assertEquals($actual, $this->value); - return 8; - } catch (ComparisonFailure $failure) { - return false; - } - } - - if (is_object($argument) && property_exists($argument, $this->name)) { - return $argument->{$this->name} === $this->value ? 8 : false; - } - - return false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('state(%s(), %s)', - $this->name, - $this->util->stringify($this->value) - ); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php deleted file mode 100644 index 24ff8c2e..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * String contains token. - * - * @author Peter Mitchell - */ -class StringContainsToken implements TokenInterface -{ - private $value; - - /** - * Initializes token. - * - * @param string $value - */ - public function __construct($value) - { - $this->value = $value; - } - - public function scoreArgument($argument) - { - return strpos($argument, $this->value) !== false ? 6 : false; - } - - /** - * Returns preset value against which token checks arguments. - * - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('contains("%s")', $this->value); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php deleted file mode 100644 index 625d3bad..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php +++ /dev/null @@ -1,43 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -/** - * Argument token interface. - * - * @author Konstantin Kudryashov - */ -interface TokenInterface -{ - /** - * Calculates token match score for provided argument. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument); - - /** - * Returns true if this token prevents check of other tokens (is last one). - * - * @return bool|int - */ - public function isLast(); - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString(); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php b/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php deleted file mode 100644 index cb65132c..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php +++ /dev/null @@ -1,76 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Argument\Token; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Value type token. - * - * @author Konstantin Kudryashov - */ -class TypeToken implements TokenInterface -{ - private $type; - - /** - * @param string $type - */ - public function __construct($type) - { - $checker = "is_{$type}"; - if (!function_exists($checker) && !interface_exists($type) && !class_exists($type)) { - throw new InvalidArgumentException(sprintf( - 'Type or class name expected as an argument to TypeToken, but got %s.', $type - )); - } - - $this->type = $type; - } - - /** - * Scores 5 if argument has the same type this token was constructed with. - * - * @param $argument - * - * @return bool|int - */ - public function scoreArgument($argument) - { - $checker = "is_{$this->type}"; - if (function_exists($checker)) { - return call_user_func($checker, $argument) ? 5 : false; - } - - return $argument instanceof $this->type ? 5 : false; - } - - /** - * Returns false. - * - * @return bool - */ - public function isLast() - { - return false; - } - - /** - * Returns string representation for token. - * - * @return string - */ - public function __toString() - { - return sprintf('type(%s)', $this->type); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/server/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php deleted file mode 100644 index 2f3fbadb..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php +++ /dev/null @@ -1,127 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Call; - -use Exception; - -/** - * Call object. - * - * @author Konstantin Kudryashov - */ -class Call -{ - private $methodName; - private $arguments; - private $returnValue; - private $exception; - private $file; - private $line; - - /** - * Initializes call. - * - * @param string $methodName - * @param array $arguments - * @param mixed $returnValue - * @param Exception $exception - * @param null|string $file - * @param null|int $line - */ - public function __construct($methodName, array $arguments, $returnValue, - Exception $exception = null, $file, $line) - { - $this->methodName = $methodName; - $this->arguments = $arguments; - $this->returnValue = $returnValue; - $this->exception = $exception; - - if ($file) { - $this->file = $file; - $this->line = intval($line); - } - } - - /** - * Returns called method name. - * - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * Returns called method arguments. - * - * @return array - */ - public function getArguments() - { - return $this->arguments; - } - - /** - * Returns called method return value. - * - * @return null|mixed - */ - public function getReturnValue() - { - return $this->returnValue; - } - - /** - * Returns exception that call thrown. - * - * @return null|Exception - */ - public function getException() - { - return $this->exception; - } - - /** - * Returns callee filename. - * - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * Returns callee line number. - * - * @return int - */ - public function getLine() - { - return $this->line; - } - - /** - * Returns short notation for callee place. - * - * @return string - */ - public function getCallPlace() - { - if (null === $this->file) { - return 'unknown'; - } - - return sprintf('%s:%d', $this->file, $this->line); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/server/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php deleted file mode 100644 index 74958551..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php +++ /dev/null @@ -1,152 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Call; - -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Call\UnexpectedCallException; - -/** - * Calls receiver & manager. - * - * @author Konstantin Kudryashov - */ -class CallCenter -{ - private $util; - - /** - * @var Call[] - */ - private $recordedCalls = array(); - - /** - * Initializes call center. - * - * @param StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - } - - /** - * Makes and records specific method call for object prophecy. - * - * @param ObjectProphecy $prophecy - * @param string $methodName - * @param array $arguments - * - * @return mixed Returns null if no promise for prophecy found or promise return value. - * - * @throws \Prophecy\Exception\Call\UnexpectedCallException If no appropriate method prophecy found - */ - public function makeCall(ObjectProphecy $prophecy, $methodName, array $arguments) - { - $backtrace = debug_backtrace(); - - $file = $line = null; - if (isset($backtrace[2]) && isset($backtrace[2]['file'])) { - $file = $backtrace[2]['file']; - $line = $backtrace[2]['line']; - } - - // If no method prophecies defined, then it's a dummy, so we'll just return null - if ('__destruct' === $methodName || 0 == count($prophecy->getMethodProphecies())) { - $this->recordedCalls[] = new Call($methodName, $arguments, null, null, $file, $line); - - return null; - } - - // There are method prophecies, so it's a fake/stub. Searching prophecy for this call - $matches = array(); - foreach ($prophecy->getMethodProphecies($methodName) as $methodProphecy) { - if (0 < $score = $methodProphecy->getArgumentsWildcard()->scoreArguments($arguments)) { - $matches[] = array($score, $methodProphecy); - } - } - - // If fake/stub doesn't have method prophecy for this call - throw exception - if (!count($matches)) { - throw $this->createUnexpectedCallException($prophecy, $methodName, $arguments); - } - - // Sort matches by their score value - @usort($matches, function ($match1, $match2) { return $match2[0] - $match1[0]; }); - - // If Highest rated method prophecy has a promise - execute it or return null instead - $returnValue = null; - $exception = null; - if ($promise = $matches[0][1]->getPromise()) { - try { - $returnValue = $promise->execute($arguments, $prophecy, $matches[0][1]); - } catch (\Exception $e) { - $exception = $e; - } - } - - $this->recordedCalls[] = new Call( - $methodName, $arguments, $returnValue, $exception, $file, $line - ); - - if (null !== $exception) { - throw $exception; - } - - return $returnValue; - } - - /** - * Searches for calls by method name & arguments wildcard. - * - * @param string $methodName - * @param ArgumentsWildcard $wildcard - * - * @return Call[] - */ - public function findCalls($methodName, ArgumentsWildcard $wildcard) - { - return array_values( - array_filter($this->recordedCalls, function (Call $call) use ($methodName, $wildcard) { - return $methodName === $call->getMethodName() - && 0 < $wildcard->scoreArguments($call->getArguments()) - ; - }) - ); - } - - private function createUnexpectedCallException(ObjectProphecy $prophecy, $methodName, - array $arguments) - { - $classname = get_class($prophecy->reveal()); - $argstring = implode(', ', array_map(array($this->util, 'stringify'), $arguments)); - $expected = implode("\n", array_map(function (MethodProphecy $methodProphecy) { - return sprintf(' - %s(%s)', - $methodProphecy->getMethodName(), - $methodProphecy->getArgumentsWildcard() - ); - }, call_user_func_array('array_merge', $prophecy->getMethodProphecies()))); - - return new UnexpectedCallException( - sprintf( - "Method call:\n". - " - %s(%s)\n". - "on %s was not expected, expected calls were:\n%s", - - $methodName, $argstring, $classname, $expected - ), - $prophecy, $methodName, $arguments - ); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php b/server/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php deleted file mode 100644 index 874e474c..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php +++ /dev/null @@ -1,42 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use SebastianBergmann\Comparator\Comparator; -use SebastianBergmann\Comparator\ComparisonFailure; - -/** - * Closure comparator. - * - * @author Konstantin Kudryashov - */ -final class ClosureComparator extends Comparator -{ - public function accepts($expected, $actual) - { - return is_object($expected) && $expected instanceof \Closure - && is_object($actual) && $actual instanceof \Closure; - } - - public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) - { - throw new ComparisonFailure( - $expected, - $actual, - // we don't need a diff - '', - '', - false, - 'all closures are born different' - ); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php b/server/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php deleted file mode 100644 index a7a12001..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php +++ /dev/null @@ -1,46 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Comparator; - -use SebastianBergmann\Comparator\Factory as BaseFactory; - -/** - * Prophecy comparator factory. - * - * @author Konstantin Kudryashov - */ -final class Factory extends BaseFactory -{ - /** - * @var Factory - */ - private static $instance; - - public function __construct() - { - parent::__construct(); - - $this->register(new ClosureComparator()); - } - - /** - * @return Factory - */ - public static function getInstance() - { - if (self::$instance === null) { - self::$instance = new Factory; - } - - return self::$instance; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php deleted file mode 100644 index d6b6b1a9..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php +++ /dev/null @@ -1,68 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use ReflectionClass; - -/** - * Cached class doubler. - * Prevents mirroring/creation of the same structure twice. - * - * @author Konstantin Kudryashov - */ -class CachedDoubler extends Doubler -{ - private $classes = array(); - - /** - * {@inheritdoc} - */ - public function registerClassPatch(ClassPatch\ClassPatchInterface $patch) - { - $this->classes[] = array(); - - parent::registerClassPatch($patch); - } - - /** - * {@inheritdoc} - */ - protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) - { - $classId = $this->generateClassId($class, $interfaces); - if (isset($this->classes[$classId])) { - return $this->classes[$classId]; - } - - return $this->classes[$classId] = parent::createDoubleClass($class, $interfaces); - } - - /** - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - private function generateClassId(ReflectionClass $class = null, array $interfaces) - { - $parts = array(); - if (null !== $class) { - $parts[] = $class->getName(); - } - foreach ($interfaces as $interface) { - $parts[] = $interface->getName(); - } - sort($parts); - - return md5(implode('', $parts)); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php deleted file mode 100644 index d6d19685..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php +++ /dev/null @@ -1,48 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Class patch interface. - * Class patches extend doubles functionality or help - * Prophecy to avoid some internal PHP bugs. - * - * @author Konstantin Kudryashov - */ -interface ClassPatchInterface -{ - /** - * Checks if patch supports specific class node. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node); - - /** - * Applies patch to the specific class node. - * - * @param ClassNode $node - * @return void - */ - public function apply(ClassNode $node); - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority(); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php deleted file mode 100644 index 61998fc4..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php +++ /dev/null @@ -1,72 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * Disable constructor. - * Makes all constructor arguments optional. - * - * @author Konstantin Kudryashov - */ -class DisableConstructorPatch implements ClassPatchInterface -{ - /** - * Checks if class has `__construct` method. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Makes all class constructor arguments optional. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - if (!$node->hasMethod('__construct')) { - $node->addMethod(new MethodNode('__construct', '')); - - return; - } - - $constructor = $node->getMethod('__construct'); - foreach ($constructor->getArguments() as $argument) { - $argument->setDefault(null); - } - - $constructor->setCode(<< - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Exception patch for HHVM to remove the stubs from special methods - * - * @author Christophe Coevoet - */ -class HhvmExceptionPatch implements ClassPatchInterface -{ - /** - * Supports exceptions on HHVM. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (!defined('HHVM_VERSION')) { - return false; - } - - return 'Exception' === $node->getParentClass() || is_subclass_of($node->getParentClass(), 'Exception'); - } - - /** - * Removes special exception static methods from the doubled methods. - * - * @param ClassNode $node - * - * @return void - */ - public function apply(ClassNode $node) - { - if ($node->hasMethod('setTraceOptions')) { - $node->getMethod('setTraceOptions')->useParentCode(); - } - if ($node->hasMethod('getTraceOptions')) { - $node->getMethod('getTraceOptions')->useParentCode(); - } - } - - /** - * {@inheritdoc} - */ - public function getPriority() - { - return -50; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php deleted file mode 100644 index b0d9793a..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php +++ /dev/null @@ -1,135 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * Remove method functionality from the double which will clash with php keywords. - * - * @author Milan Magudia - */ -class KeywordPatch implements ClassPatchInterface -{ - /** - * Support any class - * - * @param ClassNode $node - * - * @return boolean - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Remove methods that clash with php keywords - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $methodNames = array_keys($node->getMethods()); - $methodsToRemove = array_intersect($methodNames, $this->getKeywords()); - foreach ($methodsToRemove as $methodName) { - $node->removeMethod($methodName); - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() { - return 49; - } - - /** - * Returns array of php keywords. - * - * @return array - */ - private function getKeywords() { - - return array( - '__halt_compiler', - 'abstract', - 'and', - 'array', - 'as', - 'break', - 'callable', - 'case', - 'catch', - 'class', - 'clone', - 'const', - 'continue', - 'declare', - 'default', - 'die', - 'do', - 'echo', - 'else', - 'elseif', - 'empty', - 'enddeclare', - 'endfor', - 'endforeach', - 'endif', - 'endswitch', - 'endwhile', - 'eval', - 'exit', - 'extends', - 'final', - 'finally', - 'for', - 'foreach', - 'function', - 'global', - 'goto', - 'if', - 'implements', - 'include', - 'include_once', - 'instanceof', - 'insteadof', - 'interface', - 'isset', - 'list', - 'namespace', - 'new', - 'or', - 'print', - 'private', - 'protected', - 'public', - 'require', - 'require_once', - 'return', - 'static', - 'switch', - 'throw', - 'trait', - 'try', - 'unset', - 'use', - 'var', - 'while', - 'xor', - 'yield', - ); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php deleted file mode 100644 index da454501..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php +++ /dev/null @@ -1,73 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use phpDocumentor\Reflection\DocBlock; -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * Discover Magical API using "@method" PHPDoc format. - * - * @author Thomas Tourlourat - */ -class MagicCallPatch implements ClassPatchInterface -{ - /** - * Support any class - * - * @param ClassNode $node - * - * @return boolean - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Discover Magical API - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $parentClass = $node->getParentClass(); - $reflectionClass = new \ReflectionClass($parentClass); - - $phpdoc = new DocBlock($reflectionClass->getDocComment()); - - $tagList = $phpdoc->getTagsByName('method'); - - foreach($tagList as $tag) { - $methodName = $tag->getMethodName(); - - if (!$reflectionClass->hasMethod($methodName)) { - $methodNode = new MethodNode($tag->getMethodName()); - $methodNode->setStatic($tag->isStatic()); - - $node->addMethod($methodNode); - } - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return integer Priority number (higher - earlier) - */ - public function getPriority() - { - return 50; - } -} - diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php deleted file mode 100644 index ab0bb7c7..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php +++ /dev/null @@ -1,98 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; -use Prophecy\Doubler\Generator\Node\ArgumentNode; - -/** - * Add Prophecy functionality to the double. - * This is a core class patch for Prophecy. - * - * @author Konstantin Kudryashov - */ -class ProphecySubjectPatch implements ClassPatchInterface -{ - /** - * Always returns true. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return true; - } - - /** - * Apply Prophecy functionality to class node. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $node->addInterface('Prophecy\Prophecy\ProphecySubjectInterface'); - $node->addProperty('objectProphecy', 'private'); - - foreach ($node->getMethods() as $name => $method) { - if ('__construct' === strtolower($name)) { - continue; - } - - $method->setCode( - 'return $this->getProphecy()->makeProphecyMethodCall(__FUNCTION__, func_get_args());' - ); - } - - $prophecySetter = new MethodNode('setProphecy'); - $prophecyArgument = new ArgumentNode('prophecy'); - $prophecyArgument->setTypeHint('Prophecy\Prophecy\ProphecyInterface'); - $prophecySetter->addArgument($prophecyArgument); - $prophecySetter->setCode('$this->objectProphecy = $prophecy;'); - - $prophecyGetter = new MethodNode('getProphecy'); - $prophecyGetter->setCode('return $this->objectProphecy;'); - - if ($node->hasMethod('__call')) { - $__call = $node->getMethod('__call'); - } else { - $__call = new MethodNode('__call'); - $__call->addArgument(new ArgumentNode('name')); - $__call->addArgument(new ArgumentNode('arguments')); - - $node->addMethod($__call); - } - - $__call->setCode(<<getProphecy(), func_get_arg(0) -); -PHP - ); - - $node->addMethod($prophecySetter); - $node->addMethod($prophecyGetter); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 0; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php deleted file mode 100644 index 9166aeef..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php +++ /dev/null @@ -1,57 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -/** - * ReflectionClass::newInstance patch. - * Makes first argument of newInstance optional, since it works but signature is misleading - * - * @author Florian Klein - */ -class ReflectionClassNewInstancePatch implements ClassPatchInterface -{ - /** - * Supports ReflectionClass - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - return 'ReflectionClass' === $node->getParentClass(); - } - - /** - * Updates newInstance's first argument to make it optional - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - foreach ($node->getMethod('newInstance')->getArguments() as $argument) { - $argument->setDefault(null); - } - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher = earlier) - */ - public function getPriority() - { - return 50; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php deleted file mode 100644 index 84011598..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php +++ /dev/null @@ -1,85 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * SplFileInfo patch. - * Makes SplFileInfo and derivative classes usable with Prophecy. - * - * @author Konstantin Kudryashov - */ -class SplFileInfoPatch implements ClassPatchInterface -{ - /** - * Supports everything that extends SplFileInfo. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (null === $node->getParentClass()) { - return false; - } - - return 'SplFileInfo' === $node->getParentClass() - || is_subclass_of($node->getParentClass(), 'SplFileInfo') - ; - } - - /** - * Updated constructor code to call parent one with dummy file argument. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - if ($node->hasMethod('__construct')) { - $constructor = $node->getMethod('__construct'); - } else { - $constructor = new MethodNode('__construct'); - $node->addMethod($constructor); - } - - if ($this->nodeIsDirectoryIterator($node)) { - $constructor->setCode('return parent::__construct("' . __DIR__ . '");'); - return; - } - - $constructor->useParentCode(); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 50; - } - - /** - * @param ClassNode $node - * @return boolean - */ - private function nodeIsDirectoryIterator(ClassNode $node) - { - $parent = $node->getParentClass(); - return 'DirectoryIterator' === $parent - || is_subclass_of($parent, 'DirectoryIterator'); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php deleted file mode 100644 index eea02028..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php +++ /dev/null @@ -1,83 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\ClassPatch; - -use Prophecy\Doubler\Generator\Node\ClassNode; -use Prophecy\Doubler\Generator\Node\MethodNode; - -/** - * Traversable interface patch. - * Forces classes that implement interfaces, that extend Traversable to also implement Iterator. - * - * @author Konstantin Kudryashov - */ -class TraversablePatch implements ClassPatchInterface -{ - /** - * Supports nodetree, that implement Traversable, but not Iterator or IteratorAggregate. - * - * @param ClassNode $node - * - * @return bool - */ - public function supports(ClassNode $node) - { - if (in_array('Iterator', $node->getInterfaces())) { - return false; - } - if (in_array('IteratorAggregate', $node->getInterfaces())) { - return false; - } - - foreach ($node->getInterfaces() as $interface) { - if ('Traversable' !== $interface && !is_subclass_of($interface, 'Traversable')) { - continue; - } - if ('Iterator' === $interface || is_subclass_of($interface, 'Iterator')) { - continue; - } - if ('IteratorAggregate' === $interface || is_subclass_of($interface, 'IteratorAggregate')) { - continue; - } - - return true; - } - - return false; - } - - /** - * Forces class to implement Iterator interface. - * - * @param ClassNode $node - */ - public function apply(ClassNode $node) - { - $node->addInterface('Iterator'); - - $node->addMethod(new MethodNode('current')); - $node->addMethod(new MethodNode('key')); - $node->addMethod(new MethodNode('next')); - $node->addMethod(new MethodNode('rewind')); - $node->addMethod(new MethodNode('valid')); - } - - /** - * Returns patch priority, which determines when patch will be applied. - * - * @return int Priority number (higher - earlier) - */ - public function getPriority() - { - return 100; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php deleted file mode 100644 index 699be3a2..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -/** - * Core double interface. - * All doubled classes will implement this one. - * - * @author Konstantin Kudryashov - */ -interface DoubleInterface -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php deleted file mode 100644 index a378ae27..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php +++ /dev/null @@ -1,146 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use Doctrine\Instantiator\Instantiator; -use Prophecy\Doubler\ClassPatch\ClassPatchInterface; -use Prophecy\Doubler\Generator\ClassMirror; -use Prophecy\Doubler\Generator\ClassCreator; -use Prophecy\Exception\InvalidArgumentException; -use ReflectionClass; - -/** - * Cached class doubler. - * Prevents mirroring/creation of the same structure twice. - * - * @author Konstantin Kudryashov - */ -class Doubler -{ - private $mirror; - private $creator; - private $namer; - - /** - * @var ClassPatchInterface[] - */ - private $patches = array(); - - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * Initializes doubler. - * - * @param ClassMirror $mirror - * @param ClassCreator $creator - * @param NameGenerator $namer - */ - public function __construct(ClassMirror $mirror = null, ClassCreator $creator = null, - NameGenerator $namer = null) - { - $this->mirror = $mirror ?: new ClassMirror; - $this->creator = $creator ?: new ClassCreator; - $this->namer = $namer ?: new NameGenerator; - } - - /** - * Returns list of registered class patches. - * - * @return ClassPatchInterface[] - */ - public function getClassPatches() - { - return $this->patches; - } - - /** - * Registers new class patch. - * - * @param ClassPatchInterface $patch - */ - public function registerClassPatch(ClassPatchInterface $patch) - { - $this->patches[] = $patch; - - @usort($this->patches, function (ClassPatchInterface $patch1, ClassPatchInterface $patch2) { - return $patch2->getPriority() - $patch1->getPriority(); - }); - } - - /** - * Creates double from specific class or/and list of interfaces. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces Array of ReflectionClass instances - * @param array $args Constructor arguments - * - * @return DoubleInterface - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function double(ReflectionClass $class = null, array $interfaces, array $args = null) - { - foreach ($interfaces as $interface) { - if (!$interface instanceof ReflectionClass) { - throw new InvalidArgumentException(sprintf( - "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". - "a second argument to `Doubler::double(...)`, but got %s.", - is_object($interface) ? get_class($interface).' class' : gettype($interface) - )); - } - } - - $classname = $this->createDoubleClass($class, $interfaces); - $reflection = new ReflectionClass($classname); - - if (null !== $args) { - return $reflection->newInstanceArgs($args); - } - if ((null === $constructor = $reflection->getConstructor()) - || ($constructor->isPublic() && !$constructor->isFinal())) { - return $reflection->newInstance(); - } - - if (!$this->instantiator) { - $this->instantiator = new Instantiator(); - } - - return $this->instantiator->instantiate($classname); - } - - /** - * Creates double class and returns its FQN. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - protected function createDoubleClass(ReflectionClass $class = null, array $interfaces) - { - $name = $this->namer->name($class, $interfaces); - $node = $this->mirror->reflect($class, $interfaces); - - foreach ($this->patches as $patch) { - if ($patch->supports($node)) { - $patch->apply($node); - } - } - - $this->creator->create($name, $node); - - return $name; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php deleted file mode 100644 index 4d474e5b..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php +++ /dev/null @@ -1,92 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -/** - * Class code creator. - * Generates PHP code for specific class node tree. - * - * @author Konstantin Kudryashov - */ -class ClassCodeGenerator -{ - /** - * Generates PHP code for class node. - * - * @param string $classname - * @param Node\ClassNode $class - * - * @return string - */ - public function generate($classname, Node\ClassNode $class) - { - $parts = explode('\\', $classname); - $classname = array_pop($parts); - $namespace = implode('\\', $parts); - - $code = sprintf("class %s extends \%s implements %s {\n", - $classname, $class->getParentClass(), implode(', ', - array_map(function ($interface) {return '\\'.$interface;}, $class->getInterfaces()) - ) - ); - - foreach ($class->getProperties() as $name => $visibility) { - $code .= sprintf("%s \$%s;\n", $visibility, $name); - } - $code .= "\n"; - - foreach ($class->getMethods() as $method) { - $code .= $this->generateMethod($method)."\n"; - } - $code .= "\n}"; - - return sprintf("namespace %s {\n%s\n}", $namespace, $code); - } - - private function generateMethod(Node\MethodNode $method) - { - $php = sprintf("%s %s function %s%s(%s)%s {\n", - $method->getVisibility(), - $method->isStatic() ? 'static' : '', - $method->returnsReference() ? '&':'', - $method->getName(), - implode(', ', $this->generateArguments($method->getArguments())), - $method->hasReturnType() ? sprintf(': %s', $method->getReturnType()) : '' - ); - $php .= $method->getCode()."\n"; - - return $php.'}'; - } - - private function generateArguments(array $arguments) - { - return array_map(function (Node\ArgumentNode $argument) { - $php = ''; - - if ($hint = $argument->getTypeHint()) { - if ('array' === $hint || 'callable' === $hint) { - $php .= $hint; - } else { - $php .= '\\'.$hint; - } - } - - $php .= ' '.($argument->isPassedByReference() ? '&' : '').'$'.$argument->getName(); - - if ($argument->isOptional()) { - $php .= ' = '.var_export($argument->getDefault(), true); - } - - return $php; - }, $arguments); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php deleted file mode 100644 index 882a4a4b..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php +++ /dev/null @@ -1,67 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Exception\Doubler\ClassCreatorException; - -/** - * Class creator. - * Creates specific class in current environment. - * - * @author Konstantin Kudryashov - */ -class ClassCreator -{ - private $generator; - - /** - * Initializes creator. - * - * @param ClassCodeGenerator $generator - */ - public function __construct(ClassCodeGenerator $generator = null) - { - $this->generator = $generator ?: new ClassCodeGenerator; - } - - /** - * Creates class. - * - * @param string $classname - * @param Node\ClassNode $class - * - * @return mixed - * - * @throws \Prophecy\Exception\Doubler\ClassCreatorException - */ - public function create($classname, Node\ClassNode $class) - { - $code = $this->generator->generate($classname, $class); - $return = eval($code); - - if (!class_exists($classname, false)) { - if (count($class->getInterfaces())) { - throw new ClassCreatorException(sprintf( - 'Could not double `%s` and implement interfaces: [%s].', - $class->getParentClass(), implode(', ', $class->getInterfaces()) - ), $class); - } - - throw new ClassCreatorException( - sprintf('Could not double `%s`.', $class->getParentClass()), - $class - ); - } - - return $return; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php deleted file mode 100644 index 6a4ebde5..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php +++ /dev/null @@ -1,210 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Exception\Doubler\ClassMirrorException; -use ReflectionClass; -use ReflectionMethod; -use ReflectionParameter; - -/** - * Class mirror. - * Core doubler class. Mirrors specific class and/or interfaces into class node tree. - * - * @author Konstantin Kudryashov - */ -class ClassMirror -{ - private static $reflectableMethods = array( - '__construct', - '__destruct', - '__sleep', - '__wakeup', - '__toString', - '__call', - ); - - /** - * Reflects provided arguments into class node. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return Node\ClassNode - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function reflect(ReflectionClass $class = null, array $interfaces) - { - $node = new Node\ClassNode; - - if (null !== $class) { - if (true === $class->isInterface()) { - throw new InvalidArgumentException(sprintf( - "Could not reflect %s as a class, because it\n". - "is interface - use the second argument instead.", - $class->getName() - )); - } - - $this->reflectClassToNode($class, $node); - } - - foreach ($interfaces as $interface) { - if (!$interface instanceof ReflectionClass) { - throw new InvalidArgumentException(sprintf( - "[ReflectionClass \$interface1 [, ReflectionClass \$interface2]] array expected as\n". - "a second argument to `ClassMirror::reflect(...)`, but got %s.", - is_object($interface) ? get_class($interface).' class' : gettype($interface) - )); - } - if (false === $interface->isInterface()) { - throw new InvalidArgumentException(sprintf( - "Could not reflect %s as an interface, because it\n". - "is class - use the first argument instead.", - $interface->getName() - )); - } - - $this->reflectInterfaceToNode($interface, $node); - } - - $node->addInterface('Prophecy\Doubler\Generator\ReflectionInterface'); - - return $node; - } - - private function reflectClassToNode(ReflectionClass $class, Node\ClassNode $node) - { - if (true === $class->isFinal()) { - throw new ClassMirrorException(sprintf( - 'Could not reflect class %s as it is marked final.', $class->getName() - ), $class); - } - - $node->setParentClass($class->getName()); - - foreach ($class->getMethods(ReflectionMethod::IS_ABSTRACT) as $method) { - if (false === $method->isProtected()) { - continue; - } - - $this->reflectMethodToNode($method, $node); - } - - foreach ($class->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { - if (0 === strpos($method->getName(), '_') - && !in_array($method->getName(), self::$reflectableMethods)) { - continue; - } - - if (true === $method->isFinal()) { - continue; - } - - $this->reflectMethodToNode($method, $node); - } - } - - private function reflectInterfaceToNode(ReflectionClass $interface, Node\ClassNode $node) - { - $node->addInterface($interface->getName()); - - foreach ($interface->getMethods() as $method) { - $this->reflectMethodToNode($method, $node); - } - } - - private function reflectMethodToNode(ReflectionMethod $method, Node\ClassNode $classNode) - { - $node = new Node\MethodNode($method->getName()); - - if (true === $method->isProtected()) { - $node->setVisibility('protected'); - } - - if (true === $method->isStatic()) { - $node->setStatic(); - } - - if (true === $method->returnsReference()) { - $node->setReturnsReference(); - } - - if (version_compare(PHP_VERSION, '7.0', '>=') && true === $method->hasReturnType()) { - $node->setReturnType((string) $method->getReturnType()); - } - - if (is_array($params = $method->getParameters()) && count($params)) { - foreach ($params as $param) { - $this->reflectArgumentToNode($param, $node); - } - } - - $classNode->addMethod($node); - } - - private function reflectArgumentToNode(ReflectionParameter $parameter, Node\MethodNode $methodNode) - { - $name = $parameter->getName() == '...' ? '__dot_dot_dot__' : $parameter->getName(); - $node = new Node\ArgumentNode($name); - - $typeHint = $this->getTypeHint($parameter); - $node->setTypeHint($typeHint); - - if (true === $parameter->isDefaultValueAvailable()) { - $node->setDefault($parameter->getDefaultValue()); - } elseif (true === $parameter->isOptional() - || (true === $parameter->allowsNull() && $typeHint)) { - $node->setDefault(null); - } - - if (true === $parameter->isPassedByReference()) { - $node->setAsPassedByReference(); - } - - $methodNode->addArgument($node); - } - - private function getTypeHint(ReflectionParameter $parameter) - { - if (null !== $className = $this->getParameterClassName($parameter)) { - return $className; - } - - if (true === $parameter->isArray()) { - return 'array'; - } - - if (version_compare(PHP_VERSION, '5.4', '>=') && true === $parameter->isCallable()) { - return 'callable'; - } - - if (version_compare(PHP_VERSION, '7.0', '>=') && true === $parameter->hasType()) { - return (string) $parameter->getType(); - } - - return null; - } - - private function getParameterClassName(ReflectionParameter $parameter) - { - try { - return $parameter->getClass() ? $parameter->getClass()->getName() : null; - } catch (\ReflectionException $e) { - preg_match('/\[\s\<\w+?>\s([\w,\\\]+)/s', $parameter, $matches); - - return isset($matches[1]) ? $matches[1] : null; - } - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php deleted file mode 100644 index a6c42a38..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php +++ /dev/null @@ -1,75 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -/** - * Argument node. - * - * @author Konstantin Kudryashov - */ -class ArgumentNode -{ - private $name; - private $typeHint; - private $default; - private $optional = false; - private $byReference = false; - - /** - * @param string $name - */ - public function __construct($name) - { - $this->name = $name; - } - - public function getName() - { - return $this->name; - } - - public function getTypeHint() - { - return $this->typeHint; - } - - public function setTypeHint($typeHint = null) - { - $this->typeHint = $typeHint; - } - - public function getDefault() - { - return $this->default; - } - - public function setDefault($default = null) - { - $this->optional = true; - $this->default = $default; - } - - public function isOptional() - { - return $this->optional; - } - - public function setAsPassedByReference($byReference = true) - { - $this->byReference = $byReference; - } - - public function isPassedByReference() - { - return $this->byReference; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php deleted file mode 100644 index b38cb4ea..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php +++ /dev/null @@ -1,130 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Class node. - * - * @author Konstantin Kudryashov - */ -class ClassNode -{ - private $parentClass = 'stdClass'; - private $interfaces = array(); - private $properties = array(); - - /** - * @var MethodNode[] - */ - private $methods = array(); - - public function getParentClass() - { - return $this->parentClass; - } - - /** - * @param string $class - */ - public function setParentClass($class) - { - $this->parentClass = $class ?: 'stdClass'; - } - - /** - * @return string[] - */ - public function getInterfaces() - { - return $this->interfaces; - } - - /** - * @param string $interface - */ - public function addInterface($interface) - { - if ($this->hasInterface($interface)) { - return; - } - - array_unshift($this->interfaces, $interface); - } - - /** - * @param string $interface - * - * @return bool - */ - public function hasInterface($interface) - { - return in_array($interface, $this->interfaces); - } - - public function getProperties() - { - return $this->properties; - } - - public function addProperty($name, $visibility = 'public') - { - $visibility = strtolower($visibility); - - if (!in_array($visibility, array('public', 'private', 'protected'))) { - throw new InvalidArgumentException(sprintf( - '`%s` property visibility is not supported.', $visibility - )); - } - - $this->properties[$name] = $visibility; - } - - /** - * @return MethodNode[] - */ - public function getMethods() - { - return $this->methods; - } - - public function addMethod(MethodNode $method) - { - $this->methods[$method->getName()] = $method; - } - - public function removeMethod($name) - { - unset($this->methods[$name]); - } - - /** - * @param string $name - * - * @return MethodNode|null - */ - public function getMethod($name) - { - return $this->hasMethod($name) ? $this->methods[$name] : null; - } - - /** - * @param string $name - * - * @return bool - */ - public function hasMethod($name) - { - return isset($this->methods[$name]); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php deleted file mode 100644 index eb953524..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php +++ /dev/null @@ -1,177 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator\Node; - -use Prophecy\Exception\InvalidArgumentException; - -/** - * Method node. - * - * @author Konstantin Kudryashov - */ -class MethodNode -{ - private $name; - private $code; - private $visibility = 'public'; - private $static = false; - private $returnsReference = false; - private $returnType; - - /** - * @var ArgumentNode[] - */ - private $arguments = array(); - - /** - * @param string $name - * @param string $code - */ - public function __construct($name, $code = null) - { - $this->name = $name; - $this->code = $code; - } - - public function getVisibility() - { - return $this->visibility; - } - - /** - * @param string $visibility - */ - public function setVisibility($visibility) - { - $visibility = strtolower($visibility); - - if (!in_array($visibility, array('public', 'private', 'protected'))) { - throw new InvalidArgumentException(sprintf( - '`%s` method visibility is not supported.', $visibility - )); - } - - $this->visibility = $visibility; - } - - public function isStatic() - { - return $this->static; - } - - public function setStatic($static = true) - { - $this->static = (bool) $static; - } - - public function returnsReference() - { - return $this->returnsReference; - } - - public function setReturnsReference() - { - $this->returnsReference = true; - } - - public function getName() - { - return $this->name; - } - - public function addArgument(ArgumentNode $argument) - { - $this->arguments[] = $argument; - } - - /** - * @return ArgumentNode[] - */ - public function getArguments() - { - return $this->arguments; - } - - public function hasReturnType() - { - return null !== $this->returnType; - } - - /** - * @param string $type - */ - public function setReturnType($type = null) - { - switch ($type) { - case '': - $this->returnType = null; - break; - - case 'string'; - case 'float': - case 'int': - case 'bool': - case 'array': - case 'callable': - $this->returnType = $type; - break; - - case 'double': - case 'real': - $this->returnType = 'float'; - break; - - case 'boolean': - $this->returnType = 'bool'; - break; - - case 'integer': - $this->returnType = 'int'; - break; - - default: - $this->returnType = '\\' . ltrim($type, '\\'); - } - } - - public function getReturnType() - { - return $this->returnType; - } - - /** - * @param string $code - */ - public function setCode($code) - { - $this->code = $code; - } - - public function getCode() - { - if ($this->returnsReference) - { - return "throw new \Prophecy\Exception\Doubler\ReturnByReferenceException('Returning by reference not supported', get_class(\$this), '{$this->name}');"; - } - - return (string) $this->code; - } - - public function useParentCode() - { - $this->code = sprintf( - 'return parent::%s(%s);', $this->getName(), implode(', ', - array_map(function (ArgumentNode $arg) { return '$'.$arg->getName(); }, $this->arguments) - ) - ); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php deleted file mode 100644 index d720b151..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php +++ /dev/null @@ -1,22 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler\Generator; - -/** - * Reflection interface. - * All reflected classes implement this interface. - * - * @author Konstantin Kudryashov - */ -interface ReflectionInterface -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php deleted file mode 100644 index 8a99c4ce..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php +++ /dev/null @@ -1,127 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use Prophecy\Exception\Doubler\DoubleException; -use Prophecy\Exception\Doubler\ClassNotFoundException; -use Prophecy\Exception\Doubler\InterfaceNotFoundException; -use ReflectionClass; - -/** - * Lazy double. - * Gives simple interface to describe double before creating it. - * - * @author Konstantin Kudryashov - */ -class LazyDouble -{ - private $doubler; - private $class; - private $interfaces = array(); - private $arguments = null; - private $double; - - /** - * Initializes lazy double. - * - * @param Doubler $doubler - */ - public function __construct(Doubler $doubler) - { - $this->doubler = $doubler; - } - - /** - * Tells doubler to use specific class as parent one for double. - * - * @param string|ReflectionClass $class - * - * @throws \Prophecy\Exception\Doubler\ClassNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - */ - public function setParentClass($class) - { - if (null !== $this->double) { - throw new DoubleException('Can not extend class with already instantiated double.'); - } - - if (!$class instanceof ReflectionClass) { - if (!class_exists($class)) { - throw new ClassNotFoundException(sprintf('Class %s not found.', $class), $class); - } - - $class = new ReflectionClass($class); - } - - $this->class = $class; - } - - /** - * Tells doubler to implement specific interface with double. - * - * @param string|ReflectionClass $interface - * - * @throws \Prophecy\Exception\Doubler\InterfaceNotFoundException - * @throws \Prophecy\Exception\Doubler\DoubleException - */ - public function addInterface($interface) - { - if (null !== $this->double) { - throw new DoubleException( - 'Can not implement interface with already instantiated double.' - ); - } - - if (!$interface instanceof ReflectionClass) { - if (!interface_exists($interface)) { - throw new InterfaceNotFoundException( - sprintf('Interface %s not found.', $interface), - $interface - ); - } - - $interface = new ReflectionClass($interface); - } - - $this->interfaces[] = $interface; - } - - /** - * Sets constructor arguments. - * - * @param array $arguments - */ - public function setArguments(array $arguments = null) - { - $this->arguments = $arguments; - } - - /** - * Creates double instance or returns already created one. - * - * @return DoubleInterface - */ - public function getInstance() - { - if (null === $this->double) { - if (null !== $this->arguments) { - return $this->double = $this->doubler->double( - $this->class, $this->interfaces, $this->arguments - ); - } - - $this->double = $this->doubler->double($this->class, $this->interfaces); - } - - return $this->double; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php b/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php deleted file mode 100644 index d67ec6a4..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php +++ /dev/null @@ -1,52 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Doubler; - -use ReflectionClass; - -/** - * Name generator. - * Generates classname for double. - * - * @author Konstantin Kudryashov - */ -class NameGenerator -{ - private static $counter = 1; - - /** - * Generates name. - * - * @param ReflectionClass $class - * @param ReflectionClass[] $interfaces - * - * @return string - */ - public function name(ReflectionClass $class = null, array $interfaces) - { - $parts = array(); - - if (null !== $class) { - $parts[] = $class->getName(); - } else { - foreach ($interfaces as $interface) { - $parts[] = $interface->getShortName(); - } - } - - if (!count($parts)) { - $parts[] = 'stdClass'; - } - - return sprintf('Double\%s\P%d', implode('\\', $parts), self::$counter++); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php deleted file mode 100644 index 48ed2254..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php +++ /dev/null @@ -1,40 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Call; - -use Prophecy\Exception\Prophecy\ObjectProphecyException; -use Prophecy\Prophecy\ObjectProphecy; - -class UnexpectedCallException extends ObjectProphecyException -{ - private $methodName; - private $arguments; - - public function __construct($message, ObjectProphecy $objectProphecy, - $methodName, array $arguments) - { - parent::__construct($message, $objectProphecy); - - $this->methodName = $methodName; - $this->arguments = $arguments; - } - - public function getMethodName() - { - return $this->methodName; - } - - public function getArguments() - { - return $this->arguments; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php deleted file mode 100644 index 822918a2..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use Prophecy\Doubler\Generator\Node\ClassNode; - -class ClassCreatorException extends \RuntimeException implements DoublerException -{ - private $node; - - public function __construct($message, ClassNode $node) - { - parent::__construct($message); - - $this->node = $node; - } - - public function getClassNode() - { - return $this->node; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php deleted file mode 100644 index 8fc53b8b..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use ReflectionClass; - -class ClassMirrorException extends \RuntimeException implements DoublerException -{ - private $class; - - public function __construct($message, ReflectionClass $class) - { - parent::__construct($message); - - $this->class = $class; - } - - public function getReflectedClass() - { - return $this->class; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php deleted file mode 100644 index 5bc826d7..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php +++ /dev/null @@ -1,33 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class ClassNotFoundException extends DoubleException -{ - private $classname; - - /** - * @param string $message - * @param string $classname - */ - public function __construct($message, $classname) - { - parent::__construct($message); - - $this->classname = $classname; - } - - public function getClassname() - { - return $this->classname; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php deleted file mode 100644 index 6642a58f..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use RuntimeException; - -class DoubleException extends RuntimeException implements DoublerException -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php deleted file mode 100644 index 9d6be179..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -use Prophecy\Exception\Exception; - -interface DoublerException extends Exception -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php deleted file mode 100644 index e344dead..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php +++ /dev/null @@ -1,20 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class InterfaceNotFoundException extends ClassNotFoundException -{ - public function getInterfaceName() - { - return $this->getClassname(); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php deleted file mode 100644 index b113941f..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php +++ /dev/null @@ -1,60 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class MethodNotFoundException extends DoubleException -{ - /** - * @var string - */ - private $classname; - - /** - * @var string - */ - private $methodName; - - /** - * @var array - */ - private $arguments; - - /** - * @param string $message - * @param string $classname - * @param string $methodName - * @param null|Argument\ArgumentsWildcard|array $arguments - */ - public function __construct($message, $classname, $methodName, $arguments = null) - { - parent::__construct($message); - - $this->classname = $classname; - $this->methodName = $methodName; - $this->arguments = $arguments; - } - - public function getClassname() - { - return $this->classname; - } - - public function getMethodName() - { - return $this->methodName; - } - - public function getArguments() - { - return $this->arguments; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php deleted file mode 100644 index 63030497..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php +++ /dev/null @@ -1,41 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Doubler; - -class ReturnByReferenceException extends DoubleException -{ - private $classname; - private $methodName; - - /** - * @param string $message - * @param string $classname - * @param string $methodName - */ - public function __construct($message, $classname, $methodName) - { - parent::__construct($message); - - $this->classname = $classname; - $this->methodName = $methodName; - } - - public function getClassname() - { - return $this->classname; - } - - public function getMethodName() - { - return $this->methodName; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php deleted file mode 100644 index ac9fe4dd..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php +++ /dev/null @@ -1,26 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception; - -/** - * Core Prophecy exception interface. - * All Prophecy exceptions implement it. - * - * @author Konstantin Kudryashov - */ -interface Exception -{ - /** - * @return string - */ - public function getMessage(); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php deleted file mode 100644 index bc91c690..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception; - -class InvalidArgumentException extends \InvalidArgumentException implements Exception -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php deleted file mode 100644 index 44b598a4..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php +++ /dev/null @@ -1,50 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\ObjectProphecy; - -class AggregateException extends \RuntimeException implements PredictionException -{ - private $exceptions = array(); - private $objectProphecy; - - public function append(PredictionException $exception) - { - $message = $exception->getMessage(); - $message = ' '.strtr($message, array("\n" => "\n "))."\n"; - - $this->message = rtrim($this->message.$message); - $this->exceptions[] = $exception; - } - - /** - * @return PredictionException[] - */ - public function getExceptions() - { - return $this->exceptions; - } - - public function setObjectProphecy(ObjectProphecy $objectProphecy) - { - $this->objectProphecy = $objectProphecy; - } - - /** - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php deleted file mode 100644 index bbbbc3d9..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php +++ /dev/null @@ -1,24 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use RuntimeException; - -/** - * Basic failed prediction exception. - * Use it for custom prediction failures. - * - * @author Konstantin Kudryashov - */ -class FailedPredictionException extends RuntimeException implements PredictionException -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php deleted file mode 100644 index 05ea4aad..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Exception\Prophecy\MethodProphecyException; - -class NoCallsException extends MethodProphecyException implements PredictionException -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php deleted file mode 100644 index 2596b1ef..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Exception\Exception; - -interface PredictionException extends Exception -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php deleted file mode 100644 index 9d905431..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php +++ /dev/null @@ -1,31 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\MethodProphecy; - -class UnexpectedCallsCountException extends UnexpectedCallsException -{ - private $expectedCount; - - public function __construct($message, MethodProphecy $methodProphecy, $count, array $calls) - { - parent::__construct($message, $methodProphecy, $calls); - - $this->expectedCount = intval($count); - } - - public function getExpectedCount() - { - return $this->expectedCount; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php deleted file mode 100644 index 7a99c2d7..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php +++ /dev/null @@ -1,32 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prediction; - -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\Prophecy\MethodProphecyException; - -class UnexpectedCallsException extends MethodProphecyException implements PredictionException -{ - private $calls = array(); - - public function __construct($message, MethodProphecy $methodProphecy, array $calls) - { - parent::__construct($message, $methodProphecy); - - $this->calls = $calls; - } - - public function getCalls() - { - return $this->calls; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php deleted file mode 100644 index 1b03eaf4..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Prophecy\MethodProphecy; - -class MethodProphecyException extends ObjectProphecyException -{ - private $methodProphecy; - - public function __construct($message, MethodProphecy $methodProphecy) - { - parent::__construct($message, $methodProphecy->getObjectProphecy()); - - $this->methodProphecy = $methodProphecy; - } - - /** - * @return MethodProphecy - */ - public function getMethodProphecy() - { - return $this->methodProphecy; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php deleted file mode 100644 index e345402e..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Prophecy\ObjectProphecy; - -class ObjectProphecyException extends \RuntimeException implements ProphecyException -{ - private $objectProphecy; - - public function __construct($message, ObjectProphecy $objectProphecy) - { - parent::__construct($message); - - $this->objectProphecy = $objectProphecy; - } - - /** - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php b/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php deleted file mode 100644 index 91573328..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Exception\Prophecy; - -use Prophecy\Exception\Exception; - -interface ProphecyException extends Exception -{ -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php deleted file mode 100644 index b4787366..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php +++ /dev/null @@ -1,86 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Argument\Token\AnyValuesToken; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\NoCallsException; - -/** - * Call prediction. - * - * @author Konstantin Kudryashov - */ -class CallPrediction implements PredictionInterface -{ - private $util; - - /** - * Initializes prediction. - * - * @param StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there was at least one call. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\NoCallsException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if (count($calls)) { - return; - } - - $methodCalls = $object->findProphecyMethodCalls( - $method->getMethodName(), - new ArgumentsWildcard(array(new AnyValuesToken)) - ); - - if (count($methodCalls)) { - throw new NoCallsException(sprintf( - "No calls have been made that match:\n". - " %s->%s(%s)\n". - "but expected at least one.\n". - "Recorded `%s(...)` calls:\n%s", - - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - $method->getMethodName(), - $this->util->stringifyCalls($methodCalls) - ), $method); - } - - throw new NoCallsException(sprintf( - "No calls have been made that match:\n". - " %s->%s(%s)\n". - "but expected at least one.", - - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard() - ), $method); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php deleted file mode 100644 index 31c6c575..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php +++ /dev/null @@ -1,107 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Argument\Token\AnyValuesToken; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\UnexpectedCallsCountException; - -/** - * Prediction interface. - * Predictions are logical test blocks, tied to `should...` keyword. - * - * @author Konstantin Kudryashov - */ -class CallTimesPrediction implements PredictionInterface -{ - private $times; - private $util; - - /** - * Initializes prediction. - * - * @param int $times - * @param StringUtil $util - */ - public function __construct($times, StringUtil $util = null) - { - $this->times = intval($times); - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there was exact amount of calls made. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\UnexpectedCallsCountException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if ($this->times == count($calls)) { - return; - } - - $methodCalls = $object->findProphecyMethodCalls( - $method->getMethodName(), - new ArgumentsWildcard(array(new AnyValuesToken)) - ); - - if (count($calls)) { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but %d were made:\n%s", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - count($calls), - $this->util->stringifyCalls($calls) - ); - } elseif (count($methodCalls)) { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but none were made.\n". - "Recorded `%s(...)` calls:\n%s", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - $method->getMethodName(), - $this->util->stringifyCalls($methodCalls) - ); - } else { - $message = sprintf( - "Expected exactly %d calls that match:\n". - " %s->%s(%s)\n". - "but none were made.", - - $this->times, - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard() - ); - } - - throw new UnexpectedCallsCountException($message, $method, $this->times, $calls); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php deleted file mode 100644 index 44bc782c..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php +++ /dev/null @@ -1,65 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use Closure; - -/** - * Callback prediction. - * - * @author Konstantin Kudryashov - */ -class CallbackPrediction implements PredictionInterface -{ - private $callback; - - /** - * Initializes callback prediction. - * - * @param callable $callback Custom callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackPrediction, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Executes preset callback. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - $callback = $this->callback; - - if ($callback instanceof Closure && method_exists('Closure', 'bind')) { - $callback = Closure::bind($callback, $object); - } - - call_user_func($callback, $calls, $object, $method); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php deleted file mode 100644 index 46ac5bfc..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php +++ /dev/null @@ -1,68 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\UnexpectedCallsException; - -/** - * No calls prediction. - * - * @author Konstantin Kudryashov - */ -class NoCallsPrediction implements PredictionInterface -{ - private $util; - - /** - * Initializes prediction. - * - * @param null|StringUtil $util - */ - public function __construct(StringUtil $util = null) - { - $this->util = $util ?: new StringUtil; - } - - /** - * Tests that there were no calls made. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws \Prophecy\Exception\Prediction\UnexpectedCallsException - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method) - { - if (!count($calls)) { - return; - } - - $verb = count($calls) === 1 ? 'was' : 'were'; - - throw new UnexpectedCallsException(sprintf( - "No calls expected that match:\n". - " %s->%s(%s)\n". - "but %d %s made:\n%s", - get_class($object->reveal()), - $method->getMethodName(), - $method->getArgumentsWildcard(), - count($calls), - $verb, - $this->util->stringifyCalls($calls) - ), $method, $calls); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php deleted file mode 100644 index f7fb06a9..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php +++ /dev/null @@ -1,37 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prediction; - -use Prophecy\Call\Call; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Prediction interface. - * Predictions are logical test blocks, tied to `should...` keyword. - * - * @author Konstantin Kudryashov - */ -interface PredictionInterface -{ - /** - * Tests that double fulfilled prediction. - * - * @param Call[] $calls - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws object - * @return void - */ - public function check(array $calls, ObjectProphecy $object, MethodProphecy $method); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php b/server/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php deleted file mode 100644 index 5f406bf7..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php +++ /dev/null @@ -1,66 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use Closure; - -/** - * Callback promise. - * - * @author Konstantin Kudryashov - */ -class CallbackPromise implements PromiseInterface -{ - private $callback; - - /** - * Initializes callback promise. - * - * @param callable $callback Custom callback - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($callback) - { - if (!is_callable($callback)) { - throw new InvalidArgumentException(sprintf( - 'Callable expected as an argument to CallbackPromise, but got %s.', - gettype($callback) - )); - } - - $this->callback = $callback; - } - - /** - * Evaluates promise callback. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - $callback = $this->callback; - - if ($callback instanceof Closure && method_exists('Closure', 'bind')) { - $callback = Closure::bind($callback, $object); - } - - return call_user_func($callback, $args, $object, $method); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php deleted file mode 100644 index 382537b4..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php +++ /dev/null @@ -1,35 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Promise interface. - * Promises are logical blocks, tied to `will...` keyword. - * - * @author Konstantin Kudryashov - */ -interface PromiseInterface -{ - /** - * Evaluates promise. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php b/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php deleted file mode 100644 index a06724bc..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php +++ /dev/null @@ -1,61 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Return argument promise. - * - * @author Konstantin Kudryashov - */ -class ReturnArgumentPromise implements PromiseInterface -{ - /** - * @var int - */ - private $index; - - /** - * Initializes callback promise. - * - * @param int $index The zero-indexed number of the argument to return - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($index = 0) - { - if (!is_int($index) || $index < 0) { - throw new InvalidArgumentException( - 'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.', - $index - ); - } - $this->index = $index; - } - - /** - * Returns nth argument if has one, null otherwise. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return null|mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - return count($args) > $this->index ? $args[$this->index] : null; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php b/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php deleted file mode 100644 index c7d5ac59..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php +++ /dev/null @@ -1,55 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; - -/** - * Return promise. - * - * @author Konstantin Kudryashov - */ -class ReturnPromise implements PromiseInterface -{ - private $returnValues = array(); - - /** - * Initializes promise. - * - * @param array $returnValues Array of values - */ - public function __construct(array $returnValues) - { - $this->returnValues = $returnValues; - } - - /** - * Returns saved values one by one until last one, then continuously returns last value. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @return mixed - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - $value = array_shift($this->returnValues); - - if (!count($this->returnValues)) { - $this->returnValues[] = $value; - } - - return $value; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php deleted file mode 100644 index 8007330a..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php +++ /dev/null @@ -1,91 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Promise; - -use Doctrine\Instantiator\Instantiator; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\MethodProphecy; -use Prophecy\Exception\InvalidArgumentException; -use ReflectionClass; - -/** - * Throw promise. - * - * @author Konstantin Kudryashov - */ -class ThrowPromise implements PromiseInterface -{ - private $exception; - - /** - * @var \Doctrine\Instantiator\Instantiator - */ - private $instantiator; - - /** - * Initializes promise. - * - * @param string|\Exception $exception Exception class name or instance - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function __construct($exception) - { - if (is_string($exception)) { - if (!class_exists($exception) - && 'Exception' !== $exception - && !is_subclass_of($exception, 'Exception')) { - throw new InvalidArgumentException(sprintf( - 'Exception class or instance expected as argument to ThrowPromise, but got %s.', - gettype($exception) - )); - } - } elseif (!$exception instanceof \Exception) { - throw new InvalidArgumentException(sprintf( - 'Exception class or instance expected as argument to ThrowPromise, but got %s.', - gettype($exception) - )); - } - - $this->exception = $exception; - } - - /** - * Throws predefined exception. - * - * @param array $args - * @param ObjectProphecy $object - * @param MethodProphecy $method - * - * @throws object - */ - public function execute(array $args, ObjectProphecy $object, MethodProphecy $method) - { - if (is_string($this->exception)) { - $classname = $this->exception; - $reflection = new ReflectionClass($classname); - $constructor = $reflection->getConstructor(); - - if ($constructor->isPublic() && 0 == $constructor->getNumberOfRequiredParameters()) { - throw $reflection->newInstance(); - } - - if (!$this->instantiator) { - $this->instantiator = new Instantiator(); - } - - throw $this->instantiator->instantiate($classname); - } - - throw $this->exception; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php deleted file mode 100644 index 426df322..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php +++ /dev/null @@ -1,437 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -use Prophecy\Argument; -use Prophecy\Prophet; -use Prophecy\Promise; -use Prophecy\Prediction; -use Prophecy\Exception\Doubler\MethodNotFoundException; -use Prophecy\Exception\InvalidArgumentException; -use Prophecy\Exception\Prophecy\MethodProphecyException; - -/** - * Method prophecy. - * - * @author Konstantin Kudryashov - */ -class MethodProphecy -{ - private $objectProphecy; - private $methodName; - private $argumentsWildcard; - private $promise; - private $prediction; - private $checkedPredictions = array(); - private $bound = false; - - /** - * Initializes method prophecy. - * - * @param ObjectProphecy $objectProphecy - * @param string $methodName - * @param null|Argument\ArgumentsWildcard|array $arguments - * - * @throws \Prophecy\Exception\Doubler\MethodNotFoundException If method not found - */ - public function __construct(ObjectProphecy $objectProphecy, $methodName, $arguments = null) - { - $double = $objectProphecy->reveal(); - if (!method_exists($double, $methodName)) { - throw new MethodNotFoundException(sprintf( - 'Method `%s::%s()` is not defined.', get_class($double), $methodName - ), get_class($double), $methodName, $arguments); - } - - $this->objectProphecy = $objectProphecy; - $this->methodName = $methodName; - - $reflectedMethod = new \ReflectionMethod($double, $methodName); - if ($reflectedMethod->isFinal()) { - throw new MethodProphecyException(sprintf( - "Can not add prophecy for a method `%s::%s()`\n". - "as it is a final method.", - get_class($double), - $methodName - ), $this); - } - - if (null !== $arguments) { - $this->withArguments($arguments); - } - - if (version_compare(PHP_VERSION, '7.0', '>=') && true === $reflectedMethod->hasReturnType()) { - $type = (string) $reflectedMethod->getReturnType(); - $this->will(function () use ($type) { - switch ($type) { - case 'string': return ''; - case 'float': return 0.0; - case 'int': return 0; - case 'bool': return false; - case 'array': return array(); - - case 'callable': - case 'Closure': - return function () {}; - - case 'Traversable': - case 'Generator': - // Remove eval() when minimum version >=5.5 - $generator = eval('return function () { yield; };'); - return $generator(); - - default: - $prophet = new Prophet; - return $prophet->prophesize($type)->reveal(); - } - }); - } - } - - /** - * Sets argument wildcard. - * - * @param array|Argument\ArgumentsWildcard $arguments - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function withArguments($arguments) - { - if (is_array($arguments)) { - $arguments = new Argument\ArgumentsWildcard($arguments); - } - - if (!$arguments instanceof Argument\ArgumentsWildcard) { - throw new InvalidArgumentException(sprintf( - "Either an array or an instance of ArgumentsWildcard expected as\n". - 'a `MethodProphecy::withArguments()` argument, but got %s.', - gettype($arguments) - )); - } - - $this->argumentsWildcard = $arguments; - - return $this; - } - - /** - * Sets custom promise to the prophecy. - * - * @param callable|Promise\PromiseInterface $promise - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function will($promise) - { - if (is_callable($promise)) { - $promise = new Promise\CallbackPromise($promise); - } - - if (!$promise instanceof Promise\PromiseInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PromiseInterface, but got %s.', - gettype($promise) - )); - } - - $this->bindToObjectProphecy(); - $this->promise = $promise; - - return $this; - } - - /** - * Sets return promise to the prophecy. - * - * @see Prophecy\Promise\ReturnPromise - * - * @return $this - */ - public function willReturn() - { - return $this->will(new Promise\ReturnPromise(func_get_args())); - } - - /** - * Sets return argument promise to the prophecy. - * - * @param int $index The zero-indexed number of the argument to return - * - * @see Prophecy\Promise\ReturnArgumentPromise - * - * @return $this - */ - public function willReturnArgument($index = 0) - { - return $this->will(new Promise\ReturnArgumentPromise($index)); - } - - /** - * Sets throw promise to the prophecy. - * - * @see Prophecy\Promise\ThrowPromise - * - * @param string|\Exception $exception Exception class or instance - * - * @return $this - */ - public function willThrow($exception) - { - return $this->will(new Promise\ThrowPromise($exception)); - } - - /** - * Sets custom prediction to the prophecy. - * - * @param callable|Prediction\PredictionInterface $prediction - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function should($prediction) - { - if (is_callable($prediction)) { - $prediction = new Prediction\CallbackPrediction($prediction); - } - - if (!$prediction instanceof Prediction\PredictionInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PredictionInterface, but got %s.', - gettype($prediction) - )); - } - - $this->bindToObjectProphecy(); - $this->prediction = $prediction; - - return $this; - } - - /** - * Sets call prediction to the prophecy. - * - * @see Prophecy\Prediction\CallPrediction - * - * @return $this - */ - public function shouldBeCalled() - { - return $this->should(new Prediction\CallPrediction); - } - - /** - * Sets no calls prediction to the prophecy. - * - * @see Prophecy\Prediction\NoCallsPrediction - * - * @return $this - */ - public function shouldNotBeCalled() - { - return $this->should(new Prediction\NoCallsPrediction); - } - - /** - * Sets call times prediction to the prophecy. - * - * @see Prophecy\Prediction\CallTimesPrediction - * - * @param $count - * - * @return $this - */ - public function shouldBeCalledTimes($count) - { - return $this->should(new Prediction\CallTimesPrediction($count)); - } - - /** - * Checks provided prediction immediately. - * - * @param callable|Prediction\PredictionInterface $prediction - * - * @return $this - * - * @throws \Prophecy\Exception\InvalidArgumentException - */ - public function shouldHave($prediction) - { - if (is_callable($prediction)) { - $prediction = new Prediction\CallbackPrediction($prediction); - } - - if (!$prediction instanceof Prediction\PredictionInterface) { - throw new InvalidArgumentException(sprintf( - 'Expected callable or instance of PredictionInterface, but got %s.', - gettype($prediction) - )); - } - - if (null === $this->promise) { - $this->willReturn(); - } - - $calls = $this->getObjectProphecy()->findProphecyMethodCalls( - $this->getMethodName(), - $this->getArgumentsWildcard() - ); - - try { - $prediction->check($calls, $this->getObjectProphecy(), $this); - $this->checkedPredictions[] = $prediction; - } catch (\Exception $e) { - $this->checkedPredictions[] = $prediction; - - throw $e; - } - - return $this; - } - - /** - * Checks call prediction. - * - * @see Prophecy\Prediction\CallPrediction - * - * @return $this - */ - public function shouldHaveBeenCalled() - { - return $this->shouldHave(new Prediction\CallPrediction); - } - - /** - * Checks no calls prediction. - * - * @see Prophecy\Prediction\NoCallsPrediction - * - * @return $this - */ - public function shouldNotHaveBeenCalled() - { - return $this->shouldHave(new Prediction\NoCallsPrediction); - } - - /** - * Checks no calls prediction. - * - * @see Prophecy\Prediction\NoCallsPrediction - * @deprecated - * - * @return $this - */ - public function shouldNotBeenCalled() - { - return $this->shouldNotHaveBeenCalled(); - } - - /** - * Checks call times prediction. - * - * @see Prophecy\Prediction\CallTimesPrediction - * - * @param int $count - * - * @return $this - */ - public function shouldHaveBeenCalledTimes($count) - { - return $this->shouldHave(new Prediction\CallTimesPrediction($count)); - } - - /** - * Checks currently registered [with should(...)] prediction. - */ - public function checkPrediction() - { - if (null === $this->prediction) { - return; - } - - $this->shouldHave($this->prediction); - } - - /** - * Returns currently registered promise. - * - * @return null|Promise\PromiseInterface - */ - public function getPromise() - { - return $this->promise; - } - - /** - * Returns currently registered prediction. - * - * @return null|Prediction\PredictionInterface - */ - public function getPrediction() - { - return $this->prediction; - } - - /** - * Returns predictions that were checked on this object. - * - * @return Prediction\PredictionInterface[] - */ - public function getCheckedPredictions() - { - return $this->checkedPredictions; - } - - /** - * Returns object prophecy this method prophecy is tied to. - * - * @return ObjectProphecy - */ - public function getObjectProphecy() - { - return $this->objectProphecy; - } - - /** - * Returns method name. - * - * @return string - */ - public function getMethodName() - { - return $this->methodName; - } - - /** - * Returns arguments wildcard. - * - * @return Argument\ArgumentsWildcard - */ - public function getArgumentsWildcard() - { - return $this->argumentsWildcard; - } - - private function bindToObjectProphecy() - { - if ($this->bound) { - return; - } - - $this->getObjectProphecy()->addMethodProphecy($this); - $this->bound = true; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php deleted file mode 100644 index 43dba46d..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php +++ /dev/null @@ -1,279 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -use SebastianBergmann\Comparator\ComparisonFailure; -use Prophecy\Comparator\Factory as ComparatorFactory; -use Prophecy\Call\Call; -use Prophecy\Doubler\LazyDouble; -use Prophecy\Argument\ArgumentsWildcard; -use Prophecy\Call\CallCenter; -use Prophecy\Exception\Prophecy\ObjectProphecyException; -use Prophecy\Exception\Prophecy\MethodProphecyException; -use Prophecy\Exception\Prediction\AggregateException; -use Prophecy\Exception\Prediction\PredictionException; - -/** - * Object prophecy. - * - * @author Konstantin Kudryashov - */ -class ObjectProphecy implements ProphecyInterface -{ - private $lazyDouble; - private $callCenter; - private $revealer; - private $comparatorFactory; - - /** - * @var MethodProphecy[][] - */ - private $methodProphecies = array(); - - /** - * Initializes object prophecy. - * - * @param LazyDouble $lazyDouble - * @param CallCenter $callCenter - * @param RevealerInterface $revealer - * @param ComparatorFactory $comparatorFactory - */ - public function __construct( - LazyDouble $lazyDouble, - CallCenter $callCenter = null, - RevealerInterface $revealer = null, - ComparatorFactory $comparatorFactory = null - ) { - $this->lazyDouble = $lazyDouble; - $this->callCenter = $callCenter ?: new CallCenter; - $this->revealer = $revealer ?: new Revealer; - - $this->comparatorFactory = $comparatorFactory ?: ComparatorFactory::getInstance(); - } - - /** - * Forces double to extend specific class. - * - * @param string $class - * - * @return $this - */ - public function willExtend($class) - { - $this->lazyDouble->setParentClass($class); - - return $this; - } - - /** - * Forces double to implement specific interface. - * - * @param string $interface - * - * @return $this - */ - public function willImplement($interface) - { - $this->lazyDouble->addInterface($interface); - - return $this; - } - - /** - * Sets constructor arguments. - * - * @param array $arguments - * - * @return $this - */ - public function willBeConstructedWith(array $arguments = null) - { - $this->lazyDouble->setArguments($arguments); - - return $this; - } - - /** - * Reveals double. - * - * @return object - * - * @throws \Prophecy\Exception\Prophecy\ObjectProphecyException If double doesn't implement needed interface - */ - public function reveal() - { - $double = $this->lazyDouble->getInstance(); - - if (null === $double || !$double instanceof ProphecySubjectInterface) { - throw new ObjectProphecyException( - "Generated double must implement ProphecySubjectInterface, but it does not.\n". - 'It seems you have wrongly configured doubler without required ClassPatch.', - $this - ); - } - - $double->setProphecy($this); - - return $double; - } - - /** - * Adds method prophecy to object prophecy. - * - * @param MethodProphecy $methodProphecy - * - * @throws \Prophecy\Exception\Prophecy\MethodProphecyException If method prophecy doesn't - * have arguments wildcard - */ - public function addMethodProphecy(MethodProphecy $methodProphecy) - { - $argumentsWildcard = $methodProphecy->getArgumentsWildcard(); - if (null === $argumentsWildcard) { - throw new MethodProphecyException(sprintf( - "Can not add prophecy for a method `%s::%s()`\n". - "as you did not specify arguments wildcard for it.", - get_class($this->reveal()), - $methodProphecy->getMethodName() - ), $methodProphecy); - } - - $methodName = $methodProphecy->getMethodName(); - - if (!isset($this->methodProphecies[$methodName])) { - $this->methodProphecies[$methodName] = array(); - } - - $this->methodProphecies[$methodName][] = $methodProphecy; - } - - /** - * Returns either all or related to single method prophecies. - * - * @param null|string $methodName - * - * @return MethodProphecy[] - */ - public function getMethodProphecies($methodName = null) - { - if (null === $methodName) { - return $this->methodProphecies; - } - - if (!isset($this->methodProphecies[$methodName])) { - return array(); - } - - return $this->methodProphecies[$methodName]; - } - - /** - * Makes specific method call. - * - * @param string $methodName - * @param array $arguments - * - * @return mixed - */ - public function makeProphecyMethodCall($methodName, array $arguments) - { - $arguments = $this->revealer->reveal($arguments); - $return = $this->callCenter->makeCall($this, $methodName, $arguments); - - return $this->revealer->reveal($return); - } - - /** - * Finds calls by method name & arguments wildcard. - * - * @param string $methodName - * @param ArgumentsWildcard $wildcard - * - * @return Call[] - */ - public function findProphecyMethodCalls($methodName, ArgumentsWildcard $wildcard) - { - return $this->callCenter->findCalls($methodName, $wildcard); - } - - /** - * Checks that registered method predictions do not fail. - * - * @throws \Prophecy\Exception\Prediction\AggregateException If any of registered predictions fail - */ - public function checkProphecyMethodsPredictions() - { - $exception = new AggregateException(sprintf("%s:\n", get_class($this->reveal()))); - $exception->setObjectProphecy($this); - - foreach ($this->methodProphecies as $prophecies) { - foreach ($prophecies as $prophecy) { - try { - $prophecy->checkPrediction(); - } catch (PredictionException $e) { - $exception->append($e); - } - } - } - - if (count($exception->getExceptions())) { - throw $exception; - } - } - - /** - * Creates new method prophecy using specified method name and arguments. - * - * @param string $methodName - * @param array $arguments - * - * @return MethodProphecy - */ - public function __call($methodName, array $arguments) - { - $arguments = new ArgumentsWildcard($this->revealer->reveal($arguments)); - - foreach ($this->getMethodProphecies($methodName) as $prophecy) { - $argumentsWildcard = $prophecy->getArgumentsWildcard(); - $comparator = $this->comparatorFactory->getComparatorFor( - $argumentsWildcard, $arguments - ); - - try { - $comparator->assertEquals($argumentsWildcard, $arguments); - return $prophecy; - } catch (ComparisonFailure $failure) {} - } - - return new MethodProphecy($this, $methodName, $arguments); - } - - /** - * Tries to get property value from double. - * - * @param string $name - */ - public function __get($name) - { - return $this->reveal()->$name; - } - - /** - * Tries to set property value to double. - * - * @param string $name - * @param string $value - */ - public function __set($name, $value) - { - $this->reveal()->$name = $this->revealer->reveal($value); - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php deleted file mode 100644 index 462f15a9..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php +++ /dev/null @@ -1,27 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Core Prophecy interface. - * - * @author Konstantin Kudryashov - */ -interface ProphecyInterface -{ - /** - * Reveals prophecy object (double) . - * - * @return object - */ - public function reveal(); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php deleted file mode 100644 index 2d839585..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php +++ /dev/null @@ -1,34 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Controllable doubles interface. - * - * @author Konstantin Kudryashov - */ -interface ProphecySubjectInterface -{ - /** - * Sets subject prophecy. - * - * @param ProphecyInterface $prophecy - */ - public function setProphecy(ProphecyInterface $prophecy); - - /** - * Returns subject prophecy. - * - * @return ProphecyInterface - */ - public function getProphecy(); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php deleted file mode 100644 index 60ecdac8..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php +++ /dev/null @@ -1,44 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Basic prophecies revealer. - * - * @author Konstantin Kudryashov - */ -class Revealer implements RevealerInterface -{ - /** - * Unwraps value(s). - * - * @param mixed $value - * - * @return mixed - */ - public function reveal($value) - { - if (is_array($value)) { - return array_map(array($this, __FUNCTION__), $value); - } - - if (!is_object($value)) { - return $value; - } - - if ($value instanceof ProphecyInterface) { - $value = $value->reveal(); - } - - return $value; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php deleted file mode 100644 index ffc82bb6..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php +++ /dev/null @@ -1,29 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Prophecy; - -/** - * Prophecies revealer interface. - * - * @author Konstantin Kudryashov - */ -interface RevealerInterface -{ - /** - * Unwraps value(s). - * - * @param mixed $value - * - * @return mixed - */ - public function reveal($value); -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/server/vendor/phpspec/prophecy/src/Prophecy/Prophet.php deleted file mode 100644 index ac649234..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Prophet.php +++ /dev/null @@ -1,134 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy; - -use Prophecy\Doubler\Doubler; -use Prophecy\Doubler\LazyDouble; -use Prophecy\Doubler\ClassPatch; -use Prophecy\Prophecy\ObjectProphecy; -use Prophecy\Prophecy\RevealerInterface; -use Prophecy\Prophecy\Revealer; -use Prophecy\Call\CallCenter; -use Prophecy\Util\StringUtil; -use Prophecy\Exception\Prediction\PredictionException; -use Prophecy\Exception\Prediction\AggregateException; - -/** - * Prophet creates prophecies. - * - * @author Konstantin Kudryashov - */ -class Prophet -{ - private $doubler; - private $revealer; - private $util; - - /** - * @var ObjectProphecy[] - */ - private $prophecies = array(); - - /** - * Initializes Prophet. - * - * @param null|Doubler $doubler - * @param null|RevealerInterface $revealer - * @param null|StringUtil $util - */ - public function __construct(Doubler $doubler = null, RevealerInterface $revealer = null, - StringUtil $util = null) - { - if (null === $doubler) { - $doubler = new Doubler; - $doubler->registerClassPatch(new ClassPatch\SplFileInfoPatch); - $doubler->registerClassPatch(new ClassPatch\TraversablePatch); - $doubler->registerClassPatch(new ClassPatch\DisableConstructorPatch); - $doubler->registerClassPatch(new ClassPatch\ProphecySubjectPatch); - $doubler->registerClassPatch(new ClassPatch\ReflectionClassNewInstancePatch); - $doubler->registerClassPatch(new ClassPatch\HhvmExceptionPatch()); - $doubler->registerClassPatch(new ClassPatch\MagicCallPatch); - $doubler->registerClassPatch(new ClassPatch\KeywordPatch); - } - - $this->doubler = $doubler; - $this->revealer = $revealer ?: new Revealer; - $this->util = $util ?: new StringUtil; - } - - /** - * Creates new object prophecy. - * - * @param null|string $classOrInterface Class or interface name - * - * @return ObjectProphecy - */ - public function prophesize($classOrInterface = null) - { - $this->prophecies[] = $prophecy = new ObjectProphecy( - new LazyDouble($this->doubler), - new CallCenter($this->util), - $this->revealer - ); - - if ($classOrInterface && class_exists($classOrInterface)) { - return $prophecy->willExtend($classOrInterface); - } - - if ($classOrInterface && interface_exists($classOrInterface)) { - return $prophecy->willImplement($classOrInterface); - } - - return $prophecy; - } - - /** - * Returns all created object prophecies. - * - * @return ObjectProphecy[] - */ - public function getProphecies() - { - return $this->prophecies; - } - - /** - * Returns Doubler instance assigned to this Prophet. - * - * @return Doubler - */ - public function getDoubler() - { - return $this->doubler; - } - - /** - * Checks all predictions defined by prophecies of this Prophet. - * - * @throws Exception\Prediction\AggregateException If any prediction fails - */ - public function checkPredictions() - { - $exception = new AggregateException("Some predictions failed:\n"); - foreach ($this->prophecies as $prophecy) { - try { - $prophecy->checkProphecyMethodsPredictions(); - } catch (PredictionException $e) { - $exception->append($e); - } - } - - if (count($exception->getExceptions())) { - throw $exception; - } - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/server/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php deleted file mode 100644 index 54d38321..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php +++ /dev/null @@ -1,185 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Exporting utility. - * - * This class is derived from the PHPUnit testing framework. - * - * @author Sebastiaan Stok - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License> - */ -class ExportUtil -{ - /** - * Exports a value into a string. - * - * The output of this method is similar to the output of print_r(), but - * improved in various aspects: - * - * - NULL is rendered as "null" (instead of "") - * - true is rendered as "true" (instead of "1") - * - FALSE is rendered as "false" (instead of "") - * - Strings are always quoted with single quotes - * - Carriage returns and newlines are normalized to \n - * - Recursion and repeated rendering is treated properly - * - * @param mixed $value The value to export - * @param integer $indentation The indentation level of the 2nd+ line - * - * @return string - */ - public static function export($value, $indentation = 0) - { - return static::recursiveExport($value, $indentation); - } - - /** - * Converts an object to an array containing all of its private, protected - * and public properties. - * - * @param object $object - * - * @return array - */ - public static function toArray($object) - { - $array = array(); - - foreach ((array) $object as $key => $value) { - // properties are transformed to keys in the following way: - - // private $property => "\0Classname\0property" - // protected $property => "\0*\0property" - // public $property => "property" - - if (preg_match('/^\0.+\0(.+)$/', $key, $matches)) { - $key = $matches[1]; - } - - $array[$key] = $value; - } - - // Some internal classes like SplObjectStorage don't work with the - // above (fast) mechanism nor with reflection - // Format the output similarly to print_r() in this case - if ($object instanceof SplObjectStorage) { - foreach ($object as $key => $value) { - $array[spl_object_hash($value)] = array( - 'obj' => $value, - 'inf' => $object->getInfo(), - ); - } - } - - return $array; - } - - /** - * Recursive implementation of export. - * - * @param mixed $value The value to export - * @param integer $indentation The indentation level of the 2nd+ line - * @param array $processedObjects Contains all objects that were already - * rendered - * - * @return string - */ - protected static function recursiveExport($value, $indentation, &$processedObjects = array()) - { - if ($value === null) { - return 'null'; - } - - if ($value === true) { - return 'true'; - } - - if ($value === false) { - return 'false'; - } - - if (is_string($value)) { - // Match for most non printable chars somewhat taking multibyte chars into account - if (preg_match('/[^\x09-\x0d\x20-\xff]/', $value)) { - return 'Binary String: 0x' . bin2hex($value); - } - - return "'" . str_replace(array("\r\n", "\n\r", "\r"), array("\n", "\n", "\n"), $value) . "'"; - } - - $origValue = $value; - - if (is_object($value)) { - if ($value instanceof ProphecyInterface) { - return sprintf('%s Object (*Prophecy*)', get_class($value)); - } elseif (in_array($value, $processedObjects, true)) { - return sprintf('%s Object (*RECURSION*)', get_class($value)); - } - - $processedObjects[] = $value; - - // Convert object to array - $value = self::toArray($value); - } - - if (is_array($value)) { - $whitespace = str_repeat(' ', $indentation); - - // There seems to be no other way to check arrays for recursion - // http://www.php.net/manual/en/language.types.array.php#73936 - preg_match_all('/\n \[(\w+)\] => Array\s+\*RECURSION\*/', print_r($value, true), $matches); - $recursiveKeys = array_unique($matches[1]); - - // Convert to valid array keys - // Numeric integer strings are automatically converted to integers - // by PHP - foreach ($recursiveKeys as $key => $recursiveKey) { - if ((string) (integer) $recursiveKey === $recursiveKey) { - $recursiveKeys[$key] = (integer) $recursiveKey; - } - } - - $content = ''; - - foreach ($value as $key => $val) { - if (in_array($key, $recursiveKeys, true)) { - $val = 'Array (*RECURSION*)'; - } else { - $val = self::recursiveExport($val, $indentation + 1, $processedObjects); - } - - $content .= $whitespace . ' ' . self::export($key) . ' => ' . $val . "\n"; - } - - if (strlen($content) > 0) { - $content = "\n" . $content . $whitespace; - } - - return sprintf( - "%s (%s)", - is_object($origValue) ? sprintf('%s:%s', get_class($origValue), spl_object_hash($origValue)) . ' Object' : 'Array', $content - ); - } - - if (is_double($value) && (double)(integer) $value === $value) { - return $value . '.0'; - } - - return (string) $value; - } -} diff --git a/server/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/server/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php deleted file mode 100644 index bb90156a..00000000 --- a/server/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php +++ /dev/null @@ -1,89 +0,0 @@ - - * Marcello Duarte - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Prophecy\Util; - -use Prophecy\Call\Call; - -/** - * String utility. - * - * @author Konstantin Kudryashov - */ -class StringUtil -{ - /** - * Stringifies any provided value. - * - * @param mixed $value - * @param boolean $exportObject - * - * @return string - */ - public function stringify($value, $exportObject = true) - { - if (is_array($value)) { - if (range(0, count($value) - 1) === array_keys($value)) { - return '['.implode(', ', array_map(array($this, __FUNCTION__), $value)).']'; - } - - $stringify = array($this, __FUNCTION__); - - return '['.implode(', ', array_map(function ($item, $key) use ($stringify) { - return (is_integer($key) ? $key : '"'.$key.'"'). - ' => '.call_user_func($stringify, $item); - }, $value, array_keys($value))).']'; - } - if (is_resource($value)) { - return get_resource_type($value).':'.$value; - } - if (is_object($value)) { - return $exportObject ? ExportUtil::export($value) : sprintf('%s:%s', get_class($value), spl_object_hash($value)); - } - if (true === $value || false === $value) { - return $value ? 'true' : 'false'; - } - if (is_string($value)) { - $str = sprintf('"%s"', str_replace("\n", '\\n', $value)); - - if (50 <= strlen($str)) { - return substr($str, 0, 50).'"...'; - } - - return $str; - } - if (null === $value) { - return 'null'; - } - - return (string) $value; - } - - /** - * Stringifies provided array of calls. - * - * @param Call[] $calls Array of Call instances - * - * @return string - */ - public function stringifyCalls(array $calls) - { - $self = $this; - - return implode(PHP_EOL, array_map(function (Call $call) use ($self) { - return sprintf(' - %s(%s) @ %s', - $call->getMethodName(), - implode(', ', array_map(array($self, 'stringify'), $call->getArguments())), - str_replace(GETCWD().DIRECTORY_SEPARATOR, '', $call->getCallPlace()) - ); - }, $calls)); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/.gitattributes b/server/vendor/phpunit/php-code-coverage/.gitattributes deleted file mode 100644 index 461090b7..00000000 --- a/server/vendor/phpunit/php-code-coverage/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.php diff=php diff --git a/server/vendor/phpunit/php-code-coverage/.gitignore b/server/vendor/phpunit/php-code-coverage/.gitignore deleted file mode 100644 index b386531f..00000000 --- a/server/vendor/phpunit/php-code-coverage/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -build/api -build/code-browser -build/coverage -build/logs -build/pdepend -cache.properties -phpunit.xml -/vendor -/composer.lock -/composer.phar -/.idea diff --git a/server/vendor/phpunit/php-code-coverage/.php_cs b/server/vendor/phpunit/php-code-coverage/.php_cs deleted file mode 100644 index 44bebf6a..00000000 --- a/server/vendor/phpunit/php-code-coverage/.php_cs +++ /dev/null @@ -1,43 +0,0 @@ -files() - ->in('src') - ->in('tests') - ->name('*.php'); - -return Symfony\CS\Config\Config::create() - ->level(\Symfony\CS\FixerInterface::NONE_LEVEL) - ->fixers( - array( - 'duplicate_semicolon', - 'empty_return', - 'extra_empty_lines', - 'join_function', - 'list_commas', - 'no_blank_lines_after_class_opening', - 'no_empty_lines_after_phpdocs', - 'phpdoc_indent', - 'phpdoc_no_access', - 'phpdoc_no_empty_return', - 'phpdoc_no_package', - 'phpdoc_params', - 'phpdoc_scalar', - 'phpdoc_to_comment', - 'phpdoc_trim', - 'return', - 'self_accessor', - 'single_quote', - 'spaces_before_semicolon', - 'spaces_cast', - 'ternary_spaces', - 'trim_array_spaces', - 'unused_use', - 'whitespacy_lines', - 'align_double_arrow', - 'align_equals', - 'concat_with_spaces', - 'short_array_syntax' - ) - ) - ->finder($finder); - diff --git a/server/vendor/phpunit/php-code-coverage/.travis.yml b/server/vendor/phpunit/php-code-coverage/.travis.yml deleted file mode 100644 index 8bceea85..00000000 --- a/server/vendor/phpunit/php-code-coverage/.travis.yml +++ /dev/null @@ -1,16 +0,0 @@ -language: php - -php: - - 5.6 - -before_script: - - COMPOSER_ROOT_VERSION=dev-master composer install --prefer-source - -script: vendor/bin/phpunit --configuration ./build/travis-ci.xml - -notifications: - email: false - irc: - channels: - - "irc.freenode.org#phpunit" - use_notice: true diff --git a/server/vendor/phpunit/php-code-coverage/CONTRIBUTING.md b/server/vendor/phpunit/php-code-coverage/CONTRIBUTING.md deleted file mode 100644 index 76a43458..00000000 --- a/server/vendor/phpunit/php-code-coverage/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for details on how to contribute to this project. diff --git a/server/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md b/server/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md deleted file mode 100644 index 353b6f65..00000000 --- a/server/vendor/phpunit/php-code-coverage/ChangeLog-2.2.md +++ /dev/null @@ -1,56 +0,0 @@ -# Changes in PHP_CodeCoverage 2.2 - -All notable changes of the PHP_CodeCoverage 2.2 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [2.2.4] - 2015-10-06 - -### Fixed - -* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `` tag - -## [2.2.3] - 2015-09-14 - -### Fixed - -* Fixed [#368](https://github.com/sebastianbergmann/php-code-coverage/pull/368): Blacklists and whitelists are not merged when merging data sets -* Fixed [#370](https://github.com/sebastianbergmann/php-code-coverage/issues/370): Confusing statistics for source file that declares a class without methods -* Fixed [#372](https://github.com/sebastianbergmann/php-code-coverage/pull/372): Nested classes and functions are not handled correctly -* Fixed [#382](https://github.com/sebastianbergmann/php-code-coverage/issues/382): Crap4J report generates incorrect XML logfile - -## [2.2.2] - 2015-08-04 - -### Added - -* Reintroduced the `PHP_CodeCoverage_Driver_HHVM` driver as an extension of `PHP_CodeCoverage_Driver_Xdebug` that does not use `xdebug_start_code_coverage()` with options not supported by HHVM - -### Changed - -* Bumped required version of `sebastian/environment` to 1.3.2 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365) - -## [2.2.1] - 2015-08-02 - -### Changed - -* Bumped required version of `sebastian/environment` to 1.3.1 for [#365](https://github.com/sebastianbergmann/php-code-coverage/issues/365) - -## [2.2.0] - 2015-08-01 - -### Added - -* Added a driver for PHPDBG (requires PHP 7) -* Added `PHP_CodeCoverage::setDisableIgnoredLines()` to disable the ignoring of lines using annotations such as `@codeCoverageIgnore` - -### Changed - -* Annotating a method with `@deprecated` now has the same effect as annotating it with `@codeCoverageIgnore` - -### Removed - -* The dedicated driver for HHVM, `PHP_CodeCoverage_Driver_HHVM` has been removed - -[2.2.4]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.3...2.2.4 -[2.2.3]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.2...2.2.3 -[2.2.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.1...2.2.2 -[2.2.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2.0...2.2.1 -[2.2.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.1...2.2.0 - diff --git a/server/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md b/server/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md deleted file mode 100644 index a39fa8d4..00000000 --- a/server/vendor/phpunit/php-code-coverage/ChangeLog-3.0.md +++ /dev/null @@ -1,31 +0,0 @@ -# Changes in PHP_CodeCoverage 3.0 - -All notable changes of the PHP_CodeCoverage 3.0 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. - -## [3.0.2] - 2015-11-12 - -### Changed - -* It is now optional that `@deprecated` code is ignored - -## [3.0.1] - 2015-10-06 - -### Fixed - -* Fixed [#391](https://github.com/sebastianbergmann/php-code-coverage/pull/391): Missing `` tag - -## [3.0.0] - 2015-10-02 - -### Changed - -* It is now mandatory to configure a whitelist - -### Removed - -* The blacklist functionality has been removed -* PHP_CodeCoverage is no longer supported on PHP 5.3, PHP 5.4, and PHP 5.5 - -[3.0.2]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0.1...3.0.2 -[3.0.1]: https://github.com/sebastianbergmann/php-code-coverage/compare/3.0.0...3.0.1 -[3.0.0]: https://github.com/sebastianbergmann/php-code-coverage/compare/2.2...3.0.0 - diff --git a/server/vendor/phpunit/php-code-coverage/LICENSE b/server/vendor/phpunit/php-code-coverage/LICENSE deleted file mode 100644 index fcfa37e8..00000000 --- a/server/vendor/phpunit/php-code-coverage/LICENSE +++ /dev/null @@ -1,33 +0,0 @@ -PHP_CodeCoverage - -Copyright (c) 2009-2015, Sebastian Bergmann . -All 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. - - * Neither the name of Sebastian Bergmann nor the names of his - contributors may 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. diff --git a/server/vendor/phpunit/php-code-coverage/README.md b/server/vendor/phpunit/php-code-coverage/README.md deleted file mode 100644 index 43dcb61b..00000000 --- a/server/vendor/phpunit/php-code-coverage/README.md +++ /dev/null @@ -1,50 +0,0 @@ -[![Latest Stable Version](https://poser.pugx.org/phpunit/php-code-coverage/v/stable.png)](https://packagist.org/packages/phpunit/php-code-coverage) -[![Build Status](https://travis-ci.org/sebastianbergmann/php-code-coverage.svg?branch=master)](https://travis-ci.org/sebastianbergmann/php-code-coverage) - -# PHP_CodeCoverage - -**PHP_CodeCoverage** is a library that provides collection, processing, and rendering functionality for PHP code coverage information. - -## Requirements - -PHP 5.6 is required but using the latest version of PHP is highly recommended - -### PHP 5 - -[Xdebug](http://xdebug.org/) is the only source of raw code coverage data supported for PHP 5. Version 2.1.3 of Xdebug is required but using the latest version is highly recommended. - -### PHP 7 - -[phpdbg](http://phpdbg.com/docs) is currently the only source of raw code coverage data supported for PHP 7. Once Xdebug has been updated for PHP 7 it, too, will be supported. - -### HHVM - -A version of HHVM that implements the Xdebug API for code coverage (`xdebug_*_code_coverage()`) is required. - -## Installation - -To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 3.0: - - { - "require": { - "phpunit/php-code-coverage": "^3" - } - } - -## Using the PHP_CodeCoverage API - -```php -start(''); - -// ... - -$coverage->stop(); - -$writer = new PHP_CodeCoverage_Report_Clover; -$writer->process($coverage, '/tmp/clover.xml'); - -$writer = new PHP_CodeCoverage_Report_HTML; -$writer->process($coverage, '/tmp/code-coverage-report'); -``` diff --git a/server/vendor/phpunit/php-code-coverage/build.xml b/server/vendor/phpunit/php-code-coverage/build.xml deleted file mode 100644 index c335d158..00000000 --- a/server/vendor/phpunit/php-code-coverage/build.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/server/vendor/phpunit/php-code-coverage/composer.json b/server/vendor/phpunit/php-code-coverage/composer.json deleted file mode 100644 index 7c062282..00000000 --- a/server/vendor/phpunit/php-code-coverage/composer.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "phpunit/php-code-coverage", - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "type": "library", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "irc": "irc://irc.freenode.net/phpunit" - }, - "require": { - "php": ">=5.6", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-token-stream": "~1.3", - "phpunit/php-text-template": "~1.2", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~5", - "ext-xdebug": ">=2.1.4" - }, - "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - } -} diff --git a/server/vendor/phpunit/php-code-coverage/phpunit.xml.dist b/server/vendor/phpunit/php-code-coverage/phpunit.xml.dist deleted file mode 100644 index f5fa606e..00000000 --- a/server/vendor/phpunit/php-code-coverage/phpunit.xml.dist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - tests/PHP - - - - - - - - - - - - src - - - - diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage.php deleted file mode 100644 index 759e86d1..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage.php +++ /dev/null @@ -1,934 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use SebastianBergmann\Environment\Runtime; - -/** - * Provides collection functionality for PHP code coverage information. - * - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage -{ - /** - * @var PHP_CodeCoverage_Driver - */ - private $driver; - - /** - * @var PHP_CodeCoverage_Filter - */ - private $filter; - - /** - * @var bool - */ - private $cacheTokens = false; - - /** - * @var bool - */ - private $checkForUnintentionallyCoveredCode = false; - - /** - * @var bool - */ - private $forceCoversAnnotation = false; - - /** - * @var bool - */ - private $mapTestClassNameToCoveredClassName = false; - - /** - * @var bool - */ - private $addUncoveredFilesFromWhitelist = true; - - /** - * @var bool - */ - private $processUncoveredFilesFromWhitelist = false; - - /** - * @var bool - */ - private $ignoreDeprecatedCode = false; - - /** - * @var mixed - */ - private $currentId; - - /** - * Code coverage data. - * - * @var array - */ - private $data = []; - - /** - * @var array - */ - private $ignoredLines = []; - - /** - * @var bool - */ - private $disableIgnoredLines = false; - - /** - * Test data. - * - * @var array - */ - private $tests = []; - - /** - * Constructor. - * - * @param PHP_CodeCoverage_Driver $driver - * @param PHP_CodeCoverage_Filter $filter - * @throws PHP_CodeCoverage_RuntimeException - */ - public function __construct(PHP_CodeCoverage_Driver $driver = null, PHP_CodeCoverage_Filter $filter = null) - { - if ($driver === null) { - $driver = $this->selectDriver(); - } - - if ($filter === null) { - $filter = new PHP_CodeCoverage_Filter; - } - - $this->driver = $driver; - $this->filter = $filter; - } - - /** - * Returns the PHP_CodeCoverage_Report_Node_* object graph - * for this PHP_CodeCoverage object. - * - * @return PHP_CodeCoverage_Report_Node_Directory - * @since Method available since Release 1.1.0 - */ - public function getReport() - { - $factory = new PHP_CodeCoverage_Report_Factory; - - return $factory->create($this); - } - - /** - * Clears collected code coverage data. - */ - public function clear() - { - $this->currentId = null; - $this->data = []; - $this->tests = []; - } - - /** - * Returns the PHP_CodeCoverage_Filter used. - * - * @return PHP_CodeCoverage_Filter - */ - public function filter() - { - return $this->filter; - } - - /** - * Returns the collected code coverage data. - * Set $raw = true to bypass all filters. - * - * @param bool $raw - * @return array - * @since Method available since Release 1.1.0 - */ - public function getData($raw = false) - { - if (!$raw && $this->addUncoveredFilesFromWhitelist) { - $this->addUncoveredFilesFromWhitelist(); - } - - return $this->data; - } - - /** - * Sets the coverage data. - * - * @param array $data - * @since Method available since Release 2.0.0 - */ - public function setData(array $data) - { - $this->data = $data; - } - - /** - * Returns the test data. - * - * @return array - * @since Method available since Release 1.1.0 - */ - public function getTests() - { - return $this->tests; - } - - /** - * Sets the test data. - * - * @param array $tests - * @since Method available since Release 2.0.0 - */ - public function setTests(array $tests) - { - $this->tests = $tests; - } - - /** - * Start collection of code coverage information. - * - * @param mixed $id - * @param bool $clear - * @throws PHP_CodeCoverage_InvalidArgumentException - */ - public function start($id, $clear = false) - { - if (!is_bool($clear)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - if ($clear) { - $this->clear(); - } - - $this->currentId = $id; - - $this->driver->start(); - } - - /** - * Stop collection of code coverage information. - * - * @param bool $append - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @return array - * @throws PHP_CodeCoverage_InvalidArgumentException - */ - public function stop($append = true, $linesToBeCovered = [], array $linesToBeUsed = []) - { - if (!is_bool($append)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 2, - 'array or false' - ); - } - - $data = $this->driver->stop(); - $this->append($data, null, $append, $linesToBeCovered, $linesToBeUsed); - - $this->currentId = null; - - return $data; - } - - /** - * Appends code coverage data. - * - * @param array $data - * @param mixed $id - * @param bool $append - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_RuntimeException - */ - public function append(array $data, $id = null, $append = true, $linesToBeCovered = [], array $linesToBeUsed = []) - { - if ($id === null) { - $id = $this->currentId; - } - - if ($id === null) { - throw new PHP_CodeCoverage_RuntimeException; - } - - $this->applyListsFilter($data); - $this->applyIgnoredLinesFilter($data); - $this->initializeFilesThatAreSeenTheFirstTime($data); - - if (!$append) { - return; - } - - if ($id != 'UNCOVERED_FILES_FROM_WHITELIST') { - $this->applyCoversAnnotationFilter( - $data, - $linesToBeCovered, - $linesToBeUsed - ); - } - - if (empty($data)) { - return; - } - - $size = 'unknown'; - $status = null; - - if ($id instanceof PHPUnit_Framework_TestCase) { - $_size = $id->getSize(); - - if ($_size == PHPUnit_Util_Test::SMALL) { - $size = 'small'; - } elseif ($_size == PHPUnit_Util_Test::MEDIUM) { - $size = 'medium'; - } elseif ($_size == PHPUnit_Util_Test::LARGE) { - $size = 'large'; - } - - $status = $id->getStatus(); - $id = get_class($id) . '::' . $id->getName(); - } elseif ($id instanceof PHPUnit_Extensions_PhptTestCase) { - $size = 'large'; - $id = $id->getName(); - } - - $this->tests[$id] = ['size' => $size, 'status' => $status]; - - foreach ($data as $file => $lines) { - if (!$this->filter->isFile($file)) { - continue; - } - - foreach ($lines as $k => $v) { - if ($v == PHP_CodeCoverage_Driver::LINE_EXECUTED) { - if (empty($this->data[$file][$k]) || !in_array($id, $this->data[$file][$k])) { - $this->data[$file][$k][] = $id; - } - } - } - } - } - - /** - * Merges the data from another instance of PHP_CodeCoverage. - * - * @param PHP_CodeCoverage $that - */ - public function merge(PHP_CodeCoverage $that) - { - $this->filter->setWhitelistedFiles( - array_merge($this->filter->getWhitelistedFiles(), $that->filter()->getWhitelistedFiles()) - ); - - foreach ($that->data as $file => $lines) { - if (!isset($this->data[$file])) { - if (!$this->filter->isFiltered($file)) { - $this->data[$file] = $lines; - } - - continue; - } - - foreach ($lines as $line => $data) { - if ($data !== null) { - if (!isset($this->data[$file][$line])) { - $this->data[$file][$line] = $data; - } else { - $this->data[$file][$line] = array_unique( - array_merge($this->data[$file][$line], $data) - ); - } - } - } - } - - $this->tests = array_merge($this->tests, $that->getTests()); - - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - * @since Method available since Release 1.1.0 - */ - public function setCacheTokens($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->cacheTokens = $flag; - } - - /** - * @since Method available since Release 1.1.0 - */ - public function getCacheTokens() - { - return $this->cacheTokens; - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - * @since Method available since Release 2.0.0 - */ - public function setCheckForUnintentionallyCoveredCode($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->checkForUnintentionallyCoveredCode = $flag; - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - */ - public function setForceCoversAnnotation($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->forceCoversAnnotation = $flag; - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - */ - public function setMapTestClassNameToCoveredClassName($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->mapTestClassNameToCoveredClassName = $flag; - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - */ - public function setAddUncoveredFilesFromWhitelist($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->addUncoveredFilesFromWhitelist = $flag; - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - */ - public function setProcessUncoveredFilesFromWhitelist($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->processUncoveredFilesFromWhitelist = $flag; - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - */ - public function setDisableIgnoredLines($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->disableIgnoredLines = $flag; - } - - /** - * @param bool $flag - * @throws PHP_CodeCoverage_InvalidArgumentException - * @since Method available since Release 3.0.2 - */ - public function setIgnoreDeprecatedCode($flag) - { - if (!is_bool($flag)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'boolean' - ); - } - - $this->ignoreDeprecatedCode = $flag; - } - - /** - * Applies the @covers annotation filtering. - * - * @param array $data - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_UnintentionallyCoveredCodeException - */ - private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, array $linesToBeUsed) - { - if ($linesToBeCovered === false || - ($this->forceCoversAnnotation && empty($linesToBeCovered))) { - $data = []; - - return; - } - - if (empty($linesToBeCovered)) { - return; - } - - if ($this->checkForUnintentionallyCoveredCode) { - $this->performUnintentionallyCoveredCodeCheck( - $data, - $linesToBeCovered, - $linesToBeUsed - ); - } - - $data = array_intersect_key($data, $linesToBeCovered); - - foreach (array_keys($data) as $filename) { - $_linesToBeCovered = array_flip($linesToBeCovered[$filename]); - - $data[$filename] = array_intersect_key( - $data[$filename], - $_linesToBeCovered - ); - } - } - - /** - * Applies the whitelist filtering. - * - * @param array $data - */ - private function applyListsFilter(array &$data) - { - foreach (array_keys($data) as $filename) { - if ($this->filter->isFiltered($filename)) { - unset($data[$filename]); - } - } - } - - /** - * Applies the "ignored lines" filtering. - * - * @param array $data - */ - private function applyIgnoredLinesFilter(array &$data) - { - foreach (array_keys($data) as $filename) { - if (!$this->filter->isFile($filename)) { - continue; - } - - foreach ($this->getLinesToBeIgnored($filename) as $line) { - unset($data[$filename][$line]); - } - } - } - - /** - * @param array $data - * @since Method available since Release 1.1.0 - */ - private function initializeFilesThatAreSeenTheFirstTime(array $data) - { - foreach ($data as $file => $lines) { - if ($this->filter->isFile($file) && !isset($this->data[$file])) { - $this->data[$file] = []; - - foreach ($lines as $k => $v) { - $this->data[$file][$k] = $v == -2 ? null : []; - } - } - } - } - - /** - * Processes whitelisted files that are not covered. - */ - private function addUncoveredFilesFromWhitelist() - { - $data = []; - $uncoveredFiles = array_diff( - $this->filter->getWhitelist(), - array_keys($this->data) - ); - - foreach ($uncoveredFiles as $uncoveredFile) { - if (!file_exists($uncoveredFile)) { - continue; - } - - if ($this->processUncoveredFilesFromWhitelist) { - $this->processUncoveredFileFromWhitelist( - $uncoveredFile, - $data, - $uncoveredFiles - ); - } else { - $data[$uncoveredFile] = []; - - $lines = count(file($uncoveredFile)); - - for ($i = 1; $i <= $lines; $i++) { - $data[$uncoveredFile][$i] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED; - } - } - } - - $this->append($data, 'UNCOVERED_FILES_FROM_WHITELIST'); - } - - /** - * @param string $uncoveredFile - * @param array $data - * @param array $uncoveredFiles - */ - private function processUncoveredFileFromWhitelist($uncoveredFile, array &$data, array $uncoveredFiles) - { - $this->driver->start(); - include_once $uncoveredFile; - $coverage = $this->driver->stop(); - - foreach ($coverage as $file => $fileCoverage) { - if (!isset($data[$file]) && - in_array($file, $uncoveredFiles)) { - foreach (array_keys($fileCoverage) as $key) { - if ($fileCoverage[$key] == PHP_CodeCoverage_Driver::LINE_EXECUTED) { - $fileCoverage[$key] = PHP_CodeCoverage_Driver::LINE_NOT_EXECUTED; - } - } - - $data[$file] = $fileCoverage; - } - } - } - - /** - * Returns the lines of a source file that should be ignored. - * - * @param string $filename - * @return array - * @throws PHP_CodeCoverage_InvalidArgumentException - * @since Method available since Release 2.0.0 - */ - private function getLinesToBeIgnored($filename) - { - if (!is_string($filename)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'string' - ); - } - - if (!isset($this->ignoredLines[$filename])) { - $this->ignoredLines[$filename] = []; - - if ($this->disableIgnoredLines) { - return $this->ignoredLines[$filename]; - } - - $ignore = false; - $stop = false; - $lines = file($filename); - $numLines = count($lines); - - foreach ($lines as $index => $line) { - if (!trim($line)) { - $this->ignoredLines[$filename][] = $index + 1; - } - } - - if ($this->cacheTokens) { - $tokens = PHP_Token_Stream_CachingFactory::get($filename); - } else { - $tokens = new PHP_Token_Stream($filename); - } - - $classes = array_merge($tokens->getClasses(), $tokens->getTraits()); - $tokens = $tokens->tokens(); - - foreach ($tokens as $token) { - switch (get_class($token)) { - case 'PHP_Token_COMMENT': - case 'PHP_Token_DOC_COMMENT': - $_token = trim($token); - $_line = trim($lines[$token->getLine() - 1]); - - if ($_token == '// @codeCoverageIgnore' || - $_token == '//@codeCoverageIgnore') { - $ignore = true; - $stop = true; - } elseif ($_token == '// @codeCoverageIgnoreStart' || - $_token == '//@codeCoverageIgnoreStart') { - $ignore = true; - } elseif ($_token == '// @codeCoverageIgnoreEnd' || - $_token == '//@codeCoverageIgnoreEnd') { - $stop = true; - } - - if (!$ignore) { - $start = $token->getLine(); - $end = $start + substr_count($token, "\n"); - - // Do not ignore the first line when there is a token - // before the comment - if (0 !== strpos($_token, $_line)) { - $start++; - } - - for ($i = $start; $i < $end; $i++) { - $this->ignoredLines[$filename][] = $i; - } - - // A DOC_COMMENT token or a COMMENT token starting with "/*" - // does not contain the final \n character in its text - if (isset($lines[$i-1]) && 0 === strpos($_token, '/*') && '*/' === substr(trim($lines[$i-1]), -2)) { - $this->ignoredLines[$filename][] = $i; - } - } - break; - - case 'PHP_Token_INTERFACE': - case 'PHP_Token_TRAIT': - case 'PHP_Token_CLASS': - case 'PHP_Token_FUNCTION': - /* @var PHP_Token_Interface $token */ - - $docblock = $token->getDocblock(); - - $this->ignoredLines[$filename][] = $token->getLine(); - - if (strpos($docblock, '@codeCoverageIgnore') || ($this->ignoreDeprecatedCode && strpos($docblock, '@deprecated'))) { - $endLine = $token->getEndLine(); - - for ($i = $token->getLine(); $i <= $endLine; $i++) { - $this->ignoredLines[$filename][] = $i; - } - } elseif ($token instanceof PHP_Token_INTERFACE || - $token instanceof PHP_Token_TRAIT || - $token instanceof PHP_Token_CLASS) { - if (empty($classes[$token->getName()]['methods'])) { - for ($i = $token->getLine(); - $i <= $token->getEndLine(); - $i++) { - $this->ignoredLines[$filename][] = $i; - } - } else { - $firstMethod = array_shift( - $classes[$token->getName()]['methods'] - ); - - do { - $lastMethod = array_pop( - $classes[$token->getName()]['methods'] - ); - } while ($lastMethod !== null && - substr($lastMethod['signature'], 0, 18) == 'anonymous function'); - - if ($lastMethod === null) { - $lastMethod = $firstMethod; - } - - for ($i = $token->getLine(); - $i < $firstMethod['startLine']; - $i++) { - $this->ignoredLines[$filename][] = $i; - } - - for ($i = $token->getEndLine(); - $i > $lastMethod['endLine']; - $i--) { - $this->ignoredLines[$filename][] = $i; - } - } - } - break; - - case 'PHP_Token_NAMESPACE': - $this->ignoredLines[$filename][] = $token->getEndLine(); - - // Intentional fallthrough - case 'PHP_Token_OPEN_TAG': - case 'PHP_Token_CLOSE_TAG': - case 'PHP_Token_USE': - $this->ignoredLines[$filename][] = $token->getLine(); - break; - } - - if ($ignore) { - $this->ignoredLines[$filename][] = $token->getLine(); - - if ($stop) { - $ignore = false; - $stop = false; - } - } - } - - $this->ignoredLines[$filename][] = $numLines + 1; - - $this->ignoredLines[$filename] = array_unique( - $this->ignoredLines[$filename] - ); - - sort($this->ignoredLines[$filename]); - } - - return $this->ignoredLines[$filename]; - } - - /** - * @param array $data - * @param array $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_UnintentionallyCoveredCodeException - * @since Method available since Release 2.0.0 - */ - private function performUnintentionallyCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed) - { - $allowedLines = $this->getAllowedLines( - $linesToBeCovered, - $linesToBeUsed - ); - - $message = ''; - - foreach ($data as $file => $_data) { - foreach ($_data as $line => $flag) { - if ($flag == 1 && - (!isset($allowedLines[$file]) || - !isset($allowedLines[$file][$line]))) { - $message .= sprintf( - '- %s:%d' . PHP_EOL, - $file, - $line - ); - } - } - } - - if (!empty($message)) { - throw new PHP_CodeCoverage_UnintentionallyCoveredCodeException( - $message - ); - } - } - - /** - * @param array $linesToBeCovered - * @param array $linesToBeUsed - * @return array - * @since Method available since Release 2.0.0 - */ - private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed) - { - $allowedLines = []; - - foreach (array_keys($linesToBeCovered) as $file) { - if (!isset($allowedLines[$file])) { - $allowedLines[$file] = []; - } - - $allowedLines[$file] = array_merge( - $allowedLines[$file], - $linesToBeCovered[$file] - ); - } - - foreach (array_keys($linesToBeUsed) as $file) { - if (!isset($allowedLines[$file])) { - $allowedLines[$file] = []; - } - - $allowedLines[$file] = array_merge( - $allowedLines[$file], - $linesToBeUsed[$file] - ); - } - - foreach (array_keys($allowedLines) as $file) { - $allowedLines[$file] = array_flip( - array_unique($allowedLines[$file]) - ); - } - - return $allowedLines; - } - - /** - * @return PHP_CodeCoverage_Driver - * @throws PHP_CodeCoverage_RuntimeException - */ - private function selectDriver() - { - $runtime = new Runtime; - - if (!$runtime->canCollectCodeCoverage()) { - throw new PHP_CodeCoverage_RuntimeException('No code coverage driver available'); - } - - if ($runtime->isHHVM()) { - return new PHP_CodeCoverage_Driver_HHVM; - } elseif ($runtime->isPHPDBG()) { - return new PHP_CodeCoverage_Driver_PHPDBG; - } else { - return new PHP_CodeCoverage_Driver_Xdebug; - } - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php deleted file mode 100644 index 8635acef..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php +++ /dev/null @@ -1,47 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Interface for code coverage drivers. - * - * @since Class available since Release 1.0.0 - */ -interface PHP_CodeCoverage_Driver -{ - /** - * @var int - * @see http://xdebug.org/docs/code_coverage - */ - const LINE_EXECUTED = 1; - - /** - * @var int - * @see http://xdebug.org/docs/code_coverage - */ - const LINE_NOT_EXECUTED = -1; - - /** - * @var int - * @see http://xdebug.org/docs/code_coverage - */ - const LINE_NOT_EXECUTABLE = -2; - - /** - * Start collection of code coverage information. - */ - public function start(); - - /** - * Stop collection of code coverage information. - * - * @return array - */ - public function stop(); -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php deleted file mode 100644 index a9d8f0ce..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php +++ /dev/null @@ -1,26 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Driver for HHVM's code coverage functionality. - * - * @since Class available since Release 2.2.2 - * @codeCoverageIgnore - */ -class PHP_CodeCoverage_Driver_HHVM extends PHP_CodeCoverage_Driver_Xdebug -{ - /** - * Start collection of code coverage information. - */ - public function start() - { - xdebug_start_code_coverage(); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php deleted file mode 100644 index 2c39c8c8..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php +++ /dev/null @@ -1,105 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Driver for PHPDBG's code coverage functionality. - * - * @since Class available since Release 2.2.0 - * @codeCoverageIgnore - */ -class PHP_CodeCoverage_Driver_PHPDBG implements PHP_CodeCoverage_Driver -{ - /** - * Constructor. - */ - public function __construct() - { - if (PHP_SAPI !== 'phpdbg') { - throw new PHP_CodeCoverage_RuntimeException( - 'This driver requires the PHPDBG SAPI' - ); - } - - if (!function_exists('phpdbg_start_oplog')) { - throw new PHP_CodeCoverage_RuntimeException( - 'This build of PHPDBG does not support code coverage' - ); - } - } - - /** - * Start collection of code coverage information. - */ - public function start() - { - phpdbg_start_oplog(); - } - - /** - * Stop collection of code coverage information. - * - * @return array - */ - public function stop() - { - static $fetchedLines = []; - - $dbgData = phpdbg_end_oplog(); - - if ($fetchedLines == []) { - $sourceLines = phpdbg_get_executable(); - } else { - $newFiles = array_diff( - get_included_files(), - array_keys($fetchedLines) - ); - - if ($newFiles) { - $sourceLines = phpdbg_get_executable( - ['files' => $newFiles] - ); - } else { - $sourceLines = []; - } - } - - foreach ($sourceLines as $file => $lines) { - foreach ($lines as $lineNo => $numExecuted) { - $sourceLines[$file][$lineNo] = self::LINE_NOT_EXECUTED; - } - } - - $fetchedLines = array_merge($fetchedLines, $sourceLines); - - return $this->detectExecutedLines($fetchedLines, $dbgData); - } - - /** - * Convert phpdbg based data into the format CodeCoverage expects - * - * @param array $sourceLines - * @param array $dbgData - * @return array - */ - private function detectExecutedLines(array $sourceLines, array $dbgData) - { - foreach ($dbgData as $file => $coveredLines) { - foreach ($coveredLines as $lineNo => $numExecuted) { - // phpdbg also reports $lineNo=0 when e.g. exceptions get thrown. - // make sure we only mark lines executed which are actually executable. - if (isset($sourceLines[$file][$lineNo])) { - $sourceLines[$file][$lineNo] = self::LINE_EXECUTED; - } - } - } - - return $sourceLines; - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php deleted file mode 100644 index 5cbb0d03..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Driver for Xdebug's code coverage functionality. - * - * @since Class available since Release 1.0.0 - * @codeCoverageIgnore - */ -class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver -{ - /** - * Constructor. - */ - public function __construct() - { - if (!extension_loaded('xdebug')) { - throw new PHP_CodeCoverage_RuntimeException('This driver requires Xdebug'); - } - - if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') && - !ini_get('xdebug.coverage_enable')) { - throw new PHP_CodeCoverage_RuntimeException( - 'xdebug.coverage_enable=On has to be set in php.ini' - ); - } - } - - /** - * Start collection of code coverage information. - */ - public function start() - { - xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); - } - - /** - * Stop collection of code coverage information. - * - * @return array - */ - public function stop() - { - $data = xdebug_get_code_coverage(); - xdebug_stop_code_coverage(); - - return $this->cleanup($data); - } - - /** - * @param array $data - * @return array - * @since Method available since Release 2.0.0 - */ - private function cleanup(array $data) - { - foreach (array_keys($data) as $file) { - unset($data[$file][0]); - - if ($file != 'xdebug://debug-eval' && file_exists($file)) { - $numLines = $this->getNumberOfLinesInFile($file); - - foreach (array_keys($data[$file]) as $line) { - if (isset($data[$file][$line]) && $line > $numLines) { - unset($data[$file][$line]); - } - } - } - } - - return $data; - } - - /** - * @param string $file - * @return int - * @since Method available since Release 2.0.0 - */ - private function getNumberOfLinesInFile($file) - { - $buffer = file_get_contents($file); - $lines = substr_count($buffer, "\n"); - - if (substr($buffer, -1) !== "\n") { - $lines++; - } - - return $lines; - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php deleted file mode 100644 index 9118a78b..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Exception interface for PHP_CodeCoverage component. - * - * @since Interface available since Release 3.0.0 - */ -interface PHP_CodeCoverage_Exception -{ -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php deleted file mode 100644 index 68d072b6..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * @since Class available since Release 3.0.0 - */ -class PHP_CodeCoverage_InvalidArgumentException extends InvalidArgumentException implements PHP_CodeCoverage_Exception -{ - /** - * @param int $argument - * @param string $type - * @param mixed $value - * @return PHP_CodeCoverage_InvalidArgumentException - */ - public static function create($argument, $type, $value = null) - { - $stack = debug_backtrace(false); - - return new self( - sprintf( - 'Argument #%d%sof %s::%s() must be a %s', - $argument, - $value !== null ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ', - $stack[1]['class'], - $stack[1]['function'], - $type - ) - ); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php deleted file mode 100644 index bb6bc5ec..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * @since Class available since Release 3.0.0 - */ -class PHP_CodeCoverage_RuntimeException extends RuntimeException implements PHP_CodeCoverage_Exception -{ -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php deleted file mode 100644 index 398276a3..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Exception that is raised when code is unintentionally covered. - * - * @since Class available since Release 2.0.0 - */ -class PHP_CodeCoverage_UnintentionallyCoveredCodeException extends PHP_CodeCoverage_RuntimeException -{ -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php deleted file mode 100644 index 06297e5d..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php +++ /dev/null @@ -1,176 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Filter for whitelisting of code coverage information. - * - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage_Filter -{ - /** - * Source files that are whitelisted. - * - * @var array - */ - private $whitelistedFiles = []; - - /** - * Adds a directory to the whitelist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function addDirectoryToWhitelist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->addFileToWhitelist($file); - } - } - - /** - * Adds a file to the whitelist. - * - * @param string $filename - */ - public function addFileToWhitelist($filename) - { - $this->whitelistedFiles[realpath($filename)] = true; - } - - /** - * Adds files to the whitelist. - * - * @param array $files - */ - public function addFilesToWhitelist(array $files) - { - foreach ($files as $file) { - $this->addFileToWhitelist($file); - } - } - - /** - * Removes a directory from the whitelist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function removeDirectoryFromWhitelist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->removeFileFromWhitelist($file); - } - } - - /** - * Removes a file from the whitelist. - * - * @param string $filename - */ - public function removeFileFromWhitelist($filename) - { - $filename = realpath($filename); - - if (isset($this->whitelistedFiles[$filename])) { - unset($this->whitelistedFiles[$filename]); - } - } - - /** - * Checks whether a filename is a real filename. - * - * @param string $filename - * @return bool - */ - public function isFile($filename) - { - if ($filename == '-' || - strpos($filename, 'vfs://') === 0 || - strpos($filename, 'xdebug://debug-eval') !== false || - strpos($filename, 'eval()\'d code') !== false || - strpos($filename, 'runtime-created function') !== false || - strpos($filename, 'runkit created function') !== false || - strpos($filename, 'assert code') !== false || - strpos($filename, 'regexp code') !== false) { - return false; - } - - return file_exists($filename); - } - - /** - * Checks whether or not a file is filtered. - * - * @param string $filename - * @return bool - */ - public function isFiltered($filename) - { - if (!$this->isFile($filename)) { - return true; - } - - $filename = realpath($filename); - - return !isset($this->whitelistedFiles[$filename]); - } - - /** - * Returns the list of whitelisted files. - * - * @return array - */ - public function getWhitelist() - { - return array_keys($this->whitelistedFiles); - } - - /** - * Returns whether this filter has a whitelist. - * - * @return bool - * @since Method available since Release 1.1.0 - */ - public function hasWhitelist() - { - return !empty($this->whitelistedFiles); - } - - /** - * Returns the whitelisted files. - * - * @return array - * @since Method available since Release 2.0.0 - */ - public function getWhitelistedFiles() - { - return $this->whitelistedFiles; - } - - /** - * Sets the whitelisted files. - * - * @param array $whitelistedFiles - * @since Method available since Release 2.0.0 - */ - public function setWhitelistedFiles($whitelistedFiles) - { - $this->whitelistedFiles = $whitelistedFiles; - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php deleted file mode 100644 index aed52d71..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php +++ /dev/null @@ -1,284 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Generates a Clover XML logfile from an PHP_CodeCoverage object. - * - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage_Report_Clover -{ - /** - * @param PHP_CodeCoverage $coverage - * @param string $target - * @param string $name - * @return string - */ - public function process(PHP_CodeCoverage $coverage, $target = null, $name = null) - { - $xmlDocument = new DOMDocument('1.0', 'UTF-8'); - $xmlDocument->formatOutput = true; - - $xmlCoverage = $xmlDocument->createElement('coverage'); - $xmlCoverage->setAttribute('generated', (int) $_SERVER['REQUEST_TIME']); - $xmlDocument->appendChild($xmlCoverage); - - $xmlProject = $xmlDocument->createElement('project'); - $xmlProject->setAttribute('timestamp', (int) $_SERVER['REQUEST_TIME']); - - if (is_string($name)) { - $xmlProject->setAttribute('name', $name); - } - - $xmlCoverage->appendChild($xmlProject); - - $packages = []; - $report = $coverage->getReport(); - unset($coverage); - - foreach ($report as $item) { - $namespace = 'global'; - - if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { - continue; - } - - $xmlFile = $xmlDocument->createElement('file'); - $xmlFile->setAttribute('name', $item->getPath()); - - $classes = $item->getClassesAndTraits(); - $coverage = $item->getCoverageData(); - $lines = []; - - foreach ($classes as $className => $class) { - $classStatements = 0; - $coveredClassStatements = 0; - $coveredMethods = 0; - $classMethods = 0; - - foreach ($class['methods'] as $methodName => $method) { - if ($method['executableLines'] == 0) { - continue; - } - - $classMethods++; - $classStatements += $method['executableLines']; - $coveredClassStatements += $method['executedLines']; - if ($method['coverage'] == 100) { - $coveredMethods++; - } - - $methodCount = 0; - for ($i = $method['startLine']; - $i <= $method['endLine']; - $i++) { - if (isset($coverage[$i]) && ($coverage[$i] !== null)) { - $methodCount = max($methodCount, count($coverage[$i])); - } - } - - $lines[$method['startLine']] = [ - 'count' => $methodCount, - 'crap' => $method['crap'], - 'type' => 'method', - 'name' => $methodName - ]; - } - - if (!empty($class['package']['namespace'])) { - $namespace = $class['package']['namespace']; - } - - $xmlClass = $xmlDocument->createElement('class'); - $xmlClass->setAttribute('name', $className); - $xmlClass->setAttribute('namespace', $namespace); - - if (!empty($class['package']['fullPackage'])) { - $xmlClass->setAttribute( - 'fullPackage', - $class['package']['fullPackage'] - ); - } - - if (!empty($class['package']['category'])) { - $xmlClass->setAttribute( - 'category', - $class['package']['category'] - ); - } - - if (!empty($class['package']['package'])) { - $xmlClass->setAttribute( - 'package', - $class['package']['package'] - ); - } - - if (!empty($class['package']['subpackage'])) { - $xmlClass->setAttribute( - 'subpackage', - $class['package']['subpackage'] - ); - } - - $xmlFile->appendChild($xmlClass); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('methods', $classMethods); - $xmlMetrics->setAttribute('coveredmethods', $coveredMethods); - $xmlMetrics->setAttribute('conditionals', 0); - $xmlMetrics->setAttribute('coveredconditionals', 0); - $xmlMetrics->setAttribute('statements', $classStatements); - $xmlMetrics->setAttribute( - 'coveredstatements', - $coveredClassStatements - ); - $xmlMetrics->setAttribute( - 'elements', - $classMethods + - $classStatements - /* + conditionals */ - ); - $xmlMetrics->setAttribute( - 'coveredelements', - $coveredMethods + - $coveredClassStatements - /* + coveredconditionals */ - ); - $xmlClass->appendChild($xmlMetrics); - } - - foreach ($coverage as $line => $data) { - if ($data === null || isset($lines[$line])) { - continue; - } - - $lines[$line] = [ - 'count' => count($data), 'type' => 'stmt' - ]; - } - - ksort($lines); - - foreach ($lines as $line => $data) { - $xmlLine = $xmlDocument->createElement('line'); - $xmlLine->setAttribute('num', $line); - $xmlLine->setAttribute('type', $data['type']); - - if (isset($data['name'])) { - $xmlLine->setAttribute('name', $data['name']); - } - - if (isset($data['crap'])) { - $xmlLine->setAttribute('crap', $data['crap']); - } - - $xmlLine->setAttribute('count', $data['count']); - $xmlFile->appendChild($xmlLine); - } - - $linesOfCode = $item->getLinesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); - $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); - $xmlMetrics->setAttribute('classes', $item->getNumClassesAndTraits()); - $xmlMetrics->setAttribute('methods', $item->getNumMethods()); - $xmlMetrics->setAttribute( - 'coveredmethods', - $item->getNumTestedMethods() - ); - $xmlMetrics->setAttribute('conditionals', 0); - $xmlMetrics->setAttribute('coveredconditionals', 0); - $xmlMetrics->setAttribute( - 'statements', - $item->getNumExecutableLines() - ); - $xmlMetrics->setAttribute( - 'coveredstatements', - $item->getNumExecutedLines() - ); - $xmlMetrics->setAttribute( - 'elements', - $item->getNumMethods() + $item->getNumExecutableLines() - /* + conditionals */ - ); - $xmlMetrics->setAttribute( - 'coveredelements', - $item->getNumTestedMethods() + $item->getNumExecutedLines() - /* + coveredconditionals */ - ); - $xmlFile->appendChild($xmlMetrics); - - if ($namespace == 'global') { - $xmlProject->appendChild($xmlFile); - } else { - if (!isset($packages[$namespace])) { - $packages[$namespace] = $xmlDocument->createElement( - 'package' - ); - - $packages[$namespace]->setAttribute('name', $namespace); - $xmlProject->appendChild($packages[$namespace]); - } - - $packages[$namespace]->appendChild($xmlFile); - } - } - - $linesOfCode = $report->getLinesOfCode(); - - $xmlMetrics = $xmlDocument->createElement('metrics'); - $xmlMetrics->setAttribute('files', count($report)); - $xmlMetrics->setAttribute('loc', $linesOfCode['loc']); - $xmlMetrics->setAttribute('ncloc', $linesOfCode['ncloc']); - $xmlMetrics->setAttribute( - 'classes', - $report->getNumClassesAndTraits() - ); - $xmlMetrics->setAttribute('methods', $report->getNumMethods()); - $xmlMetrics->setAttribute( - 'coveredmethods', - $report->getNumTestedMethods() - ); - $xmlMetrics->setAttribute('conditionals', 0); - $xmlMetrics->setAttribute('coveredconditionals', 0); - $xmlMetrics->setAttribute( - 'statements', - $report->getNumExecutableLines() - ); - $xmlMetrics->setAttribute( - 'coveredstatements', - $report->getNumExecutedLines() - ); - $xmlMetrics->setAttribute( - 'elements', - $report->getNumMethods() + $report->getNumExecutableLines() - /* + conditionals */ - ); - $xmlMetrics->setAttribute( - 'coveredelements', - $report->getNumTestedMethods() + $report->getNumExecutedLines() - /* + coveredconditionals */ - ); - - $xmlProject->appendChild($xmlMetrics); - - if ($target !== null) { - if (!is_dir(dirname($target))) { - mkdir(dirname($target), 0777, true); - } - - return $xmlDocument->save($target); - } else { - return $xmlDocument->saveXML(); - } - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php deleted file mode 100644 index 3801107b..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php +++ /dev/null @@ -1,164 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * @since Class available since Release 2.0.0 - */ -class PHP_CodeCoverage_Report_Crap4j -{ - /** - * @var int - */ - private $threshold; - - /** - * @param int $threshold - */ - public function __construct($threshold = 30) - { - if (!is_int($threshold)) { - throw PHP_CodeCoverage_InvalidArgumentException::create( - 1, - 'integer' - ); - } - - $this->threshold = $threshold; - } - - /** - * @param PHP_CodeCoverage $coverage - * @param string $target - * @param string $name - * @return string - */ - public function process(PHP_CodeCoverage $coverage, $target = null, $name = null) - { - $document = new DOMDocument('1.0', 'UTF-8'); - $document->formatOutput = true; - - $root = $document->createElement('crap_result'); - $document->appendChild($root); - - $project = $document->createElement('project', is_string($name) ? $name : ''); - $root->appendChild($project); - $root->appendChild($document->createElement('timestamp', date('Y-m-d H:i:s', (int) $_SERVER['REQUEST_TIME']))); - - $stats = $document->createElement('stats'); - $methodsNode = $document->createElement('methods'); - - $report = $coverage->getReport(); - unset($coverage); - - $fullMethodCount = 0; - $fullCrapMethodCount = 0; - $fullCrapLoad = 0; - $fullCrap = 0; - - foreach ($report as $item) { - $namespace = 'global'; - - if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { - continue; - } - - $file = $document->createElement('file'); - $file->setAttribute('name', $item->getPath()); - - $classes = $item->getClassesAndTraits(); - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - $crapLoad = $this->getCrapLoad($method['crap'], $method['ccn'], $method['coverage']); - - $fullCrap += $method['crap']; - $fullCrapLoad += $crapLoad; - $fullMethodCount++; - - if ($method['crap'] >= $this->threshold) { - $fullCrapMethodCount++; - } - - $methodNode = $document->createElement('method'); - - if (!empty($class['package']['namespace'])) { - $namespace = $class['package']['namespace']; - } - - $methodNode->appendChild($document->createElement('package', $namespace)); - $methodNode->appendChild($document->createElement('className', $className)); - $methodNode->appendChild($document->createElement('methodName', $methodName)); - $methodNode->appendChild($document->createElement('methodSignature', htmlspecialchars($method['signature']))); - $methodNode->appendChild($document->createElement('fullMethod', htmlspecialchars($method['signature']))); - $methodNode->appendChild($document->createElement('crap', $this->roundValue($method['crap']))); - $methodNode->appendChild($document->createElement('complexity', $method['ccn'])); - $methodNode->appendChild($document->createElement('coverage', $this->roundValue($method['coverage']))); - $methodNode->appendChild($document->createElement('crapLoad', round($crapLoad))); - - $methodsNode->appendChild($methodNode); - } - } - } - - $stats->appendChild($document->createElement('name', 'Method Crap Stats')); - $stats->appendChild($document->createElement('methodCount', $fullMethodCount)); - $stats->appendChild($document->createElement('crapMethodCount', $fullCrapMethodCount)); - $stats->appendChild($document->createElement('crapLoad', round($fullCrapLoad))); - $stats->appendChild($document->createElement('totalCrap', $fullCrap)); - - if ($fullMethodCount > 0) { - $crapMethodPercent = $this->roundValue((100 * $fullCrapMethodCount) / $fullMethodCount); - } else { - $crapMethodPercent = 0; - } - - $stats->appendChild($document->createElement('crapMethodPercent', $crapMethodPercent)); - - $root->appendChild($stats); - $root->appendChild($methodsNode); - - if ($target !== null) { - if (!is_dir(dirname($target))) { - mkdir(dirname($target), 0777, true); - } - - return $document->save($target); - } else { - return $document->saveXML(); - } - } - - /** - * @param float $crapValue - * @param int $cyclomaticComplexity - * @param float $coveragePercent - * @return float - */ - private function getCrapLoad($crapValue, $cyclomaticComplexity, $coveragePercent) - { - $crapLoad = 0; - - if ($crapValue >= $this->threshold) { - $crapLoad += $cyclomaticComplexity * (1.0 - $coveragePercent / 100); - $crapLoad += $cyclomaticComplexity / $this->threshold; - } - - return $crapLoad; - } - - /** - * @param float $value - * @return float - */ - private function roundValue($value) - { - return round($value, 2); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php deleted file mode 100644 index 519e92e9..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php +++ /dev/null @@ -1,242 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Factory for PHP_CodeCoverage_Report_Node_* object graphs. - * - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_Factory -{ - /** - * @param PHP_CodeCoverage $coverage - * @return PHP_CodeCoverage_Report_Node_Directory - */ - public function create(PHP_CodeCoverage $coverage) - { - $files = $coverage->getData(); - $commonPath = $this->reducePaths($files); - $root = new PHP_CodeCoverage_Report_Node_Directory( - $commonPath, - null - ); - - $this->addItems( - $root, - $this->buildDirectoryStructure($files), - $coverage->getTests(), - $coverage->getCacheTokens() - ); - - return $root; - } - - /** - * @param PHP_CodeCoverage_Report_Node_Directory $root - * @param array $items - * @param array $tests - * @param bool $cacheTokens - */ - private function addItems(PHP_CodeCoverage_Report_Node_Directory $root, array $items, array $tests, $cacheTokens) - { - foreach ($items as $key => $value) { - if (substr($key, -2) == '/f') { - $key = substr($key, 0, -2); - - if (file_exists($root->getPath() . DIRECTORY_SEPARATOR . $key)) { - $root->addFile($key, $value, $tests, $cacheTokens); - } - } else { - $child = $root->addDirectory($key); - $this->addItems($child, $value, $tests, $cacheTokens); - } - } - } - - /** - * Builds an array representation of the directory structure. - * - * For instance, - * - * - * Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * is transformed into - * - * - * Array - * ( - * [.] => Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * ) - * - * - * @param array $files - * @return array - */ - private function buildDirectoryStructure($files) - { - $result = []; - - foreach ($files as $path => $file) { - $path = explode('/', $path); - $pointer = &$result; - $max = count($path); - - for ($i = 0; $i < $max; $i++) { - if ($i == ($max - 1)) { - $type = '/f'; - } else { - $type = ''; - } - - $pointer = &$pointer[$path[$i] . $type]; - } - - $pointer = $file; - } - - return $result; - } - - /** - * Reduces the paths by cutting the longest common start path. - * - * For instance, - * - * - * Array - * ( - * [/home/sb/Money/Money.php] => Array - * ( - * ... - * ) - * - * [/home/sb/Money/MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * is reduced to - * - * - * Array - * ( - * [Money.php] => Array - * ( - * ... - * ) - * - * [MoneyBag.php] => Array - * ( - * ... - * ) - * ) - * - * - * @param array $files - * @return string - */ - private function reducePaths(&$files) - { - if (empty($files)) { - return '.'; - } - - $commonPath = ''; - $paths = array_keys($files); - - if (count($files) == 1) { - $commonPath = dirname($paths[0]) . '/'; - $files[basename($paths[0])] = $files[$paths[0]]; - - unset($files[$paths[0]]); - - return $commonPath; - } - - $max = count($paths); - - for ($i = 0; $i < $max; $i++) { - // strip phar:// prefixes - if (strpos($paths[$i], 'phar://') === 0) { - $paths[$i] = substr($paths[$i], 7); - $paths[$i] = strtr($paths[$i], '/', DIRECTORY_SEPARATOR); - } - $paths[$i] = explode(DIRECTORY_SEPARATOR, $paths[$i]); - - if (empty($paths[$i][0])) { - $paths[$i][0] = DIRECTORY_SEPARATOR; - } - } - - $done = false; - $max = count($paths); - - while (!$done) { - for ($i = 0; $i < $max - 1; $i++) { - if (!isset($paths[$i][0]) || - !isset($paths[$i+1][0]) || - $paths[$i][0] != $paths[$i+1][0]) { - $done = true; - break; - } - } - - if (!$done) { - $commonPath .= $paths[0][0]; - - if ($paths[0][0] != DIRECTORY_SEPARATOR) { - $commonPath .= DIRECTORY_SEPARATOR; - } - - for ($i = 0; $i < $max; $i++) { - array_shift($paths[$i]); - } - } - } - - $original = array_keys($files); - $max = count($original); - - for ($i = 0; $i < $max; $i++) { - $files[implode('/', $paths[$i])] = $files[$original[$i]]; - unset($files[$original[$i]]); - } - - ksort($files); - - return substr($commonPath, 0, -1); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php deleted file mode 100644 index 4829dd68..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php +++ /dev/null @@ -1,182 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Generates an HTML report from an PHP_CodeCoverage object. - * - * @since Class available since Release 1.0.0 - */ -class PHP_CodeCoverage_Report_HTML -{ - /** - * @var string - */ - private $templatePath; - - /** - * @var string - */ - private $generator; - - /** - * @var int - */ - private $lowUpperBound; - - /** - * @var int - */ - private $highLowerBound; - - /** - * Constructor. - * - * @param int $lowUpperBound - * @param int $highLowerBound - * @param string $generator - */ - public function __construct($lowUpperBound = 50, $highLowerBound = 90, $generator = '') - { - $this->generator = $generator; - $this->highLowerBound = $highLowerBound; - $this->lowUpperBound = $lowUpperBound; - - $this->templatePath = sprintf( - '%s%sHTML%sRenderer%sTemplate%s', - dirname(__FILE__), - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR, - DIRECTORY_SEPARATOR - ); - } - - /** - * @param PHP_CodeCoverage $coverage - * @param string $target - */ - public function process(PHP_CodeCoverage $coverage, $target) - { - $target = $this->getDirectory($target); - $report = $coverage->getReport(); - unset($coverage); - - if (!isset($_SERVER['REQUEST_TIME'])) { - $_SERVER['REQUEST_TIME'] = time(); - } - - $date = date('D M j G:i:s T Y', $_SERVER['REQUEST_TIME']); - - $dashboard = new PHP_CodeCoverage_Report_HTML_Renderer_Dashboard( - $this->templatePath, - $this->generator, - $date, - $this->lowUpperBound, - $this->highLowerBound - ); - - $directory = new PHP_CodeCoverage_Report_HTML_Renderer_Directory( - $this->templatePath, - $this->generator, - $date, - $this->lowUpperBound, - $this->highLowerBound - ); - - $file = new PHP_CodeCoverage_Report_HTML_Renderer_File( - $this->templatePath, - $this->generator, - $date, - $this->lowUpperBound, - $this->highLowerBound - ); - - $directory->render($report, $target . 'index.html'); - $dashboard->render($report, $target . 'dashboard.html'); - - foreach ($report as $node) { - $id = $node->getId(); - - if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) { - if (!file_exists($target . $id)) { - mkdir($target . $id, 0777, true); - } - - $directory->render($node, $target . $id . '/index.html'); - $dashboard->render($node, $target . $id . '/dashboard.html'); - } else { - $dir = dirname($target . $id); - - if (!file_exists($dir)) { - mkdir($dir, 0777, true); - } - - $file->render($node, $target . $id . '.html'); - } - } - - $this->copyFiles($target); - } - - /** - * @param string $target - */ - private function copyFiles($target) - { - $dir = $this->getDirectory($target . 'css'); - copy($this->templatePath . 'css/bootstrap.min.css', $dir . 'bootstrap.min.css'); - copy($this->templatePath . 'css/nv.d3.min.css', $dir . 'nv.d3.min.css'); - copy($this->templatePath . 'css/style.css', $dir . 'style.css'); - - $dir = $this->getDirectory($target . 'fonts'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.eot', $dir . 'glyphicons-halflings-regular.eot'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.svg', $dir . 'glyphicons-halflings-regular.svg'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.ttf', $dir . 'glyphicons-halflings-regular.ttf'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff', $dir . 'glyphicons-halflings-regular.woff'); - copy($this->templatePath . 'fonts/glyphicons-halflings-regular.woff2', $dir . 'glyphicons-halflings-regular.woff2'); - - $dir = $this->getDirectory($target . 'js'); - copy($this->templatePath . 'js/bootstrap.min.js', $dir . 'bootstrap.min.js'); - copy($this->templatePath . 'js/d3.min.js', $dir . 'd3.min.js'); - copy($this->templatePath . 'js/holder.min.js', $dir . 'holder.min.js'); - copy($this->templatePath . 'js/html5shiv.min.js', $dir . 'html5shiv.min.js'); - copy($this->templatePath . 'js/jquery.min.js', $dir . 'jquery.min.js'); - copy($this->templatePath . 'js/nv.d3.min.js', $dir . 'nv.d3.min.js'); - copy($this->templatePath . 'js/respond.min.js', $dir . 'respond.min.js'); - } - - /** - * @param string $directory - * @return string - * @throws PHP_CodeCoverage_RuntimeException - * @since Method available since Release 1.2.0 - */ - private function getDirectory($directory) - { - if (substr($directory, -1, 1) != DIRECTORY_SEPARATOR) { - $directory .= DIRECTORY_SEPARATOR; - } - - if (is_dir($directory)) { - return $directory; - } - - if (@mkdir($directory, 0777, true)) { - return $directory; - } - - throw new PHP_CodeCoverage_RuntimeException( - sprintf( - 'Directory "%s" does not exist.', - $directory - ) - ); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php deleted file mode 100644 index 49858b35..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php +++ /dev/null @@ -1,271 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -use SebastianBergmann\Environment\Runtime; - -/** - * Base class for PHP_CodeCoverage_Report_Node renderers. - * - * @since Class available since Release 1.1.0 - */ -abstract class PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * @var string - */ - protected $templatePath; - - /** - * @var string - */ - protected $generator; - - /** - * @var string - */ - protected $date; - - /** - * @var int - */ - protected $lowUpperBound; - - /** - * @var int - */ - protected $highLowerBound; - - /** - * @var string - */ - protected $version; - - /** - * Constructor. - * - * @param string $templatePath - * @param string $generator - * @param string $date - * @param int $lowUpperBound - * @param int $highLowerBound - */ - public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) - { - $version = new SebastianBergmann\Version('3.0.2', dirname(dirname(dirname(dirname(__DIR__))))); - - $this->templatePath = $templatePath; - $this->generator = $generator; - $this->date = $date; - $this->lowUpperBound = $lowUpperBound; - $this->highLowerBound = $highLowerBound; - $this->version = $version->getVersion(); - } - - /** - * @param Text_Template $template - * @param array $data - * @return string - */ - protected function renderItemTemplate(Text_Template $template, array $data) - { - $numSeparator = ' / '; - - if (isset($data['numClasses']) && $data['numClasses'] > 0) { - $classesLevel = $this->getColorLevel($data['testedClassesPercent']); - - $classesNumber = $data['numTestedClasses'] . $numSeparator . - $data['numClasses']; - - $classesBar = $this->getCoverageBar( - $data['testedClassesPercent'] - ); - } else { - $classesLevel = 'success'; - $classesNumber = '0' . $numSeparator . '0'; - $classesBar = $this->getCoverageBar(100); - } - - if ($data['numMethods'] > 0) { - $methodsLevel = $this->getColorLevel($data['testedMethodsPercent']); - - $methodsNumber = $data['numTestedMethods'] . $numSeparator . - $data['numMethods']; - - $methodsBar = $this->getCoverageBar( - $data['testedMethodsPercent'] - ); - } else { - $methodsLevel = 'success'; - $methodsNumber = '0' . $numSeparator . '0'; - $methodsBar = $this->getCoverageBar(100); - $data['testedMethodsPercentAsString'] = '100.00%'; - } - - if ($data['numExecutableLines'] > 0) { - $linesLevel = $this->getColorLevel($data['linesExecutedPercent']); - - $linesNumber = $data['numExecutedLines'] . $numSeparator . - $data['numExecutableLines']; - - $linesBar = $this->getCoverageBar( - $data['linesExecutedPercent'] - ); - } else { - $linesLevel = 'success'; - $linesNumber = '0' . $numSeparator . '0'; - $linesBar = $this->getCoverageBar(100); - $data['linesExecutedPercentAsString'] = '100.00%'; - } - - $template->setVar( - [ - 'icon' => isset($data['icon']) ? $data['icon'] : '', - 'crap' => isset($data['crap']) ? $data['crap'] : '', - 'name' => $data['name'], - 'lines_bar' => $linesBar, - 'lines_executed_percent' => $data['linesExecutedPercentAsString'], - 'lines_level' => $linesLevel, - 'lines_number' => $linesNumber, - 'methods_bar' => $methodsBar, - 'methods_tested_percent' => $data['testedMethodsPercentAsString'], - 'methods_level' => $methodsLevel, - 'methods_number' => $methodsNumber, - 'classes_bar' => $classesBar, - 'classes_tested_percent' => isset($data['testedClassesPercentAsString']) ? $data['testedClassesPercentAsString'] : '', - 'classes_level' => $classesLevel, - 'classes_number' => $classesNumber - ] - ); - - return $template->render(); - } - - /** - * @param Text_Template $template - * @param PHP_CodeCoverage_Report_Node $node - */ - protected function setCommonTemplateVariables(Text_Template $template, PHP_CodeCoverage_Report_Node $node) - { - $runtime = new Runtime; - - $template->setVar( - [ - 'id' => $node->getId(), - 'full_path' => $node->getPath(), - 'path_to_root' => $this->getPathToRoot($node), - 'breadcrumbs' => $this->getBreadcrumbs($node), - 'date' => $this->date, - 'version' => $this->version, - 'runtime_name' => $runtime->getName(), - 'runtime_version' => $runtime->getVersion(), - 'runtime_link' => $runtime->getVendorUrl(), - 'generator' => $this->generator, - 'low_upper_bound' => $this->lowUpperBound, - 'high_lower_bound' => $this->highLowerBound - ] - ); - } - - protected function getBreadcrumbs(PHP_CodeCoverage_Report_Node $node) - { - $breadcrumbs = ''; - $path = $node->getPathAsArray(); - $pathToRoot = []; - $max = count($path); - - if ($node instanceof PHP_CodeCoverage_Report_Node_File) { - $max--; - } - - for ($i = 0; $i < $max; $i++) { - $pathToRoot[] = str_repeat('../', $i); - } - - foreach ($path as $step) { - if ($step !== $node) { - $breadcrumbs .= $this->getInactiveBreadcrumb( - $step, - array_pop($pathToRoot) - ); - } else { - $breadcrumbs .= $this->getActiveBreadcrumb($step); - } - } - - return $breadcrumbs; - } - - protected function getActiveBreadcrumb(PHP_CodeCoverage_Report_Node $node) - { - $buffer = sprintf( - '
  • %s
  • ' . "\n", - $node->getName() - ); - - if ($node instanceof PHP_CodeCoverage_Report_Node_Directory) { - $buffer .= '
    ' . "\n"; - } - - return $buffer; - } - - protected function getInactiveBreadcrumb(PHP_CodeCoverage_Report_Node $node, $pathToRoot) - { - return sprintf( - '
  • %s
  • ' . "\n", - $pathToRoot, - $node->getName() - ); - } - - protected function getPathToRoot(PHP_CodeCoverage_Report_Node $node) - { - $id = $node->getId(); - $depth = substr_count($id, '/'); - - if ($id != 'index' && - $node instanceof PHP_CodeCoverage_Report_Node_Directory) { - $depth++; - } - - return str_repeat('../', $depth); - } - - protected function getCoverageBar($percent) - { - $level = $this->getColorLevel($percent); - - $template = new Text_Template( - $this->templatePath . 'coverage_bar.html', - '{{', - '}}' - ); - - $template->setVar(['level' => $level, 'percent' => sprintf('%.2F', $percent)]); - - return $template->render(); - } - - /** - * @param int $percent - * @return string - */ - protected function getColorLevel($percent) - { - if ($percent <= $this->lowUpperBound) { - return 'danger'; - } elseif ($percent > $this->lowUpperBound && - $percent < $this->highLowerBound) { - return 'warning'; - } else { - return 'success'; - } - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php deleted file mode 100644 index b61766a8..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php +++ /dev/null @@ -1,295 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Renders the dashboard for a PHP_CodeCoverage_Report_Node_Directory node. - * - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * @param PHP_CodeCoverage_Report_Node_Directory $node - * @param string $file - */ - public function render(PHP_CodeCoverage_Report_Node_Directory $node, $file) - { - $classes = $node->getClassesAndTraits(); - $template = new Text_Template( - $this->templatePath . 'dashboard.html', - '{{', - '}}' - ); - - $this->setCommonTemplateVariables($template, $node); - - $baseLink = $node->getId() . '/'; - $complexity = $this->complexity($classes, $baseLink); - $coverageDistribution = $this->coverageDistribution($classes); - $insufficientCoverage = $this->insufficientCoverage($classes, $baseLink); - $projectRisks = $this->projectRisks($classes, $baseLink); - - $template->setVar( - [ - 'insufficient_coverage_classes' => $insufficientCoverage['class'], - 'insufficient_coverage_methods' => $insufficientCoverage['method'], - 'project_risks_classes' => $projectRisks['class'], - 'project_risks_methods' => $projectRisks['method'], - 'complexity_class' => $complexity['class'], - 'complexity_method' => $complexity['method'], - 'class_coverage_distribution' => $coverageDistribution['class'], - 'method_coverage_distribution' => $coverageDistribution['method'] - ] - ); - - $template->renderTo($file); - } - - /** - * Returns the data for the Class/Method Complexity charts. - * - * @param array $classes - * @param string $baseLink - * @return array - */ - protected function complexity(array $classes, $baseLink) - { - $result = ['class' => [], 'method' => []]; - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($className != '*') { - $methodName = $className . '::' . $methodName; - } - - $result['method'][] = [ - $method['coverage'], - $method['ccn'], - sprintf( - '%s', - str_replace($baseLink, '', $method['link']), - $methodName - ) - ]; - } - - $result['class'][] = [ - $class['coverage'], - $class['ccn'], - sprintf( - '%s', - str_replace($baseLink, '', $class['link']), - $className - ) - ]; - } - - return [ - 'class' => json_encode($result['class']), - 'method' => json_encode($result['method']) - ]; - } - - /** - * Returns the data for the Class / Method Coverage Distribution chart. - * - * @param array $classes - * @return array - */ - protected function coverageDistribution(array $classes) - { - $result = [ - 'class' => [ - '0%' => 0, - '0-10%' => 0, - '10-20%' => 0, - '20-30%' => 0, - '30-40%' => 0, - '40-50%' => 0, - '50-60%' => 0, - '60-70%' => 0, - '70-80%' => 0, - '80-90%' => 0, - '90-100%' => 0, - '100%' => 0 - ], - 'method' => [ - '0%' => 0, - '0-10%' => 0, - '10-20%' => 0, - '20-30%' => 0, - '30-40%' => 0, - '40-50%' => 0, - '50-60%' => 0, - '60-70%' => 0, - '70-80%' => 0, - '80-90%' => 0, - '90-100%' => 0, - '100%' => 0 - ] - ]; - - foreach ($classes as $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] == 0) { - $result['method']['0%']++; - } elseif ($method['coverage'] == 100) { - $result['method']['100%']++; - } else { - $key = floor($method['coverage'] / 10) * 10; - $key = $key . '-' . ($key + 10) . '%'; - $result['method'][$key]++; - } - } - - if ($class['coverage'] == 0) { - $result['class']['0%']++; - } elseif ($class['coverage'] == 100) { - $result['class']['100%']++; - } else { - $key = floor($class['coverage'] / 10) * 10; - $key = $key . '-' . ($key + 10) . '%'; - $result['class'][$key]++; - } - } - - return [ - 'class' => json_encode(array_values($result['class'])), - 'method' => json_encode(array_values($result['method'])) - ]; - } - - /** - * Returns the classes / methods with insufficient coverage. - * - * @param array $classes - * @param string $baseLink - * @return array - */ - protected function insufficientCoverage(array $classes, $baseLink) - { - $leastTestedClasses = []; - $leastTestedMethods = []; - $result = ['class' => '', 'method' => '']; - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] < $this->highLowerBound) { - if ($className != '*') { - $key = $className . '::' . $methodName; - } else { - $key = $methodName; - } - - $leastTestedMethods[$key] = $method['coverage']; - } - } - - if ($class['coverage'] < $this->highLowerBound) { - $leastTestedClasses[$className] = $class['coverage']; - } - } - - asort($leastTestedClasses); - asort($leastTestedMethods); - - foreach ($leastTestedClasses as $className => $coverage) { - $result['class'] .= sprintf( - '
  • (Dashboard)
  • ' . "\n", - str_replace($baseLink, '', $classes[$className]['link']), - $className, - $coverage - ); - } - - foreach ($leastTestedMethods as $methodName => $coverage) { - list($class, $method) = explode('::', $methodName); - - $result['method'] .= sprintf( - ' ' . "\n", - str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), - $methodName, - $method, - $coverage - ); - } - - return $result; - } - - /** - * Returns the project risks according to the CRAP index. - * - * @param array $classes - * @param string $baseLink - * @return array - */ - protected function projectRisks(array $classes, $baseLink) - { - $classRisks = []; - $methodRisks = []; - $result = ['class' => '', 'method' => '']; - - foreach ($classes as $className => $class) { - foreach ($class['methods'] as $methodName => $method) { - if ($method['coverage'] < $this->highLowerBound && - $method['ccn'] > 1) { - if ($className != '*') { - $key = $className . '::' . $methodName; - } else { - $key = $methodName; - } - - $methodRisks[$key] = $method['crap']; - } - } - - if ($class['coverage'] < $this->highLowerBound && - $class['ccn'] > count($class['methods'])) { - $classRisks[$className] = $class['crap']; - } - } - - arsort($classRisks); - arsort($methodRisks); - - foreach ($classRisks as $className => $crap) { - $result['class'] .= sprintf( - ' ' . "\n", - str_replace($baseLink, '', $classes[$className]['link']), - $className, - $crap - ); - } - - foreach ($methodRisks as $methodName => $crap) { - list($class, $method) = explode('::', $methodName); - - $result['method'] .= sprintf( - ' ' . "\n", - str_replace($baseLink, '', $classes[$class]['methods'][$method]['link']), - $methodName, - $method, - $crap - ); - } - - return $result; - } - - protected function getActiveBreadcrumb(PHP_CodeCoverage_Report_Node $node) - { - return sprintf( - '
  • %s
  • ' . "\n" . - '
  • (Dashboard)
  • ' . "\n", - $node->getName() - ); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php deleted file mode 100644 index b7c0d0d6..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php +++ /dev/null @@ -1,97 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Renders a PHP_CodeCoverage_Report_Node_Directory node. - * - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_HTML_Renderer_Directory extends PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * @param PHP_CodeCoverage_Report_Node_Directory $node - * @param string $file - */ - public function render(PHP_CodeCoverage_Report_Node_Directory $node, $file) - { - $template = new Text_Template($this->templatePath . 'directory.html', '{{', '}}'); - - $this->setCommonTemplateVariables($template, $node); - - $items = $this->renderItem($node, true); - - foreach ($node->getDirectories() as $item) { - $items .= $this->renderItem($item); - } - - foreach ($node->getFiles() as $item) { - $items .= $this->renderItem($item); - } - - $template->setVar( - [ - 'id' => $node->getId(), - 'items' => $items - ] - ); - - $template->renderTo($file); - } - - /** - * @param PHP_CodeCoverage_Report_Node $item - * @param bool $total - * @return string - */ - protected function renderItem(PHP_CodeCoverage_Report_Node $item, $total = false) - { - $data = [ - 'numClasses' => $item->getNumClassesAndTraits(), - 'numTestedClasses' => $item->getNumTestedClassesAndTraits(), - 'numMethods' => $item->getNumMethods(), - 'numTestedMethods' => $item->getNumTestedMethods(), - 'linesExecutedPercent' => $item->getLineExecutedPercent(false), - 'linesExecutedPercentAsString' => $item->getLineExecutedPercent(), - 'numExecutedLines' => $item->getNumExecutedLines(), - 'numExecutableLines' => $item->getNumExecutableLines(), - 'testedMethodsPercent' => $item->getTestedMethodsPercent(false), - 'testedMethodsPercentAsString' => $item->getTestedMethodsPercent(), - 'testedClassesPercent' => $item->getTestedClassesAndTraitsPercent(false), - 'testedClassesPercentAsString' => $item->getTestedClassesAndTraitsPercent() - ]; - - if ($total) { - $data['name'] = 'Total'; - } else { - if ($item instanceof PHP_CodeCoverage_Report_Node_Directory) { - $data['name'] = sprintf( - '%s', - $item->getName(), - $item->getName() - ); - - $data['icon'] = ' '; - } else { - $data['name'] = sprintf( - '%s', - $item->getName(), - $item->getName() - ); - - $data['icon'] = ' '; - } - } - - return $this->renderItemTemplate( - new Text_Template($this->templatePath . 'directory_item.html', '{{', '}}'), - $data - ); - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php deleted file mode 100644 index bb3eed48..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php +++ /dev/null @@ -1,556 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -// @codeCoverageIgnoreStart -if (!defined('T_TRAIT')) { - define('T_TRAIT', 1001); -} - -if (!defined('T_INSTEADOF')) { - define('T_INSTEADOF', 1002); -} - -if (!defined('T_CALLABLE')) { - define('T_CALLABLE', 1003); -} - -if (!defined('T_FINALLY')) { - define('T_FINALLY', 1004); -} - -if (!defined('T_YIELD')) { - define('T_YIELD', 1005); -} -// @codeCoverageIgnoreEnd - -/** - * Renders a PHP_CodeCoverage_Report_Node_File node. - * - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report_HTML_Renderer -{ - /** - * @var int - */ - private $htmlspecialcharsFlags; - - /** - * Constructor. - * - * @param string $templatePath - * @param string $generator - * @param string $date - * @param int $lowUpperBound - * @param int $highLowerBound - */ - public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) - { - parent::__construct( - $templatePath, - $generator, - $date, - $lowUpperBound, - $highLowerBound - ); - - $this->htmlspecialcharsFlags = ENT_COMPAT; - - if (PHP_VERSION_ID >= 50400 && defined('ENT_SUBSTITUTE')) { - $this->htmlspecialcharsFlags = $this->htmlspecialcharsFlags | ENT_HTML401 | ENT_SUBSTITUTE; - } - } - - /** - * @param PHP_CodeCoverage_Report_Node_File $node - * @param string $file - */ - public function render(PHP_CodeCoverage_Report_Node_File $node, $file) - { - $template = new Text_Template($this->templatePath . 'file.html', '{{', '}}'); - - $template->setVar( - [ - 'items' => $this->renderItems($node), - 'lines' => $this->renderSource($node) - ] - ); - - $this->setCommonTemplateVariables($template, $node); - - $template->renderTo($file); - } - - /** - * @param PHP_CodeCoverage_Report_Node_File $node - * @return string - */ - protected function renderItems(PHP_CodeCoverage_Report_Node_File $node) - { - $template = new Text_Template($this->templatePath . 'file_item.html', '{{', '}}'); - - $methodItemTemplate = new Text_Template( - $this->templatePath . 'method_item.html', - '{{', - '}}' - ); - - $items = $this->renderItemTemplate( - $template, - [ - 'name' => 'Total', - 'numClasses' => $node->getNumClassesAndTraits(), - 'numTestedClasses' => $node->getNumTestedClassesAndTraits(), - 'numMethods' => $node->getNumMethods(), - 'numTestedMethods' => $node->getNumTestedMethods(), - 'linesExecutedPercent' => $node->getLineExecutedPercent(false), - 'linesExecutedPercentAsString' => $node->getLineExecutedPercent(), - 'numExecutedLines' => $node->getNumExecutedLines(), - 'numExecutableLines' => $node->getNumExecutableLines(), - 'testedMethodsPercent' => $node->getTestedMethodsPercent(false), - 'testedMethodsPercentAsString' => $node->getTestedMethodsPercent(), - 'testedClassesPercent' => $node->getTestedClassesAndTraitsPercent(false), - 'testedClassesPercentAsString' => $node->getTestedClassesAndTraitsPercent(), - 'crap' => 'CRAP' - ] - ); - - $items .= $this->renderFunctionItems( - $node->getFunctions(), - $methodItemTemplate - ); - - $items .= $this->renderTraitOrClassItems( - $node->getTraits(), - $template, - $methodItemTemplate - ); - - $items .= $this->renderTraitOrClassItems( - $node->getClasses(), - $template, - $methodItemTemplate - ); - - return $items; - } - - /** - * @param array $items - * @param Text_Template $template - * @param Text_Template $methodItemTemplate - * @return string - */ - protected function renderTraitOrClassItems(array $items, Text_Template $template, Text_Template $methodItemTemplate) - { - if (empty($items)) { - return ''; - } - - $buffer = ''; - - foreach ($items as $name => $item) { - $numMethods = count($item['methods']); - $numTestedMethods = 0; - - foreach ($item['methods'] as $method) { - if ($method['executedLines'] == $method['executableLines']) { - $numTestedMethods++; - } - } - - $buffer .= $this->renderItemTemplate( - $template, - [ - 'name' => $name, - 'numClasses' => 1, - 'numTestedClasses' => $numTestedMethods == $numMethods ? 1 : 0, - 'numMethods' => $numMethods, - 'numTestedMethods' => $numTestedMethods, - 'linesExecutedPercent' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - false - ), - 'linesExecutedPercentAsString' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - true - ), - 'numExecutedLines' => $item['executedLines'], - 'numExecutableLines' => $item['executableLines'], - 'testedMethodsPercent' => PHP_CodeCoverage_Util::percent( - $numTestedMethods, - $numMethods, - false - ), - 'testedMethodsPercentAsString' => PHP_CodeCoverage_Util::percent( - $numTestedMethods, - $numMethods, - true - ), - 'testedClassesPercent' => PHP_CodeCoverage_Util::percent( - $numTestedMethods == $numMethods ? 1 : 0, - 1, - false - ), - 'testedClassesPercentAsString' => PHP_CodeCoverage_Util::percent( - $numTestedMethods == $numMethods ? 1 : 0, - 1, - true - ), - 'crap' => $item['crap'] - ] - ); - - foreach ($item['methods'] as $method) { - $buffer .= $this->renderFunctionOrMethodItem( - $methodItemTemplate, - $method, - ' ' - ); - } - } - - return $buffer; - } - - /** - * @param array $functions - * @param Text_Template $template - * @return string - */ - protected function renderFunctionItems(array $functions, Text_Template $template) - { - if (empty($functions)) { - return ''; - } - - $buffer = ''; - - foreach ($functions as $function) { - $buffer .= $this->renderFunctionOrMethodItem( - $template, - $function - ); - } - - return $buffer; - } - - /** - * @param Text_Template $template - * @return string - */ - protected function renderFunctionOrMethodItem(Text_Template $template, array $item, $indent = '') - { - $numTestedItems = $item['executedLines'] == $item['executableLines'] ? 1 : 0; - - return $this->renderItemTemplate( - $template, - [ - 'name' => sprintf( - '%s%s', - $indent, - $item['startLine'], - htmlspecialchars($item['signature']), - isset($item['functionName']) ? $item['functionName'] : $item['methodName'] - ), - 'numMethods' => 1, - 'numTestedMethods' => $numTestedItems, - 'linesExecutedPercent' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - false - ), - 'linesExecutedPercentAsString' => PHP_CodeCoverage_Util::percent( - $item['executedLines'], - $item['executableLines'], - true - ), - 'numExecutedLines' => $item['executedLines'], - 'numExecutableLines' => $item['executableLines'], - 'testedMethodsPercent' => PHP_CodeCoverage_Util::percent( - $numTestedItems, - 1, - false - ), - 'testedMethodsPercentAsString' => PHP_CodeCoverage_Util::percent( - $numTestedItems, - 1, - true - ), - 'crap' => $item['crap'] - ] - ); - } - - /** - * @param PHP_CodeCoverage_Report_Node_File $node - * @return string - */ - protected function renderSource(PHP_CodeCoverage_Report_Node_File $node) - { - $coverageData = $node->getCoverageData(); - $testData = $node->getTestData(); - $codeLines = $this->loadFile($node->getPath()); - $lines = ''; - $i = 1; - - foreach ($codeLines as $line) { - $trClass = ''; - $popoverContent = ''; - $popoverTitle = ''; - - if (array_key_exists($i, $coverageData)) { - $numTests = count($coverageData[$i]); - - if ($coverageData[$i] === null) { - $trClass = ' class="warning"'; - } elseif ($numTests == 0) { - $trClass = ' class="danger"'; - } else { - $lineCss = 'covered-by-large-tests'; - $popoverContent = '
      '; - - if ($numTests > 1) { - $popoverTitle = $numTests . ' tests cover line ' . $i; - } else { - $popoverTitle = '1 test covers line ' . $i; - } - - foreach ($coverageData[$i] as $test) { - if ($lineCss == 'covered-by-large-tests' && $testData[$test]['size'] == 'medium') { - $lineCss = 'covered-by-medium-tests'; - } elseif ($testData[$test]['size'] == 'small') { - $lineCss = 'covered-by-small-tests'; - } - - switch ($testData[$test]['status']) { - case 0: - switch ($testData[$test]['size']) { - case 'small': - $testCSS = ' class="covered-by-small-tests"'; - break; - - case 'medium': - $testCSS = ' class="covered-by-medium-tests"'; - break; - - default: - $testCSS = ' class="covered-by-large-tests"'; - break; - } - break; - - case 1: - case 2: - $testCSS = ' class="warning"'; - break; - - case 3: - $testCSS = ' class="danger"'; - break; - - case 4: - $testCSS = ' class="danger"'; - break; - - default: - $testCSS = ''; - } - - $popoverContent .= sprintf( - '%s', - $testCSS, - htmlspecialchars($test) - ); - } - - $popoverContent .= '
    '; - $trClass = ' class="' . $lineCss . ' popin"'; - } - } - - if (!empty($popoverTitle)) { - $popover = sprintf( - ' data-title="%s" data-content="%s" data-placement="bottom" data-html="true"', - $popoverTitle, - htmlspecialchars($popoverContent) - ); - } else { - $popover = ''; - } - - $lines .= sprintf( - '
    ' . "\n", - $trClass, - $popover, - $i, - $i, - $i, - $line - ); - - $i++; - } - - return $lines; - } - - /** - * @param string $file - * @return array - */ - protected function loadFile($file) - { - $buffer = file_get_contents($file); - $tokens = token_get_all($buffer); - $result = ['']; - $i = 0; - $stringFlag = false; - $fileEndsWithNewLine = substr($buffer, -1) == "\n"; - - unset($buffer); - - foreach ($tokens as $j => $token) { - if (is_string($token)) { - if ($token === '"' && $tokens[$j - 1] !== '\\') { - $result[$i] .= sprintf( - '%s', - htmlspecialchars($token) - ); - - $stringFlag = !$stringFlag; - } else { - $result[$i] .= sprintf( - '%s', - htmlspecialchars($token) - ); - } - - continue; - } - - list($token, $value) = $token; - - $value = str_replace( - ["\t", ' '], - ['    ', ' '], - htmlspecialchars($value, $this->htmlspecialcharsFlags) - ); - - if ($value === "\n") { - $result[++$i] = ''; - } else { - $lines = explode("\n", $value); - - foreach ($lines as $jj => $line) { - $line = trim($line); - - if ($line !== '') { - if ($stringFlag) { - $colour = 'string'; - } else { - switch ($token) { - case T_INLINE_HTML: - $colour = 'html'; - break; - - case T_COMMENT: - case T_DOC_COMMENT: - $colour = 'comment'; - break; - - case T_ABSTRACT: - case T_ARRAY: - case T_AS: - case T_BREAK: - case T_CALLABLE: - case T_CASE: - case T_CATCH: - case T_CLASS: - case T_CLONE: - case T_CONTINUE: - case T_DEFAULT: - case T_ECHO: - case T_ELSE: - case T_ELSEIF: - case T_EMPTY: - case T_ENDDECLARE: - case T_ENDFOR: - case T_ENDFOREACH: - case T_ENDIF: - case T_ENDSWITCH: - case T_ENDWHILE: - case T_EXIT: - case T_EXTENDS: - case T_FINAL: - case T_FINALLY: - case T_FOREACH: - case T_FUNCTION: - case T_GLOBAL: - case T_IF: - case T_IMPLEMENTS: - case T_INCLUDE: - case T_INCLUDE_ONCE: - case T_INSTANCEOF: - case T_INSTEADOF: - case T_INTERFACE: - case T_ISSET: - case T_LOGICAL_AND: - case T_LOGICAL_OR: - case T_LOGICAL_XOR: - case T_NAMESPACE: - case T_NEW: - case T_PRIVATE: - case T_PROTECTED: - case T_PUBLIC: - case T_REQUIRE: - case T_REQUIRE_ONCE: - case T_RETURN: - case T_STATIC: - case T_THROW: - case T_TRAIT: - case T_TRY: - case T_UNSET: - case T_USE: - case T_VAR: - case T_WHILE: - case T_YIELD: - $colour = 'keyword'; - break; - - default: - $colour = 'default'; - } - } - - $result[$i] .= sprintf( - '%s', - $colour, - $line - ); - } - - if (isset($lines[$jj + 1])) { - $result[++$i] = ''; - } - } - } - } - - if ($fileEndsWithNewLine) { - unset($result[count($result)-1]); - } - - return $result; - } -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist deleted file mode 100644 index 5a09c354..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist +++ /dev/null @@ -1,5 +0,0 @@ -
    -
    - {{percent}}% covered ({{level}}) -
    -
    diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css deleted file mode 100644 index cd1c616a..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Bootstrap v3.3.4 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px \9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.form-group-sm .form-control{height:30px;line-height:30px}select[multiple].form-group-sm .form-control,textarea.form-group-sm .form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:5px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.form-group-lg .form-control{height:46px;line-height:46px}select[multiple].form-group-lg .form-control,textarea.form-group-lg .form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:10px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.33px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.active,.btn-default.focus,.btn-default:active,.btn-default:focus,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.active,.btn-primary.focus,.btn-primary:active,.btn-primary:focus,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.active,.btn-success.focus,.btn-success:active,.btn-success:focus,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.active,.btn-info.focus,.btn-info:active,.btn-info:focus,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.active,.btn-warning.focus,.btn-warning:active,.btn-warning:focus,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.active,.btn-danger.focus,.btn-danger:active,.btn-danger:focus,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px)and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:2;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px 15px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding:48px 0}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-weight:400;line-height:1.42857143;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000;perspective:1000}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;margin-top:-10px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px)and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px)and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px)and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px)and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} \ No newline at end of file diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css deleted file mode 100644 index 7a6f7fe9..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css +++ /dev/null @@ -1 +0,0 @@ -.nvd3 .nv-axis{pointer-events:none;opacity:1}.nvd3 .nv-axis path{fill:none;stroke:#000;stroke-opacity:.75;shape-rendering:crispEdges}.nvd3 .nv-axis path.domain{stroke-opacity:.75}.nvd3 .nv-axis.nv-x path.domain{stroke-opacity:0}.nvd3 .nv-axis line{fill:none;stroke:#e5e5e5;shape-rendering:crispEdges}.nvd3 .nv-axis .zero line,.nvd3 .nv-axis line.zero{stroke-opacity:.75}.nvd3 .nv-axis .nv-axisMaxMin text{font-weight:700}.nvd3 .x .nv-axis .nv-axisMaxMin text,.nvd3 .x2 .nv-axis .nv-axisMaxMin text,.nvd3 .x3 .nv-axis .nv-axisMaxMin text{text-anchor:middle}.nvd3 .nv-axis.nv-disabled{opacity:0}.nvd3 .nv-bars rect{fill-opacity:.75;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-bars rect.hover{fill-opacity:1}.nvd3 .nv-bars .hover rect{fill:#add8e6}.nvd3 .nv-bars text{fill:rgba(0,0,0,0)}.nvd3 .nv-bars .hover text{fill:rgba(0,0,0,1)}.nvd3 .nv-multibar .nv-groups rect,.nvd3 .nv-multibarHorizontal .nv-groups rect,.nvd3 .nv-discretebar .nv-groups rect{stroke-opacity:0;transition:fill-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear}.nvd3 .nv-multibar .nv-groups rect:hover,.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,.nvd3 .nv-candlestickBar .nv-ticks rect:hover,.nvd3 .nv-discretebar .nv-groups rect:hover{fill-opacity:1}.nvd3 .nv-discretebar .nv-groups text,.nvd3 .nv-multibarHorizontal .nv-groups text{font-weight:700;fill:rgba(0,0,0,1);stroke:rgba(0,0,0,0)}.nvd3 .nv-boxplot circle{fill-opacity:.5}.nvd3 .nv-boxplot circle:hover{fill-opacity:1}.nvd3 .nv-boxplot rect:hover{fill-opacity:1}.nvd3 line.nv-boxplot-median{stroke:#000}.nv-boxplot-tick:hover{stroke-width:2.5px}.nvd3.nv-bullet{font:10px sans-serif}.nvd3.nv-bullet .nv-measure{fill-opacity:.8}.nvd3.nv-bullet .nv-measure:hover{fill-opacity:1}.nvd3.nv-bullet .nv-marker{stroke:#000;stroke-width:2px}.nvd3.nv-bullet .nv-markerTriangle{stroke:#000;fill:#fff;stroke-width:1.5px}.nvd3.nv-bullet .nv-tick line{stroke:#666;stroke-width:.5px}.nvd3.nv-bullet .nv-range.nv-s0{fill:#eee}.nvd3.nv-bullet .nv-range.nv-s1{fill:#ddd}.nvd3.nv-bullet .nv-range.nv-s2{fill:#ccc}.nvd3.nv-bullet .nv-title{font-size:14px;font-weight:700}.nvd3.nv-bullet .nv-subtitle{fill:#999}.nvd3.nv-bullet .nv-range{fill:#bababa;fill-opacity:.4}.nvd3.nv-bullet .nv-range:hover{fill-opacity:.7}.nvd3.nv-candlestickBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.positive rect{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-candlestickBar .nv-ticks .nv-tick.negative rect{stroke:#d62728;fill:#d62728}.with-transitions .nv-candlestickBar .nv-ticks .nv-tick{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-candlestickBar .nv-ticks line{stroke:#333}.nvd3 .nv-legend .nv-disabled rect{}.nvd3 .nv-check-box .nv-box{fill-opacity:0;stroke-width:2}.nvd3 .nv-check-box .nv-check{fill-opacity:0;stroke-width:4}.nvd3 .nv-series.nv-disabled .nv-check-box .nv-check{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-controlsWrap .nv-legend .nv-check-box .nv-check{opacity:0}.nvd3.nv-linePlusBar .nv-bar rect{fill-opacity:.75}.nvd3.nv-linePlusBar .nv-bar rect:hover{fill-opacity:1}.nvd3 .nv-groups path.nv-line{fill:none}.nvd3 .nv-groups path.nv-area{stroke:none}.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point{fill-opacity:0;stroke-opacity:0}.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point{fill-opacity:.5!important;stroke-opacity:.5!important}.with-transitions .nvd3 .nv-groups .nv-point{transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-scatter .nv-groups .nv-point.hover,.nvd3 .nv-groups .nv-point.hover{stroke-width:7px;fill-opacity:.95!important;stroke-opacity:.95!important}.nvd3 .nv-point-paths path{stroke:#aaa;stroke-opacity:0;fill:#eee;fill-opacity:0}.nvd3 .nv-indexLine{cursor:ew-resize}svg.nvd3-svg{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-ms-user-select:none;-moz-user-select:none;user-select:none;display:block;width:100%;height:100%}.nvtooltip.with-3d-shadow,.with-3d-shadow .nvtooltip{-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nvd3 text{font:400 12px Arial}.nvd3 .title{font:700 14px Arial}.nvd3 .nv-background{fill:#fff;fill-opacity:0}.nvd3.nv-noData{font-size:18px;font-weight:700}.nv-brush .extent{fill-opacity:.125;shape-rendering:crispEdges}.nv-brush .resize path{fill:#eee;stroke:#666}.nvd3 .nv-legend .nv-series{cursor:pointer}.nvd3 .nv-legend .nv-disabled circle{fill-opacity:0}.nvd3 .nv-brush .extent{fill-opacity:0!important}.nvd3 .nv-brushBackground rect{stroke:#000;stroke-width:.4;fill:#fff;fill-opacity:.7}.nvd3.nv-ohlcBar .nv-ticks .nv-tick{stroke-width:1px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover{stroke-width:2px}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive{stroke:#2ca02c}.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative{stroke:#d62728}.nvd3 .background path{fill:none;stroke:#EEE;stroke-opacity:.4;shape-rendering:crispEdges}.nvd3 .foreground path{fill:none;stroke-opacity:.7}.nvd3 .nv-parallelCoordinates-brush .extent{fill:#fff;fill-opacity:.6;stroke:gray;shape-rendering:crispEdges}.nvd3 .nv-parallelCoordinates .hover{fill-opacity:1;stroke-width:3px}.nvd3 .missingValuesline line{fill:none;stroke:#000;stroke-width:1;stroke-opacity:1;stroke-dasharray:5,5}.nvd3.nv-pie path{stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-width 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-pie .nv-pie-title{font-size:24px;fill:rgba(19,196,249,.59)}.nvd3.nv-pie .nv-slice text{stroke:#000;stroke-width:0}.nvd3.nv-pie path{stroke:#fff;stroke-width:1px;stroke-opacity:1}.nvd3.nv-pie .hover path{fill-opacity:.7}.nvd3.nv-pie .nv-label{pointer-events:none}.nvd3.nv-pie .nv-label rect{fill-opacity:0;stroke-opacity:0}.nvd3 .nv-groups .nv-point.hover{stroke-width:20px;stroke-opacity:.5}.nvd3 .nv-scatter .nv-point.hover{fill-opacity:1}.nv-noninteractive{pointer-events:none}.nv-distx,.nv-disty{pointer-events:none}.nvd3.nv-sparkline path{fill:none}.nvd3.nv-sparklineplus g.nv-hoverValue{pointer-events:none}.nvd3.nv-sparklineplus .nv-hoverValue line{stroke:#333;stroke-width:1.5px}.nvd3.nv-sparklineplus,.nvd3.nv-sparklineplus g{pointer-events:all}.nvd3 .nv-hoverArea{fill-opacity:0;stroke-opacity:0}.nvd3.nv-sparklineplus .nv-xValue,.nvd3.nv-sparklineplus .nv-yValue{stroke-width:0;font-size:.9em;font-weight:400}.nvd3.nv-sparklineplus .nv-yValue{stroke:#f66}.nvd3.nv-sparklineplus .nv-maxValue{stroke:#2ca02c;fill:#2ca02c}.nvd3.nv-sparklineplus .nv-minValue{stroke:#d62728;fill:#d62728}.nvd3.nv-sparklineplus .nv-currentValue{font-weight:700;font-size:1.1em}.nvd3.nv-stackedarea path.nv-area{fill-opacity:.7;stroke-opacity:0;transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-moz-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear;-webkit-transition:fill-opacity 250ms linear,stroke-opacity 250ms linear}.nvd3.nv-stackedarea path.nv-area.hover{fill-opacity:.9}.nvd3.nv-stackedarea .nv-groups .nv-point{stroke-opacity:0;fill-opacity:0}.nvtooltip{position:absolute;background-color:rgba(255,255,255,1);color:rgba(0,0,0,1);padding:1px;border:1px solid rgba(0,0,0,.2);z-index:10000;display:block;font-family:Arial;font-size:13px;text-align:left;pointer-events:none;white-space:nowrap;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.nvtooltip{background:rgba(255,255,255,.8);border:1px solid rgba(0,0,0,.5);border-radius:4px}.nvtooltip.with-transitions,.with-transitions .nvtooltip{transition:opacity 50ms linear;-moz-transition:opacity 50ms linear;-webkit-transition:opacity 50ms linear;transition-delay:200ms;-moz-transition-delay:200ms;-webkit-transition-delay:200ms}.nvtooltip.x-nvtooltip,.nvtooltip.y-nvtooltip{padding:8px}.nvtooltip h3{margin:0;padding:4px 14px;line-height:18px;font-weight:400;background-color:rgba(247,247,247,.75);color:rgba(0,0,0,1);text-align:center;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.nvtooltip p{margin:0;padding:5px 14px;text-align:center}.nvtooltip span{display:inline-block;margin:2px 0}.nvtooltip table{margin:6px;border-spacing:0}.nvtooltip table td{padding:2px 9px 2px 0;vertical-align:middle}.nvtooltip table td.key{font-weight:400}.nvtooltip table td.value{text-align:right;font-weight:700}.nvtooltip table tr.highlight td{padding:1px 9px 1px 0;border-bottom-style:solid;border-bottom-width:1px;border-top-style:solid;border-top-width:1px}.nvtooltip table td.legend-color-guide div{width:8px;height:8px;vertical-align:middle}.nvtooltip table td.legend-color-guide div{width:12px;height:12px;border:1px solid #999}.nvtooltip .footer{padding:3px;text-align:center}.nvtooltip-pending-removal{pointer-events:none;display:none}.nvd3 .nv-interactiveGuideLine{pointer-events:none}.nvd3 line.nv-guideline{stroke:#ccc} \ No newline at end of file diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css deleted file mode 100644 index 824fb317..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css +++ /dev/null @@ -1,122 +0,0 @@ -body { - padding-top: 10px; -} - -.popover { - max-width: none; -} - -.glyphicon { - margin-right:.25em; -} - -.table-bordered>thead>tr>td { - border-bottom-width: 1px; -} - -.table tbody>tr>td, .table thead>tr>td { - padding-top: 3px; - padding-bottom: 3px; -} - -.table-condensed tbody>tr>td { - padding-top: 0; - padding-bottom: 0; -} - -.table .progress { - margin-bottom: inherit; -} - -.table-borderless th, .table-borderless td { - border: 0 !important; -} - -.table tbody tr.covered-by-large-tests, li.covered-by-large-tests, tr.success, td.success, li.success, span.success { - background-color: #dff0d8; -} - -.table tbody tr.covered-by-medium-tests, li.covered-by-medium-tests { - background-color: #c3e3b5; -} - -.table tbody tr.covered-by-small-tests, li.covered-by-small-tests { - background-color: #99cb84; -} - -.table tbody tr.danger, .table tbody td.danger, li.danger, span.danger { - background-color: #f2dede; -} - -.table tbody td.warning, li.warning, span.warning { - background-color: #fcf8e3; -} - -.table tbody td.info { - background-color: #d9edf7; -} - -td.big { - width: 117px; -} - -td.small { -} - -td.codeLine { - font-family: monospace; - white-space: pre; -} - -td span.comment { - color: #888a85; -} - -td span.default { - color: #2e3436; -} - -td span.html { - color: #888a85; -} - -td span.keyword { - color: #2e3436; - font-weight: bold; -} - -pre span.string { - color: #2e3436; -} - -span.success, span.warning, span.danger { - margin-right: 2px; - padding-left: 10px; - padding-right: 10px; - text-align: center; -} - -#classCoverageDistribution, #classComplexity { - height: 200px; - width: 475px; -} - -#toplink { - position: fixed; - left: 5px; - bottom: 5px; - outline: 0; -} - -svg text { - font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - color: #666; - fill: #666; -} - -.scrollbox { - height:245px; - overflow-x:hidden; - overflow-y:scroll; -} diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist deleted file mode 100644 index ed189886..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist +++ /dev/null @@ -1,284 +0,0 @@ - - - - - Dashboard for {{full_path}} - - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -

    Classes

    -
    -
    -
    -
    -

    Coverage Distribution

    -
    - -
    -
    -
    -

    Complexity

    -
    - -
    -
    -
    -
    -
    -

    Insufficient Coverage

    -
    -
    %s%d%%
    %s%d%%
    %s%d
    %s%d
    %s
    - - - - - - - -{{insufficient_coverage_classes}} - -
    ClassCoverage
    - - -
    -

    Project Risks

    -
    - - - - - - - - -{{project_risks_classes}} - -
    ClassCRAP
    -
    -
    - -
    -
    -

    Methods

    -
    -
    -
    -
    -

    Coverage Distribution

    -
    - -
    -
    -
    -

    Complexity

    -
    - -
    -
    -
    -
    -
    -

    Insufficient Coverage

    -
    - - - - - - - - -{{insufficient_coverage_methods}} - -
    MethodCoverage
    -
    -
    -
    -

    Project Risks

    -
    - - - - - - - - -{{project_risks_methods}} - -
    MethodCRAP
    -
    -
    -
    - - - - - - - - - - diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist deleted file mode 100644 index efe743f5..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - -{{items}} - -
     
    Code Coverage
     
    Lines
    Functions and Methods
    Classes and Traits
    - -
    - - - - - diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist deleted file mode 100644 index 78dbb356..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist +++ /dev/null @@ -1,13 +0,0 @@ - - {{icon}}{{name}} - {{lines_bar}} -
    {{lines_executed_percent}}
    -
    {{lines_number}}
    - {{methods_bar}} -
    {{methods_tested_percent}}
    -
    {{methods_number}}
    - {{classes_bar}} -
    {{classes_tested_percent}}
    -
    {{classes_number}}
    - - diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist deleted file mode 100644 index 59a06843..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist +++ /dev/null @@ -1,90 +0,0 @@ - - - - - Code Coverage for {{full_path}} - - - - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - -{{items}} - -
     
    Code Coverage
     
    Classes and Traits
    Functions and Methods
    Lines
    - - -{{lines}} - -
    - -
    - - - - - - diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist deleted file mode 100644 index 756fdd69..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist +++ /dev/null @@ -1,14 +0,0 @@ - - {{name}} - {{classes_bar}} -
    {{classes_tested_percent}}
    -
    {{classes_number}}
    - {{methods_bar}} -
    {{methods_tested_percent}}
    -
    {{methods_number}}
    - {{crap}} - {{lines_bar}} -
    {{lines_executed_percent}}
    -
    {{lines_number}}
    - - diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot deleted file mode 100644 index b93a4953fff68df523aa7656497ee339d6026d64..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20127 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf deleted file mode 100644 index 1413fc609ab6f21774de0cb7e01360095584f65b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45404 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 G`u_lkUM?>H diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 deleted file mode 100644 index 64539b54c3751a6d9adb44c8e3a45ba5a73b77f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18028 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 diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js deleted file mode 100644 index c8f82e59..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Bootstrap v3.3.4 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.4",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.4",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active"));a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.4",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.4",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=c(d),f={relatedTarget:this};e.hasClass("open")&&(e.trigger(b=a.Event("hide.bs.dropdown",f)),b.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f)))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.4",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport),this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c&&c.$tip&&c.$tip.is(":visible")?void(c.hoverState="in"):(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.options.container?a(this.options.container):this.$element.parent(),p=this.getPosition(o);h="bottom"==h&&k.bottom+m>p.bottom?"top":"top"==h&&k.top-mp.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type)})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.4",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.4",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.4",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=a(document.body).height();"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js deleted file mode 100644 index 34d5513e..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js +++ /dev/null @@ -1,5 +0,0 @@ -!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function r(n){return null===n?0/0:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function l(){this._=Object.create(null)}function s(n){return(n+="")===pa||n[0]===va?va+n:n}function f(n){return(n+="")[0]===va?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[];for(var t in this._)n.push(f(t));return n}function v(){var n=0;for(var t in this._)++n;return n}function d(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function y(n){return n}function M(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function x(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=da.length;r>e;++e){var u=da[e]+t;if(u in n)return u}}function b(){}function _(){}function w(n){function t(){for(var t,r=e,u=-1,i=r.length;++ue;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function Z(n){return ya(n,Sa),n}function V(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t0&&(n=n.slice(0,a));var l=ka.get(n);return l&&(n=l,c=B),a?t?u:r:t?b:i}function $(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function B(n,t){var e=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function W(e){var r=".dragsuppress-"+ ++Aa,u="click"+r,i=ta.select(t(e)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Ea&&(Ea="onselectstart"in e?!1:x(e.style,"userSelect")),Ea){var o=n(e).style,a=o[Ea];o[Ea]="none"}return function(n){if(i.on(r,null),Ea&&(o[Ea]=a),n){var t=function(){i.on(u,null)};i.on(u,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,e){e.changedTouches&&(e=e.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var u=r.createSVGPoint();if(0>Na){var i=t(n);if(i.scrollX||i.scrollY){r=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=r[0][0].getScreenCTM();Na=!(o.f||o.e),r.remove()}}return Na?(u.x=e.pageX,u.y=e.pageY):(u.x=e.clientX,u.y=e.clientY),u=u.matrixTransform(n.getScreenCTM().inverse()),[u.x,u.y]}var a=n.getBoundingClientRect();return[e.clientX-a.left-n.clientLeft,e.clientY-a.top-n.clientTop]}function G(){return ta.event.changedTouches[0].identifier}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?qa:Math.acos(n)}function tt(n){return n>1?Ra:-1>n?-Ra:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Da)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Xa,r=pt(r)*$a,i=pt(i)*Ba,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Pa,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,n>>8&255,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=Ga.get(n.toLowerCase()))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Xa),u=vt((.2126729*n+.7151522*t+.072175*e)/$a),i=vt((.0193339*n+.119192*t+.9503041*e)/Ba);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Nt(t,e,n,r)}}function Nt(n,t,e,r){function u(){var n,t=c.status;if(!t&&zt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return void o.error.call(i,r)}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(Ct(r))}function Ct(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function zt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function qt(){var n=Lt(),t=Tt()-n;t>24?(isFinite(t)&&(clearTimeout(tc),tc=setTimeout(qt,t)),nc=0):(nc=1,rc(qt))}function Lt(){var n=Date.now();for(ec=Ka;ec;)n>=ec.t&&(ec.f=ec.c(n-ec.t)),ec=ec.n;return n}function Tt(){for(var n,t=Ka,e=1/0;t;)t.f?t=n?n.n=t.n:Ka=t.n:(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Pt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:y;return function(n){var e=ic.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=oc.get(g)||Ut;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function Ut(n){return n+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ft(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new cc(e-1)),1),e}function i(n,e){return t(n=new cc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{cc=jt;var r=new jt;return r._=n,o(r,t,e)}finally{cc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ht(n);return c.floor=c,c.round=Ht(r),c.ceil=Ht(u),c.offset=Ht(i),c.range=a,n}function Ht(n){return function(t,e){try{cc=jt;var r=new jt;return r._=t,n(r,e)._}finally{cc=Date}}}function Ot(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++aa;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in sc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{cc=jt;var t=new cc;return t._=n,r(t)}finally{cc=Date}}var r=t(n);return e.parse=function(n){try{cc=jt;var t=r.parse(n);return t&&t._}finally{cc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ae;var M=ta.map(),x=Yt(v),b=Zt(v),_=Yt(d),w=Zt(d),S=Yt(m),k=Zt(m),E=Yt(y),A=Zt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+ac.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(ac.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(ac.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:ie,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:Qt,e:Qt,H:te,I:te,j:ne,L:ue,m:Kt,M:ee,p:s,S:re,U:Xt,w:Vt,W:$t,x:c,X:l,y:Wt,Y:Bt,Z:Jt,"%":oe};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Yt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Zt(n){for(var t=new l,e=-1,r=n.length;++e68?1900:2e3)}function Kt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Qt(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function ne(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function te(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ee(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function re(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ue(n,t,e){fc.lastIndex=0;var r=fc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ie(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=ga(t)/60|0,u=ga(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function oe(n,t,e){hc.lastIndex=0;var r=hc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ae(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);yc.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;Mc.point=function(o,a){Mc.point=n,r=(t=o)*Da,u=Math.cos(a=(e=a)*Da/2+qa/4),i=Math.sin(a)},Mc.lineEnd=function(){n(t,e)}}function pe(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function ve(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function de(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function me(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ye(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Me(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function xe(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function be(n,t){return ga(n[0]-t[0])a;++a)u.point((e=n[a])[0],e[1]);return void u.lineEnd()}var c=new qe(e,n,null,!0),l=new qe(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new qe(r,n,null,!1),l=new qe(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),ze(i),ze(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function ze(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Te))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=Fe(m,p);g.length?(b||(i.polygonStart(),b=!0),Ce(g,De,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=Re(),x=t(M),b=!1;return y}}function Te(n){return n.length>1}function Re(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function De(n,t){return((n=n.x)[0]<0?n[1]-Ra-Ca:Ra-n[1])-((t=t.x)[0]<0?t[1]-Ra-Ca:Ra-t[1])}function Pe(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?qa:-qa,c=ga(i-e);ga(c-qa)0?Ra:-Ra),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=qa&&(ga(e-u)Ca?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function je(n,t,e,r){var u;if(null==n)u=e*Ra,r.point(-qa,u),r.point(0,u),r.point(qa,u),r.point(qa,0),r.point(qa,-u),r.point(0,-u),r.point(-qa,-u),r.point(-qa,0),r.point(-qa,u);else if(ga(n[0]-t[0])>Ca){var i=n[0]a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+qa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+qa/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>qa,k=p*M;if(yc.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*La:b,S^h>=e^m>=e){var E=de(pe(f),pe(n));Me(E);var A=de(u,E);Me(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ca>i||Ca>i&&0>yc)^1&o}function He(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?qa:-qa),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(be(e,g)||be(p,g))&&(p[0]+=Ca,p[1]+=Ca,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&be(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=pe(n),u=pe(t),o=[1,0,0],a=de(r,u),c=ve(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=de(o,a),p=ye(o,f),v=ye(a,h);me(p,v);var d=g,m=ve(p,d),y=ve(d,d),M=m*m-y*(ve(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=ye(d,(-m-x)/y);if(me(b,p),b=xe(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=ga(A-qa)A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(ga(b[0]-w)qa^(w<=b[0]&&b[0]<=S)){var z=ye(d,(-m+x)/y);return me(z,p),[b,xe(z)]}}}function u(t,e){var r=o?n:qa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=ga(i)>Ca,c=gr(n,6*Da);return Le(t,e,c,o?[0,-n]:[-qa,n-qa])}function Oe(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return ga(r[0]-n)0?0:3:ga(r[0]-e)0?2:1:ga(r[1]-t)0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Tc,Math.min(Tc,n)),t=Math.max(-Tc,Math.min(Tc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=Re(),N=Oe(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&Ce(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ye(n){var t=0,e=qa/3,r=ir(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*qa/180,e=n[1]*qa/180):[t/qa*180,e/qa*180]},u}function Ze(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Ve(){function n(n,t){Dc+=u*n-r*t,r=n,u=t}var t,e,r,u;Hc.point=function(i,o){Hc.point=n,t=r=i,e=u=o},Hc.lineEnd=function(){n(t,e)}}function Xe(n,t){Pc>n&&(Pc=n),n>jc&&(jc=n),Uc>t&&(Uc=t),t>Fc&&(Fc=t)}function $e(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Be(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Be(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Be(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function We(n,t){_c+=n,wc+=t,++Sc}function Je(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);kc+=o*(t+n)/2,Ec+=o*(e+r)/2,Ac+=o,We(t=n,e=r)}var t,e;Ic.point=function(r,u){Ic.point=n,We(t=r,e=u)}}function Ge(){Ic.point=We}function Ke(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);kc+=o*(r+n)/2,Ec+=o*(u+t)/2,Ac+=o,o=u*n-r*t,Nc+=o*(r+n),Cc+=o*(u+t),zc+=3*o,We(r=n,u=t)}var t,e,r,u;Ic.point=function(i,o){Ic.point=n,We(t=r=i,e=u=o)},Ic.lineEnd=function(){n(t,e)}}function Qe(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,La)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:b};return a}function nr(n){function t(n){return(a?r:e)(n)}function e(t){return rr(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=pe([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c -},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=ga(ga(w)-1)i||ga((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Da),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function tr(n){var t=nr(function(t,e){return n([t*Pa,e*Pa])});return function(n){return or(t(n))}}function er(n){this.stream=n}function rr(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ur(n){return ir(function(){return n})()}function ir(n){function t(n){return n=a(n[0]*Da,n[1]*Da),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Pa,n[1]*Pa]}function r(){a=Ae(o=lr(m,M,x),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=nr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,M=0,x=0,b=Lc,_=y,w=null,S=null;return t.stream=function(n){return s&&(s.valid=!1),s=or(b(o,f(_(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(w=n,Lc):He((w=+n)*Da),u()):w},t.clipExtent=function(n){return arguments.length?(S=n,_=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):y,u()):S},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Da,d=n[1]%360*Da,r()):[v*Pa,d*Pa]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Da,M=n[1]%360*Da,x=n.length>2?n[2]%360*Da:0,r()):[m*Pa,M*Pa,x*Pa]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function or(n){return rr(n,function(t,e){n.point(t*Da,e*Da)})}function ar(n,t){return[n,t]}function cr(n,t){return[n>qa?n-La:-qa>n?n+La:n,t]}function lr(n,t,e){return n?t||e?Ae(fr(n),hr(t,e)):fr(n):t||e?hr(t,e):cr}function sr(n){return function(t,e){return t+=n,[t>qa?t-La:-qa>t?t+La:t,e]}}function fr(n){var t=sr(n);return t.invert=sr(-n),t}function hr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function gr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=pr(e,u),i=pr(e,i),(o>0?i>u:u>i)&&(u+=o*La)):(u=n+o*La,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=xe([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function pr(n,t){var e=pe(t);e[0]-=n,Me(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ca)%(2*Math.PI)}function vr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function dr(n,t,e){var r=ta.range(n,t-Ca,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function mr(n){return n.source}function yr(n){return n.target}function Mr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Pa,Math.atan2(o,Math.sqrt(r*r+u*u))*Pa]}:function(){return[n*Pa,t*Pa]};return p.distance=h,p}function xr(){function n(n,u){var i=Math.sin(u*=Da),o=Math.cos(u),a=ga((n*=Da)-t),c=Math.cos(a);Yc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Zc.point=function(u,i){t=u*Da,e=Math.sin(i*=Da),r=Math.cos(i),Zc.point=n},Zc.lineEnd=function(){Zc.point=Zc.lineEnd=b}}function br(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function _r(n,t){function e(n,t){o>0?-Ra+Ca>t&&(t=-Ra+Ca):t>Ra-Ca&&(t=Ra-Ca);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(qa/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ra]},e):Sr}function wr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return ga(u)u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function zr(n,t){return n[0]-t[0]||n[1]-t[1]}function qr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Lr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Tr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Rr(){tu(this),this.edge=this.site=this.circle=null}function Dr(n){var t=el.pop()||new Rr;return t.site=n,t}function Pr(n){Xr(n),Qc.remove(n),el.push(n),tu(n)}function Ur(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Pr(n);for(var c=i;c.circle&&ga(e-c.circle.x)s;++s)l=a[s],c=a[s-1],Kr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Jr(c.site,l.site,null,u),Vr(c),Vr(l)}function jr(n){for(var t,e,r,u,i=n.x,o=n.y,a=Qc._;a;)if(r=Fr(a,o)-i,r>Ca)a=a.L;else{if(u=i-Hr(a,o),!(u>Ca)){r>-Ca?(t=a.P,e=a):u>-Ca?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Dr(n);if(Qc.insert(t,c),t||e){if(t===e)return Xr(t),e=Dr(t.site),Qc.insert(c,e),c.edge=e.edge=Jr(t.site,c.site),Vr(t),void Vr(e);if(!e)return void(c.edge=Jr(t.site,c.site));Xr(t),Xr(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Kr(e.edge,l,p,x),c.edge=Jr(l,n,null,x),e.edge=Jr(n,p,null,x),Vr(t),Vr(e)}}function Fr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Hr(n,t){var e=n.N;if(e)return Fr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Or(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Kc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(ga(r-t)>Ca||ga(u-e)>Ca)&&(a.splice(o,0,new Qr(Gr(i.site,s,ga(r-f)Ca?{x:f,y:ga(t-f)Ca?{x:ga(e-p)Ca?{x:h,y:ga(t-h)Ca?{x:ga(e-g)=-za)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=rl.pop()||new Zr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=tl._;M;)if(m.yd||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.yr||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.yg){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.xi||f>o||r>h||u>g)){if(p=n.point){var p,v=t-n.x,d=e-n.y,m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function gu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function pu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=mu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function vu(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function du(n,t){var e,r,u,i=il.lastIndex=ol.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=il.exec(n))&&(r=ol.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:vu(e,r)})),i=ol.lastIndex;return ir;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function mu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function yu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(mu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function Mu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function xu(n){return function(t){return 1-n(1-t)}}function bu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function _u(n){return n*n}function wu(n){return n*n*n}function Su(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function ku(n){return function(t){return Math.pow(t,n)}}function Eu(n){return 1-Math.cos(n*Ra)}function Au(n){return Math.pow(2,10*(n-1))}function Nu(n){return 1-Math.sqrt(1-n*n)}function Cu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/La*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*La/t)}}function zu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function qu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Lu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Tu(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Pu(n){var t=[n.a,n.b],e=[n.c,n.d],r=ju(t),u=Uu(t,e),i=ju(Fu(e,t,-u))||0;t[0]*e[1]180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:vu(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:vu(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:vu(g[0],p[0])},{i:e-2,x:vu(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i=0;)e.push(u[r])}function Qu(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++oe;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function si(n){return n.reduce(fi,0)}function fi(n,t){return n+t[1]}function hi(n,t){return gi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function gi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function pi(n){return[ta.min(n),ta.max(n)]}function vi(n,t){return n.value-t.value}function di(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function mi(n,t){n._pack_next=t,t._pack_prev=n}function yi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function Mi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(xi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],wi(r,u,i),t(i),di(r,i),r._pack_prev=i,di(i,u),u=r._pack_next,o=3;l>o;o++){wi(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(yi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!yi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.ro;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(bi)}}function xi(n){n._pack_next=n._pack_prev=n}function bi(n){delete n._pack_next,delete n._pack_prev}function _i(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Ci(n,t,e){return n.a.parent===t.parent?n.a:e}function zi(n){return 1+ta.max(n,function(n){return n.y})}function qi(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Li(n){var t=n.children;return t&&t.length?Li(t[0]):n}function Ti(n){var t,e=n.children;return e&&(t=e.length)?Ti(e[t-1]):n}function Ri(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Di(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Pi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ui(n){return n.rangeExtent?n.rangeExtent():Pi(n.range())}function ji(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Fi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Hi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ml}function Oi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?Oi:ji,c=r?Iu:Ou;return o=u(n,t,c,e),a=u(t,n,c,mu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Du)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Xi(n,t)},i.tickFormat=function(t,e){return $i(n,t,e)},i.nice=function(t){return Zi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Yi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Zi(n,t){return Fi(n,Hi(Vi(n,t)[2]))}function Vi(n,t){null==t&&(t=10);var e=Pi(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Xi(n,t){return ta.range.apply(ta,Vi(n,t))}function $i(n,t,e){var r=Vi(n,t);if(e){var u=ic.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(ga(r[0]),ga(r[1])));return u[7]||(u[7]="."+Bi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Wi(u[8],r)),e=u.join("")}else e=",."+Bi(r[2])+"f";return ta.format(e)}function Bi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Wi(n,t){var e=Bi(t[2]);return n in yl?Math.abs(e-Bi(Math.max(ga(t[0]),ga(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Ji(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Fi(r.map(u),e?Math:xl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Pi(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++0;h--)o.push(i(l)*h);for(l=0;o[l]c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return Ml;arguments.length<2?t=Ml:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Ji(n.copy(),t,e,r)},Yi(o,n)}function Gi(n,t,e){function r(t){return n(u(t))}var u=Ki(t),i=Ki(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Xi(e,n)},r.tickFormat=function(n,t){return $i(e,n,t)},r.nice=function(n){return r.domain(Zi(e,n))},r.exponent=function(o){return arguments.length?(u=Ki(t=o),i=Ki(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Gi(n.copy(),t,e)},Yi(r,n)}function Ki(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Qi(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new l;for(var i,o=-1,a=r.length;++oe?[0/0,0/0]:[e>0?a[e-1]:n[0],et?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return to(n,t,e)},u()}function eo(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return eo(n,t)},e}function ro(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Xi(n,t)},t.tickFormat=function(t,e){return $i(n,t,e)},t.copy=function(){return ro(n)},t}function uo(){return 0}function io(n){return n.innerRadius}function oo(n){return n.outerRadius}function ao(n){return n.startAngle}function co(n){return n.endAngle}function lo(n){return n&&n.padAngle}function so(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function fo(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function ho(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f1&&u.push("H",r[0]),u.join("")}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function To(n){return n.length<3?go(n):n[0]+_o(n,Lo(n))}function Ro(n){for(var t,e,r,u=-1,i=n.length;++ur)return s();var u=i[i.active];u&&(--i.count,delete i[i.active],u.event&&u.event.interrupt.call(n,n.__data__,u.index)),i.active=r,o.event&&o.event.start.call(n,n.__data__,t),o.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&v.push(r)}),h=o.ease,f=o.duration,ta.timer(function(){return p.c=l(e||1)?Ne:l,1},0,a)}function l(e){if(i.active!==r)return 1;for(var u=e/f,a=h(u),c=v.length;c>0;)v[--c].call(n,a);return u>=1?(o.event&&o.event.end.call(n,n.__data__,t),s()):void 0}function s(){return--i.count?delete i[r]:delete n[e],1}var f,h,g=o.delay,p=ec,v=[];return p.t=g+a,u>=g?c(u-g):void(p.c=c)},0,a)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Vl,u);return i==Vl.length?[t.year,Vi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Vl[i-1]1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Pi(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Yi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.5"},ea=[].slice,ra=function(n){return ea.call(n)},ua=this.document;if(ua)try{ra(ua.documentElement.childNodes)[0].nodeType}catch(ia){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),ua)try{ua.createElement("DIV").style.setProperty("opacity",0,"")}catch(oa){var aa=this.Element.prototype,ca=aa.setAttribute,la=aa.setAttributeNS,sa=this.CSSStyleDeclaration.prototype,fa=sa.setProperty;aa.setAttribute=function(n,t){ca.call(this,n,t+"")},aa.setAttributeNS=function(n,t,e){la.call(this,n,t,e+"")},sa.setProperty=function(n,t,e){fa.call(this,n,t+"",e)}}ta.ascending=e,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ur&&(e=r)}else{for(;++u=r){e=r;break}for(;++ur&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ue&&(e=r)}else{for(;++u=r){e=r;break}for(;++ue&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i=r){e=u=r;break}for(;++ir&&(e=r),r>u&&(u=r))}else{for(;++i=r){e=u=r;break}for(;++ir&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var e,r=0,i=n.length,o=-1;if(1===arguments.length)for(;++o1?c/(s-1):void 0},ta.deviation=function(){var n=ta.variance.apply(this,arguments);return n?Math.sqrt(n):n};var ha=i(e);ta.bisectLeft=ha.left,ta.bisect=ta.bisectRight=ha.right,ta.bisector=function(n){return i(1===n.length?function(t,r){return e(n(t),r)}:n)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=Math.random()*i--|0,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,o),e=new Array(t);++n=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var ga=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e===1/0)throw new Error("infinite range");var r,u=[],i=a(ga(e)),o=-1;if(n*=i,t*=i,e*=i,0>e)for(;(r=n+e*++o)>t;)u.push(r/i);else for(;(r=n+e*++o)=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var c,s,f,h,g=-1,p=o.length,v=i[a++],d=new l;++g=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},c(m,{has:h,add:function(n){return this._[s(n+="")]=!0,n},remove:g,values:p,size:v,empty:d,forEach:function(n){for(var t in this._)n.call(this,f(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(ma,"\\$&")};var ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ya={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},Ma=function(n,t){return t.querySelector(n)},xa=function(n,t){return t.querySelectorAll(n)},ba=function(n,t){var e=n.matches||n[x(n,"matchesSelector")];return(ba=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(Ma=function(n,t){return Sizzle(n,t)[0]||null},xa=Sizzle,ba=Sizzle.matchesSelector),ta.selection=function(){return ta.select(ua.documentElement)};var _a=ta.selection.prototype=[];_a.select=function(n){var t,e,r,u,i=[];n=N(n);for(var o=-1,a=this.length;++o=0&&(e=n.slice(0,t),n=n.slice(t+1)),wa.hasOwnProperty(e)?{space:wa[e],local:n}:n}},_a.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(z(t,n[t]));return this}return this.each(z(n,t))},_a.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=T(n)).length,u=-1;if(t=e.classList){for(;++uu){if("string"!=typeof n){2>u&&(e="");for(r in n)this.each(P(r,n[r],e));return this}if(2>u){var i=this.node();return t(i).getComputedStyle(i,null).getPropertyValue(n)}r=""}return this.each(P(n,e,r))},_a.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(U(t,n[t]));return this}return this.each(U(n,t))},_a.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},_a.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},_a.append=function(n){return n=j(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},_a.insert=function(n,t){return n=j(n),t=N(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},_a.remove=function(){return this.each(F)},_a.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new l,y=new Array(o);for(r=-1;++rr;++r)p[r]=H(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,a.push(p),c.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++ii;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return A(u)},_a.order=function(){for(var n=-1,t=this.length;++n=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},_a.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++tn;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},_a.size=function(){var n=0;return Y(this,function(){++n}),n};var Sa=[];ta.selection.enter=Z,ta.selection.enter.prototype=Sa,Sa.append=_a.append,Sa.empty=_a.empty,Sa.node=_a.node,Sa.call=_a.call,Sa.size=_a.size,Sa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++ar){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(X(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(X(n,t,e))};var ka=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});ua&&ka.forEach(function(n){"on"+n in ua&&ka.remove(n)});var Ea,Aa=0;ta.mouse=function(n){return J(n,k())};var Na=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=k().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return J(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",i).on("touchstart.drag",o)}function e(n,t,e,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=r.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(e(f)).on(i+d,a).on(o+d,c),y=W(f),M=t(h,v);u?(l=u.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var r=E(n,"drag","dragstart","dragend"),u=null,i=e(b,ta.mouse,t,"mousemove","mouseup"),o=e(G,ta.touch,y,"touchmove","touchend");return n.origin=function(t){return arguments.length?(u=t,n):u},ta.rebind(n,r,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=k().touches),t?ra(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Ca=1e-6,za=Ca*Ca,qa=Math.PI,La=2*qa,Ta=La-Ca,Ra=qa/2,Da=qa/180,Pa=180/qa,Ua=Math.SQRT2,ja=2,Fa=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(ja*h)*(e*ut(Ua*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Ua*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Ua*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Fa*f)/(2*i*ja*h),p=(c*c-i*i-Fa*f)/(2*c*ja*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Ua;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(q,f).on(Oa+".zoom",g).on("dblclick.zoom",p).on(R,h)}function e(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function u(n){k.k=Math.max(N[0],Math.min(N[1],n))}function i(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function o(t,e,r,o){t.__chart__={x:k.x,y:k.y,k:k.k},u(Math.pow(2,o)),i(d=e,r),t=ta.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),w&&w.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function c(n){z++||n({type:"zoomstart"})}function l(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--z||n({type:"zoomend"}),d=null}function f(){function n(){f=1,i(ta.mouse(u),g),l(a)}function r(){h.on(L,null).on(T,null),p(f&&ta.event.target===o),s(a)}var u=this,o=ta.event.target,a=D.of(u,arguments),f=0,h=ta.select(t(u)).on(L,n).on(T,r),g=e(ta.mouse(u)),p=W(u);Dl.call(u),c(a)}function h(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=e(n))}),n}function t(){var t=ta.event.target;ta.select(t).on(x,r).on(b,a),_.push(t);for(var e=ta.event.changedTouches,u=0,i=e.length;i>u;++u)d[e[u].identifier]=null;var c=n(),l=Date.now();if(1===c.length){if(500>l-M){var s=c[0];o(p,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}M=l}else if(c.length>1){var s=c[0],f=c[1],h=s[0]-f[0],g=s[1]-f[1];m=h*h+g*g}}function r(){var n,t,e,r,o=ta.touches(p);Dl.call(p);for(var a=0,c=o.length;c>a;++a,r=null)if(e=o[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],u(f*g)}M=null,i(n,t),l(v)}function a(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(_).on(y,null),w.on(q,f).on(R,h),E(),s(v)}var g,p=this,v=D.of(p,arguments),d={},m=0,y=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+y,b="touchend"+y,_=[],w=ta.select(p),E=W(p);t(),c(v),w.on(q,null).on(R,t)}function g(){var n=D.of(this,arguments);y?clearTimeout(y):(v=e(d=m||ta.mouse(this)),Dl.call(this),c(n)),y=setTimeout(function(){y=null,s(n)},50),S(),u(Math.pow(2,.002*Ha())*k.k),i(d,v),l(n)}function p(){var n=ta.mouse(this),t=Math.log(k.k)/Math.LN2;o(this,n,e(n),ta.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}var v,d,m,y,M,x,b,_,w,k={x:0,y:0,k:1},A=[960,500],N=Ia,C=250,z=0,q="mousedown.zoom",L="mousemove.zoom",T="mouseup.zoom",R="touchstart.zoom",D=E(n,"zoomstart","zoom","zoomend");return Oa||(Oa="onwheel"in ua?(Ha=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Ha=function(){return ta.event.wheelDelta},"mousewheel"):(Ha=function(){return-ta.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=D.of(this,arguments),t=k;Tl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},c(n)}).tween("zoom:zoom",function(){var e=A[0],r=A[1],u=d?d[0]:e/2,i=d?d[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},l(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,c(n),l(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(N=null==t?Ia:[+t[0],+t[1]],n):N},n.center=function(t){return arguments.length?(m=t&&[+t[0],+t[1]],n):m},n.size=function(t){return arguments.length?(A=t&&[+t[0],+t[1]],n):A},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),k={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(w=t,_=t.copy(),k={x:0,y:0,k:1},n):w},ta.rebind(n,D,"on")};var Ha,Oa,Ia=[0,1/0];ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var Ya=at.prototype=new ot;Ya.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},Ya.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},Ya.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Za=lt.prototype=new ot;Za.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Va*(arguments.length?n:1)))},Za.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Va*(arguments.length?n:1)))},Za.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Va=18,Xa=.95047,$a=1,Ba=1.08883,Wa=ft.prototype=new ot;Wa.brighter=function(n){return new ft(Math.min(100,this.l+Va*(arguments.length?n:1)),this.a,this.b)},Wa.darker=function(n){return new ft(Math.max(0,this.l-Va*(arguments.length?n:1)),this.a,this.b)},Wa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var Ja=mt.prototype=new ot;Ja.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},Ja.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},Ja.hsl=function(){return _t(this.r,this.g,this.b)},Ja.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var Ga=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ga.forEach(function(n,t){Ga.set(n,yt(t))}),ta.functor=Et,ta.xhr=At(y),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Nt(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var Ka,Qa,nc,tc,ec,rc=this[x(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};Qa?Qa.n=i:Ka=i,Qa=i,nc||(tc=clearTimeout(tc),nc=1,rc(qt))},ta.timer.flush=function(){Lt(),Tt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var uc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Dt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Rt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),uc[8+e/3]};var ic=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,oc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Rt(n,t))).toFixed(Math.max(0,Math.min(20,Rt(n*(1+1e-15),t))))}}),ac=ta.time={},cc=Date;jt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){lc.setUTCDate.apply(this._,arguments)},setDay:function(){lc.setUTCDay.apply(this._,arguments)},setFullYear:function(){lc.setUTCFullYear.apply(this._,arguments)},setHours:function(){lc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){lc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){lc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){lc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){lc.setUTCSeconds.apply(this._,arguments)},setTime:function(){lc.setTime.apply(this._,arguments)}};var lc=Date.prototype;ac.year=Ft(function(n){return n=ac.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ac.years=ac.year.range,ac.years.utc=ac.year.utc.range,ac.day=Ft(function(n){var t=new cc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ac.days=ac.day.range,ac.days.utc=ac.day.utc.range,ac.dayOfYear=function(n){var t=ac.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ac[n]=Ft(function(n){return(n=ac.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ac[n+"s"]=e.range,ac[n+"s"].utc=e.utc.range,ac[n+"OfYear"]=function(n){var e=ac.year(n).getDay();return Math.floor((ac.dayOfYear(n)+(e+t)%7)/7)}}),ac.week=ac.sunday,ac.weeks=ac.sunday.range,ac.weeks.utc=ac.sunday.utc.range,ac.weekOfYear=ac.sundayOfYear;var sc={"-":"",_:" ",0:"0"},fc=/^\s*\d+/,hc=/^%/;ta.locale=function(n){return{numberFormat:Pt(n),timeFormat:Ot(n)}};var gc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=gc.numberFormat,ta.geo={},ce.prototype={s:0,t:0,add:function(n){le(n,this.t,pc),le(pc.s,this.s,this),this.s?this.t+=pc.t:this.s=pc.t -},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var pc=new ce;ta.geo.stream=function(n,t){n&&vc.hasOwnProperty(n.type)?vc[n.type](n,t):se(n,t)};var vc={Feature:function(n,t){se(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++rn?4*qa+n:n,Mc.lineStart=Mc.lineEnd=Mc.point=b}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=pe([t*Da,e*Da]);if(m){var u=de(m,r),i=[u[1],-u[0],0],o=de(i,u);Me(o),o=xe(o);var c=t-p,l=c>0?1:-1,v=o[0]*Pa*l,d=ga(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Pa;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Pa;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=ga(r)>180?r+(r>0?360:-360):r}else v=n,d=e;Mc.point(n,e),t(n,e)}function i(){Mc.lineStart()}function o(){u(v,d),Mc.lineEnd(),ga(y)>Ca&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nyc?(s=-(h=180),f=-(g=90)):y>Ca?g=90:-Ca>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){xc=bc=_c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,qc);var t=Nc,e=Cc,r=zc,u=t*t+e*e+r*r;return za>u&&(t=kc,e=Ec,r=Ac,Ca>bc&&(t=_c,e=wc,r=Sc),u=t*t+e*e+r*r,za>u)?[0/0,0/0]:[Math.atan2(e,t)*Pa,tt(r/Math.sqrt(u))*Pa]};var xc,bc,_c,wc,Sc,kc,Ec,Ac,Nc,Cc,zc,qc={sphere:b,point:_e,lineStart:Se,lineEnd:ke,polygonStart:function(){qc.lineStart=Ee},polygonEnd:function(){qc.lineStart=Se}},Lc=Le(Ne,Pe,je,[-qa,-qa/2]),Tc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ye(Ze)}).raw=Ze,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ca,f+.12*l+Ca],[s-.214*l-Ca,f+.234*l-Ca]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ca,f+.166*l+Ca],[s-.115*l-Ca,f+.234*l-Ca]]).stream(c).point,n},n.scale(1070)};var Rc,Dc,Pc,Uc,jc,Fc,Hc={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Dc=0,Hc.lineStart=Ve},polygonEnd:function(){Hc.lineStart=Hc.lineEnd=Hc.point=b,Rc+=ga(Dc/2)}},Oc={point:Xe,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Ic={point:We,lineStart:Je,lineEnd:Ge,polygonStart:function(){Ic.lineStart=Ke},polygonEnd:function(){Ic.point=We,Ic.lineStart=Je,Ic.lineEnd=Ge}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return Rc=0,ta.geo.stream(n,u(Hc)),Rc},n.centroid=function(n){return _c=wc=Sc=kc=Ec=Ac=Nc=Cc=zc=0,ta.geo.stream(n,u(Ic)),zc?[Nc/zc,Cc/zc]:Ac?[kc/Ac,Ec/Ac]:Sc?[_c/Sc,wc/Sc]:[0/0,0/0]},n.bounds=function(n){return jc=Fc=-(Pc=Uc=1/0),ta.geo.stream(n,u(Oc)),[[Pc,Uc],[jc,Fc]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||tr(n):y,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new $e:new Qe(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new er(t);for(var r in n)e[r]=n[r];return e}}},er.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ur,ta.geo.projectionMutator=ir,(ta.geo.equirectangular=function(){return ur(ar)}).raw=ar.invert=ar,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t}return n=lr(n[0]%360*Da,n[1]*Da,n.length>2?n[2]*Da:0),t.invert=function(t){return t=n.invert(t[0]*Da,t[1]*Da),t[0]*=Pa,t[1]*=Pa,t},t},cr.invert=ar,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=lr(-n[0]*Da,-n[1]*Da,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Pa,n[1]*=Pa}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=gr((t=+r)*Da,u*Da),n):t},n.precision=function(r){return arguments.length?(e=gr(t*Da,(u=+r)*Da),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Da,u=n[1]*Da,i=t[1]*Da,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return ga(n%d)>Ca}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return ga(n%m)>Ca}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=vr(a,o,90),f=dr(r,e,y),h=vr(l,c,90),g=dr(i,u,y),n):y},n.majorExtent([[-180,-90+Ca],[180,90-Ca]]).minorExtent([[-180,-80-Ca],[180,80+Ca]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=mr,u=yr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return Mr(n[0]*Da,n[1]*Da,t[0]*Da,t[1]*Da)},ta.geo.length=function(n){return Yc=0,ta.geo.stream(n,Zc),Yc};var Yc,Zc={sphere:b,point:b,lineStart:xr,lineEnd:b,polygonStart:b,polygonEnd:b},Vc=br(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ur(Vc)}).raw=Vc;var Xc=br(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},y);(ta.geo.azimuthalEquidistant=function(){return ur(Xc)}).raw=Xc,(ta.geo.conicConformal=function(){return Ye(_r)}).raw=_r,(ta.geo.conicEquidistant=function(){return Ye(wr)}).raw=wr;var $c=br(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ur($c)}).raw=$c,Sr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Ra]},(ta.geo.mercator=function(){return kr(Sr)}).raw=Sr;var Bc=br(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ur(Bc)}).raw=Bc;var Wc=br(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ur(Wc)}).raw=Wc,Er.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Ra]},(ta.geo.transverseMercator=function(){var n=kr(Er),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Er,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(zr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=Cr(a),s=Cr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ca)*Ca,y:Math.round(o(n,t)/Ca)*Ca,i:t}})}var r=Ar,u=Nr,i=r,o=u,a=ul;return n?t(n):(t.links=function(n){return iu(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return iu(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Yr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=su()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.xm&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=su();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){fu(n,k,v,d,m,y)},k.find=function(n){return hu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=cl.get(e)||al,r=ll.get(r)||y,Mu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Lu,ta.interpolateHsl=Tu,ta.interpolateLab=Ru,ta.interpolateRound=Du,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Pu(e?e.matrix:sl)})(n)},Pu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Hu,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++ea*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=fl,h=hl,g=-30,p=gl,v=.1,d=.64,m=[],M=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,y,x,b=m.length,_=M.length;for(e=0;_>e;++e)a=M[e],f=a.source,h=a.target,y=h.x-f.x,x=h.y-f.y,(p=y*y+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,y*=p,x*=p,h.x-=y*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=y*(d=1-d),f.y+=x*d);if((d=r*v)&&(y=l[0]/2,x=l[1]/2,e=-1,d))for(;++e0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;s>a;++a){var u=M[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++at;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=M[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,M[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,M[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(y).on("dragstart.force",Xu).on("drag.force",t).on("dragend.force",$u)),arguments.length?void this.on("mouseover.force",Bu).on("mouseout.force",Wu).call(e):e},ta.rebind(a,c,"on")};var fl=20,hl=1,gl=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return Qu(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ei,e=ni,r=ti;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Ku(t,function(n){n.children&&(n.value=0)}),Qu(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++lf?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===pl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=pl,r=0,u=La,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var pl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=y,e=ai,r=ci,u=oi,i=ui,o=ii;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:vl.get(t)||ai,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:dl.get(t)||ci,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var vl=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(li),i=n.map(si),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ai}),dl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:ci});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i0)for(i=-1;++i=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=pi,u=hi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return gi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Qu(a,function(n){n.r=+s(n.value)}),Qu(a,Mi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;Qu(a,function(n){n.r+=f}),Qu(a,Mi),Qu(a,function(n){n.r-=f})}return _i(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(vi),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Gu(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(Qu(h,e),h.parent.m=-h.z,Ku(h,r),l)Ku(f,i);else{var g=f,p=f,v=f;Ku(f,function(n){n.xp.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Ku(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ni(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ei(o),u=ki(u),o&&u;)c=ki(c),i=Ei(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ai(Ci(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ei(i)&&(i.t=o,i.m+=f-s),u&&!ki(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=Si,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Gu(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;Qu(c,function(n){var t=n.children;t&&t.length?(n.x=qi(t),n.y=zi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Li(c),f=Ti(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return Qu(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=Si,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Gu(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++ut?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++oe&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++ie.dx)&&(s=e.dx);++ie&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var ml={floor:y,ceil:y};ta.scale.linear=function(){return Ii([0,1],[0,1],mu,!1)};var yl={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Ji(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var Ml=ta.format(".0e"),xl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Gi(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return Qi([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(bl)},ta.scale.category20=function(){return ta.scale.ordinal().range(_l)},ta.scale.category20b=function(){return ta.scale.ordinal().range(wl)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Sl)};var bl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),_l=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),wl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Sl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return no([],[])},ta.scale.quantize=function(){return to(0,1,[0,1])},ta.scale.threshold=function(){return eo([.5],[0,1])},ta.scale.identity=function(){return ro([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-Ra,f=a.apply(this,arguments)-Ra,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ta)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===kl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=qa?0:1;if(A&&so(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=qa?0:1;if(E&&so(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Lr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=fo(null==S?[_,w]:[S,k],[y,M],l,H,g),I=fo([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^so(O[1][0],O[1][1],I[1][0],I[1][1]),",",g," ",I[1],"A",H,",",H," 0 0,",v," ",I[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",I[0])}else N.push("M",y,",",M);if(null!=S){var Y=Math.min(p,(n-F)/(j-1)),Z=fo([y,M],[S,k],n,-Y,g),V=fo([_,w],null==x?[y,M]:[x,b],n,-Y,g);p===Y?N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^so(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",Y,",",Y," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",Y,",",Y," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=io,r=oo,u=uo,i=kl,o=ao,a=co,c=lo;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==kl?kl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-Ra;return[Math.cos(t)*n,Math.sin(t)*n]},n};var kl="auto";ta.svg.line=function(){return ho(y)};var El=ta.map({linear:go,"linear-closed":po,step:vo,"step-before":mo,"step-after":yo,basis:So,"basis-open":ko,"basis-closed":Eo,bundle:Ao,cardinal:bo,"cardinal-open":Mo,"cardinal-closed":xo,monotone:To});El.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Al=[0,2/3,1/3,0],Nl=[0,1/3,2/3,0],Cl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=ho(Ro);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},mo.reverse=yo,yo.reverse=mo,ta.svg.area=function(){return Do(y)},ta.svg.area.radial=function(){var n=Do(Ro);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-Ra,s=l.call(n,u,r)-Ra;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>qa)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=mr,o=yr,a=Po,c=ao,l=co;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=mr,e=yr,r=Uo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=Uo,e=n.projection;return n.projection=function(n){return arguments.length?e(jo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(zl.get(t.call(this,n,r))||Oo)(e.call(this,n,r))}var t=Ho,e=Fo;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var zl=ta.map({circle:Oo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Ll)),e=t*Ll;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/ql),e=t*ql/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=zl.keys();var ql=Math.sqrt(3),Ll=Math.tan(30*Da);_a.transition=function(n){for(var t,e,r=Tl||++Ul,u=Xo(n),i=[],o=Rl||{time:Date.now(),ease:Su,delay:0,duration:250},a=-1,c=this.length;++ai;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Yo(u,this.namespace,this.id)},Pl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Pl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Hu:mu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Pl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Pl.style=function(n,e,r){function u(){this.style.removeProperty(n)}function i(e){return null==e?u:(e+="",function(){var u,i=t(this).getComputedStyle(this,null).getPropertyValue(n);return i!==e&&(u=mu(i,e),function(t){this.style.setProperty(n,u(t),r)})})}var o=arguments.length;if(3>o){if("string"!=typeof n){2>o&&(e="");for(r in n)this.style(r,n[r],e);return this}r=""}return Zo(this,"style."+n,e,i)},Pl.styleTween=function(n,e,r){function u(u,i){var o=e.call(this,u,i,t(this).getComputedStyle(this,null).getPropertyValue(n));return o&&function(t){this.style.setProperty(n,o(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,u)},Pl.text=function(n){return Zo(this,"text",n,Vo)},Pl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Pl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),Y(this,function(r){r[e][t].ease=n}))},Pl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Pl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Pl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Rl,i=Tl;try{Tl=e,Y(this,function(t,u,i){Rl=t[r][e],n.call(t,t.__data__,u,i)})}finally{Rl=u,Tl=i}}else Y(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Pl.transition=function(){for(var n,t,e,r,u=this.id,i=++Ul,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Yo(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):y:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ca),d=ta.transition(p.exit()).style("opacity",Ca).remove(),m=ta.transition(p.order()).style("opacity",1),M=Math.max(u,0)+o,x=Ui(f),b=l.selectAll(".domain").data([0]),_=(b.enter().append("path").attr("class","domain"),ta.transition(b));v.append("line"),v.append("text");var w,S,k,E,A=v.select("line"),N=m.select("line"),C=p.select("text").text(g),z=v.select("text"),q=m.select("text"),L="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,w="x",k="y",S="x2",E="y2",C.attr("dy",0>L?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+L*i+"V0H"+x[1]+"V"+L*i)):(n=Wo,w="y",k="x",S="y2",E="x2",C.attr("dy",".32em").style("text-anchor",0>L?"end":"start"),_.attr("d","M"+L*i+","+x[0]+"H0V"+x[1]+"H"+L*i)),A.attr(E,L*u),z.attr(k,L*M),N.attr(S,0).attr(E,L*u),q.attr(w,0).attr(k,L*M),f.rangeBand){var T=f,R=T.rangeBand()/2;s=f=function(n){return T(n)+R}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=jl,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Fl?t+"":jl,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var jl="bottom",Fl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(t){t.each(function(){var t=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=t.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=t.selectAll(".resize").data(v,y);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Hl[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var c,f=ta.transition(t),h=ta.transition(o);l&&(c=Ui(l),h.attr("x",c[0]).attr("width",c[1]-c[0]),r(f)),s&&(c=Ui(s),h.attr("y",c[0]).attr("height",c[1]-c[0]),u(f)),e(f)})}function e(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function u(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==ta.event.keyCode&&(C||(M=null,q[0]-=f[1],q[1]-=h[1],C=2),S())}function v(){32==ta.event.keyCode&&2==C&&(q[0]+=f[1],q[1]+=h[1],C=0,S())}function d(){var n=ta.mouse(b),t=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(ta.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),q[0]=f[+(n[0]s?(u=r,r=s):u=s),v[0]!=r||v[1]!=u?(e?a=null:o=null,v[0]=r,v[1]=u,!0):void 0}function y(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),L.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),w({type:"brushend"})}var M,x,b=this,_=ta.select(ta.event.target),w=c.of(b,arguments),k=ta.select(b),E=_.datum(),A=!/^(n|s)$/.test(E)&&l,N=!/^(e|w)$/.test(E)&&s,C=_.classed("extent"),z=W(b),q=ta.mouse(b),L=ta.select(t(b)).on("keydown.brush",i).on("keyup.brush",v);if(ta.event.changedTouches?L.on("touchmove.brush",d).on("touchend.brush",y):L.on("mousemove.brush",d).on("mouseup.brush",y),k.interrupt().selectAll("*").interrupt(),C)q[0]=f[0]-q[0],q[1]=h[0]-q[1];else if(E){var T=+/w$/.test(E),R=+/^n/.test(E);x=[f[1-T]-q[0],h[1-R]-q[1]],q[0]=f[T],q[1]=h[R]}else ta.event.altKey&&(M=q.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),d()}var o,a,c=E(n,"brushstart","brush","brushend"),l=null,s=null,f=[0,0],h=[0,0],g=!0,p=!0,v=Ol[0];return n.event=function(n){n.each(function(){var n=c.of(this,arguments),t={x:f,y:h,i:o,j:a},e=this.__chart__||t;this.__chart__=t,Tl?ta.select(this).transition().each("start.brush",function(){o=e.i,a=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=yu(f,t.x),r=yu(h,t.y);return o=a=null,function(u){f=t.x=e(u),h=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(l=t,v=Ol[!l<<1|!s],n):l},n.y=function(t){return arguments.length?(s=t,v=Ol[!l<<1|!s],n):s},n.clamp=function(t){return arguments.length?(l&&s?(g=!!t[0],p=!!t[1]):l?g=!!t:s&&(p=!!t),n):l&&s?[g,p]:l?g:s?p:null},n.extent=function(t){var e,r,u,i,c;return arguments.length?(l&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),o=[e,r],l.invert&&(e=l(e),r=l(r)),e>r&&(c=e,e=r,r=c),(e!=f[0]||r!=f[1])&&(f=[e,r])),s&&(u=t[0],i=t[1],l&&(u=u[1],i=i[1]),a=[u,i],s.invert&&(u=s(u),i=s(i)),u>i&&(c=u,u=i,i=c),(u!=h[0]||i!=h[1])&&(h=[u,i])),n):(l&&(o?(e=o[0],r=o[1]):(e=f[0],r=f[1],l.invert&&(e=l.invert(e),r=l.invert(r)),e>r&&(c=e,e=r,r=c))),s&&(a?(u=a[0],i=a[1]):(u=h[0],i=h[1],s.invert&&(u=s.invert(u),i=s.invert(i)),u>i&&(c=u,u=i,i=c))),l&&s?[[e,u],[r,i]]:l?[e,r]:s&&[u,i])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],o=a=null),n},n.empty=function(){return!!l&&f[0]==f[1]||!!s&&h[0]==h[1]},ta.rebind(n,c,"on")};var Hl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ol=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Il=ac.format=gc.timeFormat,Yl=Il.utc,Zl=Yl("%Y-%m-%dT%H:%M:%S.%LZ");Il.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:Zl,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=Zl.toString,ac.second=Ft(function(n){return new cc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ac.seconds=ac.second.range,ac.seconds.utc=ac.second.utc.range,ac.minute=Ft(function(n){return new cc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ac.minutes=ac.minute.range,ac.minutes.utc=ac.minute.utc.range,ac.hour=Ft(function(n){var t=n.getTimezoneOffset()/60;return new cc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ac.hours=ac.hour.range,ac.hours.utc=ac.hour.utc.range,ac.month=Ft(function(n){return n=ac.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ac.months=ac.month.range,ac.months.utc=ac.month.utc.range;var Vl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Xl=[[ac.second,1],[ac.second,5],[ac.second,15],[ac.second,30],[ac.minute,1],[ac.minute,5],[ac.minute,15],[ac.minute,30],[ac.hour,1],[ac.hour,3],[ac.hour,6],[ac.hour,12],[ac.day,1],[ac.day,2],[ac.week,1],[ac.month,1],[ac.month,3],[ac.year,1]],$l=Il.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ne]]),Bl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:y,ceil:y};Xl.year=ac.year,ac.scale=function(){return Go(ta.scale.linear(),Xl,$l)};var Wl=Xl.map(function(n){return[n[0].utc,n[1]]}),Jl=Yl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ne]]);Wl.year=ac.year.utc,ac.scale.utc=function(){return Go(ta.scale.linear(),Wl,Jl)},ta.text=At(function(n){return n.responseText}),ta.json=function(n,t){return Nt(n,"application/json",Qo,t)},ta.html=function(n,t){return Nt(n,"text/html",na,t)},ta.xml=At(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}(); \ No newline at end of file diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js deleted file mode 100644 index 6bfc844b..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/holder.min.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - -Holder - client side image placeholders -Version 2.7.1+6hydf -© 2015 Ivan Malopinsky - http://imsky.co - -Site: http://holderjs.com -Issues: https://github.com/imsky/holder/issues -License: http://opensource.org/licenses/MIT - -*/ -!function(a){if(a.document){var b=a.document;b.querySelectorAll||(b.querySelectorAll=function(c){var d,e=b.createElement("style"),f=[];for(b.documentElement.firstChild.appendChild(e),b._qsa=[],e.styleSheet.cssText=c+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",a.scrollBy(0,0),e.parentNode.removeChild(e);b._qsa.length;)d=b._qsa.shift(),d.style.removeAttribute("x-qsa"),f.push(d);return b._qsa=null,f}),b.querySelector||(b.querySelector=function(a){var c=b.querySelectorAll(a);return c.length?c[0]:null}),b.getElementsByClassName||(b.getElementsByClassName=function(a){return a=String(a).replace(/^|\s+/g,"."),b.querySelectorAll(a)}),Object.keys||(Object.keys=function(a){if(a!==Object(a))throw TypeError("Object.keys called on non-object");var b,c=[];for(b in a)Object.prototype.hasOwnProperty.call(a,b)&&c.push(b);return c}),function(a){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.atob=a.atob||function(a){a=String(a);var c,d=0,e=[],f=0,g=0;if(a=a.replace(/\s/g,""),a.length%4===0&&(a=a.replace(/=+$/,"")),a.length%4===1)throw Error("InvalidCharacterError");if(/[^+/0-9A-Za-z]/.test(a))throw Error("InvalidCharacterError");for(;d>16&255)),e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f)),g=0,f=0),d+=1;return 12===g?(f>>=4,e.push(String.fromCharCode(255&f))):18===g&&(f>>=2,e.push(String.fromCharCode(f>>8&255)),e.push(String.fromCharCode(255&f))),e.join("")},a.btoa=a.btoa||function(a){a=String(a);var c,d,e,f,g,h,i,j=0,k=[];if(/[^\x00-\xFF]/.test(a))throw Error("InvalidCharacterError");for(;j>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,j===a.length+2?(h=64,i=64):j===a.length+1&&(i=64),k.push(b.charAt(f),b.charAt(g),b.charAt(h),b.charAt(i));return k.join("")}}(a),Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(a){var b=this.__proto__||this.constructor.prototype;return a in this&&(!(a in b)||b[a]!==this[a])}),function(){if("performance"in a==!1&&(a.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in a.performance==!1){var b=Date.now();performance.timing&&performance.timing.navigationStart&&(b=performance.timing.navigationStart),a.performance.now=function(){return Date.now()-b}}}(),a.requestAnimationFrame||(a.webkitRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return webkitRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=webkitCancelAnimationFrame}(a):a.mozRequestAnimationFrame?!function(a){a.requestAnimationFrame=function(b){return mozRequestAnimationFrame(function(){b(a.performance.now())})},a.cancelAnimationFrame=mozCancelAnimationFrame}(a):!function(a){a.requestAnimationFrame=function(b){return a.setTimeout(b,1e3/60)},a.cancelAnimationFrame=a.clearTimeout}(a))}}(this),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.Holder=b():a.Holder=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){(function(b){function d(a,b,c,d){var f=e(c.substr(c.lastIndexOf(a.domain)),a);f&&h({mode:null,el:d,flags:f,engineSettings:b})}function e(a,b){var c={theme:B(J.settings.themes.gray,null),stylesheets:b.stylesheets,instanceOptions:b};return a.match(/([\d]+p?)x([\d]+p?)(?:\?|$)/)?f(a,c):g(a,c)}function f(a,b){var c=a.split("?"),d=c[0].split("/");b.holderURL=a;var e=d[1],f=e.match(/([\d]+p?)x([\d]+p?)/);if(!f)return!1;if(b.fluid=-1!==e.indexOf("p"),b.dimensions={width:f[1].replace("p","%"),height:f[2].replace("p","%")},2===c.length){var g=A.parse(c[1]);if(g.bg&&(b.theme.background=(-1===g.bg.indexOf("#")?"#":"")+g.bg),g.fg&&(b.theme.foreground=(-1===g.fg.indexOf("#")?"#":"")+g.fg),g.theme&&b.instanceOptions.themes.hasOwnProperty(g.theme)&&(b.theme=B(b.instanceOptions.themes[g.theme],null)),g.text&&(b.text=g.text),g.textmode&&(b.textmode=g.textmode),g.size&&(b.size=g.size),g.font&&(b.font=g.font),g.align&&(b.align=g.align),b.nowrap=z.truthy(g.nowrap),b.auto=z.truthy(g.auto),z.truthy(g.random)){J.vars.cache.themeKeys=J.vars.cache.themeKeys||Object.keys(b.instanceOptions.themes);var h=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(b.instanceOptions.themes[h],null)}}return b}function g(a,b){var c=!1,d=String.fromCharCode(11),e=a.replace(/([^\\])\//g,"$1"+d).split(d),f=/%[0-9a-f]{2}/gi,g=b.instanceOptions;b.holderURL=[];for(var h=e.length,i=0;h>i;i++){var j=e[i];if(j.match(f))try{j=decodeURIComponent(j)}catch(k){j=e[i]}var l=!1;if(J.flags.dimensions.match(j))c=!0,b.dimensions=J.flags.dimensions.output(j),l=!0;else if(J.flags.fluid.match(j))c=!0,b.dimensions=J.flags.fluid.output(j),b.fluid=!0,l=!0;else if(J.flags.textmode.match(j))b.textmode=J.flags.textmode.output(j),l=!0;else if(J.flags.colors.match(j)){var m=J.flags.colors.output(j);b.theme=B(b.theme,m),l=!0}else if(g.themes[j])g.themes.hasOwnProperty(j)&&(b.theme=B(g.themes[j],null)),l=!0;else if(J.flags.font.match(j))b.font=J.flags.font.output(j),l=!0;else if(J.flags.auto.match(j))b.auto=!0,l=!0;else if(J.flags.text.match(j))b.text=J.flags.text.output(j),l=!0;else if(J.flags.size.match(j))b.size=J.flags.size.output(j),l=!0;else if(J.flags.random.match(j)){null==J.vars.cache.themeKeys&&(J.vars.cache.themeKeys=Object.keys(g.themes));var n=J.vars.cache.themeKeys[0|Math.random()*J.vars.cache.themeKeys.length];b.theme=B(g.themes[n],null),l=!0}l&&b.holderURL.push(j)}return b.holderURL.unshift(g.domain),b.holderURL=b.holderURL.join("/"),c?b:!1}function h(a){var b=a.mode,c=a.el,d=a.flags,e=a.engineSettings,f=d.dimensions,g=d.theme,h=f.width+"x"+f.height;if(b=null==b?d.fluid?"fluid":"image":b,null!=d.text&&(g.text=d.text,"object"===c.nodeName.toLowerCase())){for(var j=g.text.split("\\n"),k=0;k1){var n,o=0,p=0,q=0;j=new e.Group("line"+q),("left"===a.align||"right"===a.align)&&(m=a.width*(1-2*(1-J.setup.lineWrapRatio)));for(var r=0;r=m||t===!0)&&(b(g,j,o,g.properties.leading),g.add(j),o=0,p+=g.properties.leading,q+=1,j=new e.Group("line"+q),j.y=p),t!==!0&&(i.moveTo(o,0),o+=h.spaceWidth+s.width,j.add(i))}if(b(g,j,o,g.properties.leading),g.add(j),"left"===a.align)g.moveTo(a.width-l,null,null);else if("right"===a.align){for(n in g.children)j=g.children[n],j.moveTo(a.width-j.width,null,null);g.moveTo(0-(a.width-l),null,null)}else{for(n in g.children)j=g.children[n],j.moveTo((g.width-j.width)/2,null,null);g.moveTo((a.width-g.width)/2,null,null)}g.moveTo(null,(a.height-g.height)/2,null),(a.height-g.height)/2<0&&g.moveTo(null,0,null)}else i=new e.Text(a.text),j=new e.Group("line0"),j.add(i),g.add(j),"left"===a.align?g.moveTo(a.width-l,null,null):"right"===a.align?g.moveTo(0-(a.width-l),null,null):g.moveTo((a.width-h.boundingBox.width)/2,null,null),g.moveTo(null,(a.height-h.boundingBox.height)/2,null);return d}function k(a,b,c){var d=parseInt(a,10),e=parseInt(b,10),f=Math.max(d,e),g=Math.min(d,e),h=.8*Math.min(g,f*J.defaults.scale);return Math.round(Math.max(c,h))}function l(a){var b;b=null==a||null==a.nodeType?J.vars.resizableImages:[a];for(var c=0,d=b.length;d>c;c++){var e=b[c];if(e.holderData){var f=e.holderData.flags,g=D(e);if(g){if(!e.holderData.resizeUpdate)continue;if(f.fluid&&f.auto){var h=e.holderData.fluidConfig;switch(h.mode){case"width":g.height=g.width/h.ratio;break;case"height":g.width=g.height*h.ratio}}var j={mode:"image",holderSettings:{dimensions:g,theme:f.theme,flags:f},el:e,engineSettings:e.holderData.engineSettings};"exact"==f.textmode&&(f.exactDimensions=g,j.holderSettings.dimensions=f.dimensions),i(j)}else p(e)}}}function m(a){if(a.holderData){var b=D(a);if(b){var c=a.holderData.flags,d={fluidHeight:"%"==c.dimensions.height.slice(-1),fluidWidth:"%"==c.dimensions.width.slice(-1),mode:null,initialDimensions:b};d.fluidWidth&&!d.fluidHeight?(d.mode="width",d.ratio=d.initialDimensions.width/parseFloat(c.dimensions.height)):!d.fluidWidth&&d.fluidHeight&&(d.mode="height",d.ratio=parseFloat(c.dimensions.width)/d.initialDimensions.height),a.holderData.fluidConfig=d}else p(a)}}function n(){for(var a,c=[],d=Object.keys(J.vars.invisibleImages),e=0,f=d.length;f>e;e++)a=J.vars.invisibleImages[d[e]],D(a)&&"img"==a.nodeName.toLowerCase()&&(c.push(a),delete J.vars.invisibleImages[d[e]]);c.length&&I.run({images:c}),b.requestAnimationFrame(n)}function o(){J.vars.visibilityCheckStarted||(b.requestAnimationFrame(n),J.vars.visibilityCheckStarted=!0)}function p(a){a.holderData.invisibleId||(J.vars.invisibleId+=1,J.vars.invisibleImages["i"+J.vars.invisibleId]=a,a.holderData.invisibleId=J.vars.invisibleId)}function q(a,b){return null==b?document.createElement(a):document.createElementNS(b,a)}function r(a,b){for(var c in b)a.setAttribute(c,b[c])}function s(a,b,c){var d,e;null==a?(a=q("svg",E),d=q("defs",E),e=q("style",E),r(e,{type:"text/css"}),d.appendChild(e),a.appendChild(d)):e=a.querySelector("style"),a.webkitMatchesSelector&&a.setAttribute("xmlns",E);for(var f=0;f=0;h--){var i=g.createProcessingInstruction("xml-stylesheet",'href="'+f[h]+'" rel="stylesheet"');g.insertBefore(i,g.firstChild)}g.removeChild(g.documentElement),e=d.serializeToString(g)}var j=d.serializeToString(a);return j=j.replace(/\&(\#[0-9]{2,}\;)/g,"&$1"),e+j}}function u(){return b.DOMParser?(new DOMParser).parseFromString("","application/xml"):void 0}function v(a){J.vars.debounceTimer||a.call(this),J.vars.debounceTimer&&b.clearTimeout(J.vars.debounceTimer),J.vars.debounceTimer=b.setTimeout(function(){J.vars.debounceTimer=null,a.call(this)},J.setup.debounce)}function w(){v(function(){l(null)})}var x=c(1),y=c(2),z=c(3),A=c(4),B=z.extend,C=z.getNodeArray,D=z.dimensionCheck,E="http://www.w3.org/2000/svg",F=8,G="2.7.1",H="\nCreated with Holder.js "+G+".\nLearn more at http://holderjs.com\n(c) 2012-2015 Ivan Malopinsky - http://imsky.co\n",I={version:G,addTheme:function(a,b){return null!=a&&null!=b&&(J.settings.themes[a]=b),delete J.vars.cache.themeKeys,this},addImage:function(a,b){var c=document.querySelectorAll(b);if(c.length)for(var d=0,e=c.length;e>d;d++){var f=q("img"),g={};g[J.vars.dataAttr]=a,r(f,g),c[d].appendChild(f)}return this},setResizeUpdate:function(a,b){a.holderData&&(a.holderData.resizeUpdate=!!b,a.holderData.resizeUpdate&&l(a))},run:function(a){a=a||{};var c={},f=B(J.settings,a);J.vars.preempted=!0,J.vars.dataAttr=f.dataAttr||J.vars.dataAttr,c.renderer=f.renderer?f.renderer:J.setup.renderer,-1===J.setup.renderers.join(",").indexOf(c.renderer)&&(c.renderer=J.setup.supportsSVG?"svg":J.setup.supportsCanvas?"canvas":"html");var g=C(f.images),i=C(f.bgnodes),j=C(f.stylenodes),k=C(f.objects);c.stylesheets=[],c.svgXMLStylesheet=!0,c.noFontFallback=f.noFontFallback?f.noFontFallback:!1;for(var l=0;l1){c.nodeValue="";for(var u=0;u=0?b:1)}function f(a){v?e(a):w.push(a)}null==document.readyState&&document.addEventListener&&(document.addEventListener("DOMContentLoaded",function y(){document.removeEventListener("DOMContentLoaded",y,!1),document.readyState="complete"},!1),document.readyState="loading");var g=a.document,h=g.documentElement,i="load",j=!1,k="on"+i,l="complete",m="readyState",n="attachEvent",o="detachEvent",p="addEventListener",q="DOMContentLoaded",r="onreadystatechange",s="removeEventListener",t=p in g,u=j,v=j,w=[];if(g[m]===l)e(b);else if(t)g[p](q,c,j),a[p](i,c,j);else{g[n](r,c),a[n](k,c);try{u=null==a.frameElement&&h}catch(x){}u&&u.doScroll&&!function z(){if(!v){try{u.doScroll("left")}catch(a){return e(z,50)}d(),b()}}()}return f.version="1.4.0",f.isReady=function(){return v},f}a.exports="undefined"!=typeof window&&b(window)},function(a,b,c){var d=c(5),e=function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}var c=1,e=d.defclass({constructor:function(a){c++,this.parent=null,this.children={},this.id=c,this.name="n"+c,null!=a&&(this.name=a),this.x=0,this.y=0,this.z=0,this.width=0,this.height=0},resize:function(a,b){null!=a&&(this.width=a),null!=b&&(this.height=b)},moveTo:function(a,b,c){this.x=null!=a?a:this.x,this.y=null!=b?b:this.y,this.z=null!=c?c:this.z},add:function(a){var b=a.name;if(null!=this.children[b])throw"SceneGraph: child with that name already exists: "+b;this.children[b]=a,a.parent=this}}),f=d(e,function(b){this.constructor=function(){b.constructor.call(this,"root"),this.properties=a}}),g=d(e,function(a){function c(c,d){if(a.constructor.call(this,c),this.properties={fill:"#000"},null!=d)b(this.properties,d);else if(null!=c&&"string"!=typeof c)throw"SceneGraph: invalid node name"}this.Group=d.extend(this,{constructor:c,type:"group"}),this.Rect=d.extend(this,{constructor:c,type:"rect"}),this.Text=d.extend(this,{constructor:function(a){c.call(this),this.properties.text=a},type:"text"})}),h=new f;return this.Shape=g,this.root=h,this};a.exports=e},function(a,b){(function(a){b.extend=function(a,b){var c={};for(var d in a)a.hasOwnProperty(d)&&(c[d]=a[d]);if(null!=b)for(var e in b)b.hasOwnProperty(e)&&(c[e]=b[e]);return c},b.cssProps=function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(c+":"+a[c]);return b.join(";")},b.encodeHtmlEntity=function(a){for(var b=[],c=0,d=a.length-1;d>=0;d--)c=a.charCodeAt(d),b.unshift(c>128?["&#",c,";"].join(""):a[d]);return b.join("")},b.getNodeArray=function(b){var c=null;return"string"==typeof b?c=document.querySelectorAll(b):a.NodeList&&b instanceof a.NodeList?c=b:a.Node&&b instanceof a.Node?c=[b]:a.HTMLCollection&&b instanceof a.HTMLCollection?c=b:b instanceof Array?c=b:null===b&&(c=[]),c},b.imageExists=function(a,b){var c=new Image;c.onerror=function(){b.call(this,!1)},c.onload=function(){b.call(this,!0)},c.src=a},b.decodeHtmlEntity=function(a){return a.replace(/&#(\d+);/g,function(a,b){return String.fromCharCode(b)})},b.dimensionCheck=function(a){var b={height:a.clientHeight,width:a.clientWidth};return b.height&&b.width?b:!1},b.truthy=function(a){return"string"==typeof a?"true"===a||"yes"===a||"1"===a||"on"===a||"✓"===a:!!a}}).call(b,function(){return this}())},function(a,b,c){var d=encodeURIComponent,e=decodeURIComponent,f=c(6),g=c(7),h=/(\w+)\[(\d+)\]/,i=/\w+\.\w+/;b.parse=function(a){if("string"!=typeof a)return{};if(a=f(a),""===a)return{};"?"===a.charAt(0)&&(a=a.slice(1));for(var b={},c=a.split("&"),d=0;d",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document); \ No newline at end of file diff --git a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js b/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js deleted file mode 100644 index 0f60b7bd..00000000 --- a/server/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/jquery.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; - -return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
    a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/\s*$/g,ra={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:k.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?""!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("