-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New exceptions and phpstan level 5 updates (#8)
* Updated CS-Fixer and processed files * Fixed PHPStan errors up to level 5 * Renamed and created new exceptions for different errors
- Loading branch information
Showing
20 changed files
with
2,404 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create()->in(__DIR__); | ||
|
||
return (new PhpCsFixer\Config()) | ||
->setRules([ | ||
'@Symfony' => true, | ||
'new_with_braces' => false, | ||
'trailing_comma_in_multiline' => false, | ||
'not_operator_with_successor_space' => true, | ||
'phpdoc_align' => false, | ||
'phpdoc_summary' => false, | ||
'function_declaration' => [ | ||
'closure_function_spacing' => 'one' | ||
], | ||
'blank_line_before_statement' => [ | ||
'statements' => [ | ||
'return', 'try', 'throw' | ||
] | ||
] | ||
]) | ||
->setFinder($finder) | ||
->setUsingCache(false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
parameters: | ||
level: 5 | ||
paths: | ||
- src | ||
- tests | ||
checkMissingIterableValueType: false | ||
inferPrivatePropertyTypeFromConstructor: true | ||
treatPhpDocTypesAsCertain: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace Pb\Imap\Exceptions; | ||
|
||
use Exception; | ||
|
||
class FolderAccessException extends Exception | ||
{ | ||
public function __construct(string $folder, string $verb) | ||
{ | ||
$this->message = sprintf('Cannot %s folder %s, %s', | ||
$verb, | ||
$folder, | ||
'maybe it doesn\'t exist' | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Pb\Imap\Exceptions; | ||
|
||
use Exception; | ||
|
||
class FolderUpdateException extends Exception | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Pb\Imap\Exceptions; | ||
|
||
use Exception; | ||
|
||
class MailboxAccessException extends Exception | ||
{ | ||
public $message = 'Failed to connect to IMAP mailbox'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
namespace Pb\Imap\Exceptions; | ||
|
||
use Exception; | ||
|
||
class MessageUpdateException extends Exception | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.