Skip to content

Commit 02705e5

Browse files
authored
Update and apply php-cs-fixer (#4)
1 parent 7be2ad5 commit 02705e5

File tree

194 files changed

+1291
-1394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+1291
-1394
lines changed

.php-cs-fixer.dist.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,14 @@
66
return (new PhpCsFixer\Config())
77
->setRules([
88
'@Symfony' => true,
9-
'@Symfony:risky' => true,
10-
'@PHPUnit75Migration:risky' => true,
11-
'php_unit_dedicate_assert' => ['target' => '5.6'],
129
'array_syntax' => ['syntax' => 'short'],
1310
'php_unit_fqcn_annotation' => true,
1411
'no_unreachable_default_argument_value' => false,
1512
'braces' => ['allow_single_line_closure' => true],
1613
'heredoc_to_nowdoc' => false,
1714
'ordered_imports' => true,
1815
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
19-
'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'],
2016
'fopen_flags' => false,
2117
])
22-
->setRiskyAllowed(true)
2318
->setFinder($finder)
2419
;

lib/classes/Swift.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
abstract class Swift
1717
{
18-
const VERSION = '6.3.0';
18+
public const VERSION = '6.3.0';
1919

2020
public static $initialized = false;
2121
public static $inits = [];

lib/classes/Swift/Attachment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct($data = null, $filename = null, $contentType = null)
3030
'Swift_Mime_Attachment::__construct',
3131
Swift_DependencyContainer::getInstance()
3232
->createDependenciesFor('mime.attachment')
33-
);
33+
);
3434

3535
$this->setBody($data, $contentType);
3636
$this->setFilename($filename);

lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public function removeFilter($key)
7676
*
7777
* @param string $bytes
7878
*
79-
* @throws Swift_IoException
80-
*
8179
* @return int
80+
*
81+
* @throws Swift_IoException
8282
*/
8383
public function write($bytes)
8484
{

lib/classes/Swift/ByteStream/FileByteStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Swift_ByteStream_FileByteStream extends Swift_ByteStream_AbstractFilterabl
3131
private $writer;
3232

3333
/** If stream is seekable true/false, or null if not known */
34-
private $seekable = null;
34+
private $seekable;
3535

3636
/**
3737
* Create a new FileByteStream for $path.

lib/classes/Swift/ByteStream/TemporaryFileByteStream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ public function __destruct()
4242

4343
public function __sleep()
4444
{
45-
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
45+
throw new BadMethodCallException('Cannot serialize '.__CLASS__);
4646
}
4747

4848
public function __wakeup()
4949
{
50-
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
50+
throw new BadMethodCallException('Cannot unserialize '.__CLASS__);
5151
}
5252
}

lib/classes/Swift/CharacterReader.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,16 @@
1616
*/
1717
interface Swift_CharacterReader
1818
{
19-
const MAP_TYPE_INVALID = 0x01;
20-
const MAP_TYPE_FIXED_LEN = 0x02;
21-
const MAP_TYPE_POSITIONS = 0x03;
19+
public const MAP_TYPE_INVALID = 0x01;
20+
public const MAP_TYPE_FIXED_LEN = 0x02;
21+
public const MAP_TYPE_POSITIONS = 0x03;
2222

2323
/**
2424
* Returns the complete character map.
2525
*
2626
* @param string $string
2727
* @param int $startOffset
2828
* @param array $currentMap
29-
* @param mixed $ignoredChars
3029
*
3130
* @return int
3231
*/

lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function __construct($width)
3939
* @param string $string
4040
* @param int $startOffset
4141
* @param array $currentMap
42-
* @param mixed $ignoredChars
4342
*
4443
* @return int
4544
*/

lib/classes/Swift/CharacterReader/Utf8Reader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class Swift_CharacterReader_Utf8Reader implements Swift_CharacterReader
7878
* @param string $string
7979
* @param int $startOffset
8080
* @param array $currentMap
81-
* @param mixed $ignoredChars
8281
*
8382
* @return int
8483
*/

lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function init()
7171
'constructor' => [],
7272
];
7373

74-
//7-8 bit charsets
74+
// 7-8 bit charsets
7575
self::$map['(us-)?ascii'] = $singleByte;
7676
self::$map['(iso|iec)-?8859-?[0-9]+'] = $singleByte;
7777
self::$map['windows-?125[0-9]'] = $singleByte;
@@ -84,10 +84,10 @@ public function init()
8484
self::$map['(cork|t1)'] = $singleByte;
8585
self::$map['v?iscii'] = $singleByte;
8686

87-
//16 bits
87+
// 16 bits
8888
self::$map['(ucs-?2|utf-?16)'] = $doubleByte;
8989

90-
//32 bits
90+
// 32 bits
9191
self::$map['(ucs-?4|utf-?32)'] = $fourBytes;
9292

9393
// Fallback

0 commit comments

Comments
 (0)