Skip to content

Commit a5fc95b

Browse files
authored
Merge pull request #1769 from atishamte/develop
Correction in Methods and Spellings
2 parents 559adb2 + 4a5c741 commit a5fc95b

File tree

12 files changed

+24
-23
lines changed

12 files changed

+24
-23
lines changed

system/CodeIgniter.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function initialize()
199199
* @param \CodeIgniter\Router\RouteCollectionInterface $routes
200200
* @param boolean $returnResponse
201201
*
202-
* @throws \CodeIgniter\HTTP\RedirectException
202+
* @throws \CodeIgniter\Filters\Exceptions\FilterException
203203
* @throws \Exception
204204
*/
205205
public function run(RouteCollectionInterface $routes = null, bool $returnResponse = false)
@@ -234,7 +234,7 @@ public function run(RouteCollectionInterface $routes = null, bool $returnRespons
234234
{
235235
return $this->handleRequest($routes, $cacheConfig, $returnResponse);
236236
}
237-
catch (Router\RedirectException $e)
237+
catch (\CodeIgniter\Filters\Exceptions\FilterException $e)
238238
{
239239
$logger = Services::logger();
240240
$logger->info('REDIRECTED ROUTE at ' . $e->getMessage());
@@ -533,7 +533,7 @@ protected function forceSecureAccess($duration = 31536000)
533533
*
534534
* @throws \Exception
535535
*
536-
* @return boolean
536+
* @return bool|\CodeIgniter\HTTP\ResponseInterface
537537
*/
538538
public function displayCache($config)
539539
{
@@ -564,7 +564,9 @@ public function displayCache($config)
564564
$this->response->setBody($output);
565565

566566
return $this->response;
567-
};
567+
}
568+
569+
return false;
568570
}
569571

570572
//--------------------------------------------------------------------
@@ -574,7 +576,7 @@ public function displayCache($config)
574576
*
575577
* @param integer $time
576578
*
577-
* @return $this
579+
* @return void
578580
*/
579581
public static function cache(int $time)
580582
{

system/Controller.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @since Version 3.0.0
3636
* @filesource
3737
*/
38-
38+
use CodeIgniter\Config\Services;
3939
use CodeIgniter\HTTP\RequestInterface;
4040
use CodeIgniter\HTTP\ResponseInterface;
4141
use CodeIgniter\Validation\Validation;
@@ -106,7 +106,7 @@ class Controller
106106
* @param ResponseInterface $response
107107
* @param \Psr\Log\LoggerInterface $logger
108108
*
109-
* @throws \CodeIgniter\HTTP\RedirectException
109+
* @throws \CodeIgniter\HTTP\Exceptions\HTTPException
110110
*/
111111
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
112112
{
@@ -135,7 +135,7 @@ public function initController(RequestInterface $request, ResponseInterface $res
135135
* considered secure for. Only with HSTS header.
136136
* Default value is 1 year.
137137
*
138-
* @throws \CodeIgniter\HTTP\RedirectException
138+
* @throws \CodeIgniter\HTTP\Exceptions\HTTPException
139139
*/
140140
public function forceHTTPS(int $duration = 31536000)
141141
{
@@ -179,8 +179,8 @@ protected function loadHelpers()
179179
* A shortcut to performing validation on input data. If validation
180180
* is not successful, a $errors property will be set on this class.
181181
*
182-
* @param array $rules
183-
* @param array $messages An array of custom error messages
182+
* @param array|string $rules
183+
* @param array $messages An array of custom error messages
184184
*
185185
* @return boolean
186186
*/

system/Entity.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php namespace CodeIgniter;
22

33
use CodeIgniter\I18n\Time;
4+
use CodeIgniter\Exceptions\CastException;
45

56
/**
67
* CodeIgniter

system/HTTP/Header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function getName()
9191

9292
/**
9393
* Gets the raw value of the header. This may return either a string
94-
* of an array, depending on whether the header has mutliple values or not.
94+
* of an array, depending on whether the header has multiple values or not.
9595
*
9696
* @return array|null|string
9797
*/

system/Model.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,6 @@ public function find($id = null)
343343
$this->tempReturnType = $this->returnType;
344344
$this->tempUseSoftDeletes = $this->useSoftDeletes;
345345

346-
$this->reset();
347-
348346
return $row['data'];
349347
}
350348

system/Router/RouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ class RouteCollection implements RouteCollectionInterface
223223
* Constructor
224224
*
225225
* @param FileLocator $locator
226-
* @param Config/Modules $moduleConfig
226+
* @param \Config\Modules $moduleConfig
227227
*/
228228
public function __construct(FileLocator $locator, $moduleConfig)
229229
{

system/Session/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Session implements SessionInterface
5252
/**
5353
* Instance of the driver to use.
5454
*
55-
* @var HandlerInterface
55+
* @var \CodeIgniter\Log\Handlers\HandlerInterface
5656
*/
5757
protected $driver;
5858

system/Test/ControllerTester.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function controller(string $name)
110110
* @param string $method
111111
* @param array $params
112112
*
113-
* @return \CodeIgniter\TestControllerResponse
113+
* @return \CodeIgniter\Test\ControllerResponse|\InvalidArgumentException
114114
*/
115115
public function execute(string $method, ...$params)
116116
{

system/Validation/Validation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,13 +540,13 @@ protected function loadRuleSets()
540540
*
541541
* @param string|null $group
542542
*
543-
* @return array|void
543+
* @return array|ValidationException|null
544544
*/
545545
public function loadRuleGroup(string $group = null)
546546
{
547547
if (empty($group))
548548
{
549-
return;
549+
return null;
550550
}
551551

552552
if (! isset($this->config->$group))

system/View/Filters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public static function prose(string $value): string
309309
*
310310
* @return string
311311
*/
312-
public static function round($value, $precision = 2, $type = 'common')
312+
public static function round($value, $precision = 2, $type = 'common'): string
313313
{
314314
if (! is_numeric($precision))
315315
{

system/View/Parser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ protected function parseConditionals(string $template): string
530530
extract($this->data);
531531
try
532532
{
533-
$result = eval('?>' . $template . '<?php ');
533+
eval('?>' . $template . '<?php ');
534534
}
535535
catch (\ParseError $e)
536536
{
@@ -627,7 +627,7 @@ protected function prepareReplacement(array $matches, string $replace, bool $esc
627627
*
628628
* @param string $key
629629
*
630-
* @return false|html
630+
* @return false|string
631631
*/
632632
public function shouldAddEscaping(string $key)
633633
{

system/View/View.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class View implements RendererInterface
8181
/**
8282
* Logger instance.
8383
*
84-
* @var Logger
84+
* @var \CodeIgniter\Log\Logger
8585
*/
8686
protected $logger;
8787

@@ -414,7 +414,7 @@ public function getData()
414414
*
415415
* @param string $layout
416416
*
417-
* @return $this
417+
* @return void
418418
*/
419419
public function extend(string $layout)
420420
{

0 commit comments

Comments
 (0)