Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #136 from rdohms/phpdocblock-review

Reviewed PHP DocBlocks
  • Loading branch information...
commit 717ea940ff8fa0854e84a2249edadfb998f91406 2 parents 4f78640 + 8a78431
@beberlei beberlei authored
Showing with 482 additions and 94 deletions.
  1. +4 −0 lib/Doctrine/Common/Annotations/Annotation.php
  2. +10 −0 lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php
  3. +2 −0  lib/Doctrine/Common/Annotations/Annotation/Target.php
  4. +16 −9 lib/Doctrine/Common/Annotations/AnnotationReader.php
  5. +11 −1 lib/Doctrine/Common/Annotations/AnnotationRegistry.php
  6. +56 −1 lib/Doctrine/Common/Annotations/CachedReader.php
  7. +7 −3 lib/Doctrine/Common/Annotations/DocLexer.php
  8. +25 −8 lib/Doctrine/Common/Annotations/DocParser.php
  9. +55 −6 lib/Doctrine/Common/Annotations/FileCacheReader.php
  10. +50 −3 lib/Doctrine/Common/Annotations/IndexedReader.php
  11. +32 −0 lib/Doctrine/Common/Annotations/Reader.php
  12. +15 −10 lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php
  13. +3 −1 lib/Doctrine/Common/Cache/CacheProvider.php
  14. +3 −2 lib/Doctrine/Common/ClassLoader.php
  15. +16 −3 lib/Doctrine/Common/Collections/ArrayCollection.php
  16. +2 −0  lib/Doctrine/Common/Comparable.php
  17. +0 −2  lib/Doctrine/Common/EventArgs.php
  18. +1 −1  lib/Doctrine/Common/EventManager.php
  19. +1 −1  lib/Doctrine/Common/Lexer.php
  20. +46 −11 lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php
  21. +1 −1  lib/Doctrine/Common/Persistence/ConnectionRegistry.php
  22. +1 −1  lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php
  23. +3 −3 lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php
  24. +4 −0 lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php
  25. +1 −1  lib/Doctrine/Common/Persistence/ManagerRegistry.php
  26. +5 −4 lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php
  27. +1 −1  lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php
  28. +1 −1  lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php
  29. +2 −1  lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php
  30. +14 −2 lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php
  31. +3 −1 lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php
  32. +4 −2 lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php
  33. +10 −0 lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php
  34. +16 −0 lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php
  35. +24 −0 lib/Doctrine/Common/Persistence/Mapping/MappingException.php
  36. +2 −2 lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php
  37. +2 −2 lib/Doctrine/Common/Persistence/ObjectManager.php
  38. +2 −2 lib/Doctrine/Common/Persistence/ObjectRepository.php
  39. +16 −5 lib/Doctrine/Common/Persistence/PersistentObject.php
  40. +2 −2 lib/Doctrine/Common/Util/ClassUtils.php
  41. +13 −1 lib/Doctrine/Common/Util/Debug.php
