浏览代码

Fix Sortable Annotation Driver

Lukas Botsch 14 年之前
父节点
当前提交
739359e065
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lib/Gedmo/Sortable/Mapping/Driver/Annotation.php

+ 4 - 2
lib/Gedmo/Sortable/Mapping/Driver/Annotation.php

@@ -5,6 +5,8 @@ namespace Gedmo\Sortable\Mapping\Driver;
 use Gedmo\Mapping\Driver\AnnotationDriverInterface,
     Gedmo\Exception\InvalidMappingException;
 
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+
 /**
  * This is an annotation mapping driver for Sortable
  * behavioral extension. Used for extraction of extended
@@ -63,7 +65,7 @@ class Annotation implements AnnotationDriverInterface
     /**
      * {@inheritDoc}
      */
-    public function validateFullMetadata($meta, array $config)
+    public function validateFullMetadata(ClassMetadata $meta, array $config)
     {
         if ($config && !isset($config['position'])) {
             throw new InvalidMappingException("Missing property: 'position' in class - {$meta->name}");
@@ -73,7 +75,7 @@ class Annotation implements AnnotationDriverInterface
     /**
      * {@inheritDoc}
      */
-    public function readExtendedMetadata($meta, array &$config) {
+    public function readExtendedMetadata(ClassMetadata $meta, array &$config) {
         $class = $meta->getReflectionClass();
         
         // property annotations