Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: FileCollection #9040

Closed
wants to merge 1 commit into from
Closed
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
52 changes: 2 additions & 50 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -5972,56 +5972,8 @@
'path' => __DIR__ . '/system/HTTP/Exceptions/RedirectException.php',
];
$ignoreErrors[] = [
// identifier: function.alreadyNarrowedType
'message' => '#^Call to function is_array\\(\\) with array will always evaluate to true\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: missingType.iterableValue
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:all\\(\\) return type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: missingType.iterableValue
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:createFileObject\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: missingType.iterableValue
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:fixFilesArray\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: missingType.iterableValue
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:fixFilesArray\\(\\) return type has no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: missingType.iterableValue
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:getValueDotNotationSyntax\\(\\) has parameter \\$index with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: missingType.iterableValue
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:getValueDotNotationSyntax\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: booleanAnd.rightNotBoolean
'message' => '#^Only booleans are allowed in &&, array given on the right side\\.$#',
'count' => 2,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
$ignoreErrors[] = [
// identifier: missingType.iterableValue
'message' => '#^Property CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:\\$files type has no value type specified in iterable type array\\.$#',
// identifier: missingType.return
'message' => '#^Method CodeIgniter\\\\HTTP\\\\Files\\\\FileCollection\\:\\:createFileObject\\(\\) has no return type specified\\.$#',
'count' => 1,
'path' => __DIR__ . '/system/HTTP/Files/FileCollection.php',
];
Expand Down
16 changes: 10 additions & 6 deletions system/HTTP/Files/FileCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Populated the first time either files(), file(), or hasFile()
* is called.
*
* @var array|null
* @var array<string, list<UploadedFile>|UploadedFile>|null
Copy link
Member

@kenjis kenjis Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ git diff
diff --git a/system/HTTP/Files/FileCollection.php b/system/HTTP/Files/FileCollection.php
index 73e9c6beaf..5cfbd80306 100644
--- a/system/HTTP/Files/FileCollection.php
+++ b/system/HTTP/Files/FileCollection.php
@@ -159,6 +159,8 @@ class FileCollection
         foreach ($files as $name => $file) {
             $this->files[$name] = $this->createFileObject($file);
         }
+
+        d($this->files);
     }
 
     /**
$ vendor/bin/phpunit tests/system/HTTP/Files/FileCollectionTest.php 
PHPUnit 11.2.9 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.2.20
Configuration: /Users/kenji/work/codeigniter/official/CodeIgniter4/phpunit.xml

.
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#376 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1035 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#810 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (2) [
    'userfile1' => CodeIgniter\HTTP\Files\UploadedFile#781 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (14) "/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile2' => CodeIgniter\HTTP\Files\UploadedFile#1001 (8) (
        protected 'size' -> integer 248
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (14) "/tmp/fileB.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileB.txt"
        protected 'name' -> string (9) "fileB.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (5) [
    'userfile1' => CodeIgniter\HTTP\Files\UploadedFile#1042 (8) (
        protected 'size' -> integer 4
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile2' => CodeIgniter\HTTP\Files\UploadedFile#1024 (8) (
        protected 'size' -> integer 9
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileB.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileB.txt"
        protected 'name' -> string (9) "fileB.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile3' => CodeIgniter\HTTP\Files\UploadedFile#985 (8) (
        protected 'size' -> integer 16
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileC.csv"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileC.csv"
        protected 'name' -> string (9) "fileC.csv"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile4' => CodeIgniter\HTTP\Files\UploadedFile#982 (8) (
        protected 'size' -> integer 441
        protected 'originalMimeType' -> string (15) "application/zip"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileD.zip"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileD.zip"
        protected 'name' -> string (9) "fileD.zip"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile5' => CodeIgniter\HTTP\Files\UploadedFile#807 (8) (
        protected 'size' -> integer 441
        protected 'originalMimeType' -> string (15) "application/rar"
        protected 'path' -> string (95) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileE.zip.rar"
        protected 'clientPath' -> null
        protected 'originalName' -> string (13) "fileE.zip.rar"
        protected 'name' -> string (13) "fileE.zip.rar"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (1) [
        'foo' => array (1) [
            'bar' => CodeIgniter\HTTP\Files\UploadedFile#911 (8) (
                protected 'size' -> integer 124
                protected 'originalMimeType' -> string (10) "text/plain"
                protected 'path' -> string (14) "/tmp/fileA.txt"
                protected 'clientPath' -> null
                protected 'originalName' -> string (9) "fileA.txt"
                protected 'name' -> string (9) "fileA.txt"
                protected 'error' -> null
                protected 'hasMoved' -> boolean false
            )
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#782 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (2) [
    'userfile1' => CodeIgniter\HTTP\Files\UploadedFile#944 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (14) "/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile2' => CodeIgniter\HTTP\Files\UploadedFile#926 (8) (
        protected 'size' -> integer 248
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (14) "/tmp/fileB.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileB.txt"
        protected 'name' -> string (9) "fileB.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (1) [
        'foo' => array (1) [
            'bar' => CodeIgniter\HTTP\Files\UploadedFile#1009 (8) (
                protected 'size' -> integer 124
                protected 'originalMimeType' -> string (10) "text/plain"
                protected 'path' -> string (14) "/tmp/fileA.txt"
                protected 'clientPath' -> null
                protected 'originalName' -> string (9) "fileA.txt"
                protected 'name' -> string (9) "fileA.txt"
                protected 'error' -> null
                protected 'hasMoved' -> boolean false
            )
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#783 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 1
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#986 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 123
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#958 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#895 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 1
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#879 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#863 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#847 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> string (20) "someDir/someFile.txt"
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#1121 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#1140 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#1153 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1187 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#1138 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => array (2) [
                0 => CodeIgniter\HTTP\Files\UploadedFile#784 (8) (
                    protected 'size' -> integer 125
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileA.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileA.txt"
                    protected 'name' -> string (9) "fileA.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
                1 => CodeIgniter\HTTP\Files\UploadedFile#1221 (8) (
                    protected 'size' -> integer 243
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileB.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileB.txt"
                    protected 'name' -> string (9) "fileB.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
            ]
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => array (2) [
                0 => CodeIgniter\HTTP\Files\UploadedFile#785 (8) (
                    protected 'size' -> integer 125
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileA.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileA.txt"
                    protected 'name' -> string (9) "fileA.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
                1 => CodeIgniter\HTTP\Files\UploadedFile#1251 (8) (
                    protected 'size' -> integer 243
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileB.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileB.txt"
                    protected 'name' -> string (9) "fileB.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
            ]
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1271 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#1180 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => array (2) [
                0 => CodeIgniter\HTTP\Files\UploadedFile#787 (8) (
                    protected 'size' -> integer 125
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileA.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileA.txt"
                    protected 'name' -> string (9) "fileA.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
                1 => CodeIgniter\HTTP\Files\UploadedFile#1205 (8) (
                    protected 'size' -> integer 243
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileB.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileB.txt"
                    protected 'name' -> string (9) "fileB.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
            ]
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => CodeIgniter\HTTP\Files\UploadedFile#788 (8) (
                protected 'size' -> integer 243
                protected 'originalMimeType' -> string (10) "text/plain"
                protected 'path' -> string (14) "/tmp/fileA.txt"
                protected 'clientPath' -> null
                protected 'originalName' -> string (9) "fileA.txt"
                protected 'name' -> string (9) "fileA.txt"
                protected 'error' -> integer 0
                protected 'hasMoved' -> boolean false
            )
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1247 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#1266 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#790 (8) (
        protected 'size' -> integer 248
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (14) "/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]
R                                                                            27 / 27 (100%)

Time: 00:00.863, Memory: 16.00 MB

There were 26 risky tests:

1) CodeIgniter\HTTP\Files\FileCollectionTest::testAllReturnsValidSingleFile
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#376 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:39

2) CodeIgniter\HTTP\Files\FileCollectionTest::testAllReturnsValidMultipleFilesSameName
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1035 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#810 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:62

3) CodeIgniter\HTTP\Files\FileCollectionTest::testAllReturnsValidMultipleFilesDifferentName
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (2) [
    'userfile1' => CodeIgniter\HTTP\Files\UploadedFile#781 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (14) "/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile2' => CodeIgniter\HTTP\Files\UploadedFile#1001 (8) (
        protected 'size' -> integer 248
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (14) "/tmp/fileB.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileB.txt"
        protected 'name' -> string (9) "fileB.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:104

4) CodeIgniter\HTTP\Files\FileCollectionTest::testExtensionGuessing
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (5) [
    'userfile1' => CodeIgniter\HTTP\Files\UploadedFile#1042 (8) (
        protected 'size' -> integer 4
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile2' => CodeIgniter\HTTP\Files\UploadedFile#1024 (8) (
        protected 'size' -> integer 9
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileB.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileB.txt"
        protected 'name' -> string (9) "fileB.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile3' => CodeIgniter\HTTP\Files\UploadedFile#985 (8) (
        protected 'size' -> integer 16
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileC.csv"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileC.csv"
        protected 'name' -> string (9) "fileC.csv"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile4' => CodeIgniter\HTTP\Files\UploadedFile#982 (8) (
        protected 'size' -> integer 441
        protected 'originalMimeType' -> string (15) "application/zip"
        protected 'path' -> string (91) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileD.zip"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileD.zip"
        protected 'name' -> string (9) "fileD.zip"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile5' => CodeIgniter\HTTP\Files\UploadedFile#807 (8) (
        protected 'size' -> integer 441
        protected 'originalMimeType' -> string (15) "application/rar"
        protected 'path' -> string (95) "/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/_support/HTTP/Files/tmp/fileE.zip.rar"
        protected 'clientPath' -> null
        protected 'originalName' -> string (13) "fileE.zip.rar"
        protected 'name' -> string (13) "fileE.zip.rar"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:149

5) CodeIgniter\HTTP\Files\FileCollectionTest::testAllReturnsValidSingleFileNestedName
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (1) [
        'foo' => array (1) [
            'bar' => CodeIgniter\HTTP\Files\UploadedFile#911 (8) (
                protected 'size' -> integer 124
                protected 'originalMimeType' -> string (10) "text/plain"
                protected 'path' -> string (14) "/tmp/fileA.txt"
                protected 'clientPath' -> null
                protected 'originalName' -> string (9) "fileA.txt"
                protected 'name' -> string (9) "fileA.txt"
                protected 'error' -> null
                protected 'hasMoved' -> boolean false
            )
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:223

6) CodeIgniter\HTTP\Files\FileCollectionTest::testHasFileWithSingleFile
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#782 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:268

7) CodeIgniter\HTTP\Files\FileCollectionTest::testHasFileWithMultipleFilesWithDifferentNames
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (2) [
    'userfile1' => CodeIgniter\HTTP\Files\UploadedFile#944 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (14) "/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
    'userfile2' => CodeIgniter\HTTP\Files\UploadedFile#926 (8) (
        protected 'size' -> integer 248
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (14) "/tmp/fileB.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileB.txt"
        protected 'name' -> string (9) "fileB.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:286

8) CodeIgniter\HTTP\Files\FileCollectionTest::testHasFileWithSingleFileNestedName
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (1) [
        'foo' => array (1) [
            'bar' => CodeIgniter\HTTP\Files\UploadedFile#1009 (8) (
                protected 'size' -> integer 124
                protected 'originalMimeType' -> string (10) "text/plain"
                protected 'path' -> string (14) "/tmp/fileA.txt"
                protected 'clientPath' -> null
                protected 'originalName' -> string (9) "fileA.txt"
                protected 'name' -> string (9) "fileA.txt"
                protected 'error' -> null
                protected 'hasMoved' -> boolean false
            )
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:311

9) CodeIgniter\HTTP\Files\FileCollectionTest::testErrorString
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#783 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 1
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:346

10) CodeIgniter\HTTP\Files\FileCollectionTest::testErrorStringWithUnknownError
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#986 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 123
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:366

11) CodeIgniter\HTTP\Files\FileCollectionTest::testErrorStringWithNoError
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#958 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:386

12) CodeIgniter\HTTP\Files\FileCollectionTest::testError
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#895 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 1
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:405

13) CodeIgniter\HTTP\Files\FileCollectionTest::testErrorWithUnknownError
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#879 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:423

14) CodeIgniter\HTTP\Files\FileCollectionTest::testErrorWithNoError
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#863 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:440

15) CodeIgniter\HTTP\Files\FileCollectionTest::testClientPathReturnsValidFullPath
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#847 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> string (20) "someDir/someFile.txt"
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:458

16) CodeIgniter\HTTP\Files\FileCollectionTest::testClientPathReturnsNullWhenFullPathIsNull
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#1121 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> null
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:476

17) CodeIgniter\HTTP\Files\FileCollectionTest::testFileReturnsValidSingleFile
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#1140 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:493

18) CodeIgniter\HTTP\Files\FileCollectionTest::testFileNoExistSingleFile
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#1153 (8) (
        protected 'size' -> integer 124
        protected 'originalMimeType' -> string (10) "text/plain"
        protected 'path' -> string (19) "/tmp/myTempFile.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (12) "someFile.txt"
        protected 'name' -> string (12) "someFile.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:513

19) CodeIgniter\HTTP\Files\FileCollectionTest::testFileReturnValidMultipleFiles
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1187 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#1138 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:530

20) CodeIgniter\HTTP\Files\FileCollectionTest::testFileWithMultipleFilesNestedName
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => array (2) [
                0 => CodeIgniter\HTTP\Files\UploadedFile#784 (8) (
                    protected 'size' -> integer 125
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileA.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileA.txt"
                    protected 'name' -> string (9) "fileA.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
                1 => CodeIgniter\HTTP\Files\UploadedFile#1221 (8) (
                    protected 'size' -> integer 243
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileB.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileB.txt"
                    protected 'name' -> string (9) "fileB.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
            ]
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:573

21) CodeIgniter\HTTP\Files\FileCollectionTest::testDoesntHaveFile
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => array (2) [
                0 => CodeIgniter\HTTP\Files\UploadedFile#785 (8) (
                    protected 'size' -> integer 125
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileA.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileA.txt"
                    protected 'name' -> string (9) "fileA.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
                1 => CodeIgniter\HTTP\Files\UploadedFile#1251 (8) (
                    protected 'size' -> integer 243
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileB.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileB.txt"
                    protected 'name' -> string (9) "fileB.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
            ]
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:639

22) CodeIgniter\HTTP\Files\FileCollectionTest::testGetFileMultipleHasNoFile
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1271 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#1180 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:692

23) CodeIgniter\HTTP\Files\FileCollectionTest::testGetFileMultipleReturnValidDotNotationSyntax
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => array (2) [
                0 => CodeIgniter\HTTP\Files\UploadedFile#787 (8) (
                    protected 'size' -> integer 125
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileA.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileA.txt"
                    protected 'name' -> string (9) "fileA.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
                1 => CodeIgniter\HTTP\Files\UploadedFile#1205 (8) (
                    protected 'size' -> integer 243
                    protected 'originalMimeType' -> string (10) "text/plain"
                    protected 'path' -> string (14) "/tmp/fileB.txt"
                    protected 'clientPath' -> null
                    protected 'originalName' -> string (9) "fileB.txt"
                    protected 'name' -> string (9) "fileB.txt"
                    protected 'error' -> integer 0
                    protected 'hasMoved' -> boolean false
                )
            ]
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:723

24) CodeIgniter\HTTP\Files\FileCollectionTest::testGetFileMultipleReturnInvalidDotNotationSyntax
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'my-form' => array (1) [
        'details' => array (1) [
            'avatars' => CodeIgniter\HTTP\Files\UploadedFile#788 (8) (
                protected 'size' -> integer 243
                protected 'originalMimeType' -> string (10) "text/plain"
                protected 'path' -> string (14) "/tmp/fileA.txt"
                protected 'clientPath' -> null
                protected 'originalName' -> string (9) "fileA.txt"
                protected 'name' -> string (9) "fileA.txt"
                protected 'error' -> integer 0
                protected 'hasMoved' -> boolean false
            )
        ]
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:791

25) CodeIgniter\HTTP\Files\FileCollectionTest::testGetFileMultipleReturnValidMultipleFiles
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => array (2) [
        0 => CodeIgniter\HTTP\Files\UploadedFile#1247 (8) (
            protected 'size' -> integer 124
            protected 'originalMimeType' -> string (10) "text/plain"
            protected 'path' -> string (14) "/tmp/fileA.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileA.txt"
            protected 'name' -> string (9) "fileA.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
        1 => CodeIgniter\HTTP\Files\UploadedFile#1266 (8) (
            protected 'size' -> integer 248
            protected 'originalMimeType' -> string (8) "text/csv"
            protected 'path' -> string (14) "/tmp/fileB.txt"
            protected 'clientPath' -> null
            protected 'originalName' -> string (9) "fileB.txt"
            protected 'name' -> string (9) "fileB.txt"
            protected 'error' -> null
            protected 'hasMoved' -> boolean false
        )
    ]
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:829

26) CodeIgniter\HTTP\Files\FileCollectionTest::testGetFileMultipleReturnInvalidSingleFile
This test printed output: 
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ $this->files                                                                                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
array (1) [
    'userfile' => CodeIgniter\HTTP\Files\UploadedFile#790 (8) (
        protected 'size' -> integer 248
        protected 'originalMimeType' -> string (8) "text/csv"
        protected 'path' -> string (14) "/tmp/fileA.txt"
        protected 'clientPath' -> null
        protected 'originalName' -> string (9) "fileA.txt"
        protected 'name' -> string (9) "fileA.txt"
        protected 'error' -> integer 0
        protected 'hasMoved' -> boolean false
    )
]
═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Called from <ROOT>/system/HTTP/Files/FileCollection.php:163 [d()]


/Users/kenji/work/codeigniter/official/CodeIgniter4/tests/system/HTTP/Files/FileCollectionTest.php:874

OK, but there were issues!
Tests: 27, Assertions: 128, Risky: 26.

*/
protected $files;

