@@ -103,7 +103,7 @@ |
||
103 | 103 | if ($this->_isBot === null) { |
104 | 104 | $agent = env('HTTP_USER_AGENT'); |
105 | 105 | $imploded = implode('|', $this->_bots); |
106 | - $this->_isBot = (bool)preg_match('/' . $imploded . '/i', $agent); |
|
106 | + $this->_isBot = (bool) preg_match('/' . $imploded . '/i', $agent); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | return $this->_isBot; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -118,8 +118,8 @@ |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | $_placeholder = ' … '; |
121 | - $leftMargin = (int)floor($_textWordMaxLength / 2); |
|
122 | - $rightMargin = (int)(-1 * ($_textWordMaxLength - $leftMargin - mb_strlen($_placeholder))); |
|
121 | + $leftMargin = (int) floor($_textWordMaxLength / 2); |
|
122 | + $rightMargin = (int) (-1 * ($_textWordMaxLength - $leftMargin - mb_strlen($_placeholder))); |
|
123 | 123 | |
124 | 124 | $string = mb_substr($string, 0, $leftMargin) . $_placeholder . |
125 | 125 | mb_substr($string, $rightMargin); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * Saito - The Threaded Web Forum |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | |
112 | 112 | public function generatePostings() |
113 | 113 | { |
114 | - $nPostings = (int)$this->in( |
|
114 | + $nPostings = (int) $this->in( |
|
115 | 115 | 'Number of postings to generate?', |
116 | 116 | null, |
117 | 117 | 100 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | if ($nPostings === 0) { |
120 | 120 | return; |
121 | 121 | } |
122 | - $ratio = (int)$this->in('Average answers per thread?', null, 10); |
|
122 | + $ratio = (int) $this->in('Average answers per thread?', null, 10); |
|
123 | 123 | $seed = $nPostings / $ratio; |
124 | 124 | |
125 | 125 | $CurrentUser = new SaitoUserDummy(); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | public function generateUsers() |
161 | 161 | { |
162 | 162 | $max = count($this->_users); |
163 | - $n = (int)$this->in( |
|
163 | + $n = (int) $this->in( |
|
164 | 164 | "Number of users to generate (max: $max)?", |
165 | 165 | null, |
166 | 166 | 0 |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | $this->out('.', 0); |
198 | 198 | if ($i > 1 && !($i % 50)) { |
199 | - $percent = (int)floor($i / $off * 100); |
|
199 | + $percent = (int) floor($i / $off * 100); |
|
200 | 200 | $this->out(sprintf(' %3s%%', $percent), 1); |
201 | 201 | } |
202 | 202 | } |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $this->addBehavior( |
78 | 78 | 'Proffer.Proffer', |
79 | 79 | [ |
80 | - 'avatar' => [ // The name of your upload field (filename) |
|
80 | + 'avatar' => [// The name of your upload field (filename) |
|
81 | 81 | 'root' => $avatarRootDir, |
82 | 82 | 'dir' => 'avatar_dir', // field for upload directory |
83 | 83 | 'thumbnailSizes' => [ |
@@ -793,8 +793,8 @@ discard block |
||
793 | 793 | $User->set('user_category_custom', $newCats); |
794 | 794 | } else { |
795 | 795 | //=if set a single category |
796 | - $category = (int)$category; |
|
797 | - if ($category > 0 && $this->Entries->Categories->exists((int)$category) |
|
796 | + $category = (int) $category; |
|
797 | + if ($category > 0 && $this->Entries->Categories->exists((int) $category) |
|
798 | 798 | ) { |
799 | 799 | $active = $category; |
800 | 800 | } else { |