File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,9 @@ public function isSubmittedBy(): bool
6565 * Sets the validation scope. Clicking the button validates only the controls within the specified scope.
6666 * @return static
6767 */
68- public function setValidationScope (/* array*/ $ scope = NULL )
68+ public function setValidationScope (? array $ scope )
6969 {
70- if ($ scope === NULL || $ scope === TRUE ) {
70+ if ($ scope === NULL ) {
7171 $ this ->validationScope = NULL ;
7272 } else {
7373 $ this ->validationScope = [];
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ test(function () { // SubmitButton
8484
8585test (function () { // SubmitButton with scope
8686 $ form = new Form ;
87- $ input = $ form ->addSubmit ('button ' , 'Caption ' )->setValidationScope (FALSE );
87+ $ input = $ form ->addSubmit ('button ' , 'Caption ' )->setValidationScope ([] );
8888
8989 Assert::same ('<input type="submit" name="button" value="Caption" formnovalidate> ' , (string ) $ input ->getControl ());
9090});
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ foreach ($datasets as $case) {
3838 $ details ->addText ('age2 ' )->setRequired ('age2 ' );
3939
4040 $ form ->addSubmit ('send1 ' );
41- $ form ->addSubmit ('send2 ' )->setValidationScope (FALSE );
41+ $ form ->addSubmit ('send2 ' )->setValidationScope ([] );
4242 $ form ->addSubmit ('send3 ' )->setValidationScope ([$ form ['name ' ]]);
4343 $ form ->addSubmit ('send4 ' )->setValidationScope ([$ form ['details ' ]['age ' ]]);
4444 $ form ->addSubmit ('send5 ' )->setValidationScope ([$ form ['details ' ]]);
You can’t perform that action at this time.
0 commit comments