100+ results for 'php array_diff'

Not the results you expected?

BaseNotStorageEntityModel.php (https://github.com/sergiygladkyy/OEF.git) PHP · 401 lines

1 <?php

2

3 require_once('lib/model/base/BaseModel.php');

310

311 // Validation all fields

312 $err = $this->checkAttributesPrecision(array_diff($names, $not_valid), $options);

313

314 if (!empty($err))

319

320 // Validation references

321 $references = array_intersect(array_diff($names, $not_valid), array_keys($this->conf['references']));

322 $err = $this->checkReferences($references);

323

CurrentView.php (https://github.com/mcguffin/acf-quick-edit-fields.git) PHP · 404 lines

1 <?php

2 /**

3 * @package ACFQuickEdit\Admin

85 ] );

86 // no post type on taxonomies!

87 $this->screen_param = array_diff_key( $this->screen_param, [ 'post_type' => 0 ] );

88 } else if ( $this->object_kind === 'user' ) {

89 }

385

386 if ( $url ) {

387 parse_str( parse_url( $url, PHP_URL_QUERY ), $filter );

388 }

389

AdminWebModule.php (https://github.com/Alex8452/Kurogo-Mobile-Web-Doc-Translation.git) PHP · 247 lines

1 <?php

2 /**

3 * @package Module

114 $usedModules = array_merge($modules['primary'], $modules['secondary']);

115 $allModules = $this->getAllModules();

116 $unusedModules = array_diff(array_keys($allModules), array_keys($usedModules));

117

118 foreach ($unusedModules as $moduleID) {

UrlHandler_Test.php (git://github.com/ethna/ethna.git) PHP · 342 lines

1 <?php

2 /**

3 * UrlHandler_Test.php

86

87 // action ?????

88 $diff = array_diff($injected, $http_vars);

89 $this->assertEqual(count($diff), 1);

90 $this->assertEqual($diff['action_test_foo_bar'], true);

91

92 // action ??????????????????

93 $diff = array_diff($http_vars, $injected);

94 $this->assertEqual(count($diff), 0);

95

99 $injected = $this->url_handler->requestToAction($http_vars);

100

101 $diff = array_diff($injected, $http_vars);

102 $this->assertEqual(count($diff), 1);

103 $this->assertEqual($diff['action_test_foo_bar'], true);

Migrator.php (https://gitlab.com/oytunistrator/92five) PHP · 383 lines

1 <?php namespace Illuminate\Database\Migrations;

2

3 use Closure;

80 $ran = $this->repository->getRan();

81

82 $migrations = array_diff($files, $ran);

83

84 $this->runMigrationList($migrations, $pretend);

217 public function getMigrationFiles($path)

218 {

219 $files = $this->files->glob($path.'/*_*.php');

220

221 // Once we have the array of files in the directory we will just remove the

226 $files = array_map(function($file)

227 {

228 return str_replace('.php', '', basename($file));

229

230 }, $files);

TaintFlowGraph.php (https://github.com/vimeo/psalm.git) PHP · 322 lines

1 <?php

2

3 namespace Psalm\Internal\Codebase;

209

210 $new_taints = \array_unique(

211 \array_diff(

212 \array_merge($source_taints, $added_taints),

213 $removed_taints

Element.php (https://github.com/Imangazaliev/DiDOM.git) PHP · 401 lines

1 <?php

2

3 namespace DiDom;

144 $segments['classes'] = array_key_exists('classes', $segments) ? $segments['classes'] : [];

145

146 $diff1 = array_diff($segments['classes'], $classes);

147 $diff2 = array_diff($classes, $segments['classes']);

157 $segments['attributes'] = array_key_exists('attributes', $segments) ? $segments['attributes'] : [];

158

159 $diff1 = array_diff_assoc($segments['attributes'], $attributes);

160 $diff2 = array_diff_assoc($attributes, $segments['attributes']);

Collection.php (https://gitlab.com/biggercode/Eloquent-Outside-of-Laravel) PHP · 705 lines

1 <?php namespace Illuminate\Support;

2

3 use Closure;

80 public function diff($items)

81 {

82 return new static(array_diff($this->items, $this->getArrayableItems($items)));

83 }

84

BaseDmPermissionForm.class.php (https://github.com/MorskoPrase/diem.git) PHP · 299 lines

1 <?php

2

3 /**

170 }

171

172 $unlink = array_diff($existing, $values);

173 if (count($unlink))

174 {

176 }

177

178 $link = array_diff($values, $existing);

179 if (count($link))

180 {

208 }

209

210 $unlink = array_diff($existing, $values);

211 if (count($unlink))

212 {

local.php (https://gitlab.com/najomie/ljm) PHP · 880 lines

1 <?php

2

3 class acf_local {

153 if( empty($field_group['local']) ) {

154

155 $field_group['local'] = 'php';

156

157 }

223

224 // clear cache

225 // - delete cache was origional added to ensure changes to JSON / PHP would appear in WP when using memcache

226 // - the downside is that wp_cache_delet is taxing on the system so has been commented out

227 //wp_cache_delete( "get_field/key={$key}", 'acf' );

304

305 // remove

306 $this->parents[ $parent_key ] = array_diff($this->parents[ $parent_key ], array($field_key));

307

308

Group.php (https://github.com/srsree/OurBank.git) PHP · 345 lines

1 <?php

2 /*

3 ############################################################################

20 ?>

21

22 <?php

23 /*

24 ############################################################################

326 public function insertUpdates($previous,$current,$groupname_id) {

327 $db = $this->getAdapter();

328 $result=array_keys (array_diff($previous,$current));

329 foreach($result as $group) {

330 $table_name='ourbank_groupupdates';

translated-object.php (https://gitlab.com/hop23typhu/bryepoxy) PHP · 272 lines

1 <?php

2

3 /**

97 $translations = array_map( 'intval', $translations );

98 $translations = array_merge( array( $lang->slug => $id ), $translations ); // make sure this object is in translations

99 $translations = array_diff( $translations, array( 0 ) ); // don't keep non translated languages

100 $translations = array_intersect_key( $translations, array_flip( $this->model->get_languages_list( array( 'fields' => 'slug' ) ) ) ); // keep only valid languages slugs as keys

101

102 // unlink removed translations

103 $old_translations = $this->get_translations( $id );

104 foreach ( array_diff_assoc( $old_translations, $translations ) as $object_id ) {

105 $this->delete_translation( $object_id );

106 }

119 // take care not to overwrite extra data stored in description field, if any

120 $d = unserialize( $term->description );

121 $d = is_array( $d ) ? array_diff_key( $d, $old_translations ) : array(); // remove old translations

122 $d = array_merge( $d, $translations ); // add new one

123 wp_update_term( $group = (int) $term->term_id, $this->tax_translations, array( 'description' => serialize( $d ) ) );

DefaultOptions.php (https://github.com/Exercise/symfony.git) PHP · 320 lines

1 <?php

2

3 /*

18 * Helper for specifying and resolving inter-dependent options.

19 *

20 * Options are a common pattern for initializing classes in PHP. Avoiding the

21 * problems related to this approach is however a non-trivial task. Usually,

22 * both classes and subclasses should be able to set default option values.

285 {

286 $knownOptions = $this->options->getNames();

287 $diff = array_diff($optionNames, $knownOptions);

288

289 if (count($diff) > 0) {

Collect.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 313 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

71 $allModules = $this->fullModuleList->getNames();

72 $enabledModules = $this->moduleList->getNames();

73 $disabledModules = array_diff($allModules, $enabledModules);

74

75 return $disabledModules;

275 $dbModule = $dbModuleArray[array_search($moduleName, $nameValues)];

276 $changeTest = $dbModule->getData();

277 $changes = array_diff($module, $changeTest);

278 $changesCleanArray = $this->getCleanChangesArray($changes);

279

BaseStripeClient.php (https://github.com/strangerstudios/paid-memberships-pro.git) PHP · 266 lines

1 <?php

2

3 namespace Stripe;

187

188 /**

189 * TODO: replace this with a private constant when we drop support for PHP < 5.

190 *

191 * @return array<string, mixed>

259

260 // check absence of extra keys

261 $extraConfigKeys = \array_diff(\array_keys($config), \array_keys($this->getDefaultConfig()));

262 if (!empty($extraConfigKeys)) {

263 throw new \Stripe\Exception\InvalidArgumentException('Found unknown key(s) in configuration array: ' . \implode(',', $extraConfigKeys));

functions_picture.inc.php (https://gitlab.com/team_fsn/fsn-php) PHP · 133 lines

1 <?php

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

3 // | Piwigo - a PHP based photo gallery |

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

5 // | Copyright(C) 2008-2016 Piwigo Team http://piwigo.org |

6 // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |

7 // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |

8 // +-----------------------------------------------------------------------+

119 global $conf;

120

121 $params = array_diff_assoc(correct_slideshow_params($decode_params), get_default_slideshow_params());

122 $result = '';

123

HashMap.class.php (https://bitbucket.org/stk2k/charcoalphp2.1.git) PHP · 386 lines

1 <?php

2 /**

3 * 連想配列クラス

5 * キー、値ともに型は限定しない

6 *

7 * PHP version 5

8 *

9 * @package class.base

10 * @author CharcoalPHP Development Team

11 * @copyright 2008 stk2k, sazysoft

12 */

353 return $this->values;

354 }

355 return array_diff( $this->values, array() );

356 }