View
4 lib/Doctrine/Common/Annotations/Annotation.php
@@ -52,6 +52,8 @@ class Annotation
* Error handler for unknown property accessor in Annotation class.
*
* @param string $name Unknown property name
+ *
+ * @throws \BadMethodCallException
*/
public function __get($name)
{
@@ -65,6 +67,8 @@ public function __get($name)
*
* @param string $name Unkown property name
* @param mixed $value Property value
+ *
+ * @throws \BadMethodCallException
*/
public function __set($name, $value)
{
View
10 lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php
@@ -28,8 +28,18 @@
*/
final class IgnoreAnnotation
{
+ /**
+ * @var array
+ */
public $names;
+ /**
+ * Constructor
+ *
+ * @param array $values
+ *
+ * @throws \RuntimeException
+ */
public function __construct(array $values)
{
if (is_string($values['value'])) {
View
2  lib/Doctrine/Common/Annotations/Annotation/Target.php
@@ -70,6 +70,8 @@
* Annotation construct
*
* @param array $values
+ *
+ * @throws \InvalidArgumentException
*/
public function __construct(array $values)
{
View
25 lib/Doctrine/Common/Annotations/AnnotationReader.php
@@ -60,8 +60,8 @@
'subpackage'=> true, 'name'=> true, 'global'=> true, 'param'=> true,
'return'=> true, 'staticvar'=> true, 'category'=> true, 'staticVar'=> true,
'static'=> true, 'var'=> true, 'throws'=> true, 'inheritdoc'=> true,
- 'inheritDoc'=> true, 'license'=> true, 'todo'=> true, 'deprecated'=> true,
- 'deprec'=> true, 'author'=> true, 'property' => true, 'method' => true,
+ 'inheritDoc'=> true, 'license'=> true, 'todo'=> true,
+ 'deprec'=> true, 'property' => true, 'method' => true,
'abstract'=> true, 'exception'=> true, 'magic' => true, 'api' => true,
'final'=> true, 'filesource'=> true, 'throw' => true, 'uses' => true,
'usedby'=> true, 'private' => true, 'Annotation' => true, 'override' => true,
@@ -83,21 +83,21 @@ static public function addGlobalIgnoredName($name)
/**
* Annotations Parser
*
- * @var Doctrine\Common\Annotations\DocParser
+ * @var \Doctrine\Common\Annotations\DocParser
*/
private $parser;
/**
* Annotations Parser used to collect parsing metadata
*
- * @var Doctrine\Common\Annotations\DocParser
+ * @var \Doctrine\Common\Annotations\DocParser
*/
private $preParser;
/**
* PHP Parser used to collect imports.
*
- * @var Doctrine\Common\Annotations\PhpParser
+ * @var \Doctrine\Common\Annotations\PhpParser
*/
private $phpParser;
@@ -155,7 +155,7 @@ public function getClassAnnotations(ReflectionClass $class)
* @param ReflectionClass $class The ReflectionClass of the class from which
* the class annotations should be read.
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getClassAnnotation(ReflectionClass $class, $annotationName)
{
@@ -193,7 +193,7 @@ public function getPropertyAnnotations(ReflectionProperty $property)
*
* @param ReflectionProperty $property
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
{
@@ -211,8 +211,9 @@ public function getPropertyAnnotation(ReflectionProperty $property, $annotationN
/**
* Gets the annotations applied to a method.
*
- * @param ReflectionMethod $property The ReflectionMethod of the method from which
+ * @param \ReflectionMethod $method The ReflectionMethod of the method from which
* the annotations should be read.
+ *
* @return array An array of Annotations.
*/
public function getMethodAnnotations(ReflectionMethod $method)
@@ -231,7 +232,7 @@ public function getMethodAnnotations(ReflectionMethod $method)
*
* @param ReflectionMethod $method
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
{
@@ -262,6 +263,12 @@ private function getIgnoredAnnotationNames(ReflectionClass $class)
return $this->ignoredAnnotationNames[$name];
}
+ /**
+ * Retrieve imports
+ *
+ * @param \ReflectionClass $class
+ * @return array
+ */
private function getImports(ReflectionClass $class)
{
if (isset($this->imports[$name = $class->getName()])) {
View
12 lib/Doctrine/Common/Annotations/AnnotationRegistry.php
@@ -19,6 +19,9 @@
namespace Doctrine\Common\Annotations;
+/**
+ * AnnotationRegistry
+ */
final class AnnotationRegistry
{
/**
@@ -46,6 +49,11 @@ static public function reset()
self::$loaders = array();
}
+ /**
+ * Register file
+ *
+ * @param string $file
+ */
static public function registerFile($file)
{
require_once $file;
@@ -83,6 +91,8 @@ static public function registerAutoloadNamespaces(array $namespaces)
* IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class.
*
* @param callable $callable
+ *
+ * @throws \InvalidArgumentException
*/
static public function registerLoader($callable)
{
@@ -96,7 +106,7 @@ static public function registerLoader($callable)
* Autoload an annotation class silently.
*
* @param string $class
- * @return void
+ * @return boolean
*/
static public function loadAnnotationClass($class)
{
View
57 lib/Doctrine/Common/Annotations/CachedReader.php
@@ -29,6 +29,9 @@
*/
final class CachedReader implements Reader
{
+ /**
+ * @var string
+ */
private static $CACHE_SALT = '@[Annot]';
/**
@@ -52,8 +55,11 @@
private $loadedAnnotations;
/**
+ * Constructor
+ *
* @param Reader $reader
* @param Cache $cache
+ * @param bool $debug
*/
public function __construct(Reader $reader, Cache $cache, $debug = false)
{
@@ -62,6 +68,12 @@ public function __construct(Reader $reader, Cache $cache, $debug = false)
$this->debug = (Boolean) $debug;
}
+ /**
+ * Get annotations for class
+ *
+ * @param \ReflectionClass $class
+ * @return array
+ */
public function getClassAnnotations(\ReflectionClass $class)
{
$cacheKey = $class->getName();
@@ -78,6 +90,13 @@ public function getClassAnnotations(\ReflectionClass $class)
return $this->loadedAnnotations[$cacheKey] = $annots;
}
+ /**
+ * Get selected annotation for class
+ *
+ * @param \ReflectionClass $class
+ * @param string $annotationName
+ * @return null
+ */
public function getClassAnnotation(\ReflectionClass $class, $annotationName)
{
foreach ($this->getClassAnnotations($class) as $annot) {
@@ -89,6 +108,12 @@ public function getClassAnnotation(\ReflectionClass $class, $annotationName)
return null;
}
+ /**
+ * Get annotations for property
+ *
+ * @param \ReflectionProperty $property
+ * @return array
+ */
public function getPropertyAnnotations(\ReflectionProperty $property)
{
$class = $property->getDeclaringClass();
@@ -106,6 +131,13 @@ public function getPropertyAnnotations(\ReflectionProperty $property)
return $this->loadedAnnotations[$cacheKey] = $annots;
}
+ /**
+ * Get selected annotation for property
+ *
+ * @param \ReflectionProperty $property
+ * @param string $annotationName
+ * @return null
+ */
public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName)
{
foreach ($this->getPropertyAnnotations($property) as $annot) {
@@ -117,6 +149,12 @@ public function getPropertyAnnotation(\ReflectionProperty $property, $annotation
return null;
}
+ /**
+ * Get method annotations
+ *
+ * @param \ReflectionMethod $method
+ * @return array
+ */
public function getMethodAnnotations(\ReflectionMethod $method)
{
$class = $method->getDeclaringClass();
@@ -134,6 +172,13 @@ public function getMethodAnnotations(\ReflectionMethod $method)
return $this->loadedAnnotations[$cacheKey] = $annots;
}
+ /**
+ * Get selected method annotation
+ *
+ * @param \ReflectionMethod $method
+ * @param string $annotationName
+ * @return null
+ */
public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
{
foreach ($this->getMethodAnnotations($method) as $annot) {
@@ -145,6 +190,9 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
return null;
}
+ /**
+ * Clear loaded annotations
+ */
public function clearLoadedAnnotations()
{
$this->loadedAnnotations = array();
@@ -155,7 +203,7 @@ public function clearLoadedAnnotations()
*
* @param string $rawCacheKey The cache key.
* @param \ReflectionClass $class The related class.
- * @return mixed|false The cached value or false when the value is not in cache.
+ * @return mixed|boolean The cached value or false when the value is not in cache.
*/
private function fetchFromCache($rawCacheKey, \ReflectionClass $class)
{
@@ -184,6 +232,13 @@ private function saveToCache($rawCacheKey, $value)
}
}
+ /**
+ * Check if cache is fresh
+ *
+ * @param string $cacheKey
+ * @param \ReflectionClass $class
+ * @return bool
+ */
private function isCacheFresh($cacheKey, \ReflectionClass $class)
{
if (false === $filename = $class->getFilename()) {
View
10 lib/Doctrine/Common/Annotations/DocLexer.php
@@ -53,7 +53,7 @@
const T_COLON = 112;
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
protected function getCatchablePatterns()
{
@@ -65,7 +65,7 @@ protected function getCatchablePatterns()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
protected function getNonCatchablePatterns()
{
@@ -73,7 +73,11 @@ protected function getNonCatchablePatterns()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
+ *
+ * @param string $value
+ *
+ * @return int
*/
protected function getType(&$value)
{
View
33 lib/Doctrine/Common/Annotations/DocParser.php
@@ -49,7 +49,7 @@
/**
* The lexer.
*
- * @var Doctrine\Common\Annotations\DocLexer
+ * @var \Doctrine\Common\Annotations\DocLexer
*/
private $lexer;
@@ -63,7 +63,7 @@
/**
* Doc Parser used to collect annotation target
*
- * @var Doctrine\Common\Annotations\DocParser
+ * @var \Doctrine\Common\Annotations\DocParser
*/
private static $metadataParser;
@@ -223,6 +223,11 @@ public function setIgnoredAnnotationNames(array $names)
$this->ignoredAnnotationNames = $names;
}
+ /**
+ * Sets ignore on not-imported annotations
+ *
+ * @param $bool
+ */
public function setIgnoreNotImportedAnnotations($bool)
{
$this->ignoreNotImportedAnnotations = (Boolean) $bool;
@@ -230,7 +235,10 @@ public function setIgnoreNotImportedAnnotations($bool)
/**
* Sets the default namespaces.
- * @param array $namespaces
+ *
+ * @param array $namespace
+ *
+ * @throws \RuntimeException
*/
public function addNamespace($namespace)
{
@@ -240,6 +248,12 @@ public function addNamespace($namespace)
$this->namespaces[] = $namespace;
}
+ /**
+ * Sets the imports
+ *
+ * @param array $imports
+ * @throws \RuntimeException
+ */
public function setImports(array $imports)
{
if ($this->namespaces) {
@@ -287,7 +301,7 @@ public function parse($input, $context = '')
* Attempts to match the given token with the current lookahead token.
* If they match, updates the lookahead token; otherwise raises a syntax error.
*
- * @param int Token type.
+ * @param int $token type of Token.
* @return bool True if tokens match; false otherwise.
*/
private function match($token)
@@ -322,7 +336,8 @@ private function matchAny(array $tokens)
*
* @param string $expected Expected string.
* @param array $token Optional token.
- * @throws SyntaxException
+ *
+ * @throws AnnotationException
*/
private function syntaxError($expected, $token = null)
{
@@ -372,7 +387,7 @@ private function classExists($fqcn)
/**
* Collects parsing metadata for a given annotation class
*
- * @param string $name The annotation name
+ * @param string $name The annotation name
*/
private function collectAnnotationMetadata($name)
{
@@ -530,6 +545,7 @@ private function Annotations()
* NameSpacePart ::= identifier | null | false | true
* SimpleName ::= identifier | null | false | true
*
+ * @throws AnnotationException
* @return mixed False if it is not a valid annotation.
*/
private function Annotation()
@@ -736,6 +752,7 @@ private function Values()
/**
* Constant ::= integer | string | float | boolean
*
+ * @throws AnnotationException
* @return mixed
*/
private function Constant()
@@ -749,7 +766,7 @@ private function Constant()
$found = false;
switch (true) {
- case !empty ($this->namespace):
+ case !empty ($this->namespaces):
foreach ($this->namespaces as $ns) {
if (class_exists($ns.'\\'.$className) || interface_exists($ns.'\\'.$className)) {
$className = $ns.'\\'.$className;
@@ -913,7 +930,7 @@ private function Arrayx()
$this->match(DocLexer::T_OPEN_CURLY_BRACES);
$values[] = $this->ArrayEntry();
-
+
while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
$this->match(DocLexer::T_COMMA);
View
61 lib/Doctrine/Common/Annotations/FileCacheReader.php
@@ -32,10 +32,31 @@ class FileCacheReader implements Reader
* @var Reader
*/
private $reader;
+
+ /**
+ * @var string
+ */
private $dir;
+
+ /**
+ * @var bool
+ */
private $debug;
+
+ /**
+ * @var array
+ */
private $loadedAnnotations = array();
+ /**
+ * Constructor
+ *
+ * @param Reader $reader
+ * @param string $cacheDir
+ * @param bool $debug
+ *
+ * @throws \InvalidArgumentException
+ */
public function __construct(Reader $reader, $cacheDir, $debug = false)
{
$this->reader = $reader;
@@ -50,6 +71,12 @@ public function __construct(Reader $reader, $cacheDir, $debug = false)
$this->debug = $debug;
}
+ /**
+ * Retrieve annotations for class
+ *
+ * @param \ReflectionClass $class
+ * @return array
+ */
public function getClassAnnotations(\ReflectionClass $class)
{
$key = $class->getName();
@@ -78,6 +105,12 @@ public function getClassAnnotations(\ReflectionClass $class)
return $this->loadedAnnotations[$key] = include $path;
}
+ /**
+ * Get annotations for property
+ *
+ * @param \ReflectionProperty $property
+ * @return array
+ */
public function getPropertyAnnotations(\ReflectionProperty $property)
{
$class = $property->getDeclaringClass();
@@ -107,6 +140,12 @@ public function getPropertyAnnotations(\ReflectionProperty $property)
return $this->loadedAnnotations[$key] = include $path;
}
+ /**
+ * Retrieve annotations for method
+ *
+ * @param \ReflectionMethod $method
+ * @return array
+ */
public function getMethodAnnotations(\ReflectionMethod $method)
{
$class = $method->getDeclaringClass();
@@ -136,6 +175,12 @@ public function getMethodAnnotations(\ReflectionMethod $method)
return $this->loadedAnnotations[$key] = include $path;
}
+ /**
+ * Save cache file
+ *
+ * @param string $path
+ * @param mixed $data
+ */
private function saveCacheFile($path, $data)
{
file_put_contents($path, '<?php return unserialize('.var_export(serialize($data), true).');');
@@ -144,10 +189,11 @@ private function saveCacheFile($path, $data)
/**
* Gets a class annotation.
*
- * @param ReflectionClass $class The ReflectionClass of the class from which
+ * @param \ReflectionClass $class The ReflectionClass of the class from which
* the class annotations should be read.
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ *
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getClassAnnotation(\ReflectionClass $class, $annotationName)
{
@@ -165,9 +211,9 @@ public function getClassAnnotation(\ReflectionClass $class, $annotationName)
/**
* Gets a method annotation.
*
- * @param ReflectionMethod $method
+ * @param \ReflectionMethod $method
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
{
@@ -185,9 +231,9 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
/**
* Gets a property annotation.
*
- * @param ReflectionProperty $property
+ * @param \ReflectionProperty $property
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName)
{
@@ -202,6 +248,9 @@ public function getPropertyAnnotation(\ReflectionProperty $property, $annotation
return null;
}
+ /**
+ * Clear stores annotations
+ */
public function clearLoadedAnnotations()
{
$this->loadedAnnotations = array();
View
53 lib/Doctrine/Common/Annotations/IndexedReader.php
@@ -28,13 +28,27 @@
*/
class IndexedReader implements Reader
{
+ /**
+ * @var Reader
+ */
private $delegate;
+ /**
+ * Constructor
+ *
+ * @param Reader $reader
+ */
public function __construct(Reader $reader)
{
$this->delegate = $reader;
}
+ /**
+ * Get Annotations for class
+ *
+ * @param \ReflectionClass $class
+ * @return array
+ */
public function getClassAnnotations(\ReflectionClass $class)
{
$annotations = array();
@@ -45,11 +59,24 @@ public function getClassAnnotations(\ReflectionClass $class)
return $annotations;
}
+ /**
+ * Get selected annotation for class
+ *
+ * @param \ReflectionClass $class
+ * @param string $annotation
+ * @return mixed
+ */
public function getClassAnnotation(\ReflectionClass $class, $annotation)
{
return $this->delegate->getClassAnnotation($class, $annotation);
}
+ /**
+ * Get Annotations for method
+ *
+ * @param \ReflectionMethod $method
+ * @return array
+ */
public function getMethodAnnotations(\ReflectionMethod $method)
{
$annotations = array();
@@ -60,11 +87,24 @@ public function getMethodAnnotations(\ReflectionMethod $method)
return $annotations;
}
+ /**
+ * Get selected annotation for method
+ *
+ * @param \ReflectionMethod $method
+ * @param string $annotation
+ * @return mixed
+ */
public function getMethodAnnotation(\ReflectionMethod $method, $annotation)
{
return $this->delegate->getMethodAnnotation($method, $annotation);
}
+ /**
+ * Get annotations for property
+ *
+ * @param \ReflectionProperty $property
+ * @return array
+ */
public function getPropertyAnnotations(\ReflectionProperty $property)
{
$annotations = array();
@@ -75,6 +115,13 @@ public function getPropertyAnnotations(\ReflectionProperty $property)
return $annotations;
}
+ /**
+ * Get selected annotation for property
+ *
+ * @param \ReflectionProperty $property
+ * @param string $annotation
+ * @return mixed
+ */
public function getPropertyAnnotation(\ReflectionProperty $property, $annotation)
{
return $this->delegate->getPropertyAnnotation($property, $annotation);
@@ -83,9 +130,9 @@ public function getPropertyAnnotation(\ReflectionProperty $property, $annotation
/**
* Proxy all methods to the delegate.
*
- * @param type $method
- * @param type $args
- * @return type
+ * @param string $method
+ * @param array $args
+ * @return mixed
*/
public function __call($method, $args)
{
View
32 lib/Doctrine/Common/Annotations/Reader.php
@@ -26,10 +26,42 @@
*/
interface Reader
{
+ /**
+ * @param \ReflectionClass $class
+ * @return mixed
+ */
function getClassAnnotations(\ReflectionClass $class);
+
+ /**
+ * @param \ReflectionClass $class
+ * @param string $annotationName
+ * @return mixed
+ */
function getClassAnnotation(\ReflectionClass $class, $annotationName);
+
+ /**
+ * @param \ReflectionMethod $method
+ * @return mixed
+ */
function getMethodAnnotations(\ReflectionMethod $method);
+
+ /**
+ * @param \ReflectionMethod $method
+ * @param string $annotationName
+ * @return mixed
+ */
function getMethodAnnotation(\ReflectionMethod $method, $annotationName);
+
+ /**
+ * @param \ReflectionProperty $property
+ * @return mixed
+ */
function getPropertyAnnotations(\ReflectionProperty $property);
+
+ /**
+ * @param \ReflectionProperty $property
+ * @param string $annotationName
+ * @return mixed
+ */
function getPropertyAnnotation(\ReflectionProperty $property, $annotationName);
}
View
25 lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php
@@ -62,8 +62,9 @@ public function addNamespace($namespace)
/**
* Gets the annotations applied to a class.
*
- * @param ReflectionClass $class The ReflectionClass of the class from which
+ * @param \ReflectionClass $class The ReflectionClass of the class from which
* the class annotations should be read.
+ *
* @return array An array of Annotations.
*/
public function getClassAnnotations(\ReflectionClass $class)
@@ -71,11 +72,12 @@ public function getClassAnnotations(\ReflectionClass $class)
return $this->parser->parse($class->getDocComment(), 'class '.$class->getName());
}
- /**
+ /**
* Gets the annotations applied to a method.
*
- * @param ReflectionMethod $property The ReflectionMethod of the method from which
+ * @param \ReflectionMethod $method The ReflectionMethod of the method from which
* the annotations should be read.
+ *
* @return array An array of Annotations.
*/
public function getMethodAnnotations(\ReflectionMethod $method)
@@ -86,8 +88,9 @@ public function getMethodAnnotations(\ReflectionMethod $method)
/**
* Gets the annotations applied to a property.
*
- * @param ReflectionProperty $property The ReflectionProperty of the property
+ * @param \ReflectionProperty $property The ReflectionProperty of the property
* from which the annotations should be read.
+ *
* @return array An array of Annotations.
*/
public function getPropertyAnnotations(\ReflectionProperty $property)
@@ -98,10 +101,11 @@ public function getPropertyAnnotations(\ReflectionProperty $property)
/**
* Gets a class annotation.
*
- * @param ReflectionClass $class The ReflectionClass of the class from which
+ * @param \ReflectionClass $class The ReflectionClass of the class from which
* the class annotations should be read.
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ *
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getClassAnnotation(\ReflectionClass $class, $annotationName)
{
@@ -117,9 +121,10 @@ public function getClassAnnotation(\ReflectionClass $class, $annotationName)
/**
* Gets a method annotation.
*
- * @param ReflectionMethod $method
+ * @param \ReflectionMethod $method
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ *
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
{
@@ -135,9 +140,9 @@ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
/**
* Gets a property annotation.
*
- * @param ReflectionProperty $property
+ * @param \ReflectionProperty $property
* @param string $annotationName The name of the annotation.
- * @return The Annotation or NULL, if the requested annotation does not exist.
+ * @return mixed The Annotation or NULL, if the requested annotation does not exist.
*/
public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName)
{
View
4 lib/Doctrine/Common/Cache/CacheProvider.php
@@ -199,7 +199,9 @@ private function getNamespaceVersion()
*
* @param string $id The cache id.
* @param string $data The cache entry/data.
- * @param int $lifeTime The lifetime. If != false, sets a specific lifetime for this cache entry (null => infinite lifeTime).
+ * @param bool|int $lifeTime The lifetime. If != false, sets a specific lifetime for this
+ * cache entry (null => infinite lifeTime).
+ *
* @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
*/
abstract protected function doSave($id, $data, $lifeTime = false);
View
5 lib/Doctrine/Common/ClassLoader.php
@@ -149,7 +149,8 @@ public function unregister()
/**
* Loads the given class or interface.
*
- * @param string $classname The name of the class to load.
+ * @param string $className The name of the class to load.
+
* @return boolean TRUE if the class has been successfully loaded, FALSE otherwise.
*/
public function loadClass($className)
@@ -244,7 +245,7 @@ public static function classExists($className)
* for (and is able to load) the class with the given name.
*
* @param string $className The name of the class.
- * @return The <tt>ClassLoader</tt> for the class or NULL if no such <tt>ClassLoader</tt> exists.
+ * @return ClassLoader The <tt>ClassLoader</tt> for the class or NULL if no such <tt>ClassLoader</tt> exists.
*/
public static function getClassLoader($className)
{
View
19 lib/Doctrine/Common/Collections/ArrayCollection.php
@@ -151,6 +151,9 @@ public function removeElement($element)
* ArrayAccess implementation of offsetExists()
*
* @see containsKey()
+ *
+ * @param mixed $offset
+ * @return bool
*/
public function offsetExists($offset)
{
@@ -161,6 +164,9 @@ public function offsetExists($offset)
* ArrayAccess implementation of offsetGet()
*
* @see get()
+ *
+ * @param mixed $offset
+ * @return mixed
*/
public function offsetGet($offset)
{
@@ -168,10 +174,14 @@ public function offsetGet($offset)
}
/**
- * ArrayAccess implementation of offsetGet()
+ * ArrayAccess implementation of offsetSet()
*
* @see add()
* @see set()
+ *
+ * @param mixed $offset
+ * @param mixed $value
+ * @return bool
*/
public function offsetSet($offset, $value)
{
@@ -185,6 +195,9 @@ public function offsetSet($offset, $value)
* ArrayAccess implementation of offsetUnset()
*
* @see remove()
+ *
+ * @param mixed $offset
+ * @return mixed
*/
public function offsetUnset($offset)
{
@@ -224,7 +237,7 @@ public function contains($element)
}
/**
- * Tests for the existance of an element that satisfies the given predicate.
+ * Tests for the existence of an element that satisfies the given predicate.
*
* @param Closure $p The predicate.
* @return boolean TRUE if the predicate is TRUE for at least one element, FALSE otherwise.
@@ -328,7 +341,7 @@ public function add($value)
/**
* Checks whether the collection is empty.
*
- * Note: This is preferrable over count() == 0.
+ * Note: This is preferable over count() == 0.
*
* @return boolean TRUE if the collection is empty, FALSE otherwise.
*/
View
2  lib/Doctrine/Common/Comparable.php
@@ -40,6 +40,8 @@
* This method should not check for identity using ===, only for semantical equality for example
* when two different DateTime instances point to the exact same Date + TZ.
*
+ * @param mixed $other
+ *
* @return int
*/
public function compareTo($other);
View
2  lib/Doctrine/Common/EventArgs.php
@@ -40,7 +40,6 @@ class EventArgs
{
/**
* @var EventArgs Single instance of EventArgs
- * @static
*/
private static $_emptyEventArgsInstance;
@@ -55,7 +54,6 @@ class EventArgs
*
* @see EventManager::dispatchEvent
* @link http://msdn.microsoft.com/en-us/library/system.eventargs.aspx
- * @static
* @return EventArgs
*/
public static function getEmptyInstance()
View
2  lib/Doctrine/Common/EventManager.php
@@ -127,7 +127,7 @@ public function removeEventListener($events, $listener)
* Adds an EventSubscriber. The subscriber is asked for all the events he is
* interested in and added as a listener for these events.
*
- * @param Doctrine\Common\EventSubscriber $subscriber The subscriber.
+ * @param \Doctrine\Common\EventSubscriber $subscriber The subscriber.
*/
public function addEventSubscriber(EventSubscriber $subscriber)
{
View
2  lib/Doctrine/Common/Lexer.php
@@ -145,7 +145,7 @@ public function moveNext()
/**
* Tells the lexer to skip input tokens until it sees a token with the given value.
*
- * @param $type The token type to skip until.
+ * @param string $type The token type to skip until.
*/
public function skipUntil($type)
{
View
57 lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php
@@ -34,13 +34,46 @@
*/
abstract class AbstractManagerRegistry implements ManagerRegistry
{
+ /**
+ * @var string
+ */
private $name;
+
+ /**
+ * @var array
+ */
private $connections;
+
+ /**
+ * @var array
+ */
private $managers;
+
+ /**
+ * @var string
+ */
private $defaultConnection;
+
+ /**
+ * @var string
+ */
private $defaultManager;
+
+ /**
+ * @var string
+ */
private $proxyInterfaceName;
+ /**
+ * Constructor
+ *
+ * @param string $name
+ * @param array $connections
+ * @param array $managers
+ * @param string $defaultConnection
+ * @param string $defaultManager
+ * @param string $proxyInterfaceName
+ */
public function __construct($name, array $connections, array $managers, $defaultConnection, $defaultManager, $proxyInterfaceName)
{
$this->name = $name;
@@ -82,7 +115,7 @@ public function getName()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getConnection($name = null)
{
@@ -98,7 +131,7 @@ public function getConnection($name = null)
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getConnectionNames()
{
@@ -106,7 +139,7 @@ public function getConnectionNames()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getConnections()
{
@@ -119,7 +152,7 @@ public function getConnections()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getDefaultConnectionName()
{
@@ -127,7 +160,7 @@ public function getDefaultConnectionName()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getDefaultManagerName()
{
@@ -135,7 +168,9 @@ public function getDefaultManagerName()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
+ *
+ * @throws \InvalidArgumentException
*/
public function getManager($name = null)
{
@@ -151,7 +186,7 @@ public function getManager($name = null)
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getManagerForClass($class)
{
@@ -170,7 +205,7 @@ public function getManagerForClass($class)
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getManagerNames()
{
@@ -178,7 +213,7 @@ public function getManagerNames()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getManagers()
{
@@ -191,7 +226,7 @@ public function getManagers()
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function getRepository($persistentObjectName, $persistentManagerName = null)
{
@@ -199,7 +234,7 @@ public function getRepository($persistentObjectName, $persistentManagerName = nu
}
/**
- * @inheritdoc
+ * {@inheritdoc}
*/
public function resetManager($name = null)
{
View
2  lib/Doctrine/Common/Persistence/ConnectionRegistry.php
@@ -43,7 +43,7 @@ function getDefaultConnectionName();
*
* @param string $name The connection name (null for the default one)
*
- * @return Connection
+ * @return object
*/
function getConnection($name = null);
View
2  lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php
@@ -44,7 +44,7 @@ class LoadClassMetadataEventArgs extends EventArgs
/**
* Constructor.
*
- * @param ClasseMetadata $classMetadata
+ * @param ClassMetadata $classMetadata
* @param ObjectManager $objectManager
*/
public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager)
View
6 lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php
@@ -31,7 +31,7 @@
class OnClearEventArgs extends \Doctrine\Common\EventArgs
{
/**
- * @var ObjectManager
+ * @var \Doctrine\Common\Persistence\ObjectManager
*/
private $objectManager;
@@ -43,7 +43,7 @@ class OnClearEventArgs extends \Doctrine\Common\EventArgs
/**
* Constructor.
*
- * @param ObjectManager $objectManager
+ * @param \Doctrine\Common\Persistence\ObjectManager $objectManager
* @param string $entityClass Optional entity class
*/
public function __construct($objectManager, $entityClass = null)
@@ -55,7 +55,7 @@ public function __construct($objectManager, $entityClass = null)
/**
* Retrieve associated ObjectManager.
*
- * @return ObjectManager
+ * @return \Doctrine\Common\Persistence\ObjectManager
*/
public function getObjectManager()
{
View
4 lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php
@@ -64,6 +64,8 @@ public function getEntityChangeSet()
/**
* Check if field has a changeset.
*
+ * @param string $field
+ *
* @return boolean
*/
public function hasChangedField($field)
@@ -114,6 +116,8 @@ public function setNewValue($field, $value)
* Assert the field exists in changeset.
*
* @param string $field
+ *
+ * @throws \InvalidArgumentException
*/
private function assertValidField($field)
{
View
2  lib/Doctrine/Common/Persistence/ManagerRegistry.php
@@ -50,7 +50,7 @@ function getManager($name = null);
/**
* Gets an array of all registered object managers
*
- * @return array An array of ObjectManager instances
+ * @return \Doctrine\Common\Persistence\ObjectManager[] An array of ObjectManager instances
*/
function getManagers();
View
9 lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php
@@ -134,7 +134,7 @@ public function getAllMetadata()
/**
* Return the mapping driver implementation.
*
- * @return MappingDriver
+ * @return \Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
*/
abstract protected function getDriver();
@@ -151,7 +151,7 @@ public function getAllMetadata()
* Initialize Reflection after ClassMetadata was constructed.
*
* @param ClassMetadata $class
- * @param ReflectionSErvice $reflService
+ * @param ReflectionService $reflService
* @return void
*/
abstract protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService);
@@ -160,7 +160,7 @@ public function getAllMetadata()
* Gets the class metadata descriptor for a class.
*
* @param string $className The name of the class.
- * @return Doctrine\Common\Persistence\Mapping\ClassMetadata
+ * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata
*/
public function getMetadataFor($className)
{
@@ -251,7 +251,8 @@ protected function getParentClasses($name)
* is still not loaded.
*
* @param string $name The name of the class for which the metadata should get loaded.
- * @param array $tables The metadata collection to which the loaded metadata is added.
+ *
+ * @return array
*/
protected function loadMetadata($name)
{
View
2  lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php
@@ -49,7 +49,7 @@ function getIdentifier();
/**
* Gets the ReflectionClass instance for this mapped class.
*
- * @return ReflectionClass
+ * @return \ReflectionClass
*/
function getReflectionClass();
View
2  lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php
@@ -118,7 +118,7 @@ public function getReader()
/**
* Get the file extension used to look for mapping files under
*
- * @return void
+ * @return string
*/
public function getFileExtension()
{
View
3  lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php
@@ -51,6 +51,7 @@ class DefaultFileLocator implements FileLocator
* documents and operates in the specified operating mode.
*
* @param string|array $paths One or multiple paths where mapping documents can be found.
+ * @param string|null $fileExtension
*/
public function __construct($paths, $fileExtension = null)
{
@@ -81,7 +82,7 @@ public function getPaths()
/**
* Get the file extension used to look for mapping files under
*
- * @return void
+ * @return string
*/
public function getFileExtension()
{
View
16 lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php
@@ -58,7 +58,7 @@
* Initializes a new FileDriver that looks in the given path(s) for mapping
* documents and operates in the specified operating mode.
*
- * @param string|array|FileLocator $paths A FileLocator or one/multiple paths where mapping documents can be found.
+ * @param string|array|FileLocator $locator A FileLocator or one/multiple paths where mapping documents can be found.
* @param string $fileExtension
*/
public function __construct($locator, $fileExtension = null)
@@ -70,11 +70,21 @@ public function __construct($locator, $fileExtension = null)
}
}
+ /**
+ * Set global basename
+ *
+ * @param string $file
+ */
public function setGlobalBasename($file)
{
$this->globalBasename = $file;
}
+ /**
+ * Retrieve global basename
+ *
+ * @return string
+ */
public function getGlobalBasename()
{
return $this->globalBasename;
@@ -84,8 +94,10 @@ public function getGlobalBasename()
* Get the element of schema meta data for the class from the mapping file.
* This will lazily load the mapping file if it is not loaded yet
*
- * @return array $element The element of schema meta data
+ * @param string $className
+ *
* @throws MappingException
+ * @return array The element of schema meta data
*/
public function getElement($className)
{
View
4 lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php
@@ -22,7 +22,7 @@
/**
* Locate the file that contains the metadata information for a given class name.
*
- * This behavior is inpependent of the actual content of the file. It just detects
+ * This behavior is independent of the actual content of the file. It just detects
* the file which is responsible for the given class name.
*
* @author Benjamin Eberlei <kontakt@beberlei.de>
@@ -49,6 +49,8 @@ function getAllClassNames($globalBasename);
/**
* Check if a file can be found for this class name.
*
+ * @param string $className
+ *
* @return bool
*/
function fileExists($className);
View
6 lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php
@@ -43,7 +43,7 @@ class MappingDriverChain implements MappingDriver
/**
* Add a nested driver.
*
- * @param Driver $nestedDriver
+ * @param MappingDriver $nestedDriver
* @param string $namespace
*/
public function addDriver(MappingDriver $nestedDriver, $namespace)
@@ -65,7 +65,9 @@ public function getDrivers()
* Loads the metadata for the specified class into the provided container.
*
* @param string $className
- * @param ClassMetadataInfo $metadata
+ * @param ClassMetadata $metadata
+ *
+ * @throws MappingException
*/
public function loadMetadataForClass($className, ClassMetadata $metadata)
{
View
10 lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php
@@ -50,11 +50,21 @@ class StaticPHPDriver implements MappingDriver
*/
private $classNames;
+ /**
+ * Constructor
+ *
+ * @param array|string $paths
+ */
public function __construct($paths)
{
$this->addPaths((array) $paths);
}
+ /**
+ * Add paths
+ *
+ * @param array $paths
+ */
public function addPaths(array $paths)
{
$this->paths = array_unique(array_merge($this->paths, $paths));
View
16 lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php
@@ -53,18 +53,34 @@ class SymfonyFileLocator implements FileLocator
*/
protected $fileExtension;
+ /**
+ * Constructor
+ *
+ * @param array $prefixes
+ * @param string|null $fileExtension
+ */
public function __construct(array $prefixes, $fileExtension = null)
{
$this->addNamespacePrefixes($prefixes);
$this->fileExtension = $fileExtension;
}
+ /**
+ * Add Namespace Prefixes
+ *
+ * @param array $prefixes
+ */
public function addNamespacePrefixes(array $prefixes)
{
$this->prefixes = array_merge($this->prefixes, $prefixes);
$this->paths = array_merge($this->paths, array_keys($prefixes));
}
+ /**
+ * Get Namespace Prefixes
+ *
+ * @return array
+ */
public function getNamespacePrefixes()
{
return $this->prefixes;
View
24 lib/Doctrine/Common/Persistence/Mapping/MappingException.php
@@ -26,18 +26,32 @@
*/
class MappingException extends \Exception
{
+ /**
+ *
+ * @param string $className
+ * @param array $namespaces
+ *
+ * @return MappingException
+ */
public static function classNotFoundInNamespaces($className, $namespaces)
{
return new self("The class '" . $className . "' was not found in the ".
"chain configured namespaces " . implode(", ", $namespaces));
}
+ /**
+ * @return MappingException
+ */
public static function pathRequired()
{
return new self("Specifying the paths to your entities is required ".
"in the AnnotationDriver to retrieve all class names.");
}
+ /**
+ * @param string|null $path
+ * @return MappingException
+ */
public static function fileMappingDriversRequireConfiguredDirectoryPath($path = null)
{
if ( ! empty($path)) {
@@ -50,11 +64,21 @@ public static function fileMappingDriversRequireConfiguredDirectoryPath($path =
);
}
+ /**
+ * @param string $entityName
+ * @param string $fileName
+ * @return MappingException
+ */
public static function mappingFileNotFound($entityName, $fileName)
{
return new self("No mapping file found named '$fileName' for class '$entityName'.");
}
+ /**
+ * @param string $entityName
+ * @param string $fileName
+ * @return MappingException
+ */
public static function invalidMappingFile($entityName, $fileName)
{
return new self("Invalid mapping file '$fileName' for class '$entityName'.");
View
4 lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php
@@ -55,7 +55,7 @@ function getClassNamespace($class);
* Return a reflection class instance or null
*
* @param string $class
- * @return ReflectionClass|null
+ * @return \ReflectionClass|null
*/
function getClass($class);
@@ -64,7 +64,7 @@ function getClass($class);
*
* @param string $class
* @param string $property
- * @return ReflectionProperty|null
+ * @return \ReflectionProperty|null
*/
function getAccessibleProperty($class, $property);
View
4 lib/Doctrine/Common/Persistence/ObjectManager.php
@@ -70,7 +70,7 @@ function remove($object);
* @param object $object
*/
function merge($object);
-
+
/**
* Clears the ObjectManager. All objects that are currently managed
* by this ObjectManager become detached.
@@ -127,7 +127,7 @@ function getClassMetadata($className);
/**
* Gets the metadata factory used to gather the metadata of classes.
*
- * @return Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
+ * @return \Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
*/
function getMetadataFactory();
View
4 lib/Doctrine/Common/Persistence/ObjectRepository.php
@@ -33,7 +33,7 @@
/**
* Finds an object by its primary key / identifier.
*
- * @param $id The identifier.
+ * @param int $id The identifier.
* @return object The object.
*/
function find($id);
@@ -52,7 +52,7 @@ function findAll();
* an UnexpectedValueException if certain values of the sorting or limiting details are
* not supported.
*
- * @throws UnexpectedValueException
+ * @throws \UnexpectedValueException
* @param array $criteria
* @param array|null $orderBy
* @param int|null $limit
View
21 lib/Doctrine/Common/Persistence/PersistentObject.php
@@ -90,6 +90,8 @@ static public function getObjectManager()
*
* @param ObjectManager $objectManager
* @param ClassMetadata $classMetadata
+ *
+ * @throws \RuntimeException
*/
public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata)
{
@@ -104,10 +106,11 @@ public function injectObjectManager(ObjectManager $objectManager, ClassMetadata
/**
* Sets a persistent fields value.
*
- * @throws InvalidArgumentException - When the wrong target object type is passed to an association
- * @throws BadMethodCallException - When no persistent field exists by that name.
* @param string $field
* @param array $args
+ *
+ * @throws \BadMethodCallException - When no persistent field exists by that name.
+ * @throws \InvalidArgumentException - When the wrong target object type is passed to an association
* @return void
*/
private function set($field, $args)
@@ -131,8 +134,10 @@ private function set($field, $args)
/**
* Get persistent field value.
*
- * @throws BadMethodCallException - When no persistent field exists by that name.
+ *
* @param string $field
+ *
+ * @throws \BadMethodCallException - When no persistent field exists by that name.
* @return mixed
*/
private function get($field)
@@ -169,8 +174,11 @@ private function completeOwningSide($field, $targetClass, $targetObject)
/**
* Add an object to a collection
*
- * @param type $field
- * @param assoc $args
+ * @param string $field
+ * @param array $args
+ *
+ * @throws \BadMethodCallException
+ * @throws \InvalidArgumentException
*/
private function add($field, $args)
{
@@ -194,6 +202,7 @@ private function add($field, $args)
/**
* Initialize Doctrine Metadata for this class.
*
+ * @throws \RuntimeException
* @return void
*/
private function initializeDoctrine()
@@ -214,6 +223,8 @@ private function initializeDoctrine()
*
* @param string $method
* @param array $args
+ *
+ * @throws \BadMethodCallException
* @return mixed
*/
public function __call($method, $args)
View
4 lib/Doctrine/Common/Util/ClassUtils.php
@@ -71,7 +71,7 @@ public static function getParentClass($className)
* Create a new reflection class
*
* @param string
- * @return ReflectionClass
+ * @return \ReflectionClass
*/
public static function newReflectionClass($class)
{
@@ -82,7 +82,7 @@ public static function newReflectionClass($class)
* Create a new reflection object
*
* @param object
- * @return ReflectionObject
+ * @return \ReflectionObject
*/
public static function newReflectionObject($object)
{
View
14 lib/Doctrine/Common/Util/Debug.php
@@ -41,7 +41,6 @@ private function __construct() {}
/**
* Prints a dump of the public, protected and private properties of $var.
*
- * @static
* @link http://xdebug.org/
* @param mixed $var
* @param integer $maxDepth Maximum nesting level for object properties
@@ -67,6 +66,13 @@ public static function dump($var, $maxDepth = 2, $stripTags = true)
ini_set('html_errors', 'Off');
}
+ /**
+ * Export
+ *
+ * @param mixed $var
+ * @param int $maxDepth
+ * @return mixed
+ */
public static function export($var, $maxDepth)
{
$return = null;
@@ -116,6 +122,12 @@ public static function export($var, $maxDepth)
return $return;
}
+ /**
+ * Convert to string
+ *
+ * @param object $obj
+ * @return string
+ */
public static function toString($obj)
{
return method_exists('__toString', $obj) ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj);
Please sign in to comment.
Something went wrong with that request. Please try again.