Jelajahi Sumber

Added missing throws annotations (#4654)

Christian Gripp 7 tahun lalu
induk
melakukan
fb15e0e9e2
1 mengubah file dengan 8 tambahan dan 3 penghapusan
  1. 8 3
      Model/ModelManagerInterface.php

+ 8 - 3
Model/ModelManagerInterface.php

@@ -14,6 +14,7 @@ namespace Sonata\AdminBundle\Model;
 use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
 use Sonata\AdminBundle\Datagrid\DatagridInterface;
 use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
+use Sonata\AdminBundle\Exception\ModelManagerException;
 
 /**
  * A model manager is a bridge between the model classes and the admin
@@ -35,19 +36,21 @@ interface ModelManagerInterface
     /**
      * @param mixed $object
      *
-     * @return mixed
+     * @throws ModelManagerException
      */
     public function create($object);
 
     /**
      * @param mixed $object
      *
-     * @return mixed
+     * @throws ModelManagerException
      */
     public function update($object);
 
     /**
-     * @param object $object
+     * @param mixed $object
+     *
+     * @throws ModelManagerException
      */
     public function delete($object);
 
@@ -78,6 +81,8 @@ interface ModelManagerInterface
     /**
      * @param string              $class
      * @param ProxyQueryInterface $queryProxy
+     *
+     * @throws ModelManagerException
      */
     public function batchDelete($class, ProxyQueryInterface $queryProxy);