for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Created by IntelliJ IDEA.
* User: Werner M. Krauß <[email protected]>
* Date: 16.03.2016
* Time: 08:53
*/
class PiwikSiteConfigExtension extends DataExtension
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 = array(
$db
This check marks private properties in classes that are never used. Those properties can be removed.
'PiwikSiteID' => 'Int'
);
public function updateCMSFields(FieldList $fields)
$fields->addFieldToTab('Root.Piwik', HeaderField::create('Piwik'));
$siteIDField = NumericField::create('PiwikSiteID', _t('PiwikSiteConfigExtension.db_PiwikSiteID', 'PIWIK Site ID'))
->setDescription(_t('PiwikSiteConfigExtension.SiteIDDescription', 'The ID of this site, can be found in the generated PIWIK tracking code'));
$fields->addFieldToTab('Root.Piwik', $siteIDField);
}
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.