Passed
Push — master ( 2d423f...904272 )
by Andreas
03:29
created
api/midgard/query/builder.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@  discard block
 block discarded – undo
19 19
         }
20 20
     }
21 21
 
22
+    /**
23
+     * @param string $operator
24
+     */
22 25
     public function add_constraint($name, $operator, $value)
23 26
     {
24 27
         try {
@@ -40,7 +43,7 @@  discard block
 block discarded – undo
40 43
     }
41 44
 
42 45
     /**
43
-     * @return midgard\portable\api\mgdobject[]
46
+     * @return Generator
44 47
      */
45 48
     public function iterate()
46 49
     {
Please login to merge, or discard this patch.
src/api/mgdobject.php 2 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -509,6 +509,7 @@  discard block
 block discarded – undo
509 509
     }
510 510
 
511 511
     /**
512
+     * @param integer $up
512 513
      * @return QueryBuilder
513 514
      */
514 515
     protected function get_uniquefield_query($classname, $field, $part, $upfield, $up)
@@ -610,7 +611,7 @@  discard block
 block discarded – undo
610 611
     /**
611 612
      * @param string $domain
612 613
      * @param string $name
613
-     * @param mixed $value
614
+     * @param string $value
614 615
      * @return boolean
615 616
      */
616 617
     public function set_parameter($domain, $name, $value)
@@ -816,6 +817,9 @@  discard block
 block discarded – undo
816 817
         return new \midgard_reflection_property(get_called_class());
817 818
     }
818 819
 
820
+    /**
821
+     * @param string $guid
822
+     */
819 823
     public function set_guid($guid)
820 824
     {
821 825
         parent::__set('guid', $guid);
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
     public function __get($field)
82 82
     {
83
-        if (   $field === 'metadata'
83
+        if ($field === 'metadata'
84 84
             && $this->metadata === null
85 85
             && $this instanceof metadata_interface) {
86 86
             $this->metadata = new metadata($this);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         foreach ($candidates as $candidate) {
103 103
             if ($this->$candidate !== null) {
104 104
                 //Proxies become stale if the object itself is detached, so we have to re-fetch
105
-                if (   $this->$candidate instanceof Proxy
105
+                if ($this->$candidate instanceof Proxy
106 106
                     && $this->$candidate->__isInitialized()) {
107 107
                     try {
108 108
                         $this->$candidate->get_by_id($this->$candidate->id);
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         }
131 131
         // According to Doctrine documentation, proxies should be transparent, but in practice,
132 132
         // there will be problems if we don't force-load
133
-        if (   $entity instanceof Proxy
133
+        if ($entity instanceof Proxy
134 134
             && !$entity->__isInitialized()) {
135 135
             try {
136 136
                 $entity->__load();
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             exception::duplicate();
184 184
             return false;
185 185
         }
186
-        if (   !$this->is_unique()
186
+        if (!$this->is_unique()
187 187
             || !$this->check_parent()) {
188 188
             return false;
189 189
         }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             midgard_connection::get_instance()->set_error(MGD_ERR_INVALID_PROPERTY_VALUE);
240 240
             return false;
241 241
         }
242
-        if (   $check_dependencies
242
+        if ($check_dependencies
243 243
             && $this->has_dependents()) {
244 244
             exception::has_dependants();
245 245
             return false;
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
     {
331 331
         $this->initialize();
332 332
 
333
-        if (   empty($this->cm->midgard['parentfield'])
333
+        if (empty($this->cm->midgard['parentfield'])
334 334
             || empty($this->cm->midgard['parent'])) {
335 335
             return true;
336 336
         }
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
         $this->initialize();
348 348
 
349 349
         foreach ($this->cm->fieldMappings as $name => $field) {
350
-            if (   $field['midgard:midgard_type'] == translator::TYPE_GUID
350
+            if ($field['midgard:midgard_type'] == translator::TYPE_GUID
351 351
                 && !empty($this->$name)
352 352
                 && !mgd_is_guid($this->$name)) {
353 353
                 exception::invalid_property_value("'" . $name . "' property's value is not a guid.");
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
             $stat = ($results > 0);
384 384
         }
385 385
 
386
-        if (   !$stat
386
+        if (!$stat
387 387
             && !empty($this->cm->midgard['childtypes'])) {
388 388
             foreach ($this->cm->midgard['childtypes'] as $typename => $parentfield) {
389 389
                 $qb = connection::get_em()->createQueryBuilder();
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
             exception::not_exists();
743 743
             return false;
744 744
         }
745
-        if (   $check_dependencies
745
+        if ($check_dependencies
746 746
             && $this->has_dependents()) {
747 747
             exception::has_dependants();
748 748
             return false;
Please login to merge, or discard this patch.