forked from wapmorgan/PhpDeprecationDetector
-
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.
Allows phpdd to catch use of not yet implemented functions in code designed to run on older versions of PHP. This will give developers the ability to know when changes break backward compatibility.
- Loading branch information
1 parent
860e40c
commit 7369e50
Showing
2 changed files
with
25 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
namespace wapmorgan\PhpCodeFixer; | ||
|
||
/** | ||
* | ||
* @test Any | ||
* @param array $usageTokens | ||
* @return bool|string | ||
*/ | ||
|
||
function not_yet_implemented(array $usageTokens){ | ||
if (count($usageTokens) === 0) | ||
return false; | ||
|
||
// Make these Vars so that in the future this could work for more than | ||
// just functions. See Issue #84 | ||
$Pfx = 'Function'; | ||
$Sfx = '()'; | ||
return "$Pfx " . $usageTokens[0][1] | ||
. "$Sfx not yet implemented on this version of PHP."; | ||
} |