Skip to content

Commit b15254b

Browse files
authored
Update dependencies (#198)
1 parent 345dff6 commit b15254b

File tree

7 files changed

+15
-16
lines changed

7 files changed

+15
-16
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
"php": "^7.4",
1818
"goaop/framework": "^3.0",
1919
"phpunit/phpunit": "^9.5",
20-
"symfony/finder": ">=4.4 <6.0"
20+
"symfony/finder": "^4.4 | ^5.4 | ^6.0"
2121
},
2222
"require-dev": {
2323
"codeception/codeception": "^4.1",
24-
"codeception/verify": "^2.1",
25-
"codeception/specify": "^1.4",
24+
"codeception/verify": "^2.2",
25+
"codeception/specify": "^2.0",
2626
"consolidation/robo": "^3.0"
2727
}
2828
}

src/AspectMock/Intercept/FunctionInjector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ function __construct($namespace, $function)
5656
public function getParameterDeclaration(\ReflectionParameter $parameter, $internal)
5757
{
5858
$text = (string)$parameter;
59-
if (preg_match('#Parameter\s\#\d+\s\[\s<(required|optional)>(.*)(\sor NULL)(.*)\s\]#', $text, $match)) {
59+
if (preg_match('#Parameter\s\#\d+\s\[\s<(required|optional)>(.*)(\sor NULL)(.*)\s]#', $text, $match)) {
6060
$text = $match[2].$match[4];
61-
} elseif (preg_match('#Parameter\s\#\d+\s\[\s<(required|optional)>\s(.*)\s\]#', $text, $match)) {
61+
} elseif (preg_match('#Parameter\s\#\d+\s\[\s<(required|optional)>\s(.*)\s]#', $text, $match)) {
6262
$text = $match[2];
6363
} else {
6464
throw new Exception('reflection api changed. adjust code.');

src/AspectMock/Intercept/before_mock.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ function __amock_before($class, $declaredClass, $method, $params, $static) {
99
}
1010

1111
function __amock_before_func($namespace, $func, $params) {
12-
$res = Registry::$mocker->fakeFunctionAndRegisterCalls($namespace, $func, $params);
13-
return $res;
12+
return Registry::$mocker->fakeFunctionAndRegisterCalls($namespace, $func, $params);
1413
}
1514

1615
const __AM_CONTINUE__ = '__am_continue__';

src/AspectMock/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function loadFile(string $file)
6161

6262
protected function registerTransformers(): array
6363
{
64-
$cachePathManager = $this->getContainer()->get('aspect.cache.path.manager');;
64+
$cachePathManager = $this->getContainer()->get('aspect.cache.path.manager');
6565

6666
$sourceTransformers = [
6767
new FilterInjectorTransformer($this, SourceTransformingLoader::getId(), $cachePathManager),
@@ -80,4 +80,4 @@ protected function registerTransformers(): array
8080
}
8181
}
8282

83-
require __DIR__ . '/Intercept/before_mock.php';
83+
require __DIR__ . '/Intercept/before_mock.php';

src/AspectMock/Proxy/AnythingClassProxy.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
class AnythingClassProxy extends ClassProxy {
1010

11-
public function __construct($class_name)
11+
public function __construct($className)
1212
{
13-
$this->className = $class_name;
13+
$this->className = $className;
1414
$this->reflected = new ReflectionClass(Anything::class);
1515
}
1616

src/AspectMock/Proxy/ClassProxy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ class ClassProxy extends Verifier
4747
{
4848
protected ReflectionClass $reflected;
4949

50-
public function __construct($class_name)
50+
public function __construct($className)
5151
{
52-
$this->className = $class_name;
53-
$this->reflected = new ReflectionClass($class_name);
52+
$this->className = $className;
53+
$this->reflected = new ReflectionClass($className);
5454
}
5555

5656
public function getCallsForMethod($method)

src/AspectMock/Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Test
2828
{
2929
/**
3030
* `test::double` registers class or object to track its calls.
31-
* In second argument you may pass values that mocked mathods should return.
31+
* In second argument you may pass values that mocked methods should return.
3232
*
3333
* Returns either of [**ClassProxy**](https://github.com/Codeception/AspectMock/blob/master/docs/ClassProxy.md) (when a string was passed)
3434
* or [**InstanceProxy**](https://github.com/Codeception/AspectMock/blob/master/docs/InstanceProxy.md) (when an object was passed).
@@ -267,7 +267,7 @@ public static function func(string $namespace, string $functionName, $body)
267267
* ```
268268
*
269269
* @api
270-
* @param string|object $classOrObject
270+
* @param string|object $classOrInstance
271271
* @return void
272272
*/
273273
public static function clean($classOrInstance = null)

0 commit comments

Comments
 (0)