Browse Source

Merge pull request #13449 from o0h/fix-php-doc-findorcreate

Add @throws tag to Table::findOrCreate
Mark Story 6 years ago
parent
commit
30873b1721
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/ORM/Table.php

+ 2 - 0
src/ORM/Table.php

@@ -1687,6 +1687,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
      *   is persisted.
      * @param array $options The options to use when saving.
      * @return \Cake\Datasource\EntityInterface An entity.
+     * @throws \Cake\ORM\Exception\PersistenceFailedException When the entity couldn't be saved
      */
     public function findOrCreate($search, callable $callback = null, $options = [])
     {
@@ -1716,6 +1717,7 @@ class Table implements RepositoryInterface, EventListenerInterface, EventDispatc
      *   is persisted.
      * @param array $options The options to use when saving.
      * @return \Cake\Datasource\EntityInterface An entity.
+     * @throws \Cake\ORM\Exception\PersistenceFailedException When the entity couldn't be saved
      */
     protected function _processFindOrCreate($search, callable $callback = null, $options = [])
     {