diff --git a/phpmon/Domain/Core/PhpExtension.swift b/phpmon/Domain/Core/PhpExtension.swift index b34f578..dbdac51 100644 --- a/phpmon/Domain/Core/PhpExtension.swift +++ b/phpmon/Domain/Core/PhpExtension.swift @@ -47,7 +47,7 @@ class PhpExtension { When registering an extension, we do that based on the line found inside the .ini file. */ init(_ line: String, file: String) { - let regex = try! NSRegularExpression(pattern: PhpExtension.extensionRegex, options: []) + let regex = try! NSRegularExpression(pattern: Self.extensionRegex, options: []) let match = regex.matches(in: line, options: [], range: NSMakeRange(0, line.count)).first let range = Range(match!.range(withName: "name"), in: line)! @@ -84,7 +84,7 @@ class PhpExtension { return file!.components(separatedBy: "\n") .filter({ (line) -> Bool in - return line.range(of: PhpExtension.extensionRegex, options: .regularExpression) != nil + return line.range(of: Self.extensionRegex, options: .regularExpression) != nil }) .map { (line) -> PhpExtension in return PhpExtension(line, file: path.path) diff --git a/phpmon/Domain/Core/PhpInstall.swift b/phpmon/Domain/Core/PhpInstall.swift index ed8170a..7665741 100644 --- a/phpmon/Domain/Core/PhpInstall.swift +++ b/phpmon/Domain/Core/PhpInstall.swift @@ -23,7 +23,7 @@ class PhpInstall { init() { // Show information about the current version - self.version = type(of: self).getVersion() + self.version = Self.getVersion() // If an error occurred, exit early if (self.version.error) { @@ -38,9 +38,9 @@ class PhpInstall { // Get configuration values self.configuration = Configuration( - memory_limit: type(of: self).getByteCount(key: "memory_limit"), - upload_max_filesize: type(of: self).getByteCount(key: "upload_max_filesize"), - post_max_size: type(of: self).getByteCount(key: "post_max_size") + memory_limit: Self.getByteCount(key: "memory_limit"), + upload_max_filesize: Self.getByteCount(key: "upload_max_filesize"), + post_max_size: Self.getByteCount(key: "post_max_size") ) }