Completed
Push — master ( 084747...24da9e )
by Josh
03:36
created
lib/Caxy/HtmlDiff/AbstractDiff.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -147,6 +147,10 @@  discard block
 block discarded – undo
147 147
         return "</".$tag.">";
148 148
     }
149 149
 
150
+    /**
151
+     * @param string $str
152
+     * @param string $start
153
+     */
150 154
     protected function getStringBetween($str, $start, $end)
151 155
     {
152 156
         $expStr = explode( $start, $str, 2 );
@@ -162,6 +166,9 @@  discard block
 block discarded – undo
162 166
         return '';
163 167
     }
164 168
 
169
+    /**
170
+     * @param string $html
171
+     */
165 172
     protected function purifyHtml($html, $tags = null)
166 173
     {
167 174
         if ( class_exists( 'Tidy' ) && false ) {
Please login to merge, or discard this patch.
lib/Caxy/HtmlDiff/HtmlDiff.php 1 patch
Doc Comments   +29 added lines patch added patch discarded remove patch
@@ -157,6 +157,9 @@  discard block
 block discarded – undo
157 157
         $this->processInsertOperation( $operation, "diffmod" );
158 158
     }
159 159
 
160
+    /**
161
+     * @param string $cssClass
162
+     */
160 163
     protected function processInsertOperation($operation, $cssClass)
161 164
     {
162 165
         $text = array();
@@ -174,6 +177,9 @@  discard block
 block discarded – undo
174 177
         $this->insertTag( "ins", $cssClass, $text );
175 178
     }
176 179
 
180
+    /**
181
+     * @param string $cssClass
182
+     */
177 183
     protected function processDeleteOperation($operation, $cssClass)
178 184
     {
179 185
         $text = array();
@@ -191,6 +197,10 @@  discard block
 block discarded – undo
191 197
         $this->insertTag( "del", $cssClass, $text );
192 198
     }
193 199
 
200
+    /**
201
+     * @param string $oldText
202
+     * @param string $newText
203
+     */
194 204
     protected function diffElements($oldText, $newText, $stripWrappingTags = true)
195 205
     {
196 206
         $wrapStart = '';
@@ -213,6 +223,10 @@  discard block
 block discarded – undo
213 223
         return $wrapStart . $diff->build() . $wrapEnd;
214 224
     }
215 225
 
226
+    /**
227
+     * @param string $oldText
228
+     * @param string $newText
229
+     */
216 230
     protected function diffList($oldText, $newText)
217 231
     {
218 232
         $diff = new ListDiff($oldText, $newText, $this->encoding, $this->specialCaseTags, $this->groupDiffs);
@@ -263,6 +277,9 @@  discard block
 block discarded – undo
263 277
         return $this->oldIsolatedDiffTags[$operation->startInOld + $offset];
264 278
     }
265 279
 
280
+    /**
281
+     * @param string $tag
282
+     */
266 283
     protected function insertTag($tag, $cssClass, &$words)
267 284
     {
268 285
         while (true) {
@@ -324,11 +341,17 @@  discard block
 block discarded – undo
324 341
         return $condition == 'tag' ? $this->isTag( $word ) : !$this->isTag( $word );
325 342
     }
326 343
 
344
+    /**
345
+     * @param string $text
346
+     */
327 347
     protected function wrapText($text, $tagName, $cssClass)
328 348
     {
329 349
         return sprintf( '<%1$s class="%2$s">%3$s</%1$s>', $tagName, $cssClass, $text );
330 350
     }
331 351
 
352
+    /**
353
+     * @param string $condition
354
+     */
332 355
     protected function extractConsecutiveWords(&$words, $condition)
333 356
     {
334 357
         $indexOfFirstTag = null;
@@ -420,6 +443,12 @@  discard block
 block discarded – undo
420 443
         return $matchingBlocks;
421 444
     }
422 445
 
446
+    /**
447
+     * @param integer $startInOld
448
+     * @param integer $endInOld
449
+     * @param integer $startInNew
450
+     * @param integer $endInNew
451
+     */
423 452
     protected function findMatchingBlocks($startInOld, $endInOld, $startInNew, $endInNew, &$matchingBlocks)
424 453
     {
425 454
         $match = $this->findMatch( $startInOld, $endInOld, $startInNew, $endInNew );
Please login to merge, or discard this patch.
lib/Caxy/HtmlDiff/ListDiff.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -505,6 +505,7 @@  discard block
 block discarded – undo
505 505
      * @param string $oldList
506 506
      * @param array $match
507 507
      * @param array $index
508
+     * @param string $type
508 509
      * @return string
509 510
      */
510 511
     protected function addListElementToContent($newList, $oldList, array $match, array $index, $type)
@@ -588,7 +589,7 @@  discard block
 block discarded – undo
588 589
     /**
589 590
      * Converts the list (li) content arrays to string.
590 591
      *
591
-     * @param array $listContentArray
592
+     * @param string $listContentArray
592 593
      * @return string
593 594
      */
594 595
     protected function convertListContentArrayToString($listContentArray)
Please login to merge, or discard this patch.
lib/Caxy/HtmlDiff/Match.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -8,6 +8,9 @@
 block discarded – undo
8 8
     public $startInNew;
9 9
     public $size;
10 10
 
11
+    /**
12
+     * @param integer $size
13
+     */
11 14
     public function __construct($startInOld, $startInNew, $size)
12 15
     {
13 16
         $this->startInOld = $startInOld;
Please login to merge, or discard this patch.