@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | $seo = new self(); |
65 | 65 | $seo->_owner = $owner; |
66 | - $condition = (int)$condition; |
|
66 | + $condition = (int) $condition; |
|
67 | 67 | $data = $owner->getIsNewRecord() ? false : (new Query()) |
68 | 68 | ->from(Seo::tableName($owner)) |
69 | 69 | ->limit(1) |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | { |
87 | 87 | $tableName = $activeRecord->tableName(); |
88 | 88 | if (substr($tableName, -2) == '}}') { |
89 | - return preg_replace('/{{(.+)}}/', '{{$1_' . self::$tableSuffix . '}}', $tableName); |
|
89 | + return preg_replace('/{{(.+)}}/', '{{$1_'.self::$tableSuffix.'}}', $tableName); |
|
90 | 90 | } else { |
91 | - return $tableName . '_' . self::$tableSuffix; |
|
91 | + return $tableName.'_'.self::$tableSuffix; |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function getAllSeobility($force = false) |
49 | 49 | { |
50 | - $this->_seo = (array)($force ? [] : $this->_seo) + Seo::findAll($this->owner); |
|
50 | + $this->_seo = (array) ($force ? [] : $this->_seo) + Seo::findAll($this->owner); |
|
51 | 51 | return ArrayHelper::toArray($this->_seo, ['inblank\seobility\models\Seo' => ['title', 'keywords', 'description']]); |
52 | 52 | } |
53 | 53 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function setSeobility($values, $condition = 0) |
60 | 60 | { |
61 | - $condition = (int)$condition; |
|
61 | + $condition = (int) $condition; |
|
62 | 62 | if (!array_key_exists($condition, $this->_seo)) { |
63 | 63 | $this->_seo[$condition] = Seo::find($this->owner, $condition); |
64 | 64 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function deleteSeobility($condition = 0) |
92 | 92 | { |
93 | - $condition = (int)$condition; |
|
93 | + $condition = (int) $condition; |
|
94 | 94 | $this->getSeobility($condition, false); |
95 | 95 | $this->_seo[$condition]->delete(); |
96 | 96 | unset($this->_seo[$condition]); |
@@ -106,11 +106,11 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function getSeobility($condition = 0, $defaultIfNotFound = true, $defaultCondition = 0) |
108 | 108 | { |
109 | - $condition = (int)$condition; |
|
109 | + $condition = (int) $condition; |
|
110 | 110 | if (!array_key_exists($condition, $this->_seo)) { |
111 | 111 | $this->_seo[$condition] = Seo::find($this->owner, $condition); |
112 | 112 | if ($this->_seo[$condition]->getIsNewRecord() && $defaultIfNotFound) { |
113 | - $this->getSeobility((int)$defaultCondition, false); |
|
113 | + $this->getSeobility((int) $defaultCondition, false); |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | return $this->_seo[$condition]->getAttributes(['title', 'keywords', 'description']); |