Skip to content

Commit 66dfd78

Browse files
committed
Dev: phpstan error
1 parent fd758c5 commit 66dfd78

File tree

3 files changed

+20
-134
lines changed

3 files changed

+20
-134
lines changed

Editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function __construct($db = null, $table = null, $pkey = null)
146146
*/
147147

148148
/** @var string */
149-
public $version = '2.4.3';
149+
public $version = '2.5.0-dev';
150150

151151
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
152152
* Private properties

Editor/Validate.php

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@ public static function none()
277277
* available or required for this validation method.
278278
* @callback-param array $host Host information
279279
*
280-
* @return string|true true if the value is valid, a string with an error
281-
* message otherwise.
280+
* @return callable Validation function
282281
*/
283282
public static function basic($cfg = null)
284283
{
@@ -310,8 +309,7 @@ public static function basic($cfg = null)
310309
* available or required for this validation method.
311310
* @callback-param array $host Host information
312311
*
313-
* @return string|true true if the value is valid, a string with an error
314-
* message otherwise.
312+
* @return callable Validation function
315313
*/
316314
public static function required($cfg = null)
317315
{
@@ -366,8 +364,7 @@ public static function notEmpty($cfg = null)
366364
* available or required for this validation method.
367365
* @callback-param array $host Host information
368366
*
369-
* @return string|true true if the value is valid, a string with an error
370-
* message otherwise.
367+
* @return callable Validation function
371368
*/
372369
public static function boolean($cfg = null)
373370
{
@@ -404,8 +401,7 @@ public static function boolean($cfg = null)
404401
* as the decimal
405402
* @callback-param array $host Host information
406403
*
407-
* @return string|true true if the value is valid, a string with an error
408-
* message otherwise.
404+
* @return callable Validation function
409405
*/
410406
public static function numeric($decimal = '.', $cfg = null)
411407
{
@@ -444,8 +440,7 @@ public static function numeric($decimal = '.', $cfg = null)
444440
* separator (default '.').
445441
* @callback-param array $host Host information
446442
*
447-
* @return string|true true if the value is valid, a string with an error
448-
* message otherwise.
443+
* @return callable Validation function
449444
*/
450445
public static function minNum($min, $decimal = '.', $cfg = null)
451446
{
@@ -490,8 +485,7 @@ public static function minNum($min, $decimal = '.', $cfg = null)
490485
* as the decimal
491486
* @callback-param array $host Host information
492487
*
493-
* @return string|true true if the value is valid, a string with an error
494-
* message otherwise.
488+
* @return callable Validation function
495489
*/
496490
public static function maxNum($max, $decimal = '.', $cfg = null)
497491
{
@@ -536,8 +530,7 @@ public static function maxNum($max, $decimal = '.', $cfg = null)
536530
* as the decimal
537531
* @callback-param array $host Host information
538532
*
539-
* @return string|true true if the value is valid, a string with an error
540-
* message otherwise.
533+
* @return callable Validation function
541534
*/
542535
public static function minMaxNum($min, $max, $decimal = '.', $cfg = null)
543536
{
@@ -590,8 +583,7 @@ public static function minMaxNum($min, $max, $decimal = '.', $cfg = null)
590583
* available or required for this validation method.
591584
* @callback-param array $host Host information
592585
*
593-
* @return string|true true if the value is valid, a string with an error
594-
* message otherwise.
586+
* @return callable Validation function
595587
*/
596588
public static function email($cfg = null)
597589
{
@@ -624,8 +616,7 @@ public static function email($cfg = null)
624616
* minimum string length.
625617
* @callback-param array $host Host information
626618
*
627-
* @return string|true true if the value is valid, a string with an error
628-
* message otherwise.
619+
* @return callable Validation function
629620
*/
630621
public static function minLen($min, $cfg = null)
631622
{
@@ -662,8 +653,7 @@ public static function minLen($min, $cfg = null)
662653
* maximum string length.
663654
* @callback-param array $host Host information
664655
*
665-
* @return string|true true if the value is valid, a string with an error
666-
* message otherwise.
656+
* @return callable Validation function
667657
*/
668658
public static function maxLen($max, $cfg = null)
669659
{
@@ -698,8 +688,7 @@ public static function maxLen($max, $cfg = null)
698688
* and maximum string lengths, respectively.
699689
* @callback-param array $host Host information
700690
*
701-
* @return string|true true if the value is valid, a string with an error
702-
* message otherwise.
691+
* @return callable Validation function
703692
*/
704693
public static function minMaxLen($min, $max, $cfg = null)
705694
{
@@ -741,8 +730,7 @@ public static function minMaxLen($min, $max, $cfg = null)
741730
* available or required for this validation method.
742731
* @callback-param array $host Host information
743732
*
744-
* @return string|true true if the value is valid, a string with an error
745-
* message otherwise.
733+
* @return callable Validation function
746734
*/
747735
public static function ip($cfg = null)
748736
{
@@ -772,8 +760,7 @@ public static function ip($cfg = null)
772760
* available or required for this validation method.
773761
* @callback-param array $host Host information
774762
*
775-
* @return string|true true if the value is valid, a string with an error
776-
* message otherwise.
763+
* @return callable Validation function
777764
*/
778765
public static function url($cfg = null)
779766
{
@@ -806,8 +793,7 @@ public static function url($cfg = null)
806793
* automatically derived from the Editor and Field instances.
807794
* @callback-param array $host Host information
808795
*
809-
* @return string|true true if the value is valid, a string with an error
810-
* message otherwise.
796+
* @return callable Validation function
811797
*/
812798
public static function xss($cfg = null)
813799
{
@@ -840,8 +826,7 @@ public static function xss($cfg = null)
840826
* automatically derived from the Editor and Field instances.
841827
* @callback-param array $host Host information
842828
*
843-
* @return string|true true if the value is valid, a string with an error
844-
* message otherwise.
829+
* @return callable Validation function
845830
*/
846831
public static function values($values, $cfg = null)
847832
{
@@ -874,8 +859,7 @@ public static function values($values, $cfg = null)
874859
* automatically derived from the Editor and Field instances.
875860
* @callback-param array $host Host information
876861
*
877-
* @return string|true true if the value is valid, a string with an error
878-
* message otherwise.
862+
* @return callable Validation function
879863
*/
880864
public static function noTags($cfg = null)
881865
{
@@ -911,8 +895,7 @@ public static function noTags($cfg = null)
911895
* message in the 'message' parameter.
912896
* @callback-param array $host Host information
913897
*
914-
* @return string|true true if the value is valid, a string with an error
915-
* message otherwise.
898+
* @return callable Validation function
916899
*/
917900
public static function dateFormat($format, $cfg = null)
918901
{
@@ -955,8 +938,7 @@ public static function dateFormat($format, $cfg = null)
955938
* automatically derived from the Editor and Field instances.
956939
* @callback-param array $host Host information
957940
*
958-
* @return string|true true if the value is valid, a string with an error
959-
* message otherwise.
941+
* @return callable Validation function
960942
*/
961943
public static function unique($cfg = null, $column = null, $table = null, $db = null)
962944
{
@@ -1021,8 +1003,7 @@ public static function unique($cfg = null, $column = null, $table = null, $db =
10211003
* automatically derived from the Editor and Field instances.
10221004
* @callback-param array $host Host information
10231005
*
1024-
* @return string|true true if the value is valid, a string with an error
1025-
* message otherwise.
1006+
* @return callable Validation function
10261007
*/
10271008
public static function dbValues($cfg = null, $column = null, $table = null, $db = null, $values = [])
10281009
{

phpstan-baseline.neon

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -315,98 +315,3 @@ parameters:
315315
count: 1
316316
path: Editor/Upload.php
317317

318-
-
319-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:basic\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
320-
count: 1
321-
path: Editor/Validate.php
322-
323-
-
324-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:boolean\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
325-
count: 1
326-
path: Editor/Validate.php
327-
328-
-
329-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:dateFormat\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
330-
count: 1
331-
path: Editor/Validate.php
332-
333-
-
334-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:dbValues\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
335-
count: 1
336-
path: Editor/Validate.php
337-
338-
-
339-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:email\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
340-
count: 1
341-
path: Editor/Validate.php
342-
343-
-
344-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:ip\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
345-
count: 1
346-
path: Editor/Validate.php
347-
348-
-
349-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:maxLen\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
350-
count: 1
351-
path: Editor/Validate.php
352-
353-
-
354-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:maxNum\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
355-
count: 1
356-
path: Editor/Validate.php
357-
358-
-
359-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:minLen\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
360-
count: 1
361-
path: Editor/Validate.php
362-
363-
-
364-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:minMaxLen\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
365-
count: 1
366-
path: Editor/Validate.php
367-
368-
-
369-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:minMaxNum\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
370-
count: 1
371-
path: Editor/Validate.php
372-
373-
-
374-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:minNum\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
375-
count: 1
376-
path: Editor/Validate.php
377-
378-
-
379-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:noTags\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
380-
count: 1
381-
path: Editor/Validate.php
382-
383-
-
384-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:numeric\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
385-
count: 1
386-
path: Editor/Validate.php
387-
388-
-
389-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:required\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
390-
count: 1
391-
path: Editor/Validate.php
392-
393-
-
394-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:unique\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
395-
count: 1
396-
path: Editor/Validate.php
397-
398-
-
399-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:url\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
400-
count: 1
401-
path: Editor/Validate.php
402-
403-
-
404-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:values\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
405-
count: 1
406-
path: Editor/Validate.php
407-
408-
-
409-
message: "#^Method DataTables\\\\Editor\\\\Validate\\:\\:xss\\(\\) should return string\\|true but returns Closure\\(mixed, mixed, mixed, mixed\\)\\: mixed\\.$#"
410-
count: 1
411-
path: Editor/Validate.php
412-

0 commit comments

Comments
 (0)