Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
Bug #58/ #14, add .travis YAML, coding standard fixes [iet:3935327]
Browse files Browse the repository at this point in the history
* Plus, use "dynamic" phpcs XML
  • Loading branch information
nfreear committed Aug 24, 2015
1 parent 3be4c07 commit 9232350
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ version.json
/vendor/*
/application/engines/mediaelement-x

phpcs-*.xml

/git*.php
/git-pull*

Expand Down Expand Up @@ -38,7 +40,7 @@ application/language/*.pot
* copy*
*OLD*
*ORIG*
*BAK
*BAK*
*.log
*.mo

Expand Down
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions application/controllers/demo.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
10 changes: 5 additions & 5 deletions application/core/MY_Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/*"
Expand Down

0 comments on commit 9232350

Please sign in to comment.