PHP code example of eyroot / lx-utils

1. Go to this page and download the library: Download eyroot/lx-utils 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/ */

    

eyroot / lx-utils example snippets


$ php run/cleanUpSquareBrackets.php /path/you/want/to/clean/up

use Lx\Utils\CodeCleanUp\CodeCleanUp;

$result = (new CodeCleanUp())
    ->addFilePath($pathToCleanUp)
    ->addFileExtension('php')
    ->addTask(CodeCleanUp::TASK_QUOTE_UNDEFINED_CONSTANTS_IN_SQUARE_BRACKETS)
    ->run()
;

// Available information:
// $result->filesChanged - list of files which were changed
// $result->errors - list of errors