357

mo.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 143 lines

1 <?php

2

3 class Tests_POMO_MO extends WP_UnitTestCase {

62 $host->merge_with($guest);

63 $this->assertEquals(3, count($host->entries));

64 $this->assertEquals(array(), array_diff(array('pink', 'green', 'red'), array_keys($host->entries)));

65 }

66

widget-layered_nav_filters.php (https://github.com/markjaquith/woocommerce.git) PHP · 109 lines

1 <?php

2 /**

3 * Layered Navigation Fitlers Widget

81 $current_filter = ! empty( $_GET[ 'filter_' . $taxonomy_filter ] ) ? $_GET[ 'filter_' . $taxonomy_filter ] : '';

82 $new_filter = array_map( 'absint', explode( ',', $current_filter ) );

83 $new_filter = array_diff( $new_filter, array( $term_id ) );

84

85 $link = remove_query_arg( 'filter_' . $taxonomy_filter );

IndexedModel.php (https://gitlab.com/pomirleanu.florentin/Elodex) PHP · 260 lines

1 <?php

2

3 namespace Elodex;

217 // shouldn't be added to the document are being hidden.

218 $loadedRelations = array_keys($this->relations);

219 $hiddenRelations = array_diff($loadedRelations, $this->indexRelations);

220

221 if (empty($hiddenRelations)) {

226 $visible = $this->getVisible();

227 if (count($visible) > 0) {

228 $this->setVisible(array_diff($visible, $hiddenRelations));

229

230 return;

247 if (! empty($this->indexRelations)) {

248 // Don't load already loaded relations

249 $this->load(array_diff($this->indexRelations, array_keys($this->relations)));

250 }

251 }

Shoppingcart.php (https://bitbucket.org/spenna/alexoo_produzione.git) PHP · 203 lines

1 <?php

2 /**

3 * aheadWorks Co.

181 }

182 if ($relatedIds) {

183 $relatedIds = array_diff($relatedIds, $this->_getCheckoutCartProductIds());

184 }

185 return $relatedIds;

RBACService.php (https://github.com/liufee/cms.git) PHP · 509 lines

1 <?php

2 /**

3 * Author: lf

277 if( $this->authManager->update($name, $role) ){

278 $permissions = $formModel->getPermissions();

279 $needAdds = array_diff($permissions, $oldPermissions);

280 foreach ($needAdds as $permission){

281 $permission = $this->authManager->getPermission($permission);

283 }

284

285 $needRemoves = array_diff($oldPermissions, $formModel->getPermissions());

286 foreach ($needRemoves as $permission){

287 $permission = $this->authManager->getPermission($permission);

290

291 $roles = $formModel->getRoles();

292 $needAdds = array_diff($roles, $oldRoles);

293 foreach ($needAdds as $needAdd){

294 $needAdd = $this->authManager->getRole($needAdd);

content.php (https://bitbucket.org/asosso/joomla25.git) PHP · 240 lines

1 <?php

2 /**

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

31 JSubMenuHelper::addEntry(

32 JText::_('JGLOBAL_ARTICLES'),

33 'index.php?option=com_content&view=articles',

34 $vName == 'articles'

35 );

36 JSubMenuHelper::addEntry(

37 JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),

38 'index.php?option=com_categories&extension=com_content',

39 $vName == 'categories');

40 JSubMenuHelper::addEntry(

41 JText::_('COM_CONTENT_SUBMENU_FEATURED'),

42 'index.php?option=com_content&view=featured',

43 $vName == 'featured'

44 );

FileSystem.php (https://github.com/shevron/zf2.git) PHP · 257 lines

1 <?php

2 /**

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

187

188 // Remove the hidden navigation directories

189 $listing = array_diff($listing, array('.', '..'));

190

191 return $listing;

Model.php (https://github.com/mbegoc/lighter.git) PHP · 166 lines

1 <?php

2 namespace lighter\models;

3

47 public function getValues($clean = true) {

48 if ($clean) {

49 return array_diff_key($this->data, $this->filter);

50 } else {

51 return $this->data;

content.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 240 lines

1 <?php

2 /**

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

31 JSubMenuHelper::addEntry(

32 JText::_('JGLOBAL_ARTICLES'),

33 'index.php?option=com_content&view=articles',

34 $vName == 'articles'

35 );

36 JSubMenuHelper::addEntry(

37 JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),

38 'index.php?option=com_categories&extension=com_content',

39 $vName == 'categories');

40 JSubMenuHelper::addEntry(

41 JText::_('COM_CONTENT_SUBMENU_FEATURED'),

42 'index.php?option=com_content&view=featured',

43 $vName == 'featured'

44 );

ResourceRegistrar.php (https://gitlab.com/kimting254/wbms) PHP · 392 lines

1 <?php namespace Illuminate\Routing;

2

3 class ResourceRegistrar {

117 elseif (isset($options['except']))

118 {

119 return array_diff($defaults, (array) $options['except']);

120 }

121

FormFactory.php (https://github.com/castillojorge/SemdropsMobile.git) PHP · 401 lines

1 <?php

2

3 /*

239

240 $type = end($types);

241 $diff = array_diff(self::$requiredOptions, $knownOptions);

242

243 if (count($diff) > 0) {

245 }

246

247 $diff = array_diff($passedOptions, $knownOptions);

248

249 if (count($diff) > 1) {

Save.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 363 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

81 /**

82 * @return bool

83 * @SuppressWarnings(PHPMD.BooleanGetMethodName)

84 * @codeCoverageIgnore

85 */

244 * @param \Magento\Framework\DataObject $item

245 * @return bool

246 * @SuppressWarnings(PHPMD.BooleanGetMethodName)

247 */

248 public function getIsAllowedQuoteItem($item)

295 }

