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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php
new file mode 100644
index 00000000..966ed44d
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Location.php
@@ -0,0 +1,76 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php
new file mode 100644
index 00000000..c1617850
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Serializer.php
@@ -0,0 +1,198 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php
new file mode 100644
index 00000000..a96db095
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag.php
@@ -0,0 +1,377 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php
new file mode 100644
index 00000000..bacf52eb
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php
@@ -0,0 +1,131 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php
new file mode 100644
index 00000000..bd31b56b
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php
@@ -0,0 +1,24 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php
new file mode 100644
index 00000000..7226316b
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php
@@ -0,0 +1,26 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php
new file mode 100644
index 00000000..0e163ea0
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php
@@ -0,0 +1,156 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php
new file mode 100644
index 00000000..f79f25dd
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php
@@ -0,0 +1,81 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php
new file mode 100644
index 00000000..7a5ce790
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/MethodTag.php
@@ -0,0 +1,209 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php
new file mode 100644
index 00000000..9bc0270d
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php
@@ -0,0 +1,119 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php
new file mode 100644
index 00000000..33406026
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php
@@ -0,0 +1,24 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php
new file mode 100644
index 00000000..288ecff8
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php
@@ -0,0 +1,24 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php
new file mode 100644
index 00000000..ec4e866d
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php
@@ -0,0 +1,24 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php
new file mode 100644
index 00000000..9293db92
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php
@@ -0,0 +1,99 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php
new file mode 100644
index 00000000..4f5f22ce
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php
@@ -0,0 +1,81 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php
new file mode 100644
index 00000000..ba009c44
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php
@@ -0,0 +1,26 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php
new file mode 100644
index 00000000..3400220e
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php
@@ -0,0 +1,137 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php
new file mode 100644
index 00000000..58ee44a4
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php
@@ -0,0 +1,24 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php
new file mode 100644
index 00000000..da0d6638
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php
@@ -0,0 +1,24 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php
new file mode 100644
index 00000000..236b2c8b
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php
@@ -0,0 +1,24 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php
new file mode 100644
index 00000000..260f6984
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php
@@ -0,0 +1,108 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php
new file mode 100644
index 00000000..90ead3ff
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Type/Collection.php
@@ -0,0 +1,221 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php
new file mode 100644
index 00000000..a6ca7b37
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/DescriptionTest.php
@@ -0,0 +1,245 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php
new file mode 100644
index 00000000..ff257aa1
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/CoversTagTest.php
@@ -0,0 +1,86 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php
new file mode 100644
index 00000000..7a75e79c
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTagTest.php
@@ -0,0 +1,115 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php
new file mode 100644
index 00000000..519a61b3
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ExampleTagTest.php
@@ -0,0 +1,203 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php
new file mode 100644
index 00000000..0c64ed08
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/LinkTagTest.php
@@ -0,0 +1,87 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php
new file mode 100644
index 00000000..efc3a15b
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/MethodTagTest.php
@@ -0,0 +1,146 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php
new file mode 100644
index 00000000..0e05382f
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ParamTagTest.php
@@ -0,0 +1,118 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php
new file mode 100644
index 00000000..9e2aec0d
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ReturnTagTest.php
@@ -0,0 +1,102 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php
new file mode 100644
index 00000000..6829b046
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SeeTagTest.php
@@ -0,0 +1,86 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php
new file mode 100644
index 00000000..8caf25d1
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SinceTagTest.php
@@ -0,0 +1,115 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php
new file mode 100644
index 00000000..2a40e0aa
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/SourceTagTest.php
@@ -0,0 +1,116 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php
new file mode 100644
index 00000000..3c669d55
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTagTest.php
@@ -0,0 +1,102 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php
new file mode 100644
index 00000000..45868d73
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/UsesTagTest.php
@@ -0,0 +1,86 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php
new file mode 100644
index 00000000..9ae2aa5f
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VarTagTest.php
@@ -0,0 +1,94 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php
new file mode 100644
index 00000000..e145386d
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Tag/VersionTagTest.php
@@ -0,0 +1,115 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php
new file mode 100644
index 00000000..9e873ecb
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/TagTest.php
@@ -0,0 +1,313 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php
new file mode 100644
index 00000000..78c7306d
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlock/Type/CollectionTest.php
@@ -0,0 +1,195 @@
+
+ * @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/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php
new file mode 100644
index 00000000..30eedfc5
--- /dev/null
+++ b/includes/vendor/phpdocumentor/reflection-docblock/tests/phpDocumentor/Reflection/DocBlockTest.php
@@ -0,0 +1,337 @@
+
+ * @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/includes/vendor/phpspec/prophecy/.gitignore b/includes/vendor/phpspec/prophecy/.gitignore
new file mode 100644
index 00000000..0c39a17e
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/.gitignore
@@ -0,0 +1,5 @@
+*.tgz
+*.phar
+bin
+vendor
+composer.lock
diff --git a/includes/vendor/phpspec/prophecy/.travis.yml b/includes/vendor/phpspec/prophecy/.travis.yml
new file mode 100644
index 00000000..b40f0476
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/.travis.yml
@@ -0,0 +1,15 @@
+language: php
+
+php: [5.3, 5.4, 5.5, hhvm, hhvm-nightly]
+
+sudo: false
+
+branches:
+ except:
+ - /^bugfix\/.*$/
+ - /^feature\/.*$/
+ - /^optimization\/.*$/
+
+before_script: travis_retry composer install --no-interaction --prefer-source
+
+script: vendor/bin/phpspec run -fpretty -v
diff --git a/includes/vendor/phpspec/prophecy/CHANGES.md b/includes/vendor/phpspec/prophecy/CHANGES.md
new file mode 100644
index 00000000..1c451c2b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/CHANGES.md
@@ -0,0 +1,115 @@
+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/includes/vendor/phpspec/prophecy/CONTRIBUTING.md b/includes/vendor/phpspec/prophecy/CONTRIBUTING.md
new file mode 100644
index 00000000..6ea0589f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/CONTRIBUTING.md
@@ -0,0 +1,21 @@
+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
+```
diff --git a/includes/vendor/phpspec/prophecy/LICENSE b/includes/vendor/phpspec/prophecy/LICENSE
new file mode 100644
index 00000000..c8b36471
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/LICENSE
@@ -0,0 +1,23 @@
+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/includes/vendor/phpspec/prophecy/README.md b/includes/vendor/phpspec/prophecy/README.md
new file mode 100644
index 00000000..639ffd06
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/README.md
@@ -0,0 +1,389 @@
+# 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
+
+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/includes/vendor/phpspec/prophecy/composer.json b/includes/vendor/phpspec/prophecy/composer.json
new file mode 100644
index 00000000..654aaadc
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/composer.json
@@ -0,0 +1,40 @@
+{
+ "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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php
new file mode 100644
index 00000000..d96318e3
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/ArgumentsWildcardSpec.php
@@ -0,0 +1,143 @@
+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');
+ }
+
+ function it_exposes_list_of_tokens(TokenInterface $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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php
new file mode 100644
index 00000000..a43e923c
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValueTokenSpec.php
@@ -0,0 +1,28 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php
new file mode 100644
index 00000000..c29076f5
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/AnyValuesTokenSpec.php
@@ -0,0 +1,28 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php
new file mode 100644
index 00000000..5d040d59
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayCountTokenSpec.php
@@ -0,0 +1,64 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php
new file mode 100644
index 00000000..8ff0f158
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEntryTokenSpec.php
@@ -0,0 +1,229 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php
new file mode 100644
index 00000000..8662e7d1
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ArrayEveryEntryTokenSpec.php
@@ -0,0 +1,109 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php
new file mode 100644
index 00000000..4395bf09
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/CallbackTokenSpec.php
@@ -0,0 +1,42 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php
new file mode 100644
index 00000000..9e46e021
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ExactValueTokenSpec.php
@@ -0,0 +1,155 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php
new file mode 100644
index 00000000..00c3a215
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/IdenticalValueTokenSpec.php
@@ -0,0 +1,152 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php
new file mode 100644
index 00000000..bb5e3840
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalAndTokenSpec.php
@@ -0,0 +1,78 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php
new file mode 100644
index 00000000..7ce7f3d8
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/LogicalNotTokenSpec.php
@@ -0,0 +1,65 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php
new file mode 100644
index 00000000..a783a15f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/ObjectStateTokenSpec.php
@@ -0,0 +1,101 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php
new file mode 100644
index 00000000..c7fd2652
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/StringContainsTokenSpec.php
@@ -0,0 +1,49 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php
new file mode 100644
index 00000000..f9a9507d
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Argument/Token/TypeTokenSpec.php
@@ -0,0 +1,59 @@
+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)');
+ }
+
+ function it_scores_5_if_argument_is_an_instance_of_specified_interface(\Prophecy\Argument\Token\TokenInterface $interface)
+ {
+ $this->beConstructedWith('Prophecy\Argument\Token\TokenInterface');
+
+ $this->scoreArgument($interface)->shouldReturn(5);
+ }
+}
diff --git a/includes/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php
new file mode 100644
index 00000000..990aa80a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/ArgumentSpec.php
@@ -0,0 +1,101 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php
new file mode 100644
index 00000000..e9b91c85
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Call/CallCenterSpec.php
@@ -0,0 +1,188 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php
new file mode 100644
index 00000000..d1a85391
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Call/CallSpec.php
@@ -0,0 +1,54 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php
new file mode 100644
index 00000000..c174e73c
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Comparator/ClosureComparatorSpec.php
@@ -0,0 +1,39 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php
new file mode 100644
index 00000000..6b13336d
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Comparator/FactorySpec.php
@@ -0,0 +1,20 @@
+shouldHaveType('SebastianBergmann\Comparator\Factory');
+ }
+
+ function it_should_have_ClosureComparator_registered()
+ {
+ $comparator = $this->getInstance()->getComparatorFor(function(){}, function(){});
+ $comparator->shouldHaveType('Prophecy\Comparator\ClosureComparator');
+ }
+}
diff --git a/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php
new file mode 100644
index 00000000..2d7d934d
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/DisableConstructorPatchSpec.php
@@ -0,0 +1,59 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php
new file mode 100644
index 00000000..8c348b86
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/HhvmExceptionPatchSpec.php
@@ -0,0 +1,37 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php
new file mode 100644
index 00000000..200d9619
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/KeywordPatchSpec.php
@@ -0,0 +1,44 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php
new file mode 100644
index 00000000..cb1d0f01
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/MagicCallPatchSpec.php
@@ -0,0 +1,76 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php
new file mode 100644
index 00000000..c460814c
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ProphecySubjectPatchSpec.php
@@ -0,0 +1,83 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php
new file mode 100644
index 00000000..4116e4df
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatchSpec.php
@@ -0,0 +1,47 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php
new file mode 100644
index 00000000..37fe82f6
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/SplFileInfoPatchSpec.php
@@ -0,0 +1,91 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php
new file mode 100644
index 00000000..2279b720
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/ClassPatch/TraversablePatchSpec.php
@@ -0,0 +1,61 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php
new file mode 100644
index 00000000..a39fa87f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/DoublerSpec.php
@@ -0,0 +1,122 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php
new file mode 100644
index 00000000..1dc8cda3
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCodeGeneratorSpec.php
@@ -0,0 +1,186 @@
+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->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->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->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) {
+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->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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php
new file mode 100644
index 00000000..c7b57009
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassCreatorSpec.php
@@ -0,0 +1,44 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php
new file mode 100644
index 00000000..dd9e9c4a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/ClassMirrorSpec.php
@@ -0,0 +1,554 @@
+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());
+
+ $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);
+
+ $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);
+
+
+ $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);
+
+ $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));
+
+ $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));
+
+ $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(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));
+
+ $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);
+ $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);
+ $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());
+
+ $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());
+
+ $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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php
new file mode 100644
index 00000000..cea578fa
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ArgumentNodeSpec.php
@@ -0,0 +1,62 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php
new file mode 100644
index 00000000..18f0e1cc
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/ClassNodeSpec.php
@@ -0,0 +1,154 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php
new file mode 100644
index 00000000..7582706e
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/Generator/Node/MethodNodeSpec.php
@@ -0,0 +1,123 @@
+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));
+ }
+}
diff --git a/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php
new file mode 100644
index 00000000..7026126f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/LazyDoubleSpec.php
@@ -0,0 +1,96 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php
new file mode 100644
index 00000000..a3e74919
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Doubler/NameGeneratorSpec.php
@@ -0,0 +1,72 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php
new file mode 100644
index 00000000..6fd1a5c3
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Call/UnexpectedCallExceptionSpec.php
@@ -0,0 +1,32 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php
new file mode 100644
index 00000000..58241385
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassCreatorExceptionSpec.php
@@ -0,0 +1,28 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php
new file mode 100644
index 00000000..21e31a34
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassMirrorExceptionSpec.php
@@ -0,0 +1,27 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php
new file mode 100644
index 00000000..251512b9
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/ClassNotFoundExceptionSpec.php
@@ -0,0 +1,25 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php
new file mode 100644
index 00000000..6fe5a19a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/DoubleExceptionSpec.php
@@ -0,0 +1,14 @@
+shouldBeAnInstanceOf('RuntimeException');
+ $this->shouldBeAnInstanceOf('Prophecy\Exception\Doubler\DoublerException');
+ }
+}
diff --git a/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php
new file mode 100644
index 00000000..ad1a439e
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/InterfaceNotFoundExceptionSpec.php
@@ -0,0 +1,24 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php
new file mode 100644
index 00000000..a889dd7e
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Doubler/MethodNotFoundExceptionSpec.php
@@ -0,0 +1,40 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php
new file mode 100644
index 00000000..22a5ebdb
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/AggregateExceptionSpec.php
@@ -0,0 +1,57 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php
new file mode 100644
index 00000000..473f1a2d
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/NoCallsExceptionSpec.php
@@ -0,0 +1,29 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php
new file mode 100644
index 00000000..adad975b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsCountExceptionSpec.php
@@ -0,0 +1,31 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php
new file mode 100644
index 00000000..c0fe24d7
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prediction/UnexpectedCallsExceptionSpec.php
@@ -0,0 +1,36 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php
new file mode 100644
index 00000000..97cf9e10
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/MethodProphecyExceptionSpec.php
@@ -0,0 +1,30 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php
new file mode 100644
index 00000000..bcacfedc
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Exception/Prophecy/ObjectProphecyExceptionSpec.php
@@ -0,0 +1,27 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php
new file mode 100644
index 00000000..3da8c599
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallPredictionSpec.php
@@ -0,0 +1,42 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php
new file mode 100644
index 00000000..c6708927
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallTimesPredictionSpec.php
@@ -0,0 +1,54 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php
new file mode 100644
index 00000000..7fe475ef
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/CallbackPredictionSpec.php
@@ -0,0 +1,36 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php
new file mode 100644
index 00000000..a3ef9bcb
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prediction/NoCallsPredictionSpec.php
@@ -0,0 +1,43 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php
new file mode 100644
index 00000000..5d99b1b1
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/CallbackPromiseSpec.php
@@ -0,0 +1,110 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php
new file mode 100644
index 00000000..4acb7bb0
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnArgumentPromiseSpec.php
@@ -0,0 +1,41 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php
new file mode 100644
index 00000000..18bfd87a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ReturnPromiseSpec.php
@@ -0,0 +1,61 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php
new file mode 100644
index 00000000..5f448979
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Promise/ThrowPromiseSpec.php
@@ -0,0 +1,58 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php
new file mode 100644
index 00000000..d8299a78
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/MethodProphecySpec.php
@@ -0,0 +1,381 @@
+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)
+ );
+ }
+
+ function its_constructor_throws_MethodProphecyException_for_final_methods($objectProphecy, ClassWithFinalMethod $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);
+ }
+}
+
+class ClassWithFinalMethod
+{
+ final public function finalMethod() {}
+}
diff --git a/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php
new file mode 100644
index 00000000..7e249d9b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/ObjectProphecySpec.php
@@ -0,0 +1,319 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php
new file mode 100644
index 00000000..4d83d739
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Prophecy/RevealerSpec.php
@@ -0,0 +1,51 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php
new file mode 100644
index 00000000..74d5976a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/ProphetSpec.php
@@ -0,0 +1,91 @@
+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/includes/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php b/includes/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php
new file mode 100644
index 00000000..a4eef59f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/spec/Prophecy/Util/StringUtilSpec.php
@@ -0,0 +1,97 @@
+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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument.php
new file mode 100644
index 00000000..f2b33648
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument.php
@@ -0,0 +1,198 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php
new file mode 100644
index 00000000..a088f21d
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/ArgumentsWildcard.php
@@ -0,0 +1,101 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php
new file mode 100644
index 00000000..50988112
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValueToken.php
@@ -0,0 +1,52 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php
new file mode 100644
index 00000000..f76b17bc
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php
@@ -0,0 +1,52 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php
new file mode 100644
index 00000000..96b4befd
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayCountToken.php
@@ -0,0 +1,86 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php
new file mode 100644
index 00000000..0305fc72
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEntryToken.php
@@ -0,0 +1,143 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php
new file mode 100644
index 00000000..5d41fa48
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ArrayEveryEntryToken.php
@@ -0,0 +1,82 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php
new file mode 100644
index 00000000..f45ba20b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php
@@ -0,0 +1,75 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php
new file mode 100644
index 00000000..aa960f3f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ExactValueToken.php
@@ -0,0 +1,116 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php
new file mode 100644
index 00000000..0b6d23ab
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/IdenticalValueToken.php
@@ -0,0 +1,74 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php
new file mode 100644
index 00000000..4ee1b25e
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php
@@ -0,0 +1,80 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php
new file mode 100644
index 00000000..623efa57
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php
@@ -0,0 +1,73 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php
new file mode 100644
index 00000000..8d93bfd6
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/ObjectStateToken.php
@@ -0,0 +1,104 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php
new file mode 100644
index 00000000..24ff8c2e
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/StringContainsToken.php
@@ -0,0 +1,67 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php
new file mode 100644
index 00000000..625d3bad
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php
@@ -0,0 +1,43 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php
new file mode 100644
index 00000000..cb65132c
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TypeToken.php
@@ -0,0 +1,76 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php
new file mode 100644
index 00000000..2f3fbadb
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Call/Call.php
@@ -0,0 +1,127 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php
new file mode 100644
index 00000000..74958551
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Call/CallCenter.php
@@ -0,0 +1,152 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php
new file mode 100644
index 00000000..874e474c
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Comparator/ClosureComparator.php
@@ -0,0 +1,42 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php
new file mode 100644
index 00000000..a7a12001
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Comparator/Factory.php
@@ -0,0 +1,46 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php
new file mode 100644
index 00000000..d6b6b1a9
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/CachedDoubler.php
@@ -0,0 +1,68 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php
new file mode 100644
index 00000000..d6d19685
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ClassPatchInterface.php
@@ -0,0 +1,48 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php
new file mode 100644
index 00000000..61998fc4
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/DisableConstructorPatch.php
@@ -0,0 +1,72 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php
new file mode 100644
index 00000000..b0d9793a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/KeywordPatch.php
@@ -0,0 +1,135 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php
new file mode 100644
index 00000000..da454501
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/MagicCallPatch.php
@@ -0,0 +1,73 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php
new file mode 100644
index 00000000..ab0bb7c7
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ProphecySubjectPatch.php
@@ -0,0 +1,98 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php
new file mode 100644
index 00000000..9166aeef
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/ReflectionClassNewInstancePatch.php
@@ -0,0 +1,57 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php
new file mode 100644
index 00000000..84011598
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/SplFileInfoPatch.php
@@ -0,0 +1,85 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php
new file mode 100644
index 00000000..eea02028
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/ClassPatch/TraversablePatch.php
@@ -0,0 +1,83 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php
new file mode 100644
index 00000000..699be3a2
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/DoubleInterface.php
@@ -0,0 +1,22 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php
new file mode 100644
index 00000000..a378ae27
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Doubler.php
@@ -0,0 +1,146 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php
new file mode 100644
index 00000000..8577ba0f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCodeGenerator.php
@@ -0,0 +1,91 @@
+
+ * 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) {\n",
+ $method->getVisibility(),
+ $method->isStatic() ? 'static' : '',
+ $method->returnsReference() ? '&':'',
+ $method->getName(),
+ implode(', ', $this->generateArguments($method->getArguments()))
+ );
+ $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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php
new file mode 100644
index 00000000..882a4a4b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassCreator.php
@@ -0,0 +1,67 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php
new file mode 100644
index 00000000..c89d002b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ClassMirror.php
@@ -0,0 +1,202 @@
+
+ * 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 (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';
+ }
+
+ 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php
new file mode 100644
index 00000000..a6c42a38
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ArgumentNode.php
@@ -0,0 +1,75 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php
new file mode 100644
index 00000000..b38cb4ea
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/ClassNode.php
@@ -0,0 +1,130 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php
new file mode 100644
index 00000000..ef303b6b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/Node/MethodNode.php
@@ -0,0 +1,129 @@
+
+ * 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;
+
+ /**
+ * @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;
+ }
+
+ /**
+ * @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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php
new file mode 100644
index 00000000..d720b151
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/Generator/ReflectionInterface.php
@@ -0,0 +1,22 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php
new file mode 100644
index 00000000..8a99c4ce
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/LazyDouble.php
@@ -0,0 +1,127 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php
new file mode 100644
index 00000000..d67ec6a4
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Doubler/NameGenerator.php
@@ -0,0 +1,52 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php
new file mode 100644
index 00000000..48ed2254
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Call/UnexpectedCallException.php
@@ -0,0 +1,40 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php
new file mode 100644
index 00000000..822918a2
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassCreatorException.php
@@ -0,0 +1,31 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php
new file mode 100644
index 00000000..8fc53b8b
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassMirrorException.php
@@ -0,0 +1,31 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php
new file mode 100644
index 00000000..5bc826d7
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ClassNotFoundException.php
@@ -0,0 +1,33 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php
new file mode 100644
index 00000000..6642a58f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoubleException.php
@@ -0,0 +1,18 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php
new file mode 100644
index 00000000..9d6be179
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/DoublerException.php
@@ -0,0 +1,18 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php
new file mode 100644
index 00000000..e344dead
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/InterfaceNotFoundException.php
@@ -0,0 +1,20 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php
new file mode 100644
index 00000000..b113941f
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/MethodNotFoundException.php
@@ -0,0 +1,60 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php
new file mode 100644
index 00000000..63030497
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php
@@ -0,0 +1,41 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php
new file mode 100644
index 00000000..ac9fe4dd
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Exception.php
@@ -0,0 +1,26 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php
new file mode 100644
index 00000000..bc91c690
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/InvalidArgumentException.php
@@ -0,0 +1,16 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php
new file mode 100644
index 00000000..44b598a4
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/AggregateException.php
@@ -0,0 +1,50 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php
new file mode 100644
index 00000000..bbbbc3d9
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/FailedPredictionException.php
@@ -0,0 +1,24 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php
new file mode 100644
index 00000000..05ea4aad
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/NoCallsException.php
@@ -0,0 +1,18 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php
new file mode 100644
index 00000000..2596b1ef
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/PredictionException.php
@@ -0,0 +1,18 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php
new file mode 100644
index 00000000..9d905431
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsCountException.php
@@ -0,0 +1,31 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php
new file mode 100644
index 00000000..7a99c2d7
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prediction/UnexpectedCallsException.php
@@ -0,0 +1,32 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php
new file mode 100644
index 00000000..1b03eaf4
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/MethodProphecyException.php
@@ -0,0 +1,34 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php
new file mode 100644
index 00000000..e345402e
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ObjectProphecyException.php
@@ -0,0 +1,34 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php
new file mode 100644
index 00000000..91573328
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Exception/Prophecy/ProphecyException.php
@@ -0,0 +1,18 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php
new file mode 100644
index 00000000..b4787366
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php
@@ -0,0 +1,86 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php
new file mode 100644
index 00000000..31c6c575
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php
@@ -0,0 +1,107 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php
new file mode 100644
index 00000000..44bc782c
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/CallbackPrediction.php
@@ -0,0 +1,65 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php
new file mode 100644
index 00000000..46ac5bfc
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/NoCallsPrediction.php
@@ -0,0 +1,68 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php
new file mode 100644
index 00000000..f7fb06a9
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prediction/PredictionInterface.php
@@ -0,0 +1,37 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php
new file mode 100644
index 00000000..5f406bf7
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/CallbackPromise.php
@@ -0,0 +1,66 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php
new file mode 100644
index 00000000..382537b4
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/PromiseInterface.php
@@ -0,0 +1,35 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php
new file mode 100644
index 00000000..a06724bc
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnArgumentPromise.php
@@ -0,0 +1,61 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php
new file mode 100644
index 00000000..c7d5ac59
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ReturnPromise.php
@@ -0,0 +1,55 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php
new file mode 100644
index 00000000..8007330a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Promise/ThrowPromise.php
@@ -0,0 +1,91 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php
new file mode 100644
index 00000000..9af03b9a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/MethodProphecy.php
@@ -0,0 +1,409 @@
+
+ * 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\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);
+ }
+ }
+
+ /**
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php
new file mode 100644
index 00000000..43dba46d
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ObjectProphecy.php
@@ -0,0 +1,279 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php
new file mode 100644
index 00000000..462f15a9
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecyInterface.php
@@ -0,0 +1,27 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php
new file mode 100644
index 00000000..2d839585
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/ProphecySubjectInterface.php
@@ -0,0 +1,34 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php
new file mode 100644
index 00000000..60ecdac8
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/Revealer.php
@@ -0,0 +1,44 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php
new file mode 100644
index 00000000..ffc82bb6
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophecy/RevealerInterface.php
@@ -0,0 +1,29 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Prophet.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophet.php
new file mode 100644
index 00000000..ac649234
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Prophet.php
@@ -0,0 +1,134 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php
new file mode 100644
index 00000000..54d38321
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Util/ExportUtil.php
@@ -0,0 +1,185 @@
+
+ * 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/includes/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php b/includes/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php
new file mode 100644
index 00000000..bb90156a
--- /dev/null
+++ b/includes/vendor/phpspec/prophecy/src/Prophecy/Util/StringUtil.php
@@ -0,0 +1,89 @@
+
+ * 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/includes/vendor/phpunit/php-code-coverage/.gitattributes b/includes/vendor/phpunit/php-code-coverage/.gitattributes
new file mode 100644
index 00000000..461090b7
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/.gitattributes
@@ -0,0 +1 @@
+*.php diff=php
diff --git a/includes/vendor/phpunit/php-code-coverage/.gitignore b/includes/vendor/phpunit/php-code-coverage/.gitignore
new file mode 100644
index 00000000..b386531f
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/.gitignore
@@ -0,0 +1,11 @@
+build/api
+build/code-browser
+build/coverage
+build/logs
+build/pdepend
+cache.properties
+phpunit.xml
+/vendor
+/composer.lock
+/composer.phar
+/.idea
diff --git a/includes/vendor/phpunit/php-code-coverage/.travis.yml b/includes/vendor/phpunit/php-code-coverage/.travis.yml
new file mode 100644
index 00000000..5c23715f
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/.travis.yml
@@ -0,0 +1,20 @@
+language: php
+
+php:
+ - 5.3.3
+ - 5.3
+ - 5.4
+ - 5.5
+ - 5.6
+
+before_script:
+ - COMPOSER_ROOT_VERSION=dev-master composer install --dev --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/includes/vendor/phpunit/php-code-coverage/CONTRIBUTING.md b/includes/vendor/phpunit/php-code-coverage/CONTRIBUTING.md
new file mode 100644
index 00000000..40dbc25e
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/CONTRIBUTING.md
@@ -0,0 +1,5 @@
+Pull Requests for bug fixes should be made against the current release branch (2.0).
+
+Pull Requests for new features should be made against master.
+
+For further notes please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md)
diff --git a/includes/vendor/phpunit/php-code-coverage/LICENSE b/includes/vendor/phpunit/php-code-coverage/LICENSE
new file mode 100644
index 00000000..fcfa37e8
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/LICENSE
@@ -0,0 +1,33 @@
+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/includes/vendor/phpunit/php-code-coverage/README.md b/includes/vendor/phpunit/php-code-coverage/README.md
new file mode 100644
index 00000000..6ca608a4
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/README.md
@@ -0,0 +1,40 @@
+[![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.3.3 is required but using the latest version of PHP is highly recommended
+* [Xdebug](http://xdebug.org/) 2.1.3 is required but using the latest version of Xdebug is highly recommended
+
+## 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 2.0:
+
+ {
+ "require": {
+ "phpunit/php-code-coverage": "~2.0"
+ }
+ }
+
+## 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/includes/vendor/phpunit/php-code-coverage/build.xml b/includes/vendor/phpunit/php-code-coverage/build.xml
new file mode 100644
index 00000000..c335d158
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/build.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/includes/vendor/phpunit/php-code-coverage/build/travis-ci.xml b/includes/vendor/phpunit/php-code-coverage/build/travis-ci.xml
new file mode 100644
index 00000000..15e879fa
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/build/travis-ci.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+ ../tests/PHP
+
+
+
+
+
+
+
+
+
+ ../src
+
+
+
diff --git a/includes/vendor/phpunit/php-code-coverage/composer.json b/includes/vendor/phpunit/php-code-coverage/composer.json
new file mode 100644
index 00000000..c3965be3
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/composer.json
@@ -0,0 +1,50 @@
+{
+ "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.3.3",
+ "phpunit/php-file-iterator": "~1.3",
+ "phpunit/php-token-stream": "~1.3",
+ "phpunit/php-text-template": "~1.2",
+ "sebastian/environment": "~1.0",
+ "sebastian/version": "~1.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4",
+ "ext-xdebug": ">=2.1.4"
+ },
+ "suggest": {
+ "ext-dom": "*",
+ "ext-xdebug": ">=2.2.1",
+ "ext-xmlwriter": "*"
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ }
+}
diff --git a/includes/vendor/phpunit/php-code-coverage/phpunit.xml.dist b/includes/vendor/phpunit/php-code-coverage/phpunit.xml.dist
new file mode 100644
index 00000000..f5fa606e
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/phpunit.xml.dist
@@ -0,0 +1,23 @@
+
+
+
+
+ tests/PHP
+
+
+
+
+
+
+
+
+
+
+
+ src
+
+
+
+
diff --git a/includes/vendor/phpunit/php-code-coverage/scripts/auto_append.php b/includes/vendor/phpunit/php-code-coverage/scripts/auto_append.php
new file mode 100644
index 00000000..6cd768d3
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/scripts/auto_append.php
@@ -0,0 +1,5 @@
+stop();
+
+$writer = new PHP_CodeCoverage_Report_HTML;
+$writer->process($coverage, '/tmp/coverage');
diff --git a/includes/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php b/includes/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php
new file mode 100644
index 00000000..7a8887a5
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php
@@ -0,0 +1,10 @@
+filter();
+
+$filter->addFileToBlacklist(__FILE__);
+$filter->addFileToBlacklist(dirname(__FILE__) . '/auto_append.php');
+
+$coverage->start($_SERVER['SCRIPT_FILENAME']);
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage.php
new file mode 100644
index 00000000..ed6b9b46
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage.php
@@ -0,0 +1,880 @@
+
+ *
+ * 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 mixed
+ */
+ private $currentId;
+
+ /**
+ * Code coverage data.
+ *
+ * @var array
+ */
+ private $data = array();
+
+ /**
+ * @var array
+ */
+ private $ignoredLines = array();
+
+ /**
+ * Test data.
+ *
+ * @var array
+ */
+ private $tests = array();
+
+ /**
+ * Constructor.
+ *
+ * @param PHP_CodeCoverage_Driver $driver
+ * @param PHP_CodeCoverage_Filter $filter
+ * @throws PHP_CodeCoverage_Exception
+ */
+ public function __construct(PHP_CodeCoverage_Driver $driver = null, PHP_CodeCoverage_Filter $filter = null)
+ {
+ if ($driver === null) {
+ $runtime = new Runtime;
+
+ if ($runtime->isHHVM()) {
+ $driver = new PHP_CodeCoverage_Driver_HHVM;
+ } elseif ($runtime->hasXdebug()) {
+ $driver = new PHP_CodeCoverage_Driver_Xdebug;
+ } else {
+ throw new PHP_CodeCoverage_Exception('No code coverage driver available');
+ }
+ }
+
+ 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 = array();
+ $this->tests = array();
+ }
+
+ /**
+ * 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();
+ }
+
+ // We need to apply the blacklist filter a second time
+ // when no whitelist is used.
+ if (!$raw && !$this->filter->hasWhitelist()) {
+ $this->applyListsFilter($this->data);
+ }
+
+ 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_Exception
+ */
+ public function start($id, $clear = false)
+ {
+ if (!is_bool($clear)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 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_Exception
+ */
+ public function stop($append = true, $linesToBeCovered = array(), array $linesToBeUsed = array())
+ {
+ if (!is_bool($append)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 1,
+ 'boolean'
+ );
+ }
+
+ if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 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_Exception
+ */
+ public function append(array $data, $id = null, $append = true, $linesToBeCovered = array(), array $linesToBeUsed = array())
+ {
+ if ($id === null) {
+ $id = $this->currentId;
+ }
+
+ if ($id === null) {
+ throw new PHP_CodeCoverage_Exception;
+ }
+
+ $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] = array('size' => $size, 'status' => $status);
+
+ foreach ($data as $file => $lines) {
+ if (!$this->filter->isFile($file)) {
+ continue;
+ }
+
+ foreach ($lines as $k => $v) {
+ if ($v == 1) {
+ 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)
+ {
+ 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());
+
+ $this->filter->setBlacklistedFiles(
+ array_merge($this->filter->getBlacklistedFiles(), $that->filter()->getBlacklistedFiles())
+ );
+
+ $this->filter->setWhitelistedFiles(
+ array_merge($this->filter->getWhitelistedFiles(), $that->filter()->getWhitelistedFiles())
+ );
+ }
+
+ /**
+ * @param bool $flag
+ * @throws PHP_CodeCoverage_Exception
+ * @since Method available since Release 1.1.0
+ */
+ public function setCacheTokens($flag)
+ {
+ if (!is_bool($flag)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 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_Exception
+ * @since Method available since Release 2.0.0
+ */
+ public function setCheckForUnintentionallyCoveredCode($flag)
+ {
+ if (!is_bool($flag)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 1,
+ 'boolean'
+ );
+ }
+
+ $this->checkForUnintentionallyCoveredCode = $flag;
+ }
+
+ /**
+ * @param bool $flag
+ * @throws PHP_CodeCoverage_Exception
+ */
+ public function setForceCoversAnnotation($flag)
+ {
+ if (!is_bool($flag)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 1,
+ 'boolean'
+ );
+ }
+
+ $this->forceCoversAnnotation = $flag;
+ }
+
+ /**
+ * @param bool $flag
+ * @throws PHP_CodeCoverage_Exception
+ */
+ public function setMapTestClassNameToCoveredClassName($flag)
+ {
+ if (!is_bool($flag)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 1,
+ 'boolean'
+ );
+ }
+
+ $this->mapTestClassNameToCoveredClassName = $flag;
+ }
+
+ /**
+ * @param bool $flag
+ * @throws PHP_CodeCoverage_Exception
+ */
+ public function setAddUncoveredFilesFromWhitelist($flag)
+ {
+ if (!is_bool($flag)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 1,
+ 'boolean'
+ );
+ }
+
+ $this->addUncoveredFilesFromWhitelist = $flag;
+ }
+
+ /**
+ * @param bool $flag
+ * @throws PHP_CodeCoverage_Exception
+ */
+ public function setProcessUncoveredFilesFromWhitelist($flag)
+ {
+ if (!is_bool($flag)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 1,
+ 'boolean'
+ );
+ }
+
+ $this->processUncoveredFilesFromWhitelist = $flag;
+ }
+
+ /**
+ * Applies the @covers annotation filtering.
+ *
+ * @param array $data
+ * @param mixed $linesToBeCovered
+ * @param array $linesToBeUsed
+ * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode
+ */
+ private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, array $linesToBeUsed)
+ {
+ if ($linesToBeCovered === false ||
+ ($this->forceCoversAnnotation && empty($linesToBeCovered))) {
+ $data = array();
+
+ 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 blacklist/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] = array();
+
+ foreach ($lines as $k => $v) {
+ $this->data[$file][$k] = $v == -2 ? null : array();
+ }
+ }
+ }
+ }
+
+ /**
+ * Processes whitelisted files that are not covered.
+ */
+ private function addUncoveredFilesFromWhitelist()
+ {
+ $data = array();
+ $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] = array();
+
+ $lines = count(file($uncoveredFile));
+
+ for ($i = 1; $i <= $lines; $i++) {
+ $data[$uncoveredFile][$i] = -1;
+ }
+ }
+ }
+
+ $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] == 1) {
+ $fileCoverage[$key] = -1;
+ }
+ }
+
+ $data[$file] = $fileCoverage;
+ }
+ }
+ }
+
+ /**
+ * Returns the lines of a source file that should be ignored.
+ *
+ * @param string $filename
+ * @return array
+ * @throws PHP_CodeCoverage_Exception
+ * @since Method available since Release 2.0.0
+ */
+ private function getLinesToBeIgnored($filename)
+ {
+ if (!is_string($filename)) {
+ throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory(
+ 1,
+ 'string'
+ );
+ }
+
+ if (!isset($this->ignoredLines[$filename])) {
+ $this->ignoredLines[$filename] = array();
+ $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':
+ $docblock = $token->getDocblock();
+
+ $this->ignoredLines[$filename][] = $token->getLine();
+
+ if (strpos($docblock, '@codeCoverageIgnore')) {
+ $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_Exception_UnintentionallyCoveredCode
+ * @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_Exception_UnintentionallyCoveredCode(
+ $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 = array();
+
+ foreach (array_keys($linesToBeCovered) as $file) {
+ if (!isset($allowedLines[$file])) {
+ $allowedLines[$file] = array();
+ }
+
+ $allowedLines[$file] = array_merge(
+ $allowedLines[$file],
+ $linesToBeCovered[$file]
+ );
+ }
+
+ foreach (array_keys($linesToBeUsed) as $file) {
+ if (!isset($allowedLines[$file])) {
+ $allowedLines[$file] = array();
+ }
+
+ $allowedLines[$file] = array_merge(
+ $allowedLines[$file],
+ $linesToBeUsed[$file]
+ );
+ }
+
+ foreach (array_keys($allowedLines) as $file) {
+ $allowedLines[$file] = array_flip(
+ array_unique($allowedLines[$file])
+ );
+ }
+
+ return $allowedLines;
+ }
+}
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php
new file mode 100644
index 00000000..0c5f6d5a
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver.php
@@ -0,0 +1,29 @@
+
+ *
+ * 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
+{
+ /**
+ * Start collection of code coverage information.
+ */
+ public function start();
+
+ /**
+ * Stop collection of code coverage information.
+ *
+ * @return array
+ */
+ public function stop();
+}
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php
new file mode 100644
index 00000000..290cca0d
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php
@@ -0,0 +1,50 @@
+
+ *
+ * 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 1.3.0
+ * @codeCoverageIgnore
+ */
+class PHP_CodeCoverage_Driver_HHVM implements PHP_CodeCoverage_Driver
+{
+ /**
+ * Constructor.
+ */
+ public function __construct()
+ {
+ if (!defined('HHVM_VERSION')) {
+ throw new PHP_CodeCoverage_Exception('This driver requires HHVM');
+ }
+ }
+
+ /**
+ * Start collection of code coverage information.
+ */
+ public function start()
+ {
+ fb_enable_code_coverage();
+ }
+
+ /**
+ * Stop collection of code coverage information.
+ *
+ * @return array
+ */
+ public function stop()
+ {
+ $codeCoverage = fb_get_code_coverage(true);
+
+ fb_disable_code_coverage();
+
+ return $codeCoverage;
+ }
+}
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php
new file mode 100644
index 00000000..a8426ad6
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php
@@ -0,0 +1,99 @@
+
+ *
+ * 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_Exception('This driver requires Xdebug');
+ }
+
+ if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') &&
+ !ini_get('xdebug.coverage_enable')) {
+ throw new PHP_CodeCoverage_Exception(
+ '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) {
+ if (isset($data[$file][0])) {
+ 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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php
new file mode 100644
index 00000000..bded3c09
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Exception class for PHP_CodeCoverage component.
+ *
+ * @since Class available since Release 1.1.0
+ */
+class PHP_CodeCoverage_Exception extends RuntimeException
+{
+}
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php
new file mode 100644
index 00000000..463785ef
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php
@@ -0,0 +1,18 @@
+
+ *
+ * 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_Exception_UnintentionallyCoveredCode extends PHP_CodeCoverage_Exception
+{
+}
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php
new file mode 100644
index 00000000..fd5b6aa2
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php
@@ -0,0 +1,292 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Filter for blacklisting and whitelisting of code coverage information.
+ *
+ * @since Class available since Release 1.0.0
+ */
+class PHP_CodeCoverage_Filter
+{
+ /**
+ * Source files that are blacklisted.
+ *
+ * @var array
+ */
+ private $blacklistedFiles = array();
+
+ /**
+ * Source files that are whitelisted.
+ *
+ * @var array
+ */
+ private $whitelistedFiles = array();
+
+ /**
+ * Adds a directory to the blacklist (recursively).
+ *
+ * @param string $directory
+ * @param string $suffix
+ * @param string $prefix
+ */
+ public function addDirectoryToBlacklist($directory, $suffix = '.php', $prefix = '')
+ {
+ $facade = new File_Iterator_Facade;
+ $files = $facade->getFilesAsArray($directory, $suffix, $prefix);
+
+ foreach ($files as $file) {
+ $this->addFileToBlacklist($file);
+ }
+ }
+
+ /**
+ * Adds a file to the blacklist.
+ *
+ * @param string $filename
+ */
+ public function addFileToBlacklist($filename)
+ {
+ $this->blacklistedFiles[realpath($filename)] = true;
+ }
+
+ /**
+ * Adds files to the blacklist.
+ *
+ * @param array $files
+ */
+ public function addFilesToBlacklist(array $files)
+ {
+ foreach ($files as $file) {
+ $this->addFileToBlacklist($file);
+ }
+ }
+
+ /**
+ * Removes a directory from the blacklist (recursively).
+ *
+ * @param string $directory
+ * @param string $suffix
+ * @param string $prefix
+ */
+ public function removeDirectoryFromBlacklist($directory, $suffix = '.php', $prefix = '')
+ {
+ $facade = new File_Iterator_Facade;
+ $files = $facade->getFilesAsArray($directory, $suffix, $prefix);
+
+ foreach ($files as $file) {
+ $this->removeFileFromBlacklist($file);
+ }
+ }
+
+ /**
+ * Removes a file from the blacklist.
+ *
+ * @param string $filename
+ */
+ public function removeFileFromBlacklist($filename)
+ {
+ $filename = realpath($filename);
+
+ if (isset($this->blacklistedFiles[$filename])) {
+ unset($this->blacklistedFiles[$filename]);
+ }
+ }
+
+ /**
+ * 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
+ */
+ 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.
+ *
+ * When the whitelist is empty (default), blacklisting is used.
+ * When the whitelist is not empty, whitelisting is used.
+ *
+ * @param string $filename
+ * @return bool
+ * @throws PHP_CodeCoverage_Exception
+ */
+ public function isFiltered($filename)
+ {
+ if (!$this->isFile($filename)) {
+ return true;
+ }
+
+ $filename = realpath($filename);
+
+ if (!empty($this->whitelistedFiles)) {
+ return !isset($this->whitelistedFiles[$filename]);
+ }
+
+ return isset($this->blacklistedFiles[$filename]);
+ }
+
+ /**
+ * Returns the list of blacklisted files.
+ *
+ * @return array
+ */
+ public function getBlacklist()
+ {
+ return array_keys($this->blacklistedFiles);
+ }
+
+ /**
+ * 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 blacklisted files.
+ *
+ * @return array
+ * @since Method available since Release 2.0.0
+ */
+ public function getBlacklistedFiles()
+ {
+ return $this->blacklistedFiles;
+ }
+
+ /**
+ * Sets the blacklisted files.
+ *
+ * @param array $blacklistedFiles
+ * @since Method available since Release 2.0.0
+ */
+ public function setBlacklistedFiles($blacklistedFiles)
+ {
+ $this->blacklistedFiles = $blacklistedFiles;
+ }
+
+ /**
+ * 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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php
new file mode 100644
index 00000000..c0ea8d82
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php
@@ -0,0 +1,284 @@
+
+ *
+ * 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 = array();
+ $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 = array();
+
+ 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']] = array(
+ '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] = array(
+ '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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php
new file mode 100644
index 00000000..2deced2c
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php
@@ -0,0 +1,164 @@
+
+ *
+ * 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_Util_InvalidArgumentHelper::factory(
+ 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 = '';
+ }
+
+ $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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php
new file mode 100644
index 00000000..b28964e8
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php
@@ -0,0 +1,242 @@
+
+ *
+ * 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 = array();
+
+ 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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php
new file mode 100644
index 00000000..80916ef3
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php
@@ -0,0 +1,182 @@
+
+ *
+ * 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_Exception
+ * @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_Exception(
+ sprintf(
+ 'Directory "%s" does not exist.',
+ $directory
+ )
+ );
+ }
+}
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php
new file mode 100644
index 00000000..ab6bb5e5
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php
@@ -0,0 +1,268 @@
+
+ *
+ * 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('2.1.8', 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 = ' / ';
+ $classesBar = ' ';
+ $classesLevel = 'None';
+ $classesNumber = ' ';
+
+ if (isset($data['numClasses']) && $data['numClasses'] > 0) {
+ $classesLevel = $this->getColorLevel($data['testedClassesPercent']);
+
+ $classesNumber = $data['numTestedClasses'] . $numSeparator .
+ $data['numClasses'];
+
+ $classesBar = $this->getCoverageBar(
+ $data['testedClassesPercent']
+ );
+ }
+
+ $methodsBar = ' ';
+ $methodsLevel = 'None';
+ $methodsNumber = ' ';
+
+ if ($data['numMethods'] > 0) {
+ $methodsLevel = $this->getColorLevel($data['testedMethodsPercent']);
+
+ $methodsNumber = $data['numTestedMethods'] . $numSeparator .
+ $data['numMethods'];
+
+ $methodsBar = $this->getCoverageBar(
+ $data['testedMethodsPercent']
+ );
+ }
+
+ $linesBar = ' ';
+ $linesLevel = 'None';
+ $linesNumber = ' ';
+
+ if ($data['numExecutableLines'] > 0) {
+ $linesLevel = $this->getColorLevel($data['linesExecutedPercent']);
+
+ $linesNumber = $data['numExecutedLines'] . $numSeparator .
+ $data['numExecutableLines'];
+
+ $linesBar = $this->getCoverageBar(
+ $data['linesExecutedPercent']
+ );
+ }
+
+ $template->setVar(
+ array(
+ '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(
+ array(
+ '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 = array();
+ $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 .= ' (Dashboard) ' . "\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(array('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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php
new file mode 100644
index 00000000..a29b7f3d
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php
@@ -0,0 +1,295 @@
+
+ *
+ * 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(
+ array(
+ '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 = array('class' => array(), 'method' => array());
+
+ foreach ($classes as $className => $class) {
+ foreach ($class['methods'] as $methodName => $method) {
+ if ($className != '*') {
+ $methodName = $className . '::' . $methodName;
+ }
+
+ $result['method'][] = array(
+ $method['coverage'],
+ $method['ccn'],
+ sprintf(
+ '%s',
+ str_replace($baseLink, '', $method['link']),
+ $methodName
+ )
+ );
+ }
+
+ $result['class'][] = array(
+ $class['coverage'],
+ $class['ccn'],
+ sprintf(
+ '%s',
+ str_replace($baseLink, '', $class['link']),
+ $className
+ )
+ );
+ }
+
+ return array(
+ '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 = array(
+ 'class' => array(
+ '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' => array(
+ '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 array(
+ '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 = array();
+ $leastTestedMethods = array();
+ $result = array('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(
+ ' %s %d%% ' . "\n",
+ str_replace($baseLink, '', $classes[$className]['link']),
+ $className,
+ $coverage
+ );
+ }
+
+ foreach ($leastTestedMethods as $methodName => $coverage) {
+ list($class, $method) = explode('::', $methodName);
+
+ $result['method'] .= sprintf(
+ ' %s %d%% ' . "\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 = array();
+ $methodRisks = array();
+ $result = array('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(
+ ' %s %d ' . "\n",
+ str_replace($baseLink, '', $classes[$className]['link']),
+ $className,
+ $crap
+ );
+ }
+
+ foreach ($methodRisks as $methodName => $crap) {
+ list($class, $method) = explode('::', $methodName);
+
+ $result['method'] .= sprintf(
+ ' %s %d ' . "\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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php
new file mode 100644
index 00000000..4415c520
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php
@@ -0,0 +1,97 @@
+
+ *
+ * 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(
+ array(
+ '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 = array(
+ '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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php
new file mode 100644
index 00000000..cc8278b3
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php
@@ -0,0 +1,556 @@
+
+ *
+ * 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(
+ array(
+ '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,
+ array(
+ '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,
+ array(
+ '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,
+ array(
+ '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(
+ ' %s ' . "\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 = array('');
+ $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(
+ array("\t", ' '),
+ array(' ', ' '),
+ 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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist
new file mode 100644
index 00000000..5a09c354
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/coverage_bar.html.dist
@@ -0,0 +1,5 @@
+
+
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css
new file mode 100644
index 00000000..cd1c616a
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/bootstrap.min.css
@@ -0,0 +1,5 @@
+/*!
+ * 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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css
new file mode 100644
index 00000000..7a6f7fe9
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/nv.d3.min.css
@@ -0,0 +1 @@
+.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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css
new file mode 100644
index 00000000..824fb317
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/css/style.css
@@ -0,0 +1,122 @@
+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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist
new file mode 100644
index 00000000..ed189886
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/dashboard.html.dist
@@ -0,0 +1,284 @@
+
+
+
+
+
+ Dashboard for {{full_path}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Classes
+
+
+
+
+ Coverage Distribution
+
+
+
+
+
+ Complexity
+
+
+
+
+
+
+
+ Insufficient Coverage
+
+
+
+
+ Class
+ Coverage
+
+
+
+{{insufficient_coverage_classes}}
+
+
+
+
+
+ Project Risks
+
+
+
+
+ Class
+ CRAP
+
+
+
+{{project_risks_classes}}
+
+
+
+
+
+
+
+ Methods
+
+
+
+
+ Coverage Distribution
+
+
+
+
+
+ Complexity
+
+
+
+
+
+
+
+ Insufficient Coverage
+
+
+
+
+ Method
+ Coverage
+
+
+
+{{insufficient_coverage_methods}}
+
+
+
+
+
+ Project Risks
+
+
+
+
+ Method
+ CRAP
+
+
+
+{{project_risks_methods}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist
new file mode 100644
index 00000000..efe743f5
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory.html.dist
@@ -0,0 +1,61 @@
+
+
+
+
+ Code Coverage for {{full_path}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code Coverage
+
+
+
+ Lines
+ Functions and Methods
+ Classes and Traits
+
+
+
+{{items}}
+
+
+
+
+
+
+
+
+
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist
new file mode 100644
index 00000000..78dbb356
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/directory_item.html.dist
@@ -0,0 +1,13 @@
+
+ {{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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist
new file mode 100644
index 00000000..59a06843
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file.html.dist
@@ -0,0 +1,90 @@
+
+
+
+
+ Code Coverage for {{full_path}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code Coverage
+
+
+
+ Classes and Traits
+ Functions and Methods
+ Lines
+
+
+
+{{items}}
+
+
+
+
+{{lines}}
+
+
+
+
+
+
+
+
+
+
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist
new file mode 100644
index 00000000..756fdd69
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/file_item.html.dist
@@ -0,0 +1,14 @@
+
+ {{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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 00000000..b93a4953
Binary files /dev/null and b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.eot differ
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 00000000..94fb5490
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,288 @@
+
+
+
\ No newline at end of file
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 00000000..1413fc60
Binary files /dev/null and b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.ttf differ
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff
new file mode 100644
index 00000000..9e612858
Binary files /dev/null and b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff differ
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2
new file mode 100644
index 00000000..64539b54
Binary files /dev/null and b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/fonts/glyphicons-halflings-regular.woff2 differ
diff --git a/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js
new file mode 100644
index 00000000..c8f82e59
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * 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('').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27|32)/.test(b.which)&&!/input|textarea/i.test(b.target.tagName)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g&&27!=b.which||g&&27==b.which)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(b.target);38==b.which&&j>0&&j--,40==b.which&&j ').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth',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/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js
new file mode 100644
index 00000000..34d5513e
--- /dev/null
+++ b/includes/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Template/js/d3.min.js
@@ -0,0 +1,5 @@
+!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();++o