for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Donatas Navidonskis <[email protected]>
* @since 2017
* @class LangEntity
*
* @property int ModuleID
* @property string Namespace
* @property string Value
* @property string Title
* @method LangModule Module
*/
class LangEntity extends DataObject {
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
* @var array
* @config
private static $db = [
$db
This check marks private properties in classes that are never used. Those properties can be removed.
'Namespace' => 'Varchar(318)',
'Value' => 'Varchar(318)',
'Title' => 'Varchar(512)',
];
private static $translate = ['Value'];
$translate
private static $extensions = ['FluentExtension'];
$extensions
private static $has_one = [
$has_one
'Module' => 'LangModule',
private static $create_table_options = [
$create_table_options
'MySQLDatabase' => 'ENGINE=MyISAM',
private static $indexes = [
$indexes
'SearchFields' => [
'type' => 'fulltext',
'name' => 'SearchFields',
'value' => '"Namespace", "Value", "Title"',
],
* @param string $namespace
* @return LangEntity
public static function getByNamespace($namespace) {
return static::get()->filter('Namespace', $namespace)->first();
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.