You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnnewFileQueryRequirementsException(sprintf('At least 1 file must be available for file "%s" in child with an id of "%s". Please create the file in any of these locations: "%s"', $child->relativePath(), $child->childDir()->id(), implode('", "', $child->rawAbsolutePaths())));
returnnewFileQueryRequirementsException(sprintf('At least 1 file must be available for file "%s". Please create the file in any of these locations: "%s"', $query->queriedFileName(), implode('", "', $query->listRawPathsSimple())));
returnnewFileQueryRequirementsException(sprintf('Last file "%s" not found in child "%s" but it is required', $child->relativePath(), $child->childDir()->id()));
returnnewFileQueryRequirementsException('Query requires at least one file to exist in at least one child directory, but there isn\'t even a root directory. Make sure you have at least one root directory in your query');
// just check the first root dir (which is the last one because it was reversed)
206
-
break;
226
+
returnnewFileQueryRequirementsException(sprintf('Query requires at least one file to exist in at least one child directory in the last root directory with ID "%s". File must be present in one of the following locations: "%s"', $lastRootDirId, implode('", "', $paths)));
if ($child->totalExistingPaths() != count($child->getRootDirs())) {
217
-
returnnewFileQueryRequirementsException(sprintf('All "%s" children must contain a file called "%s".', $child->childDir()->id(), $child->relativePath()));
returnnewFileQueryRequirementsException(sprintf('All root directories and children must contain a file called "%s". Total files needed is %s but only %s files exist. Make sure that file is also available in the following locations: "%s"', $query->queriedFileName(), $totalNeeded, $totalAvailable, implode('", "', $neededPaths)));
218
242
}
219
243
returntrue;
220
244
}
221
245
222
246
/**
223
247
* Checks if the query meets all its requirements
224
248
*
225
-
* @param FilesQueryChild $queryChild
249
+
* @param FilesQuery $query
226
250
* @param bool $throwExceptionOnFail
227
251
* @throws \Exception When $throwExceptionOnFail is set to true and one of the requirements fails, it will throw
228
252
* the exception from that fail. Otherwise this exception will be returned
229
253
* @return mixed Returns true if all requirements are met. Otherwise returns an un-thrown exception
230
254
* if 'throwExceptionOnFail' is set to false or the response from the requirement
0 commit comments