@@ -74,8 +74,9 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | public function canInstall() { |
77 | - if(!$this->getTable()) |
|
78 | - return 'Missing "table" property'; |
|
77 | + if(!$this->getTable()) { |
|
78 | + return 'Missing "table" property'; |
|
79 | + } |
|
79 | 80 | return true; |
80 | 81 | } |
81 | 82 | |
@@ -95,10 +96,12 @@ discard block |
||
95 | 96 | |
96 | 97 | public function getRefTableName() |
97 | 98 | { |
98 | - if(strpos($this->refTable, '\\') === FALSE) //not an AR class but a table name |
|
99 | + if(strpos($this->refTable, '\\') === FALSE) { |
|
100 | + //not an AR class but a table name |
|
99 | 101 | return $this->refTable; |
100 | - else |
|
101 | - return call_user_func([$this->refTable, 'tableName']); |
|
102 | + } else { |
|
103 | + return call_user_func([$this->refTable, 'tableName']); |
|
104 | + } |
|
102 | 105 | } |
103 | 106 | |
104 | 107 | public function getTable() |
@@ -4,9 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Yii; |
6 | 6 | use yii\base\Behavior; |
7 | -use yii\base\Event; |
|
8 | -use yii\db\ActiveRecord; |
|
9 | -use yii\db\AfterSaveEvent; |
|
10 | 7 | |
11 | 8 | /** |
12 | 9 | * @author Nikolay Traykov |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Yii; |
6 | 6 | use yii\base\Behavior; |
7 | -use yii\base\Event; |
|
8 | 7 | use yii\db\ActiveRecord; |
9 | 8 | use yii\db\AfterSaveEvent; |
10 | 9 |