Skip to content

Commit

Permalink
Merge pull request #9: Release 2.0.2
Browse files Browse the repository at this point in the history
* pr-9:
  fix: remove usage of deprecated string offset access syntax
  • Loading branch information
TiSiE committed Jun 8, 2020
2 parents 7b061f9 + 98a2d1a commit c43b2af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/TestCase/SetupTargetTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private function setupTarget(): void
$nameParts = explode(' ', $this->getName());
$name = reset($nameParts);
$set = end($nameParts);
$set = '#' == $set{0} || '"' == $set{0} ? trim($set, '"') : '';
$set = '#' == $set[0] || '"' == $set[0] ? trim($set, '"') : '';

foreach ($specs as $spec) {
$for = isset($spec['for']) ? (array) $spec['for'] : ['*'];
Expand Down
4 changes: 2 additions & 2 deletions src/Utils/Instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static function create($fqcn, ...$arguments): object
);
}

if ('!' == $fqcn{0}) {
if ('!' == $fqcn[0]) {
return self::reflection(substr($fqcn, 1));
}

Expand Down Expand Up @@ -142,7 +142,7 @@ public static function withMappedArguments($fqcn, $arguments, ?object $context =
break;

// '@function'
case is_string($value) && '@' == $value{0}:
case is_string($value) && '@' == $value[0]:
$callback = ltrim($value, '@');
break;

Expand Down
2 changes: 1 addition & 1 deletion src/Utils/Target.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static function get(
return $target;
}

if (!$forceObject && is_string($target) && '!' != $target{0}) {
if (!$forceObject && is_string($target) && '!' != $target[0]) {
return $target;
}

Expand Down

0 comments on commit c43b2af

Please sign in to comment.