Skip to content

Commit 34afb02

Browse files
committed
Updated php-cs-fixer
1 parent a8300d5 commit 34afb02

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,4 +296,4 @@ The project run's automatic checks to make sure that the Symfony code standards
296296
So, 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

src/Converter/JsonConverter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class 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
}

src/Converter/XmlConverter.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
class 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
}

src/Rules/Url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Url implements ValidationRuleInterface
1010
{
11-
const PATTERN = '~^
11+
public const PATTERN = '~^
1212
(%s):// # protocol
1313
(([\.\pL\pN-]+:)?([\.\pL\pN-]+)@)? # basic auth
1414
(

src/Validator/Validator.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)