Compare commits
16 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aef0637949 | |||
| ce00940822 | |||
|
|
135ea0091d | ||
|
|
8cc04995f6 |
||
|
|
3614c9a2d2 |
||
|
|
be3a950124 | ||
|
|
a0e85dc592 | ||
|
|
db54d30366 |
||
|
|
585d549be8 |
||
|
|
0da2fd37d9 |
||
|
|
3a97db9625 | ||
|
|
b7120d8e3b |
||
|
|
9a90fc964b | ||
|
|
0f512e9680 |
||
|
|
508fbd936a |
||
|
|
0ebf39572e |
17 changed files with 1309 additions and 324 deletions
|
|
@ -4,6 +4,9 @@ php:
|
|||
- 5.6
|
||||
- 7.0
|
||||
- 7.1
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4
|
||||
|
||||
## Cache composer
|
||||
cache:
|
||||
|
|
@ -15,4 +18,4 @@ before_script:
|
|||
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
|
||||
|
||||
script:
|
||||
- make ci
|
||||
- make ci
|
||||
|
|
|
|||
76
CODE_OF_CONDUCT.md
Normal file
76
CODE_OF_CONDUCT.md
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
||||
level of experience, education, socio-economic status, nationality, personal
|
||||
appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at hello@clivern.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see
|
||||
https://www.contributor-covenant.org/faq
|
||||
13
CONTRIBUTING.md
Normal file
13
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
## Contributing
|
||||
|
||||
- With issues:
|
||||
- Use the search tool before opening a new issue.
|
||||
- Please provide source code and commit sha if you found a bug.
|
||||
- Review existing issues and provide feedback or react to them.
|
||||
|
||||
- With pull requests:
|
||||
- Open your pull request against `master`
|
||||
- Your pull request should have no more than two commits, if not you should squash them.
|
||||
- It should pass all tests in the available continuous integrations systems such as TravisCI.
|
||||
- You should add/modify tests to cover your proposed code changes.
|
||||
- If your pull request contains a new feature, please document it on the README.
|
||||
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2017 Cliven
|
||||
Copyright (c) 2019 Cliven
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Imap
|
|||
====
|
||||
:mailbox_with_mail: Access Mailbox Using PHP IMAP.
|
||||
|
||||
*Current Version: 1.0.5*
|
||||
*Current Version: 1.0.6*
|
||||
|
||||
[](https://travis-ci.org/Clivern/Imap)
|
||||
|
||||
|
|
@ -265,6 +265,11 @@ Misc
|
|||
|
||||
Changelog
|
||||
---------
|
||||
Version 1.0.6:
|
||||
```
|
||||
Fix Class Name.
|
||||
```
|
||||
|
||||
Version 1.0.5:
|
||||
```
|
||||
Enhance code style.
|
||||
|
|
@ -299,6 +304,6 @@ Initial Release.
|
|||
Acknowledgements
|
||||
----------------
|
||||
|
||||
© 2017, Clivern. Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
|
||||
© 2019, Clivern. Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
|
||||
|
||||
**Imap** is authored and maintained by [@clivern](http://github.com/clivern).
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "clivern/imap",
|
||||
"name": "deblan/clivern-imap",
|
||||
"type": "library",
|
||||
"description": "Access Mailbox Using PHP IMAP",
|
||||
"keywords": ["clivern", "imap"],
|
||||
|
|
@ -16,9 +16,9 @@
|
|||
"php": ">=5.6.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~5.7",
|
||||
"friendsofphp/php-cs-fixer": "^2.14",
|
||||
"squizlabs/php_codesniffer": "^3.4"
|
||||
"phpunit/phpunit": "5.7.27",
|
||||
"friendsofphp/php-cs-fixer": "2.16.1",
|
||||
"squizlabs/php_codesniffer": "3.5.4"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
1510
composer.lock
generated
1510
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset name="MessageBirdCodingStandard">
|
||||
<ruleset name="ImapCodingStandard">
|
||||
<description>Imap coding standard.</description>
|
||||
<file>src</file>
|
||||
<file>tests</file>
|
||||
<rule ref="PSR2" />
|
||||
</ruleset>
|
||||
</ruleset>
|
||||
|
|
|
|||
5
renovate.json
Normal file
5
renovate.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
]
|
||||
}
|
||||
|
|
@ -54,8 +54,6 @@ class Message
|
|||
|
||||
/**
|
||||
* Message Constructor.
|
||||
*
|
||||
* @param Connection $connection
|
||||
*/
|
||||
public function __construct(Connection $connection, Header $header, Action $action, Body $body)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ class Action
|
|||
|
||||
/**
|
||||
* Class Constructor.
|
||||
*
|
||||
* @param Connection $connection
|
||||
*/
|
||||
public function __construct(Connection $connection)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ class Attachment
|
|||
|
||||
/**
|
||||
* Class Constructor.
|
||||
*
|
||||
* @param Connection $connection
|
||||
*/
|
||||
public function __construct(Connection $connection)
|
||||
{
|
||||
|
|
@ -228,7 +226,7 @@ class Attachment
|
|||
$this->attachment['ifdparameters'] = (isset($this->part->ifdparameters)) ? $this->part->ifdparameters : false;
|
||||
$this->attachment['ifparameters'] = (isset($this->part->ifparameters)) ? $this->part->ifparameters : false;
|
||||
|
||||
if (\is_array($this->part->dparameters)) {
|
||||
if (isset($this->part->dparameters) && \is_array($this->part->dparameters)) {
|
||||
foreach ($this->part->dparameters as $obj) {
|
||||
if (\in_array(mb_strtolower($obj->attribute), ['filename', 'name'], true)) {
|
||||
$this->attachment[mb_strtolower($obj->attribute)] = pathinfo($obj->value, PATHINFO_FILENAME);
|
||||
|
|
@ -237,7 +235,7 @@ class Attachment
|
|||
}
|
||||
}
|
||||
|
||||
if (\is_array($this->part->parameters)) {
|
||||
if (isset($this->part->parameters) && \is_array($this->part->parameters)) {
|
||||
foreach ($this->part->parameters as $obj) {
|
||||
if (\in_array(mb_strtolower($obj->attribute), ['filename', 'name'], true)) {
|
||||
$this->attachment[mb_strtolower($obj->attribute)] = pathinfo($obj->value, PATHINFO_FILENAME);
|
||||
|
|
|
|||
|
|
@ -41,8 +41,6 @@ class Body
|
|||
|
||||
/**
|
||||
* Class Constructor.
|
||||
*
|
||||
* @param Connection $connection
|
||||
*/
|
||||
public function __construct(Connection $connection)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ class Header
|
|||
|
||||
/**
|
||||
* Class Constructor.
|
||||
*
|
||||
* @param Connection $connection
|
||||
*/
|
||||
public function __construct(Connection $connection)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,9 +23,6 @@ class MessageIterator extends \ArrayIterator
|
|||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param Connection $connection
|
||||
* @param array $message_numbers
|
||||
*/
|
||||
public function __construct(Connection $connection, array $message_numbers)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ class Search
|
|||
/**
|
||||
* Add Condition.
|
||||
*
|
||||
* @param Condition $condition
|
||||
*
|
||||
* @return Search
|
||||
*/
|
||||
public function addCondition(Condition $condition)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use Clivern\Imap\Core\Connection;
|
|||
use Clivern\Imap\Core\Exception\FolderNotExistException;
|
||||
use Clivern\Imap\Core\Message;
|
||||
use Clivern\Imap\Core\Message\Action;
|
||||
use Clivern\Imap\Core\Message\Attachments;
|
||||
use Clivern\Imap\Core\Message\Attachment;
|
||||
use Clivern\Imap\Core\Message\Body;
|
||||
use Clivern\Imap\Core\Message\Header;
|
||||
use Clivern\Imap\Core\MessageIterator;
|
||||
|
|
@ -124,7 +124,7 @@ class MailBox
|
|||
$this->connection,
|
||||
new Header($this->connection),
|
||||
new Action($this->connection),
|
||||
new Attachments($this->connection),
|
||||
new Attachment($this->connection),
|
||||
new Body($this->connection)
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue