for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace BringYourOwnIdeas\UpdateChecker\Extensions;
use DataExtension;
/**
* Describes any available updates to an installed Composer package
*
* Originally from https://github.com/XploreNet/silverstripe-composerupdates
*/
class ComposerUpdateExtension extends DataExtension
{
private static $db = [
$db
This check marks private properties in classes that are never used. Those properties can be removed.
'VersionHash' => 'Varchar',
'VersionConstraint' => 'Varchar(50)',
'AvailableVersion' => 'Varchar(50)',
'AvailableHash' => 'Varchar(50)',
'LatestVersion' => 'Varchar(50)',
'LatestHash' => 'Varchar(50)',
];
private static $summary_fields = [
$summary_fields
'AvailableVersion' => 'Available',
'LatestVersion' => 'Latest',
* If the available version is the same as the current version then return nothing, otherwise show the latest
* available version
* @return string
public function getAvailableVersion()
if ($this->owner->getField('Version') === $this->owner->getField('AvailableVersion')) {
return '';
}
return $this->owner->getField('AvailableVersion');
This check marks private properties in classes that are never used. Those properties can be removed.