Skip to content

Commit 9adf66c

Browse files
committed
Fix typos and grammatical errors
1 parent c4bc28b commit 9adf66c

File tree

1 file changed

+26
-17
lines changed

1 file changed

+26
-17
lines changed

README.md

+26-17
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Phpake
22

33
Phpake is a make-like utility built for PHP. It is pronounced *fake* because
4-
the second *p* is silent just like the word *elephpant*.
4+
the second *p* is silent just like the second `p` in the word *elephpant*.
55

6-
I've always found writing a `Makefile` quite challenging because its syntax
7-
is similar to the shell syntax, but it is very different at the same time.
8-
When I'm working on Ruby, I use `rake` and it was awesome because it uses
9-
Ruby syntax. But when I work on PHP, I often miss having a similar tool that
6+
I've always found writing a `Makefile` quite challenging because the syntax
7+
is similar to the shell syntax, but quite different at the same time.
8+
When I'm working with Ruby, I use `rake` and it's awesome because it uses
9+
Ruby syntax. When I work with PHP, I often miss having a similar tool that
1010
is easy to install, easy to use, and allows full-fledged PHP syntax. Thus,
1111
Phpake was born.
1212

@@ -38,7 +38,7 @@ You should then be able to run it with `composer exec phpake`.
3838

3939
## Usage
4040

41-
To use Phpake, you start by creating a `Phpakefile` where you define tasks.
41+
To use Phpake, start by creating a `Phpakefile` to define some tasks.
4242
Each task is simply a PHP function. You can read more on creating a
4343
`Phpakefile` under the [Phpakefile](#Phpakefile) section.
4444

@@ -52,9 +52,15 @@ containing a `Phpakefile`.
5252

5353
## Phpakefile
5454

55-
The following subheadings talk about writing tasks in a `Phpakefile`. A
56-
Phpake task definition is simply a PHP function (a task callback). Here's
57-
a sample [Phpakefile](Phpakefile) to inspire you.
55+
A *Phpakefile* contains definitions of tasks that can be executed by Phpake.
56+
The following subheadings are about defining such tasks. A Phpake task definition
57+
is simply a PHP function (a task callback). Here's are some examples:
58+
59+
- [Hello world](Phpakefile)
60+
- [Input Output](examples/input-output.phpakefile)
61+
- [Namespaces](examples/variadic.phpakefile)
62+
- [Variadic arguments](examples/variadic.phpakefile)
63+
- [Shell commands](examples/shell.phpakefile)
5864

5965
## Simple tasks
6066

@@ -70,7 +76,8 @@ function hello_world() {
7076
}
7177
```
7278

73-
This task can then be executed as `phpake hello-world`.
79+
This task can then be executed as `phpake hello-world`. You can also organize
80+
functions with PHP namespaces.
7481

7582
## Regular Parameters
7683

@@ -83,16 +90,15 @@ function hello_human($fname, $lname = NULL) {
8390
}
8491
```
8592

86-
Since `$lname` has a default value, it is treated as an optional argument. So,
87-
this task can be executed as `phpake Niki` or `phpake Niki Martin`.
93+
Since `$lname` has a default value, it is treated as an optional argument.
8894

8995
## Special parameters
9096

91-
Phpake is build with [Symfony Console](https://symfony.com/doc/current/components/console.html),
97+
Phpake is built with [Symfony Console](https://symfony.com/doc/current/components/console.html),
9298
which provides certain special parameters that can help you enrich your
93-
application even further. If your task has a parameter with one of these
94-
special names, it will behave specially. You can read more about some of these
95-
objects in the Symfony Console documentation.
99+
application even further. If your task has a parameter with one of these
100+
special names, it will behave specially. For more info on these objects,
101+
please refer to the Symfony Console documentation.
96102

97103
### $input
98104

@@ -116,9 +122,12 @@ The text included in `<info></info>` will appear in color.
116122
Name of the Symfony Console command that is being executed. It looks like the
117123
task function name with some minor differences.
118124

125+
- For a `function hello_world()` the command becomes `hello-world`
126+
- If defined in a namespace, it becomes `namespace:hello-world`.
127+
119128
### $rest
120129

121-
There are often tasks that can accept an unlimited number of arguments. These
130+
Often there are tasks that can accept an unlimited number of arguments. These
122131
can be handled with a `$rest` parameter. It **must be** defined as the last
123132
argument to your function.
124133

0 commit comments

Comments
 (0)