| 1 | <?php |
||
| 18 | abstract class AbstractDataCollector |
||
| 19 | { |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Database. |
||
| 23 | * |
||
| 24 | * @var ExtendedPdoInterface |
||
| 25 | */ |
||
| 26 | protected $db; |
||
|
1 ignored issue
–
show
|
|||
| 27 | |||
| 28 | /** |
||
| 29 | * Creates data collector instance. |
||
| 30 | * |
||
| 31 | * @param ExtendedPdoInterface $db Database. |
||
| 32 | */ |
||
| 33 | 22 | public function __construct(ExtendedPdoInterface $db) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Collect data from a namespace. |
||
| 40 | * |
||
| 41 | * @param integer $file_id File id. |
||
| 42 | * @param ReflectionFileNamespace $namespace Namespace. |
||
| 43 | * |
||
| 44 | * @return void |
||
| 45 | */ |
||
| 46 | abstract public function collectData($file_id, ReflectionFileNamespace $namespace); |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Aggregate previously collected data. |
||
| 50 | * |
||
| 51 | * @param KnowledgeBase $knowledge_base Knowledge base. |
||
| 52 | * |
||
| 53 | * @return void |
||
| 54 | */ |
||
| 55 | 4 | public function aggregateData(KnowledgeBase $knowledge_base) |
|
| 59 | |||
| 60 | /** |
||
| 61 | * Delete previously collected data for a files. |
||
| 62 | * |
||
| 63 | * @param array $file_ids File IDs. |
||
| 64 | * |
||
| 65 | * @return void |
||
| 66 | */ |
||
| 67 | abstract public function deleteData(array $file_ids); |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Returns statistics about the code. |
||
| 71 | * |
||
| 72 | * @return array |
||
| 73 | */ |
||
| 74 | public function getStatistics() |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Finds backward compatibility breaks. |
||
| 81 | * |
||
| 82 | * @param ExtendedPdoInterface $source_db Source database. |
||
| 83 | * |
||
| 84 | * @return array |
||
| 85 | */ |
||
| 86 | public function getBackwardsCompatibilityBreaks(ExtendedPdoInterface $source_db) |
||
| 90 | |||
| 91 | } |
||
| 92 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.