100+ results for 'php is_bool'

Not the results you expected?

Grammar.php (https://gitlab.com/madwanz64/laravel) PHP · 286 lines

1 <?php

2

3 namespace Illuminate\Database\Schema\Grammars;

244 }

245

246 return is_bool($value)

247 ? "'".(int) $value."'"

248 : "'".(string) $value."'";

XmlDescriptor.php (https://gitlab.com/oytunistrator/92five) PHP · 212 lines

1 <?php

2

3 /*

40

41 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));

42 $defaults = is_array($argument->getDefault()) ? $argument->getDefault() : (is_bool($argument->getDefault()) ? array(var_export($argument->getDefault(), true)) : ($argument->getDefault() ? array($argument->getDefault()) : array()));

43 foreach ($defaults as $default) {

44 $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));

72

73 if ($option->acceptValue()) {

74 $defaults = is_array($option->getDefault()) ? $option->getDefault() : (is_bool($option->getDefault()) ? array(var_export($option->getDefault(), true)) : ($option->getDefault() ? array($option->getDefault()) : array()));

75 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));

76

actions.class.php (https://github.com/appflower/appflower_studio.git) PHP · 240 lines

1 <?php

2 /**

3 * afsUserManager action

115 $validate = afStudioUser::validate($aUpdate);

116

117 if (is_bool($validate) && $validate === true && empty($aErrors)) {

118 // if password has been setted encoding using rule

119 if (!empty($aUser['password'])) $aUpdate[afStudioUser::PASSWORD] = afStudioUser::passwordRule($aUser['password']);

XmlDescriptor.php (https://gitlab.com/nmhieucoder/laravel_tintuc) PHP · 247 lines

1 <?php

2

3 /*

192

193 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));

194 $defaults = \is_array($argument->getDefault()) ? $argument->getDefault() : (\is_bool($argument->getDefault()) ? [var_export($argument->getDefault(), true)] : ($argument->getDefault() ? [$argument->getDefault()] : []));

195 foreach ($defaults as $default) {

196 $defaultsXML->appendChild($defaultXML = $dom->createElement('default'));

221

222 if ($option->acceptValue()) {

223 $defaults = \is_array($option->getDefault()) ? $option->getDefault() : (\is_bool($option->getDefault()) ? [var_export($option->getDefault(), true)] : ($option->getDefault() ? [$option->getDefault()] : []));

224 $objectXML->appendChild($defaultsXML = $dom->createElement('defaults'));

225

Properties.php (https://github.com/tmccormi/openemr.git) PHP · 629 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Document;

4

5 class Properties

469 } elseif (is_int($propertyValue)) {

470 $propertyType = self::PROPERTY_TYPE_INTEGER;

471 } elseif (is_bool($propertyValue)) {

472 $propertyType = self::PROPERTY_TYPE_BOOLEAN;

473 } else {

485

486 /**

487 * Implement PHP __clone to create a deep clone, not just a shallow copy.

488 */

489 public function __clone()

Serializer.php (git://github.com/evert/SabreAMF.git) PHP · 269 lines

1 <?php

2

3 /**

31 $type=false;

32 if (!$type && is_null($data)) $type = SabreAMF_AMF3_Const::DT_NULL;

33 if (!$type && is_bool($data)) {

34 $type = $data?SabreAMF_AMF3_Const::DT_BOOL_TRUE:SabreAMF_AMF3_Const::DT_BOOL_FALSE;

35 }

arrays.c (https://github.com/pbiggar/phc.git) C · 426 lines

11 else if (Z_TYPE_P (arr) != IS_ARRAY)

12 {

13 php_error_docref (NULL TSRMLS_CC, E_WARNING,

14 "Cannot use a scalar value as an array");

15 array_init (arr);

35 {

36 int result;

37 if (Z_TYPE_P (ind) == IS_LONG || Z_TYPE_P (ind) == IS_BOOL)

38 {

39 result = zend_hash_index_find (ht, Z_LVAL_P (ind), (void **) data);

80 if (Z_TYPE_P (ind) == IS_OBJECT || Z_TYPE_P (ind) == IS_ARRAY)

81 {

82 php_error_docref (NULL TSRMLS_CC, E_WARNING, "Illegal offset type");

83 return 0;

84 }

Logical.php (https://gitlab.com/adamlwalker/generatedata) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = TRUE;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = FALSE;

122 } else {

Logical.php (https://gitlab.com/ptisky/API_prestashop) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.9, 2013-06-02

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = TRUE;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = FALSE;

122 } else {

Item.php (https://github.com/rockerest/capstone.git) PHP · 339 lines

1 <?php

2 require_once('connect.php');

3 require_once('Ingredient.php');

4 require_once('Characteristic.php');

5 require_once('Rating.php');

6 require_once('View.php');

7 require_once('Category.php');

8 require_once('Search.php');

275 global $db;

276

277 $chars = is_array($this->characteristics) ? $this->characteristics : (is_bool($this->characteristics) ? array() : array($this->characteristics));

278 $recs = is_array($this->recommendations) ? $this->recommendations : (is_bool($this->recommendations) ? array() : array($this->recommendations));

Logical.php (https://gitlab.com/khairulcse76/userLogins) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = TRUE;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = FALSE;

122 } else {

Logical.php (https://gitlab.com/rsilveira1987/Expresso) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.8, 2012-10-12

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = TRUE;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = FALSE;

122 } else {

Logical.php (https://github.com/real-chocopanda/PHPExcel.git) PHP · 290 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = true;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = false;

122 } else {

Logical.php (https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.7, 2012-05-19

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2012 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = TRUE;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = FALSE;

122 } else {

Logical.php (https://github.com/davealaras/ERB-STSN.git) PHP · 290 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.6, 2011-02-27

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = true;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = false;

122 } else {

Logical.php (https://gitlab.com/mvcarvalho/plataforma-e-commerce) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.8.0, 2014-03-02

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = TRUE;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = FALSE;

122 } else {

Logical.php (https://gitlab.com/alexandresgv/siteentec) PHP · 288 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version ##VERSION##, ##DATE##

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = TRUE;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = FALSE;

122 } else {

axis_label_centered.php (https://gitlab.com/OnBlox/OnBlox-Template) PHP · 282 lines

1 <?php

2 /**

3 * File containing the ezcGraphAxisCenteredLabelRenderer class

73 {

74 case 'showZeroValue':

75 if ( !is_bool( $propertyValue ) )

76 {

77 throw new ezcBaseValueException( $propertyName, $propertyValue, 'bool' );

Logical.php (https://github.com/andrerezende/SIE.git) PHP · 290 lines

22 * @package PHPExcel_Calculation

23 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

24 * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL

25 * @version 1.7.5, 2010-12-10

34 define('PHPEXCEL_ROOT', dirname(__FILE__) . '/../../');

35 require(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');

36 }

37

43 * @package PHPExcel_Calculation

44 * @copyright Copyright (c) 2006 - 2010 PHPExcel (http://www.codeplex.com/PHPExcel)

45 */

46 class PHPExcel_Calculation_Logical {

118 if (($arg == 'TRUE') || ($arg == PHPExcel_Calculation::getTRUE())) {

119 $arg = true;

120 } elseif (($arg == 'FALSE') || ($arg == PHPExcel_Calculation::getFALSE())) {

121 $arg = false;

122 } else {

odbc_arginfo.h (https://github.com/php/php-src.git) C Header · 377 lines

1 /* This is a generated file, edit the .stub.php file instead.

2 * Stub hash: 27a50ba79ed632721ee458527ef543e4b44ee897 */

3

5 ZEND_END_ARG_INFO()

6

7 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_binmode, 0, 2, _IS_BOOL, 0)

8 ZEND_ARG_INFO(0, statement)

9 ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0)

10 ZEND_END_ARG_INFO()

11

12 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_longreadlen, 0, 2, _IS_BOOL, 0)

13 ZEND_ARG_INFO(0, statement)

14 ZEND_ARG_TYPE_INFO(0, length, IS_LONG, 0)

20 ZEND_END_ARG_INFO()

21

22 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_execute, 0, 1, _IS_BOOL, 0)

23 ZEND_ARG_INFO(0, statement)

24 ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, params, IS_ARRAY, 0, "[]")

