Permalink
Browse files

Add config for scrutinizer

  • Loading branch information...
1 parent 38fc062 commit 379b700e77c6e4f13dea9685d9fd30159f799348 @Synchro committed Dec 16, 2013
View
@@ -2,3 +2,4 @@ docs/phpdoc/
test/message.txt
test/testbootstrap.php
.idea
+build/
View
@@ -0,0 +1,126 @@
+before_commands:
+ - "composer install --prefer-source"
+
+tools:
+ # Code Coverage
+ external_code_coverage:
+ enabled: true
+ timeout: 300
+ filter:
+ excluded_paths:
+ - 'docs/*'
+ - 'examples/*'
+ - 'extras/*'
+ - 'test/*'
+ - 'vendor/*'
+
+
+ php_code_coverage:
+ enabled: false
+ test_command: phpunit
+ filter:
+ excluded_paths:
+ - 'docs/*'
+ - 'examples/*'
+ - 'extras/*'
+ - 'test/*'
+ - 'vendor/*'
+
+
+ # Code Sniffer
+ php_code_sniffer:
+ enabled: true
+ command: phpcs
+ config:
+ standard: PSR2
+ filter:
+ excluded_paths:
+ - 'docs/*'
+ - 'examples/*'
+ - 'extras/*'
+ - 'test/*'
+ - 'vendor/*'
+
+
+ # Copy/Paste Detector
+ php_cpd:
+ enabled: true
+ command: phpcpd
+ excluded_dirs:
+ - docs
+ - examples
+ - extras
+ - test
+ - vendor
+
+
+ # PHP CS Fixer (http://http://cs.sensiolabs.org/).
+ php_cs_fixer:
+ enabled: true
+ command: php-cs-fixer
+ config:
+ level: psr2
+ filter:
+ excluded_paths:
+ - 'docs/*'
+ - 'examples/*'
+ - 'extras/*'
+ - 'test/*'
+ - 'vendor/*'
+
+
+ # Analyzes the size and structure of a PHP project.
+ php_loc:
+ enabled: true
+ command: phploc
+ excluded_dirs:
+ - docs
+ - examples
+ - extras
+ - test
+ - vendor
+
+
+ # PHP Mess Detector (http://phpmd.org).
+ php_mess_detector:
+ enabled: true
+ command: phpmd
+ config:
+ rulesets:
+ - codesize
+ - unusedcode
+ - naming
+ - design
+ filter:
+ excluded_paths:
+ - 'docs/*'
+ - 'examples/*'
+ - 'extras/*'
+ - 'test/*'
+ - 'vendor/*'
+
+
+ # Analyzes the size and structure of a PHP project.
+ php_pdepend:
+ enabled: true
+ command: pdepend
+ excluded_dirs:
+ - docs
+ - examples
+ - extras
+ - test
+ - vendor
+
+ # Runs Scrutinizer's PHP Analyzer Tool
+ php_analyzer:
+ enabled: true
+ filter:
+ excluded_paths:
+ - 'docs/*'
+ - 'examples/*'
+ - 'extras/*'
+ - 'test/*'
+ - 'vendor/*'
+
+ # Security Advisory Checker
+ sensiolabs_security_checker: true
View
@@ -9,12 +9,18 @@ before_install:
before_script:
- sudo service postfix stop
- smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
+ - mkdir -p build/logs
- cd test
- cp testbootstrap-dist.php testbootstrap.php
- chmod +x fakesendmail.sh
- sudo mkdir -p /var/qmail/bin
- sudo cp fakesendmail.sh /var/qmail/bin/sendmail
- sudo cp fakesendmail.sh /usr/sbin/sendmail
- echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i|grep "PHP Version"|head -n 1|grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini"
+ - pwd
+ - ls -al
script:
- - phpunit phpmailerTest
+ - phpunit --configuration ../travis.phpunit.xml.dist
+after_script:
+ - wget https://scrutinizer-ci.com/ocular.phar
+ - php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml
View
@@ -38,7 +38,10 @@ function PHPMailerAutoload($classname)
spl_autoload_register('PHPMailerAutoload');
}
} else {
- //Fall back to traditional autoload for old PHP versions
+ /**
+ * Fall back to traditional autoload for old PHP versions
+ * @param string $classname The name of the class to load
+ */
function __autoload($classname)
{
PHPMailerAutoload($classname);
View
@@ -1,6 +1,8 @@
# PHPMailer - A full-featured email creation and transfer class for PHP
Build status: [![Build Status](https://travis-ci.org/Synchro/PHPMailer.png)](https://travis-ci.org/Synchro/PHPMailer)
+[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/Synchro/PHPMailer/badges/quality-score.png?s=320d104c5f7ae0bdb10abd98ea04e0cb107fe905)](https://scrutinizer-ci.com/g/Synchro/PHPMailer/)
+[![Code Coverage](https://scrutinizer-ci.com/g/Synchro/PHPMailer/badges/coverage.png?s=4a55049051633406197503e4f66cc8eeb224c9a4)](https://scrutinizer-ci.com/g/Synchro/PHPMailer/)
## Class Features
View
@@ -396,11 +396,7 @@ class PHPMailer
* The function that handles the result of the send email action.
* It is called out by send() for each email sent.
*
- * Value can be:
- * - 'function_name' for function names
- * - 'Class::Method' for static method calls
- * - array($object, 'Method') for calling methods on $object
- * See http://php.net/is_callable manual page for more details.
+ * Value can be any php callable: http://www.php.net/is_callable
*
* Parameters:
* bool $result result of the send action
@@ -410,7 +406,6 @@ class PHPMailer
* string $subject the subject
* string $body the email body
* string $from email address of sender
- *
* @type string
*/
public $action_function = '';
View
@@ -1,5 +1,5 @@
#!/bin/sh
# Regenerate PHPMailer documentation
# Run from within the docs folder
-rm -rf phpdocs/*
-phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/ --sourcecode --force --title PHPMailer
+rm -rf phpdoc/*
+phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/ --sourcecode --force --title PHPMailer --template="clean"
@@ -21,4 +21,4 @@
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() feilet.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
-$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
+$PHPMAILER_LANG['variable_set'] = 'Kan ikke sette eller resette variabelen: ';
View
@@ -0,0 +1,5 @@
+<?php
+require_once 'vendor/autoload.php';
+spl_autoload_register(function ($class) {
+ require_once strtr($class, '\\_', '//').'.php';
+});
Oops, something went wrong.

0 comments on commit 379b700

Please sign in to comment.