File tree 5 files changed +13
-13
lines changed
5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -296,4 +296,4 @@ The project run's automatic checks to make sure that the Symfony code standards
296
296
So, before pushing or making any pull request run the below command:
297
297
298
298
* ` composer test ` : For running test
299
- * ` composer lint ` : For running php-cs-fixer to check that the code meet the set standard
299
+ * ` composer fixlint ` : For running php-cs-fixer to fix linting errors
Original file line number Diff line number Diff line change 8
8
9
9
class JsonConverter implements ConverterHandlerInterface
10
10
{
11
- const FILE_EXTENSION = 'json ' ;
11
+ public const FILE_EXTENSION = 'json ' ;
12
12
13
13
/**
14
14
* The converted data.
@@ -37,6 +37,6 @@ public function convert(array $data): ConverterHandlerInterface
37
37
38
38
public function write (string $ filename ): bool
39
39
{
40
- return (file_put_contents ($ filename , $ this ->data )) ? true : false ;
40
+ return (bool ) file_put_contents ($ filename , $ this ->data );
41
41
}
42
42
}
Original file line number Diff line number Diff line change 10
10
11
11
class XmlConverter implements ConverterHandlerInterface
12
12
{
13
- const FILE_EXTENSION = 'xml ' ;
14
- const DEFAULT_ROOT_ELEMENT = 'data ' ;
15
- const DEFAULT_RECORD_ELEMENT = 'item ' ;
13
+ public const FILE_EXTENSION = 'xml ' ;
14
+ public const DEFAULT_ROOT_ELEMENT = 'data ' ;
15
+ public const DEFAULT_RECORD_ELEMENT = 'item ' ;
16
16
17
17
/**
18
18
* XML node root element.
@@ -79,6 +79,6 @@ public function write(string $filename): bool
79
79
80
80
$ dom ->appendChild ($ domXml );
81
81
82
- return ($ dom ->save ($ filename )) ? true : false ;
82
+ return (bool ) $ dom ->save ($ filename );
83
83
}
84
84
}
Original file line number Diff line number Diff line change 8
8
9
9
class Url implements ValidationRuleInterface
10
10
{
11
- const PATTERN = '~^
11
+ public const PATTERN = '~^
12
12
(%s):// # protocol
13
13
(([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
14
14
(
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ class Validator
14
14
{
15
15
use FormatsMessages;
16
16
17
- const FILE_EXTENSION = '.csv ' ;
18
- const ERROR_MESSAGE = 'Validation fails. ' ;
19
- const NO_ERROR_MESSAGE = 'File is valid. ' ;
20
- const INVALID_FILE_PATH_ERROR = 'Supplied file is not accessible. ' ;
21
- const SUCCESS_MESSAGE = 'CSV is valid. ' ;
17
+ public const FILE_EXTENSION = '.csv ' ;
18
+ public const ERROR_MESSAGE = 'Validation fails. ' ;
19
+ public const NO_ERROR_MESSAGE = 'File is valid. ' ;
20
+ public const INVALID_FILE_PATH_ERROR = 'Supplied file is not accessible. ' ;
21
+ public const SUCCESS_MESSAGE = 'CSV is valid. ' ;
22
22
23
23
/**
24
24
* The message bag instance.
You can’t perform that action at this time.
0 commit comments