100+ results for 'php array_values'

Not the results you expected?

CartItemRepositoryTest.php (https://gitlab.com/svillegas/magento2) PHP · 327 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

24

25 /**

26 * @magentoApiDataFixture Magento/Quote/_files/empty_quote.php

27 * @magentoApiDataFixture Magento/Downloadable/_files/product_downloadable.php

49

50 // use ID of the first downloadable link

51 $linkId = array_values($product->getDownloadableLinks())[0]->getId();

52

53 $requestData = [

80

81 /**

82 * @magentoApiDataFixture Magento/Quote/_files/empty_quote.php

83 * @magentoApiDataFixture Magento/Downloadable/_files/product_downloadable.php

local.php (https://gitlab.com/gabdark/aceit) PHP · 818 lines

1 <?php

2

3 if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

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

298

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

300

301 }

445 function get_field_groups() {

446

447 return array_values($this->groups);

448

449 }

TableHelper.php (https://bitbucket.org/nick_snyder/summer.git) PHP · 459 lines

1 <?php

2

3 /*

119 public function setHeaders(array $headers)

120 {

121 $this->headers = array_values($headers);

122

123 return $this;

142 public function addRow(array $row)

143 {

144 $this->rows[] = array_values($row);

145

146 return $this;

GH453Test.php (https://github.com/tecbot/mongodb-odm.git) PHP · 347 lines

1 <?php

2

3 declare(strict_types=1);

8 use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;

9 use Doctrine\ODM\MongoDB\Tests\BaseTest;

10 use function array_values;

11 use function get_class;

12 use function sprintf;

272 {

273 if ($bsonType === 4) {

274 $expectedValue = array_values((array) $expectedValue);

275 } elseif ($bsonType === 3) {

276 $expectedValue = (object) $expectedValue;

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

99 foreach ( array_values( $ids ) as $id ) {

100 $title = CRM_Core_DAO::getFieldValue( 'CRM_Contact_DAO_Group', $id, 'title' );

101 self::$_viewPermissionedGroups[$id] = $title;

104

105 $ids = CRM_ACL_API::group( CRM_Core_Permission::EDIT, null, 'civicrm_saved_search', $groups );

106 foreach ( array_values( $ids ) as $id ) {

107 $title = CRM_Core_DAO::getFieldValue( 'CRM_Contact_DAO_Group', $id, 'title' );

108 self::$_editPermissionedGroups[$id] = $title;

selector.php (https://gitlab.com/alexprowars/bitrix) PHP · 435 lines

1 <?php

2 /**

3 * Bitrix Framework

174 }

175

176 $result = array_values($result);

177 usort(

178 $result,

AbstractCache.php (https://gitlab.com/koodersmiikka/operaatio-terveys) PHP · 463 lines

1 <?php

2

3 namespace Concrete\Flysystem\Cache;

91 $this->autosave();

92

93 return array_values($contents);

94 }

95

object.php (https://github.com/raeldc/nooku-server.git) PHP · 327 lines

1 <?php

2 /**

3 * @version $Id$

189 }

190

191 $objects = array_values($this->_mixed_methods);

192

193 foreach($objects as $object)

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

EnumUtils.php (https://curly.svn.codeplex.com/svn) PHP · 289 lines

1 <?php

2 /**

3 * @package Curly

27 * in the $className param.

28 *

29 * The new enumeration name must obey the rules for class names of the PHP language.

30 * Member names of the new enumeration must obey the rules for method names of the PHP language.

94 } );

95

96 return array_values( $methods );

97 }

98

199 * Throws an exception if:

200 * the name is empty or

201 * the name does not obey the rules for method names of the PHP language or

202 * the name starts with more than one underscore character

203 *

lines.php (https://gitlab.com/VxMxPx/mysli) PHP · 463 lines

1 <?php

2

3 /**

422 }

423

424 $pool = array_values($pool);

425 }

426

registry.php (https://github.com/dextercowley/joomla-cms.git) PHP · 476 lines

1 <?php

2 /**

3 * @package Joomla.Platform

89 *

90 * @since 12.2

91 * @note The interface is only present in PHP 5.4 and up.

92 */

93 public function jsonSerialize()

344 * Finally, re-key the array so it is sequential.

345 */

346 $nodes = array_values(array_filter(explode('.', $path), 'strlen'));

347

348 if ($nodes)

class.base_collection.php (https://github.com/Canuckaholic/Pop-Digital.git) PHP · 369 lines

1 <?php

2

3 /**

95 }

96 if ( !empty($items) ) {

97 $items = array_values($items);

98 }

99 return $items;

Relation.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 349 lines

1 <?php

2

3 namespace Illuminate\Database\Eloquent\Relations;

186 protected function getKeys(array $models, $key = null)

187 {

188 return array_unique(array_values(array_map(function ($value) use ($key) {

189 return $key ? $value->getAttribute($key) : $value->getKey();

190

FormContextTest.php (https://github.com/LubosRemplik/cakephp.git) PHP · 306 lines

1 <?php

2 /**

3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)

4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

5 *

9 *

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

11 * @link https://cakephp.org CakePHP(tm) Project

12 * @since 3.0.0

13 * @license https://opensource.org/licenses/mit-license.php MIT License

268 ['should be an array, not a string'],

269 $context->error('key'),

270 'This test should not produce a PHP warning from array_values().'

271 );

272 }

OfertaActividad.php (https://gitlab.com/bluedrayco/Portafolio) PHP · 568 lines

1 <?php

2

3 namespace ControlEscolar\CalendarioBundle\Entity;

506 $controlAuxiliar = $this->control_acceso[$tipo];

507 unset($controlAuxiliar[$key]);

508 $this->control_acceso[$tipo] = array_values($controlAuxiliar);

509 }

510 return $this;

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

1 <?php

2

3 namespace Illuminate\Database\Eloquent\Relations;

179 }

180

181 return array_values(array_unique($keys));

182 }

183

InputDefinition.php (https://gitlab.com/techniconline/kmc) PHP · 453 lines

1 <?php

2

3 /*

159 }

160

161 $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments;

162

163 return $arguments[$name];

175 public function hasArgument($name)

176 {

177 $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments;

178

179 return isset($arguments[$name]);

199 public function getArgumentCount()

200 {

201 return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments);

202 }

203

QueueBaseTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 270 lines

1 <?php

2 /**

3 * Zend Framework

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: QueueBaseTest.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

30

31 /** Zend_Config */

32 require_once 'Zend/Config.php';

33

34 /** Zend_Queue */

35 require_once 'Zend/Queue.php';

36

37 /** Zend_Queue */

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

1 <?php

2

3 /**

173 if (count($unlink))

174 {

175 $this->object->unlink('Users', array_values($unlink));

176 }

177

179 if (count($link))

180 {

181 $this->object->link('Users', array_values($link));

182 }

183 }

211 if (count($unlink))

212 {

213 $this->object->unlink('Groups', array_values($unlink));

214 }

215

UndefinedConstraint.php (https://gitlab.com/imamul68e/137619_PHP31) PHP · 286 lines

1 <?php

2

3 /*

219 $matchedSchemas++;

220 }

221 $allErrors = array_merge($allErrors, array_values($this->getErrors()));

222 }

223 if ($matchedSchemas !== 1) {

ContainerAwareEventManagerTest.php (https://github.com/symfony/DoctrineBridge.git) PHP · 244 lines

1 <?php

2

3 /*

13

14 use Doctrine\Common\EventSubscriber;

15 use PHPUnit\Framework\TestCase;

16 use Symfony\Bridge\Doctrine\ContainerAwareEventManager;

17 use Symfony\Component\DependencyInjection\Container;

36 $this->container->set('sub2', $subscriber2 = new MySubscriber(['foo']));

37

38 $this->assertSame([$subscriber1, $listener1, $subscriber2], array_values($this->evm->getListeners('foo')));

39 }

40

169 $this->evm->addEventListener('foo', $listener2 = new MyListener());

170

171 $this->assertSame([$subscriber1, $listener1, $listener2], array_values($this->evm->getListeners('foo')));

172 }

173

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

1 <?php

2 require_once ($CFG->dirroot.'/course/moodleform_mod.php');

106 && ($options2 = get_records_menu('choice_options','choiceid', $this->_instance, 'id', 'id,maxanswers')) ) {

107 $choiceids=array_keys($options);

108 $options=array_values($options);

109 $options2=array_values($options2);

firebug.php (https://github.com/sseshachala/Open-Web-Analytics.git) PHP · 214 lines

1 <?php

2 /**

3 * $Header$

17 * @package Log

18 *

19 * @example firebug.php Using the firebug handler.

20 */

21 class Log_firebug extends Log

79 * @access public

80 */

81 function Log_firebug($name = '', $ident = 'PHP', $conf = array(),

82 $level = PEAR_LOG_DEBUG)

83 {

95 if (!empty($conf['lineFormat'])) {

96 $this->_lineFormat = str_replace(array_keys($this->_formatMap),

97 array_values($this->_formatMap),

98 $conf['lineFormat']);

99 }

Map.php (https://github.com/markn86/moodle.git) PHP · 242 lines

1 <?php

2 /**

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

222 return json_encode(array(

223 strval(new Horde_Imap_Client_Ids(array_keys($this->_ids))),

224 strval(new Horde_Imap_Client_Ids(array_values($this->_ids)))

225 ));

226 }

class-lp-quiz-factory.php (https://gitlab.com/gregtyka/lfmawordpress) PHP · 255 lines

1 <?php

2

3 class LP_Quiz_Factory {

221 $checked = $question->get_answers( $include, $exclude );

222 if ( $checked ) {

223 $checked = array_values( $checked );

224 }

225 } else {

Tabbed_View.php (https://github.com/livinglab/openlab.git) PHP · 381 lines

1 <?php

2

3

298 uasort( $this->items, [ $this, 'sort_by_priority' ] );

299

300 return array_values( $this->items );

301 }

302

377 */

378 public function get_default_template_path() {

379 return Tribe__Main::instance()->plugin_path . '/src/admin-views/tabbed-view/tabbed-view.php';

380 }

381 }

Class.php (https://github.com/ggunlugu/ornekler.git) PHP · 283 lines

1 <?php

2 /**

3 *

8 * @package Solar

9 *

10 * @author Paul M. Jones <pmjones@solarphp.com>

11 *

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

13 *

14 * @version $Id: Class.php 4370 2010-02-11 15:41:19Z pmjones $

15 *

16 */

92 * Converts a namespace-and-classname to a file path.

93 *

94 * Implements PSR-0 as defined by the PHP Project Interoperability Group.

95 *

96 * <http://groups.google.com/group/php-standards/web/final-proposal>

QueueBaseTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 270 lines

1 <?php

2 /**

3 * Zend Framework

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

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

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

21 */

22

30

31 /** Zend_Config */

32 require_once 'Zend/Config.php';

33

34 /** Zend_Queue */

35 require_once 'Zend/Queue.php';

36

37 /** Zend_Queue */

Relation.php (https://gitlab.com/haque.mdmanzurul/TripAdviosrScrapper) PHP · 348 lines

1 <?php

2

3 namespace Illuminate\Database\Eloquent\Relations;

186 protected function getKeys(array $models, $key = null)

187 {

188 return array_unique(array_values(array_map(function ($value) use ($key) {

189 return $key ? $value->getAttribute($key) : $value->getKey();

190 }, $models)));

FinderTest.php (https://github.com/Exercise/symfony.git) PHP · 333 lines

131 $finder = new Finder();

132 $this->assertSame($finder, $finder->ignoreVCS(false));

133 $this->assertIterator($this->toAbsolute(array('.git', 'foo', 'foo/bar.tmp', 'test.php', 'test.py', 'toto')), $finder->in(self::$tmpDir)->getIterator());

134

135 $finder = new Finder();

168 $finder = new Finder();

169 $this->assertSame($finder, $finder->sortByAccessedTime());

170 $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'toto', 'test.py', 'foo')), $finder->in(self::$tmpDir)->getIterator());

171 }

172

223 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();

224

225 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'bootstrap.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);

226 }

227

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

1 <?php

2

3 include_once 'base.php';

163 VariableArguments);

164

165 f('array_values', Variant,

166 array('input' => Variant), FunctionIsFoldable);

167

CaseExpression.php (https://github.com/LubosRemplik/cakephp.git) PHP · 249 lines

1 <?php

2 /**

3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)

4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

5 *

9 *

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

11 * @link https://cakephp.org CakePHP(tm) Project

12 * @since 3.0.0

13 * @license https://opensource.org/licenses/mit-license.php MIT License

113 protected function _addExpressions($conditions, $values, $types)

114 {

115 $rawValues = array_values($values);

116 $keyValues = array_keys($values);

117

session.php (https://gitlab.com/webkod3r/tripolis) PHP · 440 lines

1 <?php

2 /**

3 * Abstract class for managing user session tokens.

243 */

244 final public function get_all() {

245 return array_values( $this->get_sessions() );

246 }

247

SimpleHeaderSet.php (https://github.com/exponentcms/exponent-cms.git) PHP · 399 lines

1 <?php

2

3 /*

186 if (\func_num_args() < 2) {

187 if ($this->has($name)) {

188 $values = array_values($this->headers[$name]);

189

190 return array_shift($values);

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

1 <?php

2

3 /*

387 $attributes = array_merge($this->attributes, $attributes);

388

389 return implode('', array_map(array($this, 'attributesToHtmlCallback'), array_keys($attributes), array_values($attributes)));

390 }

391

Collection.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 255 lines

1 <?php

2

3 namespace Illuminate\Database\Eloquent;

124 }

125

126 return new static(array_values($dictionary));

127 }

128

181 }

182

183 return new static(array_values($this->getDictionary()));

184 }

185

194 $dictionary = Arr::only($this->getDictionary(), $keys);

195

196 return new static(array_values($dictionary));

197 }

198

DefinitionList.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 352 lines

1 <?php

2 /**

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

57 return array();

58 }

59 return array_combine(array_values($definitionClasses), array_fill(0, count($definitionClasses), $definition));

60 }

61

QueueBaseTest.php (https://github.com/devilsansclue/ZendFramework.git) PHP · 270 lines

1 <?php

2 /**

3 * Zend Framework

30

31 /** Zend_Config */

32 require_once 'Zend/Config.php';

33

34 /** Zend_Queue */

35 require_once 'Zend/Queue.php';

36

37 /** Zend_Queue */

38 require_once 'Zend/Queue/Message.php';

39

40 /** Zend_Queue_Adapter_Array */

CdnSettingsTest.php (https://gitlab.com/Drulenium-bot/cdn) PHP · 336 lines

1 <?php

2

3 namespace Drupal\Tests\cdn\Unit;

21 $this->assertTrue($cdn_settings->isEnabled());

22 $this->assertSame($expected_lookup_table, $cdn_settings->getLookupTable());

23 $this->assertSame(array_values($expected_domains), array_values($cdn_settings->getDomains()));

24 }

25

TaskList.php (https://github.com/woothemes/woocommerce.git) PHP · 420 lines

1 <?php

2 /**

3 * Handles storage and retrieval of a task list

293 */

294 public function get_viewable_tasks() {

295 return array_values(

296 array_filter(

297 $this->tasks,

FinderTest.php (https://github.com/l3l0/BehatExamples.git) PHP · 274 lines

50 $finder->directories();

51 $finder->files();

52 $this->assertIterator($this->toAbsolute(array('foo/bar.tmp', 'test.php', 'test.py')), $finder->in(self::$tmpDir)->getIterator());

53 }

54

107 $finder = new Finder();

108 $this->assertSame($finder, $finder->files()->size('< 1K')->size('> 500'));

109 $this->assertIterator($this->toAbsolute(array('test.php')), $finder->in(self::$tmpDir)->getIterator());

110 }

111

187 $iterator = $finder->files()->name('*.php')->depth('< 1')->in(array(self::$tmpDir, __DIR__))->getIterator();

188

189 $this->assertIterator(array(self::$tmpDir.DIRECTORY_SEPARATOR.'test.php', __DIR__.DIRECTORY_SEPARATOR.'FinderTest.php', __DIR__.DIRECTORY_SEPARATOR.'GlobTest.php'), $iterator);

190 }

191

UpdatePages.php (https://gitlab.com/ElvisAns/tiki) PHP · 203 lines

1 <?php

2

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

7 // $Id$

8

9 include_once 'UpdateSentences.php';

10 include_once 'SentenceSegmentor.php';

11 include_once 'SentenceAlignments.php';

12 include_once 'MockMTWrapper.php';

70 }

71 }

72 $target_diff = array_values($target_diff);

73 for ($a = 0, $aCountSourceDiff = count($source_diff); $a < $aCountSourceDiff; $a++) {

74 $index = 0;

checkboxes.php (https://bitbucket.org/cisash/fananeen.git) PHP · 261 lines

1 <?php

2

3 /**

32 . $option_key . ' title', $option['title']),

33 '#default_value' => (!empty($data['#value'][$option_key])// Also check new post

34 || ($pagenow == 'post-new.php' && !empty($option['checked']))) ? 1 : 0,

35 '#name' => 'wpcf[' . $field['id'] . '][' . $option_key . ']',

36 '#id' => $option_key . '_'

206 }

207 }

208 $output = implode(array_values($params['field_value']), $separator);

209 return $output;

210 }

ArrayCookieJar.php (https://github.com/azogheb/guzzle.git) PHP · 252 lines

1 <?php

2

3 namespace Guzzle\Http\CookieJar;

8 * Cookie jar that stores cookies an an array

9 *

10 * @author Michael Dowling <michael@guzzlephp.org>

11 */

12 class ArrayCookieJar implements CookieJarInterface

111 $ctime = time();

112

113 $ret = array_values(array_filter($this->cookies, function($cookie) use ($domain, $path, $name, $skipDiscardable, $skipExpired, $ctime) {

114

115 // Make sure the cookie is not expired

propertycatalogfeature.php (https://gitlab.com/alexprowars/bitrix) PHP · 446 lines

1 <?php

2 namespace Bitrix\Catalog\Product;

3

272 unset($filter, $getCode);

273

274 return (!empty($result) ? array_values($result) : null);

275 }

276

324 unset($filter, $getCode);

325

326 return (!empty($result) ? array_values($result) : null);

327 }

328

RedisTest.php (https://github.com/brtriver/sukonv.git) PHP · 378 lines

1 <?php

2 /**

3 * Lithium: the most rad php framework

4 *

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

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

7 */

8

176 $params = array('key' => array_keys($data));

177 $result = $closure($this->Redis, $params, null);

178 $expected = array_values($data);

179 $this->assertEqual($expected, $result);

180

199

200 $result = $this->_Redis->getMultiple(array_keys($key));

201 $expected = array_values($key);

202 $this->assertEqual($expected, $result);

203 }

ReplacementTable.php (https://gitlab.com/madebycloud/derekman) PHP · 217 lines

1 <?php

2 /*

3 * This file is part of DBUnit.

4 *

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

6 *

7 * For the full copyright and license information, please view the LICENSE

17 * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License

18 * @version Release: @package_version@

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

20 * @since Class available since Release 1.0.0

21 * @todo When setTableMetaData() is taken out of the AbstractTable this class should extend AbstractTable.

22 */

23 class PHPUnit_Extensions_Database_DataSet_ReplacementTable implements PHPUnit_Extensions_Database_DataSet_ITable

24 {

25 /**

TableMetaDataFilter.php (https://github.com/quimateur/SIFO.git) PHP · 176 lines

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

42 * @version SVN: $Id: TableMetaDataFilter.php 4594 2009-02-01 06:48:11Z sb $

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

45 */

46

47 require_once 'PHPUnit/Framework.php';

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

50 require_once 'PHPUnit/Extensions/Database/DataSet/AbstractTableMetaData.php';

51

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

53

54 /**

68 * @since Class available since Release 3.2.0

69 */

70 class PHPUnit_Extensions_Database_DataSet_TableMetaDataFilter extends PHPUnit_Extensions_Database_DataSet_AbstractTableMetaData

71 {

72

User.php (https://bitbucket.org/acidel/buykoala.git) PHP · 182 lines

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Mage_Adminhtml

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

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

25 */

26

168 return Mage::helper('core')->jsonEncode((object)$jsonUsers);

169 } else {

170 return array_values($users);

171 }

172 } else {

collator_test.php (https://github.com/vadimonus/moodle.git) PHP · 333 lines

1 <?php

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

3 //

19 *

20 * @package core

21 * @category phpunit

22 * @copyright 2011 Sam Hemelryk

23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

30 *

31 * @package core

32 * @category phpunit

33 * @copyright 2011 Sam Hemelryk

34 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

58 $this->error = 'Collation aware sorting not supported';

59 } else {

60 $this->error = 'Collation aware sorting not supported, PHP extension "intl" is not available.';

61 }

62 parent::setUp();

vfsStreamDirectory.php (https://github.com/theosp/google_appengine.git) PHP · 253 lines

1 <?php

2 /**

3 * This file is part of vfsStream.

238 public function getChildren()

239 {

240 return array_values($this->children);

241 }

242

ValidationsTest.php (https://gitlab.com/bandana/Astro-Veda) PHP · 182 lines

1 <?php

2

3 use ActiveRecord as AR;

83 $book->is_valid();

84

85 $this->assert_equals(array("Name can't be blank"),array_values($book->errors->full_messages(array('hash' => true))));

86 }

87

InsertTrait.php (https://gitlab.com/reasonat/test8) PHP · 186 lines

1 <?php

2

3 namespace Drupal\Core\Database\Query;

72 if (empty($values)) {

73 if (!is_numeric(key($fields))) {

74 $values = array_values($fields);

75 $fields = array_keys($fields);

76 }

109 }

110 // For consistency, the values array is always numerically indexed.

111 $this->insertValues[] = array_values($insert_values);

112 }

113 return $this;

Collection.php (https://gitlab.com/techniconline/kmc) PHP · 254 lines

1 <?php namespace Illuminate\Database\Eloquent;

2

3 use Illuminate\Support\Collection as BaseCollection;

140 }

141

142 return new static(array_values($dictionary));

143 }

144

194 $dictionary = $this->getDictionary();

195

196 return new static(array_values($dictionary));

197 }

198

207 $dictionary = array_only($this->getDictionary(), $keys);

208

209 return new static(array_values($dictionary));

210 }

211

Arr.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 419 lines

1 <?php

2

3 namespace Illuminate\Support;

75 public static function divide($array)

76 {

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

78 }

79

134 }

135

136 $array = array_values($results);

137 }

138

139 return array_values($results);

140 }

141

TLogger.php (https://bitbucket.org/volatileeight/prado.git) PHP · 234 lines

1 <?php

2 /**

3 * TLogger class file

119 $logs = $this->_logs;

120 if(!empty($levels))

121 $logs = array_values(array_filter( array_filter($logs,array($this,'filterByLevels')) ));

122 if(!empty($categories))

123 $logs = array_values(array_filter( array_filter($logs,array($this,'filterByCategories')) ));

124 if(!empty($controls))

125 $logs = array_values(array_filter( array_filter($logs,array($this,'filterByControl')) ));

126 if(!is_null($timestamp))

127 $logs = array_values(array_filter( array_filter($logs,array($this,'filterByTimeStamp')) ));

173 if(!is_null($timestamp))

174 $logs = array_filter( array_filter($logs,array($this,'filterByTimeStamp')) );

175 $this->_logs = array_values( array_diff_key($this->_logs, $logs) );

176 }

177

Matrix.php (https://github.com/livinglab/openlab.git) PHP · 403 lines

1 <?php

2

3 /**

5 * Class for the management of Matrices

6 *

7 * @copyright Copyright (c) 2018 Mark Baker (https://github.com/MarkBaker/PHPMatrix)

8 * @license https://opensource.org/licenses/MIT MIT

9 */

47 public function __construct(array $grid)

48 {

49 $this->buildFromArray(array_values($grid));

50 }

51

73 $value = [$value];

74 }

75 $value = array_pad(array_values($value), $columns, null);

76 }

77 );

ParameterContainer.php (https://github.com/Rovak/zf2.git) PHP · 313 lines

1 <?php

2 /**

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

224 public function getPositionalArray()

225 {

226 return array_values($this->data);

227 }

228

ListEntry.php (https://github.com/viggof/moodle.git) PHP · 208 lines

1 <?php

2

3 /**

25 * @see Zend_Gdata_Entry

26 */

27 require_once 'Zend/Gdata/Entry.php';

28

29 /**

30 * @see Zend_Gdata_Spreadsheets_Extension_Custom

31 */

32 require_once 'Zend/Gdata/Spreadsheets/Extension/Custom.php';

33

34 /**

171 unset($this->_custom[$index]);

172 // Re-index the array

173 $this->_custom = array_values($this->_custom);

174 // Be sure to delete form both arrays!

175 $key = array_search($element, $this->_customByName);

Configureoption.php (https://github.com/CloCkWeRX/Pyrus.git) PHP · 252 lines

1 <?php

2 namespace Pyrus\PackageFile\v2;

3 class Configureoption implements \ArrayAccess, \Iterator, \Countable

130

131 unset($this->info[$i]);

132 $this->info = array_values($this->info);

133 $this->save();

134 }

class-arr.php (https://gitlab.com/knowthecode/ktc-must-use) PHP · 545 lines

1 <?php namespace Fulcrum\Support\Helpers;

2

3 /**

14 * This class has been adapted from the Laravel Illuminate framework, which

15 * is copyrighted to Taylor Otwell and carries a MIT Licence (MIT).

16 * Changes reflect WordPress coding standard, compliance with PHP 5.3, +

17 * additional functionality.

18 */

92 $results = self::dot_notation_walk( $array, $key, 'callback_fetch' );

93

94 return array_values( $results );

95 }

96

430 }

431 }

432 $array = array_values( $results );

433

434 return $results;

DBClassName.php (https://gitlab.com/djpmedia/silverstripe-framework) PHP · 221 lines

1 <?php

2

3 namespace SilverStripe\ORM\FieldType;

147 $dataobject = strtolower(DataObject::class);

148 unset($classNames[$dataobject]);

149 return array_values($classNames);

150 }

151

roles.php (https://github.com/livinglab/openlab.git) PHP · 138 lines

1 <?php

2

3 if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }

25 <div class="wrap">

26 <p>

27 <?php _e('Select the lowest role which should be able to access the following capabilities. NextGEN Gallery supports the standard roles from WordPress.', 'nggallery') ?> <br />

28 </p>

29 <?php wp_nonce_field('ngg_addroles') ?>

30 <table class="form-table">

31 <tr valign="top">

32 <th scope="row"><?php _e('Main NextGEN Gallery overview', 'nggallery') ;?>:</th>

33 <td><label for="general"><select name="general" id="general"><?php wp_dropdown_roles( ngg_get_role('NextGEN Gallery overview') ); ?></select></label></td>

34 </tr>

35 <tr valign="top">

36 <th scope="row"><?php _e('Use TinyMCE Button / Upload tab', 'nggallery') ;?>:</th>

37 <td><label for="tinymce"><select name="tinymce" id="tinymce"><?php wp_dropdown_roles( ngg_get_role('NextGEN Use TinyMCE') ); ?></select></label></td>

Color.php (https://gitlab.com/IR31121994/quizbd-master) PHP · 279 lines

1 <?php

2

3 namespace Intervention\Image\Imagick;

39 public function initFromArray($array)

40 {

41 $array = array_values($array);

42

43 if (count($array) == 4) {

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.

89 );

90

91 return array_values( $shared_variables );

92 }

93

221 */

222 protected function get_unique_replacement_variables() {

223 $merged_replacement_variables = call_user_func_array( 'array_merge', array_values( $this->get() ) );

224

225 return array_unique( $merged_replacement_variables );

ShippingZone.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 378 lines

1 <?php

2 declare( strict_types=1 );

3

61 $countries = array_intersect( $countries, $this->get_mc_supported_countries() );

62

63 return array_values( $countries );

64 }

65

76 $this->parse_shipping_zones();

77

78 return ! empty( $this->methods_countries[ $country_code ] ) ? array_values( $this->methods_countries[ $country_code ] ) : [];

79 }

80

class-cp-cluster-toolbar.php (https://gitlab.com/clusterpress/clusterpress) PHP · 404 lines

1 <?php

2 /**

3 * ClusterPress Toolbar Class.

15 */

16 if ( ! class_exists( 'WP_Admin_Bar' ) ) {

17 require_once( ABSPATH . WPINC . '/class-wp-admin-bar.php' );

18 }

19

371

372 // Filter again to remove the items the user has no access to.

373 $this->current_nav = array_values( $this->sort_items( $items ) );

374 $this->current_nav_index = 0;

375

HeaderBag.php (https://gitlab.com/techniconline/kmc) PHP · 348 lines

1 <?php

2

3 /*

156 $key = strtr(strtolower($key), '_', '-');

157

158 $values = array_values((array)$values);

159

160 if (true === $replace || !isset($this->headers[$key])) {

new.php (https://github.com/ichraffsnicht/ClanSphere-Enhanced.git) PHP · 168 lines

1 <?php

2 // ClanSphere 2010 - www.clansphere.net

3 // $Id$

147

148 $squads_cells = array_keys($cs_squads);

149 $squads_save = array_values($cs_squads);

150 cs_sql_insert(__FILE__,'squads',$squads_cells,$squads_save);

151

162 $cs_squads2['squads_picture'] = $filename;

163 $squads2_cells = array_keys($cs_squads2);

164 $squads2_save = array_values($cs_squads2);

165 cs_sql_update(__FILE__,'squads',$squads2_cells,$squads2_save,$getid['squads_id']);

166 }

edit.php (https://github.com/ichraffsnicht/ClanSphere-Enhanced.git) PHP · 166 lines

1 <?php

2 // ClanSphere 2010 - www.clansphere.net

3 // $Id$

151

152 $cells = array_keys($cs_gbook);

153 $save = array_values($cs_gbook);

154 cs_sql_update(__FILE__,'gbook',$cells,$save,$gbook_id);

155

Box.php (https://github.com/zendframework/ZF2Package.git) PHP · 410 lines

1 <?php

2

3 namespace Herrera\Box;

281 return str_replace(

282 array_keys($this->values),

283 array_values($this->values),

284 $contents

285 );

DataFacade.php (https://github.com/danielvaleradp/--ngara.git) PHP · 228 lines

1 <?php

2 class DataFacade {

3 protected static function dolar($i) { return '$' . $i; }

69 }

70

71 $result = pg_execute($dbconn, $pq, array_values($fs)) or die('pg_execute: ' . pg_last_error());

72

73 return;

167

168 $get = function ($i) use (&$entity) { return $entity->get($i); };

169 $data = array_merge(array_values($fs), array_map($get, $pk));

170

171 if (!isset($pqs)) $pqs = array();

BasesfGuardPermissionForm.class.php (https://github.com/frhumanes/PLM.git) PHP · 155 lines

1 <?php

2

3 /**

9 * @subpackage form

10 * @author Your name here

11 * @version SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $

12 */

13 abstract class BasesfGuardPermissionForm extends BaseFormDoctrine

105 if (count($unlink))

106 {

107 $this->object->unlink('Groups', array_values($unlink));

108 }

109

111 if (count($link))

112 {

113 $this->object->link('Groups', array_values($link));

114 }

115 }

test-pipeline-uniforms.c (https://gitlab.com/tchaik/mutter) C · 415 lines

272 paint_vector_pipeline (CoglPipeline *pipeline)

273 {

274 float vector_array_values[] = { 1.0f, 0.0f, 0.0f, 0.0f,

275 0.0f, 1.0f, 0.0f, 0.0f };

276 float short_vector_values[] = { 0.0f, 0.0f, 1.0f };

283 4, /* n_components */

284 2, /* count */

285 vector_array_values);

286

287 uniform_location =

299 paint_int_pipeline (CoglPipeline *pipeline)

300 {

301 int vector_array_values[] = { 0x00, 0x00, 0xff, 0x00,

302 0x00, 0xff, 0x00, 0x00 };

303 int single_value = 0x80;

pathway.php (https://github.com/pacoqueen/callao_chico.git) PHP · 206 lines

1 <?php

2 /**

3 * @version $Id: pathway.php 20196 2011-01-09 02:40:25Z ian $

67 $info = JApplicationHelper::getClientInfo($client, true);

68

69 $path = $info->path.DS.'includes'.DS.'pathway.php';

70 if (file_exists($path))

71 {

99 $pw = $this->_pathway;

100

101 // Use array_values to reset the array keys numerically

102 return array_values($pw);

117

118 // Set the new pathway.

119 $this->_pathway = array_values($pathway);

120

121 return array_values($oldPathway);

TreeBehaviorUuidTest.php (https://github.com/masihnewbie/cakephp.git) PHP · 255 lines

1 <?php

2 /**

3 * TreeBehaviorUuidTest file

7 * PHP 5

8 *

9 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>

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://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests

17 * @package Cake.Test.Case.Model.Behavior

18 * @since CakePHP(tm) v 1.2.0.5330

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

20 */

21

Collection.php (https://gitlab.com/daniruizcamacho/pfcascensores) PHP · 705 lines

1 <?php namespace Illuminate\Support;

2

3 use Closure;

547 public function values()

548 {

549 $this->items = array_values($this->items);

550

551 return $this;

ServerProtocol.php (https://github.com/ivebeenlinuxed/Boiler.git) PHP · 157 lines

1 <?php

2 namespace Ratchet\Wamp;

3 use Ratchet\MessageComponentInterface;

90 }

91

92 if (!is_array($json) || $json !== array_values($json)) {

93 throw new \UnexpectedValueException("Invalid WAMP message format");

94 }

indexes.inc.php (https://gitlab.com/Blueprint-Marketing/interoccupy.net) PHP · 104 lines

1 <?php

2 $TABLE = $_GET["indexes"];

3 $index_types = array("PRIMARY", "UNIQUE", "INDEX");

33 ksort($existing["columns"]);

34 ksort($existing["lengths"]);

35 if ($index["type"] == $existing["type"] && array_values($existing["columns"]) === $columns && (!$existing["lengths"] || array_values($existing["lengths"]) === $lengths)) {

36 // skip existing index

37 unset($indexes[$name]);

81 <form action="" method="post">

82 <table cellspacing="0" class="nowrap">

83 <thead><tr><th><?php echo lang('Index Type'); ?><th><?php echo lang('Column (length)'); ?><th><?php echo lang('Name'); ?></thead>

84 <?php

99 </table>

100 <p>

101 <input type="submit" value="<?php echo lang('Save'); ?>">

102 <noscript><p><input type="submit" name="add" value="<?php echo lang('Add next'); ?>"></noscript>

TierPrice.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 301 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

186 }

187 }

188 return array_values($priceList);

189 }

190

259 *

260 * @return array

261 * @SuppressWarnings(PHPMD.CyclomaticComplexity)

262 */

263 protected function getStoredTierPrices()

wpSetObjectTerms.php (https://github.com/WordPress/wordpress-develop.git) PHP · 433 lines

1 <?php

2

3 /**

112

113 foreach ( $ids as $id ) {

114 $tt = wp_set_object_terms( $id, array_values( $term_id ), $this->taxonomy );

115 // Should return three term taxonomy IDs.

116 $this->assertSame( 3, count( $tt ) );

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

TreeBehaviorUuidTest.php (https://gitlab.com/manuperazafa/elsartenbackend) PHP · 298 lines

1 <?php

2 /**

3 * TreeBehaviorUuidTest file

5 * Tree test using UUIDs

6 *

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

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://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests

16 * @package Cake.Test.Case.Model.Behavior

17 * @since CakePHP(tm) v 1.2.0.5330

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

19 */

20

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

1 <?php

2

3 namespace Illuminate\Foundation\Providers;

128 }

129

130 $this->commands(array_values($commands));

131 }

132

561 return array_values($this->commands);

562 } else {

563 return array_merge(array_values($this->commands), array_values($this->devCommands));

564 }

565 }

BaseDmTestPostForm.class.php (https://github.com/fospald/diem.git) PHP · 455 lines

1 <?php

2

3 /**

253 if (count($unlink))

254 {

255 $this->object->unlink('Tags', array_values($unlink));

256 }

257

259 if (count($link))

260 {

261 $this->object->link('Tags', array_values($link));

262 }

263 }

291 if (count($unlink))

292 {

293 $this->object->unlink('Medias', array_values($unlink));

294 }

295

custom_report_conditions_exporter.php (https://github.com/markn86/moodle.git) PHP · 151 lines

1 <?php

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

3 //

143 return [

144 'hasavailableconditions' => !empty($availableconditions),

145 'availableconditions' => array_values($availableconditions),

146 'hasactiveconditions' => $conditionspresent,

147 'activeconditionsform' => $conditionspresent ? $conditionsform->render() : '',

AclNode.php (https://github.com/masihnewbie/cakephp.git) PHP · 184 lines

1 <?php

2 /**

3 *

4 * PHP 5

5 *

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

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

8 *

11 *

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

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

14 * @package Cake.Model

15 * @since CakePHP(tm) v 0.2.9

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

17 */

18

function.html_options.php (https://github.com/MyITCRM/myitcrm1.git) PHP · 121 lines

1 <?php

2 /**

3 * Smarty plugin

20 * Purpose: Prints the list of <option> tags generated from

21 * the passed parameters

22 * @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}

23 * (Smarty online manual)

24 * @param array

51 case 'values':

52 case 'output':

53 $$_key = array_values((array)$_val);

54 break;

55

56 case 'selected':

57 $$_key = array_map('strval', array_values((array)$_val));

58 break;

59

ListEntry.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 208 lines

1 <?php

2

3 /**

25 * @see Zend_Gdata_Entry

26 */

27 #require_once 'Zend/Gdata/Entry.php';

28

29 /**

30 * @see Zend_Gdata_Spreadsheets_Extension_Custom

31 */

32 #require_once 'Zend/Gdata/Spreadsheets/Extension/Custom.php';

33

34 /**

171 unset($this->_custom[$index]);

172 // Re-index the array

173 $this->_custom = array_values($this->_custom);

174 // Be sure to delete form both arrays!

175 $key = array_search($element, $this->_customByName);

Text2html.php (https://github.com/ewandor/horde.git) PHP · 199 lines

1 <?php

2 /**

3 * Turn text into HTML with varying levels of parsing. For no html

161 }

162

163 $text = Horde_Text_Filter::filter($text, array_keys($filters), array_values($filters));

164 }

165

Guard.php (https://bitbucket.org/helfreire/tccsite.git) PHP · 557 lines

1 <?php namespace Illuminate\Auth;

2

3 use Illuminate\Cookie\CookieJar;

303 if ($this->events)

304 {

305 $payload = array_values(compact('credentials', 'remember', 'login'));

306

307 $this->events->fire('auth.attempt', $payload);

Cleaner.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 241 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

67 * @throws StateException

68 * @throws \Exception

69 * @SuppressWarnings(PHPMD.CyclomaticComplexity)

70 * @SuppressWarnings(PHPMD.UnusedLocalVariable)

87 unset($this->requestData['queries'][$queryName]);

88 } else {

89 $this->requestData['queries'][$queryName]['queryReference'] = array_values($queryReference);

90 }

91 break;

149 * @throws StateException

150 * @throws \Exception

151 * @SuppressWarnings(PHPMD.CyclomaticComplexity)

152 */

153 private function cleanFilter($filterName)

ODBCDatabaseResult.php (https://bitbucket.org/emilhdiaz/webics.git) PHP · 145 lines

1 <?php

2 final class ODBCDatabaseResult extends Object implements DatabaseResult {

3

71 break;

72 case FETCH_VALUES:

73 $row = array_values( mysqli_fetch_assoc($this->stmt, $this->row_i++) );

74 break;

75 case FETCH_OBJ:

step_1.php (https://github.com/zakgrant/forkcms.git) PHP · 150 lines

1 <?php

2

3 /**

39

40 // redirect to step 2

41 header('Location: index.php?step=2');

42 exit;

43 }

52

53 // redirect to step 2

54 header('Location: index.php?step=2');

55 exit;

56 }

93 // build the search & replace array

94 $search = array_keys($variables);

95 $replace = array_values($variables);

96

97 // loop search values

TaggedHandlersPassTest.php (https://gitlab.com/reasonat/test8) PHP · 383 lines

1 <?php

2

3 /**

346 $this->assertCount(5, $method_calls[0][1]);

347 $expected = [new Reference('handler1'), 'extra1', 0, 'default2', 'extra3'];

348 $this->assertEquals($expected, array_values($method_calls[0][1]));

349 }

350

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

1 <?php

2 /**

3 * @package Joomla.Platform

138 $call = $calls[$index];

139 unset($calls[$index]);

140 $calls = array_values($calls);

141 $this->setOption('calls', $calls);

142

156 public function createCall($method, $params = array())

157 {

158 $params = array_values($params);

159

160 if ($this->isAsync())

menus.php (https://github.com/gnomeontherun/joomla-cms.git) PHP · 174 lines

1 <?php

2 /**

3 * @package Joomla.Administrator

10 defined('_JEXEC') or die;

11

12 JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php');

13

14 /**

33 $query->from('#__menu as m');

34 $query->leftJoin('#__menu_types as mt ON mt.menutype=m.menutype');

35 $query->where('m.id IN ('.implode(',', array_values($associations)).')');

36 $query->leftJoin('#__languages as l ON m.language=l.lang_code');

37 $query->select('l.image');

SQLBuilderTest.php (https://gitlab.com/bandana/Astro-Veda) PHP · 282 lines

1 <?php

2

3 use ActiveRecord\SQLBuilder;

28

29 if ($values)

30 $this->assert_equals(array_values(array_filter($values,function($s) { return $s !== null; })),array_values($cond));

31 else

32 $this->assert_equals(array(),$cond);

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

165 'pending_jobs' => $batch->pending_jobs,

166 'failed_jobs' => $batch->failed_jobs + 1,

167 'failed_job_ids' => json_encode(array_values(array_unique(array_merge(json_decode($batch->failed_job_ids, true), [$jobId])))),

168 ];

169 });

BlockAccessControlHandler.php (https://gitlab.com/geeta7/drupal) PHP · 176 lines

1 <?php

2

3 /**

105 if ($condition instanceof ContextAwarePluginInterface) {

106 try {

107 $contexts = $this->contextRepository->getRuntimeContexts(array_values($condition->getContextMapping()));

108 $this->contextHandler->applyContextMapping($condition, $contexts);

109 }

131 try {

132 if ($block_plugin instanceof ContextAwarePluginInterface) {

133 $contexts = $this->contextRepository->getRuntimeContexts(array_values($block_plugin->getContextMapping()));

134 $this->contextHandler->applyContextMapping($block_plugin, $contexts);

135 }

base.php (https://github.com/markn86/moodle.git) PHP · 311 lines

1 <?php

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

3 //

202 */

203 final protected function get_joins(): array {

204 return array_values($this->joins);

205 }

206

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

1 <?php

2 namespace GuzzleHttp\Promise;

3

193 * @return array

194 * @throws \Exception on error

195 * @throws \Throwable on error in PHP >=7

196 */

197 function unwrap($promises)

278 }

279 ksort($results);

280 return array_values($results);

281 }

282 );

File.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 219 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_Downloadable

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

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

25 */

26

204 public function getAllFileTypes()

205 {

206 return array_values($this->getAllMineTypes());

207 }

208

php.xml (https://jedit.svn.sourceforge.net/svnroot/jedit) XML · 2590 lines

11 </PROPS>

12 <RULES IGNORE_CASE="TRUE">

13 <SPAN TYPE="MARKUP" DELEGATE="PHP">

14 <BEGIN>&lt;?php</BEGIN>

16 </SPAN>

17

18 <SPAN TYPE="MARKUP" DELEGATE="PHP">

19 <BEGIN>&lt;?</BEGIN>

20 <END>?&gt;</END>

21 </SPAN>

22

23 <SPAN TYPE="MARKUP" DELEGATE="PHP">

24 <BEGIN>&lt;%=</BEGIN>

25 <END>%&gt;</END>

64

65 <RULES SET="TAGS" DEFAULT="MARKUP">

66 <SPAN TYPE="MARKUP" DELEGATE="PHP">

67 <BEGIN>&lt;?php</BEGIN>

CategorizingPluginManagerTraitTest.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 153 lines

1 <?php

2

3 /**

23 * The plugin manager to test.

24 *

25 * @var \Drupal\Component\Plugin\CategorizingPluginManagerInterface|\PHPUnit\Framework\MockObject\MockObject

26 */

27 protected $pluginManager;

51 'fruits',

52 'vegetables',

53 ], array_values($this->pluginManager->getCategories()));

54 }

55

114 * Replace the constructor so we can instantiate a stub.

115 *

116 * @param \Drupal\Core\Extension\ModuleHandlerInterface|\PHPUnit\Framework\MockObject\MockObject $module_handler

117 * The module handler.

118 */

class-autoloader.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 90 lines

1 <?php

2 /**

3 * This file was automatically generated by automattic/jetpack-autoloader.

8 namespace Automattic\Jetpack\Autoloader\jp8ce0b6a9dbd1362fc8657213c6964c3f;

9

10 // phpcs:ignore

11

12 /**

13 * This class handles management of the actual PHP autoloader.

14 */

15 class Autoloader {

25 // to make them easier to work with and increase flexibility.

26 if ( ! isset( $container ) ) {

27 require_once __DIR__ . '/class-container.php';

28 $container = new Container();

29 }

class-autoloader.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 90 lines

1 <?php

2 /**

3 * This file was automatically generated by automattic/jetpack-autoloader.

8 namespace Automattic\Jetpack\Autoloader\jp7efc1a4d5897cf1cf18c7ef59d7cf9f7;

9

10 // phpcs:ignore

11

12 /**

13 * This class handles management of the actual PHP autoloader.

14 */

15 class Autoloader {

25 // to make them easier to work with and increase flexibility.

26 if ( ! isset( $container ) ) {

27 require_once __DIR__ . '/class-container.php';

28 $container = new Container();

29 }

class-autoloader.php (https://gitlab.com/campus-academy/krowkaramel) PHP · 90 lines

1 <?php

2 /**

3 * This file was automatically generated by automattic/jetpack-autoloader.

8 namespace Automattic\Jetpack\Autoloader\jp0b5236c6e9e8b89d45c2840ab1f3932c;

9

10 // phpcs:ignore

11

12 /**

13 * This class handles management of the actual PHP autoloader.

14 */

15 class Autoloader {

25 // to make them easier to work with and increase flexibility.

26 if ( ! isset( $container ) ) {

27 require_once __DIR__ . '/class-container.php';

28 $container = new Container();

29 }

class-workflow.php (https://github.com/humanmade/Workflows.git) PHP · 422 lines

1 <?php

2 /**

3 * Workflow class

358

359 $parsed_message = [];

360 $parsed_message['subject'] = str_replace( array_keys( $tags ), array_values( $tags ), $subject );

361 $parsed_message['text'] = str_replace( array_keys( $tags ), array_values( $tags ), $text );

ui.inc.php (https://github.com/sareche/thebuggenie.git) PHP · 227 lines

1 <?php

2

3 /**

6 * @author Daniel Andre Eikeland <zegenie@zegeniestudios.net>

7 * @version 2.0

8 * @license http://www.opensource.org/licenses/mozilla1.1.php Mozilla Public License 1.1 (MPL 1.1)

9 * @package thebuggenie

10 */

224 $option_strings[$key] = "{$key}=\"{$val}\"";

225 }

226 return implode(' ', array_values($option_strings));

227 }

228

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

1 <?php

2

3 namespace Illuminate\Support;

69 public static function divide($array)

70 {

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

72 }

73

185 return array_merge($result, [$item]);

186 } elseif ($depth === 1) {

187 return array_merge($result, array_values($item));

188 } else {

189 return array_merge($result, static::flatten($item, $depth - 1));

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

HtmlSanitizerConfig.php (https://github.com/FabienD/symfony.git) PHP · 501 lines

1 <?php

2

3 /*

400 {

401 $clone = clone $this;

402 $clone->attributeSanitizers = array_values(array_filter(

403 $this->attributeSanitizers,

404 static fn ($current) => $current !== $sanitizer

HasEvents.php (https://gitlab.com/madwanz64/laravel) PHP · 415 lines

1 <?php

2

3 namespace Illuminate\Database\Eloquent\Concerns;

355 }

356

357 foreach (array_values($instance->dispatchesEvents) as $event) {

358 static::$dispatcher->forget($event);

359 }

CakeValidationRule.php (https://gitlab.com/manuperazafa/elsartenbackend) PHP · 350 lines

1 <?php

2 /**

3 * CakeValidationRule.

5 * Provides the Model validation logic.

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

17 * @since CakePHP(tm) v 2.2.0

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

19 */

20

OtherComponentsGrid.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 100 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

85 return new JsonModel(

86 [

87 'components' => array_values($components),

88 'total' => count($components),

89 'responseType' => ResponseTypeInterface::RESPONSE_TYPE_SUCCESS