forked from exercism/php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop strict types comments and add test meta data to tests (exercism…
- Loading branch information
1 parent
455e73f
commit 6f6c1e2
Showing
2 changed files
with
874 additions
and
516 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 |
---|---|---|
@@ -1,30 +1,8 @@ | ||
<?php | ||
|
||
/* | ||
* By adding type hints and enabling strict type checking, code can become | ||
* easier to read, self-documenting and reduce the number of potential bugs. | ||
* By default, type declarations are non-strict, which means they will attempt | ||
* to change the original type to match the type specified by the | ||
* type-declaration. | ||
* | ||
* In other words, if you pass a string to a function requiring a float, | ||
* it will attempt to convert the string value to a float. | ||
* | ||
* To enable strict mode, a single declare directive must be placed at the top | ||
* of the file. | ||
* This means that the strictness of typing is configured on a per-file basis. | ||
* This directive not only affects the type declarations of parameters, but also | ||
* a function's return type. | ||
* | ||
* For more info review the Concept on strict type checking in the PHP track | ||
* <link>. | ||
* | ||
* To disable strict typing, comment out the directive below. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
function meetup_day(int $year, int $month, string $which, string $weekday): DateTimeImmutable | ||
{ | ||
throw new \BadFunctionCallException("Implement the meetup_day function"); | ||
} | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
function meetup_day(int $year, int $month, string $which, string $weekday): DateTimeImmutable | ||
{ | ||
throw new \BadFunctionCallException("Implement the meetup_day function"); | ||
} |
Oops, something went wrong.