在 NetBeans 中设置 Yii 2 Web 框架编码标准


Setup Yii 2 Web Framework Coding Standard in NetBeans

我读了这个和这个。但是如何在Windows机器的NetBeans IDE中设置它呢?

Yii2 需要 PHP 5.4 的最低要求,所以如果你的 IDE 支持 PHP 5.4 或更高版本,那么它也会显示 Yii2 的标准。

您还可以检查此 yii pligin 以获取 netbeans http://plugins.netbeans.org/plugin/47246/php-yii-framework-netbeans-phpcc

在项目的根目录中使用自动完成的名称创建文件.php并将其添加到文件中。

 /**
 * Yii bootstrap file.
 * Used for enhanced IDE code autocompletion.
 * Note: To avoid "Multiple Implementations" PHPStorm warning and make autocomplete faster
 * exclude or "Mark as Plain Text" vendor/yiisoft/yii2/Yii.php file
 */
class Yii extends 'yii'BaseYii
{
    /**
     * @var BaseApplication|WebApplication|ConsoleApplication the application instance
     */
    public static $app;
}
/**
 * Class BaseApplication
 * Used for properties that are identical for both WebApplication and ConsoleApplication
 *
 * @property trntv'filekit'Storage $fileStorage
 * @property common'components'keyStorage'KeyStorage $keyStorage
 * @property yii'web'UrlManager $urlManagerFrontend UrlManager for frontend application.
 * @property yii'web'UrlManager $urlManagerBackend UrlManager for backend application.
 * @property yii'web'UrlManager $urlManagerStorage UrlManager for storage application.
 * @property trntv'glide'components'Glide $glide
 * @property trntv'bus'CommandBus $commandBus
 */
abstract class BaseApplication extends yii'base'Application
{
}
/**
 * Class WebApplication
 * Include only Web application related components here
 *
 * @property User $user User component.
 */
class WebApplication extends yii'web'Application
{
}
/**
 * Class ConsoleApplication
 * Include only Console application related components here
 */
class ConsoleApplication extends yii'console'Application
{
}
/**
 * User component
 * Include only Web application related components here
 *
 * @property 'common'models'User $identity User model.
 * @method 'common'models'User getIdentity() returns User model.
 */
class User extends 'yii'web'User
{
}