Expand All @@ -40,7 +40,7 @@
* Each element in the array will be an instance of UploadedFile.
* The key of each element will be the client filename.
*
* @return array|null
* @return array<string, list<UploadedFile>|UploadedFile>|null
*/
public function all()
{
Expand Down Expand Up @@ -165,7 +165,7 @@
* Given a file array, will create UploadedFile instances. Will
* loop over an array and create objects for each.
*
* @return list<UploadedFile>|UploadedFile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove @return?

* @param array<string, int|string> $array File Object
*/
protected function createFileObject(array $array)
{
Expand All @@ -177,7 +177,7 @@
continue;
}

$output[$key] = $this->createFileObject($values);

Check failure on line 180 in system/HTTP/Files/FileCollection.php

View workflow job for this annotation

GitHub Actions / Psalm Analysis

NoValue

system/HTTP/Files/FileCollection.php:180:57: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
}

return $output;
Expand All @@ -200,6 +200,10 @@
* Thanks to Jack Sleight on the PHP Manual page for the basis
* of this method.
*
* @param array<string, array<string, int|string>> $data $_FILES Array
*
* @return array<string, array<string, int|string>>
*
* @see http://php.net/manual/en/reserved.variables.files.php#118294
*/
protected function fixFilesArray(array $data): array
Expand All @@ -218,7 +222,7 @@

$stack = [&$pointer];
$iterator = new RecursiveIteratorIterator(
new RecursiveArrayIterator($value),

Check failure on line 225 in system/HTTP/Files/FileCollection.php

View workflow job for this annotation

GitHub Actions / Psalm Analysis

NoValue

system/HTTP/Files/FileCollection.php:225:48: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
RecursiveIteratorIterator::SELF_FIRST
);

Expand All @@ -244,16 +248,16 @@
/**
* Navigate through an array looking for a particular index
*
* @param array $index The index sequence we are navigating down
* @param array $value The portion of the array to process
* @param list<string> $index The index sequence we are navigating down
* @param array<string, mixed> $value The portion of the array to process
*
* @return list<UploadedFile>|UploadedFile|null
*/
protected function getValueDotNotationSyntax(array $index, array $value)
{
$currentIndex = array_shift($index);

if (isset($currentIndex) && is_array($index) && $index && is_array($value[$currentIndex]) && $value[$currentIndex]) {
if (isset($currentIndex) && $index !== [] && is_array($value[$currentIndex]) && $value[$currentIndex] !== []) {
return $this->getValueDotNotationSyntax($index, $value[$currentIndex]);
}

Expand Down
Loading