ParagraphExample::demonstrate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.9
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @author stev leibelt <[email protected]>
4
 * @since 2014-05-24 
5
 */
6
7
require_once 'AbstractExample.php';
8
require_once __DIR__ . '/../vendor/autoload.php';
9
10
/**
11
 * Class ParagraphExample
12
 * @package Net\Bazzline\Component\CodeGenerator\Example
13
 */
14
class ParagraphExample extends AbstractExample
15
{
16
    /**
17
     * @return string
18
     */
19
    function demonstrate()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
20
    {
21
        $blockFactory = $this->getBlockGeneratorFactory();
22
        $block = $blockFactory->create();
23
24
        $block->add('first line');
25
        $block->add('second line');
26
        $block->add('last line');
27
28
        echo $block->generate() . PHP_EOL;
29
    }
30
}
31
32
$example = new ParagraphExample();
33
$example->demonstrate();