Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests with error_reporting=E_ALL #530

Merged
merged 2 commits into from
Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "ddeboer/imap",
"description": "Object-oriented IMAP for PHP",
"license": "MIT",
"keywords": [
"email",
"mail",
"imap"
],
"license": "MIT",
"authors": [
{
"name": "David de Boer",
Expand All @@ -28,13 +28,13 @@
"ext-mbstring": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^v3.3.2",
"friendsofphp/php-cs-fixer": "^v3.4.0",
"laminas/laminas-mail": "^2.15.1",
"malukenho/mcbumpface": "^1.1.5",
"phpstan/phpstan": "^1.2.0",
"phpstan/phpstan": "^1.3.3",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.1.0",
"phpunit/phpunit": "^9.5.10"
"phpunit/phpunit": "^9.5.11"
},
"autoload": {
"psr-4": {
Expand All @@ -45,5 +45,10 @@
"psr-4": {
"Ddeboer\\Imap\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"malukenho/mcbumpface": true
}
}
}
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
colors="true"
verbose="true"
>
<php>
<ini name="error_reporting" value="E_ALL"/>
</php>
<coverage>
<include>
<directory suffix=".php">./src</directory>
Expand Down
1 change: 1 addition & 0 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public function getMailbox(string $name): MailboxInterface
return new Mailbox($this->resource, $name, $this->mailboxNames[$name]);
}

#[\ReturnTypeWillChange]
public function count()
{
$return = \imap_num_msg($this->resource->getStream());
Expand Down
1 change: 1 addition & 0 deletions src/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function getDelimiter(): string
return $this->info->delimiter;
}

#[\ReturnTypeWillChange]
public function count()
{
$return = \imap_num_msg($this->resource->getStream());
Expand Down
7 changes: 7 additions & 0 deletions src/Message/AbstractPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,18 +268,21 @@ final public function getParts(): array
*
* @return mixed
*/
#[\ReturnTypeWillChange]
final public function current()
{
$this->lazyParseStructure();

return $this->parts[$this->key];
}

#[\ReturnTypeWillChange]
final public function getChildren()
{
return $this->current();
}

#[\ReturnTypeWillChange]
final public function hasChildren()
{
$this->lazyParseStructure();
Expand All @@ -290,21 +293,25 @@ final public function hasChildren()
/**
* @return int
*/
#[\ReturnTypeWillChange]
final public function key()
{
return $this->key;
}

#[\ReturnTypeWillChange]
final public function next()
{
++$this->key;
}

#[\ReturnTypeWillChange]
final public function rewind()
{
$this->key = 0;
}

#[\ReturnTypeWillChange]
final public function valid()
{
$this->lazyParseStructure();
Expand Down