Skip to content

Commit

Permalink
Merge pull request #218 from phpfui/ComposerUpdate
Browse files Browse the repository at this point in the history
Update PHPCSFIxer
  • Loading branch information
zbateson committed Jul 12, 2023
2 parents e4652f8 + 07a64ea commit ceb2b85
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
4 changes: 2 additions & 2 deletions PhpCsFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
// Replace core functions calls returning constants with the constants.
'function_to_constant' => true,
// Ensure single space between function's argument and its typehint.
'function_typehint_space' => true,
'type_declaration_spaces' => true,
// Renames PHPDoc tags.
'general_phpdoc_tag_rename' => true,
// Function `implode` must be called with 2 arguments in the documented order.
Expand Down Expand Up @@ -230,7 +230,7 @@
// A PHP file without end tag must always end with a single empty line feed.
'single_blank_line_at_eof' => true,
// There should be exactly one blank line before a namespace declaration.
'single_blank_line_before_namespace' => true,
'blank_lines_before_namespace' => ['max_line_breaks' => 2, 'min_line_breaks' => 2],
// There MUST NOT be more than one property or constant declared per statement.
'single_class_element_per_statement' => true,
// There MUST be one use keyword per declaration.
Expand Down
1 change: 0 additions & 1 deletion src/Message/IMimePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public function getHeader($name, $offset = 0);
* @see IMimePart::getRawHeaderIterator() to retrieve an iterator traversing
* a two-dimensional string[] array of raw headers.
* @param string $name The name of the header to retrieve.
* @param
* @param int $offset Optional offset if there are multiple headers with the
* given name.
* @return ?IHeader the header object
Expand Down
6 changes: 0 additions & 6 deletions src/Message/PartHeaderContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ private function getAllWithOriginalHeaderNameIfSet(string $name) : ?array
*
* Note that mime headers aren't case sensitive.
*
* @param string $name
* @param int $offset
* @return \ZBateson\MailMimeParser\Header\IHeader|null
*/
public function get(string $name, int $offset = 0)
Expand All @@ -139,9 +137,6 @@ public function get(string $name, int $offset = 0)
*
* Note that mime headers aren't case sensitive.
*
* @param string $name
* @param string $iHeaderClass
* @param int $offset
* @return ?IHeader
*/
public function getAs(string $name, string $iHeaderClass, int $offset = 0) : ?IHeader
Expand Down Expand Up @@ -196,7 +191,6 @@ private function getByIndex(int $index)
* index or null if one doesn't exist, using the passed $iHeaderClass to
* construct it.
*
* @return \ZBateson\MailMimeParser\Header\IHeader|null
*/
private function getByIndexAs(int $index, string $iHeaderClass) : ?IHeader
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function testExampleFullLine2() : void
{
$value = "from xcv.gurbuzsrc.com ([69.69.69.69])\nby mail.yetiforce.com with esmtp (Exim 4.94)\n"
. "(envelope-from <[email protected]>)\nid 1kfCyx-0002Zp-BY\n"
. "for [email protected]; Wed, 18 Nov 2020 03:14:03 +0100";
. 'for [email protected]; Wed, 18 Nov 2020 03:14:03 +0100';

$ret = $this->receivedConsumer->__invoke($value);
$this->assertNotEmpty($ret);
Expand Down
4 changes: 2 additions & 2 deletions tests/MailMimeParser/IntegrationTests/EmailFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ private function getSignatureForContent($signableContent) : string
\proc_close($proc);
return \preg_replace('/\r|\n/', '', $signature);
}

return \md5($signableContent);
}

Expand Down Expand Up @@ -2722,7 +2722,7 @@ public function testCreateSignedPartm4009() : void

\file_put_contents(\dirname(__DIR__, 2) . '/' . TEST_OUTPUT_DIR . '/sigpart_m4009', $signableContent);
// $signature = $this->getSignatureForContent($signableContent);
$signature = md5($signableContent);
$signature = \md5($signableContent);
$this->assertEquals('10fd4349160a214f3d1f7dfd1aa4ca05', $signature);
$message->setSignature($signature);

Expand Down
2 changes: 1 addition & 1 deletion tests/MailMimeParser/Parser/MimeParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function testParseContentLinesWithBoundary() : void

public function testParseEmptyContentWithBoundaryAndStartingLineEndingLength() : void
{
$str = "--boundary";
$str = '--boundary';
$handle = StreamWrapper::getResource(Utils::streamFor($str));
$this->parserPartProxy->expects($this->once())
->method('getMessageResourceHandlePos')
Expand Down

0 comments on commit ceb2b85

Please sign in to comment.