100+ results for 'php is_null'

Not the results you expected?

PostgresGrammar.php (https://gitlab.com/phanthanh9787/crud-user) PHP · 568 lines

1 <?php

2

3 namespace Illuminate\Database\Schema\Grammars;

548 protected function modifyDefault(Blueprint $blueprint, Fluent $column)

549 {

550 if (! is_null($column->default)) {

551 return ' default '.$this->getDefaultValue($column->default);

552 }

Entry.php (https://bitbucket.org/cesarmedrano/cesarmedrano.git) PHP · 630 lines

17 * @category Microsoft

18 * @package WindowsAzure\Common\Internal\Atom

19 * @author Azure PHP SDK <azurephpsdk@microsoft.com>

20 * @copyright 2012 Microsoft Corporation

21 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

33 * @category Microsoft

34 * @package WindowsAzure\Common\Internal\Atom

35 * @author Azure PHP SDK <azurephpsdk@microsoft.com>

36 * @copyright 2012 Microsoft Corporation

37 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

522 public function writeInnerXml($xmlWriter)

523 {

524 if (!is_null($this->attributes)) {

525 if (is_array($this->attributes)) {

526 foreach (

SortedSet.php (https://github.com/netweaver/Rediska.git) PHP · 335 lines

1 <?php

2

3 // Require Rediska

4 require_once dirname(__FILE__) . '/../../Rediska.php';

5

6 /**

12 * @version @package_version@

13 * @link http://rediska.geometria-lab.net

14 * @license http://www.opensource.org/licenses/bsd-license.php

15 */

16 class Rediska_Key_SortedSet extends Rediska_Key_Abstract implements IteratorAggregate, ArrayAccess, Countable

27 $result = $this->_getRediskaOn()->addToSortedSet($this->getName(), $value, $score);

28

29 if (!is_null($this->getExpire()) && $result) {

30 $this->expire($this->getExpire(), $this->isExpireTimestamp());

31 }

Store.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 508 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Adminhtml

23 * @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

446 public function reload($type = null)

447 {

448 if (is_null($type)) {

449 $this->_loadWebsiteCollection();

450 $this->_loadGroupCollection();

Store.php (https://github.com/ticean/magento-mirror.git) PHP · 508 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Adminhtml

23 * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

446 public function reload($type = null)

447 {

448 if (is_null($type)) {

449 $this->_loadWebsiteCollection();

450 $this->_loadGroupCollection();

AbstractPaginator.php (https://gitlab.com/zan_zan/laravel_sample) PHP · 487 lines

1 <?php

2

3 namespace Illuminate\Pagination;

153 public function fragment($fragment = null)

154 {

155 if (is_null($fragment)) {

156 return $this->fragment;

157 }

Store.php (https://github.com/arush/desparation-deprecated.git) PHP · 508 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Adminhtml

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

446 public function reload($type = null)

447 {

448 if (is_null($type)) {

449 $this->_loadWebsiteCollection();

450 $this->_loadGroupCollection();

PluginInfo.php (https://gitlab.com/fabiorf/chat) PHP · 383 lines

1 <?php

2 /*

3 * This file is a part of Mibew Messenger.

73 public function getState()

74 {

75 if (is_null($this->pluginState)) {

76 $state = State::loadByName($this->pluginName);

77 if (!$state) {

97 public function clearState()

98 {

99 if (!is_null($this->pluginState)) {

100 if ($this->pluginState->id) {

101 // Remove state only if it's in the database.

113 public function getClass()

114 {

115 if (is_null($this->pluginClass)) {

116 $this->pluginClass = Utils::getPluginClassName($this->pluginName);

117 }

User_agent.php (https://github.com/usagi-project/mynets1.git) PHP · 500 lines

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

2 /**

3 * CodeIgniter

4 *

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

6 *

7 * @package CodeIgniter

64 }

65

66 if ( ! is_null($this->agent))

67 {

68 if ($this->_load_agent_file())

InputDocument.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 316 lines

1 <?php

2 /**

3 * InputDocument.php

26 */

27

28 require_once 'classes/model/om/BaseInputDocument.php';

29 require_once 'classes/model/Content.php';

66 try {

67 $oInputDocument = InputDocumentPeer::retrieveByPK( $sInpDocUid );

68 if (! is_null( $oInputDocument )) {

69 $aFields = $oInputDocument->toArray( BasePeer::TYPE_FIELDNAME );

70 $aFields['INP_DOC_TITLE'] = $oInputDocument->getInpDocTitle();

84 try {

85 $oInputDocument = InputDocumentPeer::retrieveByPK( $sInpDocUid );

86 if (is_null( $oInputDocument )) {

87 return false;

88 }

class-cp-user-relationships.php (https://gitlab.com/clusterpress/clusterpress) PHP · 543 lines

1 <?php

2 /**

3 * ClusterPress User Relationships.

315 $s = reset( $in );

316

317 if ( is_null( $s ) || 'null' === $s ) {

318 return "{$field_name} IS NULL";

319 } else {

330 $d = reset( $in );

331

332 if ( is_null( $d ) || 'null' === $d ) {

333 return "{$field_name} IS NULL";

334 } elseif ( 'exclude' === $field_name ) {

submissionsoap.class.php (https://github.com/danmarsden/moodle-plagiarism_turnitin.git) PHP · 236 lines

1 <?php

2 /* @ignore

3 * To change this template, choose Tools | Templates

5 */

6

7 require_once( 'soap.class.php' );

8 require_once( 'tiisubmission.class.php' );

9 require_once( 'response.class.php' );

10 require_once( 'sdkexception.class.php' );

216 if ( is_callable( array( $submission, $method ) ) ) $value = $submission->$method();

217 $value = ( gettype( $value ) == 'boolean' ) ? (integer)$value : $value;

218 if (!is_null($value)) {

219 $request['resultRecord']['result']['extension']['extensionField'][$i]['fieldName'] = $name;

220 $request['resultRecord']['result']['extension']['extensionField'][$i]['fieldType'] = $type;

ReceivePayment.php (https://bitbucket.org/211enterprises/laracing.git) PHP · 549 lines

1 <?php

2

3 /**

14 * Base object class

15 */

16 QuickBooks_Loader::load('/QuickBooks/QBXML/Object.php');

17

18 /**

19 * Dependency class (applied payment)

20 */

21 QuickBooks_Loader::load('/QuickBooks/QBXML/Object/ReceivePayment/AppliedToTxn.php');

22

23 /**

485 public function asXML($root = null, $parent = null, $object = null)

486 {

487 if (is_null($object))

488 {

489 $object = $this->_object;

sfOAuth.class.php (https://github.com/sglessard/OAuthBase.git) PHP · 1353 lines

1 <?php

2 /**

3 * Abstract class for both version of OAuth 1 and 2

365 if($format == 'oauth')

366 {

367 if(!is_null($this->token))

368 {

369 return $this->token->toOAuthToken();

579 public function getController()

580 {

581 if(is_null($this->controller) && !is_null($this->getContext()))

582 {

583 $this->controller = $this->getContext()->getController();

612 public function getLogger()

613 {

614 if(is_null($this->logger) && !is_null($this->getContext()))

615 {

616 $this->logger = $this->getContext()->getLogger();

EmployeeService.php (https://github.com/orangehrm/OrangeHRM.git) PHP · 326 lines

1 <?php

2 /**

3 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures

66 public function getEmployeeDao(): EmployeeDao

67 {

68 if (is_null($this->employeeDao)) {

69 $this->employeeDao = new EmployeeDao();

70 }

238 int $maxDepth = null

239 ): array {

240 if (is_null($includeChain)) {

241 $includeChain = $this->getConfigService()->isSupervisorChainSupported();

242 }

293 int $maxDepth = null

294 ): array {

295 if (is_null($includeChain)) {

296 $includeChain = $this->getConfigService()->isSupervisorChainSupported();

297 }

Dispatcher.php (https://gitlab.com/kimting254/wbms) PHP · 486 lines

1 <?php namespace Illuminate\Events;

2

3 use Exception;

221 // we will just return this response, and not call the rest of the event

222 // listeners. Otherwise we will add the response on the response list.

223 if ( ! is_null($response) && $halt)

224 {

225 array_pop($this->firing);

SequenceTest.php (https://bitbucket.org/mkjpryor/lazy-sequence.git) PHP · 369 lines

1 <?php

2

3 namespace Lazy\Test;

14

15

16 class SequenceTest extends \PHPUnit_Framework_TestCase {

17

18 /**

31

32 // If $params is not given, that is all we need to do

33 if( is_null($args) ) return $mock;

34

35 // Otherwise $params is an array

Data.php (https://github.com/arush/desparation-deprecated.git) PHP · 309 lines

1 <?php

2 class Evogue_Customer_Helper_Data extends Mage_Core_Helper_Abstract {

3

181 );

182

183 if (is_null($inputType)) {

184 return $inputTypes;

185 } else if (isset($inputTypes[$inputType])) {

ProblemsetIdentityRequest.php (https://github.com/omegaup/omegaup.git) PHP · 374 lines

1 <?php

2 /** ************************************************************************ *

3 * !ATENCION! *

72 ),

73 (

74 !is_null($Problemset_Identity_Request->accepted) ?

75 intval($Problemset_Identity_Request->accepted) :

76 null

113 ),

114 (

115 is_null($Problemset_Identity_Request->accepted) ?

116 null :

117 intval($Problemset_Identity_Request->accepted)

119 $Problemset_Identity_Request->extra_note,

120 (

121 is_null($Problemset_Identity_Request->identity_id) ?

122 null :

123 intval($Problemset_Identity_Request->identity_id)

User_agent.php (https://gitlab.com/rafaellimati/limajacket) PHP · 550 lines

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

2 /**

3 * CodeIgniter

4 *

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

6 *

7 * @package CodeIgniter

65 }

66

67 if ( ! is_null($this->agent))

68 {

69 if ($this->_load_agent_file())

86 private function _load_agent_file()

87 {

88 if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php'))

89 {

90 include(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php');

lib.php (https://gitlab.com/MotoSport/morgue) PHP · 307 lines

1 <?php

2

3 class Jira {

25 'deleted' => 0,

26 );

27 if (is_null($conn)) {

28 return array("status" => self::ERROR,

29 "error" => "Couldn't get connection object.",

47 $table_name = 'jira';

48 $assoc_column = 'ticket';

49 if (is_null($conn)) {

50 return array("status" => self::ERROR,

51 "error" => "Couldn't get connection object.");

66 static function delete_jira_tickets_for_event($event_id, $conn = null) {

67 $conn = $conn ?: Persistence::get_database_object();

68 if (is_null($conn)) {

69 return array("status" => self::ERROR,

70 "error" => "Couldn't get connection object.");

Settings.php (https://gitlab.com/team_fsn/fsn-php) PHP · 387 lines

22 * @package PHPExcel_Settings

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

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

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

35 }

36

118 * @param string $zipClass The Zip handler class that PHPExcel should use for Zip file management

119 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive

120 * @return boolean Success or failure

121 */

137 * @return string Name of the Zip handler Class that PHPExcel is configured to use

138 * for Zip file management

139 * e.g. PHPExcel_Settings::PCLZip or PHPExcel_Settings::ZipArchive

140 */

141 public static function getZipClass()

reflection_php5.php (https://bitbucket.org/volatileeight/prado.git) PHP · 274 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: reflection_php5.php 1398 2006-09-08 19:31:03Z xue $

7 */

8

26 /**

27 * Checks that a class has been declared. Versions

28 * before PHP5.0.2 need a check that it's not really

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

MethodProphecySpec.php (https://gitlab.com/rocs/Streaming-Safe-for-Kids) PHP · 342 lines

1 <?php

2

3 namespace spec\Prophecy\Prophecy;

4

5 use PhpSpec\ObjectBehavior;

6 use Prophecy\Argument\ArgumentsWildcard;

7 use Prophecy\Call\Call;

56 }

57

58 function its_constructor_does_not_touch_third_argument_if_it_is_null($objectProphecy)

59 {

60 $this->beConstructedWith($objectProphecy, 'getName', null);

Validator.php (https://github.com/jarednipper/HSU-common-code.git) PHP · 206 lines

1 <?php

2

3 /**

38 $this->interchange = $interchange;

39 $this->aliases = array();

40 // PHP is a bit lax with integer <=> string conversions in

41 // arrays, so we don't use the identical !== comparison

42 foreach ($interchange->directives as $i => $directive) {

90 // END - handled by InterchangeBuilder

91

92 if (!is_null($d->allowed) || !empty($d->valueAliases)) {

93 // allowed and valueAliases require that we be dealing with

94 // strings, so check for that early.

111 */

112 public function validateDirectiveAllowed($d) {

113 if (is_null($d->allowed)) return;

114 $this->with($d, 'allowed')

115 ->assertNotEmpty()

routes.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 1388 lines

1 <?php

2

3 /*

99 $empleado = User::where('dni', '=', $dni)->first();

100

101 if (is_null($dni)){

102 $empleados = DB::table('users')

103 ->where('activated', '=', 1)

107 }

108

109 if (is_null($empleado)){

110 $empleados = DB::table('users')

111 ->where('activated', '=', 1)

131 $empleadospage = 20;

132

133 if (is_null($dni)){

134 $empleados = DB::table('users')

135 ->where('activated', '=', 1)

controller.php (https://github.com/md-tech/openemr.git) PHP · 301 lines

1 <?php

2 // Copyright (C) 2010-2011 Aron Racho <aron@mi-squred.com>

3 //

12 $ruleId = _get('id');

13 $rule = $this->getRuleManager()->getRule( $ruleId );

14 if (is_null($rule)) {

15 $rule = $this->getRuleManager()->newRule();

16 }

17

18 $this->viewBean->rule = $rule;

19 $this->set_view( "summary.php" );

20 }

21

24 $types = _post('fld_ruleTypes');

25 $title = _post('fld_title');

26 if ( is_null($rule_id)) {

27 // its a new rule submit

28 $ruleId = $this->getRuleManager()->updateSummary( $ruleId, $types, $title );

Logical.php (https://github.com/allinside/Yii-CMS.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

264 $returnIfTrue = (is_null($returnIfTrue)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfTrue);

265 $returnIfFalse = (is_null($returnIfFalse)) ? False : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfFalse);

266

267 return ($condition ? $returnIfTrue : $returnIfFalse);

284 $testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);

285 $errorpart = (is_null($errorpart)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($errorpart);

286

287 return self::STATEMENT_IF(PHPExcel_Calculation_Functions::IS_ERROR($testValue), $errorpart, $testValue);

GetCharactersCharacterIdPlanetsPlanetIdOkRoutes.php (https://gitlab.com/mglinski/php-esi-lib) PHP · 398 lines

1 <?php

2 /**

3 * GetCharactersCharacterIdPlanetsPlanetIdOkRoutes

4 *

5 * PHP version 5

6 *

7 * @category Class

365 public function offsetSet($offset, $value)

366 {

367 if (is_null($offset)) {

368 $this->container[] = $value;

369 } else {

mysqli_stmt_affected_rows.php (https://gitlab.com/iranjith4/hhvm) PHP · 231 lines

1 <?php

2 require_once("connect.inc");

3

219 mysqli_stmt_close($stmt);

220

221 if (!is_null($tmp = mysqli_stmt_affected_rows($stmt)))

222 printf("[047] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);

223

226 print "done!";

227 ?>

228 <?php error_reporting(0); ?>

229 <?php

compras_recibo.php (https://gitlab.com/cosouth.battle/sartinofi) PHP · 370 lines

1 <?php

2

3 /**

6 */

7

8 require_model('asiento.php');

9 require_model('cuenta_banco.php');

10 require_model('cuenta_banco_proveedor.php');

11 require_model('ejercicio.php');

12 require_model('factura_proveedor.php');

13 require_model('forma_pago.php');

14 require_model('pago_recibo_proveedor.php');

15 require_model('partida.php');

Wincache.php (https://github.com/allinside/Yii-CMS.git) PHP · 230 lines

1 <?php

2 /**

3 * PHPExcel

4 *

5 * Copyright (c) 2006 - 2011 PHPExcel

22 * @package PHPExcel_CachedObjectStorage

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

32 * @category PHPExcel

33 * @package PHPExcel_CachedObjectStorage

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

35 */

36 class PHPExcel_CachedObjectStorage_Wincache extends PHPExcel_CachedObjectStorage_CacheBase implements PHPExcel_CachedObjectStorage_ICache {

37

38 private $_cachePrefix = null;

Indexer.php (https://bitbucket.org/acidel/buykoala.git) PHP · 309 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Catalog

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

81 public function rebuild($store = null)

82 {

83 if (is_null($store)) {

84 $this->_getResource()->prepareFlatTables();

85 } else {

SqlServerGrammar.php (https://gitlab.com/vincetang/mtweb) PHP · 551 lines

1 <?php

2

3 namespace Illuminate\Database\Schema\Grammars;

531 protected function modifyDefault(Blueprint $blueprint, Fluent $column)

532 {

533 if (!is_null($column->default)) {

534 return ' default '.$this->getDefaultValue($column->default);

535 }

sfImageArcGD.class.php (https://github.com/AMSGWeblinks/sfImageTransformPlugin.git) PHP · 424 lines

1 <?php

2 /*

3 * This file is part of the sfImageTransform package.

400 imagesetthickness($resource, $this->thickness);

401

402 if (!is_null($this->fill))

403 {

404 if (!is_object($this->fill))

Logical.php (https://gitlab.com/team_fsn/fsn-php) 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

262 $returnIfTrue = (is_null($returnIfTrue)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfTrue);

263 $returnIfFalse = (is_null($returnIfFalse)) ? FALSE : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfFalse);

264

265 return ($condition) ? $returnIfTrue : $returnIfFalse;

282 $testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);

283 $errorpart = (is_null($errorpart)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($errorpart);

284

285 return self::STATEMENT_IF(PHPExcel_Calculation_Functions::IS_ERROR($testValue), $errorpart, $testValue);

Translator.php (https://gitlab.com/rocs/Streaming-Safe-for-Kids) PHP · 416 lines

1 <?php

2

3 namespace Illuminate\Translation;

114 );

115

116 if (! is_null($line)) {

117 break;

118 }

310 $segments = parent::parseKey($key);

311

312 if (is_null($segments[0])) {

313 $segments[0] = '*';

314 }

Route.php (https://bitbucket.org/mikebosire/framework.git) PHP · 451 lines

1 <?php namespace Illuminate\Routing;

2

3 use Illuminate\Http\Response;

100 $response = $this->callFilter($filter, $request);

101

102 if ( ! is_null($response)) return $response;

103 }

104 }

153 list($name, $params) = $this->parseFilter($name, $params);

154

155 if ( ! is_null($callable = $this->router->getFilter($name)))

156 {

157 return call_user_func_array($callable, $params);

283 protected function isMissingDefault($key, $value)

284 {

285 return $this->isOptional($key) and is_null($value);

286 }

287

Store.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 510 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Adminhtml

23 * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

448 public function reload($type = null)

449 {

450 if (is_null($type)) {

451 $this->_loadWebsiteCollection();

452 $this->_loadGroupCollection();

Grammar.php (https://github.com/sergiosgc/Structures_Grammar.git) PHP · 407 lines

1 <?php

2 /* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */

3 namespace sergiosgc;

36 public function getStartSymbol()

37 {

38 if (is_null($this->startSymbol) && $this->isContextFree() && count($this->rules) > 0) {

39 $this->startSymbol = $this->rules[0]->getLeftSymbol(0);

40 }

79 public function isNonTerminal($value)

80 {

81 if (is_null($this->nonTerminals)) $this->computeTerminals();

82 if (!$value instanceof Structures_Grammar_Symbol) $value = Structures_Grammar_Symbol::create($value);

83 foreach ($this->nonTerminals as $cursor) if ($value->__equals($cursor)) return true;

129 public function isTerminal($value)

130 {

131 if (is_null($this->terminals)) $this->computeTerminals();

132 if (!$value instanceof Structures_Grammar_Symbol) $value = Structures_Grammar_Symbol::create($value);

133 foreach ($this->terminals as $cursor) if ($value == $cursor) return true;

Repository.php (https://gitlab.com/rmoshiur81/Larave-Grading) PHP · 521 lines

1 <?php

2

3 namespace Illuminate\Cache;

111 public function has($key)

112 {

113 return ! is_null($this->get($key));

114 }

115

129 $value = $this->store->get($this->itemKey($key));

130

131 if (is_null($value)) {

132 $this->fireCacheEvent('missed', [$key]);

133

159

160 foreach ($values as $key => &$value) {

161 if (is_null($value)) {

162 $this->fireCacheEvent('missed', [$key]);

163

Abstract.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 263 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

90 public function setParam($key, $value=null)

91 {

92 if (is_array($key) && is_null($value)) {

93 $this->_params = $key;

94 } else {

144 public function addAction(Mage_Dataflow_Model_Convert_Action_Interface $action=null)

145 {

146 if (is_null($action)) {

147 $action = new $this->_actionDefaultClass();

148 }

174 public function getContainer($name=null)

175 {

176 if (!is_null($name)) {

177 return $this->getProfile()->getContainer($name);

178 }

Eav.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 214 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

123 );

124

125 if (is_null($inputType)) {

126 return $inputTypes;

127 } else if (isset($inputTypes[$inputType])) {

183 protected function _getAttributeOptionValues($storeId = null, $useDefaultValue = true)

184 {

185 if (is_null($storeId)) {

186 $storeId = Mage::app()->getStore()->getId();

187 } elseif ($storeId instanceof Mage_Core_Model_Store) {

Assignment.php (https://github.com/livinglab/openlab.git) PHP · 248 lines

1 <?php

2

3 /**

104 ));

105

106 $is_null = 1;

107

108 if ($params['assign_grade_type'] === 'checkmark') {

206 'assign_order' => $assignOrder,

207 'assign_points_earned' => 0,

208 'is_null' => $is_null,

209 ), array('%d', '%d', '%d', '%d', '%f', '%d'));

210 }

236 $cell['gbid'] = intval($cell['gbid']);

237 $cell['id'] = intval($cell['id']);

238 $cell['is_null'] = boolval(intval($cell['is_null']));

239 $cell['comments'] = !empty($cell['comments']) ? sanitize_text_field($cell['comments']) : false;

240 }

GetTransacEmailsList.php (https://gitlab.com/i-have-a-green/digitemis-v3) PHP · 301 lines

1 <?php

2 /**

3 * GetTransacEmailsList

4 *

5 * PHP version 5

6 *

7 * @category Class

262 public function offsetSet($offset, $value)

263 {

264 if (is_null($offset)) {

265 $this->container[] = $value;

266 } else {

Logical.php (https://gitlab.com/devtoannh/cafe) 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

262 $returnIfTrue = (is_null($returnIfTrue)) ? 0 : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfTrue);

263 $returnIfFalse = (is_null($returnIfFalse)) ? FALSE : PHPExcel_Calculation_Functions::flattenSingleValue($returnIfFalse);

264

265 return ($condition) ? $returnIfTrue : $returnIfFalse;

282 $testValue = (is_null($testValue)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($testValue);

283 $errorpart = (is_null($errorpart)) ? '' : PHPExcel_Calculation_Functions::flattenSingleValue($errorpart);

284

285 return self::STATEMENT_IF(PHPExcel_Calculation_Functions::IS_ERROR($testValue), $errorpart, $testValue);

ProblemsetIdentities.php (https://github.com/omegaup/omegaup.git) PHP · 416 lines

1 <?php

2 /** ************************************************************************ *

3 * !ATENCION! *

80 intval($Problemset_Identities->time),

81 (

82 !is_null($Problemset_Identities->share_user_information) ?

83 intval($Problemset_Identities->share_user_information) :

84 null

85 ),

86 (

87 !is_null($Problemset_Identities->privacystatement_consent_id) ?

88 intval($Problemset_Identities->privacystatement_consent_id) :

89 null

131 intval($Problemset_Identities->time),

132 (

133 is_null($Problemset_Identities->share_user_information) ?

134 null :

135 intval($Problemset_Identities->share_user_information)

CourseIdentityRequest.php (https://github.com/omegaup/omegaup.git) PHP · 418 lines

1 <?php

2 /** ************************************************************************ *

3 * !ATENCION! *

76 ),

77 (

78 !is_null($Course_Identity_Request->accepted) ?

79 intval($Course_Identity_Request->accepted) :

80 null

82 $Course_Identity_Request->extra_note,

83 (

84 !is_null($Course_Identity_Request->accept_teacher) ?

85 intval($Course_Identity_Request->accept_teacher) :

86 null

87 ),

88 (

89 !is_null($Course_Identity_Request->share_user_information) ?

90 intval($Course_Identity_Request->share_user_information) :

91 null

DeletedTest.php (https://github.com/cgmartin/zf2.git) PHP · 259 lines

1 <?php

2 /**

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

17 * @group Zend_Feed_Writer

18 */

19 class DeletedTest extends \PHPUnit_Framework_TestCase

20 {

21

40 {

41 $entry = new Writer\Deleted;

42 $this->assertTrue(is_null($entry->getReference()));

43 }

44

102 {

103 $entry = new Writer\Deleted;

104 $this->assertTrue(is_null($entry->getWhen()));

105 }

106

persistent_object_property.php (https://github.com/F5/zetacomponents.git) PHP · 277 lines

40 * the PHP object.

41 * @property int $propertyType

42 * The type of the PHP property. See class constants PHP_TYPE_*.

43 * @property ezcPersistentPropertyConverter|null $converter

44 * A converter object that will automatically perform converters on

56 {

57

58 const PHP_TYPE_STRING = 1;

59 const PHP_TYPE_INT = 2;

62 const PHP_TYPE_OBJECT = 5;

63 const PHP_TYPE_BOOL = 6;

64

65 /**

82 * Creates a new property definition object from the given values. The

83 * $columnName refers to the name of the database column that, the

84 * $propertyName to the name of the PHP object property it refers to.

85 * The $type defines the type of the resulting PHP property, the database

Message.php (https://github.com/MassD67/spotweb.git) PHP · 323 lines

1 <?php

2 /**

3 * Copyright [2011] [Mario Mueller]

46 * @var string

47 */

48 private $sApplication = 'ProwlPHP';

49

50 /**

311 */

312 public function validate() {

313 if (is_null($this->sEvent)) {

314 throw new \InvalidArgumentException('Validation Error: Event is missing');

315 }

Application.php (https://github.com/360i/sonno.git) PHP · 298 lines

1 <?php

2

3 /**

25

26 /**

27 * The entrypoint to Sonno for a PHP application, the Application class

28 * processes an incoming HTTP request, dispatches the request to a resource

29 * class method designated by Sonno\Configuration\Configuration and outputs

237 * @param int $statusCode The HTTP status code to register a

238 * filter for.

239 * @param Callable $filterCallback The PHP callback to execute when the

240 * HTTP error registered against occurs.

241 *

247 if (!is_callable($filterCallback)) {

248 throw new \InvalidArgumentException(

249 'The Filter Callback must be callable as a PHP function.'

250 );

251 }

Abstract.php (https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git) PHP · 380 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_Core

23 * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

113 {

114 $this->_resourceName = $resourceName;

115 if (is_null($resourceCollectionName)) {

116 $resourceCollectionName = $resourceName.'_collection';

117 }

class.wsdlcache.php (https://gitlab.com/endomorphosis/reservationtelco) PHP · 209 lines

1 <?php

2 /*

3 The NuSOAP project home is:

13 * @author Scott Nichol <snichol@users.sourceforge.net>

14 * @author Ingo Fischer <ingo@apollon.de>

15 * @version $Id: class.wsdlcache.php,v 1.7 2007/04/17 16:34:03 snichol Exp $

16 * @access public

17 */

107 }

108 $this->releaseMutex($filename);

109 return (!is_null($s)) ? unserialize($s) : null;

110 } else {

111 $this->debug("Unable to obtain mutex for $filename in get");

install-helper.php (https://bitbucket.org/lordmuffin/origin.git) PHP · 198 lines

1 <?php

2 /**

3 * Plugins may load this file to gain access to special helper functions for

37

38 /** Load WordPress Bootstrap */

39 require_once(dirname(dirname(__FILE__)).'/wp-load.php');

40

41 if ( ! function_exists('maybe_create_table') ) :

159 * @param string $col_name Column name

160 * @param string $col_type Column type

161 * @param bool $is_null Optional. Check is null.

162 * @param mixed $key Optional. Key info.

163 * @param mixed $default Optional. Default value.

177 ++$diffs;

178 }

179 if (($is_null != null) && ($row->Null != $is_null)) {

180 ++$diffs;

181 }

AssertionsTrait.php (https://gitlab.com/judielsm/Handora) PHP · 203 lines

4

5 use Illuminate\View\View;

6 use PHPUnit_Framework_Assert as PHPUnit;

7

8 trait AssertionsTrait

83 {

84 if (! isset($this->response->original) || ! $this->response->original instanceof View) {

85 return PHPUnit::assertTrue(false, 'The response was not a view.');

86 }

87

98 public function assertRedirectedTo($uri, $with = [])

99 {

100 PHPUnit::assertInstanceOf('Illuminate\Http\RedirectResponse', $this->response);

101

102 PHPUnit::assertEquals($this->app['url']->to($uri), $this->response->headers->get('Location'));

porteren.php (https://github.com/pjwiseman/joomla-cms.git) PHP · 449 lines

1 <?php

2 /**

3 * @package Joomla.Platform

5 *

6 * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.

7 * @copyright Copyright (C) 2005 Richard Heyes (http://www.phpguru.org/). All rights reserved.

8 * @license GNU General Public License version 2 or later; see LICENSE

9 */

368 $substr = substr($str, 0, $len);

369

370 if (is_null($m) or self::_m($substr) > $m)

371 {

372 $str = $substr . $repl;

class-wc-rest-stripe-account-keys-controller.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 232 lines

1 <?php

2 /**

3 * Class WC_REST_Stripe_Account_Keys_Controller

204 && ! trim( $test_secret_key );

205

206 $settings['publishable_key'] = is_null( $publishable_key ) ? $settings['publishable_key'] : $publishable_key;

207 $settings['secret_key'] = is_null( $secret_key ) ? $settings['secret_key'] : $secret_key;

208 $settings['webhook_secret'] = is_null( $webhook_secret ) ? $settings['webhook_secret'] : $webhook_secret;

209 $settings['test_publishable_key'] = is_null( $test_publishable_key ) ? $settings['test_publishable_key'] : $test_publishable_key;

210 $settings['test_secret_key'] = is_null( $test_secret_key ) ? $settings['test_secret_key'] : $test_secret_key;

211 $settings['test_webhook_secret'] = is_null( $test_webhook_secret ) ? $settings['test_webhook_secret'] : $test_webhook_secret;

custom_completion_test.php (https://github.com/sbourget/moodle.git) PHP · 239 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

36

37 global $CFG;

38 require_once($CFG->libdir . '/completionlib.php');

39 require_once($CFG->dirroot . '/mod/assign/tests/generator.php');

83 */

84 public function test_get_state(string $rule, int $available, ?bool $submitted, ?int $status, ?string $exception) {

85 if (!is_null($exception)) {

86 $this->expectException($exception);

87 }

116 */

117 public function test_get_state_group(string $rule, int $available, ?bool $submitted, ?int $status, ?string $exception) {

118 if (!is_null($exception)) {

119 $this->expectException($exception);

120 }

CategoriesControllerTest.php (https://github.com/servergrove/ServerGroveKbBundle.git) PHP · 147 lines

1 <?php

2

3 namespace ServerGrove\KbBundle\Tests\Controller\Admin;

26 {

27 $client = $this->getClient();

28 $crawler = $client->request('GET', $this->generateUrl(is_null($path) ? 'sgkb_admin_categories_index' : 'sgkb_admin_categories_show', array('path' => $path)));

29

30 $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client));

31 $this->assertGreaterThan(0, $crawler->filter('table.table tbody tr')->count());

32

33 if (is_null($path)) {

34 $this->assertEquals(0, $crawler->filter('h1:contains("Category")')->count());

35 $this->assertEquals('Categories list', $crawler->filter('#doccontent h2')->first()->text());

47 {

48 $client = $this->getClient();

49 $crawler = $client->request('GET', $this->generateUrl(is_null($path) ? 'sgkb_admin_categories_new' : 'sgkb_admin_categories_new_subcategory', array('path' => $path)));

50

51 $this->assertEquals(200, $client->getResponse()->getStatusCode(), $this->getErrorMessage($client));

StringifierTester.cs (https://github.com/schotime/fubumvc.git) C# · 305 lines

220

221 [Test]

222 public void should_return_empty_when_value_is_null()

223 {

224 configure(x => x.IfIsType<DateTime>().ConvertBy(d => d.ToShortDateString()));

Input.php (https://gitlab.com/dleonov/my-framework-two) PHP · 419 lines

1 <?php

2

3 /**

81 }

82

83 if (is_null($source))

84 {

85 $this->data = &$_REQUEST;

205 protected function getArrayRecursive(array $vars = array(), $datasource = null, $defaultFilter = 'unknown', $recursion = false)

206 {

207 if (empty($vars) && is_null($datasource))

208 {

209 $vars = $this->data;

223 if (is_array($v))

224 {

225 if (is_null($datasource))

226 {

227 $results[$k] = $this->getArrayRecursive($v, $this->get($k, null, 'array'), $defaultFilter, true);

Activity.php (https://github.com/livinglab/openlab.git) PHP · 358 lines

1 <?php

2 // Don't load directly

3 defined( 'WPINC' ) or die;

223 */

224 public function get( $slug = null, $action = null ) {

225 if ( is_null( $slug ) ) {

226 return $this->items;

227 }

242

243 // If we trying to get a specific action and

244 if ( is_null( $action ) ) {

245 return $this->items[ $slug ];

246 } elseif ( ! empty( $actions->{ $action } ) ) {

267

268 // Sum all of the Actions

269 if ( is_null( $action ) ) {

270 // recursively convert to associative array

271 $actions = json_decode( json_encode( $actions ), true );

Integration.php (https://gitlab.com/johanlindberg/irvato-crm) PHP · 179 lines

1 <?php

2 /************************************************************************

3 * This file is part of EspoCRM.

110 $fieldDefs = $fields[$field];

111

112 if (!is_null($value)) {

113 switch ($fieldDefs['type']) {

114 case self::VARCHAR:

Stream.php (https://github.com/necrogami/zf2.git) PHP · 291 lines

1 <?php

2 /**

3 * Zend Framework

259 protected function readStream()

260 {

261 if (!is_null($this->contentLength)) {

262 $bytes = $this->contentLength - $this->contentStreamed;

263 } else {

slider.php (https://github.com/Hackwar/joomla-cms.git) PHP · 153 lines

42 */

43

44 if ($color === 'none' || is_null($color))

45 {

46 $color = '';

88 >

89 <!-- The data to save at the end (label created in form by Joomla) -->

90 <input type="text" class="form-control color-input" id="<?php echo $id; ?>" name="<?php echo $name; ?>"

91 <?php echo

123 ?>

124 >

125 <?php endif ?>

126 <?php if ($allSliders || in_array('saturation', $displayValues)) : ?>

127 <label for="saturation-slider" class="visually-hidden"><?php echo Text::_('JFIELD_COLOR_LABEL_SLIDER_SATURATION'); ?></label>

128 <input type="range" min="0" max="100" class="form-control color-slider" id="saturation-slider" data-type="saturation"

129 <?php echo

Packaging.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 289 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

49 public function getRma()

50 {

51 if (is_null($this->_rma)) {

52 $this->_rma = Mage::registry('current_rma');

53 }

GetCharactersCharacterIdPlanetsPlanetIdOkPins.php (https://gitlab.com/mglinski/php-esi-lib) PHP · 496 lines

1 <?php

2 /**

3 * GetCharactersCharacterIdPlanetsPlanetIdOkPins

4 *

5 * PHP version 5

6 *

7 * @category Class

463 public function offsetSet($offset, $value)

464 {

465 if (is_null($offset)) {

466 $this->container[] = $value;

467 } else {

ClassRegistry.php (https://github.com/masihnewbie/cakephp.git) PHP · 341 lines

1 <?php

2 /**

3 * Class collections.

7 * PHP 5

8 *

9 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

10 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

11 *

14 *

15 * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)

16 * @link http://cakephp.org CakePHP(tm) Project

17 * @package Cake.Utility

18 * @since CakePHP(tm) v 0.9.2

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

20 */

21

IsType.php (https://bitbucket.org/rybadour/todo_list_site.git) PHP · 190 lines

1 <?php

2 /**

3 * PHPUnit

4 *

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

53 * @package PHPUnit

54 * @subpackage Framework_Constraint

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

56 * @author Bernhard Schussek <bschussek@2bepublished.at>

57 * @copyright 2001-2012 Sebastian Bergmann <sebastian@phpunit.de>

60 * @since Class available since Release 3.0.0

61 */

62 class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint

63 {

64 const TYPE_ARRAY = 'array';

severity.class.php (https://gitlab.com/florianocomercial/centreon) PHP · 256 lines

1 <?php

2 /**

3 * Copyright 2005-2015 Centreon

98

99 # We get unitary

100 if (is_null($this->stmt_host)) {

101 $this->stmt_host = $this->backend_instance->db->prepare("SELECT

102 hc_id, hc_name, level

113 $this->stmt_host->execute();

114 $severity = array_pop($this->stmt_host->fetchAll(PDO::FETCH_ASSOC));

115 if (is_null($severity)) {

116 $this->host_linked_cache[$host_id] = null;

117 return null;

123

124 public function getHostSeverityById($hc_id) {

125 if (is_null($hc_id)) {

126 return null;

127 }

ListClassFunction.filter.php (https://github.com/timstephenson/NatureBridge.git) PHP · 150 lines

19 * @link http://beautifyphp.sourceforge.net

20 * @license http://www.php.net/license/3_0.txt PHP License 3.0

21 * @version CVS: $Id:$

22 */

38 * @author Claudio Bustos <cdx@users.sourceforge.com>

39 * @copyright 2004-2006 Claudio Bustos

40 * @link http://pear.php.net/package/PHP_Beautifier

41 * @link http://beautifyphp.sourceforge.net

42 * @license http://www.php.net/license/3_0.txt PHP License 3.0

43 * @version Release: 0.1.14

44 */

45 class PHP_Beautifier_Filter_ListClassFunction extends PHP_Beautifier_Filter

46 {

47 protected $aFilterTokenFunctions = array(

Product.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 162 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

152 {

153 $products = $this->getRequest()->getPost('selected_products');

154 if (is_null($products)) {

155 $products = $this->getCategory()->getProductsPosition();

156 return array_keys($products);

bug_revision_api.php (https://github.com/fusenigk/mantisbt-1.git) PHP · 360 lines

1 <?php

2 # Mantis - a php based bugtracking system

23 * @link http://www.mantisbt.org

24 *

25 * @uses constant_inc.php

26 * @uses database_api.php

27 */

28

29 require_api( 'constant_inc.php' );

30 require_api( 'database_api.php' );

50

51 # Don't save a revision twice if nothing has changed

52 if ( !is_null( $t_last ) &&

53 $p_value == $t_last['value'] ) {

54

qrsplit.php (https://gitlab.com/Ltaimao/wecenter) PHP · 311 lines

1 <?php

2 /*

3 * PHP QR Code encoder

8 * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>

9 *

10 * PHP QR Code is distributed under LGPL 3

11 * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>

12 *

298 public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true)

299 {

300 if(is_null($string) || $string == '\0' || $string == '') {

301 throw new Exception('empty string!!!');

302 }

CloudStorageService.php (https://bitbucket.org/skudatech/azure-sdk-for-php.git) PHP · 186 lines

1 <?php

2

3 /**

13 * limitations under the License.

14 *

15 * PHP version 5

16 *

17 * @category Microsoft

18 * @package Client

19 * @author Azure PHP SDK <azurephpsdk@microsoft.com>

20 * @copyright 2012 Microsoft Corporation

21 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

38 * @category Microsoft

39 * @package Client

40 * @author Azure PHP SDK <azurephpsdk@microsoft.com>

41 * @copyright 2012 Microsoft Corporation

42 * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0

Statement.php (https://github.com/Amleth/Patchwork-Doctrine.git) PHP · 194 lines

1 <?php

2

3 /*

26 * Portability Wrapper for a Statement

27 *

28 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL

29 * @link www.doctrine-project.com

30 * @since 2.0

121 $row = $this->fixRow($row,

122 $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM),

123 !is_null($this->case) && ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE)

124 );

125

138

139 $iterateRow = $this->portability & (Connection::PORTABILITY_EMPTY_TO_NULL|Connection::PORTABILITY_RTRIM);

140 $fixCase = !is_null($this->case) && ($fetchStyle == PDO::FETCH_ASSOC || $fetchStyle == PDO::FETCH_BOTH) && ($this->portability & Connection::PORTABILITY_FIX_CASE);

141 if (!$iterateRow && !$fixCase) {

142 return $rows;

Brand.php (https://bitbucket.org/acidel/buykoala.git) PHP · 145 lines

1 <?php

2

3 /**

126 $brands = $this->getRequest()->getPost('selected_brands');

127 $categoryId = $this->getCategory()->getId();

128 if (is_null($brands)) {

129 $arrayBrands = array();

130 $brands = Mage::getModel("brand/category")->getCollection()->addFieldToFilter("entity_id", array("eq" => $categoryId));

Engine.php (https://bitbucket.org/acidel/buykoala.git) PHP · 189 lines

1 <?php

2 /**

3 * Magento

8 * that is bundled with this package in the file LICENSE.txt.

9 * It is also available through the world-wide-web at this URL:

10 * http://opensource.org/licenses/osl-3.0.php

11 * If you did not receive a copy of the license and are unable to

12 * obtain it through the world-wide-web, please send an email

22 * @package Mage_CatalogSearch

23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)

24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)

25 */

26

114 $where = array();

115

116 if (!is_null($storeId)) {

117 $where[] = $this->_getWriteAdapter()->quoteInto('store_id=?', $storeId);

118 }

class-yoast-plugin-conflict.php (https://gitlab.com/najomie/fit-hippie) PHP · 333 lines

1 <?php

2 /**

3 * @package WPSEO\Admin

50 public static function get_instance( $class_name = '' ) {

51

52 if ( is_null( self::$instance ) ) {

53 if ( ! is_string( $class_name ) || $class_name === '' ) {

54 $class_name = __CLASS__;

116 public function get_conflicting_plugins_as_string( $plugin_section ) {

117 if ( ! function_exists( 'get_plugin_data' ) ) {

118 require_once( ABSPATH . '/wp-admin/includes/plugin.php' );

119 }

120

200

201 /* translators: %s: 'Facebook' plugin name of possibly conflicting plugin */

202 $error_message .= '<a class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=all', 'deactivate-plugin_' . $plugin_file ) . '">' . sprintf( __( 'Deactivate %s', 'wordpress-seo' ), WPSEO_Utils::get_plugin_name( $plugin_file ) ) . '</a> ';

203

204 $identifier = $this->get_notification_identifier( $plugin_file );

oracle.php (https://bitbucket.org/ke2083/transfans.co.uk-website.git) PHP · 205 lines

1 <?php

2 /**

3 * @package FrameworkOnFramework

65

66 // Case 2: Key Provided, null value (unset key from $bounded array)

67 if (is_null($value))

68 {

69 if (isset($this->bounded[$key]))

AssertionsTrait.php (https://gitlab.com/zan_zan/laravel_sample) PHP · 203 lines

4

5 use Illuminate\View\View;

6 use PHPUnit_Framework_Assert as PHPUnit;

7

8 trait AssertionsTrait

83 {

84 if (!isset($this->response->original) || !$this->response->original instanceof View) {

85 return PHPUnit::assertTrue(false, 'The response was not a view.');

86 }

87

98 public function assertRedirectedTo($uri, $with = [])

99 {

100 PHPUnit::assertInstanceOf('Illuminate\Http\RedirectResponse', $this->response);

101

102 PHPUnit::assertEquals($this->app['url']->to($uri), $this->response->headers->get('Location'));

monitoring_result.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 394 lines

1 <?php

2 interface CBitrixCloudMonitoring_Access extends Iterator, ArrayAccess

3 {

243 }

244 public function offsetSet($offset, $value) {

245 if (is_null($offset)) {

246 $this->tests[] = $value;

247 } else {

377 }

378 public function offsetSet($offset, $value) {

379 if (is_null($offset)) {

380 $this->domains[] = $value;

381 } else {

sfValidatorSchema.class.php (https://github.com/proyectoalba/alba.git) PHP · 391 lines

1 <?php

2

3 /*

17 * @subpackage validator

18 * @author Fabien Potencier <fabien.potencier@symfony-project.com>

19 * @version SVN: $Id: sfValidatorSchema.class.php 16274 2009-03-12 18:17:24Z fabien $

20 */

21 class sfValidatorSchema extends sfValidatorBase implements ArrayAccess

49 }

50 }

51 else if (!is_null($fields))

52 {

53 throw new InvalidArgumentException('sfValidatorSchema constructor takes an array of sfValidatorBase objects.');

96 protected function doClean($values)

97 {

98 if (is_null($values))

99 {

100 $values = array();

-gridform.php (https://github.com/Doap/xoops.git) PHP · 172 lines

1 <?php

2 /**

3 * XOOPS Framework

12 * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/

13 * @license BSD liscense

14 * @author Taiwen Jiang <phppp@users.sourceforge.net>

15 * @since 3.0

16 * @package xoops

19

20 global $xoops;

21 include_once $xoops->path("www") . "/class/xoopsform/form.php";

22

23 class XoopsGridForm extends XoopsForm

124 $ret .= $ele;

125 } elseif (!$ele->isHidden()) {

126 if (!is_null($widths)) {

127 $left = array_shift($widths);

128 } else {

Date.php (https://github.com/finger2000/horde.git) PHP · 194 lines

1 <?php

2 /**

3 * A decorator around an Ansel_Gallery to allow multiple date groupings

97 public function getTile($parent = null, $style = null, $mini = false, $params = array())

98 {

99 if (!is_null($parent) && is_null($style)) {

100 $style = $parent->getStyle();

101 }

class-yoast-plugin-conflict.php (https://gitlab.com/bhargavi_dcw/dflocal) PHP · 333 lines

1 <?php

2 /**

3 * @package WPSEO\Admin

50 public static function get_instance( $class_name = '' ) {

51

52 if ( is_null( self::$instance ) ) {

53 if ( ! is_string( $class_name ) || $class_name === '' ) {

54 $class_name = __CLASS__;

116 public function get_conflicting_plugins_as_string( $plugin_section ) {

117 if ( ! function_exists( 'get_plugin_data' ) ) {

118 require_once( ABSPATH . '/wp-admin/includes/plugin.php' );

119 }

120

200

201 /* translators: %s: 'Facebook' plugin name of possibly conflicting plugin */

202 $error_message .= '<a target="_blank" class="button button-primary" href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=all', 'deactivate-plugin_' . $plugin_file ) . '">' . sprintf( __( 'Deactivate %s', 'wordpress-seo' ), WPSEO_Utils::get_plugin_name( $plugin_file ) ) . '</a> ';

203

204 $identifier = $this->get_notification_identifier( $plugin_file );

ListBase.php (https://bitbucket.org/haichau59/manga.git) PHP · 192 lines

1 <?php

2

3 /**

4 * @version $Id$

5 * @author Andrew Morton <drewish@katherinehouse.com>

6 * @license http://opensource.org/licenses/lgpl-license.php

7 * GNU Lesser General Public License, Version 2.1

8 * @package Phlickr

12 * This class implements the IList interface.

13 */

14 require_once 'Phlickr/Framework/IList.php';

15

16 /**

120 $response = $this->getRequest()->execute($allowCached);

121 $xml = $response->xml->{$this->getResponseListElement()};

122 if (is_null($xml)) {

123 throw new Exception(

124 sprintf("Could not load object with request: '%s'.",

GetChildInfoStatistics.php (https://gitlab.com/i-have-a-green/digitemis-v3) PHP · 362 lines

1 <?php

2 /**

3 * GetChildInfoStatistics

4 *

5 * PHP version 5

6 *

7 * @category Class

323 public function offsetSet($offset, $value)

324 {

325 if (is_null($offset)) {

326 $this->container[] = $value;

327 } else {

FolderHandler.php (https://gitlab.com/manuvelasco/agostoliquida) PHP · 271 lines

1 <?php

2 /*

3 * CKFinder

22 * Include file system utils class

23 */

24 require_once CKFINDER_CONNECTOR_LIB_DIR . "/Utils/FileSystem.php";

25

26 /**

133 }

134

135 if (is_null($this->_resourceTypeConfig)) {

136 $connector =& CKFinder_Connector_Core_Factory::getInstance("Core_Connector");

137 $oErrorHandler =& $connector->getErrorHandler();

172 public function getUrl()

173 {

174 if (is_null($this->_url)) {

175 $this->_resourceTypeConfig = $this->getResourceTypeConfig();

176 if (is_null($this->_resourceTypeConfig)) {

FilesystemAdapter.php (https://gitlab.com/Sigpot/AirSpot) PHP · 383 lines

1 <?php

2

3 namespace Illuminate\Filesystem;

120 * @return int

121 */

122 public function prepend($path, $data, $separator = PHP_EOL)

123 {

124 if ($this->exists($path)) {

136 * @return int

137 */

138 public function append($path, $data, $separator = PHP_EOL)

139 {

140 if ($this->exists($path)) {

354 protected function parseVisibility($visibility)

355 {

356 if (is_null($visibility)) {

357 return;

358 }

CompanyWebsite.class.php (https://github.com/dbernar1/Project-Pier.git) PHP · 312 lines

1 <?php

2

3 /**

168 $user->setLastLogin(DateTimeValueLib::now());

169

170 if (is_null($user->getLastActivity())) {

171 $user->setLastVisit(DateTimeValueLib::now());

172 } else {

288 */

289 function setProject($value) {

290 if (is_null($value) || ($value instanceof Project)) {

291 $this->selected_project = $value;

292 }

ArchivableBehavior.php (https://github.com/crew-cr/Crew.git) PHP · 197 lines

1 <?php

2

3 /**

9 */

10

11 require_once dirname(__FILE__) . '/ArchivableBehaviorObjectBuilderModifier.php';

12 require_once dirname(__FILE__) . '/ArchivableBehaviorQueryBuilderModifier.php';

132 }

133

134 public function getArchiveTablePhpName($builder)

135 {

136 if ($this->hasArchiveClass()) {

180 public function getObjectBuilderModifier()

181 {

182 if (is_null($this->objectBuilderModifier)) {

183 $this->objectBuilderModifier = new ArchivableBehaviorObjectBuilderModifier($this);

184 }

expression.php (https://github.com/dburkart/scurvy.git) PHP · 383 lines

1 <?php

2 /*

3 * expression.php

96 $next = array_pop($this->atomList);

97

98 if (is_null($this->eval) || $recurse) {

99 switch($next->type) {

100 case EXPR_VAR:

AclSecurityHandler.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 328 lines

1 <?php

2

3 /*

174 $objectIdentity = ObjectIdentity::fromDomainObject($object);

175 $acl = $this->getObjectAcl($objectIdentity);

176 if (is_null($acl)) {

177 $acl = $this->createAcl($objectIdentity);

178 }

IniReaderTest.php (https://gitlab.com/wewo/evina-cake) PHP · 304 lines

3 * IniReaderTest

4 *

5 * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>

6 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

7 *

11 *

12 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

13 * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests

14 * @package Cake.Test.Case.Configure

15 * @since CakePHP(tm) v 2.0

98

99 /**

100 * Test reading acl.ini.php.

101 *

102 * @return void

reflection_php5.php (https://github.com/limb-php-framework/limb-app-buildman.git) PHP · 275 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: reflection_php5.php 4378 2006-10-27 10:04:53Z pachanga $

7 */

8

26 /**

27 * Checks that a class has been declared. Versions

28 * before PHP5.0.2 need a check that it's not really

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

teilgewaesserbenutzungen.php (https://github.com/srahn/kvwmap.git) PHP · 352 lines

1 <?php

2 class Teilgewaesserbenutzungen extends WrPgObject {

3

Tax.php (https://bitbucket.org/kdms/sh-magento.git) PHP · 253 lines

1 <?php

2 /**

3 * Magento Enterprise Edition

209 }

210

211 if (!is_null($row['percent'])) {

212 $row['percent'] = $row['percent'] ? $row['percent'] : 1;

213 $rate = $rate ? $rate : 1;

IsType.php (https://github.com/timglabisch/pimcore.git) PHP · 190 lines

1 <?php

2 /**

3 * PHPUnit

4 *

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

53 * @package PHPUnit

54 * @subpackage Framework_Constraint

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

56 * @author Bernhard Schussek <bschussek@2bepublished.at>

57 * @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>

60 * @since Class available since Release 3.0.0

61 */

62 class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint

63 {

64 const TYPE_ARRAY = 'array';

Validator.php (https://github.com/caferrari/Validation.git) PHP · 162 lines

1 <?php

2 namespace Respect\Validation;

3

141 );

142 $exception->configure($name, $params);

143 if (!is_null($this->template)) {

144 $exception->setTemplate($this->template);

145 }

filter.php (https://gitlab.com/Bartwillemsen/aurora-framework) PHP · 225 lines

1 <?php

2 namespace Aurora\Routing;

3

56 // if they are not logged in. Because of this, we will return

57 // the first filter response if overriding is enabled.

58 if (! is_null($response) and $override) return $response;

59 }

60 }

ResourceTypeConfig.php (https://gitlab.com/manuvelasco/agostoliquida) PHP · 367 lines

1 <?php

2 /*

3 * CKFinder

232 }

233

234 if (is_null($this->_config)) {

235 $this->_config =& CKFinder_Connector_Core_Factory::getInstance("Core_Config");

236 }

239 $pieces = explode('.', $fileName);

240

241 // First, check the last extension (ex. in file.php.jpg, the "jpg").

242 if ( !$this->checkSingleExtension( $pieces[sizeof($pieces)-1] ) ) {

243 return false;

258 }

259 else {

260 // Check only the last extension (ex. in file.php.jpg, only "jpg").

261 return $this->checkSingleExtension( substr($fileName, strrpos($fileName,'.')+1) );

262 }

Frame.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 363 lines

1 <?php

2 /**

3 * Zend Framework

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

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

20 * @version $Id: Frame.php 20096 2010-01-06 02:05:09Z bkarwin $

21 */

22

24 * @see Zend_Queue_Stomp_FrameInterface

25 */

26 // require_once 'Zend/Queue/Stomp/FrameInterface.php';

27

28 /**

106 {

107 if (!is_bool($auto)) {

108 // require_once 'Zend/Queue/Exception.php';

109 throw new Zend_Queue_Exception('$auto is not a boolean');

110 }

date.php (https://gitlab.com/kath.de/cibedo_cibedo.de) PHP · 319 lines

24 * @param string $date String representing the datetime, assumed to be UTC (relevant if timezone conversion is used)

25 * @param bool $display_time If true shows date and time, if false only shows date

26 * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php)

27 *

28 * @return string

67 * @category Events

68 * @param string $date The date to find the beginning of the day, defaults to today

69 * @param string $format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php)

70 *

71 * @return string

202 * @category Events

203 * @param int $event (optional)

204 * @param string $date_format Allows date and time formating using standard php syntax (http://php.net/manual/en/function.date.php)

205 * @param string $timezone Timezone in which to present the date/time (or default behaviour if not set)

206 *

SqlServerGrammar.php (https://bitbucket.org/ccromos/zusammenspiel2.git) PHP · 435 lines

1 <?php namespace Illuminate\Database\Schema\Grammars;

2

3 use Illuminate\Support\Fluent;

412 protected function modifyDefault(Blueprint $blueprint, Fluent $column)

413 {

414 if ( ! is_null($column->default))

415 {

416 return " default ".$this->getDefaultValue($column->default);

XmlImportTemplateParser.php (https://gitlab.com/najomie/fit-hippie) PHP · 444 lines

1 <?php

2 /**

3 * @author Olexandr Zanichkovsky <olexandr.zanichkovsky@zophiatech.com>

5 */

6

7 require_once dirname(__FILE__) . '/ast/XmlImportAstSequence.php';

8 require_once dirname(__FILE__) . '/ast/XmlImportAstPrint.php';

9 require_once dirname(__FILE__) . '/ast/XmlImportAstText.php';

10 require_once dirname(__FILE__) . '/ast/XmlImportAstWith.php';

11 require_once dirname(__FILE__) . '/ast/XmlImportAstForeach.php';

12 require_once dirname(__FILE__) . '/ast/XmlImportAstIf.php';

13 require_once dirname(__FILE__) . '/ast/XmlImportAstMath.php';

14 require_once dirname(__FILE__) . '/ast/XmlImportAstSpintax.php';

Magic.php (https://github.com/ewandor/horde.git) PHP · 232 lines

1 <?php

2 /**

3 * The Horde_Mime_Magic:: class provides an interface to determine a MIME type

31 static protected function _getMimeExtensionMap()

32 {

33 if (is_null(self::$_map)) {

34 require dirname(__FILE__) . '/mime.mapping.php';

200 $opts = array())

201 {

202 /* If the PHP Mimetype extension is available, use that. */

203 if (Horde_Util::extensionExists('fileinfo')) {

204 $res = empty($magic_db)

Serialized.php (https://github.com/chrishubber/storytlr.git) PHP · 193 lines

107 }

108

109 // Add phpexcel.xml to the document, which represents a PHP serialized PHPExcel object

110 $objZip->addFromString('phpexcel.xml', $this->_writeSerialized($this->_spreadSheet, $pFilename));

136 * Get PHPExcel object

137 *

138 * @param PHPExcel $pPHPExcel PHPExcel object

139 * @throws Exception

140 */

141 public function setPHPExcel(PHPExcel $pPHPExcel = null) {

142 $this->_spreadSheet = $pPHPExcel;

179

180 // Comment

181 $objWriter->writeComment('This file has been generated using PHPExcel v1.6.3 (http://www.codeplex.com/PHPExcel). It contains a base64 encoded serialized version of the PHPExcel internal object.');

182

183 // Data

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

219

220 void ScriptingCore::string_report(jsval val) {

221 if (JSVAL_IS_NULL(val)) {

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

dhd_common.c (http://omnia2droid.googlecode.com/svn/trunk/) C · 1733 lines ✨ Summary

This C code snippet appears to be part of a wireless networking driver, specifically related to Wi-Fi scanning and management. It provides functions for requesting Wi-Fi scans, deleting BSS (Basic Service Set) entries, and retrieving partial scan results. The code also handles various error conditions and manages internal data structures, such as the iscan_chain buffer.

7 * agreement governing use of this software, this software is licensed to you

8 * under the terms of the GNU General Public License version 2 (the "GPL"),

9 * available at http://www.broadcom.com/licenses/GPLv2.php, with the

10 * following added to such license:

11 *