Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | #!/bin/php |
||
20 | function demonstrate() |
||
|
|||
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 | } |
||
33 | $example->demonstrate(); |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.