Skip to content

Commit 1f08145

Browse files
committed
Correction in Methods and Spellings
1 parent e00c828 commit 1f08145

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

system/CodeIgniter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function useSafeOutput(bool $safe = true)
280280
* @return \CodeIgniter\HTTP\RequestInterface|\CodeIgniter\HTTP\Response|\CodeIgniter\HTTP\ResponseInterface|mixed
281281
* @throws \CodeIgniter\Filters\Exceptions\FilterException
282282
*/
283-
protected function handleRequest(RouteCollectionInterface $routes, $cacheConfig, bool $returnResponse = false)
283+
protected function handleRequest(RouteCollectionInterface $routes = null, $cacheConfig, bool $returnResponse = false)
284284
{
285285
$routeFilter = $this->tryToRouteIt($routes);
286286

@@ -685,7 +685,7 @@ public function displayPerformanceMetrics(string $output): string
685685
*
686686
* @return string
687687
*/
688-
protected function tryToRouteIt(RouteCollectionInterface $routes)
688+
protected function tryToRouteIt(RouteCollectionInterface $routes = null)
689689
{
690690
if (empty($routes) || ! $routes instanceof RouteCollectionInterface)
691691
{

system/Validation/FormatRules.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ public function valid_emails(string $str = null): bool
320320
*
321321
* @return boolean
322322
*/
323-
public function valid_ip(string $ip, string $which, array $data): bool
323+
public function valid_ip(string $ip = null, string $which = null, array $data): bool
324324
{
325325
switch (strtolower($which))
326326
{

system/Validation/Rules.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class Rules
5656
*
5757
* @return boolean
5858
*/
59-
public function differs(string $str, string $field, array $data): bool
59+
public function differs(string $str = null, string $field, array $data): bool
6060
{
6161
return array_key_exists($field, $data) ? ($str !== $data[$field]) : false;
6262
}
@@ -72,7 +72,7 @@ public function differs(string $str, string $field, array $data): bool
7272
*
7373
* @return boolean
7474
*/
75-
public function exact_length(string $str, string $val, array $data): bool
75+
public function exact_length(string $str = null, string $val, array $data): bool
7676
{
7777
if (! is_numeric($val))
7878
{
@@ -93,7 +93,7 @@ public function exact_length(string $str, string $val, array $data): bool
9393
*
9494
* @return boolean
9595
*/
96-
public function greater_than(string $str, string $min, array $data): bool
96+
public function greater_than(string $str = null, string $min, array $data): bool
9797
{
9898
return is_numeric($str) ? ($str > $min) : false;
9999
}
@@ -109,7 +109,7 @@ public function greater_than(string $str, string $min, array $data): bool
109109
*
110110
* @return boolean
111111
*/
112-
public function greater_than_equal_to(string $str, string $min, array $data): bool
112+
public function greater_than_equal_to(string $str = null, string $min, array $data): bool
113113
{
114114
return is_numeric($str) ? ($str >= $min) : false;
115115
}
@@ -124,7 +124,7 @@ public function greater_than_equal_to(string $str, string $min, array $data): bo
124124
* @param array $data
125125
* @return boolean
126126
*/
127-
public function in_list(string $value, string $list, array $data): bool
127+
public function in_list(string $value = null, string $list, array $data): bool
128128
{
129129
$list = explode(',', $list);
130130
$list = array_map(function ($value) {
@@ -150,7 +150,7 @@ public function in_list(string $value, string $list, array $data): bool
150150
*
151151
* @return boolean
152152
*/
153-
public function is_unique(string $str, string $field, array $data): bool
153+
public function is_unique(string $str = null, string $field, array $data): bool
154154
{
155155
// Grab any data for exclusion of a single row.
156156
list($field, $ignoreField, $ignoreValue) = array_pad(explode(',', $field), 3, null);
@@ -184,7 +184,7 @@ public function is_unique(string $str, string $field, array $data): bool
184184
*
185185
* @return boolean
186186
*/
187-
public function less_than(string $str, string $max): bool
187+
public function less_than(string $str = null, string $max): bool
188188
{
189189
return is_numeric($str) ? ($str < $max) : false;
190190
}
@@ -199,7 +199,7 @@ public function less_than(string $str, string $max): bool
199199
*
200200
* @return boolean
201201
*/
202-
public function less_than_equal_to(string $str, string $max): bool
202+
public function less_than_equal_to(string $str = null, string $max): bool
203203
{
204204
return is_numeric($str) ? ($str <= $max) : false;
205205
}
@@ -215,7 +215,7 @@ public function less_than_equal_to(string $str, string $max): bool
215215
*
216216
* @return boolean
217217
*/
218-
public function matches(string $str, string $field, array $data): bool
218+
public function matches(string $str = null, string $field, array $data): bool
219219
{
220220
return array_key_exists($field, $data) ? ($str === $data[$field]) : false;
221221
}
@@ -231,7 +231,7 @@ public function matches(string $str, string $field, array $data): bool
231231
*
232232
* @return boolean
233233
*/
234-
public function max_length(string $str, string $val, array $data): bool
234+
public function max_length(string $str = null, string $val, array $data): bool
235235
{
236236
if (! is_numeric($val))
237237
{
@@ -252,7 +252,7 @@ public function max_length(string $str, string $val, array $data): bool
252252
*
253253
* @return boolean
254254
*/
255-
public function min_length(string $str, string $val, array $data): bool
255+
public function min_length(string $str = null, string $val, array $data): bool
256256
{
257257
if (! is_numeric($val))
258258
{
@@ -271,7 +271,7 @@ public function min_length(string $str, string $val, array $data): bool
271271
*
272272
* @return boolean True if valid, false if not
273273
*/
274-
public function required($str): bool
274+
public function required($str = null): bool
275275
{
276276
if (is_object($str))
277277
{
@@ -297,7 +297,7 @@ public function required($str): bool
297297
*
298298
* @return boolean
299299
*/
300-
public function required_with($str, string $fields, array $data): bool
300+
public function required_with($str = null, string $fields, array $data): bool
301301
{
302302
$fields = explode(',', $fields);
303303

@@ -349,7 +349,7 @@ public function required_with($str, string $fields, array $data): bool
349349
*
350350
* @return boolean
351351
*/
352-
public function required_without($str, string $fields, array $data): bool
352+
public function required_without($str = null, string $fields, array $data): bool
353353
{
354354
$fields = explode(',', $fields);
355355

0 commit comments

Comments
 (0)