Skip to content

Commit 39faeec

Browse files
committed
Revert "Merge pull request #10 from boenrobot/author"
This reverts commit 21c3667, reversing changes made to ffcaa03.
1 parent 0c15eb9 commit 39faeec

File tree

2 files changed

+11
-180
lines changed

2 files changed

+11
-180
lines changed

src/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* Reflection class for an @author tag in a Docblock.
2020
*
21-
* @author Vasil Rangelov <boen.robot@gmail.com>
21+
* @author Mike van Riel <mike.vanriel@naenius.com>
2222
* @license http://www.opensource.org/licenses/mit-license.php MIT
2323
* @link http://phpdoc.org
2424
*/
@@ -27,11 +27,8 @@ class AuthorTag extends Tag
2727
/** @var string The name of the author */
2828
protected $name = '';
2929

30-
/** @var array Array of URIs belonging to the author, including email */
31-
protected $uris = array();
32-
33-
/** @var string The role of the author */
34-
protected $role = '';
30+
/** @var string The email of the author */
31+
protected $email = '';
3532

3633
/**
3734
* Parses a tag and populates the member variables.
@@ -44,32 +41,14 @@ public function __construct($type, $content, DocBlock $docblock = null)
4441
{
4542
parent::__construct($type, $content, $docblock);
4643
if (preg_match(
47-
'/^
48-
# Name
49-
([^\<]*)
50-
(?:
51-
# URIs
52-
\<([^>]*)\>\s*
53-
# Role
54-
(?:
55-
\(([^\)]*)\)
56-
)?
57-
# Description
58-
(.*)
59-
)?
60-
$/sux',
44+
'/^([^\<]*)(\<([^\>]*)\>)?$/',
6145
$this->description,
6246
$matches
6347
)) {
64-
$this->name = rtrim($matches[1]);
65-
if (isset($matches[2])) {
66-
$matches[2] = trim($matches[2]);
67-
if ('' !== $matches[2]) {
68-
$this->uris = preg_split('/\s+/u', $matches[2]);
69-
}
48+
$this->name = trim($matches[1]);
49+
if (isset($matches[3])) {
50+
$this->email = trim($matches[3]);
7051
}
71-
$this->role = isset($matches[3]) ? trim($matches[3]) : '';
72-
$this->description = isset($matches[4]) ? trim($matches[4]) : '';
7352
}
7453
}
7554

@@ -84,22 +63,12 @@ public function getAuthorName()
8463
}
8564

8665
/**
87-
* Gets the author's URIs.
66+
* Gets the author's email.
8867
*
89-
* @return array Array of URIs belonging to the author, including email.
68+
* @return string The author's email.
9069
*/
91-
public function getAuthorURIs()
70+
public function getAuthorEmail()
9271
{
93-
return $this->uris;
94-
}
95-
96-
/**
97-
* Gets the author's role.
98-
*
99-
* @return string The role of the author.
100-
*/
101-
public function getAuthorRole()
102-
{
103-
return $this->role;
72+
return $this->email;
10473
}
10574
}

tests/phpDocumentor/Reflection/DocBlock/Tag/AuthorTagTest.php

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)