cancel
Showing results for 
Search instead for 
Did you mean: 

duplicate code normalizePath method

0 Kudos

duplicate code normalizePath method

Feature request from davidverholen, posted on GitHub Mar 20, 2016

this is more of a minor design issue. I recently needed a method to normalize a file system path.

Looking at the core, I found the method(s) for this, but implemented directly in the classes where they are used:

https://github.com/magento/magento2/blob/2d82d19010a2deee42ab67e62627b84169f0ab8a/lib/internal/Magen...

https://github.com/magento/magento2/blob/2d82d19010a2deee42ab67e62627b84169f0ab8a/lib/internal/Magen...

As I did not really need any of the classes, I implemented this method (a third time) in my own class.

A good place would be maybe the Frameworks File System Class: https://github.com/magento/magento2/blob/2d82d19010a2deee42ab67e62627b84169f0ab8a/lib/internal/Magen...

What do you think about it? I could start a small pull request for that

2 Comments
apiuser
New Member

Comment from piotrekkaminski, posted on GitHub Jun 11, 2016

@antonkril can you check it?

apiuser
New Member

Comment from antonkril, posted on GitHub Jul 15, 2016

Makes sense.