@@ -48,24 +48,6 @@ public function __construct($sourcePath, $outputPath)
4848 $ this ->outputPath = $ outputPath ;
4949 }
5050
51- public function getSourcePath ()
52- {
53- return $ this ->sourcePath ;
54- }
55-
56- /**
57- * @param string $path
58- *
59- * @return File
60- */
61- public function setSourcePath ($ path )
62- {
63- $ this ->sourcePath = $ path ;
64- $ this ->type = $ this ->detectSourceTypeFromPath ($ path );
65-
66- return $ this ;
67- }
68-
6951 /**
7052 * @return string
7153 */
@@ -117,6 +99,37 @@ public function setSourceContentFromSourcePath()
11799 return $ this ;
118100 }
119101
102+ /**
103+ * @return string
104+ * @throws FileException
105+ */
106+ protected function readSourceContentByPath ()
107+ {
108+ if (!file_exists ($ this ->getSourcePath ())) {
109+ throw new FileException ("file: {$ this ->sourcePath } doesn't exists " );
110+ }
111+
112+ return file_get_contents ($ this ->getSourcePath ());
113+ }
114+
115+ public function getSourcePath ()
116+ {
117+ return $ this ->sourcePath ;
118+ }
119+
120+ /**
121+ * @param string $path
122+ *
123+ * @return File
124+ */
125+ public function setSourcePath ($ path )
126+ {
127+ $ this ->sourcePath = $ path ;
128+ $ this ->type = $ this ->detectSourceTypeFromPath ($ path );
129+
130+ return $ this ;
131+ }
132+
120133 /**
121134 * @return string
122135 */
@@ -170,17 +183,4 @@ protected function detectSourceTypeFromPath($path)
170183 ? $ extension
171184 : static ::TYPE_UNKNOWN ;
172185 }
173-
174- /**
175- * @return string
176- * @throws FileException
177- */
178- protected function readSourceContentByPath ()
179- {
180- if (!file_exists ($ this ->getSourcePath ())) {
181- throw new FileException ("file: {$ this ->sourcePath } doesn't exists " );
182- }
183-
184- return file_get_contents ($ this ->getSourcePath ());
185- }
186186}
0 commit comments