296

297 $allowedItems = array_diff($allowedItems, $deleteAllowedItems);

298

299 $this->setAllowQuoteItems($allowedItems);

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

1 <?php

2

3 namespace Illuminate\Routing;

140 return array_intersect($defaults, (array) $options['only']);

141 } elseif (isset($options['except'])) {

142 return array_diff($defaults, (array) $options['except']);

143 }

144

class-admin-editor-specific-replace-vars.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 227 lines

1 <?php

2 /**

3 * WPSEO plugin file.

84 */

85 public function get_generic( $replacement_variables ) {

86 $shared_variables = array_diff(

87 $this->extract_names( $replacement_variables ),

88 $this->get_unique_replacement_variables()

ConfigDependencies.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 275 lines

1 <?php

2

3 namespace Drupal\rest\Entity;

167 foreach ($removed_formats as $format) {

168 if (in_array($format, $rest_config->getFormats($request_method), TRUE)) {

169 $configuration[$request_method]['supported_formats'] = array_diff($configuration[$request_method]['supported_formats'], $removed_formats);

170 }

171 }

172 foreach ($removed_auth as $auth) {

173 if (in_array($auth, $rest_config->getAuthenticationProviders($request_method), TRUE)) {

174 $configuration[$request_method]['supported_auth'] = array_diff($configuration[$request_method]['supported_auth'], $removed_auth);

175 }

176 }

236 foreach ($removed_formats as $format) {

237 if (in_array($format, $rest_config->getFormats($first_method), TRUE)) {

238 $configuration['formats'] = array_diff($configuration['formats'], $removed_formats);

239 }

240 }

template.php (https://gitlab.com/Rad1calDreamer/honey) PHP · 110 lines

8 */

9 $link = GetPagePath(false, false)."?".http_build_query(

10 array_diff_key(

11 $_REQUEST,

12 array_flip(

87 {

88 ob_start();

89 include(__DIR__."/form.php");

90 $arResult["OUTPUT_LIST"]["HTML"] = ob_get_clean().$arResult["OUTPUT_LIST"]["HTML"];

91 }

95 $APPLICATION->RestartBuffer();

96 while(ob_get_clean());

97 echo CUtil::PhpToJSObject(array(

98 "TEXT" => $arResult["OUTPUT_LIST"]["HTML"],

99 "POST_NUM_COMMENTS" => intval($arResult["Post"]["NUM_COMMENTS"])

class-wc-predictive-search-metabox.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 79 lines

1 <?php

2 /**

3 * Predictive Search Meta

45 #woo_predictive_upgrade_area_box legend {margin-left:4px; font-weight:bold;}

46 </style>

47 <fieldset id="woo_predictive_upgrade_area_box"><legend><?php _e('Upgrade to','woops'); ?> <a href="<?php echo WOOPS_AUTHOR_URI; ?>" target="_blank"><?php _e('Pro Version', 'woops'); ?></a> <?php _e('to activate', 'woops'); ?></legend>

48 <table class="form-table" cellspacing="0">

49 <tr valign="top">

50 <th scope="rpw" class="titledesc"><label for="_predictive_search_focuskw"><?php _e('Focus Keywords', 'woops'); ?></label></th>

51 <td class="forminp"><div class="wide_div"><input type="text" value="" id="_predictive_search_focuskw" name="_predictive_search_focuskw" style="width:98%;" /></div></td>

52 </tr>

53 </table>

54 </fieldset>

55 <?php

56

57 }

RollbackAction.php (https://github.com/Seizam/seizamcore.git) PHP · 122 lines

1 <?php

2 /**

3 * Edit rollback user interface

76 # is only temporary.

77 if ( !empty( $result ) && $result !== array( array( 'readonlytext' ) ) ) {

78 # array_diff is completely broken for arrays of arrays, sigh.

79 # Remove any 'readonlytext' error manually.

80 $out = array();

sfDoctrineCleanModelFilesTask.class.php (https://github.com/bheneka/gitta.git) PHP · 119 lines

1 <?php

2

3 /*

9 */

10

11 require_once(dirname(__FILE__).'/sfDoctrineBaseTask.class.php');

12

13 /**

55

56 // remove any models present in the filesystem but not in the yaml schema

57 if ($modelsToRemove = array_diff($this->getFileModels($config['models_path']), array_keys($yamlSchema)))

58 {

59 $deleteModelFiles->run($modelsToRemove, array('no-confirmation' => $options['no-confirmation']));

BaseAlbaConfig.php (https://github.com/proyectoalba/alba.git) PHP · 420 lines

1 <?php

2

3

100 public function hasOnlyDefaultValues()

101 {

102 if (array_diff($this->modifiedColumns, array())) {

103 return false;

104 }

276

277

278 public function getByName($name, $type = BasePeer::TYPE_PHPNAME)

279 {

280 $pos = AlbaConfigPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);

302

303

304 public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true)

305 {

306 $keys = AlbaConfigPeer::getFieldNames($keyType);

sharelib.php (https://gitlab.com/ElvisAns/tiki) PHP · 306 lines

1 <?php

2

3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project

122

123 // Remove redundant permissions

124 $permissions = array_diff($permissions, array_keys($this->groupPerm));

125 $permissions = array_diff($permissions, array_keys($this->categPerm));

267 global $Tiki_ShareObject__groups;

268

269 return array_diff($Tiki_ShareObject__groups, array_keys($this->validGroups));

270 }

271

ks_prefreport.php (https://gitlab.com/ElvisAns/tiki) PHP · 229 lines

1 <?php

2

3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project

10

11 // Usage: From the command line:

12 // php doc/devtools/prefreport.php

13 // resulting file can be found at dump/prefreport.txt

14 //

15 // also check out doc/devtools/securitycheck.php to see in which files are

16 // used each pref (and permission name too)

17 //

19 $ourFileName = "dump/prefreport.txt";

20

21 require_once 'tiki-setup.php';

22 $prefslib = TikiLib::lib('prefs');

23

Courses.php (https://github.com/omegaup/omegaup.git) PHP · 284 lines

1 <?php

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

3 * !ATENCION! *

41 return;

42 }

43 $unknownColumns = array_diff_key($data, self::FIELD_NAMES);

44 if (!empty($unknownColumns)) {

45 throw new \Exception(

Session.php (https://github.com/sebio/symfony.git) PHP · 289 lines

1 <?php

2

3 /*

260 if (true === $this->started) {

261 if (isset($this->attributes['_flash'])) {

262 $this->attributes['_flash'] = array_diff_key($this->attributes['_flash'], $this->oldFlashes);

263 }

264 $this->storage->write('_symfony2', $this->attributes);

app.php (https://github.com/shanchengren/darky.git) PHP · 139 lines

1 <?php

2

3 class appmodel {

55 $col[] = substr($rt['Field'], 3);

56 }

57 if ($addcol = array_diff($apps, $col)) {

58 $sql = '';

59 foreach ($addcol as $v) {

62 $this->db->query("ALTER TABLE $table " . rtrim($sql, ','));

63 }

64 if ($delcol = array_diff($col, $apps)) {

65 $sql = '';

66 foreach ($delcol as $v) {

76 $params['mode'] = $mode;

77 $params['method'] = $method;

78 $params['format'] = 'PHP';

79 $params['charset'] = 'gbk';

80 $params['type'] = 'uc';

BaseObject.php (https://github.com/xmeltrut/SocietasPro.git) PHP · 185 lines

1 <?php

2 /**

3 * Base object, because coding getters and setters for every single object

107 } else {

108

109 $arr = array_diff_assoc($this->data, $this->originalData);

110

111 if (count($arr) > 0) {

Base.php (https://github.com/ewandor/horde.git) PHP · 315 lines

1 <?php

2 /**

3 * Base file class.

91 public function __sleep()

92 {

93 return array_diff(array_keys(get_object_vars($this)), array('_rep'));

94 }

95

PhpClass.php (https://github.com/agelang/zf2.git) PHP · 562 lines

30 * @uses \Zend\CodeGenerator\Php\Exception

31 * @uses \Zend\CodeGenerator\Php\PhpMember\MemberContainer

32 * @uses \Zend\CodeGenerator\Php\PhpMethod

147 * setPhpFile()

148 *

149 * @param Zend\CodeGenerator\Php\PhpFile $phpFile

150 */

151 public function setPhpFile(PhpFile $phpFile)

331 * setProperty()

332 *

333 * @param array|\Zend\CodeGenerator\Php\PhpProperty $property

334 * @return \Zend\CodeGenerator\Php\PhpClass

558 $this->_properties = new PhpMember\MemberContainer(PhpMember\MemberContainer::TYPE_PROPERTY);

559 $this->_methods = new PhpMember\MemberContainer(PhpMember\MemberContainer::TYPE_METHOD);

560 }

561

view.php (https://github.com/shafiqissani/Jewelery-Ecommerce-.git) PHP · 150 lines

1 <?php

2 /**

3 * @version $Id: view.php 10707 2008-08-21 09:52:47Z eddieajau $

5 * @subpackage Cache

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

7 * @license GNU/GPL, see LICENSE.php

8 * Joomla! is free software. This version may have been modified pursuant

9 * to the GNU General Public License, and as distributed it includes or

10 * is derivative of works licensed under the GNU General Public License or

11 * other free or open source software licenses.

12 * See COPYRIGHT.php for copyright notices and details.

13 */

14

127

128 // Compare the second module buffer against the first buffer.

129 $cached['module'] = array_diff_assoc($buffer2['module'], $buffer1['module']);

130

131 // Store the cache data

ARC2_StoreTableManager.php (https://github.com/mterenzio/FollowThis.git) PHP · 290 lines

1 <?php

2 /**

3 * ARC2 RDF Store Table Manager

223 $old_ps = $this->getSetting('split_predicates', array());

224 $new_ps = $this->retrieveSplitPredicates();

225 $add_ps = array_diff($new_ps, $old_ps);

226 $del_ps = array_diff($old_ps, $new_ps);

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

1 <?php

2

3 declare(strict_types=1);

4

5 namespace Phpml\Association;

6

7 use Phpml\Helper\Predictable;

234 foreach ($samples as $p) {

235 foreach ($samples as $q) {

236 if (count(array_merge(array_diff($p, $q), array_diff($q, $p))) != 2) {

237 continue;

238 }

341 private function equals(array $set1, array $set2) : bool

342 {

343 return array_diff($set1, $set2) == array_diff($set2, $set1);

344 }

345 }

ArrayHelper.php (https://github.com/hanfer2/Talentos.git) PHP · 162 lines

1 <?php

2

3 if (!function_exists('array_combine')) {

29 */

30 function is_assoc($array) {

31 return (is_array($array) && (0 !== count(array_diff_key($array, array_keys(array_keys($array)))) || count($array) == 0));

32 }

33

115 }

116

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

118

119 function array_diff_key() {

Abstract.php (https://github.com/maintainable/framework.git) PHP · 197 lines

1 <?php

2 /**

3 * Copyright 2007 Maintainable Software, LLC

7 * @author Derek DeVries <derek@maintainable.com>

8 * @author Chuck Hagenbuch <chuck@horde.org>

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

10 * @category Horde

11 * @package Horde_Db

17 * @author Derek DeVries <derek@maintainable.com>

18 * @author Chuck Hagenbuch <chuck@horde.org>

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

20 * @category Horde

21 * @package Horde_Db

157 // check required config keys are present

158 $required = array('adapter', 'username');

159 $diff = array_diff_key(array_flip($required), $this->_config);

160 if (! empty($diff)) {

161 $msg = 'Required config missing: ' . implode(', ', array_keys($diff));

tag.php (https://github.com/zcopley/gallery3.git) PHP · 141 lines

1 <?php defined("SYSPATH") or die("No direct script access.");

2 /**

3 * Gallery - a web based photo album viewer and editor

80

81 if (isset($this->object_relations["items"])) {

82 $added = array_diff($this->changed_relations["items"], $this->object_relations["items"]);

83 $removed = array_diff($this->object_relations["items"], $this->changed_relations["items"]);

128 /**

129 * Return the server-relative url to this item, eg:

130 * /gallery3/index.php/tags/35

131 *

132 * @param string $query the query string (eg "page=3")

Migrator.php (https://gitlab.com/MineYourMind/BoNeMEAL) PHP · 411 lines

1 <?php namespace Illuminate\Database\Migrations;

2

3 use Illuminate\Filesystem\Filesystem;

76 $ran = $this->repository->getRan();

77

78 $migrations = array_diff($files, $ran);

79

80 $this->requireFiles($path, $migrations);

242 public function getMigrationFiles($path)

243 {

244 $files = $this->files->glob($path.'/*_*.php');

245

246 // Once we have the array of files in the directory we will just remove the

251 $files = array_map(function($file)

252 {

253 return str_replace('.php', '', basename($file));

254

255 }, $files);

Class.php (https://github.com/kervin/kyzstudio.git) PHP · 513 lines

34 * @see Zend_CodeGenerator_Php_Method

35 */

36 #require_once 'Zend/CodeGenerator/Php/Method.php';

37

38 /**

39 * @see Zend_CodeGenerator_Php_Property

40 */

41 #require_once 'Zend/CodeGenerator/Php/Property.php';

42

43 /**

44 * @see Zend_CodeGenerator_Php_Docblock

45 */

46 #require_once 'Zend/CodeGenerator/Php/Docblock.php';

47

48 /**

160 #require_once 'Zend/CodeGenerator/Php/Exception.php';

161 throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');

162 }

163

TreeWalkerChain.php (https://github.com/jaikdean/doctrine2.git) PHP · 542 lines

1 <?php

2

3 declare(strict_types=1);

5 namespace Doctrine\ORM\Query;

6

7 use function array_diff;

8 use function array_keys;

9

46 $requiredKeys = ['metadata', 'parent', 'relation', 'map', 'nestingLevel', 'token'];

47

48 if (array_diff($requiredKeys, array_keys($queryComponent))) {

49 throw QueryException::invalidQueryComponent($dqlAlias);

50 }

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

1 <?php

2 /**

3 * @package WPSEO\Admin

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

159 * This happens when Sitemaps or OpenGraph implementations toggle active/disabled.

160 */

161 $inactive_sections = array_diff( $all_plugin_sections, $sections );

162 if ( ! empty( $inactive_sections ) ) {

163 foreach ( $inactive_sections as $section ) {

173 // If there are active plugins, filter them from being cleared.

174 if ( isset( $this->active_plugins[ $section ] ) ) {

175 $inactive_plugins = array_diff( $this->plugins[ $section ], $this->active_plugins[ $section ] );

176 }

177

TSqlMapStatement.php (https://bitbucket.org/volatileeight/prado.git) PHP · 444 lines

1 <?php

2 /**

3 * TSqlMapStatement, TSqlMapInsert, TSqlMapUpdate, TSqlMapDelete,

88 * If a {@link ParameterMap setParameterMap()} property is not specified,

89 * you may specify a ParameterClass instead and use inline parameters.

90 * The value of the parameterClass attribute can be any existing PHP class name.

91 * @param string parameter class name.

92 */

125 * If a {@link ResultMap setResultMap()} is not specified, you may specify a

126 * ResultClass instead. The value of the ResultClass property can be the

127 * name of a PHP class or primitives like integer, string, or array. The

128 * class specified will be automatically mapped to the columns in the

129 * result, based on the result metadata.

184

185 /**

186 * @return string name of a PHP class that implements ArrayAccess.

187 */

188 public function getListClass()

Class.php (https://github.com/tanduy/zf.git) PHP · 513 lines

29 * @see Zend_CodeGenerator_Php_Member_Container

30 */

31 require_once 'Zend/CodeGenerator/Php/Member/Container.php';

32

33 /**

34 * @see Zend_CodeGenerator_Php_Method

35 */

36 require_once 'Zend/CodeGenerator/Php/Method.php';

37

38 /**

39 * @see Zend_CodeGenerator_Php_Property

40 */

41 require_once 'Zend/CodeGenerator/Php/Property.php';

42

43 /**

159 } elseif (!$docblock instanceof Zend_CodeGenerator_Php_Docblock) {

160 require_once 'Zend/CodeGenerator/Php/Exception.php';

161 throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');

PlantController.php (https://github.com/karthikprashanth/mayalabs.git) PHP · 236 lines

1 <?php

2

3 class PlantController extends Zend_Controller_Action {

109 $this->view->plantId = $plantId;

110 $content = array_merge($form->partPlant1->getValues(), $form->partPlant2->getValues(), $form->partPlant3->getValues());

111 if (count(array_diff($content, $plantDet)) > 0) {

112 $nf = new Model_DbTable_Notification();

113 $nf->add($plantId, 'plant', 0);

OptionsResolver.php (https://github.com/r1pp3rj4ck/symfony.git) PHP · 352 lines

1 <?php

2

3 /*

247 private function validateOptionsExistence(array $options)

248 {

249 $diff = array_diff_key($options, $this->knownOptions);

250

251 if (count($diff) > 0) {

271 private function validateOptionsCompleteness(array $options)

272 {

273 $diff = array_diff_key($this->requiredOptions, $options);

274

275 if (count($diff) > 0) {

view.php (https://bitbucket.org/stager94/skmz-joomla.git) PHP · 150 lines

1 <?php

2 /**

3 * @version $Id: view.php 14401 2010-01-26 14:10:00Z louis $

5 * @subpackage Cache

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

7 * @license GNU/GPL, see LICENSE.php

8 * Joomla! is free software. This version may have been modified pursuant

9 * to the GNU General Public License, and as distributed it includes or

10 * is derivative of works licensed under the GNU General Public License or

11 * other free or open source software licenses.

12 * See COPYRIGHT.php for copyright notices and details.

13 */

14

127

128 // Compare the second module buffer against the first buffer.

129 $cached['module'] = array_diff_assoc($buffer2['module'], $buffer1['module']);

130

131 // Store the cache data

sfValidatorBase.class.php (https://github.com/vvstadnyk/googlemap.git) PHP · 498 lines

1 <?php

2

3 /*

17 * @subpackage validator

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

19 * @version SVN: $Id: sfValidatorBase.class.php 32653 2011-06-15 18:32:02Z fabien $

20 */

21 abstract class sfValidatorBase

63

64 // check option names

65 if ($diff = array_diff($optionKeys, array_merge($currentOptionKeys, $this->requiredOptions)))

66 {

67 throw new InvalidArgumentException(sprintf('%s does not support the following options: \'%s\'.', get_class($this), implode('\', \'', $diff)));

69

70 // check error code names

71 if ($diff = array_diff(array_keys($messages), array_keys($this->messages)))

72 {

73 throw new InvalidArgumentException(sprintf('%s does not support the following error codes: \'%s\'.', get_class($this), implode('\', \'', $diff)));

Chain.php (https://gitlab.com/ebrjose/comcebu) PHP · 412 lines

1 <?php

2

3 namespace WPForms\Helpers;

13 * @method Chain array_combine()

14 * @method Chain array_count_values()

15 * @method Chain array_diff_assoc()

16 * @method Chain array_diff_key()

17 * @method Chain array_diff_uassoc()

18 * @method Chain array_diff_ukey()

19 * @method Chain array_diff(array $var)

20 * @method Chain array_fill_keys()

21 * @method Chain array_fill()

296 'array_combine',

297 'array_count_values',

298 'array_diff_assoc',

299 'array_diff_key',

YamlFileLoader.php (https://github.com/deviantintegral/symfony.git) PHP · 223 lines

1 <?php

2

3 /*

193 throw new \InvalidArgumentException(sprintf('The definition of "%s" in "%s" must be a YAML array.', $name, $path));

194 }

195 if ($extraKeys = array_diff(array_keys($config), self::$availableKeys)) {

196 throw new \InvalidArgumentException(sprintf(

197 'The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".',

BaseaMediaCategoryForm.class.php (https://github.com/arturolinares/asandbox.git) PHP · 160 lines

1 <?php

2

3 /**

9 * @subpackage form

10 * @author Your name here

11 * @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $

12 */

13 abstract class BaseaMediaCategoryForm extends BaseFormDoctrine

107 }

108

109 $unlink = array_diff($existing, $values);

110 if (count($unlink))

111 {

113 }

114

115 $link = array_diff($values, $existing);

116 if (count($link))

117 {

database.php (https://github.com/dionyziz/blogcube.git) PHP · 258 lines

1 <?php

2 /*

3 Module: Database stabilization

4 File: /modules/stabilize/database.php

5 Developers: dionyziz, feedWARd

6 */

215

216 //drop tables

217 $todrop = array_diff($stable_table_names,$beta_table_names);

218 $curquery = "";

219 foreach($todrop as $ctablename) {

227

228 //create tables

229 $tocreate = array_diff($beta_table_names,$stable_table_names);

230 foreach($tocreate as $ctablename) {

231 $curtable = New BCDbTable($ctablename,$beta_database);

Alias.php (https://gitlab.com/ElvisAns/tiki) PHP · 221 lines

1 <?php

2

3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project

106 // Remove from list

107 $list = $tikilib->get_preference('pluginaliaslist', [], true);

108 $list = array_diff($list, [ $name ]);

109 $tikilib->set_preference('pluginaliaslist', serialize($list));

110

menu.php (https://gitlab.com/wildanoo/E-procurement) PHP · 105 lines

1 <?php

2 defined('BASEPATH') OR exit('No direct script access allowed');

3

92 if(in_array($idgroup,$existgroup)){

93 $idgroup = array($idgroup);

94 $delgroup = array_diff($existgroup,$idgroup);

95 $delgroup = implode(',',$delgroup);

96 $delgroup = array('groups'=>$delgroup);

102 }

103

104 /* End of file menu.php */

105 /* Location: ./application/controllers/menu.php */

PermissibleAco.php (https://github.com/kiang/olc_baker.git) PHP · 313 lines

1 <?php

2

3 /**

262 $app_cont = get_class_methods($app_cont);

263 foreach ($controllers[1] as $file) {

264 if (substr($file, -14) === 'Controller.php') {

265 $cont = Inflector::camelize(substr($file, 0, -4));

266 $controllerName = substr($cont, 0, -10);

270 if (App::import('Controller', $controllerName)) {

271 $cont_clas = new $cont();

272 $methods = array_diff(get_class_methods($cont_clas), $app_cont);

273 foreach ($methods as $key => $method) {

274 if (substr($method, 0, 1) === '_') {

290 $plug_cont = get_class_methods($plug_cont);

291 foreach ($controllers[1] as $file) {

292 if (substr($file, -14) === 'Controller.php') {

293 $cont = Inflector::camelize(substr($file, 0, -4));

294 if (App::import('Controller', $plugin . '.' . substr($cont, 0, -10))) {

MemcachedOptions.php (https://github.com/christeredvartsen/zf2.git) PHP · 300 lines

220 * @param array $libOptions

221 * @return MemcachedOptions

222 * @link http://php.net/manual/memcached.constants.php

223 */

224 public function setLibOptions(array $libOptions)

242 * @param mixed $value

243 * @return MemcachedOptions

244 * @link http://php.net/manual/memcached.constants.php

245 */

246 public function setLibOption($key, $value)

257 *

258 * @return array

259 * @link http://php.net/manual/memcached.constants.php

260 */

261 public function getLibOptions()

Mapper.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 407 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

11

12 /**

13 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)

14 */

15 class Mapper

106 * @throws \InvalidArgumentException

107 * @throws StateException

108 * @SuppressWarnings(PHPMD.CyclomaticComplexity)

109 */

110 private function mapQuery($queryName)

295 {

296 $allElements = array_keys($elements);

297 $notUsedElements = implode(', ', array_diff($allElements, $mappedElements));

298 if (!empty($notUsedElements)) {

299 throw new StateException(new Phrase($errorMessage, [$notUsedElements]));

DatabaseBatchRepository.php (https://gitlab.com/jjpa2018/dashboard) PHP · 347 lines

1 <?php

2

3 namespace Illuminate\Bus;

142 'pending_jobs' => $batch->pending_jobs - 1,

143 'failed_jobs' => $batch->failed_jobs,

144 'failed_job_ids' => json_encode(array_values(array_diff(json_decode($batch->failed_job_ids, true), [$jobId]))),

145 ];

146 });

array.idl.php (https://github.com/diegoIta/hiphop-php.git) PHP · 376 lines

1 <?php

2

3 include_once 'base.php';

227 ///////////////////////////////////////////////////////////////////////////////

228

229 f('array_diff', Variant,

230 array('array1' => Variant,

231 'array2' => Variant),

238 VariableArguments);

239

240 f('array_diff_assoc', Variant,

241 array('array1' => Variant,

242 'array2' => Variant),

243 VariableArguments | FunctionIsFoldable);

244

245 f('array_diff_uassoc', Variant,

246 array('array1' => Variant,

247 'array2' => Variant,

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

1 <?php

2 /**

3 * File containing the eZURLAliasFilter class.

10

11 /*!

12 \class eZURLAliasQuery ezurlaliasquery.php

13 \brief Handles querying of URL aliases with different filters

14

29

30 /*!

31 \todo The hasAttribute, attribute and setAttribute functions can be turned into properties for PHP 5.

32 */

33 class eZURLAliasQuery

103 {

104 return in_array( $name,

105 array_diff( get_object_vars( $this ),

106 array( 'query' ) ) );

107 }

RemoteAddress.php (https://gitlab.com/jalon/doadoronline) PHP · 172 lines

1 <?php

2 /**

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

8 */

9

10 namespace Zend\Http\PhpEnvironment;

11

12 /**

135 $ips = array_map('trim', $ips);

136 // remove trusted proxy IPs

137 $ips = array_diff($ips, $this->trustedProxies);

138

139 // Any left?

indexable-repository.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 432 lines

1 <?php

2 /**

3 * Yoast extension of the Model class.

336 }

337

338 $indexables_to_create = \array_diff( $object_ids, $indexables_available );

339

340 foreach ( $indexables_to_create as $indexable_to_create ) {

Migrator.php (https://gitlab.com/judielsm/Handora) PHP · 405 lines

1 <?php

2

3 namespace Illuminate\Database\Migrations;

79 $ran = $this->repository->getRan();

80

81 $migrations = array_diff($files, $ran);

82

83 $this->requireFiles($path, $migrations);

237 public function getMigrationFiles($path)

238 {

239 $files = $this->files->glob($path.'/*_*.php');

240

241 // Once we have the array of files in the directory we will just remove the

247

248 $files = array_map(function ($file) {

249 return str_replace('.php', '', basename($file));

250

251 }, $files);

ConfigurationSettings.php (https://github.com/wiki-data/wiki-data.git) PHP · 408 lines

1 <?php

2 if ( !defined( 'MEDIAWIKI' ) ) die();

3

42 wfProfileIn( __METHOD__ );

43

44 require( dirname( __FILE__ ) . '/Settings-core.php' );

45 $this->settings = $settings;

46 $this->arrayDefs = $arrayDefs;

240 }

241 }

242 $wgConfigureNotEditableSettings = array_diff( $coreSettings, $wgConfigureEditableSettings );

243 }

244

Profile.php (https://github.com/chaikk/core.git) PHP · 124 lines

1 <?php

2 // vim: set ts=4 sw=4 sts=4 et:

3

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

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

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

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

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

20 * @author Creative Development LLC <info@cdev.ru>

21 * @copyright Copyright (c) 2011 Creative Development LLC <info@cdev.ru>. All rights reserved

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

23 * @link http://www.litecommerce.com/

24 * @see ____file_see____

111

112 // Get roles to add

113 $rolesToAdd = array_diff($newDrupalRoles, $processedRoles);

114

115 // Create new roles

Symbol.php (https://github.com/Nerutiz/trades.git) PHP · 252 lines

1 <?php

2

3 class Symbol {

247 $second = is_array($this->second) ? ('[' . implode(', ', $this->second) . ']') : $this->second;

248 $third = is_array($this->third) ? ('[' . implode(', ', $this->third) . ']') : $this->third;

249 $out = array_diff(array($this->id, $first, $second, $third), array(NULL));

250 return '(' . implode(' ', $out) . ')';

251 }

class-ss-wc-widget-layered-nav-filters.php (https://gitlab.com/aristath/shoestrap-3-woocommerce-child) PHP · 103 lines

1 <?php

2 /**

3 * Layered Navigation Fitlers Widget

73 $current_filter = ! empty( $_GET[ 'filter_' . $taxonomy_filter ] ) ? $_GET[ 'filter_' . $taxonomy_filter ] : '';

74 $new_filter = array_map( 'absint', explode( ',', $current_filter ) );

75 $new_filter = array_diff( $new_filter, array( $term_id ) );

76

77 $link = remove_query_arg( 'filter_' . $taxonomy_filter );

class-data-settings.php (https://gitlab.com/chernushov881/charity-fund) PHP · 354 lines

1 <?php

2 /**

3 * The Data Settings class.

326

327 if ( in_array( $current_filter, Default_Filter_Settings::ASSOCIATIVE_FILTERS, true ) ) {

328 $extra_filters = array_diff_key( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) );

329 $this->add_associative_filter_setting( $current_filter, $extra_filters );

330 return static::$data_settings[ $current_filter ];

331 }

332

333 $extra_filters = array_diff( $filtered_values, $this->get_default_setting_for_filter( $current_filter ) );

334 $this->add_indexed_filter_setting( $current_filter, $extra_filters );

335 return static::$data_settings[ $current_filter ];

Builder.php (https://github.com/Smile-SA/elasticsuite.git) PHP · 275 lines

1 <?php

2 /**

3 * DISCLAIMER

29 /**

30 * ElasticSuite search requests builder.

31 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)

32 *

33 * @category Smile

149 $facets = array_merge($facets, $containerAggs);

150 $facetFilters = array_intersect_key($filters, $facets);

151 $queryFilters = array_merge($queryFilters, $containerFilters, array_diff_key($filters, $facetFilters));

152

153 $spellingType = SpellcheckerInterface::SPELLING_TYPE_EXACT;

default_mods.php (https://github.com/harriswong/ATutor.git) PHP · 202 lines

1 <?php

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

3 /* ATutor */

14

15 define('AT_INCLUDE_PATH', '../../../../include/');

16 require (AT_INCLUDE_PATH.'vitals.inc.php');

17 admin_authenticate(AT_ADMIN_PRIV_ADMIN);

18

19 if (isset($_POST['cancel'])) {

20 $msg->addFeedback('CANCELLED');

21 header('Location: courses.php');

22 exit;

23 }

153

154 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');

155 header('Location: '.$_SERVER['PHP_SELF']);

156 exit;

157 }

EntityAttribute.php (https://github.com/sunel/eav.git) PHP · 295 lines

1 <?php

2

3 namespace Eav;

144 )->all();

145

146 $detach = array_diff($current, array_keys(

147 $records = $instance->formatRecordsList($ids)

148 ));

class.wp-dependencies.php (https://gitlab.com/morganestes/wordpress-develop) PHP · 411 lines

1 <?php

2 /**

3 * Dependencies API: WP_Dependencies base class

166 if ( ! isset( $this->registered[ $handle ] ) ) {

167 $keep_going = false; // Item doesn't exist.

168 } elseif ( $this->registered[ $handle ]->deps && array_diff( $this->registered[ $handle ]->deps, array_keys( $this->registered ) ) ) {

169 $keep_going = false; // Item requires dependencies that don't exist.

170 } elseif ( $this->registered[ $handle ]->deps && ! $this->all_deps( $this->registered[ $handle ]->deps, true, $new_group ) ) {

image-widget.php (https://github.com/livinglab/openlab.git) PHP · 223 lines

1 <?php

2 /**

3 * Migration from Jetpack's Image Widget to WordPress' Core Image Widget.

73 // Not all widgets have conditions, so lets add it in.

74 $widget_copy = array_merge( array( 'conditions' => null ), $widget );

75 $non_allowed_keys = array_diff_key(

76 $widget_copy,

77 array(

106

107 // Unsetting old widget fields

108 $media_image[ $id ] = array_diff_key( $media_image[ $id ], array(

109 'align' => false,

110 'alt_text' => false,

218 function jetpack_refresh_on_widget_page( $current ) {

219 if ( 'widgets' === $current->base ) {

220 wp_safe_redirect( admin_url( 'widgets.php' ) );

221 exit;

222 }

fine.php (https://bitbucket.org/dmcnerney/hockey-registration-system.git) PHP · 194 lines

1 <?php

2 //----------------------------------------------------------------------

3 class Model_Fine extends \Orm\Model

156

157 $fines = array();

158 foreach (array_diff($fixtureIds, $matchcardFixtures) as $fixtureId) {

159 $fixture = Model_Fixture::get($fixtureId);

160

class-wcs-privacy-background-updater.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 222 lines

1 <?php

2 /**

3 * Privacy Background Updater.

122

123 // Get the ended_statuses and removes pending-cancel.

124 $subscription_ended_statuses = array_diff( wcs_get_subscription_ended_statuses(), array( 'pending-cancel' ) );

125

126 $subscriptions = wcs_get_subscriptions( array(

RouteCollection.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 314 lines

1 <?php

2

3 namespace Illuminate\Routing;

170 protected function checkForAlternateVerbs($request)

171 {

172 $methods = array_diff(Router::$verbs, [$request->getMethod()]);

173

174 // Here we will spin through all verbs except for the current request verb and

Tags.php (https://github.com/jaws-project/jaws.git) PHP · 434 lines

1 <?php

2 /**

3 * Tags Gadget Admin

41 }

42

43 $to_be_added_tags = array_diff($tags, $oldTags);

44 $res = $this->InsertReferenceTags(

45 $gadget, $action, $reference, $published,

50 }

51

52 $to_be_removed_tags = array_diff($oldTags, $tags);

53 $res = $this->DeleteReferenceTags($gadget, $action, $reference, $to_be_removed_tags, $user);

54 if (Jaws_Error::IsError($res)) {

class.wp-scripts.php (https://bitbucket.org/akeda/bmw-id-hris.git) PHP · 244 lines

1 <?php

2 /**

3 * BackPress Scripts enqueue.

92

93 if ( false === $group && in_array($handle, $this->in_footer, true) )

94 $this->in_footer = array_diff( $this->in_footer, (array) $handle );

95

96 if ( null === $this->registered[$handle]->ver )

133 $src = add_query_arg('ver', $ver, $src);

134

135 /** This filter is documented in wp-includes/class.wp-scripts.php */

136 $src = esc_url( apply_filters( 'script_loader_src', $src, $handle ) );

137

php-array.el (https://gitlab.com/_njdm/emacs.d) Emacs Lisp · 718 lines

20

21 ;; Arrays handling functions

22 ;; http://php.net/manual/en/ref.array.php

23 ;; file:///usr/share/doc/php-doc/html/ref.array.html

64 )

65

66 (define-skeleton php-array_diff_assoc

67 "Insert an array_diff_assoc statement. Computes the difference of arrays with additional index check"

74 )

75

76 (define-skeleton php-array_diff_key

77 "Insert an array_diff_key statement. Computes the difference of arrays using keys for comparison"

85

86

87 (define-skeleton php-array_diff_uassoc

88 "Insert an array_diff_uassoc statement."

RedisSessionHandler.php (https://gitlab.com/nmhieucoder/laravel_tintuc) PHP · 132 lines

1 <?php

2

3 /*

18 /**

19 * Redis based session storage handler based on the Redis class

20 * provided by the PHP redis extension.

21 *

22 * @author Dalibor Karlović <dalibor@flexolabs.io>

58 }

59

60 if ($diff = array_diff(array_keys($options), ['prefix', 'ttl'])) {

61 throw new \InvalidArgumentException(sprintf('The following options are not supported "%s".', implode(', ', $diff)));

62 }

Util.php (https://gitlab.com/jeann2015/secret) PHP · 291 lines

1 <?php

2

3 namespace League\Flysystem;

187 }

188

189 $directories = array_diff(array_unique($directories), array_unique($listedDirectories));

190

191 foreach ($directories as $directory) {

Class.php (https://github.com/massiveart/ZF-ZOOLU.git) PHP · 513 lines

34 * @see Zend_CodeGenerator_Php_Method

35 */

36 require_once 'Zend/CodeGenerator/Php/Method.php';

37

38 /**

39 * @see Zend_CodeGenerator_Php_Property

40 */

41 require_once 'Zend/CodeGenerator/Php/Property.php';

42

43 /**

44 * @see Zend_CodeGenerator_Php_Docblock

45 */

46 require_once 'Zend/CodeGenerator/Php/Docblock.php';

47

48 /**

160 require_once 'Zend/CodeGenerator/Php/Exception.php';

161 throw new Zend_CodeGenerator_Php_Exception('setDocblock() is expecting either a string, array or an instance of Zend_CodeGenerator_Php_Docblock');

162 }

163

prefreport.php (https://gitlab.com/ElvisAns/tiki) PHP · 218 lines

1 <?php

2

3 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project

8

9 // Usage: From the command line:

10 // php doc/devtools/prefreport.php > prefreport.csv

11 //

12 // also check out doc/devtools/securitycheck.php to see in which files are

14 //

15

16 require_once 'tiki-setup.php';

17 $prefslib = TikiLib::lib('prefs');

18

81 $data = [];

82

83 foreach (glob('lib/prefs/*.php') as $file) {

84 $name = substr(basename($file), 0, -4);

85 $function = "prefs_{$name}_list";

Part.php (https://github.com/leerbag/zf2.git) PHP · 215 lines

1 <?php

2 /**

3 * Zend Framework

186

187 $uri = $this->route->assemble($params, $options);

188 $params = array_diff_key($params, array_flip($this->route->getAssembledParams()));

189

190 if (!isset($options['name'])) {

MediaField.php (https://github.com/fastslack/joomla-cms.git) PHP · 273 lines

1 <?php

2 /**

3 * Joomla! Content Management System

245 {

246 $this->folder = explode('/', $this->value);

247 $this->folder = array_diff_assoc($this->folder, explode('/', ComponentHelper::getParams('com_media')->get('image_path', 'images')));

248 array_pop($this->folder);

249 $this->folder = implode('/', $this->folder);

WorkspaceAssociation.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 249 lines

1 <?php

2

3 namespace Drupal\workspaces;

90 // Insert a new index entry for each workspace that is not tracking this

91 // entity yet.

92 $missing_workspaces = array_diff($affected_workspaces, $this->getEntityTrackingWorkspaceIds($entity));

93 if ($missing_workspaces) {

94 $insert_query = $this->database->insert(static::TABLE)

ProductRepository.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 354 lines

1 <?php

2 declare( strict_types=1 );

3

194

195 // don't include variable products in query

196 $args['type'] = array_diff( ProductSyncer::get_supported_product_types(), [ 'variable' ] );

197

198 // only include published products

258 public function find_mc_not_synced_product_ids( int $limit = -1, int $offset = 0 ): array {

259 $types = ProductSyncer::get_supported_product_types();

260 $types = array_diff( $types, [ 'variation' ] );

261 $args = [

262 'status' => 'publish',

285 public function find_all_synced_google_ids(): array {

286 // Don't include variable parent products as they aren't actually synced to Merchant Center.

287 $args['type'] = array_diff( ProductSyncer::get_supported_product_types(), [ 'variable' ] );

288 $synced_product_ids = $this->find_synced_product_ids( $args );

289 $google_ids_meta_key = $this->prefix_meta_key( ProductMetaHandler::KEY_GOOGLE_IDS );

manager.php (https://github.com/phpbb/phpbb.git) PHP · 332 lines

4 * This file is part of the phpBB Forum Software package.

5 *

6 * @copyright (c) phpBB Limited <https://www.phpbb.com>

7 * @license GNU General Public License, version 2 (GPL-2.0)

8 *

12 */

13

14 namespace phpbb\composer;

15

16 use Composer\IO\IOInterface;

34

35 /**

36 * @var string Type of packages (phpbb-packages per example)

37 */

38 protected $package_type;

markitup.php (https://github.com/sams/cakephp-markitup.git) PHP · 158 lines

1 <?php

2 class MarkitupHelper extends AppHelper {

3 public $helpers = array('Core.Html', 'Core.Form', 'Core.Javascript');

31 $settings = $config['settings'];

32 $default = $config['default'];

33 $textarea = array_diff_key($settings, $default);

34 $textarea = array_merge($textarea, array('type' => 'textarea'));

35 $id = '#' . parent::domId($name);

ezurlaliasquery.php (https://github.com/zerustech/ezpublish.git) PHP · 334 lines

1 <?php

2 /**

3 * File containing the eZURLAliasFilter class.

10

11 /*!

12 \class eZURLAliasQuery ezurlaliasquery.php

13 \brief Handles querying of URL aliases with different filters

14

29

30 /*!

31 \todo The hasAttribute, attribute and setAttribute functions can be turned into properties for PHP 5.

32 */

33 class eZURLAliasQuery

261 }

262 }

263 $actionTypes = array_values( array_diff( $actionTypes, $this->actionTypesEx ) );

264 }

265 if ( $actionTypes !== null )

array_tools.php (https://github.com/jtrick/ACE.git) PHP · 105 lines

1 <?php // Copyright (c) 2003-2009 Jeff Trickett, all rights reserved. License agreement available at http://jefftrickett.com/license/?Id=Tools

2

3

21 if ($FirstArray && $NextArray) {

22 if (is_array($FirstArray) && is_array($NextArray)) {

23 $DiffArray = array_diff($FirstArray, $NextArray);

24 if (count($DiffArray) < 1) { return 1; }

25 }

38

39

40 // The following were taken directly from a php.net posting:

41 function is_assoc($array) { return is_array($array) && count($array) !== array_reduce(array_keys($array), 'is_assoc_callback', 0); }

42 function is_assoc_callback($a, $b) { return $a === $b ? $a + 1 : 0; }

45 // Breaks a string in csv format into an array of subarrays. $Delimiter defaults to "\t", $RefArray are the column headings to be used to separate the subarrays, if desired. $StringDelimeter will chop string quotes for array strings if (!= -1). $KeepEmptyRows will retain empty rows rather than dropping them.

46 function CsvToArray($String, $Delimiter="\t", $KeyArray=0, $StringDelimeter=0, $KeepEmptyRows=0) {

47 //echo "<p>array_tools.php CsvToArray() \$String: |{$String}|</p>\n";

48 if (!$StringDelimeter) { $StringDelimeter = '"'; } // Fix?

49 $RowArray = StringRowArray($String);