Skip to content

Commit 5174004

Browse files
committed
Fix CS errors
1 parent f3773e2 commit 5174004

23 files changed

+164
-169
lines changed

src/AbstractDriver.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
abstract class AbstractDriver implements LoggerAwareInterface
1515
{
16-
1716
use InstanceConfigTrait;
1817
use LoggerAwareTrait;
1918

@@ -254,7 +253,7 @@ public function __call($method, $args)
254253
if (!method_exists($this->getClient(), $method)) {
255254
throw new UnimplementedWebserviceMethodException([
256255
'name' => $this->getConfig('name'),
257-
'method' => $method
256+
'method' => $method,
258257
]);
259258
}
260259

@@ -272,7 +271,7 @@ public function __debugInfo()
272271
'client' => $this->getClient(),
273272
'logger' => $this->logger(),
274273
'query_logging' => $this->isQueryLoggingEnabled(),
275-
'webservices' => array_keys($this->_webservices)
274+
'webservices' => array_keys($this->_webservices),
276275
];
277276
}
278277

@@ -308,7 +307,7 @@ protected function _createWebservice($className, array $options = [])
308307

309308
throw new MissingWebserviceClassException([
310309
'class' => $className,
311-
'fallbackClass' => $fallbackWebserviceClass
310+
'fallbackClass' => $fallbackWebserviceClass,
312311
]);
313312
}
314313
}

src/Model/Endpoint.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
*/
2929
class Endpoint implements RepositoryInterface, EventListenerInterface, EventDispatcherInterface
3030
{
31-
3231
use EventDispatcherTrait;
3332
use RulesAwareTrait;
3433
use ValidatorAwareTrait;
@@ -837,7 +836,7 @@ public function findList(Query $query, array $options)
837836
$options += [
838837
'keyField' => $this->getPrimaryKey(),
839838
'valueField' => $this->getDisplayField(),
840-
'groupField' => null
839+
'groupField' => null,
841840
];
842841

843842
$options = $this->_setFieldMatchers(
@@ -1114,7 +1113,7 @@ public function save(EntityInterface $resource, $options = [])
11141113

11151114
return new $className($resource->toArray(), [
11161115
'markNew' => false,
1117-
'markClean' => true
1116+
'markClean' => true,
11181117
]);
11191118
}
11201119

@@ -1128,7 +1127,7 @@ public function save(EntityInterface $resource, $options = [])
11281127
public function delete(EntityInterface $resource, $options = [])
11291128
{
11301129
return (bool)$this->query()->delete()->where([
1131-
$this->getPrimaryKey() => $resource->get($this->getPrimaryKey())
1130+
$this->getPrimaryKey() => $resource->get($this->getPrimaryKey()),
11321131
])->execute();
11331132
}
11341133

@@ -1220,7 +1219,7 @@ protected function _dynamicFinder($method, $args)
12201219
} elseif ($hasOr !== false) {
12211220
$fields = explode('_or_', $fields);
12221221
$conditions = [
1223-
'OR' => $makeConditions($fields, $args)
1222+
'OR' => $makeConditions($fields, $args),
12241223
];
12251224
} elseif ($hasAnd !== false) {
12261225
$fields = explode('_and_', $fields);
@@ -1433,7 +1432,7 @@ public function __debugInfo()
14331432
'resourceClass' => $this->getResourceClass(),
14341433
'defaultConnection' => $this->defaultConnectionName(),
14351434
'connectionName' => $conn ? $conn->configName() : null,
1436-
'inflector' => $this->getInflectionMethod()
1435+
'inflector' => $this->getInflectionMethod(),
14371436
];
14381437
}
14391438

src/Model/Resource.php

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

