File tree Expand file tree Collapse file tree 5 files changed +13
-13
lines changed Expand file tree Collapse file tree 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
296296So, before pushing or making any pull request run the below command:
297297
298298* ` 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 88
99class JsonConverter implements ConverterHandlerInterface
1010{
11- const FILE_EXTENSION = 'json ' ;
11+ public const FILE_EXTENSION = 'json ' ;
1212
1313 /**
1414 * The converted data.
@@ -37,6 +37,6 @@ public function convert(array $data): ConverterHandlerInterface
3737
3838 public function write (string $ filename ): bool
3939 {
40- return (file_put_contents ($ filename , $ this ->data )) ? true : false ;
40+ return (bool ) file_put_contents ($ filename , $ this ->data );
4141 }
4242}
Original file line number Diff line number Diff line change 1010
1111class XmlConverter implements ConverterHandlerInterface
1212{
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 ' ;
1616
1717 /**
1818 * XML node root element.
@@ -79,6 +79,6 @@ public function write(string $filename): bool
7979
8080 $ dom ->appendChild ($ domXml );
8181
82- return ($ dom ->save ($ filename )) ? true : false ;
82+ return (bool ) $ dom ->save ($ filename );
8383 }
8484}
Original file line number Diff line number Diff line change 88
99class Url implements ValidationRuleInterface
1010{
11- const PATTERN = '~^
11+ public const PATTERN = '~^
1212 (%s):// # protocol
1313 (([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
1414 (
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ class Validator
1414{
1515 use FormatsMessages;
1616
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. ' ;
2222
2323 /**
2424 * The message bag instance.
You can’t perform that action at this time.
0 commit comments