1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-04 18:48:24 +01:00
Go to file
Andreas Fischer 67aedc240b Change constructors from class name to __construct().
This has been produced as follows:
<?php
$replace = $files = [];
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1]));
foreach ($it as $fileinfo) {
    if ($fileinfo->getExtension() === 'php') {
        $file = $fileinfo->getPathname();
        $content = file_get_contents($file);
        $files[$file] = $content;
        $tokens = token_get_all($content);
        foreach ($tokens as $key => $value) {
            if ($value[0] === T_CLASS) {
                $class = $tokens[$key + 2][1];
                $replace += array(
                    "$class::$class(" => "$class::__construct(",
                    "parent::$class(" => "parent::__construct(",
                    "function $class(" => "function __construct(",
                );
            }
        }
    }
}
foreach ($files as $file => $content) {
    file_put_contents(
        $file,
        str_replace(
            array_keys($replace),
            array_values($replace),
            $content
        )
    );
}
2014-06-16 17:06:34 +02:00
build Check for old-style constructor names via Code Sniffer. 2014-06-16 17:06:18 +02:00
phpseclib Change constructors from class name to __construct(). 2014-06-16 17:06:34 +02:00
tests Merge branch 'master' into php5 2014-06-16 17:00:00 +02:00
travis Extract into upload-code-coverage-scrutinizer.sh 2014-06-01 13:49:15 +02:00
.gitattributes added build status and extra lines 2012-06-11 02:30:46 -06:00
.gitignore Only apply git ignores relative to repository root. 2013-11-23 20:33:37 +01:00
.scrutinizer.yml Specify the runs option for external code coverage. 2014-06-01 13:52:24 +02:00
.travis.yml Merge branch 'master' into php5 2014-06-01 21:55:25 +02:00
AUTHORS AUTHORS: add more developers 2013-03-11 16:36:27 -05:00
composer.json Add PSR4 namespace to composer.json. 2014-06-02 20:17:18 +02:00
composer.lock Add PSR4 namespace to composer.json. 2014-06-02 20:17:18 +02:00
LICENSE Updated LICENSE 2013-11-23 21:18:24 +01:00
phpunit.xml.dist Split Unit/Functional Test Suites. 2014-06-01 21:13:20 +02:00
README.md Merge branch 'master' into php5 2014-04-18 16:44:57 +02:00

phpseclib - PHP Secure Communications Library

Build Status

MIT-licensed pure-PHP implementations of an arbitrary-precision integer arithmetic library, fully PKCS#1 (v2.1) compliant RSA, DES, 3DES, RC4, Rijndael, AES, Blowfish, Twofish, SSH-1, SSH-2, SFTP, and X.509

PEAR Channel PEAR Channel: [phpseclib.sourceforge.net](http://phpseclib.sourceforge.net/pear.htm)

Installing Development Dependencies

Dependencies are managed via Composer.

  1. Download the composer.phar executable as per the Composer Download Instructions, e.g. by running

    curl -sS https://getcomposer.org/installer | php
    
  2. Install Dependencies

    php composer.phar install --dev
    

Contributing

  1. Fork the Project

  2. Install Development Dependencies

  3. Create a Feature Branch

  4. (Recommended) Run the Test Suite

    vendor/bin/phpunit
    
  5. (Recommended) Check whether your code conforms to our Coding Standards by running

    vendor/bin/phing -f build/build.xml sniff
    
  6. Send us a Pull Request