Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Parser/EntryParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ private static function splitStringIntoParts(string $line)
*/
private static function parseName(string $name)
{
if (Str::len($name) > 8 && Str::substr($name, 0, 6) === 'export' && ctype_space(Str::substr($name, 6, 1))) {
$name = ltrim(Str::substr($name, 6));
if (Str::len($name) > 8 && Str::substr($name, 0, 6) === 'export' && \ctype_space(Str::substr($name, 6, 1))) {
$name = \ltrim(Str::substr($name, 6));
}

if (self::isQuotedName($name)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/Lexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static function lex(string $content)

while (isset($content[$offset])) {
if (!\preg_match($regex, $content, $matches, 0, $offset)) {
throw new \Error(sprintf('Lexer encountered unexpected character [%s].', $content[$offset]));
throw new \Error(\sprintf('Lexer encountered unexpected character [%s].', $content[$offset]));
}

$offset += \strlen($matches[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/Repository/RepositoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

use Dotenv\Repository\Adapter\AdapterInterface;
use Dotenv\Repository\Adapter\EnvConstAdapter;
use Dotenv\Repository\Adapter\GuardedWriter;
use Dotenv\Repository\Adapter\ImmutableWriter;
use Dotenv\Repository\Adapter\MultiReader;
use Dotenv\Repository\Adapter\MultiWriter;
use Dotenv\Repository\Adapter\ReaderInterface;
use Dotenv\Repository\Adapter\ServerConstAdapter;
use Dotenv\Repository\Adapter\GuardedWriter;
use Dotenv\Repository\Adapter\WriterInterface;
use InvalidArgumentException;
use PhpOption\Some;
Expand Down
2 changes: 1 addition & 1 deletion src/Util/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public static function utf8(string $input, string $encoding = null)
*/
public static function split(string $input)
{
$result = mb_str_split($input, 1, 'UTF-8');
$result = \mb_str_split($input, 1, 'UTF-8');

if ($result === false) {
/** @var \GrahamCampbell\ResultType\Result<string[],string> */
Expand Down
4 changes: 2 additions & 2 deletions tests/Dotenv/DotenvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public function testLargeDotenvLoadsEnvironmentVars()
{
$dotenv = Dotenv::createMutable(self::$folder, 'large.env');
$dotenv->load();
self::assertSame(2730, strlen($_SERVER['LARGE']));
self::assertSame(8192, strlen($_SERVER['HUGE']));
self::assertSame(2730, \strlen($_SERVER['LARGE']));
self::assertSame(8192, \strlen($_SERVER['HUGE']));
}

public function testDotenvLoadsMultibyteVars()
Expand Down