Completed
Push — master ( 2d0f09...92bffa )
by max
02:45
created
src/FinderAggregateRepository.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     }
83 83
 
84 84
     /**
85
-     * @param mixed $criteria
85
+     * @param CriteriaInterface $criteria
86 86
      * @return EntityInterface|null
87 87
      */
88 88
     public function find($criteria)
@@ -223,6 +223,9 @@  discard block
 block discarded – undo
223 223
         return $this->find($criteria);
224 224
     }
225 225
 
226
+    /**
227
+     * @param integer $entityName
228
+     */
226 229
     private function getRelatedField($entityName)
227 230
     {
228 231
         if (!isset($this->relationsConfig[$entityName])) {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     public function findWith($entityName)
76 76
     {
77 77
         if (!isset($this->relatedRepository[$entityName])) {
78
-            throw new \RuntimeException(get_class($this) . ": related $entityName repository not exists");
78
+            throw new \RuntimeException(get_class($this).": related $entityName repository not exists");
79 79
         }
80 80
 
81 81
         $this->with[$entityName] = new ArrayObject();
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $relatedField = $this->getRelatedField($relatedEntityName);
108 108
 
109 109
             if (!isset($row[$relatedField])) {
110
-                throw new \RuntimeException(get_class($this) . ": relation field $relatedEntityName not fetched");
110
+                throw new \RuntimeException(get_class($this).": relation field $relatedEntityName not fetched");
111 111
             }
112 112
 
113 113
             if (!in_array($row[$relatedField], (array)$relatedEntityIds)) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                 $relatedField = $this->getRelatedField($relatedEntityName);
167 167
 
168 168
                 if (!isset($row[$relatedField])) {
169
-                    throw new \RuntimeException(get_class($this) . ": relation field $relatedEntityName not fetched");
169
+                    throw new \RuntimeException(get_class($this).": relation field $relatedEntityName not fetched");
170 170
                 }
171 171
 
172 172
                 if (!in_array($row[$relatedField], (array)$relatedEntityIds)) {
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     private function getRelatedField($entityName)
227 227
     {
228 228
         if (!isset($this->relationsConfig[$entityName])) {
229
-            throw new \RuntimeException(get_class($this) . ": relation $entityName not exists");
229
+            throw new \RuntimeException(get_class($this).": relation $entityName not exists");
230 230
         }
231 231
 
232 232
         list($table, $field) = explode('.', $this->relationsConfig[$entityName][0]);
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function add(EntityInterface $entity)
260 260
     {
261
-        throw new \RuntimeException(get_class($this) . ' cannot adding');
261
+        throw new \RuntimeException(get_class($this).' cannot adding');
262 262
     }
263 263
 
264 264
     /**
@@ -267,6 +267,6 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function remove(EntityInterface $entity)
269 269
     {
270
-        throw new \RuntimeException(get_class($this) . ' cannot removing');
270
+        throw new \RuntimeException(get_class($this).' cannot removing');
271 271
     }
272 272
 }
273 273
\ No newline at end of file
Please login to merge, or discard this patch.