Skip to content

Commit 9a1b0eb

Browse files
authored
Merge pull request #185 from pdffiller/minor-fixes
Minor fixes
2 parents adb70ad + 4053148 commit 9a1b0eb

File tree

4 files changed

+32
-21
lines changed

4 files changed

+32
-21
lines changed

Diff for: .travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 5.5
54
- 5.6
65
- hhvm
76
- hhvm-nightly

Diff for: README.md

+28-17
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,28 @@ and IMAP protocols.
1010

1111

1212
## Installing
13-
> N.b. A note on Ubuntu 14.04 (probably other Debian-based / Apt managed systems), the install of php5-imap does not enable the extension for CLI (possibly others as well), which can cause composer to report fetch requires ext-imap
14-
```
13+
14+
> N.b. A note on Ubuntu 14.04 (probably other Debian-based / Apt managed
15+
> systems), the install of php5-imap does not enable the extension for CLI
16+
> (possibly others as well), which can cause composer to report fetch
17+
> requires `ext-imap`
18+
19+
```sh
1520
sudo ln -s /etc/php5/mods-available/imap.ini /etc/php5/cli/conf.d/30-imap.ini
1621
```
1722

1823
### Composer
1924

20-
Installing Fetch can be done through a variety of methods, although Composer is
21-
recommended.
25+
Installing Fetch can be done through a variety of methods, although Composer
26+
is recommended.
2227

2328
Until Fetch reaches a stable API with version 1.0 it is recommended that you
2429
review changes before even Minor updates, although bug fixes will always be
2530
backwards compatible.
2631

2732
```
2833
"require": {
29-
"tedivm/fetch": "0.6.*"
34+
"tedivm/fetch": "0.7.*"
3035
}
3136
```
3237

@@ -41,27 +46,33 @@ $ pear install tedivm/Fetch
4146

4247
### Github
4348

44-
Releases of Fetch are available on [Github](https://github.com/tedious/Fetch/releases).
49+
Releases of Fetch are available on [Github][:releases:].
4550

4651

4752
## Sample Usage
4853

49-
This is just a simple code to show how to access messages by using Fetch. It uses Fetch
50-
own autoload, but it can (and should be, if applicable) replaced with the one generated
51-
by composer.
52-
54+
This is just a simple code to show how to access messages by using Fetch. It
55+
uses Fetch own autoload, but it can (and should be, if applicable) replaced
56+
with the one generated by composer.
5357

54-
$server = new \Fetch\Server('imap.example.com', 993);
55-
$server->setAuthentication('dummy', 'dummy');
58+
```php
59+
use Fetch\Server;
60+
use Fetch\Message;
5661

62+
$server = new Server('imap.example.com', 993);
63+
$server->setAuthentication('username', 'password');
5764

58-
$messages = $server->getMessages();
59-
/** @var $message \Fetch\Message */
60-
foreach ($messages as $message) {
61-
echo "Subject: {$message->getSubject()}\nBody: {$message->getMessageBody()}\n";
62-
}
65+
/** @var Message[] $message */
66+
$messages = $server->getMessages();
6367

68+
foreach ($messages as $message) {
69+
echo "Subject: {$message->getSubject()}", PHP_EOL;
70+
echo "Body: {$message->getMessageBody()}", PHP_EOL;
71+
}
72+
```
6473

6574
## License
6675

6776
Fetch is licensed under the BSD License. See the LICENSE file for details.
77+
78+
[:releases:]: https://github.com/tedious/Fetch/releases

Diff for: phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
>
1414
<testsuites>
1515
<testsuite name="Fetch Test Suite">
16-
<directory>./tests</directory>
16+
<directory>./tests/Fetch</directory>
1717
</testsuite>
1818
</testsuites>
1919
<filter>

Diff for: tests/runTests.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#/usr/bin/env/sh
1+
#!/usr/bin/env bash
2+
23
set -e
34

45
if [ ! -n "$TRAVIS" ]; then
@@ -14,4 +15,4 @@ echo ''
1415
echo ''
1516
echo 'Testing for Coding Styling Compliance.'
1617
echo 'All code should follow PSR standards.'
17-
./vendor/bin/php-cs-fixer fix ./ --level="all" -vv --dry-run
18+
./vendor/bin/php-cs-fixer fix ./ --level="all" -vv --dry-run

0 commit comments

Comments
 (0)