1 | <?php |
||
9 | class Addon extends DataObject |
||
10 | { |
||
11 | |||
12 | public static $db = array( |
||
13 | 'Name' => 'Varchar(255)', |
||
14 | 'Description' => 'Text', |
||
15 | 'Type' => 'Varchar(100)', |
||
16 | 'Readme' => 'HTMLText', |
||
17 | 'Released' => 'SS_Datetime', |
||
18 | 'Repository' => 'Varchar(255)', |
||
19 | 'Downloads' => 'Int', |
||
20 | 'DownloadsMonthly' => 'Int', |
||
21 | 'Favers' => 'Int', |
||
22 | 'LastUpdated' => 'SS_Datetime', |
||
23 | 'LastBuilt' => 'SS_Datetime', |
||
24 | 'BuildQueued' => 'Boolean', |
||
25 | 'HelpfulRobotData' => 'Text', |
||
26 | 'HelpfulRobotScore' => 'Int', |
||
27 | ); |
||
28 | |||
29 | public static $has_one = array( |
||
30 | 'Vendor' => 'AddonVendor' |
||
31 | ); |
||
32 | |||
33 | public static $has_many = array( |
||
34 | 'Versions' => 'AddonVersion' |
||
35 | ); |
||
36 | |||
37 | public static $many_many = array( |
||
38 | 'Keywords' => 'AddonKeyword', |
||
39 | 'Screenshots' => 'Image', |
||
40 | 'CompatibleVersions' => 'SilverStripeVersion' |
||
41 | ); |
||
42 | |||
43 | public static $default_sort = 'Name'; |
||
44 | |||
45 | public static $extensions = array( |
||
46 | 'SilverStripe\\Elastica\\Searchable' |
||
47 | ); |
||
48 | |||
49 | /** |
||
50 | * Gets the addon's versions sorted from newest to oldest. |
||
51 | * |
||
52 | * @return ArrayList |
||
53 | */ |
||
54 | public function SortedVersions() |
||
64 | |||
65 | public function MasterVersion() |
||
69 | |||
70 | public function Authors() |
||
74 | |||
75 | public function VendorName() |
||
79 | |||
80 | public function VendorLink() |
||
88 | |||
89 | public function PackageName() |
||
93 | |||
94 | public function Link() |
||
102 | |||
103 | public function DescriptionText() |
||
107 | |||
108 | public function RSSTitle() |
||
112 | |||
113 | public function PackagistUrl() |
||
117 | |||
118 | /** |
||
119 | * Remove the effect of code of conduct Helpful Robot measure that we currently don't include in the Supported module definition |
||
120 | * |
||
121 | * @return integer Adjusted Helpful Robot score |
||
122 | */ |
||
123 | public function getAdjustedHelpfulRobotScore() |
||
127 | |||
128 | public function getElasticaMapping() |
||
142 | |||
143 | public function getElasticaDocument() |
||
157 | |||
158 | public function onBeforeDelete() |
||
176 | |||
177 | public function getDateCreated() |
||
181 | |||
182 | /** |
||
183 | * @return ArrayData |
||
184 | */ |
||
185 | public function HelpfulRobotData() |
||
191 | |||
192 | /** |
||
193 | * |
||
194 | * @return bool|DateInterval |
||
195 | */ |
||
196 | public function addonAge() |
||
203 | |||
204 | /** |
||
205 | * Calculate the total amount of downloads per day |
||
206 | * Based on the total amount of downloads divided by the age of the addon |
||
207 | * |
||
208 | * @return float |
||
209 | */ |
||
210 | public function getRelativePopularity() |
||
214 | |||
215 | /** |
||
216 | * Format the relative popularity to a nicely readable number |
||
217 | * |
||
218 | * @return string |
||
219 | */ |
||
220 | public function relativePopularityFormatted() |
||
224 | } |
||
225 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.