Compare commits

..
Author SHA1 Message Date
Barry vd. Heuvel 93f9140080 Revert description 2013-05-28 13:32:15 +02:00
Barry vd. Heuvel 824afa2c40 Revert setTypes, getContent and getRawType
So it is just the original, but with setType added.
2013-05-28 13:31:00 +02:00
Barry vd. Heuvel 09f91760eb Add getRawType, setType and setTypes
Also changed getContent to use getType()
2013-05-27 18:04:27 +02:00
6 changed files with 30 additions and 20 deletions
+4 -5
View File
@@ -3,18 +3,17 @@ php:
- 5.3.3
- 5.3
- 5.4
- 5.5
script:
- vendor/bin/phpunit
- vendor/phpunit/phpunit/composer/bin/phpunit
before_script:
- sudo apt-get -qq update > /dev/null
- phpenv rehash > /dev/null
- composer selfupdate --quiet
- composer install --dev --prefer-source
- vendor/bin/phpunit
- composer update --dev --prefer-source
- composer install --dev
- vendor/phpunit/phpunit/composer/bin/phpunit
- composer update --dev
notifications:
irc: "irc.freenode.org#phpdocumentor"
+2 -9
View File
@@ -6,20 +6,13 @@
{"name": "Mike van Riel", "email": "[email protected]"}
],
"require": {
"php": ">=5.3.3"
"php": ">=5.3.3",
"dflydev/markdown": "1.0.*"
},
"autoload": {
"psr-0": {"phpDocumentor": ["src/"]}
},
"require-dev": {
"phpunit/phpunit": "3.7.*@stable"
},
"suggest": {
"dflydev/markdown": "1.0.*"
},
"extra": {
"branch-alias": {
"dev-master": "2.0.x-dev"
}
}
}
@@ -209,12 +209,14 @@ class Description implements \Reflector
}
/**
* Returns the long description as a string.
* Returns the exported information (we should use the export static method
* BUT this throws an exception at this point).
*
* @return string
* @codeCoverageIgnore Not yet implemented
*/
public function __toString()
{
return $this->getContents();
return 'Not yet implemented';
}
}
@@ -182,7 +182,7 @@ class Serializer
/** @var Tag $tag */
foreach ($docblock->getTags() as $tag) {
$tagText = (string) $tag;
$tagText = "@{$tag->getName()} {$tag->getContent()}";
if ($this->lineLength) {
$tagText = wordwrap($tagText, $wrapLength);
}
@@ -366,12 +366,14 @@ class Tag implements \Reflector
}
/**
* Returns the tag as a serialized string
* Returns the exported information (we should use the export static method
* BUT this throws an exception at this point).
*
* @return string
* @codeCoverageIgnore Not yet implemented
*/
public function __toString()
{
return "@{$this->getName()} {$this->getContent()}";
return 'Not yet implemented';
}
}
@@ -81,10 +81,24 @@ class ReturnTag extends Tag
return (string) $this->getTypesCollection();
}
/**
* Set the type section of the variable
*
* @param string $type
* @return $this
*/
public function setType($type)
{
$this->type = $type;
$this->types = null;
$this->content = null;
return $this;
}
/**
* Returns the type collection.
*
* @return void
* @return Collection
*/
protected function getTypesCollection()
{