| Conditions | 2 |
| Paths | 2 |
| Total Lines | 28 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | final public static function getAnnotation($object) |
||
| 23 | { |
||
| 24 | $funReflec = new FuncoesReflections(); |
||
| 25 | |||
| 26 | $output = array(); |
||
| 27 | |||
| 28 | $pattern = '/@+_+[A-z]\w+=\w+/'; |
||
| 29 | |||
| 30 | $fullComments = $funReflec->retornaComentariosAtributos($object); |
||
| 31 | $attribuites = $funReflec->pegaAtributosDoObjeto($object); |
||
| 32 | |||
| 33 | $annotationsList = []; |
||
| 34 | |||
| 35 | $limit = count($attribuites); |
||
| 36 | $iterator = 0; |
||
| 37 | for ($iterator; $iterator < $limit; $iterator++) { |
||
| 38 | |||
| 39 | preg_match_all( |
||
| 40 | $pattern, |
||
| 41 | $fullComments[$attribuites[$iterator]], |
||
| 42 | $output |
||
| 43 | ); |
||
| 44 | |||
| 45 | $annotationsList[ $attribuites[$iterator] ] = $output[0]; |
||
| 46 | } |
||
| 47 | |||
| 48 | return $annotationsList; |
||
| 49 | } |
||
| 50 | } |
||
| 51 |