Closed garex closed 4 years ago
@garex I think it is impossible to detect dead-code with this tool or I don't know how to do it right now. I know about phan, it uses ast
extension to work with PHP native structures. With this library you could access AST information and analyze it somehow to detect dead-code. But it is very complex task...
Ok, I see now what you want. In theory, this should be doable, but in practice there will be a lot of pain to do that. Therefore I can start with method hooks. Because current implementation can only replace existing method or function with closure. And AOP requires an ability to call original code (but how?).
I dunno ))
Alexander Ustimenko +7 (952) 918-02-20
ср, 12 февр. 2020 г. в 17:21, Alexander Lisachenko <notifications@github.com
:
Ok, I see now what you want. In theory, this should be doable, but in practice there will be a lot of pain to do that. Therefore I can start with method hooks. Because current implementation can only replace existing method or function with closure. And AOP requires an ability to call original code (but how?).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lisachenko/z-engine/issues/35?email_source=notifications&email_token=AAATBHIYP7J3IHJOYVDLRTLRCPESRA5CNFSM4KSHMZOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELQHLBY#issuecomment-585135495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATBHPC7B5EATAHXDBPHBTRCPESRANCNFSM4KSHMZOA .
This is question for me to solve :) I’ll comment here when method hooks will be available.
Maybe you can find answer here https://github.com/krakjoe/tombs
Maybe you can find answer here https://github.com/krakjoe/tombs
We already was there )) https://github.com/krakjoe/tombs/graphs/contributors
Is it possible to use this lib for dead-code detection? If it is, then it will be good to state it in README. Or provide some example.