Closed Soufraz closed 7 years ago
When you are talking about PHP built-in functions, such as in_array(), you can use your own NamespaceFilter plugin to return an empty array in this case. Please check the manual https://github.com/mamuz/PhpDependencyAnalysis/wiki/5.-Plugins , the example https://github.com/mamuz/PhpDependencyAnalysis/wiki/4.-Examples#usage-graph-on-package-level-with-a-namespacefilter and the test stub https://github.com/mamuz/PhpDependencyAnalysis/blob/master/tests/_data/Plugin/NamespaceFilter.php
@Soufraz Did my answer help you?
Sorry, I did not test yet. So, if I remember the generator was getting all php functions in the classes. But I'll try the filter suggested above .. Thanks!
@mamuz @Soufraz Can you please help me understand how should I remove the inbuilt PHP functions and dependencies? I tried performing NameSpaceFilter which suggested above but it didn't happen. I running PhpDA on docker with the following configuration. Really appreciated it if you can help me remove PHP global functions and inbuilt one. mode: 'call' source: '../src/Controller' filePattern: 'ContactsController.php' ignore: 'tests' formatter: 'PhpDA\Writer\Strategy\Svg' target: './namespace-filter.svg' namespaceFilter: 'MyDomain\Plugin\NamespaceFilter' visitor:
+1 I believe that exclude built-in functions feature is highly demanded
Can you give me an example?