SentenceExample::demonstrate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
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();