PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/intl/spoofchecker - spoofchecker_create.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 8 9 88.9 %
Date: 2014-09-13 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 5                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | This source file is subject to version 3.01 of the PHP license,      |
       6             :    | that is bundled with this package in the file LICENSE, and is        |
       7             :    | available through the world-wide-web at the following url:           |
       8             :    | http://www.php.net/license/3_01.txt                                  |
       9             :    | If you did not receive a copy of the PHP license and are unable to   |
      10             :    | obtain it through the world-wide-web, please send a note to          |
      11             :    | license@php.net so we can mail you a copy immediately.               |
      12             :    +----------------------------------------------------------------------+
      13             :    | Authors: Scott MacVicar <scottmac@php.net>                           |
      14             :    +----------------------------------------------------------------------+
      15             :  */
      16             : 
      17             : #ifdef HAVE_CONFIG_H
      18             : #include "config.h"
      19             : #endif
      20             : 
      21             : #include "php_intl.h"
      22             : #include "spoofchecker_class.h"
      23             : #include "spoofchecker_create.h"
      24             : #include "intl_data.h"
      25             : 
      26             : /* {{{ proto Spoofchecker Spoofchecker::__construct()
      27             :  * Spoofchecker object constructor.
      28             :  */
      29           5 : PHP_METHOD(Spoofchecker, __construct)
      30             : {
      31             :         int checks;
      32           5 :         SPOOFCHECKER_METHOD_INIT_VARS;
      33             :         
      34           5 :         if (zend_parse_parameters_none() == FAILURE) {
      35           0 :                 return;
      36             :         }
      37             :         
      38           5 :         SPOOFCHECKER_METHOD_FETCH_OBJECT_NO_CHECK;
      39             :         
      40           5 :         co->uspoof = uspoof_open(SPOOFCHECKER_ERROR_CODE_P(co));
      41           5 :         INTL_CTOR_CHECK_STATUS(co, "spoofchecker: unable to open ICU Spoof Checker");
      42             : 
      43             :         /* Single-script enforcement is on by default. This fails for languages
      44             :          like Japanese that legally use multiple scripts within a single word,
      45             :          so we turn it off.
      46             :         */
      47           5 :         checks = uspoof_getChecks(co->uspoof, SPOOFCHECKER_ERROR_CODE_P(co));
      48           5 :         uspoof_setChecks(co->uspoof, checks & ~USPOOF_SINGLE_SCRIPT, SPOOFCHECKER_ERROR_CODE_P(co));
      49             : }
      50             : /* }}} */
      51             : 
      52             : /*
      53             :  * Local variables:
      54             :  * tab-width: 4
      55             :  * c-basic-offset: 4
      56             :  * End:
      57             :  * vim600: noet sw=4 ts=4 fdm=marker
      58             :  * vim<600: noet sw=4 ts=4
      59             :  */

Generated by: LCOV version 1.10

Generated at Sat, 13 Sep 2014 16:24:27 +0000 (7 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.