From 83aba8b1915cbdb9a9cf1b7be4287ffbb534ac32 Mon Sep 17 00:00:00 2001 From: Eugene Matvejev Date: Tue, 21 Jun 2016 00:34:43 +0300 Subject: [PATCH] file: codestyle --- src/Container/File.php | 62 +++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/Container/File.php b/src/Container/File.php index ea75682..4918c1e 100644 --- a/src/Container/File.php +++ b/src/Container/File.php @@ -48,24 +48,6 @@ public function __construct($sourcePath, $outputPath) $this->outputPath = $outputPath; } - public function getSourcePath() - { - return $this->sourcePath; - } - - /** - * @param string $path - * - * @return File - */ - public function setSourcePath($path) - { - $this->sourcePath = $path; - $this->type = $this->detectSourceTypeFromPath($path); - - return $this; - } - /** * @return string */ @@ -117,6 +99,37 @@ public function setSourceContentFromSourcePath() return $this; } + /** + * @return string + * @throws FileException + */ + protected function readSourceContentByPath() + { + if (!file_exists($this->getSourcePath())) { + throw new FileException("file: {$this->sourcePath} doesn't exists"); + } + + return file_get_contents($this->getSourcePath()); + } + + public function getSourcePath() + { + return $this->sourcePath; + } + + /** + * @param string $path + * + * @return File + */ + public function setSourcePath($path) + { + $this->sourcePath = $path; + $this->type = $this->detectSourceTypeFromPath($path); + + return $this; + } + /** * @return string */ @@ -170,17 +183,4 @@ protected function detectSourceTypeFromPath($path) ? $extension : static::TYPE_UNKNOWN; } - - /** - * @return string - * @throws FileException - */ - protected function readSourceContentByPath() - { - if (!file_exists($this->getSourcePath())) { - throw new FileException("file: {$this->sourcePath} doesn't exists"); - } - - return file_get_contents($this->getSourcePath()); - } }