Completed
Branch feature/pre-split (899df2)
by Anton
03:08
created
source/Spiral/ODM/Entities/DocumentSource.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      *
95 95
      * @param string|\MongoId $id Primary key value.
96 96
      *
97
-     * @return CompositableInterface|Document|null
97
+     * @return CompositableInterface|null
98 98
      */
99 99
     public function findByPK($id)
100 100
     {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      * @param array $query  Fields and conditions to query by.
108 108
      * @param array $sortBy Always specify sort by to ensure that results are stable.
109 109
      *
110
-     * @return CompositableInterface|Document|null
110
+     * @return CompositableInterface|null
111 111
      */
112 112
     public function findOne(array $query = [], array $sortBy = [])
113 113
     {
Please login to merge, or discard this patch.
source/Spiral/ODM/Traits/SourceTrait.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,13 +93,15 @@
 block discarded – undo
93 93
         //Via global scope
94 94
         $container = self::staticContainer();
95 95
 
96
-        if (empty($container)) //Via global scope
96
+        if (empty($container)) {
97
+            //Via global scope
97 98
         {
98 99
             throw new ScopeException(sprintf(
99 100
                 "Unable to get '%s' source, no container scope is available",
100 101
                 static::class
101 102
             ));
102 103
         }
104
+        }
103 105
 
104 106
         return $container->get(ODM::class)->source(static::class);
105 107
     }
Please login to merge, or discard this patch.