| Total Complexity | 2 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class ComposerUpdateExtension extends DataExtension |
||
| 13 | { |
||
| 14 | private static $db = [ |
||
|
|
|||
| 15 | 'VersionHash' => 'Varchar', |
||
| 16 | 'VersionConstraint' => 'Varchar(50)', |
||
| 17 | 'AvailableVersion' => 'Varchar(50)', |
||
| 18 | 'AvailableHash' => 'Varchar(50)', |
||
| 19 | 'LatestVersion' => 'Varchar(50)', |
||
| 20 | 'LatestHash' => 'Varchar(50)', |
||
| 21 | ]; |
||
| 22 | |||
| 23 | private static $summary_fields = [ |
||
| 24 | 'AvailableVersion' => 'Available', |
||
| 25 | 'LatestVersion' => 'Latest', |
||
| 26 | ]; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * If the available version is the same as the current version then return nothing, otherwise show the latest |
||
| 30 | * available version |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function getAvailableVersion() |
||
| 42 |