Skip to content

Commit 6ef08e7

Browse files
committed
Code review ammends
1 parent 8dfcc4d commit 6ef08e7

31 files changed

+59
-56
lines changed

src/Application.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function __construct($workshopTitle, $diConfigFile)
7676
}
7777

7878
/**
79-
* Register a custom check with the application. Exercises will only be use the check
79+
* Register a custom check with the application. Exercises will only be able to use the check
8080
* if it has been registered here.
8181
*
8282
* @param string $check The FQCN of the check
@@ -113,7 +113,7 @@ public function addResult($resultClass, $resultRendererClass)
113113
}
114114

115115
/**
116-
* Add an ASCII art logo to the application. This will be displayed a the top of them menu. It will be
116+
* Add an ASCII art logo to the application. This will be displayed at the top of them menu. It will be
117117
* automatically padded to sit in the middle.
118118
*
119119
* @param string $logo The logo

src/Check/CheckRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getByClass($class)
6565
}
6666

6767
/**
68-
* Query whether a check instance exists in this repository via it's class name.
68+
* Query whether a check instance exists in this repository via its class name.
6969
*
7070
* @param string $class
7171
* @return bool

src/Check/DatabaseCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
/**
1717
* This check sets up a database and a `PDO` object. It prepends the database DSN as a CLI argument to the student's
18-
* solution so they can connect to the database. The PDO object is passed to the exercise before and after the
18+
* solution so they can connect to the database. The `PDO` object is passed to the exercise before and after the
1919
* student's solution has been executed, allowing you to first seed the database and then verify the contents of the
2020
* database.
2121
*

src/Check/FileExistsCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class FileExistsCheck implements SimpleCheckInterface
1818
{
1919
/**
20-
* Return the check's name
20+
* Return the check's name.
2121
*
2222
* @return string
2323
*/

src/Check/FunctionRequirementsCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(Parser $parser)
3939
}
4040

4141
/**
42-
* Return the check's name
42+
* Return the check's name.
4343
*
4444
* @return string
4545
*/

src/Check/PhpLintCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function getName()
2929
}
3030

3131
/**
32-
* Simply check the student's solution can be linted with `php -l`
32+
* Simply check the student's solution can be linted with `php -l`.
3333
*
3434
* @param ExerciseInterface $exercise The exercise to check against.
3535
* @param string $fileName The absolute path to the student's solution.

src/CodeInsertion.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CodeInsertion
4444
private $code;
4545

4646
/**
47-
* Accepts the type on insertion, either static::TYPE_BEFORE or static::TYPE_AFTER
47+
* Accepts the type of insertion, either `static::TYPE_BEFORE` or `static::TYPE_AFTER`
4848
* and a string containing the code to be inserted.
4949
*
5050
* @param string $type
@@ -60,7 +60,7 @@ public function __construct($type, $code)
6060
}
6161

6262
/**
63-
* Get the type of insertion, either static::TYPE_BEFORE or static::TYPE_AFTER.
63+
* Get the type of insertion, either `static::TYPE_BEFORE` or `static::TYPE_AFTER`.
6464
*
6565
* @return string
6666
*/
@@ -70,7 +70,7 @@ public function getType()
7070
}
7171

7272
/**
73-
* Get a string containing the code be inserted
73+
* Get a string containing the code be inserted.
7474
*
7575
* @return string
7676
*/

src/CodePatcher.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
use PhpSchool\PhpWorkshop\Exercise\SubmissionPatcher;
1313

1414
/**
15-
* Service to apply patches to a students solution. Accepts a default patch via the constructor.
16-
* Patched are pulled from the exercise (if it implements SubmissionPatchable) and applied to the
15+
* Service to apply patches to a student's solution. Accepts a default patch via the constructor.
16+
* Patches are pulled from the exercise (if it implements `SubmissionPatchable`) and applied to the
1717
* given code.
1818
*
1919
* @package PhpSchool\PhpWorkshop
@@ -37,7 +37,7 @@ class CodePatcher
3737
private $defaultPatch;
3838

3939
/**
40-
* This service requires an instance of Parser and Standard. These services allow
40+
* This service requires an instance of `Parser` and `Standard`. These services allow
4141
* to parse code to an AST and to print code from an AST.
4242
*
4343
* The service also accepts a default patch. This allows a workshop to apply a patch
@@ -60,7 +60,7 @@ public function __construct(Parser $parser, Standard $printer, Patch $defaultPat
6060
*
6161
* If there is a default patch, the students solution is patched with that.
6262
*
63-
* If the exercise implements SubmissionPatchable then the patch is pulled from it and applied to
63+
* If the exercise implements `SubmissionPatchable` then the patch is pulled from it and applied to
6464
* the students solution.
6565
*
6666
* @param ExerciseInterface $exercise

src/CommandDefinition.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/**
66
* Represents a command in the workshop framework. Simply consists of a
7-
* command name, required arguments and either a service name of callable to
7+
* command name, required arguments and either a service name or callable to
88
* execute when the command is run.
99
*
1010
* @package PhpSchool\PhpWorkshop
@@ -40,7 +40,7 @@ public function __construct($name, array $args, $commandCallable)
4040
}
4141

4242
/**
43-
* Get the name of the command
43+
* Get the name of the command.
4444
*
4545
* @return string
4646
*/
@@ -50,7 +50,7 @@ public function getName()
5050
}
5151

5252
/**
53-
* Get the list of required arguments
53+
* Get the list of required arguments.
5454
*
5555
* @return array
5656
*/
@@ -60,7 +60,7 @@ public function getRequiredArgs()
6060
}
6161

6262
/**
63-
* Get the callable associated with this command
63+
* Get the callable associated with this command.
6464
*
6565
* @return string|callable
6666
*/

src/CommandRouter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/**
1111
* Parses $argv (or passed array) and attempts to find a command
12-
* which is suitable for what was typed on the cli. It then executed the callable
12+
* which is suitable for what was typed on the cli. It then executes the callable
1313
* associated with that command definition.
1414
*
1515
* @package PhpSchool\PhpWorkshop
@@ -34,7 +34,7 @@ class CommandRouter
3434
private $container;
3535

3636
/**
37-
* Accepts an array of CommandDefinition's which represent the application. Also takes a default
37+
* Accepts an array of `CommandDefinition`'s which represent the application. Also takes a default
3838
* (name of one of the commands) which will be used if the workshop was invoked with no arguments.
3939
*
4040
* Also accepts an instance of the container so it can look for services in there which may by defined
@@ -70,7 +70,7 @@ private function addCommand(CommandDefinition $c)
7070
}
7171

7272
/**
73-
* Attempts to route the command. Parses $argv (or a given array), extracting the command name and
73+
* Attempts to route the command. Parses `$argv` (or a given array), extracting the command name and
7474
* arguments. Using the command name, the command definition is looked up.
7575
*
7676
* The number of arguments are validated against the required arguments for the command

0 commit comments

Comments
 (0)