ParagraphExample   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A demonstrate() 0 11 1
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();