100+ results for 'php array_keys'

Not the results you expected?

TermsController.php (https://github.com/fahad19/croogo.git) PHP · 379 lines

1 <?php

2 /**

3 * Terms Controller

4 *

5 * PHP version 5

6 *

7 * @category Controller

9 * @version 1.0

10 * @author Fahad Ibnay Heylaal <contact@fahad19.com>

11 * @license http://www.opensource.org/licenses/mit-license.php The MIT License

12 * @link http://www.croogo.org

13 */

75 $terms = $this->Term->find('all', array(

76 'conditions' => array(

77 'Term.id' => array_keys($termsTree),

78 ),

79 ));

Api.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 349 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) 2012 X.commerce, Inc. (http://www.magentocommerce.com)

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

25 */

26

275 public function types()

276 {

277 return array_keys($this->_typeMap);

278 }

279

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

1 <?php

2

3 /**

6 * @since 0.1

7 *

8 * @file SurveyDBClass.php

9 * @ingroup Survey

10 *

163 public static function select( $fields = null, array $conditions = array(), array $options = array() ) {

164 if ( is_null( $fields ) ) {

165 $fields = array_keys( static::getFieldTypes() );

166 }

167

364 */

365 public static function getFieldNames() {

366 return array_keys( static::getFieldTypes() );

367 }

368

CartShippingRateSchema.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 354 lines

1 <?php

2 namespace Automattic\WooCommerce\Blocks\StoreApi\Schemas;

3

341

342 return array_reduce(

343 array_keys( $meta_data ),

344 function( $return, $key ) use ( $meta_data ) {

345 $return[] = [

Arr.php (https://gitlab.com/leon0399/damnit-engine) PHP · 475 lines

1 <?php

2

3 namespace Illuminate\Support;

81 public static function divide($array)

82 {

83 return [array_keys($array), array_values($array)];

84 }

85

282 public static function isAssoc(array $array)

283 {

284 $keys = array_keys($array);

285

286 return array_keys($keys) !== $keys;

RuntimeDefinition.php (https://gitlab.com/jalon/doadoronline) PHP · 353 lines

1 <?php

2 /**

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

99 public function getClasses()

100 {

101 return array_keys($this->classes);

102 }

103

SchemaStructure_3_2_beta4.php (https://github.com/timstephenson/NatureBridge.git) PHP · 279 lines

1 <?php

2 /*

3 +--------------------------------------------------------------------+

273 static $result = null;

274 if (!$result) {

275 $result = array_keys(self::columns());

276 }

277 return $result;

PgCacheFlush.php (https://bitbucket.org/adatux_/uakami.git) PHP · 440 lines

1 <?php

2

3 /**

5 */

6

7 require_once W3TC_LIB_W3_DIR . '/PgCache.php';

8

9 /**

12 class W3_PgCacheFlush extends W3_PgCache {

13 /**

14 * PHP5 Constructor

15 */

16 function __construct() {

19

20 /**

21 * PHP4 Constructor

22 */

23 function W3_PgCacheFlush() {

CakeMigrationTest.php (https://github.com/kiang/olc_baker.git) PHP · 450 lines

1 <?php

2 App::import('Model', 'Migrations.CakeMigration', false);

3

391 $this->assertEqual($result['afterAction'], $expected);

392 $this->assertEqual($result['beforeAction'], $expected);

393 $this->assertEqual(array_keys($result), array('beforeMigration', 'beforeAction', 'afterAction', 'afterMigration'));

394

395 $this->assertTrue($migration->run('down'));

405 $this->assertEqual($result['afterAction'], $expected);

406 $this->assertEqual($result['beforeAction'], $expected);

407 $this->assertEqual(array_keys($result), array('beforeMigration', 'beforeAction', 'afterAction', 'afterMigration'));

408 }

409

AbstractSessionArrayStorage.php (https://github.com/SocalNick/zf2.git) PHP · 471 lines

1 <?php

2 /**

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

304 }

305 $array = $this->toArray();

306 $keys = array_keys($array);

307 $locks = array_flip($keys);

308 unset($array, $keys);

OfferRepository.php (https://gitlab.com/snips3/rfpr) PHP · 462 lines

1 <?php

2

3 namespace App\Domain\Product\Repository;

57 }

58

59 $products = $this->getProductsByIds(array_keys($offers));

60

61 foreach ($products as &$row) {

75 }

76

77 $products = $this->getProductsByIds(array_keys($offers));

78

79 foreach ($products as &$row) {

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

1 <?php

2

3 /*

210 $types = array();

211 $knownOptions = array();

212 $passedOptions = array_keys($options);

213 $optionValues = array();

214

233

234 $options = array_replace($defaultOptions, $options);

235 $knownOptions = array_merge($knownOptions, array_keys($defaultOptions));

236 array_unshift($types, $type);

237 $type = $type->getParent($options);

MessageBag.php (https://gitlab.com/Sigpot/AirSpot) PHP · 359 lines

1 <?php

2

3 namespace Illuminate\Support;

46 public function keys()

47 {

48 return array_keys($this->messages);

49 }

50

Drupal.php (https://github.com/ksecor/civicrm.git) PHP · 258 lines

1 <?php

2

3 /*

94 }

95

96 require_once 'CRM/ACL/API.php';

97

98 $ids = CRM_ACL_API::group( CRM_Core_Permission::VIEW, null, 'civicrm_saved_search', $groups );

139 $clauses = array( );

140 $groups = implode( ', ', self::$_editPermissionedGroups );

141 $clauses[] = ' ( civicrm_group_contact.group_id IN ( ' . implode( ', ', array_keys( self::$_editPermissionedGroups ) ) .

142 " ) AND civicrm_group_contact.status = 'Added' ) ";

143 $tables['civicrm_group_contact'] = 1;

145

146 // foreach group that is potentially a saved search, add the saved search clause

147 foreach ( array_keys( self::$_editPermissionedGroups ) as $id ) {

148 $group = new CRM_Contact_DAO_Group( );

149 $group->id = $id;

Namespace.php (https://github.com/daevid/MWFork.git) PHP · 312 lines

1 <?php

2 /**

3 * Provide things related to namespaces

9 * for dealing with namespaces that encodes all the

10 * "magic" behaviors of them based on index. The textual

11 * names of the namespaces are handled by Language.php.

12 *

13 * These are synonyms for the names given in the language file

28 * Throw an exception when trying to get the subject or talk page

29 * for a given namespace where it does not make sense.

30 * Special namespaces are defined in includes/define.php and have

31 * a value below 0 (ex: NS_SPECIAL = -1 , NS_MEDIA = -2)

32 *

204

205 if ( is_null( $mValidNamespaces ) ) {

206 foreach ( array_keys( self::getCanonicalNamespaces() ) as $ns ) {

207 if ( $ns >= 0 ) {

208 $mValidNamespaces[] = $ns;

FieldnameRelatedTest.php (https://github.com/apinstein/Propel2.git) PHP · 394 lines

1 <?php

2

3 /**

28 * @package misc

29 */

30 class FieldnameRelatedTest extends \PHPUnit_Framework_TestCase

31 {

32 protected function setUp()

34 parent::setUp();

35 set_include_path(get_include_path() . PATH_SEPARATOR . "fixtures/bookstore/build/classes");

36 require_once 'bookstore/map/BookTableMap.php';

37 require_once 'bookstore/BookPeer.php';

38 require_once 'bookstore/Book.php';

39 }

40

Properties.php (https://github.com/livinglab/openlab.git) PHP · 629 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Document;

4

5 class Properties

399 public function getCustomProperties()

400 {

401 return array_keys($this->customProperties);

402 }

403

485

486 /**

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

488 */

489 public function __clone()

unicode.php (https://github.com/MaBelleEcole/Main.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php 10381 2008-06-01 03:35:53Z pasamio $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

PropelTypes.php (https://github.com/coleHafner/coleandheather_dabl.git) PHP · 357 lines

326 * Convenience method to indicate whether a passed-in PHP type is a primitive.

327 *

328 * @param string $phpType The PHP type to check

329 * @return boolean Whether the PHP type is a primitive (string, int, boolean, float)

340 * @return boolean Whether the PHP type is a primitive (string, int, boolean, float)

341 */

342 public static function isPhpPrimitiveNumericType($phpType)

343 {

344 return in_array($phpType, array("boolean", "int", "double", "float"));

348 * Convenience method to indicate whether a passed-in PHP type is an object.

349 *

350 * @param string $phpType The PHP type to check

351 * @return boolean Whether the PHP type is a primitive (string, int, boolean, float)

353 public static function isPhpObjectType($phpType)

354 {

355 return (!self::isPhpPrimitiveType($phpType) && !in_array($phpType, array("resource", "array")));

356 }

357 }

Configuration.php (https://github.com/ad2joe/RosettaBundle.git) PHP · 400 lines

1 <?php

2

3 namespace BeSimple\RosettaBundle\DependencyInjection;

86 };

87

88 $this->defaultLoaders = array('xliff', 'yml', 'php', 'csv');

89 $this->defaultDumper = 'xliff';

90 $this->defaultTranslator = 'google';

378 ->beforeNormalization()

379 ->ifArray()->then(function($values) {

380 return range(0, count($values) - 1) === array_keys($values)

381 ? array('translations' => $values)

382 : $values;

PathProcessorTest.php (https://gitlab.com/reasonat/test8) PHP · 213 lines

1 <?php

2

3 namespace Drupal\Tests\Core\PathProcessor;

32 * The language manager stub used to construct a PathProcessorLanguage object.

33 *

34 * @var \Drupal\language\ConfigurableLanguageManagerInterface|\PHPUnit_Framework_MockObject_MockBuilder

35 */

36 protected $languageManager;

47

48 // Create a stub configuration.

49 $language_prefixes = array_keys($this->languages);

50 $config = array(

51 'url' => array(

Session.php (https://gitlab.com/OnBlox/OnBlox-Template) PHP · 546 lines

1 <?php

2 /**

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

80

81 if ($cntr->offsetExists($ns)) {

82 $keys = array_keys($cntr->offsetGet($ns));

83 } else {

84 $keys = array();

395 $ns = $this->getOptions()->getNamespace();

396 if (!$cntr->offsetExists($ns)) {

397 return array_keys($normalizedKeyValuePairs);

398 }

399

ComposerInformation.php (https://gitlab.com/svillegas/magento2) PHP · 379 lines

109 if ($this->isMagentoRoot()) {

110 $allPlatformReqs = $this->getLocker()->getPlatformRequirements(true);

111 $requiredPhpVersion = $allPlatformReqs['php']->getPrettyConstraint();

112 } else {

113 $packages = $this->getLocker()->getLockedRepository()->getPackages();

117 $packageName = $package->getPrettyName();

118 if ($packageName === 'magento/product-community-edition') {

119 $phpRequirementLink = $package->getRequires()['php'];

120 if ($phpRequirementLink instanceof Link) {

121 $requiredPhpVersion = $phpRequirementLink->getPrettyConstraint();

122 }

123 }

126 }

127

128 if (!isset($requiredPhpVersion)) {

129 throw new \Exception('Cannot find php version requirement in \'composer.lock\' file');

ModuleRegistryTest.php (https://github.com/TYPO3/TYPO3.CMS.git) PHP · 256 lines

1 <?php

2

3 declare(strict_types=1);

19

20 use Prophecy\Argument;

21 use Prophecy\PhpUnit\ProphecyTrait;

22 use Psr\EventDispatcher\EventDispatcherInterface;

23 use TYPO3\CMS\Backend\Module\ModuleFactory;

129

130 // Asser correct sorting (flat)

131 self::assertEquals(array_keys($modules), array_keys($registry->getModules()));

132

133 // Assert correct hierarchy

134 self::assertEquals(['b_a', 'b_b', 'b_c', 'b_d'], array_keys($registry->getModule('b')->getSubModules()));

135 self::assertEquals('b', $registry->getModule('b_a')->getParentIdentifier());

136 self::assertTrue($registry->getModule('b_a')->getParentModule()->hasSubModule('b_a'));

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

FieldnameRelatedTest.php (https://github.com/1989gaurav/Propel.git) PHP · 394 lines

1 <?php

2

3 /**

28 * @package misc

29 */

30 class FieldnameRelatedTest extends PHPUnit_Framework_TestCase

31 {

32 protected function setUp()

34 parent::setUp();

35 set_include_path(get_include_path() . PATH_SEPARATOR . "fixtures/bookstore/build/classes");

36 require_once 'bookstore/map/BookTableMap.php';

37 require_once 'bookstore/BookPeer.php';

38 require_once 'bookstore/Book.php';

39 }

40

Multi.php (https://github.com/Martin1982/IBMessagingWorkshopServer.git) PHP · 318 lines

1 <?php

2 /**

3 * Zend Framework

21

22 /** Zend_Form_Element_Xhtml */

23 // require_once 'Zend/Form/Element/Xhtml.php';

24

25 /**

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

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

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

34 */

35 abstract class Zend_Form_Element_Multi extends Zend_Form_Element_Xhtml

252 // optgroup instead of option label

253 if (is_array($opt_label)) {

254 $options = array_merge($options, array_keys($opt_label));

255 }

256 else {

YamlFileLoader.php (https://github.com/Faianca/symfony.git) PHP · 325 lines

1 <?php

2

3 /*

251 }

252

253 foreach (array_keys($content) as $namespace) {

254 if (in_array($namespace, array('imports', 'parameters', 'services'))) {

255 continue;

Drupal.php (https://github.com/michaelmcandrew/citylink.git) PHP · 258 lines

1 <?php

2

3 /*

94 }

95

96 require_once 'CRM/ACL/API.php';

97

98 $ids = CRM_ACL_API::group( CRM_Core_Permission::VIEW, null, 'civicrm_saved_search', $groups );

139 $clauses = array( );

140 $groups = implode( ', ', self::$_editPermissionedGroups );

141 $clauses[] = ' ( civicrm_group_contact.group_id IN ( ' . implode( ', ', array_keys( self::$_editPermissionedGroups ) ) .

142 " ) AND civicrm_group_contact.status = 'Added' ) ";

143 $tables['civicrm_group_contact'] = 1;

145

146 // foreach group that is potentially a saved search, add the saved search clause

147 foreach ( array_keys( self::$_editPermissionedGroups ) as $id ) {

148 $group =& new CRM_Contact_DAO_Group( );

149 $group->id = $id;

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

1 <?php

2

3 /*

119

120 // compile data

121 $retval = sprintf("<?php\n".

122 "// auto-generated by sfFilterConfigHandler\n".

123 "// date: %s\n%s\n%s\n\n", date('Y/m/d H:i:s'),

134 * @param array $parameters Filter default parameters

135 *

136 * @return string The PHP statement

137 */

138 protected function addFilter($category, $class, $parameters)

151 * @param array $parameters Filter default parameters

152 *

153 * @return string The PHP statement

154 */

155 protected function addSecurityFilter($category, $class, $parameters)

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

1 <?php

2 /**

3 * Zend Framework

15 * @category Zend

16 * @package Zend_Test

17 * @subpackage PHPUnit

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

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

20 * @version $Id: DbStatement.php 25024 2012-07-30 15:08:15Z rob $

21 */

22

24 * @see Zend_Db_Statement_Interface

25 */

26 require_once "Zend/Db/Statement/Interface.php";

27

28 /**

Multi.php (https://github.com/grandison/budo16.git) PHP · 318 lines

1 <?php

2 /**

3 * Zend Framework

21

22 /** Zend_Form_Element_Xhtml */

23 // require_once 'Zend/Form/Element/Xhtml.php';

24

25 /**

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

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

33 * @version $Id: Multi.php 16218 2009-06-21 19:44:04Z thomas $

34 */

35 abstract class Zend_Form_Element_Multi extends Zend_Form_Element_Xhtml

252 // optgroup instead of option label

253 if (is_array($opt_label)) {

254 $options = array_merge($options, array_keys($opt_label));

255 }

256 else {

unicode.php (https://github.com/pacoqueen/callao_chico.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php 16235 2010-04-20 04:13:25Z pasamio $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

Template.php (https://github.com/radicalsuz/amp.git) PHP · 294 lines

1 <?php

2

3 class AMP_Display_Template {

106 $replace_set[ $key ] = $this->_properties[ $token ];

107 }

108 $this->_output = str_replace( array_keys( $replace_set ), array_values( $replace_set ), $this->_template );

109 $this->_execute_renderers( );

110 $this->_execute_helpers( );

142

143 }

144 $this->_output = str_replace( array_keys( $render_requests ), array_values( $render_requests ), $this->_output );

145 }

146

230 $helper_output[ $token_key ] = $active_helper->$helper_method( $this->get_properties( ));

231 }

232 $this->_output = str_replace( array_keys( $helper_output ), array_values( $helper_output ), $this->_output );

233 }

234

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

1 <?php

2 /**

3 * @package ACFQuickEdit\Admin

296 return false;

297 }

298 return count( array_filter( array_keys( $arr ), 'is_string' ) ) > 0;

299 }

300

385

386 if ( $url ) {

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

388 }

389

EventListener.php (https://gitlab.com/Skull3x/MyPlot) PHP · 189 lines

1 <?php

2 namespace MyPlot;

3

47 ];

48 $config = new Config($filePath, Config::YAML, $default);

49 foreach (array_keys($default) as $key) {

50 $settings[$key] = $config->get($key);

51 }

Configuration.php (https://github.com/nattaphat/hgis.git) PHP · 159 lines

1 <?php

2

3 /*

88 ->ifTrue(function($v){

89 if (is_array($v)) {

90 $keys = array_keys($v);

91 sort($keys);

92

NamedSelector.php (https://bitbucket.org/galvani/flow-resque-board.git) PHP · 112 lines

1 <?php

2

3 namespace Behat\Mink\Selector;

98 'Unknown named selector provided: "%s". Expected one of (%s)',

99 $selector,

100 implode(', ', array_keys($this->selectors))

101 ));

102 }

Release.php (https://github.com/CloCkWeRX/Pyrus.git) PHP · 474 lines

1 <?php

2 /**

3 * \Pyrus\PackageFile\v2\Release

4 *

5 * PHP version 5

6 *

7 * @category Pyrus

8 * @package Pyrus

9 * @author Greg Beaver <cellog@php.net>

10 * @copyright 2010 The PEAR Group

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

19 *

20 * <code>

21 * // release is a PHP package

22 * $pf->type = 'php';

Repository.php (https://github.com/leerbag/zf2.git) PHP · 196 lines

1 <?php

2 /**

3 * Zend Framework

83 $prefix = trim($prefix, '\\') . '\\';

84 foreach (new \DirectoryIterator($directory) as $directoryItem) {

85 if ($directoryItem->isDot() || (substr($directoryItem->getFilename(), -4) !== '.php')) {

86 continue;

87 }

117 $isOverwritable = !($context instanceof System\NotOverwritable);

118

119 $index = (count($this->_contexts)) ? max(array_keys($this->_contexts)) + 1 : 1;

120

121 $normalName = $this->_normalizeName($context->getName());

unicode.php (https://github.com/powercoders/punbb.git) PHP · 269 lines

1 <?php

2 /**

3 * @version $Id: unicode.php,v 1.2 2006/02/26 13:20:44 harryf Exp $

8 * Portions created by the Initial Developer are Copyright (C) 1998

9 * the Initial Developer. All Rights Reserved.

10 * Ported to PHP by Henri Sivonen (http://hsivonen.iki.fi)

11 * Slight modifications to fit with phputf8 library by Harry Fuecks (hfuecks gmail com)

12 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUTF8ToUnicode.cpp

13 * @see http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsUnicodeToUTF8.cpp

14 * @see http://hsivonen.iki.fi/php-utf8/

15 * @package utf8

16 * @subpackage unicode

24 * are not allowed.

25 * Returns false if the input string isn't a valid UTF-8 octet sequence

26 * and raises a PHP error at level E_USER_WARNING

27 * Note: this function has been modified slightly in this library to

28 * trigger errors on encountering bad bytes

ConnectionManagerTest.php (https://github.com/shama/cakephp.git) PHP · 350 lines

1 <?php

2 /**

3 * Connection Manager tests

4 *

5 * PHP 5

6 *

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.Model

15 * @since CakePHP(tm) v 1.2.0.5550

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

17 */

18 namespace Cake\Test\TestCase\Model;

soft_delete.php (https://github.com/sc0ttyd/utils.git) PHP · 330 lines

1 <?php

2 /**

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

7 *

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

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

10 */

11

76 if ($runtime) {

77 $query['conditions'] = ife(is_array($query['conditions']), $query['conditions'], array());

78 $conditions = array_filter(array_keys($query['conditions']));

79

80 $fields = $this->_normalizeFields($model);

136 $model->create();

137 $model->set($model->primaryKey, $id);

138 return $model->save(array($model->alias => $data), false, array_keys($data));

139 }

140

axTableHelper.class.php (https://github.com/bdelespierre/php-axiom.git) PHP · 197 lines

1 <?php

2 /**

3 * @brief Table helper class file

4 * @file axTableHelper.class.php

5 */

6

61 public function setColumnNames (array $columns, $filter = true) {

62 if ($filter)

63 $this->body->setFilter(array_keys($columns));

64 return $this->setHead(array($columns));

65 }

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));

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

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

208 protected function getCleanChangesArray($changes)

209 {

210 $changesArrayKeys = array_keys($changes);

211 foreach ($changesArrayKeys as $changesKey) {

212 if ($changesKey != 'state' && $changesKey != 'active' && $changesKey != 'setup_version') {

301 }

302

303 $arrayModuleNames = array_keys($configModules);

304 $uninstalledModuleChanges = $this->setUninstalledModuleChanges($dbModuleArray, $arrayModuleNames);

305 if (is_array($uninstalledModuleChanges)) {

social-media-icons.php (https://gitlab.com/Gashler/sg) PHP · 207 lines

129 <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:', 'jetpack' ); ?></label>

130 <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />

131 </p>

132 <p>

145 <label for="<?php echo esc_attr( $this->get_field_id( 'pinterest_username' ) ); ?>"><?php _e( 'Pinterest username:', 'jetpack' ); ?></label>

146 <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'pinterest_username' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'pinterest_username' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['pinterest_username'] ); ?>" />

147 </p>

148 <p>

153 <label for="<?php echo esc_attr( $this->get_field_id( 'github_username' ) ); ?>"><?php _e( 'GitHub username:', 'jetpack' ); ?></label>

154 <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'github_username' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'github_username' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['github_username'] ); ?>" />

155 </p>

156 <p>

161 <label for="<?php echo esc_attr( $this->get_field_id( 'vimeo_username' ) ); ?>"><?php _e( 'Vimeo username:', 'jetpack' ); ?></label>

162 <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'vimeo_username' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'vimeo_username' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['vimeo_username'] ); ?>" />

163 </p>

164 <?php

test.php (https://gitlab.com/LisovyiEvhenii/ismextensions) PHP · 305 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_Sales

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 include "lib/Varien/Object.php";

50 $frontendStatus = $this->getFrontendStatus();

51 $actions = $this->getOrderActions();

52 $actions = join(', ', array_keys($actions));

53 #echo "<tr><td>$orderStatus</td><td>$paymentStatus</td><td>$shippingStatus</td><td>$refundStatus</td><td>$returnStatus</td><td>$adminStatus</td><td>$frontendStatus</td><td>$actions</td></tr>";

54 echo "<tr><td>$orderStatus</td><td>$paymentStatus</td><td>$refundStatus</td><td>$shippingStatus</td><td>$actions</td></tr>";

Serializer.php (https://bitbucket.org/pcelta/zf2.git) PHP · 313 lines

1 <?php

2 /**

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

208 $storage = $event->getTarget();

209 $params = $event->getParams();

210 $keyValuePairs = $storage->getItems(array_keys($params['keyValuePairs']));

211 foreach ($params['keyValuePairs'] as $key => & $value) {

212 if (isset($keyValuePairs[$key])) {

262 $storage = $event->getTarget();

263 $params = $event->getParams();

264 $keyValuePairs = $storage->getItems(array_keys($params['keyValuePairs']));

265 foreach ($params['keyValuePairs'] as $key => &$value) {

266 if (isset($keyValuePairs[$key])) {

BaseContacts.class.php (https://gitlab.com/x33n/ProjectPier-Core) PHP · 260 lines

1 <?php

2

3

64 */

65 function getColumns() {

66 return array_keys(self::$columns);

67 } // getColumns

68

Element.php (https://gitlab.com/reasonat/test8) PHP · 202 lines

1 <?php

2

3 namespace Drupal\Core\Render;

38 */

39 public static function properties(array $element) {

40 return array_filter(array_keys($element), 'static::property');

41 }

42

115 }

116

117 return array_keys($child_weights);

118 }

119

141 }

142

143 return array_keys($visible_children);

144 }

145

FieldnameRelatedTest.php (https://github.com/esimionato/Propel2.git) PHP · 394 lines

1 <?php

2

3 /**

28 * @package misc

29 */

30 class FieldnameRelatedTest extends \PHPUnit_Framework_TestCase

31 {

32 protected function setUp()

34 parent::setUp();

35 set_include_path(get_include_path() . PATH_SEPARATOR . "fixtures/bookstore/build/classes");

36 require_once 'bookstore/map/BookTableMap.php';

37 require_once 'bookstore/BookPeer.php';

38 require_once 'bookstore/Book.php';

39 }

40

ArrayObject.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 432 lines

1 <?php

2 /**

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

65 $this->storage = $input;

66 $this->setIteratorClass($iteratorClass);

67 $this->protectedProperties = array_keys(get_object_vars($this));

68 }

69

406 {

407 $ar = unserialize($data);

408 $this->protectedProperties = array_keys(get_object_vars($this));

409

410 $this->setFlags($ar['flag']);

payment_address.php (https://bitbucket.org/allanxyh/uniquemall.git) PHP · 245 lines

1 <?php

2 class ControllerCheckoutPaymentAddress extends Controller {

3 public function index() {

128 if (empty($this->request->post['address_id'])) {

129 $json['error']['warning'] = $this->language->get('error_address');

130 } elseif (!in_array($this->request->post['address_id'], array_keys($this->model_account_address->getAddresses()))) {

131 $json['error']['warning'] = $this->language->get('error_address');

132 } else {

Message.php (https://gitlab.com/ramos.lauty/softlord) PHP · 304 lines

1 <?php

2 /**

3 * Slim Framework (http://slimframework.com)

4 *

5 * @link https://github.com/slimphp/Slim

6 * @copyright Copyright (c) 2011-2016 Josh Lockhart

7 * @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)

19 * the HTTP request and response, as defined in the PSR-7 MessageInterface.

20 *

21 * @link https://github.com/php-fig/http-message/blob/master/src/MessageInterface.php

22 * @see Slim\Http\Request

23 * @see Slim\Http\Response

101 throw new InvalidArgumentException(

102 'Invalid HTTP version. Must be one of: '

103 . implode(', ', array_keys(self::$validProtocolVersions))

104 );

105 }

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

1 <?php

2

3 namespace Drupal\rest\Entity;

158 if (isset($dependencies['module'])) {

159 // Try to fix dependencies.

160 $removed_auth = array_keys(array_intersect($this->authProviders, $dependencies['module']));

161 $removed_formats = array_keys(array_intersect($this->formatProviders, $dependencies['module']));

164 // Try to fix dependency problems by removing affected

165 // authentication providers and formats.

166 foreach (array_keys($rest_config->get('configuration')) as $request_method) {

167 foreach ($removed_formats as $format) {

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

224 if (isset($dependencies['module'])) {

225 // Try to fix dependencies.

226 $removed_auth = array_keys(array_intersect($this->authProviders, $dependencies['module']));

227 $removed_formats = array_keys(array_intersect($this->formatProviders, $dependencies['module']));

InMemory.php (https://github.com/justjohn/foundry-core.git) PHP · 258 lines

1 <?php

2 /**

3 * In-memory Authentication Service Implementation

11 * @author John Roepke <john@justjohn.us>

12 * @copyright 2010-2011 John Roepke

13 * @license http://phpfoundry.com/license/bsd New BSD license

14 * @version 1.0.0

15 */

23 * @author John Roepke <john@justjohn.us>

24 * @copyright 2010-2011 John Roepke

25 * @license http://phpfoundry.com/license/bsd New BSD license

26 * @since 1.0.0

27 */

160 $group_names = array();

161 if (!empty($this->groups)) {

162 foreach (array_keys($this->groups) as $groupname) {

163 $group_names[$groupname] = $groupname;

164 }

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

1 <?php

2

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

17

18

19 require_once '../../../config.php';

20 require_once $CFG->dirroot.'/grade/lib.php';

21 require_once $CFG->libdir.'/gradelib.php';

22

23 $courseid = required_param('id', PARAM_INT);

41

42 if ($courseused = get_records('grade_outcomes_courses', 'courseid', $courseid, '', 'outcomeid')) {

43 $courseused = array_keys($courseused);

44 } else {

45 $courseused = array();

SimpleHeaderSet.php (https://gitlab.com/ealexis.t/trends) PHP · 397 lines

1 <?php

2

3 /*

219 }

220

221 return array_keys($headers);

222 }

223

MessageCatalogue.php (https://github.com/Faianca/symfony.git) PHP · 224 lines

1 <?php

2

3 /*

60 public function getDomains()

61 {

62 return array_keys($this->messages);

63 }

64

Layout.php (https://github.com/pimcore/pimcore.git) PHP · 481 lines

1 <?php

2

3 /**

464 }

465

466 return array_keys($vars);

467 }

468

475 $obj->setValues($data);

476

477 $obj->childs = $obj->children; // @phpstan-ignore-line

478

479 return $obj;

users_DeleteReassign.php (https://bitbucket.org/ferOnti/processmaker.git) PHP · 165 lines

1 <?php

2 /**

3 * cases_ReassignByUser.php

73 $c ++;

74 $oTemplatePower->newBlock( 'cases' );

75 $aKeys = array_keys( $aRow );

76 foreach ($aKeys as $sKey) {

77 $oTemplatePower->assign( $sKey, $aRow[$sKey] );

113 $c ++;

114 $oTemplatePower->newBlock( 'cases' );

115 $aKeys = array_keys( $aRow );

116 foreach ($aKeys as $sKey) {

117 $oTemplatePower->assign( $sKey, $aRow[$sKey] );

Group.php (https://github.com/llamadigital/Shanty-Mongo.git) PHP · 220 lines

1 <?php

2

3 require_once 'Shanty/Mongo/Connection.php';

4 require_once 'Shanty/Mongo/Connection/Stack.php';

5

6 /**

59 if (array_key_exists('master', $connectionOptions)) $masters[] = $connectionOptions['master']; // single master

60 elseif (array_key_exists('masters', $connectionOptions)) {

61 $connectionKeys = array_filter(array_keys($connectionOptions['masters']), 'is_numeric');

62 $masters = array_intersect_key($connectionOptions['masters'], array_flip($connectionKeys)); // only connections

63 $masterStackOptions = array_diff_key($connectionOptions['masters'], array_flip($connectionKeys)); // only options

71 if (array_key_exists('slave', $connectionOptions)) $slaves[] = $connectionOptions['slave']; // single slave

72 elseif (array_key_exists('slaves', $connectionOptions)) {

73 $connectionKeys = array_filter(array_keys($connectionOptions['slaves']), 'is_numeric');

74 $slaves = array_intersect_key($connectionOptions['slaves'], array_flip($connectionKeys)); // only connections

75 $slaveStackOptions = array_diff_key($connectionOptions['slaves'], array_flip($connectionKeys)); // only options

TraceableEventDispatcherTest.php (https://bitbucket.org/larryg/powerhut.git) PHP · 241 lines

1 <?php

2

3 /*

24 use Symfony\Component\Stopwatch\Stopwatch;

25

26 class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase

27 {

28 protected function setUp()

183 'kernel.terminate',

184 'kernel.terminate.loading',

185 ), array_keys($events));

186 }

187

class.wpcom-json-api-comment-endpoint.php (https://gitlab.com/juanito.abelo/nlmobile) PHP · 198 lines

1 <?php

2

3

111 $response = array();

112

113 foreach ( array_keys( $this->comment_object_format ) as $key ) {

114 switch ( $key ) {

115 case 'ID' :

NumericRanks.php (https://gitlab.com/Skull3x/Small-ZC-Plugins) PHP · 243 lines

1 <?php

2

3 namespace NumericRanks;

158 $ranks = [];

159

160 foreach(array_keys($this->getConfig()->getNested("ranks")) as $rankName){

161 $ranks[] = new Rank($this, $rankName);

162 }

CookieJar.php (https://gitlab.com/xolotsoft/pumasruiz) PHP · 265 lines

1 <?php

2

3 /*

107 // an empty domain means any domain

108 // this should never happen but it allows for a better BC

109 $domains = array_keys($this->cookieJar);

110 } else {

111 $domains = array($domain);

SoftDeleteBehavior.php (https://github.com/sams/utils.git) PHP · 334 lines

1 <?php

2 /**

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

7 *

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

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

10 */

11 App::uses('ModelBehavior', 'Model');

78 $query['conditions'] = array();

79 }

80 $conditions = array_filter(array_keys($query['conditions']));

81

82 $fields = $this->_normalizeFields($model);

138 $model->create();

139 $model->set($model->primaryKey, $id);

140 return $model->save(array($model->alias => $data), false, array_keys($data));

141 }

142

upd.pages.php (https://bitbucket.org/mbaily/tremain.git) PHP · 214 lines

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

2

3 /**

185 foreach ($old_layout as $tab => &$fields)

186 {

187 $field_keys = array_keys($fields);

188

189 foreach ($field_keys as &$key)

211 // END CLASS

212

213 /* End of file upd.pages.php */

214 /* Location: ./system/expressionengine/modules/pages/upd.pages.php */

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) {

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

1 <?php

2

3 abstract class BaseReminders extends DataManager {

37 */

38 function getColumns() {

39 return array_keys(self::$columns);

40 } // getColumns

41

Attribute.php (https://github.com/cgmartin/zf2.git) PHP · 372 lines

1 <?php

2 /**

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

167 $resultArray = $data[$attribName];

168 foreach ($valArray as $rv) {

169 $keys = array_keys($resultArray, $rv);

170 foreach ($keys as $k) {

171 unset($resultArray[$k]);

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 */

28 */

29 public function getKeys() {

30 return array_keys( $this->values );

31 }

32

Form.class.php (https://github.com/bassta/onphp-framework.git) PHP · 498 lines

1 <?php

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

3 * Copyright (C) 2004-2009 by Konstantin V. Arkhipov, Anton E. Lebedevich *

16 * @ingroup Module

17 *

18 * @see http://onphp.org/examples.Form.en.html

19 **/

20 final class Form extends RegulatedForm

190 $list = array();

191

192 foreach (array_keys($this->labels) as $name) {

193 if ($label = $this->getTextualErrorFor($name))

194 $list[] = $label;

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

1 <?php

2 /**

3 * Magento Enterprise Edition

59 'website_id'

60 ))

61 ->where('wrapping_id IN (?)', array_keys($this->_items));

62 $websites = $this->getConnection()->fetchAll($select);

63 foreach ($this->_items as $item) {

Form.php (https://bitbucket.org/wl-framework-dev/weblab-framework.git) PHP · 403 lines

1 <?php

2 /**

3 * Form.php

166 */

167 public function getFormId(){

168 $fields = array_keys( $this->_fields );

169 $fields = implode( ',', $fields );

170

MailBlocker.php (https://gitlab.com/gideonmarked/wellmarketing) PHP · 269 lines

1 <?php namespace RainLab\User\Models;

2

3 use Form;

200 }

201

202 $emails = array_keys($email);

203

204 return static::where(function($q) use ($template) {

QueryParser.php (https://github.com/Basti-sama/Bengine.git) PHP · 355 lines

1 <?php

2 /**

3 * Query parser. Processes queries for SQL access.

7 * @copyright Copyright (c) 2009, Sebastian Noll

8 * @license Proprietary

9 * @version $Id: QueryParser.php 46 2011-07-30 14:38:11Z secretchampion $

10 */

11

40 public function insert($table, array $spec)

41 {

42 $attributes = array_keys($spec);

43 $attributes = $this->setBackQuotes($attributes);

44 $values = array_fill(0, count($spec), "?");

ProcessedCodeCoverageData.php (https://gitlab.com/madwanz64/laravel) PHP · 255 lines

1 <?php declare(strict_types=1);

2 /*

3 * This file is part of phpunit/php-code-coverage.

4 *

5 * (c) Sebastian Bergmann <sebastian@phpunit.de>

11

12 use function array_key_exists;

13 use function array_keys;

14 use function array_merge;

15 use function array_unique;

20

21 /**

22 * @internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage

23 */

24 final class ProcessedCodeCoverageData

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

1 <?php

2 namespace Aurora\Routing;

3

82 * Find a route by name.

83 *

84 * The returned array will be identical the array defined in the routes.php file.

85 *

86 * @param string $name

237 // regex equivalent, sans the ")?" ending. We will add the endings

238 // back on after we know how many replacements we made.

239 $key = str_replace(array_keys($this->optional), array_values($this->optional), $key, $count);

240

241 $key .= ($count > 0) ? str_repeat(')?', $count) : '';

242

243 return str_replace(array_keys($this->patterns), array_values($this->patterns), $key);

244 }

245

Required.php (https://github.com/bobpp/ethna.git) PHP · 132 lines

1 <?php

2 // vim: foldmethod=marker

3 /**

4 * Required.php

5 *

6 * @author ICHII Takashi <ichii386@schweetheart.jp>

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

8 * @package Ethna

9 * @version $Id: a23d6eb526d5ddd41bc70fb505e1b8869204a332 $

73 $valid_keys = array();

74 if ($var != null) {

75 foreach (array_keys($var) as $key) {

76 if ($this->isEmpty($var[$key], $this->getFormType($name)) == false) {

77 $valid_keys[] = $key;

ConnectionManager.php (https://bitbucket.org/koronios/cakephp.git) PHP · 273 lines

1 <?php

2 /**

3 * Datasource connection manager

4 *

5 * Provides an interface for loading and enumerating connections defined in app/Config/database.php

6 *

7 * PHP 5

8 *

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

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

11 *

15 *

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

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

18 * @package Cake.Model

19 * @since CakePHP(tm) v 0.10.x.1402

Collection.php (https://github.com/sirprize/basecamp.git) PHP · 324 lines

1 <?php

2

3 /*

4 * This file is part of the Basecamp Classic API Wrapper for PHP 5.3+ package

5 *

6 * (c) Christian Hoegl <chrigu@sirprize.me>

62 $exists = false;

63

64 foreach(array_keys($this->_observers) as $key)

65 {

66 if($observer === $this->_observers[$key])

86 public function detachObserver(Abstrakt $observer)

87 {

88 foreach(array_keys($this->_observers) as $key)

89 {

90 if($observer === $this->_observers[$key])

AbstractModel.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 427 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

10 /**

11 * Abstract model for catalog entities

12 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)

13 * @author Magento Core Team <core@magentocommerce.com>

14 */

142 public function getLockedAttributes()

143 {

144 return array_keys($this->_lockedAttributes);

145 }

146

349 * @param string $attributeCode

350 * @return bool

351 * @SuppressWarnings(PHPMD.BooleanGetMethodName)

352 *

353 * @deprecated

AddSummaryRow.test.php (https://github.com/quarkness/piwik.git) PHP · 150 lines

1 <?php

2 if(!defined('PIWIK_CONFIG_TEST_INCLUDED'))

3 {

4 require_once dirname(__FILE__)."/../../../../tests/config_test.php";

5 }

6 require_once 'DataTable.php';

26 $this->assertTrue(Piwik_DataTable_Row::isEqual($table->getLastRow(), $expectedRow));

27 // check that column 'label' is forced to be first in summary row

28 $this->assertEqual(array_keys($table->getLastRow()->getColumns()), array_keys($expectedRow->getColumns()));

29 }

30

http.php (https://github.com/muskmelon/Greemo.git) PHP · 224 lines

1 <?php

2 /**

3 * Simple and uniform HTTP request API.

210

211 // If we have a numeric $capabilities array, spoof a wp_remote_request() associative $args array

212 if ( $count && count( array_filter( array_keys( $capabilities ), 'is_numeric' ) ) == $count ) {

213 $capabilities = array_combine( array_values( $capabilities ), array_fill( 0, $count, true ) );

214 }

215

216 if ( $url && !isset( $capabilities['ssl'] ) ) {

217 $scheme = parse_url( $url, PHP_URL_SCHEME );

218 if ( 'https' == $scheme || 'ssl' == $scheme ) {

219 $capabilities['ssl'] = true;

MockDocumentSource.php (https://github.com/kiranatama/sagalaya.git) PHP · 155 lines

1 <?php

2 /**

3 * Lithium: the most rad php framework

4 *

5 * @copyright Copyright 2012, Union of RAD (http://union-of-rad.org)

6 * @license http://opensource.org/licenses/bsd-license.php The BSD License

7 */

8

117

118 if (is_array($value)) {

119 $arrayType = !$isObject && (array_keys($value) === range(0, count($value) - 1));

120 $opts = $arrayType ? array('class' => 'array') + $options : $options;

121 $value = $this->item($model, $value, compact('pathKey') + $opts);

Serializer.php (https://github.com/jtai/zf2.git) PHP · 352 lines

1 <?php

2 /**

3 * Zend Framework

261 $cache = $event->getTarget();

262 $params = $event->getParams();

263 $keyValuePairs = $cache->getItems(array_keys($params['keyValuePairs']), $params['options']);

264 foreach ($params['keyValuePairs'] as $key => &$value) {

265 if (isset($keyValuePairs[$key])) {

309 $cache = $event->getTarget();

310 $params = $event->getParams();

311 $keyValuePairs = $cache->getItems(array_keys($params['keyValuePairs']), $params['options']);

312 foreach ($params['keyValuePairs'] as $key => &$value) {

313 if (isset($keyValuePairs[$key])) {

Checkbox.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 183 lines

1 <?php

2 /**

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

124 private function prepareMask()

125 {

126 $mask = implode("", array_keys($this->options)) . "\r\n";

127

128 /**

YamlDirectoryDiscovery.php (https://gitlab.com/reasonat/test8) PHP · 159 lines

1 <?php

2

3 namespace Drupal\Component\Discovery;

73

74 // Try to load from the file cache first.

75 foreach ($file_cache->getMultiple(array_keys($files)) as $file => $data) {

76 $all[$files[$file]][$this->getIdentifier($file, $data)] = $data;

77 unset($files[$file]);

panier.php (https://gitlab.com/thoussem/Tunisie-Shop) PHP · 315 lines

1

2 <?php

3

4

175 $suppression = false;

176

177 $aCleSuppr = array_keys($_SESSION['panier']['id_article'], $ref_article);

178

179 /* sortie la clé a été trouvée */

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

1 <?php

2

3 /*

53 public function keys()

54 {

55 return array_keys($this->parameters);

56 }

57

198 * @param mixed $options Filter options.

199 *

200 * @see http://php.net/manual/en/function.filter-var.php

201 *

202 * @return mixed

ConnectionManager.php (https://gitlab.com/grlopez90/servipro) PHP · 270 lines

1 <?php

2 /**

3 * Datasource connection manager

5 * Provides an interface for loading and enumerating connections defined in app/Config/database.php

6 *

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

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

9 *

13 *

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

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

16 * @package Cake.Model

17 * @since CakePHP(tm) v 0.10.x.1402

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

19 */

20

User.class.php (https://github.com/gwu-libraries/srrs-mobile.git) PHP · 385 lines

1 <?php

2 /**

3 * This file contains the User class for viewing

5 * @author Nick Korbel <lqqkout13@users.sourceforge.net>

6 * @version 01-28-07

7 * @package phpScheduleIt

8 *

9 * Copyright (C) 2003 - 2007 phpScheduleIt

13 $basedir = dirname(__FILE__) . '/..';

14

15 include_once($basedir . '/lib/db/UserDB.class.php');

16

17 class User {

161 }

162

163 return array_keys($this->groups);

164 }

165

Set.php (https://github.com/eexit/Smak.git) PHP · 362 lines

1 <?php

2

3 namespace Smak\Portfolio\tests\units;

8 use tests\units\Smak\Portfolio\Fs;

9

10 require_once __DIR__ . '/../../../../vendor/autoload.php';

11

12 class Set extends Fs\FsAdapter

287 $set_root = new \SplFileInfo($fs->getRoot() . DIRECTORY_SEPARATOR . 'Travels');

288 $set = $this->buildSet($adapter, $set_root);

289 $expected = array_keys($tree['Travels']);

290

291 $this->object($collection = $set->asCollection())

Call.php (https://bitbucket.org/mrajoelisolo/ci_twig.git) PHP · 178 lines

1 <?php

2

3 /*

166

167 if (!empty($parameters)) {

168 throw new Twig_Error_Syntax(sprintf('Unknown argument%s "%s" for %s "%s".', count($parameters) > 1 ? 's' : '' , implode('", "', array_keys($parameters)), $this->getAttribute('type'), $this->getAttribute('name')));

169 }

170

DbStatement.php (https://github.com/grandison/budo16.git) PHP · 381 lines

1 <?php

2 /**

3 * Zend Framework

15 * @category Zend

16 * @package Test

17 * @subpackage PHPUnit

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

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

20 * @version $Id: DbStatement.php 16911 2009-07-21 11:54:03Z matthew $

21 */

22

23 // require_once "Zend/Db/Statement/Interface.php";

24

25 /**

MigrationServiceProvider.php (https://gitlab.com/madwanz64/laravel) PHP · 225 lines

1 <?php

2

3 namespace Illuminate\Database;

102 protected function registerCommands(array $commands)

103 {

104 foreach (array_keys($commands) as $command) {

105 $this->{"register{$command}Command"}();

106 }

EntityDisplayFormBaseTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 147 lines

1 <?php

2

3 namespace Drupal\KernelTests\Core\Entity;

128

129 $form = [

130 '#fields' => array_keys($field_values),

131 '#extra' => [],

132 ];

ContentTranslationEntityBundleInfoTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 151 lines

1 <?php

2

3 namespace Drupal\Tests\content_translation\Kernel;

74 'content_translation',

75 ];

76 $actual_modules = array_keys(array_intersect_key($module_list, array_flip($expected_modules)));

77 $this->assertEquals($expected_modules, $actual_modules);

78

LanguageItem.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 156 lines

1 <?php

2

3 namespace Drupal\Core\Field\Plugin\Field\FieldType;

117 }

118 else {

119 $languages = array_keys(\Drupal::languageManager()->getLanguages(LanguageInterface::STATE_ALL));

120 }

121 $values['value'] = $languages[array_rand($languages)];

127 */

128 public function getPossibleValues(AccountInterface $account = NULL) {

129 return array_keys(\Drupal::languageManager()->getLanguages(LanguageInterface::STATE_ALL));

130 }

131

class.akismet-cli.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 185 lines

1 <?php

2

3 WP_CLI::add_command( 'akismet', 'Akismet_CLI' );

180 else {

181 $stats = $response_body['breakdown'];

182 WP_CLI\Utils\format_items( $assoc_args['format'], $stats, array_keys( end( $stats ) ) );

183 }

184 }

EntityTypedDataDefinitionTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 179 lines

1 <?php

2

3 namespace Drupal\KernelTests\Core\Entity;

57

58 // Derive metadata about field item properties.

59 $this->assertEquals(['value'], array_keys($field_item_definition->getPropertyDefinitions()));

60 $this->assertEquals('integer', $field_item_definition->getPropertyDefinition('value')->getDataType());

61 $this->assertEquals('value', $field_item_definition->getMainPropertyName());

64 // Test accessing field item property metadata via the field definition.

65 $this->assertInstanceOf(FieldDefinitionInterface::class, $field_definition);

66 $this->assertEquals(['value'], array_keys($field_definition->getPropertyDefinitions()));

67 $this->assertEquals('integer', $field_definition->getPropertyDefinition('value')->getDataType());

68 $this->assertEquals('value', $field_definition->getMainPropertyName());

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

1 <?php

2 /**

3 * Zend Framework

21

22 /** Zend_Dojo_Form_Element_Dijit */

23 require_once 'Zend/Dojo/Form/Element/Dijit.php';

24

25 /**

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

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

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

36 */

37 abstract class Zend_Dojo_Form_Element_DijitMulti extends Zend_Dojo_Form_Element_Dijit

268 'InArray',

269 true,

270 array( array_keys($options) )

271 );

272 }

SubscriptionPolicyForm.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 211 lines

1 <?php

2

3 /**

4 * @file SubscriptionPolicyForm.inc.php

5 *

6 * Copyright (c) 2003-2007 John Willinsky

12 * Form for managers to setup subscription policies.

13 *

14 * $Id: SubscriptionPolicyForm.inc.php,v 1.10 2007/09/19 00:04:36 asmecher Exp $

15 */

16

76

77 // If provided delayed open access duration is valid value

78 $this->addCheck(new FormValidatorInSet($this, 'delayedOpenAccessDuration', 'optional', 'manager.subscriptionPolicies.delayedOpenAccessDurationValid', array_keys($this->validDuration)));

79

80 // If provided expiry reminder months before value is valid value

ViewRenderer.php (https://github.com/grandison/budo16.git) PHP · 361 lines

1 <?php

2 /**

3 * SocialEngine

7 * @copyright Copyright 2006-2010 Webligo Developments

8 * @license http://www.socialengine.net/license/

9 * @version $Id: ViewRenderer.php 7244 2010-09-01 01:49:53Z john $

10 * @todo documentation

11 */

53

54 $path = $this->getViewScriptPathSpec();

55 $path = str_replace(array_keys($newVars), array_values($newVars), $path);

56 return $path;

57 }

bp-core-options.php (https://bitbucket.org/simplemediacode/bptrunk.git) PHP · 538 lines

1 <?php

2

3 /**

30

31 // Legacy bbPress config location

32 'bb-config-location' => ABSPATH . 'bb-config.php',

33

34 /** XProfile **********************************************************/

289 $root_blog_options['registration'] = '0';

290 $root_blog_options['avatar_default'] = 'mysteryman';

291 $root_blog_option_keys = array_keys( $root_blog_options );

292

293 // Do some magic to get all the root blog options in 1 swoop

307

308 $current_site = get_current_site();

309 $network_option_keys = array_keys( $network_options );

310 $sitemeta_options_keys = "'" . join( "', '", (array) $network_option_keys ) . "'";

311 $sitemeta_options_query = $wpdb->prepare( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ( {$sitemeta_options_keys} ) AND site_id = %d", $current_site->id );