Skip to content

Commit 05c0568

Browse files
splitbraingithub-actions[bot]
authored andcommitted
🤖 Automatic code style fixes
1 parent f64fd6f commit 05c0568

File tree

5 files changed

+4
-18
lines changed

5 files changed

+4
-18
lines changed

‎Embeddings.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ class Embeddings
5151
/**
5252
* Embeddings constructor.
5353
*
54-
* @param ChatInterface $chatModel
55-
* @param EmbeddingInterface $embedModel
56-
* @param AbstractStorage $storage
5754
* @param array $config The plugin configuration
5855
*/
5956
public function __construct(

‎Model/AbstractModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ abstract class AbstractModel implements ModelInterface
3838
protected $requestStart = 0;
3939

4040
/** @var int How often to retry a request if it fails */
41-
public const MAX_RETRIES = 3;
41+
final public const MAX_RETRIES = 3;
4242

4343
/** @var DokuHTTPClient */
4444
protected $http;
@@ -194,7 +194,7 @@ public function setDebug($debug = true)
194194
* @return mixed
195195
* @throws \Exception when the response indicates an error
196196
*/
197-
abstract protected function parseAPIResponse($response);
197+
abstract protected function parseAPIResponse(mixed $response);
198198

199199
/**
200200
* Send a request to the API

‎ModelFactory.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77

88
class ModelFactory
99
{
10-
/** @var array The plugin configuration */
11-
protected array $config;
12-
1310
public $chatModel;
1411
public $rephraseModel;
1512
public $embeddingModel;
@@ -19,9 +16,8 @@ class ModelFactory
1916
/**
2017
* @param array $config The plugin configuration
2118
*/
22-
public function __construct(array $config)
19+
public function __construct(protected array $config)
2320
{
24-
$this->config = $config;
2521
}
2622

2723
/**
@@ -39,8 +35,6 @@ public function updateConfig(array $config)
3935

4036
/**
4137
* Set the debug flag for all models
42-
*
43-
* @param bool $debug
4438
*/
4539
public function setDebug(bool $debug = true)
4640
{
@@ -122,7 +116,7 @@ public function getModels($availableOnly = false, $typeOnly = '')
122116
try {
123117
$info['instance'] = $this->loadModel($type, "$namespace $name");
124118
$info['instance']->setDebug($this->debug);
125-
} catch (\Exception $e) {
119+
} catch (\Exception) {
126120
if ($availableOnly) continue;
127121
$info['instance'] = false;
128122
}

‎cli/simulate.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ protected function records2rows(array $result): array
159159
/**
160160
* Prefix each key in the given stats array to be merged with a larger array
161161
*
162-
* @param string $prefix
163-
* @param array $stats
164162
* @return array
165163
*/
166164
protected function flattenStats(string $prefix, array $stats)
@@ -173,7 +171,6 @@ protected function flattenStats(string $prefix, array $stats)
173171
}
174172

175173
/**
176-
* @param string $file
177174
* @return array
178175
* @throws Exception
179176
*/

‎helper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function setLogger($logger)
5959
/**
6060
* Update the configuration
6161
*
62-
* @param array $config
6362
* @return void
6463
*/
6564
public function updateConfig(array $config)
@@ -387,7 +386,6 @@ public function getLanguageLimit()
387386
/**
388387
* Store info about the last run
389388
*
390-
* @param array $data
391389
* @return void
392390
*/
393391
public function setRunData(array $data)

0 commit comments

Comments
 (0)