PHP code example of isaac / php-code-sniffer-baseliner

1. Go to this page and download the library: Download isaac/php-code-sniffer-baseliner 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/ */

    

isaac / php-code-sniffer-baseliner example snippets


  /*
   * phpcs:ignore Generic.Files.LineLength.TooLong
   * Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas malesuada, lectus vitae vestibulum vulputate, mi morbi.
   */
  

   echo 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas malesuada, lectus vitae vestibulum vulputate, mi
  morbi.';
  
diff
- 
+  // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes -- baseline
  
  class Foo {
+     // phpcs:ignore SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint -- baseline
      private $bar;
  }
` on the first line.
- Support processing files that contain `