diff --git a/.gitignore b/.gitignore index 81991fa..b10c4e8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ version.json /vendor/* /application/engines/mediaelement-x +phpcs-*.xml + /git*.php /git-pull* @@ -38,7 +40,7 @@ application/language/*.pot * copy* *OLD* *ORIG* -*BAK +*BAK* *.log *.mo diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..10a62c7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,16 @@ +language: php +php: + - 5.4 + - 5.6 + - 7.0 + +before_install: + - composer self-update + +install: + - composer install --prefer-source + +script: + - composer test + +#End. diff --git a/application/controllers/demo.php b/application/controllers/demo.php index d7a6c10..c0daf85 100644 --- a/application/controllers/demo.php +++ b/application/controllers/demo.php @@ -160,8 +160,8 @@ public function youtube($youtube_vid = false) if ($youtube_stream_vid && !$youtube_vid) { $youtube_vid = $youtube_stream_vid; $is_stream = true; - } - elseif (!$youtube_vid) { + + } elseif (!$youtube_vid) { $youtube_vid = $youtube_demo_vid; } diff --git a/application/core/MY_Loader.php b/application/core/MY_Loader.php index 195f4a1..d0c550f 100644 --- a/application/core/MY_Loader.php +++ b/application/core/MY_Loader.php @@ -106,12 +106,12 @@ public function theme_view($view = null, $vars = array(), $return = false) // Try absolute paths first. if (file_exists($view_file . '.php')) { return $this->view($view_file, $vars, $return); - } - elseif (file_exists($parent_view . '.php')) { + + } elseif (file_exists($parent_view . '.php')) { return $this->view($parent_view, $vars, $return); - } - // .. Then (legacy) relative paths. - elseif (file_exists(APPPATH . $view_file .'.php')) { + + } elseif (file_exists(APPPATH . $view_file .'.php')) { + // .. Then (legacy) relative paths. return $this->view('../'. $view_file, $vars, $return); } return $this->view('../'. $parent_view, $vars, $return); diff --git a/composer.json b/composer.json index a12adb9..2d6a712 100644 --- a/composer.json +++ b/composer.json @@ -58,9 +58,10 @@ "test": [ "php index.php build/revision", "composer validate --no-interaction", - "composer validate --no-interaction --working-dir composer-shared", + "#composer validate --no-interaction --working-dir composer-shared", "#parallel-lint application/*", - "phpcs --standard=./phpcs.xml -n --encoding=utf-8 --extensions=php application/core/*" + "php vendor/bin/dyn-phpcs-xml.php --no-ns --cfn vendor/iet-ou/open-media-player-core/phpcs.xml > phpcs-1.xml", + "phpcs --standard=./phpcs-1.xml -n --encoding=utf-8 --extensions=php application/*" ], "test-cs": [ "phpcs --standard=./phpcs.xml -n --encoding=utf-8 --extensions=php application/*"