Skip to content

Commit ae7d779

Browse files
committed
Enable single_line_comment_spacing
1 parent 7b2ad9c commit ae7d779

26 files changed

+160
-151
lines changed

.php-cs-fixer.dist.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
]);
4040

4141
$overrides = [
42+
// <<<<<<<<<<<<<<<<<<<<<<<< @TODO TO BE REMOVED ONCE LIVE IN CODING-STANDARD
4243
'phpdoc_separation' => [
4344
'groups' => [
4445
['immutable', 'psalm-immutable'],
@@ -52,6 +53,8 @@
5253
['var', 'phpstan-var', 'psalm-var'],
5354
],
5455
],
56+
'single_line_comment_spacing' => true,
57+
// >>>>>>>>>>>>>>>>>>>>>>>>>
5558
];
5659

5760
$options = [

.php-cs-fixer.no-header.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
]);
3232

3333
$overrides = [
34+
// <<<<<<<<<<<<<<<<<<<<<<<< @TODO TO BE REMOVED ONCE LIVE IN CODING-STANDARD
3435
'phpdoc_separation' => [
3536
'groups' => [
3637
['immutable', 'psalm-immutable'],
@@ -44,6 +45,8 @@
4445
['var', 'phpstan-var', 'psalm-var'],
4546
],
4647
],
48+
'single_line_comment_spacing' => true,
49+
// >>>>>>>>>>>>>>>>>>>>>>>>>
4750
];
4851

