1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-07 03:50:08 +02:00

👌 Fix warnings

This commit is contained in:
2022-10-14 16:54:11 +02:00
parent daaece3cfa
commit 728274aaca
3 changed files with 10 additions and 6 deletions

View File

@ -26,7 +26,7 @@ class FakeShellTest: XCTestCase {
.delayed(2, "Goodbye world")
])
let output = await greeting.output(didReceiveOutput: { output, _ in })
let output = await greeting.output(didReceiveOutput: { _, _ in })
XCTAssertEqual("Hello world\nGoodbye world", output.out)
}

View File

@ -65,10 +65,14 @@ class ActivePhpInstallation {
)
// Return a list of .ini files parsed after php.ini
let paths = Command.execute(path: Paths.php, arguments: ["-r", "echo php_ini_scanned_files();"], trimNewlines: false)
.replacingOccurrences(of: "\n", with: "")
.split(separator: ",")
.map { String($0) }
let paths = Command.execute(
path: Paths.php,
arguments: ["-r", "echo php_ini_scanned_files();"],
trimNewlines: false
)
.replacingOccurrences(of: "\n", with: "")
.split(separator: ",")
.map { String($0) }
// See if any extensions are present in said .ini files
paths.forEach { (iniFilePath) in

View File

@ -21,7 +21,7 @@ class TestableCommand: CommandProtocol {
public func execute(path: String, arguments: [String], trimNewlines: Bool) -> String {
let concatenatedCommand = "\(path) \(arguments.joined(separator: " "))"
assert(commands.keys.contains(concatenatedCommand), "The expected command (\(concatenatedCommand)) was not found")
assert(commands.keys.contains(concatenatedCommand), "Command `\(concatenatedCommand)` not found")
return self.commands[concatenatedCommand]!
}
}