for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Class AccordionItem
*
* There are no permissions, as they're part of Page, and not a separate thing.
* @property string $Title
* @property string $Content
* @property int $SortOrder
* @property int $PageID
* @method Page Page()
*/
class AccordionItem 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.
{
private static $db = [
$db
This check marks private properties in classes that are never used. Those properties can be removed.
'Title' => 'Varchar(255)',
'Content' => 'HTMLText',
'SortOrder' => 'Int',
];
private static $has_one = [
$has_one
'Page' => 'Page'
public function getCMSFields()
$fields = parent::getCMSFields();
$fields->removeByName(['PageID', 'SortOrder']);
return $fields;
}
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.