| Conditions | 1 |
| Paths | 1 |
| Total Lines | 40 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace norsys\score\php\method\converter\toString; |
||
| 16 | function recipientOfPhpMethodAsStringIs(method $method, recipient $recipient) :void |
||
|
|
|||
| 17 | { |
||
| 18 | ( |
||
| 19 | new trampoline\container\fifo( |
||
| 20 | new trampoline\functor( |
||
| 21 | function($block) use ($method) |
||
| 22 | { |
||
| 23 | $method |
||
| 24 | ->recipientOfPhpClassNameFromToStringConverterIs( |
||
| 25 | new aClass\name\converter\toString\fqcn, |
||
| 26 | new recipient\block($block) |
||
| 27 | ) |
||
| 28 | ; |
||
| 29 | } |
||
| 30 | ), |
||
| 31 | new trampoline\functor( |
||
| 32 | function($block) use ($method) |
||
| 33 | { |
||
| 34 | $method |
||
| 35 | ->recipientOfPhpMethodNameFromToStringConverterIs( |
||
| 36 | new method\name\converter\toString\raw, |
||
| 37 | new recipient\block($block) |
||
| 38 | ) |
||
| 39 | ; |
||
| 40 | } |
||
| 41 | ) |
||
| 42 | ) |
||
| 43 | ) |
||
| 44 | ->argumentsForBlockAre( |
||
| 45 | new block\functor( |
||
| 46 | function($fqcn, $method) use ($recipient) |
||
| 47 | { |
||
| 48 | ( |
||
| 49 | new recipient\surround( |
||
| 50 | $fqcn, |
||
| 51 | $method, |
||
| 52 | $recipient |
||
| 53 | ) |
||
| 54 | ) |
||
| 55 | ->stringIs('::') |
||
| 56 | ; |
||
| 63 |
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.