Commit 78b9cafb authored by Sean Madsen's avatar Sean Madsen

Improve docblocks

parent 8c1faed7
......@@ -15,27 +15,32 @@ class Book {
public $slug;
/**
* @var string The title of the book, taken from the "name"
* @var string
* The title of the book, taken from the "name"
*/
public $name;
/**
* @var string Short phrase describing the book, taken from the
* @var string
* Short phrase describing the book, taken from the
*/
public $description;
/**
* @var array An array (without keys of Language objects to
* @var Language[]
* An array (without keys of Language objects to
*/
public $languages;
/**
* @var int Used to sort books
* @var int
* Used to sort books
*/
public $weight;
/**
* @var string (e.g. "Core", "Extensions") Should be in sentence case
* @var string
* (e.g. "Core", "Extensions") Should be in sentence case
*/
public $category;
......
......@@ -7,12 +7,14 @@ use AppBundle\Utils\LocaleTools;
class Language {
/**
* @var string The URL to the git repository for this language
* @var string
* The URL to the git repository for this language
*/
public $repo;
/**
* @var array An array (without keys) of Version objects
* @var Version[]
* An array (without keys) of Version objects
*/
public $versions;
......@@ -25,7 +27,7 @@ class Language {
/**
*
* @var array
* @var string[]
* Email addresses for people who would like to receive a notification any
* time a version within this language is published
*/
......
......@@ -7,7 +7,7 @@ use Symfony\Component\Finder\Finder;
class Library {
/**
* @var array
* @var Book[]
* An array (without keys) of Book objects to represent all the books in
* the system.
*/
......@@ -68,9 +68,7 @@ class Library {
$rows = array();
foreach ($this->books as $book) {
foreach ($book->languages as $language) {
/* @var \AppBundle\Model\Language $language */
foreach ($language->versions as $version) {
/* @var \AppBundle\Model\Version $version */
$key = "$book->slug/$language->code/$version->branch";
$row = array(
'book' => $book->name,
......
......@@ -41,7 +41,7 @@ class Version {
public $branch;
/**
* @var array
* @var string[]
* An array (without keys) of strings which represent redirects to this
* version of the book.
* (e.g. ["latest", "current"])
......@@ -64,15 +64,15 @@ class Version {
* automatically add an alias for $name.
*
* @param string $slug
* See Version::slug
* @see Version::slug
* @param string $name
* See Version::name
* @see Version::name
* @param null $path
* See Version::path
* @see Version::path
* @param string $branch
* See Version::branch
* @see Version::branch
* @param array $redirects
* See Version::redirects
* @see Version::redirects
*/
public function __construct($slug = 'latest', $name = 'Latest', $path = NULL, $branch = 'master', $redirects = []) {
$this->slug = $slug;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment