SentenceExample   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A demonstrate() 0 10 1
1
#!/bin/php
2
<?php
3
/**
4
 * @author stev leibelt <[email protected]>
5
 * @since 2014-05-23 
6
 */
7
8
require_once 'AbstractExample.php';
9
require_once __DIR__ . '/../vendor/autoload.php';
10
11
/**
12
 * Class SentenceExample
13
 * @package Net\Bazzline\Component\CodeGenerator\Example
14
 */
15
class SentenceExample extends AbstractExample
16
{
17
    /**
18
     * @return mixed
19
     */
20
    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...
21
    {
22
        $lineFactory = $this->getLineGeneratorFactory();
23
        $line = $lineFactory->create();
24
        $line->setSeparator(', ');
25
26
        $line->add('first three words');
27
        $line->add('followed by more words');
28
        echo $line->generate() . PHP_EOL;
29
    }
30
}
31
32
$example = new SentenceExample();
33
$example->demonstrate();