Code Duplication    Length = 14-16 lines in 5 locations

source/DocumentationGenerator.php 4 locations

@@ 283-298 (lines=16) @@
280
        }
281
    }
282
283
    private function generateComments()
284
    {
285
        $comments = $this->getGeneratorProperty('comments');
286
287
        if (is_array($comments)) {
288
            if ($this->addEmptyLine) {
289
                $this->addContent(' *');
290
                $this->addEmptyLine = false;
291
            }
292
293
            foreach ($comments as $comment) {
294
                $line = $this->getLineGenerator(' * ' . $comment);
295
                $this->addContent($line);
296
            }
297
        }
298
    }
299
300
    private function generateParameters()
301
    {
@@ 346-361 (lines=16) @@
343
        }
344
    }
345
346
    private function generateSees()
347
    {
348
        $sees = $this->getGeneratorProperty('sees');
349
350
        if (is_array($sees)) {
351
            if ($this->addEmptyLine) {
352
                $this->addContent(' *');
353
                $this->addEmptyLine = false;
354
            }
355
356
            foreach ($sees as $see) {
357
                $line = $this->getLineGenerator(' * @see ' . $see);
358
                $this->addContent($line);
359
            }
360
        }
361
    }
362
363
    private function generateThrows()
364
    {
@@ 363-376 (lines=14) @@
360
        }
361
    }
362
363
    private function generateThrows()
364
    {
365
        $throws = $this->getGeneratorProperty('throws');
366
367
        if (is_array($throws)) {
368
            if ($this->addEmptyLine) {
369
                $this->addContent(' *');
370
                $this->addEmptyLine = false;
371
            }
372
373
            $line = $this->getLineGenerator(' * @throws ' . implode('|', $throws));
374
            $this->addContent($line);
375
        }
376
    }
377
378
    private function generateToDoS()
379
    {
@@ 378-393 (lines=16) @@
375
        }
376
    }
377
378
    private function generateToDoS()
379
    {
380
        $todos = $this->getGeneratorProperty('todos');
381
382
        if (is_array($todos)) {
383
            if ($this->addEmptyLine) {
384
                $this->addContent(' *');
385
                $this->addEmptyLine = false;
386
            }
387
388
            foreach ($todos as $todo) {
389
                $line = $this->getLineGenerator(' * @todo ' . $todo);
390
                $this->addContent($line);
391
            }
392
        }
393
    }
394
395
    private function generateVariable()
396
    {

source/FileGenerator.php 1 location

@@ 223-238 (lines=16) @@
220
    /**
221
     * @param null|array $collection
222
     */
223
    private function addContentFromCollectionTwo($collection)
224
    {
225
        if (is_array($collection)) {
226
            if ($this->addEmptyLine) {
227
                $this->addContent('');
228
            }
229
            $lastKey = $this->getLastArrayKey($collection);
230
            foreach($collection as $key => $item) {
231
                $this->addGeneratorAsContent($item);
232
                if ($key !== $lastKey) {
233
                    $this->addContent('');
234
                }
235
            }
236
        }
237
        $this->addEmptyLine = true;
238
    }
239
}
240