@@ -48,24 +48,6 @@ public function __construct($sourcePath, $outputPath)
48
48
$ this ->outputPath = $ outputPath ;
49
49
}
50
50
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
-
69
51
/**
70
52
* @return string
71
53
*/
@@ -117,6 +99,37 @@ public function setSourceContentFromSourcePath()
117
99
return $ this ;
118
100
}
119
101
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
+
120
133
/**
121
134
* @return string
122
135
*/
@@ -170,17 +183,4 @@ protected function detectSourceTypeFromPath($path)
170
183
? $ extension
171
184
: static ::TYPE_UNKNOWN ;
172
185
}
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
- }
186
186
}
0 commit comments