Skip to content

Commit a6cfb8c

Browse files
authored
Remove useless code separator comments (#4946)
1 parent 36152b3 commit a6cfb8c

File tree

264 files changed

+48
-5324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+48
-5324
lines changed

app/Config/Database.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ class Database extends Config
7676
'port' => 3306,
7777
];
7878

79-
//--------------------------------------------------------------------
80-
8179
public function __construct()
8280
{
8381
parent::__construct();
@@ -89,6 +87,4 @@ public function __construct()
8987
$this->defaultGroup = 'tests';
9088
}
9189
}
92-
93-
//--------------------------------------------------------------------
9490
}

app/Config/Format.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ class Format extends BaseConfig
6161
'text/xml' => 0,
6262
];
6363

64-
//--------------------------------------------------------------------
65-
6664
/**
6765
* A Factory method to return the appropriate formatter for the given mime type.
6866
*

app/Controllers/BaseController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,8 @@ public function initController(RequestInterface $request, ResponseInterface $res
4949
// Do Not Edit This Line
5050
parent::initController($request, $response, $logger);
5151

52-
//--------------------------------------------------------------------
5352
// Preload any models, libraries, etc, here.
54-
//--------------------------------------------------------------------
53+
5554
// E.g.: $this->session = \Config\Services::session();
5655
}
5756
}

app/Views/errors/html/debug.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
//--------------------------------------------------------------------
21
// Tabs
3-
//--------------------------------------------------------------------
42

53
var tabLinks = new Array();
64
var contentDivs = new Array();
@@ -52,8 +50,6 @@ function init()
5250
}
5351
}
5452

55-
//--------------------------------------------------------------------
56-
5753
function showTab()
5854
{
5955
var selectedId = getHash(this.getAttribute('href'));
@@ -78,8 +74,6 @@ function showTab()
7874
return false;
7975
}
8076

81-
//--------------------------------------------------------------------
82-
8377
function getFirstChildWithTagName(element, tagName)
8478
{
8579
for (var i = 0; i < element.childNodes.length; i ++)
@@ -91,16 +85,12 @@ function getFirstChildWithTagName(element, tagName)
9185
}
9286
}
9387

94-
//--------------------------------------------------------------------
95-
9688
function getHash(url)
9789
{
9890
var hashPos = url.lastIndexOf('#');
9991
return url.substring(hashPos + 1);
10092
}
10193

102-
//--------------------------------------------------------------------
103-
10494
function toggle(elem)
10595
{
10696
elem = document.getElementById(elem);
@@ -125,4 +115,4 @@ function toggle(elem)
125115
elem.style.display = disp == 'block' ? 'none' : 'block';
126116

127117
return false;
128-
}
118+
}

contributing/styleguide.rst

Lines changed: 24 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -266,61 +266,38 @@ An example::
266266

267267
<?php
268268

269-
/**
270-
* CodeIgniter
271-
*
272-
* An open source application development framework for PHP
273-
*
274-
...
275-
*
276-
* @package CodeIgniter
277-
* @author CodeIgniter Dev Team
278-
* @copyright 2014-2019 British Columbia Institute of Technology (https://bcit.ca/)
279-
* @license https://opensource.org/licenses/MIT MIT License
280-
* @link https://codeigniter.com
281-
* @since Version 4.0.0
282-
* @filesource
283-
*/
284269
namespace CodeIgniter\Fruit;
270+
285271
use CodeIgniter\Config\BaseConfig;
286272

287273
/**
288274
* Base class for entities in the CodeIgniter\Fruit module.
289-
*
290-
* @property $group
291-
* @property $name
292-
* @property $description
293-
*
294-
* @package CodeIgniter\Fruit
295275
*/
296276
abstract class BaseFruit
297277
{
298-
299-
/**
300-
* The group a fruit belongs to.
301-
*
302-
* @var string
303-
*/
304-
protected $group;
305-
306-
/**
307-
* Fruit constructor.
308-
*
309-
* @param BaseConfig $config
310-
*/
311-
public function __construct(BaseConfig $Config)
312-
{
313-
$this->group = 'Unknown';
314-
}
315-
316-
//--------------------------------------------------------------------
317-
318-
/**
319-
* Model a fruit ripening over time.
320-
*
321-
* @param array $params
322-
*/
323-
abstract public function ripen(array $params);
278+
/**
279+
* The group a fruit belongs to.
280+
*
281+
* @var string
282+
*/
283+
protected $group;
284+
285+
/**
286+
* Fruit constructor.
287+
*
288+
* @param BaseConfig $config
289+
*/
290+
public function __construct(BaseConfig $Config)
291+
{
292+
$this->group = 'Unknown';
293+
}
294+
295+
/**
296+
* Model a fruit ripening over time.
297+
*
298+
* @param array $params
299+
*/
300+
abstract public function ripen(array $params);
324301
}
325302

