PHP code example of mikulas / code-sniffs

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

    

mikulas / code-sniffs example snippets


/** @property-read $bar */
class Foo
{
	/** @var Bar */
	public $bar;
}

/**
 * @property-read $bar
 */
class Foo
{
	/**
	 * @var Bar
	 */
	public $bar;
}

/** @property-read Foo|NULL $bar */

/** @property-read NULL|Foo $bar */

if (...)
{
 	return TRUE;
}



namespace Foo;

use Bar;


class Quaz {}

TRUE && FALSE && NULL;

list ($a, $b);

list($a, $b);