diff --git a/src/Console/ConvertCommand.php b/src/Console/ConvertCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/ConvertCommand.php
+++ b/src/Console/ConvertCommand.php
@@ -108,15 +108,7 @@ class ConvertCommand extends Command
     protected function isDestinationDifferentThanSource(string $source, string $destination)
     {
         $path_parts = pathinfo($destination);
-        if (!ends_with($path_parts['dirname'], DIRECTORY_SEPARATOR)) {
-            $destination = $path_parts['dirname'].DIRECTORY_SEPARATOR;
-        }
-        if (!ends_with($source, DIRECTORY_SEPARATOR)) {
-            $source = $source.DIRECTORY_SEPARATOR;
-        }
-        if ($destination === $source) {
-            throw InvalidParameter::wrongDestinationDirectory();
-        }
+        $this->isEqual($source, $path_parts['dirname']);
     }
 
     /**
diff --git a/tests/stubs/consoleCommand/php5.php b/tests/stubs/consoleCommand/php5.php
index <HASH>..<HASH> 100644
--- a/tests/stubs/consoleCommand/php5.php
+++ b/tests/stubs/consoleCommand/php5.php
@@ -18,4 +18,4 @@ class Test
         //HI I AM A COMMENT
         return 5;
     }
-}
+}
\ No newline at end of file
moving piece of code to a new method