Completed
Pull Request — master (#24)
by Jan
02:21
created
src/Driver/ComDriver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		// Use the Windows COM interface
24 24
 		$fsobj = new \COM('Scripting.FileSystemObject', null, CP_UTF8);
25 25
 		if (dirname($path) == '.') {
26
-			$path = ((substr(getcwd(), -1) == DIRECTORY_SEPARATOR) ? getcwd() . basename($path) : getcwd() . DIRECTORY_SEPARATOR . basename($path));
26
+			$path = ((substr(getcwd(), -1) == DIRECTORY_SEPARATOR) ? getcwd().basename($path) : getcwd().DIRECTORY_SEPARATOR.basename($path));
27 27
 		}
28 28
 		$f = $fsobj->GetFile($path);
29 29
 		return BigInteger::of($f->Size);
Please login to merge, or discard this patch.
src/Driver/ExecDriver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 			throw new PrerequisiteException("Exec function is disabled");
18 18
 		}
19 19
 
20
-		if(strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
20
+		if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
21 21
 			$this->os = self::OS_WINDOWS;
22 22
 		} elseif (strtoupper(PHP_OS) == "DARWIN") {
23 23
 			$this->os = self::OS_MAC;
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	public function getFileSize($path)
36 36
 	{
37
-		switch($this->os) {
37
+		switch ($this->os) {
38 38
 			case self::OS_WINDOWS: return $this->getFileSizeWindows($path); break;
39 39
 			case self::OS_LINUX:   return $this->getFileSizeLinux($path); break;
40 40
 			case self::OS_MAC:     return $this->getFileSizeMac($path); break;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 	 * @throws Exception
52 52
 	 */
53 53
 	private function convertToInteger($valueAsString) {
54
-		if(!is_string($valueAsString)) {
55
-			throw new Exception("Cannot convert to integer. Expected string, but got " . gettype($valueAsString). ".");
54
+		if (!is_string($valueAsString)) {
55
+			throw new Exception("Cannot convert to integer. Expected string, but got ".gettype($valueAsString).".");
56 56
 		}
57 57
 		$trimmedInput = trim($valueAsString);
58 58
 
Please login to merge, or discard this patch.