4952
$options = [

.php-cs-fixer.user-guide.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
'php_unit_internal_class' => false,
3434
'no_unused_imports' => false,
3535
'class_attributes_separation' => false,
36-
'phpdoc_separation' => [
36+
// <<<<<<<<<<<<<<<<<<<<<<<< @TODO TO BE REMOVED ONCE LIVE IN CODING-STANDARD
37+
'phpdoc_separation' => [
3738
'groups' => [
3839
['immutable', 'psalm-immutable'],
3940
['param', 'phpstan-param', 'psalm-param'],
@@ -46,6 +47,8 @@
4647
['var', 'phpstan-var', 'psalm-var'],
4748
],
4849
],
50+
'single_line_comment_spacing' => true,
51+
// >>>>>>>>>>>>>>>>>>>>>>>>>
4952
];
5053

5154
$options = [

app/Config/ContentSecurityPolicy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
*/
1616
class ContentSecurityPolicy extends BaseConfig
1717
{
18-
//-------------------------------------------------------------------------
18+
// -------------------------------------------------------------------------
1919
// Broadbrush CSP management
20-
//-------------------------------------------------------------------------
20+
// -------------------------------------------------------------------------
2121

2222
/**
2323
* Default CSP report context
@@ -43,10 +43,10 @@ class ContentSecurityPolicy extends BaseConfig
4343
*/
4444
public $upgradeInsecureRequests = false;
4545

46-
//-------------------------------------------------------------------------
46+
// -------------------------------------------------------------------------
4747
// Sources allowed
4848
// Note: once you set a policy to 'none', it cannot be further restricted
49-
//-------------------------------------------------------------------------
49+
// -------------------------------------------------------------------------
5050

5151
/**
5252
* Will default to self if not overridden

app/Config/Routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// where controller filters or CSRF protection are bypassed.
2626
// If you don't want to define all routes, please use the Auto Routing (Improved).
2727
// Set `$autoRoutesImproved` to true in `app/Config/Feature.php` and set the following to true.
28-
//$routes->setAutoRoute(false);
28+
// $routes->setAutoRoute(false);
2929

3030
/*
3131
* --------------------------------------------------------------------

app/Config/Validation.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
class Validation extends BaseConfig
1212
{
13-
//--------------------------------------------------------------------
13+
// --------------------------------------------------------------------
1414
// Setup
15-
//--------------------------------------------------------------------
15+
// --------------------------------------------------------------------
1616

1717
/**
1818
* Stores the classes that contain the
@@ -38,7 +38,7 @@ class Validation extends BaseConfig
3838
'single' => 'CodeIgniter\Validation\Views\single',
3939
];
4040

41-
//--------------------------------------------------------------------
41+
// --------------------------------------------------------------------
4242
// Rules
43-
//--------------------------------------------------------------------
43+
// --------------------------------------------------------------------
4444
}

system/API/ResponseTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ protected function fail($messages, int $status = 400, ?string $code = null, stri
136136
return $this->respond($response, $status, $customMessage);
137137
}
138138

139-
//--------------------------------------------------------------------
139+
// --------------------------------------------------------------------
140140
// Response Helpers
141-
//--------------------------------------------------------------------
141+
// --------------------------------------------------------------------
142142

143143
/**
144144
* Used after successfully creating a new resource.
@@ -290,9 +290,9 @@ protected function failServerError(string $description = 'Internal Server Error'
290290
return $this->fail($description, $this->codes['server_error'], $code, $message);
291291
}
292292

293-
//--------------------------------------------------------------------
293+
// --------------------------------------------------------------------
294294
// Utility Methods
295-
//--------------------------------------------------------------------
295+
// --------------------------------------------------------------------
296296

297297
/**
298298
* Handles formatting a response. Currently makes some heavy assumptions

system/CLI/CLI.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,9 @@ public static function wrap(?string $string = null, int $max = 0, int $padLeft =
756756
return $lines;
757757
}
758758

759-
//--------------------------------------------------------------------
759+
// --------------------------------------------------------------------
760760
// Command-Line 'URI' support
761-
//--------------------------------------------------------------------
761+
// --------------------------------------------------------------------
762762

763763
/**
764764
* Parses the command line it was called from and collects all

system/Cookie/Cookie.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ public static function setDefaults($config = [])
152152
return $oldDefaults;
153153
}
154154

155-
//=========================================================================
155+
// =========================================================================
156156
// CONSTRUCTORS
157-
//=========================================================================
157+
// =========================================================================
158158

159159
/**
160160
* Create a new Cookie instance from a `Set-Cookie` header.
@@ -238,9 +238,9 @@ final public function __construct(string $name, string $value = '', array $optio
238238
$this->raw = $raw;
239239
}
240240

241-
//=========================================================================
241+
// =========================================================================
242242
// GETTERS
243-
//=========================================================================
243+
// =========================================================================
244244

245245
/**
246246
* {@inheritDoc}
@@ -391,9 +391,9 @@ public function getOptions(): array
391391
];
392392
}
393393

394-
//=========================================================================
394+
// =========================================================================
395395
// CLONING
396-
//=========================================================================
396+
// =========================================================================
397397

398398
/**
399399
* {@inheritDoc}
@@ -556,9 +556,9 @@ public function withRaw(bool $raw = true)
556556
return $cookie;
557557
}
558558

559-
//=========================================================================
559+
// =========================================================================
560560
// ARRAY ACCESS FOR BC
561-
//=========================================================================
561+
// =========================================================================
562562

563563
/**
564564
* Whether an offset exists.
@@ -614,9 +614,9 @@ public function offsetUnset($offset): void
614614
throw new LogicException(sprintf('Cannot unset values of properties of %s as it is immutable.', static::class));
615615
}
616616

617-
//=========================================================================
617+
// =========================================================================
618618
// CONVERTERS
619-
//=========================================================================
619+
// =========================================================================
620620

621621
/**
622622
* {@inheritDoc}
@@ -716,9 +716,9 @@ protected static function convertExpiresTimestamp($expires = 0): int
716716
return $expires > 0 ? (int) $expires : 0;
717717
}
718718

719-
//=========================================================================
719+
// =========================================================================
720720
// VALIDATION
721-
//=========================================================================
721+
// =========================================================================
722722

723723
/**
724724
* Validates the cookie name per RFC 2616.

system/Database/BaseConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,9 +1352,9 @@ protected function getDriverFunctionPrefix(): string
13521352
return strtolower($this->DBDriver) . '_';
13531353
}
13541354

1355-
//--------------------------------------------------------------------
1355+
// --------------------------------------------------------------------
13561356
// META Methods
1357-
//--------------------------------------------------------------------
1357+
// --------------------------------------------------------------------
13581358

13591359
/**
13601360
* Returns an array of table names

system/Debug/Exceptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ protected function determineCodes(Throwable $exception): array
329329
return [$statusCode, $exitStatus];
330330
}
331331

332-
//--------------------------------------------------------------------
332+
// --------------------------------------------------------------------
333333
// Display Methods
334-
//--------------------------------------------------------------------
334+
// --------------------------------------------------------------------
335335

336336
/**
337337
* This makes nicer looking paths for the error output.

system/Files/FileCollection.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class FileCollection implements Countable, IteratorAggregate
3333
*/
3434
protected $files = [];
3535

36-
//--------------------------------------------------------------------
36+
// --------------------------------------------------------------------
3737
// Support Methods
38-
//--------------------------------------------------------------------
38+
// --------------------------------------------------------------------
3939

4040
/**
4141
* Resolves a full path and verifies it is an actual directory.
@@ -106,9 +106,9 @@ final protected static function matchFiles(array $files, string $pattern): array
106106
return array_filter($files, static fn ($value) => (bool) preg_match($pattern, basename($value)));
107107
}
108108

109-
//--------------------------------------------------------------------
109+
// --------------------------------------------------------------------
110110
// Class Core
111-
//--------------------------------------------------------------------
111+
// --------------------------------------------------------------------
112112

113113
/**
114114
* Loads the Filesystem helper and adds any initial files.
@@ -189,9 +189,9 @@ public function add($paths, bool $recursive = true)
189189
return $this;
190190
}
191191

192-
//--------------------------------------------------------------------
192+
// --------------------------------------------------------------------
193193
// File Handling
194-
//--------------------------------------------------------------------
194+
// --------------------------------------------------------------------
195195

196196
/**
197197
* Verifies and adds files to the list.
@@ -245,9 +245,9 @@ public function removeFile(string $file)
245245
return $this->removeFiles([$file]);
246246
}
247247

248-
//--------------------------------------------------------------------
248+
// --------------------------------------------------------------------
249249
// Directory Handling
250-
//--------------------------------------------------------------------
250+
// --------------------------------------------------------------------
251251

252252
/**
253253
* Verifies and adds files from each
@@ -287,9 +287,9 @@ public function addDirectory(string $directory, bool $recursive = false)
287287
return $this;
288288
}
289289

290-
//--------------------------------------------------------------------
290+
// --------------------------------------------------------------------
291291
// Filtering
292-
//--------------------------------------------------------------------
292+
// --------------------------------------------------------------------
293293

294294
/**
295295
* Removes any files from the list that match the supplied pattern
@@ -335,9 +335,9 @@ public function retainPattern(string $pattern, ?string $scope = null)
335335
return $this->removeFiles(array_diff($files, self::matchFiles($files, $pattern)));
336336
}
337337

338-
//--------------------------------------------------------------------
338+
// --------------------------------------------------------------------
339339
// Interface Methods
340-
//--------------------------------------------------------------------
340+
// --------------------------------------------------------------------
341341

342342
/**
343343
* Returns the current number of files in the collection.

system/Filters/Filters.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,9 @@ public function getArguments(?string $key = null)
382382
return $key === null ? $this->arguments : $this->arguments[$key];
383383
}
384384

385-
//--------------------------------------------------------------------
385+
// --------------------------------------------------------------------
386386
// Processors
387-
//--------------------------------------------------------------------
387+
// --------------------------------------------------------------------
388388

389389
/**
390390
* Add any applicable (not excluded) global filter settings to the mix.

system/HTTP/MessageTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ trait MessageTrait
3838
*/
3939
protected $headerMap = [];
4040

41-
//--------------------------------------------------------------------
41+
// --------------------------------------------------------------------
4242
// Body
43-
//--------------------------------------------------------------------
43+
// --------------------------------------------------------------------
4444

4545
/**
4646
* Sets the body of the current message.
@@ -70,9 +70,9 @@ public function appendBody($data): self
7070
return $this;
7171
}
7272

73-
//--------------------------------------------------------------------
73+
// --------------------------------------------------------------------
7474
// Headers
75-
//--------------------------------------------------------------------
75+
// --------------------------------------------------------------------
7676

7777
/**
7878
* Populates the $headers array with any headers the server knows about.

system/HTTP/Negotiate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ public function language(array $supported): string
122122
return $this->getBestMatch($supported, $this->request->getHeaderLine('accept-language'), false, false, true);
123123
}
124124

125-
//--------------------------------------------------------------------
125+
// --------------------------------------------------------------------
126126
// Utility Methods
127-
//--------------------------------------------------------------------
127+
// --------------------------------------------------------------------
128128

129129
/**
130130
* Does the grunt work of comparing any of the app-supported values

0 commit comments

Comments
 (0)