Skip to content

Commit bd4e9e5

Browse files
committed
run code inspection check. fix some errors
1 parent 751bbb5 commit bd4e9e5

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

Diff for: src/CallableResolver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
final class CallableResolver implements CallableResolverInterface
1818
{
19-
const CALLABLE_PATTERN = '!^([^\:]+)\:([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)$!';
19+
public const CALLABLE_PATTERN = '!^([^\:]+)\:([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)$!';
2020

2121
/**
2222
* @var ContainerInterface|Container

Diff for: src/Container.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Container implements ContainerInterface, \ArrayAccess, \IteratorAggregate,
2525
{
2626
use NameAliasTrait;
2727

28-
const DEFAULT_OPTIONS = [
28+
public const DEFAULT_OPTIONS = [
2929
'aliases' => null,
3030
'shared' => true,
3131
'locked' => false,
@@ -565,11 +565,7 @@ public function isLocked(string $id): bool
565565
{
566566
$id = $this->resolveAlias($id);
567567

568-
if (isset($this->ids[$id])) {
569-
return $this->ids[$id];
570-
}
571-
572-
return false;
568+
return $this->ids[$id] ?? false;
573569
}
574570

575571
/**

Diff for: test/boot.php

-6
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,8 @@
1313
if (0 === strpos($class, 'Toolkit\DI\Example\\')) {
1414
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\DI\Example\\')));
1515
$file = dirname(__DIR__) . "/example/{$path}.php";
16-
<<<<
17-
<<< HEAD
1816
} elseif (0 === strpos($class,'Toolkit\DITest\\')) {
1917
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\DITest\\')));
20-
=======
21-
} elseif (0 === strpos($class,'Toolkit\DI\Test\\')) {
22-
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\DI\Test\\')));
23-
>>>>>>> 42776df603e867a87654e7edfa6649337cb975f6
2418
$file = __DIR__ . "/{$path}.php";
2519
} elseif (0 === strpos($class,'Toolkit\DI\\')) {
2620
$path = str_replace('\\', '/', substr($class, strlen('Toolkit\DI\\')));

0 commit comments

Comments
 (0)