326303
Other

system/API/ResponseTrait.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ trait ResponseTrait
8181
*/
8282
protected $formatter;
8383

84-
//--------------------------------------------------------------------
85-
8684
/**
8785
* Provides a single, simple method to return an API response, formatted
8886
* to match the requested format, with proper content-type and status code.
@@ -123,8 +121,6 @@ public function respond($data = null, ?int $status = null, string $message = '')
123121
return $this->response->setBody($output)->setStatusCode($status, $message);
124122
}
125123

126-
//--------------------------------------------------------------------
127-
128124
/**
129125
* Used for generic failures that no custom methods exist for.
130126
*
@@ -150,7 +146,6 @@ public function fail($messages, int $status = 400, ?string $code = null, string
150146
return $this->respond($response, $status, $customMessage);
151147
}
152148

153-
//--------------------------------------------------------------------
154149
//--------------------------------------------------------------------
155150
// Response Helpers
156151
//--------------------------------------------------------------------
@@ -168,8 +163,6 @@ public function respondCreated($data = null, string $message = '')
168163
return $this->respond($data, $this->codes['created'], $message);
169164
}
170165

171-
//--------------------------------------------------------------------
172-
173166
/**
174167
* Used after a resource has been successfully deleted.
175168
*
@@ -196,8 +189,6 @@ public function respondUpdated($data = null, string $message = '')
196189
return $this->respond($data, $this->codes['updated'], $message);
197190
}
198191

199-
//--------------------------------------------------------------------
200-
201192
/**
202193
* Used after a command has been successfully executed but there is no
203194
* meaningful reply to send back to the client.
@@ -211,8 +202,6 @@ public function respondNoContent(string $message = 'No Content')
211202
return $this->respond(null, $this->codes['no_content'], $message);
212203
}
213204

214-
//--------------------------------------------------------------------
215-
216205
/**
217206
* Used when the client is either didn't send authorization information,
218207
* or had bad authorization credentials. User is encouraged to try again
@@ -229,8 +218,6 @@ public function failUnauthorized(string $description = 'Unauthorized', ?string $
229218
return $this->fail($description, $this->codes['unauthorized'], $code, $message);
230219
}
231220

232-
//--------------------------------------------------------------------
233-
234221
/**
235222
* Used when access is always denied to this resource and no amount
236223
* of trying again will help.
@@ -246,8 +233,6 @@ public function failForbidden(string $description = 'Forbidden', ?string $code =
246233
return $this->fail($description, $this->codes['forbidden'], $code, $message);
247234
}
248235

249-
//--------------------------------------------------------------------
250-
251236
/**
252237
* Used when a specified resource cannot be found.
253238
*
@@ -262,8 +247,6 @@ public function failNotFound(string $description = 'Not Found', ?string $code =
262247
return $this->fail($description, $this->codes['resource_not_found'], $code, $message);
263248
}
264249

265-
//--------------------------------------------------------------------
266-
267250
/**
268251
* Used when the data provided by the client cannot be validated.
269252
*
@@ -294,8 +277,6 @@ public function failValidationErrors($errors, ?string $code = null, string $mess
294277
return $this->fail($errors, $this->codes['invalid_data'], $code, $message);
295278
}
296279

297-
//--------------------------------------------------------------------
298-
299280
/**
300281
* Use when trying to create a new resource and it already exists.
301282
*
@@ -310,8 +291,6 @@ public function failResourceExists(string $description = 'Conflict', ?string $co
310291
return $this->fail($description, $this->codes['resource_exists'], $code, $message);
311292
}
312293

313-
//--------------------------------------------------------------------
314-
315294
/**
316295
* Use when a resource was previously deleted. This is different than
317296
* Not Found, because here we know the data previously existed, but is now gone,
@@ -328,8 +307,6 @@ public function failResourceGone(string $description = 'Gone', ?string $code = n
328307
return $this->fail($description, $this->codes['resource_gone'], $code, $message);
329308
}
330309

331-
//--------------------------------------------------------------------
332-
333310
/**
334311
* Used when the user has made too many requests for the resource recently.
335312
*
@@ -344,8 +321,6 @@ public function failTooManyRequests(string $description = 'Too Many Requests', ?
344321
return $this->fail($description, $this->codes['too_many_requests'], $code, $message);
345322
}
346323

347-
//--------------------------------------------------------------------
348-
349324
/**
350325
* Used when there is a server error.
351326
*

0 commit comments

Comments
 (0)