-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:sciactive/hookphp
Conflicts: .gitignore composer.lock src/Hook.php src/HookOverride.php testing/TestModel.php testing/tests/HookTest.php
- Loading branch information
Showing
12 changed files
with
285 additions
and
222 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,2 +1,2 @@ | ||
testing/logs | ||
vendor | ||
vendor/ |
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,9 +1,10 @@ | ||
language: php | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- hhvm | ||
- 7.0 | ||
- 7.1 | ||
# - hhvm | ||
|
||
install: composer install --no-interaction | ||
|
||
script: ./testing/run |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* Hooks are used to call a callback when a method is called and optionally | ||
* manipulate the arguments/function call/return value. | ||
* | ||
* @version 1.2.2 | ||
* @version 2.0.0 | ||
* @license https://www.gnu.org/licenses/lgpl.html | ||
* @author Hunter Perrin <[email protected]> | ||
* @copyright SciActive.com | ||
|
@@ -176,7 +176,8 @@ public static function hookObject(&$object, $prefix = '', $recursive = true) { | |
$paramArray = $paramNameArray = array(); | ||
foreach ($params as &$curParam) { | ||
$paramName = $curParam->getName(); | ||
$paramPrefix = $curParam->isPassedByReference() ? '&' : ''; | ||
$paramPrefix = $curParam->isVariadic() ? '...' : ''; | ||
$paramPrefix .= $curParam->isPassedByReference() ? '&' : ''; | ||
if ($curParam->isDefaultValueAvailable()) { | ||
$paramSuffix = ' = '.var_export($curParam->getDefaultValue(), true); | ||
} else { | ||
|
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
/** | ||
* Dynamic HookOverride class. | ||
* | ||
* @version 1.2.2 | ||
* @version 2.0.0 | ||
* @license https://www.gnu.org/licenses/lgpl.html | ||
* @author Hunter Perrin <[email protected]> | ||
* @copyright SciActive.com | ||
|
@@ -14,4 +14,6 @@ | |
/** | ||
* A base class to check whether an object has been hooked. | ||
*/ | ||
class HookOverride { } | ||
class HookOverride { | ||
|
||
} |
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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
/** | ||
* Dynamic HookOverride class. | ||
* | ||
* @version 1.2.2 | ||
* @version 2.0.0 | ||
* @license https://www.gnu.org/licenses/lgpl.html | ||
* @author Hunter Perrin <[email protected]> | ||
* @copyright SciActive.com | ||
|
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
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