Skip to content

Commit 8f753e8

Browse files
committed
Fix Coding Standard
1 parent e114b25 commit 8f753e8

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

src/App.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,10 +1185,10 @@ protected static function setResponse(string $instance) : Response
11851185
? $service->setNoCache()
11861186
: $service->setCache($config['cache']['seconds'], $config['cache']['public'] ?? false);
11871187
}
1188-
if ( ! empty($config['csp'])) {
1188+
if (!empty($config['csp'])) {
11891189
$service->setCsp(new CSP($config['csp']));
11901190
}
1191-
if ( ! empty($config['csp_report_only'])) {
1191+
if (!empty($config['csp_report_only'])) {
11921192
$service->setCspReportOnly(new CSP($config['csp_report_only']));
11931193
}
11941194
return static::setService('response', $service, $instance);

src/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function prepareModel() : static
6161
if (\property_exists($this, 'model')) {
6262
$property = new ReflectionProperty($this, 'model');
6363
$type = $property->getType();
64-
if ( ! $type instanceof ReflectionNamedType || $type->isBuiltin()) {
64+
if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) {
6565
throw new LogicException(
6666
'Property ' . static::class
6767
. '::$model must have a valid named type'

src/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ public function paginate(
498498
if ($orderBy !== null) {
499499
$orderBy = (array) $orderBy;
500500
$orderByDir = \strtolower($orderByDirection);
501-
if ( ! \in_array($orderByDir, [
501+
if (!\in_array($orderByDir, [
502502
'asc',
503503
'desc',
504504
])) {
@@ -943,7 +943,7 @@ public function createBy(string $column, array | Entity | stdClass $data) : fals
943943
return false;
944944
}
945945
$data = $this->filterAllowedFields($data);
946-
if ( ! isset($data[$column])) {
946+
if (!isset($data[$column])) {
947947
throw new LogicException('Value of column ' . $column . ' is not set');
948948
}
949949
if ($this->isAutoTimestamps()) {

src/Validator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ public static function existMany(
160160
if ($values === null) {
161161
return true;
162162
}
163-
if ( ! \is_array($values)) {
163+
if (!\is_array($values)) {
164164
return false;
165165
}
166166
foreach ($values as $value) {
167-
if ( ! \is_scalar($value)) {
167+
if (!\is_scalar($value)) {
168168
return false;
169169
}
170170
}

src/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ protected function getIncludeContentsWithDebug(string $view, array $data = []) :
342342
$contents = $this->getContents($view, $data);
343343
$this->inInclude = false;
344344
$this->setDebugData($view, $start, 'include');
345-
if ( ! $this->isShowingDebugComments()) {
345+
if (!$this->isShowingDebugComments()) {
346346
return $contents;
347347
}
348348
return $this->involveInclude($view, $contents);

tests/configs/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @var Router $router Must be set in App::router()
1616
*/
1717
// @phpstan-ignore-next-line
18-
if ( ! isset($router)) {
18+
if (!isset($router)) {
1919
throw new LogicException('Variable $router was not set.');
2020
}
2121

0 commit comments

Comments
 (0)