Skip to content

Commit

Permalink
Run tests with error_reporting=E_ALL (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
Slamdunk committed Jan 10, 2022
1 parent 1eee4d7 commit 8b772d0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
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

0 comments on commit 8b772d0

Please sign in to comment.