PHP code example of degraciamathieu / php-arguments-detector

1. Go to this page and download the library: Download degraciamathieu/php-arguments-detector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

degraciamathieu / php-arguments-detector example snippets


class Bar {
    public function foo($a, $b)
    {
        if ($a) {
           //
        }

        return $b;
    }
}

vendor/bin/phpargsdetector inspect app/Services/Saml/

+------------------------------------------+------------------+-----------+--------+
| Files                                    | Methods          | Arguments | Weight |
+------------------------------------------+------------------+-----------+--------+
| app/Services/Saml/SamlMessageFactory.php | __construct      | 2         | 2      |
| app/Services/Saml/SamlMessageFactory.php | makeSamlResponse | 2         | 68     |
| app/Services/Saml/SamlSecurity.php       | checkSignature   | 2         | 18     |
| app/Services/Saml/SamlIssuer.php         | find             | 1         | 3      |
| app/Services/Saml/SamlKeeper.php         | keep             | 1         | 1      |
| app/Services/Saml/SamlMessageFactory.php | addAttributes    | 1         | 26     |
| app/Services/Saml/SamlMessageFactory.php | sign             | 1         | 12     |
| app/Services/Saml/SamlResponder.php      | launch           | 1         | 10     |
| app/Services/Saml/SamlKeeper.php         | has              | 0         | 0      |
| app/Services/Saml/SamlKeeper.php         | retrieve         | 0         | 0      |
+------------------------------------------+------------------+-----------+--------+
Total of methods : 10

vendor/bin/phpargsdetector inspect app/ --limit=3 --sort-by-weight

+-------------------------------------------------+------------------+-----------+--------+
| Files                                           | Methods          | Arguments | Weight |
+-------------------------------------------------+------------------+-----------+--------+
| app/Services/Saml/SamlMessageFactory.php        | makeSamlResponse | 2         | 68     |
| app/Http/Controllers/RestrictionController.php  | update           | 2         | 28     |
| app/Http/Middleware/RedirectIfAuthenticated.php | handle           | 3         | 27     |
+-------------------------------------------------+------------------+-----------+--------+
Total of methods : 3