core/Group/Console/Command/SqlRollBackCommand.php
Showing 10 of 10 total issues
Function ListSql
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
private function ListSql($sqlDir) { $files = []; if (is_dir($sqlDir)) { $dir = opendir($sqlDir);
- Read upRead up
Missing class import via use statement (line '21', column '26'). Open
Open
$this->dao = new \Dao();
- Read upRead up
- Exclude checks
The method doSql has a boolean flag argument $needOutput, which is a certain sign of a Single Responsibility Principle violation. Open
Open
private function doSql($sql, $needOutput = true)
- Read upRead up
- Exclude checks
Method name "SqlRollBackCommand::ListSql" is not in camel caps format Open
Open
private function ListSql($sqlDir)
- Exclude checks
Inline control structures are not allowed Open
Open
if ($needOutput) $this->outPut($sql);
- Exclude checks
Inline control structures are not allowed Open
Open
if (!in_array($this->toVersion, $this->versions)) $this->error('找不到指定的版本');
- Exclude checks
Whitespace found at end of line Open
Open
{
- Exclude checks
Whitespace found at end of line Open
Open
{
- Exclude checks
Whitespace found at end of line Open
Open
$files[] = $fileName;
- Exclude checks
The method ListSql is not named in camelCase. Open
Open
private function ListSql($sqlDir) { $files = []; if (is_dir($sqlDir)) { $dir = opendir($sqlDir);
- Read upRead up
- Exclude checks