1 | <?php |
||
12 | abstract class AbstractDatabaseCommand extends AbstractMagentoCommand |
||
13 | { |
||
14 | /** |
||
15 | * @var array|DbSettings |
||
16 | */ |
||
17 | protected $dbSettings; |
||
18 | |||
19 | /** |
||
20 | * @var bool |
||
21 | */ |
||
22 | protected $isSocketConnect = false; |
||
23 | |||
24 | /** |
||
25 | * @param OutputInterface $output |
||
26 | */ |
||
27 | protected function detectDbSettings(OutputInterface $output) |
||
32 | |||
33 | /** |
||
34 | * @param $name |
||
35 | * |
||
36 | * @return mixed |
||
37 | */ |
||
38 | public function __get($name) |
||
45 | |||
46 | /** |
||
47 | * Generate help for compression |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | protected function getCompressionHelp() |
||
62 | |||
63 | /** |
||
64 | * @param string $type |
||
65 | * @return Compressor |
||
66 | * @deprecated Since 1.97.29; use AbstractCompressor::create() instead |
||
67 | */ |
||
68 | protected function getCompressor($type) |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | * |
||
76 | * @deprecated Please use database helper |
||
77 | */ |
||
78 | protected function getMysqlClientToolConnectionString() |
||
82 | |||
83 | /** |
||
84 | * Creates a PDO DSN for the adapter from $this->_config settings. |
||
85 | * |
||
86 | * @see Zend_Db_Adapter_Pdo_Abstract |
||
87 | * @return string |
||
88 | * |
||
89 | * @deprecated Please use database helper |
||
90 | */ |
||
91 | protected function _dsn() |
||
95 | |||
96 | /** |
||
97 | * @return DatabaseHelper |
||
98 | */ |
||
99 | protected function getDatabaseHelper() |
||
103 | |||
104 | /** |
||
105 | * @param array $excludes |
||
106 | * @param array $definitions |
||
107 | * @param array $resolved Which definitions where already resolved -> prevent endless loops |
||
108 | * |
||
109 | * @return array |
||
110 | * |
||
111 | * @deprecated Please use database helper |
||
112 | */ |
||
113 | protected function resolveTables(array $excludes, array $definitions, array $resolved = array()) |
||
117 | } |
||
118 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.