PHP code example of tightenco / tlint

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

    

tightenco / tlint example snippets


$value = 'Hello, World!';

return view('view', compact('value'));

return view('view', ['value' => 'Hello, World!']);

return view('view')
    ->with('value', 'Hello, World!');

namespace App\Support\Linting;

use Tighten\TLint\Presets\PresetInterface;

class Preset implements PresetInterface
{
  public function getLinters() : array
  {
    return [
      CustomLinter::class,
    ];
  }

  public function getFormatters() : array
  {
    return [
        CustomFormatter::class,
    ];
  }
}

tlint lint index.php
tlint lint app

tlint lint test.php --json

tlint lint test.php --checkstyle