Passed
Push — master ( d35d1c...c70304 )
by Andreas
03:50
created
src/api/blob.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -31,6 +31,9 @@
 block discarded – undo
31 31
         return null;
32 32
     }
33 33
 
34
+    /**
35
+     * @param string $content
36
+     */
34 37
     public function write_content($content)
35 38
     {
36 39
         return file_put_contents($this->get_path(), $content) !== false;
Please login to merge, or discard this patch.
api/midgard/collector.php 1 patch
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -25,6 +25,10 @@
 block discarded – undo
25 25
 
26 26
     private $value_properties = array();
27 27
 
28
+    /**
29
+     * @param string $class
30
+     * @param string $field
31
+     */
28 32
     public function __construct($class, $field, $value)
29 33
     {
30 34
         parent::__construct($class);
Please login to merge, or discard this patch.
src/api/object.php 1 patch
Doc Comments   +11 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,6 +117,9 @@  discard block
 block discarded – undo
117 117
         return null;
118 118
     }
119 119
 
120
+    /**
121
+     * @param integer $id
122
+     */
120 123
     public function get_by_id($id)
121 124
     {
122 125
         $entity = connection::get_em()->find(get_class($this), $id);
@@ -150,6 +153,9 @@  discard block
 block discarded – undo
150 153
         return true;
151 154
     }
152 155
 
156
+    /**
157
+     * @param string $guid
158
+     */
153 159
     public function get_by_guid($guid)
154 160
     {
155 161
         if (!mgd_is_guid($guid)) {
@@ -492,6 +498,7 @@  discard block
 block discarded – undo
492 498
     }
493 499
 
494 500
     /**
501
+     * @param integer $up
495 502
      * @return QueryBuilder
496 503
      */
497 504
     protected function get_uniquefield_query($classname, $field, $part, $upfield, $up)
@@ -593,7 +600,7 @@  discard block
 block discarded – undo
593 600
     /**
594 601
      * @param string $domain
595 602
      * @param string $name
596
-     * @param mixed $value
603
+     * @param string $value
597 604
      * @return boolean
598 605
      */
599 606
     public function set_parameter($domain, $name, $value)
@@ -799,6 +806,9 @@  discard block
 block discarded – undo
799 806
         return new \midgard_reflection_property(get_called_class());
800 807
     }
801 808
 
809
+    /**
810
+     * @param string $guid
811
+     */
802 812
     public function set_guid($guid)
803 813
     {
804 814
         parent::__set('guid', $guid);
Please login to merge, or discard this patch.
api/midgard/storage.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@  discard block
 block discarded – undo
56 56
         return true;
57 57
     }
58 58
 
59
+    /**
60
+     * @param string $classname
61
+     */
59 62
     public static function create_class_storage($classname)
60 63
     {
61 64
         $em = connection::get_em();
@@ -87,6 +90,11 @@  discard block
 block discarded – undo
87 90
         $generator->generateProxyClass($cm, $filename);
88 91
     }
89 92
 
93
+    /**
94
+     * @param Doctrine\ORM\EntityManager $em
95
+     *
96
+     * @return ClassMetadata
97
+     */
90 98
     private static function get_cm($em, $classname)
91 99
     {
92 100
         if (!class_exists($classname)) {
Please login to merge, or discard this patch.
api/midgard/connection.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -29,6 +29,9 @@
 block discarded – undo
29 29
 
30 30
     private $replication_enabled = true;
31 31
 
32
+    /**
33
+     * @return integer
34
+     */
32 35
     public static function get_instance()
33 36
     {
34 37
         if (self::$instance === null) {
Please login to merge, or discard this patch.
api/midgard/object/class.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -96,6 +96,9 @@
 block discarded – undo
96 96
         return true;
97 97
     }
98 98
 
99
+    /**
100
+     * @param string $guid
101
+     */
99 102
     public static function get_object_by_guid($guid)
100 103
     {
101 104
         if (!mgd_is_guid($guid)) {
Please login to merge, or discard this patch.
api/midgard/query/builder.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -19,6 +19,9 @@
 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 {
Please login to merge, or discard this patch.
api/midgard/replicator.php 1 patch
Doc Comments   +11 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     }
241 241
 
242 242
     /**
243
-     * @return boolean Indicating success
243
+     * @return boolean|null Indicating success
244 244
      */
245 245
     public static function import_from_xml($xml, $force = false)
246 246
     {
@@ -264,6 +264,9 @@  discard block
 block discarded – undo
264 264
         $blob->write_content($blob->content);
265 265
     }
266 266
 
267
+    /**
268
+     * @return string|null
269
+     */
267 270
     private static function resolve_link_id(ClassMetadata $cm, dbobject $object, $name)
268 271
     {
269 272
         if ($object->$name == 0) {
@@ -339,7 +342,7 @@  discard block
 block discarded – undo
339 342
      *
340 343
      * @param SimpleXMLElement $node
341 344
      * @param boolean $force
342
-     * @return dbobject
345
+     * @return blob
343 346
      */
344 347
     private static function blob_from_xml(SimpleXMLElement $node, $force)
345 348
     {
@@ -350,6 +353,9 @@  discard block
 block discarded – undo
350 353
         return $blob;
351 354
     }
352 355
 
356
+    /**
357
+     * @param string $guid
358
+     */
353 359
     private static function get_object_action($guid)
354 360
     {
355 361
         $result = connection::get_em()
@@ -376,6 +382,9 @@  discard block
 block discarded – undo
376 382
         }
377 383
     }
378 384
 
385
+    /**
386
+     * @return string|null
387
+     */
379 388
     private static function convert_value($value)
380 389
     {
381 390
         if ($value instanceof midgard_datetime) {
Please login to merge, or discard this patch.
src/api/config.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -30,6 +30,9 @@  discard block
 block discarded – undo
30 30
     public $cachedir = '/var/cache/midgard2';
31 31
     public $gdathreads = false;
32 32
 
33
+    /**
34
+     * @param string $path
35
+     */
33 36
     public function read_file_at_path($path)
34 37
     {
35 38
         if (   !file_exists($path)
@@ -122,6 +125,9 @@  discard block
 block discarded – undo
122 125
         return true;
123 126
     }
124 127
 
128
+    /**
129
+     * @param string $key
130
+     */
125 131
     private function convert_to_storage($key, $value)
126 132
     {
127 133
         if (is_bool($value)) {
Please login to merge, or discard this patch.