Skip to content

Commit 63110e5

Browse files
committed
Ran cs-fix
1 parent 81b7d3c commit 63110e5

19 files changed

Lines changed: 117 additions & 117 deletions

src/Association/Embedded.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function property(?string $name = null): string
122122
deprecationWarning(
123123
'3.3.0',
124124
static::class . '::property() is deprecated. ' .
125-
'Use setProperty()/getProperty() instead.'
125+
'Use setProperty()/getProperty() instead.',
126126
);
127127

128128
if ($name !== null) {
@@ -190,7 +190,7 @@ public function entityClass(?string $name = null): string
190190
deprecationWarning(
191191
'3.3',
192192
static::class . '::entityClass() is deprecated. ' .
193-
'Use setEntityClass()/getEntityClass() instead.'
193+
'Use setEntityClass()/getEntityClass() instead.',
194194
);
195195

196196
if ($name !== null) {
@@ -251,7 +251,7 @@ public function indexClass(string|Index|null $name = null): string
251251
deprecationWarning(
252252
'3.3.0',
253253
static::class . '::indexClass() is deprecated. ' .
254-
'Use setIndexClass()/getIndexClass() instead.'
254+
'Use setIndexClass()/getIndexClass() instead.',
255255
);
256256

257257
if ($name !== null) {

src/Datasource/Connection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public function getCacher(): CacheInterface
256256
if (!class_exists(Cache::class)) {
257257
throw new RuntimeException(
258258
'To use caching you must either set a cacher using Connection::setCacher()' .
259-
' or require the cakephp/cache package in your composer config.'
259+
' or require the cakephp/cache package in your composer config.',
260260
);
261261
}
262262

src/Index.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ public function callFinder(string $type, Query $query, array $options = []): Que
385385
}
386386

387387
throw new BadMethodCallException(
388-
sprintf('Unknown finder method "%s"', $type)
388+
sprintf('Unknown finder method "%s"', $type),
389389
);
390390
}
391391

@@ -410,7 +410,7 @@ public function get(
410410
array|string $finder = 'all',
411411
CacheInterface|string|null $cache = null,
412412
Closure|string|null $cacheKey = null,
413-
mixed ...$args
413+
mixed ...$args,
414414
): EntityInterface {
415415
$esIndex = $this->getConnection()->getIndex($this->getName());
416416
$esOptions = [];
@@ -557,7 +557,7 @@ public function saveMany(array $entities, array $options = []): bool
557557
throw new RuntimeException(sprintf(
558558
'Invalid items in the list. Found `%s` but expected `%s`',
559559
is_object($entity) ? get_class($entity) : gettype($entity),
560-
EntityInterface::class
560+
EntityInterface::class,
561561
));
562562
}
563563

src/Marshaller.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function createAndHydrate(
8383
string $class,
8484
array $data,
8585
array $options = [],
86-
?string $indexClass = null
86+
?string $indexClass = null,
8787
): Document {
8888
$entity = new $class();
8989

@@ -350,7 +350,7 @@ protected function _validate(array $data, array $options, bool $isNew): array
350350
}
351351
if (!is_object($options['validate'])) {
352352
throw new RuntimeException(
353-
sprintf('validate must be a boolean, a string or an object. Got %s.', gettype($options['validate']))
353+
sprintf('validate must be a boolean, a string or an object. Got %s.', gettype($options['validate'])),
354354
);
355355
}
356356

src/Query.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public function find(string $finder, mixed ...$args): static
403403
public function where(
404404
Closure|array|string|null $conditions = null,
405405
array $types = [],
406-
bool $overwrite = false
406+
bool $overwrite = false,
407407
) {
408408
return $this->_buildBoolQuery('filter', $conditions, $overwrite);
409409
}
@@ -598,7 +598,7 @@ protected function _buildBoolQuery(
598598
string $partType,
599599
AbstractQuery|callable|array $conditions,
600600
bool $overwrite,
601-
string $type = 'addMust'
601+
string $type = 'addMust',
602602
) {
603603
if (!isset($this->_queryParts[$partType]) || $overwrite) {
604604
$this->_queryParts[$partType] = new ElasticaQuery\BoolQuery();
@@ -1127,7 +1127,7 @@ public function firstOrFail(): mixed
11271127
$table = $this->getRepository();
11281128
throw new RecordNotFoundException(sprintf(
11291129
'Record not found in table "%s"',
1130-
$table->getTable()
1130+
$table->getTable(),
11311131
));
11321132
}
11331133

src/QueryBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public function geoPolygon(string $field, array $geoPoints): GeoPolygon
183183
public function geoShape(
184184
string $field,
185185
array $geoPoints,
186-
string $type = Elastica\Query\GeoShapeProvided::TYPE_ENVELOPE
186+
string $type = Elastica\Query\GeoShapeProvided::TYPE_ENVELOPE,
187187
): GeoShapeProvided {
188188
return new Elastica\Query\GeoShapeProvided($field, $geoPoints, $type);
189189
}
@@ -209,7 +209,7 @@ public function geoShapeIndex(
209209
string $field,
210210
string $id,
211211
string $index = 'shapes',
212-
string $path = 'shape'
212+
string $path = 'shape',
213213
): GeoShapePreIndexed {
214214
return new Elastica\Query\GeoShapePreIndexed($field, $id, $index, $path);
215215
}

src/TestSuite/Fixture/MappingGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ protected function createIndex(Connection $db, array $mapping): void
123123
$msg = sprintf(
124124
'Fixture creation for "%s" failed "%s"',
125125
$mapping['name'],
126-
$response->getError()
126+
$response->getError(),
127127
);
128128
throw new RuntimeException($msg);
129129
}

src/TestSuite/TestFixture.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function __construct()
9595
$message = sprintf(
9696
'Invalid datasource name "%s" for "%s" fixture. Fixture datasource names must begin with "test".',
9797
$connection,
98-
$this->table
98+
$this->table,
9999
);
100100
throw new CakeException($message);
101101
}
@@ -157,7 +157,7 @@ public function create(ConnectionInterface $db): bool
157157
$msg = sprintf(
158158
'Fixture creation for "%s" failed "%s"',
159159
$this->table,
160-
$response->getError()
160+
$response->getError(),
161161
);
162162
Log::error($msg);
163163
trigger_error($msg, E_USER_WARNING);

src/View/Form/DocumentContext.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ protected function _prepare(): void
119119

120120
if (!is_object($index)) {
121121
throw new RuntimeException(
122-
'Unable to find index class for current entity'
122+
'Unable to find index class for current entity',
123123
);
124124
}
125125
$this->_isCollection = (
@@ -241,8 +241,8 @@ protected function entity(array $path): object|array|false
241241
throw new RuntimeException(
242242
sprintf(
243243
'Unable to fetch property "%s"',
244-
implode('.', $path)
245-
)
244+
implode('.', $path),
245+
),
246246
);
247247
}
248248

tests/TestCase/Datasource/ConnectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function testLoggerQueryLogger()
119119
'path' => '_stats',
120120
'data' => [],
121121
],
122-
JSON_PRETTY_PRINT
122+
JSON_PRETTY_PRINT,
123123
),
124124
]);
125125

0 commit comments

Comments
 (0)