99
class Resource implements EntityInterface, InvalidPropertyInterface
1010
{
11-
1211
use EntityTrait;
1312

1413
/**
@@ -37,7 +36,7 @@ public function __construct(array $properties = [], array $options = [])
3736
'markClean' => false,
3837
'markNew' => null,
3938
'guard' => false,
40-
'source' => null
39+
'source' => null,
4140
];
4241

4342
if (!empty($options['source'])) {
@@ -57,7 +56,7 @@ public function __construct(array $properties = [], array $options = [])
5756
if (!empty($properties)) {
5857
$this->set($properties, [
5958
'setter' => $options['useSetters'],
60-
'guard' => $options['guard']
59+
'guard' => $options['guard'],
6160
]);
6261
}
6362

src/Query.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
class Query implements IteratorAggregate, JsonSerializable, QueryInterface
1616
{
17-
1817
use QueryTrait;
1918

2019
const ACTION_CREATE = 1;
@@ -68,7 +67,7 @@ class Query implements IteratorAggregate, JsonSerializable, QueryInterface
6867
'order' => [],
6968
'set' => [],
7069
'where' => [],
71-
'select' => []
70+
'select' => [],
7271
];
7372

7473
/**
@@ -504,7 +503,7 @@ public function triggerBeforeFind()
504503
$endpoint->dispatchEvent('Model.beforeFind', [
505504
$this,
506505
new ArrayObject($this->_options),
507-
!$this->isEagerLoaded()
506+
!$this->isEagerLoaded(),
508507
]);
509508
}
510509
}
@@ -555,7 +554,7 @@ public function __debugInfo()
555554
'extraOptions' => $this->getOptions(),
556555
'conditions' => $this->where(),
557556
'repository' => $this->endpoint(),
558-
'webservice' => $this->webservice()
557+
'webservice' => $this->webservice(),
559558
];
560559
}
561560

src/ResultSet.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
class ResultSet implements ResultSetInterface
99
{
10-
1110
use CollectionTrait;
1211

1312
/**

src/Schema.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Schema
7777
'null' => null,
7878
'default' => null,
7979
'comment' => null,
80-
'primaryKey' => null
80+
'primaryKey' => null,
8181
];
8282

8383
/**

src/Webservice/Webservice.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function getEndpoint()
155155
public function addNestedResource($url, array $requiredFields)
156156
{
157157
$this->_nestedResources[$url] = [
158-
'requiredFields' => $requiredFields
158+
'requiredFields' => $requiredFields,
159159
];
160160
}
161161

@@ -222,7 +222,7 @@ public function describe($endpoint)
222222

223223
throw new MissingEndpointSchemaException([
224224
'schema' => $schemaShortName,
225-
'webservice' => $shortName
225+
'webservice' => $shortName,
226226
]);
227227
}
228228

@@ -262,7 +262,7 @@ protected function _executeCreateQuery(Query $query, array $options = [])
262262
{
263263
throw new UnimplementedWebserviceMethodException([
264264
'name' => get_class($this),
265-
'method' => '_executeCreateQuery'
265+
'method' => '_executeCreateQuery',
266266
]);
267267
}
268268

@@ -279,7 +279,7 @@ protected function _executeReadQuery(Query $query, array $options = [])
279279
{
280280
throw new UnimplementedWebserviceMethodException([
281281
'name' => get_class($this),
282-
'method' => '_executeReadQuery'
282+
'method' => '_executeReadQuery',
283283
]);
284284
}
285285

@@ -296,7 +296,7 @@ protected function _executeUpdateQuery(Query $query, array $options = [])
296296
{
297297
throw new UnimplementedWebserviceMethodException([
298298
'name' => get_class($this),
299-
'method' => '_executeUpdateQuery'
299+
'method' => '_executeUpdateQuery',
300300
]);
301301
}
302302

@@ -313,7 +313,7 @@ protected function _executeDeleteQuery(Query $query, array $options = [])
313313
{
314314
throw new UnimplementedWebserviceMethodException([
315315
'name' => get_class($this),
316-
'method' => '_executeDeleteQuery'
316+
'method' => '_executeDeleteQuery',
317317
]);
318318
}
319319

@@ -346,7 +346,7 @@ protected function _logQuery(Query $query, LoggerInterface $logger)
346346
}
347347

348348
$logger->debug($query->endpoint(), [
349-
'params' => $query->where()
349+
'params' => $query->where(),
350350
]);
351351
}
352352

tests/TestCase/AbstractDriverTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AbstractDriverTest extends TestCase
1414
{
1515
public function testWebserviceWithoutVendor()
1616
{
17-
$driver = new TestPlugin;
17+
$driver = new TestPlugin();
1818

1919
$webservice = $driver->getWebservice('test_plugin');
2020
$this->assertInstanceOf('TestPlugin\Webservice\TestPluginWebservice', $webservice);
@@ -25,7 +25,7 @@ public function testWebserviceWithoutVendor()
2525

2626
public function testWebserviceWithVendor()
2727
{
28-
$driver = new SomePlugin;
28+
$driver = new SomePlugin();
2929

3030
$webservice = $driver->getWebservice('some_plugin');
3131
$this->assertInstanceOf('SomeVendor\SomePlugin\Webservice\SomePluginWebservice', $webservice);
@@ -69,7 +69,7 @@ public function testDebugInfo()
6969
'client' => $client,
7070
'logger' => $logger,
7171
'query_logging' => true,
72-
'webservices' => ['example']
72+
'webservices' => ['example'],
7373
];
7474

7575
$driver = new Test();

tests/TestCase/BootstrapTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function testLoadingEndpointWithLoadModel()
2323
{
2424
$connection = new Connection([
2525
'name' => 'test',
26-
'service' => 'Test'
26+
'service' => 'Test',
2727
]);
2828
ConnectionManager::setConfig('test_app', $connection);
2929

tests/TestCase/ConnectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function setUp()
1818

1919
$this->connection = new Connection([
2020
'name' => 'test',
21-
'service' => 'Test'
21+
'service' => 'Test',
2222
]);
2323
}
2424

@@ -29,7 +29,7 @@ public function testConstructorMissingDriver()
2929
{
3030
new Connection([
3131
'name' => 'test',
32-
'service' => 'MissingDriver'
32+
'service' => 'MissingDriver',
3333
]);
3434
}
3535

0 commit comments

Comments
 (0)