100+ results for 'php array_unique'

Not the results you expected?

Collection.php (https://github.com/igorw/json-schema.git) PHP · 95 lines

1 <?php

2

3 namespace JsonSchema\Constraints;

25 }

26 // verify uniqueItems

27 //TODO array_unique doesnt work with objects

28 if (isset($schema->uniqueItems) && array_unique($value) != $value) {

OLD_settings.php (https://github.com/MickeA/socialanimal.se.git) PHP · 111 lines

1 <?php

2 /**

3 * @file

4 * Platform.sh example settings.php file for Drupal 8.

5 */

6

15 *

16 * These are already explained with detailed comments in Drupal's

17 * default.settings.php file.

18 *

19 * See https://api.drupal.org/api/drupal/sites!default!default.settings.php/8

35 $settings['trusted_host_patterns'] = array();

36 foreach ($routes as $url => $route) {

37 $host = parse_url($url, PHP_URL_HOST);

38 if ($host !== FALSE && $route['type'] == 'upstream' && $route['upstream'] == $_ENV['PLATFORM_APPLICATION_NAME']) {

39 $settings['trusted_host_patterns'][] = '^' . preg_quote($host) . '$';

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

Category.php (https://github.com/expressdecor/Expressdecor.git) PHP · 256 lines

1 <?php

2

3 /*

84 $listingsIds[] = $listingCategory['listing_id'];

85 }

86 $listingsIds = array_unique($listingsIds);

87

88 if (count($listingsIds) == 0) {

City.php (https://gitlab.com/sajyeasmin/AtomicProject_Sajeda_Yeasmin_SEIP_132820_B37) PHP · 292 lines

1 <?php

2 namespace App\city;

3 use App\Model\Database as DB;

35 $STH->execute($arr);

36 Message::message("<div id='msg'><h3 align='center'>[ UserName: $this->user_name ] , [ UserCity: $this->user_city] <br> Data Has Been Inserted Successfully!</h3></div>");

37 Utility::redirect('create.php');

38 }

39 public function index($mode="ASSOC"){

71 else

72 Message::message("<div id='message'><h3 align='center'> Failed! Data Has Not Been Updated Successfully!</h3></div>");

73 Utility::redirect('index.php');

74 }// end of update()

75 public function delete(){

81 else

82 Message::message("<div id='message'><h3 align='center'> Failed! Data Has Not Been Deleted Successfully!</h3></div>");

83 Utility::redirect('index.php');

84

85 }

check_configuration.php (https://gitlab.com/klausmig/InformationRetrievalSystem) PHP · 106 lines

50 echo "********************************\n\n";

51

52 echo sprintf("php.ini used by PHP: %s\n\n", get_ini_path());

53

54 if (is_cli())

68 // mandatory

69 echo "\n** Mandatory requirements **\n\n";

70 check(version_compare(phpversion(), '5.2.4', '>='), 'PHP version is at least 5.2.4', 'Current version is '.phpversion(), true);

71

72 // warnings

94 check($accelerator, 'A PHP accelerator is installed', 'Install a PHP accelerator like APC (highly recommended)', false);

95

96 check(!ini_get('short_open_tag'), 'php.ini has short_open_tag set to off', 'Set it to off in php.ini', false);

97 check(!ini_get('magic_quotes_gpc'), 'php.ini has magic_quotes_gpc set to off', 'Set it to off in php.ini', false);

99 check(!ini_get('session.auto_start'), 'php.ini has session.auto_start set to off', 'Set it to off in php.ini', false);

100

101 check(version_compare(phpversion(), '5.2.9', '!='), 'PHP version is not 5.2.9', 'PHP 5.2.9 broke array_unique() and sfToolkit::arrayDeepMerge(). Use 5.2.10 instead [Ticket #6211]', false);

102

103 if (!is_cli())

Index.php (https://gitlab.com/billyprice1/bdApi) PHP · 120 lines

1 <?php

2

3 class bdApi_ControllerApi_Index extends bdApi_ControllerApi_Abstract

87

88 if (!empty($clientIds)) {

89 $clientIds = array_unique($clientIds);

90

91 /** @var bdApi_Model_Client $clientModel */

CollectionConstraint.php (https://gitlab.com/imamul68e/137619_PHP31) PHP · 112 lines

1 <?php

2

3 /*

39 $unique = array_map(function($e) { return var_export($e, true); }, $value);

40 }

41 if (count(array_unique($unique)) != count($value)) {

42 $this->addError($path, "There are no duplicates allowed in the array", 'uniqueItems');

43 }

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

InlineServiceDefinitionsPass.php (https://gitlab.com/cuza/Clinic_Recods) PHP · 141 lines

1 <?php

2

3 /*

129 }

130

131 if (count(array_unique($ids)) > 1) {

132 return false;

133 }

AssetCollectionTest.php (https://github.com/israelnoguera/parejas.git) PHP · 262 lines

1 <?php

2

3 /*

16 use Assetic\Filter\CallablesFilter;

17

18 class AssetCollectionTest extends \PHPUnit_Framework_TestCase

19 {

20 public function testInterface()

239 }

240

241 $this->assertEquals(2, count(array_unique($urls)), 'iterator prevents basename collisions');

242 }

243

class.tagmodel.php (https://github.com/lcapaldo/Garden.git) PHP · 99 lines

1 <?php if (!defined('APPLICATION')) exit();

2 /*

3 Copyright 2008, 2009 Vanilla Forums Inc.

94 $Tags[$Index] = $Tag;

95 }

96 $Tags = array_unique($Tags);

97 return $Tags;

98 }

PHPDriver.php (https://github.com/padraic/php-framework-benchmarks.git) PHP · 116 lines

1 <?php

2 /*

3 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

23

24 /**

25 * The PHPDriver invokes a static PHP function on the document class itself passing

26 * a ClassMetadata instance for you to manually populate with mapping information.

27 *

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

29 * @link www.doctrine-project.org

30 * @since 1.0

32 * @author Roman Borschel <roman@code-factory.org>

33 */

34 class PHPDriver implements Driver

35 {

36 private $paths = array();

story_view.php (https://github.com/winbladh/imuse.git) PHP · 208 lines

1 <?php

2 include "includes.php";

86 }

87

88 $condlist = array_unique($condlist);

89 //print_r($condlist);

90 $where = "0";

96 else

97 {

98 redirect("story_view.php?storyid=$storyid&bypass=1");

99 }

100

Twig.php (https://gitlab.com/sulistiana/web-profile-arsy) PHP · 238 lines

1 <?php

2 /**

3 * Part of CodeIgniter Simple and Secure Twig

11 // If you don't use Composer, uncomment below

12

13 require_once APPPATH . 'third_party/Twig-1.24.1/lib/Twig/Autoloader.php';

14 Twig_Autoloader::register();

15

54 {

55 $this->functions_asis =

56 array_unique(

57 array_merge($this->functions_asis, $params['functions'])

58 );

61 {

62 $this->functions_safe =

63 array_unique(

64 array_merge($this->functions_safe, $params['functions_safe'])

65 );

page_lister.php (https://github.com/fryed/Brick_cms.git) PHP · 229 lines

1 <?php

2 //-----BRINGS BACK A LIST OF PAGES-----//

3

185

186 //strip duplicates from cat array

187 $catArray = array_unique($catArray);

188

189 //set array

Template.php (https://gitlab.com/dcnf/dcbase.org) PHP · 424 lines

1 <?php

2

3 /*

296 }

297

298 return array_unique($names);

299 }

300

reflection_php5.php (https://github.com/200896596/moodle.git) PHP · 380 lines

1 <?php

2 /**

3 * base include file for SimpleTest

26 /**

27 * Checks that a class has been declared. Versions

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

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

60

61 /**

62 * Needed to kill the autoload feature in PHP5

63 * for classes created dynamically.

64 * @return boolean True if defined.

Relation.php (https://gitlab.com/gideonmarked/PLCPortal) 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)));

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

1 <?php

2

3 include_once 'base.php';

155 array('array' => Variant), FunctionIsFoldable);

156

157 f('array_unique', Variant,

158 array('array' => Variant), FunctionIsFoldable);

159

http.php (https://bitbucket.org/murtuza88/carolina-home-stone.git) PHP · 313 lines

1 <?php

2 /**

3 * Simple and uniform HTTP request API.

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;

251

252 // @todo preserve port?

253 $allowed_origins = array_unique( array(

254 'http://' . $admin_origin[ 'host' ],

255 'https://' . $admin_origin[ 'host' ],

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

105 * @throws \Exception If attributes are missing in composer.lock file.

106 */

107 public function getRequiredPhpVersion()

108 {

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 }

appProdUrlMatcher.php (https://gitlab.com/abdelwahed.farabi/TimeToStartWeb) PHP · 277 lines

1 <?php

2

3 use Symfony\Component\Routing\Exception\MethodNotAllowedException;

273 not_fos_user_change_password:

274

275 throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();

276 }

277 }

meta-box-saves.inc.php (https://gitlab.com/Gashler/dp) PHP · 148 lines

1 <?php

2 /**

3 * Meta box saves.

58 {

59 for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)

60 $pages[$n] = array_unique (preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_pages"]));

61

62 for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)

63 $posts[$n] = array_unique (preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"]));

64

65 for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)

87 {

88 for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)

89 $posts[$n] = array_unique (preg_split ("/[\r\n\t\s;,]+/", $GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["level" . $n . "_posts"]));

90

91 for ($n = 0; $n <= $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["levels"]; $n++)

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

1 <?php namespace Illuminate\Support;

2

3 use Closure;

549 public function unique()

550 {

551 return new static(array_unique($this->items));

552 }

553

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

1 <?php

2 /**

3 * WordPress Bookmark Administration API

127 function wp_get_link_cats( $link_id = 0 ) {

128 $cats = wp_get_object_terms( $link_id, 'link_category', array( 'fields' => 'ids' ) );

129 return array_unique( $cats );

130 }

131

263

264 $link_categories = array_map( 'intval', $link_categories );

265 $link_categories = array_unique( $link_categories );

266

267 wp_set_object_terms( $link_id, $link_categories, 'link_category' );

310 function wp_link_manager_disabled_message() {

311 global $pagenow;

312 if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow ) {

313 return;

314 }

Feed.php (https://github.com/grandison/budo16.git) PHP · 265 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Feed.php 16711 2009-07-14 16:10:54Z matthew $

20 */

21

23 * @see Zend_Feed_Reader_Extension_FeedAbstract

24 */

25 // require_once 'Zend/Feed/Reader/Extension/FeedAbstract.php';

26

27 /**

28 * @see Zend_Date

29 */

30 // require_once 'Zend/Date.php';

31

32 /**

Processes.php (https://github.com/livinglab/openlab.git) PHP · 278 lines

1 <?php

2

3 /**

84 * @param array $handlers

85 */

86 $handlers = array_unique( apply_filters( 'tribe_process_handlers', $handlers ) );

87

88 $this->handler_actions = array_combine(

124 * @param array $queues An array of class names, each extending the `Tribe__Process__Queue` base class.

125 */

126 $queues = array_unique( apply_filters( 'tribe_process_queues', $queues ) );

127

128 $all_queues_actions = array_combine(

admin.functions.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 321 lines

1 <?php

2 /**

3 * @Project Archives OF NUKEVIET 3.x

316 }

317 }

318 return array_unique( $array_cat );

319 }

320

view.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 240 lines

1 <?php

2 /**

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

76 // if eZINI::instance() is called twice instance will be fetched from GLOBAL variable.

77 // Without reference there will be a inconsistency with GLOBAL instance and stored ini file.

78 $iniTemp = eZINI::create( $settingFile . '.append.php', $path, null, null, null );

79 $iniTemp->removeSetting( $block, $setting );

80 $iniTemp->save();

218 $iniPath = $iniDataSet[1] ? $iniDataSet[0] : 'settings/' . $iniDataSet[0];

219 $iniFiles = array_merge( $iniFiles, eZDir::recursiveFindRelative( $iniPath, '', '.ini' ) );

220 $iniFiles = array_merge( $iniFiles, eZDir::recursiveFindRelative( $iniPath, '', '.ini.append.php' ) );

221 }

222

223 // extract all .ini files without path

224 $iniFiles = preg_replace('%.*/%', '', $iniFiles );

225 // remove *.ini[.append.php] from file name

226 $iniFiles = preg_replace('%\.ini.*%', '.ini', $iniFiles );

227 sort( $iniFiles );

users.php (https://github.com/joebushi/joomla.git) PHP · 194 lines

1 <?php

2 /**

3 * @version $Id$

78 }

79

80 $this->setRedirect('index.php?option=com_users&view=users');

81 }

82

119 }

120

121 $this->setRedirect('index.php?option=com_users&view=users');

122 }

123

151 }

152

153 $this->setRedirect('index.php?option=com_users&view=users');

154 }

155

TaggableBehavior.php (https://github.com/mmonguilod/sfPropel15TaggableBehaviorPlugin.git) PHP · 304 lines

10 protected $parameters = array(

11 'tagging_table' => '%TABLE%_tagging',

12 'tagging_table_phpname' => '%PHPNAME%Tagging',

13 'tag_table' => 'taggable_tag',

14 'tag_table_phpname' => 'Tag',

91 $this->taggingTable = $database->addTable(array(

92 'name' => $taggingTableName,

93 'phpName' => $this->replaceTokens($this->parameters['tagging_table_phpname']),

94 'package' => $table->getPackage(),

95 'schema' => $table->getSchema(),

297 return strtr($string, array(

298 '%TABLE%' => $table->getName(),

299 '%PHPNAME%' => $table->getPhpName(),

300 ));

301 }

Validate.php (https://github.com/viglesiasce/testlink.git) PHP · 290 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Validate.php,v 1.1 2010/05/02 16:27:51 franciscom Exp $

20 */

21

23 * @see Zend_Validate_Interface

24 */

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

26

27 /**

172 }

173

174 self::$_defaultNamespaces = array_unique(array_merge(self::$_defaultNamespaces, $namespace));

175 }

176

PhpScanner.php (https://gitlab.com/svillegas/magento2) PHP · 247 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

11 use Magento\Framework\ObjectManager\Code\Generator\Factory as FactoryGenerator;

12

13 class PhpScanner implements ScannerInterface

14 {

15 /**

179 }

180 }

181 return array_unique($output);

182 }

183

243 }

244 }

245 return array_unique($classes);

246 }

247 }

RouteCollection.php (https://bitbucket.org/vladap/symfony.git) PHP · 271 lines

1 <?php

2

3 /*

257 public function getResources()

258 {

259 return array_unique($this->resources);

260 }

261

phonebook_model.php (https://github.com/alimashuri/custom_kalkun.git) PHP · 404 lines

1 <?php

2 /**

3 * Kalkun

6 * @package Kalkun

7 * @author Kalkun Dev Team

8 * @license http://kalkun.sourceforge.net/license.php

9 * @link http://kalkun.sourceforge.net

10 */

241 if(isset($param['Groups']))

242 if(!empty($param['Groups'])){

243 $groups = array_unique(explode(',',$param['Groups']));

244 $CI =& get_instance();

245 foreach($groups as $_grp)

401 }

402

403 /* End of file phonebook_model.php */

404 /* Location: ./application/models/phonebook_model.php */

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

1 <?php

2 /**

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

31 JSubMenuHelper::addEntry(

32 JText::_('JGLOBAL_ARTICLES'),

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

34 $vName == 'articles'

35 );

36 JSubMenuHelper::addEntry(

37 JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),

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

39 $vName == 'categories');

40 JSubMenuHelper::addEntry(

41 JText::_('COM_CONTENT_SUBMENU_FEATURED'),

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

43 $vName == 'featured'

44 );

select.php (https://github.com/drslice/regform.git) PHP · 392 lines

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

2 /**

3 * Database query builder for SELECT statements. See [Query Builder](/database/query/builder) for usage and examples.

7 * @author Kohana Team

8 * @copyright (c) 2008-2009 Kohana Team

9 * @license http://kohanaphp.com/license

10 */

11 class Kohana_Database_Query_Builder_Select extends Database_Query_Builder_Where {

311 {

312 // Select all columns

313 $query .= implode(', ', array_unique(array_map($quote_ident, $this->_select)));

314 }

315

317 {

318 // Set tables to select from

319 $query .= ' FROM '.implode(', ', array_unique(array_map($quote_table, $this->_from)));

320 }

321

Optimizer.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 246 lines

1 <?php

2

3 /*

56 }

57

58 if (!version_compare(phpversion(), '5.4.0RC1', '>=') && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('sandbox')) {

59 if ($this->inABody) {

60 if (!$node instanceof Twig_Node_Expression) {

96 if (!$expression && get_class($node) !== 'Twig_Node' && $prependedNodes = array_shift($this->prependedNodes)) {

97 $nodes = array();

98 foreach (array_unique($prependedNodes) as $name) {

99 $nodes[] = new Twig_Node_SetTemp($name, $node->getLine());

100 }

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

1 <?php

2

3 namespace Illuminate\Bus;

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

model.php (https://github.com/Doap/forkcms.git) PHP · 267 lines

1 <?php

2

3 /*

151

152 // no duplicates (core templates will be overridden by theme templates) and sort alphabetically

153 $templates = array_unique($templates);

154 sort($templates);

155

Tags.class.php (https://github.com/cj/Project-Pier.git) PHP · 212 lines

1 <?php

2

3 /**

75 self::clearObjectTags($object, $manager_class);

76 if (is_array($tags) && count($tags)) {

77 $tags = array_unique($tags);

78 foreach ($tags as $tag_name) {

79

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

1 <?php

2

3 namespace Illuminate\Support;

196 public function unique($format = null)

197 {

198 return array_unique($this->all($format));

199 }

200

content.php (https://gitlab.com/ppapadatis/Videolearn) PHP · 240 lines

1 <?php

2 /**

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

31 JSubMenuHelper::addEntry(

32 JText::_('JGLOBAL_ARTICLES'),

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

34 $vName == 'articles'

35 );

36 JSubMenuHelper::addEntry(

37 JText::_('COM_CONTENT_SUBMENU_CATEGORIES'),

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

39 $vName == 'categories');

40 JSubMenuHelper::addEntry(

41 JText::_('COM_CONTENT_SUBMENU_FEATURED'),

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

43 $vName == 'featured'

44 );

MPSUM_Admin_Plugins.php (https://gitlab.com/memuller.web/wp_site) PHP · 275 lines

1 <?php

2 /**

3 * Controls the plugins tab

214

215 //Update option

216 $plugin_options = array_values( array_unique( $plugin_options ) );

217 $plugin_automatic_options = array_values( array_unique( $plugin_automatic_options ) );

246 }

247 ?>

248 <div class="updated"><p><strong><?php echo esc_html( $message ); ?></strong></p></div>

249 <?php

251

252 ?>

253 <form action="<?php echo esc_url( add_query_arg( array() ) ); ?>" method="post">

254 <?php

select.php (https://github.com/chardcastle/Quiz-Castle.git) PHP · 445 lines

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

2 /**

3 * Database query builder for SELECT statements. See [Query Builder](/database/query/builder) for usage and examples.

7 * @author Kohana Team

8 * @copyright (c) 2008-2009 Kohana Team

9 * @license http://kohanaphp.com/license

10 */

11 class Kohana_Database_Query_Builder_Select extends Database_Query_Builder_Where {

350 {

351 // Select all columns

352 $query .= implode(', ', array_unique(array_map($quote_column, $this->_select)));

353 }

354

356 {

357 // Set tables to select from

358 $query .= ' FROM '.implode(', ', array_unique(array_map($quote_table, $this->_from)));

359 }

360

PageUtil.php (https://github.com/ThiloWitt/core.git) PHP · 267 lines

1 <?php

2 /**

3 * Copyright Zikula Foundation 2009 - Zikula Application Framework

244

245 if (is_array($value)) {

246 $value = array_unique($value);

247 }

248

257 }

258 // make values unique

259 $_pageVars[$varname]['contents'] = array_unique($_pageVars[$varname]['contents']);

260 } else {

261 $_pageVars[$varname]['contents'] = $value;

Feed.php (https://github.com/wangzifeng/yolanda.git) PHP · 265 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Feed.php 18951 2009-11-12 16:26:19Z alexander $

20 */

21

23 * @see Zend_Feed_Reader_Extension_FeedAbstract

24 */

25 #require_once 'Zend/Feed/Reader/Extension/FeedAbstract.php';

26

27 /**

28 * @see Zend_Date

29 */

30 #require_once 'Zend/Date.php';

31

32 /**

reflection_php5.php (https://github.com/akelos/v1.git) PHP · 278 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: reflection_php5.php,v 1.20 2006/02/05 21:39:07 lastcraft Exp $

7 */

8

26 /**

27 * Checks that a class has been declared. Versions

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

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

Feed.php (https://github.com/querl/Tine-2.0-Open-Source-Groupware-and-CRM.git) PHP · 265 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Feed.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $

20 */

21

23 * @see Zend_Feed_Reader_Extension_FeedAbstract

24 */

25 require_once 'Zend/Feed/Reader/Extension/FeedAbstract.php';

26

27 /**

28 * @see Zend_Date

29 */

30 require_once 'Zend/Date.php';

31

32 /**

factory.php (https://github.com/ercanozkaya/nooku-server-base.git) PHP · 356 lines

1 <?php

2 /**

3 * @version $Id: factory.php 3540 2011-06-20 15:00:35Z johanjanssens $

266 }

267

268 self::$_mixin_map[$strIdentifier] = array_unique(array_merge(self::$_mixin_map[$strIdentifier], $mixins));

269

270 if (self::$_registry->offsetExists($strIdentifier))

Exists.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 203 lines

1 <?php

2 /**

3 * Zend Framework

23 * @see Zend_Validate_Abstract

24 */

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

26

27 /**

73 $directory = explode(',', $directory);

74 } else if (!is_array($directory)) {

75 // require_once 'Zend/Validate/Exception.php';

76 throw new Zend_Validate_Exception ('Invalid options to validator provided');

77 }

123 $directory = explode(',', $directory);

124 } else if (!is_array($directory)) {

125 // require_once 'Zend/Validate/Exception.php';

126 throw new Zend_Validate_Exception ('Invalid options to validator provided');

127 }

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

SummaryOfOrganization.php (https://gitlab.com/Charlesbasis/AtomicProject_CharlesValerioHowlader_136344_B35) PHP · 282 lines

1 <?php

2

3

58 Message::message("Failed! Data Has Not Been Inserted! :(");

59

60 Utility::redirect('create.php');

61

62 } //end of store method

100 $STH = $this->DBH->prepare($sql);

101 $STH->execute($arrData);

102 Utility::redirect('index.php');

103

104 } //end of update()

109 $STH->execute();

110

111 Utility::redirect('index.php');

112 } // end of delete(), permanent delete

113

AdminPaymentController.php (https://gitlab.com/jslee1/PrestaShop) PHP · 126 lines

1 <?php

2 /**

3 * 2007-2015 PrestaShop

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

21 * @author PrestaShop SA <contact@prestashop.com>

22 * @copyright 2007-2015 PrestaShop SA

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

24 * International Registered Trademark & Property of PrestaShop SA

25 */

37 public function initToolbarTitle()

38 {

39 $this->toolbar_title = array_unique($this->breadcrumbs);

40 }

41

Scraper.php (https://gitlab.com/boptom/scraper) PHP · 413 lines

1 <?php

2

3 namespace Scraper;

150 {

151 if (self::isArray()) {

152 $this->text = array_unique($this->text);

153 }

154

databasequery.php (https://github.com/rich20/Kunena-1.6.git) PHP · 587 lines

1 <?php

2 /**

3 * @version $Id$

62 public function __toString()

63 {

64 return PHP_EOL.$this->_name.' '.implode($this->_glue, $this->_elements);

65 }

66

76 {

77 if (is_array($elements)) {

78 $this->_elements = array_unique(array_merge($this->_elements, $elements));

79 }

80 else {

81 $this->_elements = array_unique(array_merge($this->_elements, array($elements)));

82 }

83 }

class.tx_rtehtmlarea_defaultclean.php (https://github.com/itag/TYPO3v4-Core.git) PHP · 93 lines

1 <?php

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

3 * Copyright notice

83 */

84 public function applyToolbarConstraints($show) {

85 return array_unique(array_merge($show, t3lib_div::trimExplode(',', $this->pluginButtons)));

86 }

87 } // end of class

88

89 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php'])) {

90 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/extensions/DefaultClean/class.tx_rtehtmlarea_defaultclean.php']);

Model.php (https://github.com/forkcms/forkcms.git) PHP · 364 lines

1 <?php

2

3 namespace Backend\Modules\Tags\Engine;

240 array_intersect_key(

241 $tags,

242 array_unique(

243 array_map(

244 static function (string $tag): string {

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

1 <?php

2 /**

3 * @package Joomla.Platform

239 }

240

241 // Output the custom tags - array_unique makes sure that we don't output the same tags twice

242 foreach (array_unique($document->_custom) as $custom)

bookmark.php (https://gitlab.com/haque.mdmanzurul/wp-archivefusetheme) PHP · 305 lines

1 <?php

2 /**

3 * WordPress Bookmark Administration API

118 $cats = wp_get_object_terms( $link_id, 'link_category', array('fields' => 'ids') );

119

120 return array_unique( $cats );

121 }

122

246

247 $link_categories = array_map( 'intval', $link_categories );

248 $link_categories = array_unique( $link_categories );

249

250 wp_set_object_terms( $link_id, $link_categories, 'link_category' );

289 function wp_link_manager_disabled_message() {

290 global $pagenow;

291 if ( 'link-manager.php' != $pagenow && 'link-add.php' != $pagenow && 'link.php' != $pagenow )

292 return;

293

SProductsQuery.php (https://github.com/kelios/imshop.git) PHP · 140 lines

1 <?php

2

3

82

83 array_push($filterData[$field->getId()],$fieldValues[$needVal]);

84 $filterData[$field->getId()] = array_unique($filterData[$field->getId()]);

85 }

86 }

Feed.php (https://github.com/lanmediaservice/lms-tplib.git) PHP · 265 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Feed.php 16711 2009-07-14 16:10:54Z matthew $

20 */

21

23 * @see Zend_Feed_Reader_Extension_FeedAbstract

24 */

25 //*** require_once 'Zend/Feed/Reader/Extension/FeedAbstract.php';

26

27 /**

28 * @see Zend_Date

29 */

30 //*** require_once 'Zend/Date.php';

31

32 /**

geography_tests.php (https://github.com/caprenter/IATI-Data-Spotter.git) PHP · 199 lines

1 <?php

2 include ('functions/xml_child_exists.php');

3 include ('settings.php'); //sets $corpus, $dir and $output_dir

4 $output_file = $output_dir . $corpus . '_geography_new.csv';

5

6 $tests = array("recipient-country","recipient-region");

7 $geography = geography($dir);

8 //echo $geography["no_activities"] . PHP_EOL;

9 print_r($geography["no_activities"]);

10 print_r($geography["activities_with_recipient_region_only"]);

11 print_r($geography["activities_with_recipient_country_only"]);

12 echo count($geography["activities_with_both"]) . PHP_EOL;

13 print_r($geography["activities_with_more_than_one_recipient_region"]);

14 print_r($geography["activities_with_more_than_one_recipient_country"]);

Gender.php (https://gitlab.com/rahad777/atomic_project_Rahad_143368_B36) PHP · 271 lines

1 <?php

2 namespace App\Gender;

3 use App\Message\Message;

44 else

45 Message::message("Failed! DATA HAS not BEEN INSERTED SUCCESSFULLY");

46 Utility::redirect('create.php');

47 }

48 public function index($fetchMode="ASSOC"){

89 Message::message("<div id='message'><h3 align='center'> Failed! Data Has Not Been Updated Successfully!</h3></div>");

90

91 Utility::redirect('create.php');

92

93 }//end of update

100 $STH->execute();

101

102 Utility::redirect('create.php');

103

104 }// end of delete()

Summary_Of_Organization.php (https://gitlab.com/rahad777/atomic_project_Rahad_143368_B36) PHP · 273 lines

1 <?php

2 namespace App\Summary_Of_Organization;

3 use App\Message\Message;

43 else

44 Message::message("Failed! DATA HAS not BEEN INSERTED SUCCESSFULLY");

45 Utility::redirect('create.php');

46 }

47 public function index($fetchMode="ASSOC"){

89 Message::message("<div id='message'><h3 align='center'> Failed! Data Has Not Been Updated Successfully!</h3></div>");

90

91 Utility::redirect('create.php');

92

93 }//end of update

100 $STH->execute();

101

102 Utility::redirect('create.php');

103

104 }// end of delete()

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

1 <?php

2 /**

3 * The Data Settings class.

297 */

298 private function add_indexed_filter_setting( $filter, $settings ) {

299 static::$data_settings[ $filter ] = array_unique(

300 array_merge(

301 static::$data_settings[ $filter ],

Ordered.php (https://bitbucket.org/dnejedly/eaparts.git) PHP · 240 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) 2012 Magento Inc. (http://www.magentocommerce.com)

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

25 */

26

147 continue;

148 }

149 $configArray[$code]['before'] = array_unique(array_merge(

150 $configArray[$code]['before'], $configArray[$beforeCode]['before']

151 ));

factory.php (https://github.com/raeldc/com_learn.git) PHP · 332 lines

1 <?php

2 /**

3 * @version $Id: factory.php 3826 2011-09-01 02:19:59Z johanjanssens $

241 }

242

243 self::$_mixin_map[$strIdentifier] = array_unique(array_merge(self::$_mixin_map[$strIdentifier], $mixins));

244

245 if (self::$_registry->offsetExists($strIdentifier))

userGroups.php (https://github.com/DanielnetoDotCom/YouPHPTube.git) PHP · 380 lines

1 <?php

2 if (empty($global['systemRootPath'])) {

3 $global['systemRootPath'] = '../';

4 }

5 require_once $global['systemRootPath'] . 'videos/configuration.php';

6 require_once $global['systemRootPath'] . 'objects/bootGrid.php';

7 require_once $global['systemRootPath'] . 'objects/user.php';

8

9 class UserGroups {

200 self::deleteGroupsFromUser($users_id, $byPassAdmin);

201 global $global;

202 $array_groups_id = array_unique($array_groups_id);

203 $sql = "INSERT INTO users_has_users_groups ( users_id, users_groups_id) VALUES (?,?)";

204 foreach ($array_groups_id as $value) {

MenuTreeParameters.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 259 lines

1 <?php

2

3 namespace Drupal\Core\Menu;

126 public function addExpandedParents(array $parents) {

127 $this->expandedParents = array_merge($this->expandedParents, $parents);

128 $this->expandedParents = array_unique($this->expandedParents);

129 return $this;

130 }

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.

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

224

225 return array_unique( $merged_replacement_variables );

226 }

227 }

City.php (https://gitlab.com/Nilufarjahan/LabExam8) PHP · 268 lines

1 <?php

2 namespace App\City;

3 use App\Model\database as DB;

53 else

54 Message::message("<div id='msg'></div><h5 align='center'>[ Name: $this->name ] ,[ Country: $this->country ], [ City: $this->city ] <br> Data Has not Been Inserted Successfully!</h5></div>");

55 Utility::redirect('create.php');

56

57 }

100 Message::message("<div id='message'><h3 align='center'> Failed! Data Has Not Been Updated Successfully!</h3></div>");

101

102 Utility::redirect('index.php');

103

104

116 Message::message("<div id='message'><h3 align='center'> Failed! Data Has Not Been Deleted Successfully!</h3></div>");

117

118 Utility::redirect('index.php');

119

120

Codecept.php (https://gitlab.com/itlboy/yii2-starter-installed) PHP · 249 lines

1 <?php

2 namespace Codeception;

3

11

12 /**

13 * @var \Codeception\PHPUnit\Runner

14 */

15 protected $runner;

16 /**

17 * @var \PHPUnit_Framework_TestResult

18 */

19 protected $result;

67 public function __construct($options = [])

68 {

69 $this->result = new \PHPUnit_Framework_TestResult;

70 $this->dispatcher = new EventDispatcher();

71

Hobbies.php (https://gitlab.com/dhimanbarua/Atomic_Project_SEIP141617_B36) PHP · 204 lines

1 <?php

2 namespace App\Hobbies;

3 use App\Model\Database as DB;

51 <br>Data Has Not been Inserted Successfully!!!!!!</h3> </div>");

52 }

53 Utility::redirect('create.php');

54

55

91 $STH->execute($arrData);

92

93 Utility::redirect('index.php');

94

95 }// end of update()

100

101 $STH->execute();

102 Utility::redirect('index.php');

103 }// end of delete

104

activity_status_count.php (https://github.com/caprenter/IATI-Data-Spotter.git) PHP · 162 lines

1 <?php

2

3 if (in_array($myinputs['group'],array_keys($available_groups))) {

4 //Include variables for each group. Use group name for the argument

5 //e.g. php detect_html.php dfid

6 require_once 'variables/' . $_GET['group'] . '.php';

7 require_once 'functions/xml_child_exists.php';

8 require_once 'functions/validator_link.php';

9 require_once 'functions/bad_files_table.php';

10

11 $activity_status_codes = array( "1" => "Pipeline/identification",

79 <tbody>

80 ");

81 $files = array_unique($results["zeros"]);

82 $i=0;

83 foreach ($files as $file) {

RouteListCommand.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 281 lines

1 <?php

2

3 namespace Illuminate\Foundation\Console;

142 $middlewares = array_values($route->middleware());

143

144 $middlewares = array_unique(

145 array_merge($middlewares, $this->getPatternFilters($route))

146 );

Attribute.php (https://bitbucket.org/juan_sanchez/aiyellow.git) PHP · 372 lines

1 <?php

2 /**

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

135 return;

136 }

137 $data[$attribName] = array_values(array_unique($data[$attribName]));

138 }

139

woocommerce_templates.php (https://github.com/PayJunctionDev/woocommerce.git) PHP · 222 lines

24 elseif ( is_tax('product_cat') ) {

25

26 $template = locate_template( array( 'taxonomy-product_cat.php', WOOCOMMERCE_TEMPLATE_URL . 'taxonomy-product_cat.php' ) );

27

28 if ( ! $template ) $template = $woocommerce->plugin_path() . '/templates/taxonomy-product_cat.php';

30 elseif ( is_tax('product_tag') ) {

31

32 $template = locate_template( array( 'taxonomy-product_tag.php', WOOCOMMERCE_TEMPLATE_URL . 'taxonomy-product_tag.php' ) );

33

34 if ( ! $template ) $template = $woocommerce->plugin_path() . '/templates/taxonomy-product_tag.php';

36 elseif ( is_post_type_archive('product') || is_page( get_option('woocommerce_shop_page_id') )) {

37

38 $template = locate_template( array( 'archive-product.php', WOOCOMMERCE_TEMPLATE_URL . 'archive-product.php' ) );

39

40 if ( ! $template ) $template = $woocommerce->plugin_path() . '/templates/archive-product.php';

53 global $woocommerce;

54 if ($name=='shop') :

55 if (!locate_template(array( 'loop-shop.php', WOOCOMMERCE_TEMPLATE_URL . 'loop-shop.php' ))) :

56 load_template( $woocommerce->plugin_path() . '/templates/loop-shop.php',false );

load-scripts.php (https://gitlab.com/Gashler/dp) PHP · 162 lines

1 <?php

2

3 /**

120

121 $load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );

122 $load = array_unique( explode( ',', $load ) );

123

124 if ( empty($load) )

125 exit;

126

127 require(ABSPATH . WPINC . '/script-loader.php');

128 require(ABSPATH . WPINC . '/version.php');

timecounter.php (https://gitlab.com/inglobe/mgt-clemente-css) PHP · 251 lines

1 <?php

2

3 /**

176 if (isset($src)) {

177 array_push($this->_timingcontext, $src);

178 $this->_timingcontext = array_values(array_unique($this->_timingcontext));

179 }

180 if (count($this->_timingcontext) == 0) {

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

1 <?php

2

3 /**

121 }

122

123 $wordArray = array_unique( $wordArray );

124 foreach ( $wordArray as $wordKey )

125 {

167 }

168

169 $wordArray = array_unique( $wordArray );

170 foreach ( $wordArray as $wordKey )

171 {

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

1 <?php namespace Illuminate\Routing;

2

3 use Illuminate\Http\Response;

345 $current = $this->getBeforeFilters();

346

347 $before = array_unique(array_merge($current, func_get_args()));

348

349 $this->setOption('_before', $before);

362 $current = $this->getAfterFilters();

363

364 $after = array_unique(array_merge($current, func_get_args()));

365

366 $this->setOption('_after', $after);

pwg.permissions.php (https://gitlab.com/team_fsn/fsn-php) PHP · 245 lines

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

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

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

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

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

152 }

153

154 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');

155

156 if (!empty($params['group_id']))

214 }

215

216 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');

217

218 $cat_ids = get_subcat_ids($params['cat_id']);

rocket_sled.class.php (https://github.com/iaindooley/RocketSled.git) PHP · 215 lines

1 <?php

2 require_once('runnable.interface.php');

36 */

37 if(isset($argv))

38 $runnable_class = isset($argv[1]) ? $argv[1]:require_once('runnable.default.php');

39 else

40 $runnable_class = isset($_GET['r']) ? $_GET['r']:require_once('runnable.default.php');

60 if(count($namespaced) > 1)

61 {

62 $class_part = strtolower(preg_replace('/^_/','',preg_replace('/([A-Z])/','_\1',array_pop($namespaced)))).'.class.php';

63

64 foreach(RocketSled::scan() as $dir)

78 $classes = RocketSled::filteredPackages(function($fname) use ($class,&$ret)

79 {

80 $ending = '.class.php';

81

82 if(RocketSled::endsWith($fname,$ending))

ProfilePicture.php (https://gitlab.com/israt12/AtomicProject_IsratJerin_146574_CRUD_Create_Read_update_delete) PHP · 253 lines

1 <?php

2 namespace App\ProfilePicture;

3

47 Message::setMessage("Failed!Data has been inserted successfully");

48

49 Utility::redirect('create.php');

50 }

51 public function index($fetchMode='ASSOC')

91 $STH = $this->DBH->prepare($sql);

92 $STH->execute($arrData);

93 Utility::redirect('index.php');

94

95 }

105 Message::message("Failed!Data has been deleted successfully");

106

107 Utility::redirect('index.php');

108 }

109 public function trash()

Params.php (git://github.com/solarphp/core.git) PHP · 200 lines

1 <?php

2 /**

3 *

9 * @package Solar_Sql_Model

10 *

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

12 *

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

63 );

64

65 $this->_data['cols'] = array_unique($list);

66 return $this;

67 }

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

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

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

7 */

8

26 /**

27 * Checks that a class has been declared. Versions

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

29 * an interface.

30 * @return boolean True if defined.

40

41 /**

42 * Needed to kill the autoload feature in PHP5

43 * for classes created dynamically.

44 * @return boolean True if defined.

script.php (https://gitlab.com/alexprowars/bitrix) PHP · 338 lines

1 <?php

2

3 namespace Bitrix\Bizproc\Controller;

37 }

38

39 $documentIds = array_unique($documentIds);

40

41 if (count($documentIds) > $this->getDocumentIdLimit())

MPSUM_Admin_Themes.php (https://gitlab.com/memuller.web/wp_site) PHP · 280 lines

1 <?php

2 /**

3 * Controls the themes tab

174

175 //Update option

176 $theme_options = array_values( array_unique( $theme_options ) );

177 $theme_automatic_options = array_values( array_unique( $theme_automatic_options ) );

205 }

206 ?>

207 <div class="updated"><p><strong><?php echo esc_html( $message ); ?></strong></p></div>

208 <?php

211

212 ?>

213 <form action="<?php echo esc_url( add_query_arg( array() ) ); ?>" method="post">

214 <?php

helper.php (https://github.com/draganz/Kunena-2.0.git) PHP · 235 lines

1 <?php

2 /**

3 * Kunena Component

56 if ($id instanceof KunenaForumTopic) $ids[$i] = $id->id;

57 }

58 $ids = array_unique($ids);

59 self::loadTopics($ids, $user);

60

FileLocator.php (https://bitbucket.org/cryofrost/portal.git) PHP · 98 lines

1 <?php

2

3 /*

73 }

74

75 return array_values(array_unique($filepaths));

76 }

77

create.class.php (https://github.com/enigmatic-user/revolution.git) PHP · 367 lines

1 <?php

2 /**

3 * Create a user group

60 if (!empty($contexts)) {

61 $contexts = is_array($contexts) ? $contexts : explode(',',$contexts);

62 $contexts = array_unique($contexts);

63

64 $adminPolicy = trim($this->getProperty('aw_manager_policy',0));

106 public function addUsersViaWizard($users) {

107 $users = is_array($users) ? $users : explode(',',$users);

108 $users = array_unique($users);

109 foreach ($users as $userKey) {

110 $userKey = explode(':',$userKey);

191 public function addResourceGroupsViaWizard($resourceGroupNames,array $contexts) {

192 $resourceGroupNames = is_array($resourceGroupNames) ? $resourceGroupNames : explode(',',$resourceGroupNames);

193 $resourceGroupNames = array_unique($resourceGroupNames);

194

195 /** @var modAccessPolicy $policy */

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

1 <?php

2

3 namespace League\Flysystem;

187 }

188

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

190

191 foreach ($directories as $directory) {

Compared.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 87 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_Reports

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

83 }

84

85 return array_unique($productIds);

86 }

87 }

FormHelper.php (https://gitlab.com/x33n/ImpressPages) PHP · 219 lines

1 <?php

2

3

46

47

48 $files = array_unique($files, SORT_STRING);

49 sort($files);

50

HasColumns.php (https://gitlab.com/indritqoku/laravel-aministrator) PHP · 244 lines

1 <?php

2

3 namespace Terranet\Administrator\Traits\Module;

105 }

106

107 return array_unique(array_filter($columns, function ($index, $column) use ($hidden) {

108 return ! in_array($column, $hidden);

109 }, ARRAY_FILTER_USE_BOTH));

LocationService.php (https://github.com/orangehrm/OrangeHRM.git) PHP · 176 lines

1 <?php

2 /**

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

135 }

136 $accessibleLocationIds = $this->getUserRoleManager()->getAccessibleEntityIds(Location::class);

137 $accessibleLocationIds = array_unique(array_merge($accessibleLocationIds, $employeeLocationsIds));

138 $accessibleLocations = $this->getLocationDao()->getLocationsByIds($accessibleLocationIds);

139 return $this->getNormalizerService()->normalizeArray(LocationModel::class, $accessibleLocations);

ViewLookupWizardField.php (https://gitlab.com/Lidbary/PHPRunner) PHP · 363 lines

1 <?php

2 class ViewLookupWizardField extends ViewControl

3 {

240

241 $lookupValues = array();

242 $lookupArr = array_unique( $lookupArr );

243 foreach($lookupArr as $lookupvalue)

244 {

html_catalog.php (https://github.com/gobsInternetTechnologyGmbH/private_sales.git) PHP · 141 lines

1 <?php

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

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

9 | PLEASE READ THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" |

10 | FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE |

11 | AT THE FOLLOWING URL: http://www.x-cart.com/license.php |

12 | |

13 | THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS ON WHICH YOU MAY USE |

37 * @author Ruslan R. Fazlyev <rrf@x-cart.com>

38 * @copyright Copyright (c) 2001-2011 Ruslan R. Fazlyev <rrf@x-cart.com>

39 * @license http://www.x-cart.com/license.php X-Cart license agreement

40 * @category X-Cart

41 * @package Modules

42 * @subpackage Products Map

43 * @version $Id: html_catalog.php,v 1.4.2.1 2011/01/10 13:12:01 ferz Exp $

44 * @since 4.4.0

45 */

Abstract.php (https://github.com/expressdecor/Expressdecor.git) PHP · 355 lines

1 <?php

2

3 /*

85 /** @var $collection Mage_Core_Model_Mysql4_Collection_Abstract */

86 $collection = Mage::getModel('M2ePro/Processing_Request')->getCollection();

87 $collection->addFieldToFilter('hash', array('in'=>array_unique($processingRequestsHashes)));

88

89 foreach ($collection->getItems() as $processingRequest) {

class.I18Nlocale.inc.php (http://flaimo-php.googlecode.com/svn/trunk/) PHP · 341 lines

1 <?php

2 /**

3 * load base class which takes care of all the other includes via it's autoload function

4 */

5 require_once 'class.I18Nbase.inc.php';

6

7 /**

8 * holds information about locale/country/language selected by the user or automatically; also loads settings L10N settings

9 * @author Michael Wimmer <flaimo@gmail.com>

10 * @category flaimo-php

11 * @example ../www_root/i18n_example_script.php i18n example script

12 * @license GNU General Public License v3

13 * @link http://code.google.com/p/flaimo-php/

14 * @package i18n

15 * @version 2.3.1

LocaleDefaultConfigStorage.php (https://gitlab.com/mohamed_hussein/prodt) PHP · 161 lines

1 <?php

2

3 namespace Drupal\locale;

105 public function listAll() {

106 $languages = $this->predefinedConfiguredLanguages();

107 return array_unique(

108 array_merge(

109 $this->requiredInstallStorage->listAll(),

128 */

129 public function getComponentNames($type, array $list) {

130 $names = array_unique(

131 array_merge(

132 array_keys($this->requiredInstallStorage->getComponentNames($type, $list)),

136 if ($type == 'module' && in_array('language', $list)) {

137 $languages = $this->predefinedConfiguredLanguages();

138 $names = array_unique(array_merge($names, $languages));

139 }

140 return $names;

Apriori.php (https://github.com/sbourget/moodle.git) PHP · 332 lines

1 <?php

2

3 declare(strict_types=1);

4

5 namespace Phpml\Association;

6

7 use Phpml\Helper\Predictable;

8 use Phpml\Helper\Trainable;

9

10 class Apriori implements Associator

236 }

237

238 $candidate = array_values(array_unique(array_merge($p, $q)));

239

240 if ($this->contains($candidates, $candidate)) {

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

1 <?php

2 // Don't load directly

3 defined( 'WPINC' ) or die;

167 }

168

169 $this->items[ $slug ]->{ $action } = array_unique( array_filter( array_merge( $this->items[ $slug ]->{ $action }, (array) $ids ) ) );

170 }

171

lavaBase.php (https://github.com/volcanicpixels/Privacy-Plugin.git) PHP · 419 lines

1 <?php

2 /**

3 * The lava base class

111 {

112

113 echo "<h2>LavaError thrown on line 110 of lavaBase.php</h2> <br/>";

114 echo "Could not find method '{$methodName}' on object of class '" . get_class( $this ) . "'. We also tried the current child which has class '" . get_class( $this->getContext() ) . "' and the parent which has class '" . get_class( $this->getContext() ) . "'.";

115

353 function runActions( $hookTag, $debug = false )

354 {

355 $hooks = array_unique( $this->hookTags() );

356 $suffixes = array_unique( $this->suffixes );

390 }

391

392 $hooks = array_unique( $this->hookTags() );

393 $suffixes = array_unique( $this->suffixes );

PagerAToZ.php (https://gitlab.com/virtualrealms/d7civicrm) PHP · 200 lines

1 <?php

2 /*

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

142 $AToZBar = array_merge($AToZBar, $dynamicAlphabets);

143 sort($AToZBar, SORT_STRING);

144 $AToZBar = array_unique($AToZBar);

145

146 // get the current path