zlib_arginfo.h (https://github.com/php/php-src.git) C Header · 231 lines

1 /* This is a generated file, edit the .stub.php file instead.

2 * Stub hash: 508af4dd8892e7d2e70d16f2365c21a0921922d8 */

3

69 #define arginfo_gzputs arginfo_gzwrite

70

71 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_gzrewind, 0, 1, _IS_BOOL, 0)

72 ZEND_ARG_INFO(0, stream)

73 ZEND_END_ARG_INFO()

Pdo.php (https://github.com/ntulip/piwik.git) PHP · 439 lines

1 <?php

2 /**

3 * Zend Framework

18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)

19 * @license http://framework.zend.com/license/new-bsd New BSD License

20 * @version $Id: Pdo.php 18079 2009-09-11 17:46:45Z ralph $

21 */

22

24 * @see Zend_Db_Statement

25 */

26 require_once 'Zend/Db/Statement.php';

27

28 /**

58 $this->_stmt = $this->_adapter->getConnection()->prepare($sql);

59 } catch (PDOException $e) {

60 require_once 'Zend/Db/Statement/Exception.php';

61 throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);

62 }

EventQuery.php (https://github.com/jtai/zf2.git) PHP · 484 lines

1 <?php

2 /**

3 * Zend Framework

391 {

392 if ($value !== null) {

393 if (is_bool($value)) {

394 $this->_params['singleevents'] = ($value?'true':'false');

395 } elseif ($value == 'true' | $value == 'false') {

438 {

439 if ($value !== null) {

440 if (is_bool($value)) {

441 $this->_params['futureevents'] = ($value?'true':'false');

442 } elseif ($value == 'true' | $value == 'false') {

Validator.php (https://github.com/zikula-modules/KnowledgeBase.git) PHP · 399 lines

1 <?php

2 /**

3 * KnowledgeBase.

42 public function isValidBoolean($fieldName)

43 {

44 return (is_bool($this->entity[$fieldName]));

45 }

46

Ini.php (https://github.com/taste/zf2.git) PHP · 193 lines

1 <?php

2 /**

3 * Zend Framework

154 if (is_integer($value) || is_float($value)) {

155 return $value;

156 } elseif (is_bool($value)) {

157 return ($value ? 'true' : 'false');

158 } elseif (strpos($value, '"') === false) {

Ini.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 200 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Ini.php 24593 2012-01-05 20:35:02Z matthew $

20 */

21

23 * @see Zend_Config_Writer

24 */

25 require_once 'Zend/Config/Writer/FileAbstract.php';

26

27 /**

157 if (is_integer($value) || is_float($value)) {

158 return $value;

159 } elseif (is_bool($value)) {

160 return ( $value ? 'true' : 'false' );

161 } elseif (strpos($value, '"') === false) {

AbstractListing.php (https://github.com/pimcore/pimcore.git) PHP · 607 lines

1 <?php

2

3 /**

340 }

341 } else {

342 if (is_bool($param)) {

343 $type = \PDO::PARAM_BOOL;

344 } elseif (is_int($param)) {

helpers.php (https://gitlab.com/jjpa2018/dashboard) PHP · 379 lines

1 <?php

2

3 use Illuminate\Contracts\Support\DeferringDisplayableValue;

48 }

49

50 if (is_numeric($value) || is_bool($value)) {

51 return false;

52 }

361 function windows_os()

362 {

363 return PHP_OS_FAMILY === 'Windows';

364 }

365 }

Csv.php (https://bitbucket.org/moodle/moodle.git) PHP · 404 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Writer;

4

5 use PhpOffice\PhpSpreadsheet\Calculation\Calculation;

6 use PhpOffice\PhpSpreadsheet\Spreadsheet;

7

8 class Csv extends BaseWriter

9 {

10 /**

11 * PhpSpreadsheet object.

12 *

13 * @var Spreadsheet

34 * @var string

35 */

36 private $lineEnding = PHP_EOL;

37

38 /**

Url.php (https://github.com/christeredvartsen/zf2.git) PHP · 119 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

81 }

82

83 if (3 == func_num_args() && is_bool($options)) {

84 $reuseMatchedParams = $options;

85 $options = array();

HasManyFileDataObjectManager.php (https://github.com/ordinarywebguy/silverstripe_workshop.git) PHP · 188 lines

1 <?php

2

3 class HasManyFileDataObjectManager extends FileDataObjectManager

16 /**

17 * Most of the code below was copied from HasManyComplexTableField.

18 * Painful, but necessary, until PHP supports multiple inheritance.

19 */

20

49 public function hasMarkingPermission()

50 {

51 if(is_bool($this->markingPermission))

52 return $this->markingPermission;

53 elseif($this->markingPermission)

axis_label_exact.php (https://github.com/Proudio-Interactive/phpUnderControl.git) PHP · 304 lines

1 <?php

2 /**

3 * File containing the ezcGraphAxisExactLabelRenderer class

64 case 'showLastValue':

65 case 'renderLastOutside':

66 if ( !is_bool( $propertyValue ) )

67 {

68 throw new ezcBaseValueException( $propertyName, $propertyValue, 'bool' );

Form.class.php (https://gitlab.com/ctheilman92/Aging-In-Place) PHP · 210 lines

1 <?php

2 /* vim: set expandtab sw=4 ts=4 sts=4: */

3 /**

4 * Form handling code.

5 *

6 * @package PhpMyAdmin

7 */

8

11 * values etc.

12 *

13 * @package PhpMyAdmin

14 */

15 class Form

104 break;

105 }

106 $keys[] = is_bool($value[$i]) ? (int)$value[$i] : $value[$i];

107 }

108 if (!$has_string_keys) {

obj_print.c (https://github.com/Lafriks/mupdf.git) C · 340 lines

236 else if (fz_is_null(ctx, obj))

237 fmt_puts(fmt, "null");

238 else if (fz_is_bool(ctx, obj))

239 fmt_puts(fmt, fz_to_bool(ctx, obj) ? "true" : "false");

240 else if (fz_is_int(ctx, obj))

CellQuery.php (https://github.com/jacknicole/sugarcrm_dev.git) PHP · 417 lines

1 <?php

2

3 /**

25 * Zend_Gdata_App_util

26 */

27 require_once('Zend/Gdata/App/Util.php');

28

29 /**

30 * Zend_Gdata_Query

31 */

32 require_once('Zend/Gdata/Query.php');

33

34 /**

332 public function setReturnEmpty($value)

333 {

334 if (is_bool($value)) {

335 $this->_params['return-empty'] = ($value?'true':'false');

336 } else if ($value != null) {

Font.php (https://github.com/abgreeve/moodle.git) PHP · 558 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Style;

4

5 class Font extends Supervisor

147 * 'bold' => TRUE,

148 * 'italic' => FALSE,

149 * 'underline' => \PhpOffice\PhpSpreadsheet\Style\Font::UNDERLINE_DOUBLE,

150 * 'strikethrough' => FALSE,

151 * 'color' => [

426 * Set Underline.

427 *

428 * @param bool|string $pValue \PhpOffice\PhpSpreadsheet\Style\Font underline type

429 * If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE,

430 * false equates to UNDERLINE_NONE

stack.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 149 lines

1 <?php

2 /**

3 * File containing the ezcCacheStackOptions class.

131 break;

132 case 'bubbleUpOnRestore':

133 if ( !is_bool( $propertyValue ) )

134 {

135 throw new ezcBaseValueException(

json.php (https://github.com/denisbz/SPIP-1.git) PHP · 83 lines

1 <?php

2

3 /***************************************************************************\

30 case is_string($var) :

31 return '"' .addcslashes($var, "\"\\\n\r/") . '"';

32 case is_bool($var) :

33 return $var ? 'true' : 'false';

34 case is_scalar($var) :

Dumper.php (https://github.com/ewandor/horde.git) PHP · 216 lines

1 <?php

2 /**

3 * Horde YAML package

4 *

5 * This package is heavily inspired by the Spyc PHP YAML

6 * implementation (http://spyc.sourceforge.net/), and portions are

7 * copyright 2005-2006 Chris Wanstrath.

16

17 /**

18 * Dump PHP data structures to YAML.

19 *

20 * @category Horde

26

27 /**

28 * Dump PHP array to YAML

29 *

30 * The dump method, when supplied with an array, will do its best

apc_sample_serializer.php (https://gitlab.com/Blueprint-Marketing/hhvm) PHP · 162 lines

1 <?php

2

3 /**

4 * Write .cpp files for building libapc_prime.so that can be loaded by an

5 * HPHP-compiled server at startup time.

6 */

7 class CacheArchiveHphpSerializer extends CacheArchiveSerializer {

10 }

11

12 public function getName() { return 'hphp';}

13 public function unserialize($data) {}

14

16 $tmp = 0;

17 $out = "\n#include \"apc_prime.h\"\n\n";

18 $out .= "namespace HPHP {\n";

19 $out .= str_repeat('/', 79)."\n\n";

20 $out .= "APC_BEGIN(".$this->getArchiveId().");\n";

MySqlGrammar.php (https://gitlab.com/jjpa2018/dashboard) PHP · 329 lines

1 <?php

2

3 namespace Illuminate\Database\Query\Grammars;

208 protected function compileJsonUpdateColumn($key, $value)

209 {

210 if (is_bool($value)) {

211 $value = $value ? 'true' : 'false';

212 } elseif (is_array($value)) {

257 {

258 $values = collect($values)->reject(function ($value, $column) {

259 return $this->isJsonSelector($column) && is_bool($value);

260 })->map(function ($value) {

261 return is_array($value) ? json_encode($value) : $value;

TableDefinition.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 268 lines

1 <?php

2

3 namespace YoastSEO_Vendor;

102 $this->_table_def = new \YoastSEO_Vendor\Ruckusing_Adapter_TableDefinition($this->_adapter, $this->_options);

103 if (\array_key_exists('id', $options)) {

104 if (\is_bool($options['id']) && $options['id'] == \false) {

105 $this->_auto_generate_id = \false;

106 }

eztemplateautoload.php (https://github.com/itag/ezpublish.git) PHP · 183 lines

1 <?php

2 /**

3 * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.

57 'or', 'and', 'choose' ) );

58 $eZTemplateOperatorArray[] = array( 'class' => 'eZTemplateTypeOperator',

59 'operator_names' => array( 'is_array', 'is_boolean', 'is_integer',

60 'is_float', 'is_numeric', 'is_string',

61 'is_object', 'is_class', 'is_null',

177

178

179 // eZTemplatePHPOperator is not autoload due to it's generic use

180 // it's up to the users of eZTemplate to initiate a proper usage

181 // for this operator class.

eztemplateautoload.php (https://bitbucket.org/ericsagnes/ezpublish-multisite.git) PHP · 183 lines

1 <?php

2 /**

3 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.

57 'or', 'and', 'choose' ) );

58 $eZTemplateOperatorArray[] = array( 'class' => 'eZTemplateTypeOperator',

59 'operator_names' => array( 'is_array', 'is_boolean', 'is_integer',

60 'is_float', 'is_numeric', 'is_string',

61 'is_object', 'is_class', 'is_null',

177

178

179 // eZTemplatePHPOperator is not autoload due to it's generic use

180 // it's up to the users of eZTemplate to initiate a proper usage

181 // for this operator class.

Type.php (https://github.com/lacyrhoades/basecamp2cnp.git) PHP · 192 lines

1 <?php

2 /**

3 * PHPUnit

4 *

5 * Copyright (c) 2002-2011, Sebastian Bergmann <sebastian@phpunit.de>.

6 * All rights reserved.

7 *

35 * POSSIBILITY OF SUCH DAMAGE.

36 *

37 * @package PHPUnit

38 * @subpackage Util

39 * @author Sebastian Bergmann <sebastian@phpunit.de>

40 * @copyright 2002-2011 Sebastian Bergmann <sebastian@phpunit.de>

41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License

Pql.php (https://github.com/markvince/CakePHP-GAStats-Plugin.git) PHP · 174 lines

1 <?php

2 /**

3 * A utility class for handling PQL objects.

4 *

5 * PHP version 5

6 *

7 * Copyright 2016, Google Inc. All Rights Reserved.

26 * Version 2.0

27 */

28 require_once 'Google/Api/Ads/Dfp/Util/v201608/DateTimeUtils.php';

29

30 /**

60 return new TextValue();

61 } else {

62 if (is_bool($value)) {

63 return new BooleanValue($value);

64 } else if (is_float($value) || is_int($value)) {

Pql.php (https://github.com/markvince/CakePHP-GAStats-Plugin.git) PHP · 174 lines

1 <?php

2 /**

3 * A utility class for handling PQL objects.

4 *

5 * PHP version 5

6 *

7 * Copyright 2016, Google Inc. All Rights Reserved.

26 * Version 2.0

27 */

28 require_once 'Google/Api/Ads/Dfp/Util/v201605/DateTimeUtils.php';

29

30 /**

60 return new TextValue();

61 } else {

62 if (is_bool($value)) {

63 return new BooleanValue($value);

64 } else if (is_float($value) || is_int($value)) {

Pql.php (https://github.com/markvince/CakePHP-GAStats-Plugin.git) PHP · 174 lines

1 <?php

2 /**

3 * A utility class for handling PQL objects.

4 *

5 * PHP version 5

6 *

7 * Copyright 2013, Google Inc. All Rights Reserved.

26 * Version 2.0

27 */

28 require_once 'Google/Api/Ads/Dfp/Util/v201602/DateTimeUtils.php';

29

30 /**

60 return new TextValue();

61 } else {

62 if (is_bool($value)) {

63 return new BooleanValue($value);

64 } else if (is_float($value) || is_int($value)) {

Pql.php (https://github.com/markvince/CakePHP-GAStats-Plugin.git) PHP · 174 lines

1 <?php

2 /**

3 * A utility class for handling PQL objects.

4 *

5 * PHP version 5

6 *

7 * Copyright 2013, Google Inc. All Rights Reserved.

26 * Version 2.0

27 */

28 require_once 'Google/Api/Ads/Dfp/Util/v201511/DateTimeUtils.php';

29

30 /**

60 return new TextValue();

61 } else {

62 if (is_bool($value)) {

63 return new BooleanValue($value);

64 } else if (is_float($value) || is_int($value)) {

Pql.php (https://github.com/markvince/CakePHP-GAStats-Plugin.git) PHP · 174 lines

1 <?php

2 /**

3 * A utility class for handling PQL objects.

4 *

5 * PHP version 5

6 *

7 * Copyright 2013, Google Inc. All Rights Reserved.

26 * Version 2.0

27 */

28 require_once 'Google/Api/Ads/Dfp/Util/v201508/DateTimeUtils.php';

29

30 /**

60 return new TextValue();

61 } else {

62 if (is_bool($value)) {

63 return new BooleanValue($value);

64 } else if (is_float($value) || is_int($value)) {

Gcm.php (https://github.com/Riges/KawaiViewModel.git) PHP · 273 lines

1 <?php

2 /**

3 * Zend Framework

22

23 /** Zend_Mobile_Push_Message_Abstract **/

24 require_once 'Zend/Mobile/Push/Message/Abstract.php';

25

26 /**

181 public function setDelayWhileIdle($delay)

182 {

183 if (!is_bool($delay)) {

184 throw new Zend_Mobile_Push_Message_Exception('$delay must be boolean');

185 }

Ini.php (https://github.com/Riges/KawaiViewModel.git) PHP · 193 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Ini.php 24593 2012-01-05 20:35:02Z matthew $

20 */

21

23 * @see Zend_Config_Writer

24 */

25 require_once 'Zend/Config/Writer/FileAbstract.php';

26

27 /**

152 if (is_integer($value) || is_float($value)) {

153 return $value;

154 } elseif (is_bool($value)) {

155 return ($value ? 'true' : 'false');

156 } elseif (strpos($value, '"') === false) {

Ini.php (https://gitlab.com/devtoannh/cafe) PHP · 193 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Ini.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

23 * @see Zend_Config_Writer

24 */

25 require_once 'Zend/Config/Writer/FileAbstract.php';

26

27 /**

152 if (is_integer($value) || is_float($value)) {

153 return $value;

154 } elseif (is_bool($value)) {

155 return ($value ? 'true' : 'false');

156 } elseif (strpos($value, '"') === false) {

Type.php (https://github.com/aflexi/thirdparty.git) PHP · 192 lines

1 <?php

2 /**

3 * PHPUnit

4 *

5 * Copyright (c) 2002-2010, Sebastian Bergmann <sebastian@phpunit.de>.

6 * All rights reserved.

7 *

35 * POSSIBILITY OF SUCH DAMAGE.

36 *

37 * @package PHPUnit

38 * @subpackage Util

39 * @author Sebastian Bergmann <sebastian@phpunit.de>

40 * @copyright 2002-2010 Sebastian Bergmann <sebastian@phpunit.de>

41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License

TinyMce.php (https://github.com/juokaz/php-examples.git) PHP · 145 lines

1 <?php

2

3 /**

112 return;

113 }

114 $script = 'tinyMCE_GZ.init({' . PHP_EOL

115 . 'themes: "' . implode(',', $this->_supported['theme']) . '",' . PHP_EOL

116 . 'plugins: "'. implode(',', $this->_supported['plugins']) . '",' . PHP_EOL

117 . 'languages: "' . implode(',', $this->_supported['languages']) . '",' . PHP_EOL

118 . 'disk_cache: true,' . PHP_EOL

119 . 'debug: false,' . PHP_EOL

126 protected function _renderEditor ()

127 {

128 $script = 'tinyMCE.init({' . PHP_EOL;

129

130 foreach ($this->_config as $name => $value) {

Stack.class.php (https://github.com/jasononeil/ufront-tutorial-Q-A.git) PHP · 222 lines

1 <?php

2

3 class haxe_Stack {

21 $x = "null";

22 } else {

23 if(is_bool($x)) {

24 $x = (($x) ? "true" : "false");

25 }

43 $x = "null";

44 } else {

45 if(is_bool($x)) {

46 $x = (($x) ? "true" : "false");

47 }

57 $x = "null";

58 } else {

59 if(is_bool($x)) {

60 $x = (($x) ? "true" : "false");

61 }

LineFormatter.php (https://gitlab.com/madwanz64/laravel) PHP · 217 lines

1 <?php declare(strict_types=1);

2

3 /*

163 protected function convertToString($data): string

164 {

165 if (null === $data || is_bool($data)) {

166 return var_export($data, true);

167 }

CellQuery.php (https://github.com/kiranatama/sagalaya.git) PHP · 404 lines

1 <?php

2 /**

3 * Zend Framework

323 public function setReturnEmpty($value)

324 {

325 if (is_bool($value)) {

326 $this->_params['return-empty'] = ($value?'true':'false');

327 } else if ($value != null) {

webarchive.php (https://github.com/yoya/misc.git) PHP · 212 lines

4 echo "Usage: php webarchive.php <get|check> <target_url> # http:// https:// only ".PHP_EOL;

5 echo "ex) php webarchive.php get http://app.awm.jp".PHP_EOL;

6 }

7

14 $method = $argv[1];

15 if (($method !== "check") && ($method !== "get")) {

16 echo "method:$method support, check or get".PHP_EOL;

17 usage();

18 exit (1);

108 echo " diff(".($actual_count-$count).")";

109 }

110 echo PHP_EOL;

111 return true;

112 }

191 function fetch_page($url, $datekey) {

192 global $pagedir;

193 echo "Url: $url".PHP_EOL;

194 $pagefile = "$pagedir/$datekey";

195 if (is_file($pagefile)) {

class.DbOdbc.php (https://github.com/palmic/2yaml.git) PHP · 217 lines

1 <?php

2

3

109

110 public function transactionStart(/*boolean*/ $autoCommit) {

111 if (!is_bool($autoCommit)) {

112 throw new DbControlException("Ilegal parameter autoCommit. Must be boolean.");

113 }

FormOptions.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 311 lines

1 <?php

2 /**

3 * Helper class to keep track of options when mixing links and form elements.

69 */

70 public static function guessType( $data ) {

71 if ( is_bool( $data ) ) {

72 return self::BOOL;

73 } elseif ( is_int( $data ) ) {

290 * Those function implements PHP ArrayAccess interface

291 * @see http://php.net/manual/en/class.arrayaccess.php

292 */

293 /* @{ */

Request.php (https://bitbucket.org/helfreire/tccsite.git) PHP · 505 lines

1 <?php namespace Illuminate\Http;

2

3 use Illuminate\Session\Store as SessionStore;

160 }

161

162 if (is_bool($this->input($key)) or is_array($this->input($key)))

163 {

164 return true;

Fixtures.php (https://bitbucket.org/akiraaisha/alice.git) PHP · 274 lines

1 <?php

2

3 /*

267

268 if (isset($options['persist_once'])) {

269 if (false === is_bool($options['persist_once'])) {

270 throw new \InvalidArgumentException('Expected "persist_once" option value value to be a boolean.');

271 }

type_functions.php (https://github.com/F5/zetacomponents.git) PHP · 161 lines

1 <?php

2 /**

3 * File containing the ezcTemplateTypeFunctions class

35

36 /**

37 * Translates a function used in the Template language to a PHP function call.

38 * The function call is represented by an array with three elements:

39 *

60 self::functionCall( "is_array", array( "%var" ) ) );

61

62 // is_bool( $v )::

63 // is_bool( $v )

64 case "is_bool": return array( array( "%var" ),

65 self::functionCall( "is_bool", array( "%var" ) ) );

Boolean.php (https://github.com/MontmereLimited/ZendFramework-v1.git) PHP · 375 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Boolean.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

23 * @see Zend_Filter_Interface

24 */

25 // // // // // // // // // // require_once 'Zend/Filter/Interface.php';

26

27 /**

53 self::EMPTY_ARRAY => 'array',

54 self::NULL => 'null',

55 self::PHP => 'php',

56 self::FALSE_STRING => 'false',

57 self::YES => 'yes',

RendererAbstract.php (https://github.com/quarkness/piwik.git) PHP · 250 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: RendererAbstract.php 23775 2011-03-01 17:25:24Z ralph $

20 */

21

22 /** @see Zend_Feed_Writer */

23 // require_once 'Zend/Feed/Writer.php';

24

25 /** @see Zend_Version */

26 // require_once 'Zend/Version.php';

27

28 /**

smarty_internal_resource_registered.php (https://gitlab.com/webbroteam/satisfaction-mvc) PHP · 99 lines

1 <?php

2 /**

3 * Smarty Internal Plugin Resource Registered

79 $content = null;

80 $t = call_user_func_array($source->smarty->registered_resources[$source->type][0][0], array($source->name, &$content, $source->smarty));

81 if (is_bool($t) && !$t) {

82 throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");

83 }

Dao.php (https://github.com/pimcore/pimcore.git) PHP · 143 lines

1 <?php

2

3 /**

107 foreach ($type as $key => $value) {

108 if (in_array($key, $this->getValidTableColumns(self::TABLE_NAME_KEYS))) {

109 if (is_bool($value)) {

110 $value = (int) $value;

111

Boolean.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 375 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Filter_Interface

24 */

25 // require_once 'Zend/Filter/Interface.php';

26

27 /**

40 const EMPTY_ARRAY = 32;

41 const NULL = 64;

42 const PHP = 127;

43 const FALSE_STRING = 128;

44 const YES = 256;

53 self::EMPTY_ARRAY => 'array',

54 self::NULL => 'null',

55 self::PHP => 'php',

56 self::FALSE_STRING => 'false',

57 self::YES => 'yes',

QuestionsController.php (https://gitlab.com/daniel.setreus/quiz-app-api) PHP · 106 lines

1 <?php

2

3 namespace App\Http\Controllers;

35 if(!array_key_exists('title', $choice) || !array_key_exists('isCorrect', $choice))

36 throw new \Exception("Atleast one choise is missing value for title or isCorrect", 1);

37 if(!is_bool($choice['isCorrect']))

38 throw new \Exception("Value for isCorrect must be of type boolean");

39

DbOdbc.class.php (https://github.com/palmic/2yaml.git) PHP · 213 lines

1 <?php

2

3

8 * @package DbControl

9 * @version 1.5

10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License

11 * @date 2006-01-11

12 */

113

114 public function transactionStart(/*boolean*/ $autoCommit) {

115 if (!is_bool($autoCommit)) {

116 throw new DbControlException("Ilegal parameter autoCommit. Must be boolean.");

117 }

MultiPartyCall.php (https://github.com/plivo/plivohelper-php.git) PHP · 223 lines

1 <?php

2

3 namespace Plivo\XML;

82 $attributes['customerHoldMusicMethod'] = 'GET';

83 }

84 if(isset($attributes['record']) and is_bool($attributes['record'])){

85 throw new PlivoXMLException('Invalid attribute value ' . $attributes['record']. ' for record');

86 }

112 $attributes['statusCallbackMethod'] = 'POST';

113 }

114 if(isset($attributes['stayAlone']) and is_bool($attributes['stayAlone'])){

115 throw new PlivoXMLException('Invalid attribute value ' . $attributes['stayAlone']. ' for stayAlone');

116 }

118 $attributes['stayAlone'] = false;

119 }

120 if(isset($attributes['coachMode']) and is_bool($attributes['coachMode'])){

121 throw new PlivoXMLException('Invalid attribute value ' . $attributes['coachMode']. ' for coachMode');

122 }

Boolean.php (https://github.com/tjswebdesign/zf2.git) PHP · 373 lines

1 <?php

2 /**

3 * Zend Framework

43 const EMPTY_ARRAY = 32;

44 const NULL = 64;

45 const PHP = 127;

46 const FALSE_STRING = 128;

47 const YES = 256;

56 self::EMPTY_ARRAY => 'array',

57 self::NULL => 'null',

58 self::PHP => 'php',

59 self::FALSE_STRING => 'false',

60 self::YES => 'yes',

67 * @var integer

68 */

69 protected $_type = self::PHP;

70

71 /**

strripos.php (https://github.com/ameximes/akelos.git) PHP · 79 lines

1 <?php

2 // +----------------------------------------------------------------------+

3 // | PHP Version 4 |

4 // +----------------------------------------------------------------------+

5 // | Copyright (c) 1997-2004 The PHP Group |

6 // +----------------------------------------------------------------------+

7 // | This source file is subject to version 3.0 of the PHP license, |

8 // | that is bundled with this package in the file LICENSE, and is |

9 // | available at through the world-wide-web at |

10 // | http://www.php.net/license/3_0.txt. |

11 // | If you did not receive a copy of the PHP license and are unable to |

12 // | obtain it through the world-wide-web, please send a note to |

13 // | license@php.net so we can mail you a copy immediately. |

14 // +----------------------------------------------------------------------+

15 // | Authors: Aidan Lister <aidan@php.net> |

ExcelMatch.php (https://bitbucket.org/moodle/moodle.git) PHP · 198 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Calculation\LookupRef;

4

5 use PhpOffice\PhpSpreadsheet\Calculation\Exception;

6 use PhpOffice\PhpSpreadsheet\Calculation\Functions;

7 use PhpOffice\PhpSpreadsheet\Calculation\Internal\WildcardMatch;

8 use PhpOffice\PhpSpreadsheet\Shared\StringHelper;

9

10 class ExcelMatch

149 {

150 // Lookup_value type has to be number, text, or logical values

151 if ((!is_numeric($lookupValue)) && (!is_string($lookupValue)) && (!is_bool($lookupValue))) {

152 throw new Exception(Functions::NA());

153 }

Logical.php (https://github.com/markn86/moodle.git) PHP · 390 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Calculation;

4

5 class Logical

41 foreach ($args as $arg) {

42 // Is it a boolean value?

43 if (is_bool($arg)) {

44 $returnValue += $arg;

45 } elseif ((is_numeric($arg)) && (!is_string($arg))) {

DB_forge.php (https://github.com/adobi/codeigniter-base.git) PHP · 382 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2 /**

3 * Code Igniter

4 *

5 * An open source application development framework for PHP 5.1.6 or newer

6 *

7 * @package CodeIgniter

57 $sql = $this->_create_database($db_name);

58

59 if (is_bool($sql))

60 {

61 return $sql;

78 $sql = $this->_drop_database($db_name);

79

80 if (is_bool($sql))

81 {

82 return $sql;

Type.php (https://github.com/ochoto/framework-benchs.git) PHP · 198 lines

1 <?php

2 /**

3 * PHPUnit

39 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>

40 * @copyright 2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>

41 * @license http://www.opensource.org/licenses/bsd-license.php BSD License

42 * @version SVN: $Id: Type.php 5454 2009-12-17 15:40:48Z sb $

43 * @link http://www.phpunit.de/

44 * @since File available since Release 3.0.0

45 */

46

47 require_once 'PHPUnit/Util/Filter.php';

48

49 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

JSONValidatorManager.php (https://gitlab.com/EleonoraUA/rpg_server) PHP · 510 lines

1 <?php

2

3

414 if (isset($data[$this->TOKEN]) && is_string($data[$this->TOKEN]) &&

415 strlen($data[$this->TOKEN]) == self::TOKEN_LENGTH &&

416 isset($data[$this->RESULT]) && is_bool($data[$this->RESULT])) {

417 $result = true;

418 }

dumper.php (https://github.com/cgajardo/repositorium.git) PHP · 360 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1723 2008-04-08 00:34:10Z lastcraft $

7 */

8 /**

54 if (! isset($value)) {

55 return "Null";

56 } elseif (is_bool($value)) {

57 return "Boolean";

58 } elseif (is_string($value)) {

Helpers.php (https://gitlab.com/jjpa2018/dashboard) PHP · 86 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Calculation\TextData;

4

5 use PhpOffice\PhpSpreadsheet\Calculation\Calculation;

6 use PhpOffice\PhpSpreadsheet\Calculation\Exception as CalcExp;

7 use PhpOffice\PhpSpreadsheet\Calculation\Functions;

23 public static function extractString($value): string

24 {

25 if (is_bool($value)) {

26 return self::convertBooleanValue($value);

27 }

39 $value = (Functions::getCompatibilityMode() === Functions::COMPATIBILITY_GNUMERIC) ? $gnumericNull : 0;

40 }

41 if (is_bool($value) && ($ooBoolOk || Functions::getCompatibilityMode() !== Functions::COMPATIBILITY_OPENOFFICE)) {

42 $value = (int) $value;

43 }

ValidationTextBox.php (https://github.com/kiranatama/sagalaya.git) PHP · 217 lines

1 <?php

2 /**

3 * Zend Framework

211 protected function _castBoolToString(&$item, $key)

212 {

213 if (is_bool($item)) {

214 $item = ($item) ? 'true' : 'false';

215 }

Tokenize.php (https://gitlab.com/unofficial-mirrors/moodle) PHP · 413 lines

1 <?php

2 /**

3 * Copyright 2012-2017 Horde LLC (http://www.horde.org/)

291

292 case '~':

293 // Ignore binary string identifier. PHP strings are

294 // binary-safe. But keep it if it is not used as string

295 // identifier.

365 }

366

367 if (($level === $this->_level) && !is_bool($text)) {

368 $this->_nextModify['out'][] = $text;

369 }

Memcached.php (https://gitlab.com/fabiorf/chat) PHP · 231 lines

1 <?php

2

3 /*

129 case 'TCP_NODELAY':

130 case 'CACHE_LOOKUPS':

131 if (!is_bool($value)) {

132 throw new RuntimeException('Memcached option ' . $name . ' requires boolean value');

133 }

FlattenException.php (https://gitlab.com/judielsm/Handora) PHP · 292 lines

1 <?php

2

3 /*

15

16 /**

17 * FlattenException wraps a PHP Exception to be able to serialize it.

18 *

19 * Basically, this class removes all objects from the trace.

56

57 /**

58 * FlattenException wraps a PHP Exception to be able to serialize it.

59 *

60 * Basically, this class removes all objects from the trace.

269 } elseif (null === $value) {

270 $result[$key] = array('null', null);

271 } elseif (is_bool($value)) {

272 $result[$key] = array('boolean', $value);

273 } elseif (is_resource($value)) {

AbstractTypeObject.php (https://github.com/mfairchild365/zf2.git) PHP · 183 lines

1 <?php

2 /**

3 * Zend Framework

84 *

85 * @todo It's necessary to check if SplObjectStorage class works faster

86 * (Needs PHP 5.3.x to attach object _with_ additional data to storage)

87 *

88 * @param \Zend\Pdf\ObjectFactory $factory The factory to attach

140

141 /**

142 * Convert PDF element to PHP type.

143 *

144 * @return mixed

145 */

146 public function toPhp()

147 {

148 return $this->value;

IsType.php (https://github.com/robertleeplummerjr/bluebox.git) PHP · 178 lines

40 * @author Sebastian Bergmann <sb@sebastian-bergmann.de>

41 * @copyright 2002-2009 Sebastian Bergmann <sb@sebastian-bergmann.de>

42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License

43 * @version SVN: $Id: IsType.php 4404 2008-12-31 09:27:18Z sb $

46 */

47

48 require_once 'PHPUnit/Framework.php';

49 require_once 'PHPUnit/Util/Filter.php';

50

51 PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

52

53 /**

67 * @since Class available since Release 3.0.0

68 */

69 class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint

70 {

71 const TYPE_ARRAY = 'array';

Type.class.php (https://github.com/silexlabs/Silex-v1.git) PHP · 298 lines

1 <?php

2

3 class Type {

90 }

91 try {

92 php_Boot::$skip_constructor = true;

93 $rfl = $cl->__rfl__();

94 if($rfl === null) {

104 $i = $rfl->newInstanceArgs(array());

105 }

106 php_Boot::$skip_constructor = false;

107 return $i;

108 }catch(Exception $»e) {

110 $e = $_ex_;

111 {

112 php_Boot::$skip_constructor = false;

113 throw new HException("Unable to instantiate " . Std::string($cl));

114 }

ColoredInspector.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 273 lines

1 <?php

2

3 /* vim: set shiftwidth=2 expandtab softtabstop=2: */

111 'is_null' => '_dumpNull',

112 'is_string' => '_dumpString',

113 'is_bool' => '_dumpBoolean',

114 'is_integer' => '_dumpInteger',

115 'is_float' => '_dumpFloat',

NotEmpty.php (https://github.com/nigeldaley/moodle.git) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Validate_Abstract

24 */

25 require_once 'Zend/Validate/Abstract.php';

26

27 /**

40 const EMPTY_ARRAY = 32;

41 const NULL = 64;

42 const PHP = 127;

43 const SPACE = 128;

44 const ALL = 255;

55 self::EMPTY_ARRAY => 'array',

56 self::NULL => 'null',

57 self::PHP => 'php',

58 self::SPACE => 'space',

59 self::ALL => 'all'

dataentry.php (https://github.com/ashwanthkumar/webnaplo.git) PHP · 439 lines

1 <?php

2 /**

3 * DataEntry Controller for performing various functions by Dataentry user

15 **/

16 function dataentry_home() {

17 layout('dataentry/layout.html.php');

18 set("title" ,"Data Entry - Home");

19 set("home_active" ,"true");

20

21 return render("dataentry/dataentry.home.html.php");

22 }

23

29 **/

30 function dataentry_add_student_render() {

31 layout('dataentry/layout.html.php');

32 set("title" ,"Add student");

33 set("add_active" ,"true");

NotEmpty.php (https://github.com/ftaiolivista/Zend-Framework-Namespaced-.git) PHP · 284 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: NotEmpty.php 22691 2010-07-26 19:29:14Z thomas $

20 */

21

28 * @see Zend_Validate_Abstract

29 */

30 require_once 'Zend/Validate/Abstract.php';

31

32 /**

63 self::EMPTY_ARRAY => 'array',

64 self::NULL => 'null',

65 self::PHP => 'php',

66 self::SPACE => 'space',

67 self::OBJECT => 'object',

Element.php (https://bitbucket.org/sauron07/friend_social.git) PHP · 176 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Element.php 24594 2012-01-05 21:27:01Z matthew $

20 */

21

72 *

73 * @todo It's nevessry to check if SplObjectStorage class works faster

74 * (Needs PHP 5.3.x to attach object _with_ additional data to storage)

75 *

76 * @param Zend_Pdf_ElementFactory $factory The factory to attach

128

129 /**

130 * Convert PDF element to PHP type.

131 *

132 * @return mixed

table_schema.py (https://github.com/neurodebian/pandas.git) Python · 182 lines

7 from pandas.core.dtypes.common import (

8 is_integer_dtype, is_timedelta64_dtype, is_numeric_dtype,

9 is_bool_dtype, is_datetime64_dtype, is_datetime64tz_dtype,

10 is_categorical_dtype, is_period_dtype, is_string_dtype

11 )

44 if is_integer_dtype(x):

45 return 'integer'

46 elif is_bool_dtype(x):

47 return 'boolean'

48 elif is_numeric_dtype(x):

publishable.php (https://github.com/ciudadanointeligente/votainteligente.com.ar.git) PHP · 265 lines

1 <?php

2 /**

3 * Copyright 2007-2010, Cake Development Corporation (http://cakedc.com)

7 *

8 * @copyright Copyright 2007-2010, Cake Development Corporation (http://cakedc.com)

9 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)

10 */

11

130 */

131 function enablePublishable(&$Model, $methods, $enable = true) {

132 if (is_bool($methods)) {

133 $enable = $methods;

134 $methods = array('find');

AbstractSeries.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 591 lines

1 <?php

2

3 /*

4 * This file is part of the PHP Highcharts library.

5 *

6 * (c) University of Cambridge

264 public function setEnableMouseTracking($enableMouseTracking = true)

265 {

266 if (false === is_bool($enableMouseTracking)) {

267 throw new InvalidArgumentException();

268 }

InteractsWithInput.php (https://bitbucket.org/rogersantosferreira/bigfeel_web.git) PHP · 375 lines

1 <?php

2

3 namespace Illuminate\Http\Concerns;

140 $value = $this->input($key);

141

142 return ! is_bool($value) && ! is_array($value) && trim((string) $value) === '';

143 }

144

Compiler.php (https://github.com/bshaffer/ChartDown.git) PHP · 220 lines

1 <?php

2

3 /*

12

13 /**

14 * Compiles a node to PHP code.

15 *

16 * @package chartdown

45

46 /**

47 * Gets the current PHP code after compilation.

48 *

49 * @return string The PHP code

137

138 /**

139 * Returns a PHP representation of a given value.

140 *

141 * @param mixed $value The value to convert

Boolean.php (https://bitbucket.org/gencer/zf2.git) PHP · 297 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

22 const TYPE_EMPTY_ARRAY = 32;

23 const TYPE_NULL = 64;

24 const TYPE_PHP = 127;

25 const TYPE_FALSE_STRING = 128;

26 const TYPE_LOCALIZED = 256;

38 self::TYPE_EMPTY_ARRAY => 'array',

39 self::TYPE_NULL => 'null',

40 self::TYPE_PHP => 'php',

41 self::TYPE_FALSE_STRING => 'false',

42 self::TYPE_LOCALIZED => 'localized',

48 */

49 protected $options = array(

50 'type' => self::TYPE_PHP,

51 'casting' => true,

52 'translations' => array(),

Checkbox.php (https://github.com/ngocanh/pimcore.git) PHP · 104 lines

1 <?php

2 /**

3 * Pimcore

93 public function getFromWebserviceImport($wsElement){

94 $data = $wsElement->value;

95 if($data->bool === null or is_bool($data)){

96 $this->value = (bool) $data->value;

97 } else {

Ini.php (https://github.com/basdog22/Qool.git) PHP · 193 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Ini.php 24594 2012-01-05 21:27:01Z matthew $

20 */

21

23 * @see Zend_Config_Writer

24 */

25 require_once 'Zend/Config/Writer/FileAbstract.php';

26

27 /**

152 if (is_integer($value) || is_float($value)) {

153 return $value;

154 } elseif (is_bool($value)) {

155 return ($value ? 'true' : 'false');

156 } elseif (strpos($value, '"') === false) {

dumper.php (https://github.com/h-kanjisan/swiftmailer.git) PHP · 359 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: dumper.php 1782 2008-04-25 17:09:06Z pp11 $

7 */

8 /**

54 if (! isset($value)) {

55 return "Null";

56 } elseif (is_bool($value)) {

57 return "Boolean";

58 } elseif (is_string($value)) {

DB_forge.php (https://github.com/busaway/FoOlSlide.git) PHP · 382 lines

1 <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

2 /**

3 * Code Igniter

4 *

5 * An open source application development framework for PHP 5.1.6 or newer

6 *

7 * @package CodeIgniter

57 $sql = $this->_create_database($db_name);

58

59 if (is_bool($sql))

60 {

61 return $sql;

78 $sql = $this->_drop_database($db_name);

79

80 if (is_bool($sql))

81 {

82 return $sql;

FlattenException.php (https://gitlab.com/milton2913/myBlog) PHP · 256 lines

1 <?php

2

3 /*

15

16 /**

17 * FlattenException wraps a PHP Exception to be able to serialize it.

18 *

19 * Basically, this class removes all objects from the trace.

223 return array('array', '*SKIPPED over 10000 entries*');

224 }

225 if ($value instanceof \__PHP_Incomplete_Class) {

226 // is_object() returns false on PHP<=7.1

236 } elseif (null === $value) {

237 $result[$key] = array('null', null);

238 } elseif (is_bool($value)) {

239 $result[$key] = array('boolean', $value);

240 } elseif (is_resource($value)) {

Element.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 184 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Element.php 24593 2012-01-05 20:35:02Z matthew $

20 */

21

73 *

74 * @todo It's nevessry to check if SplObjectStorage class works faster

75 * (Needs PHP 5.3.x to attach object _with_ additional data to storage)

76 *

77 * @param Zend_Pdf_ElementFactory $factory The factory to attach

130

131 /**

132 * Convert PDF element to PHP type.

133 *

134 * @return mixed

Ini.php (https://github.com/MontmereLimited/zf2.git) PHP · 198 lines

1 <?php

2 /**

3 * Zend Framework

161 if (is_integer($value) || is_float($value)) {

162 return $value;

163 } elseif (is_bool($value)) {

164 return ($value ? 'true' : 'false');

165 } elseif (false === strpos($value, '"')) {

question_dialog_type.php (https://github.com/F5/zetacomponents.git) PHP · 243 lines

1 <?php

2 /**

3 * File containing the ezcConsoleQuestionDialogTypeValidator class.

107 return is_float( $result );

108 case self::TYPE_BOOL:

109 return is_bool( $result );

110 case self::TYPE_STRING:

111 default:

ScriptingCore.cpp (https://bitbucket.org/Tsiannian/cocos2d-x.git) C++ · 882 lines

222 LOGD("val : (JSVAL_IS_NULL(val)");

223 // return 1;

224 } else if ((JSVAL_IS_BOOLEAN(val)) &&

225 (JS_FALSE == (JSVAL_TO_BOOLEAN(val)))) {

226 LOGD("val : (return value is JS_FALSE");