100+ results for 'php str_repeat'

Not the results you expected?

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

1 <?php

2 /**

3 * File containing the eZISBN10To13Converter class.

259 $repeatLength = 70 - ( $i % 70 );

260 $count = ( ( $i - 1 ) * $limit ) + $countList;

261 $this->Cli->output( str_repeat( ' ', $repeatLength ) . ' ' . $this->Cli->stylize( 'strong', $count ), false );

262 }

263

Abstract.php (https://github.com/cwaclawik/moodle.git) PHP · 348 lines

1 <?php

2

3 /**

25 * @see Zend_Validate_Interface

26 */

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

28

29

126 }

127 if (!isset($this->_messageTemplates[$messageKey])) {

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

129 throw new Zend_Validate_Exception("No message template exists for key '$messageKey'");

130 }

167 * @see Zend_Validate_Exception

168 */

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

170 throw new Zend_Validate_Exception("No property exists by the name '$property'");

171 }

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

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Mage_Adminhtml

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

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

25 */

26

162 }

163 $values[] = array(

164 'label' => str_repeat($nonEscapableNbspChar, 4) . $store->getName(),

165 'value' => $store->getId()

166 );

Store.php (https://github.com/gryzz/crystal_magento.git) PHP · 508 lines

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Mage_Adminhtml

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

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

25 */

26

162 }

163 $values[] = array(

164 'label' => str_repeat($nonEscapableNbspChar, 4) . $store->getName(),

165 'value' => $store->getId()

166 );

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

1 <?php

2 /**

3 * File containing the ezcTemplateTreeOutput abstract class

195 if ( $useKey && $remainder > 0 )

196 {

197 $remainderWsText = str_repeat( ' ', $remainder );

198 }

199

vfsStreamFile.php (https://bitbucket.org/ajalovec/aura.demo.git) PHP · 327 lines

1 <?php

2 /**

3 * This file is part of vfsStream.

201 if ($size > $this->size()) {

202 // Pad with null-chars if we're "truncating up"

203 $this->setContent($this->getContent() . str_repeat("\0", $size - $this->size()));

204 } else {

205 $this->setContent(substr($this->getContent(), 0, $size));

BrokerTest.php (https://github.com/jorgenils/zend-framework.git) PHP · 299 lines

4 define("PHPUnit_MAIN_METHOD", "Zend_Controller_Plugin_BrokerTest::main");

5

6 $basePath = realpath(dirname(__FILE__) . str_repeat(DIRECTORY_SEPARATOR . '..', 3));

7

8 set_include_path(

13 }

14

15 require_once "PHPUnit/Framework/TestCase.php";

16 require_once "PHPUnit/Framework/TestSuite.php";

17

18 require_once 'Zend/Controller/Front.php';

19 require_once 'Zend/Controller/Action/HelperBroker.php';

33 public static function main()

34 {

35 require_once "PHPUnit/TextUI/TestRunner.php";

36

37 $suite = new PHPUnit_Framework_TestSuite("Zend_Controller_Plugin_BrokerTest");

Store.php (https://github.com/educationnational/site.git) PHP · 508 lines

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Mage_Adminhtml

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

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

25 */

26

162 }

163 $values[] = array(

164 'label' => str_repeat($nonEscapableNbspChar, 4) . $store->getName(),

165 'value' => $store->getId()

166 );

FileValidatorTest.php (https://github.com/Exercise/symfony.git) PHP · 324 lines

1 <?php

2

3 /*

17 use Symfony\Component\HttpFoundation\File\UploadedFile;

18

19 abstract class FileValidatorTest extends \PHPUnit_Framework_TestCase

20 {

21 protected $context;

90 public function testTooLargeBytes()

91 {

92 fwrite($this->file, str_repeat('0', 11));

93

94 $constraint = new File(array(

110 public function testTooLargeKiloBytes()

111 {

112 fwrite($this->file, str_repeat('0', 1400));

113

114 $constraint = new File(array(

eztemplatetextoperator.php (https://github.com/zerustech/ezpublish.git) PHP · 281 lines

1 <?php

2 /**

3 * File containing the eZTemplateTextOperator class.

10

11 /*!

12 \class eZTemplateTextOperator eztemplatetextoperator.php

13 \brief The class eZTemplateTextOperator does

14

138 else

139 {

140 $indentation = str_repeat( $filler, $count );

141 $code = ( "%output% = '$indentation' . str_replace( '\n', '\n$indentation', %1% );\n" );

142 }

151 "%output% = %1%;\n" .

152 "}else{\n" .

153 "%tmp1% = str_repeat( '$filler', %2% );\n" .

154 "%output% = %tmp1% . str_replace( '\n', '\n' . %tmp1%, %1% );\n" .

155 "}\n");

AbstractPlatformTestCase.php (https://github.com/maartendekeizer/dbal.git) PHP · 228 lines

1 <?php

2

3 namespace Doctrine\Tests\DBAL\Platforms;

24

25 $c = $this->_platform->getIdentifierQuoteCharacter();

26 $this->assertEquals(str_repeat($c, 4), $this->_platform->quoteIdentifier($c));

27 }

28

param_values.php (https://github.com/F5/zetacomponents.git) PHP · 345 lines

1 <?php

2 /**

3 *

92 public static function suite()

93 {

94 return new PHPUnit_Framework_TestSuite( 'ezcParamValuesTest' );

95 }

96

120

121 // Initialize content

122 $this->blob = str_repeat( "\x00\x05\x10\x42", 1024 );

123 $this->clob = str_repeat( "test", 1024 );

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

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Mage_Adminhtml

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

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

25 */

26

162 }

163 $values[] = array(

164 'label' => str_repeat($nonEscapableNbspChar, 4) .

165 Mage::helper('core')->escapeHtml($store->getName()),

166 'value' => $store->getId()

Store.php (https://bitbucket.org/sevenly/magento-ce.git) PHP · 508 lines

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Mage_Adminhtml

23 * @copyright Copyright (c) 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

162 }

163 $values[] = array(

164 'label' => str_repeat($nonEscapableNbspChar, 4) . $store->getName(),

165 'value' => $store->getId()

166 );

ConsoleIOTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 234 lines

1 <?php

2

3 /*

101 $outputMock->expects($this->at(1))

102 ->method('write')

103 ->with($this->equalTo(str_repeat("\x08", 23)), $this->equalTo(false));

104 $outputMock->expects($this->at(2))

105 ->method('write')

107 $outputMock->expects($this->at(3))

108 ->method('write')

109 ->with($this->equalTo(str_repeat(' ', 11)), $this->equalTo(false));

110 $outputMock->expects($this->at(4))

111 ->method('write')

112 ->with($this->equalTo(str_repeat("\x08", 11)), $this->equalTo(false));

113 $outputMock->expects($this->at(5))

114 ->method('write')

6_nag_upgrade_sqlng.php (https://github.com/ewandor/horde.git) PHP · 156 lines

1 <?php

2 /**

3 * Adds tables for the Sqlng share driver.

117 }

118 }

119 $sql .= ') VALUES (?, ?, ?, ?, ?, ?, ?' . str_repeat(', ?', $count) . ')';

120

121 foreach ($this->select('SELECT * FROM nag_shares') as $share) {

142 $count++;

143 }

144 $sql .= ') VALUES (?, ?' . str_repeat(', ?', $count) . ')';

145

146 foreach ($this->select('SELECT * FROM nag_shares_' . $what . 's') as $share) {

DocumentWriter.php (https://bitbucket.org/Ebozavrik/test-application.git) PHP · 231 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: DocumentWriter.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

23 /** Zend_Search_Lucene_Index_SegmentWriter */

24 require_once 'Zend/Search/Lucene/Index/SegmentWriter.php';

25

26 /**

74 {

75 /** Zend_Search_Lucene_Search_Similarity */

76 require_once 'Zend/Search/Lucene/Search/Similarity.php';

77

78 $storedFields = array();

Chunk.php (https://gitlab.com/Skull3x/ClearSky) PHP · 380 lines

1 <?php

2 namespace pocketmine\level\format\leveldb;

3

371 public static function getEmptyChunk($chunkX, $chunkZ, LevelProvider $provider = null){

372 try{

373 $chunk = new Chunk($provider instanceof LevelProvider ? $provider : LevelDB::class, $chunkX, $chunkZ, str_repeat("\x00", self::DATA_LENGTH));

374 $chunk->skyLight = str_repeat("\xff", 16384);

UsernamePasswordJsonAuthenticationListenerTest.php (https://github.com/deviantintegral/symfony.git) PHP · 215 lines

1 <?php

2

3 /*

12 namespace Symfony\Component\Security\Tests\Http\Firewall;

13

14 use PHPUnit\Framework\TestCase;

15 use Symfony\Component\HttpFoundation\Request;

16 use Symfony\Component\HttpFoundation\Response;

174 {

175 $this->createListener();

176 $username = str_repeat('x', Security::MAX_USERNAME_LENGTH + 1);

177 $request = new Request(array(), array(), array(), array(), array(), array('HTTP_CONTENT_TYPE' => 'application/json'), sprintf('{"username": "%s", "password": 1}', $username));

178 $event = new GetResponseEvent($this->getMockBuilder(KernelInterface::class)->getMock(), $request, KernelInterface::MASTER_REQUEST);

HelperBrokerTest.php (https://github.com/jorgenils/zend-framework.git) PHP · 248 lines

13 }

14

15 require_once "PHPUnit/Framework/TestCase.php";

16 require_once "PHPUnit/Framework/TestSuite.php";

19 require_once 'Zend/Controller/Request/Http.php';

20 require_once 'Zend/Controller/Response/Cli.php';

21

22 require_once 'Zend/Controller/Action/HelperBroker.php';

23 require_once 'Zend/Controller/Action/Helper/ViewRenderer.php';

24 require_once 'Zend/Controller/Action/Helper/Redirector.php';

34 public static function main()

35 {

36 require_once "PHPUnit/TextUI/TestRunner.php";

37

38 $suite = new PHPUnit_Framework_TestSuite("Zend_Controller_Action_HelperBrokerTest");

Abstract.php (https://github.com/bmaland/file2url.git) PHP · 346 lines

1 <?php

2

3 /**

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

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

20 * @version $Id: Abstract.php 8113 2008-02-18 13:15:27Z matthew $

21 */

22

25 * @see Zend_Validate_Interface

26 */

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

28

29

126 }

127 if (!isset($this->_messageTemplates[$messageKey])) {

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

129 throw new Zend_Validate_Exception("No message template exists for key '$messageKey'");

130 }

class-walker-nav-menu.php (https://gitlab.com/pankajmohale/chef2go) PHP · 266 lines

1 <?php

2 /**

3 * Nav Menu API: Walker_Nav_Menu class

58 $n = "\n";

59 }

60 $indent = str_repeat( $t, $depth );

61

62 // Default class.

97 $n = "\n";

98 }

99 $indent = str_repeat( $t, $depth );

100 $output .= "$indent</ul>{$n}";

101 }

123 $n = "\n";

124 }

125 $indent = ( $depth ) ? str_repeat( $t, $depth ) : '';

126

127 $classes = empty( $item->classes ) ? array() : (array) $item->classes;

Roman.php (https://bitbucket.org/valmy/openx.git) PHP · 275 lines

1 <?php

2 //

3 // +----------------------------------------------------------------------+

4 // | PHP Version 4 |

5 // +----------------------------------------------------------------------+

6 // | Copyright (c) 1997-2004 The PHP Group |

7 // +----------------------------------------------------------------------+

8 // | This source file is subject to version 2.02 of the PHP license, |

9 // | that is bundled with this package in the file LICENSE, and is |

10 // | available at through the world-wide-web at |

11 // | http://www.php.net/license/2_02.txt. |

12 // | If you did not receive a copy of the PHP license and are unable to |

Column.php (https://gitlab.com/devtoannh/cafe) PHP · 243 lines

1 <?php

2 /**

3 * Zend Framework

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

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

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

20 */

21

23 * @see Zend_Text_Table

24 */

25 require_once 'Zend/Text/Table.php';

26

27 /**

28 * @see Zend_Text_MultiByte

29 */

30 require_once 'Zend/Text/MultiByte.php';

31

32 /**

Profile.php (https://github.com/frhumanes/PLM.git) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

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

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

20 * @version $Id: Profile.php 20967 2010-02-07 18:17:49Z ralph $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

sfDoctrineFormGeneratedTemplate.php (https://github.com/h16bit/diem.git) PHP · 190 lines

18 <?php foreach ($this->getColumns() as $column): ?>

19 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => new <?php echo $this->getWidgetClassForColumn($column) ?>(<?php echo $this->getWidgetOptionsForColumn($column) ?>),

20 <?php endforeach; ?>

23 <?php if ('DmMedia' === $relation->getClass()) continue; ?>

24 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'expanded' => true)),

25 <?php endforeach; ?>

29 <?php foreach ($this->getColumns() as $column): ?>

30 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => new <?php echo $this->getValidatorClassForColumn($column) ?>(<?php echo $this->getValidatorOptionsForColumn($column) ?>),

31 <?php endforeach; ?>

33 <?php if ('DmMedia' === $relation->getClass()) continue; ?>

34 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'required' => false)),

35 <?php endforeach; ?>

90 protected function createMediaFormFor<?php echo dmString::camelize($mediaRelation['local']); ?>()

91 {

92 return DmMediaForRecordForm::factory($this->object, '<?php echo $mediaRelation['local'] ?>', '<?php echo $mediaRelation['alias'] ?>', $this->validatorSchema['<?php echo $mediaRelation['local']; ?>']->getOption('required'));

93 }

94 <?php endforeach; ?>

ReleaseController.php (https://gitlab.com/brucealdridge/yii2) PHP · 211 lines

1 <?php

2 /**

3 * @link http://www.yiiframework.com/

59 $this->sed(

60 '/'.$v.' under development\n(-+?)\n/',

61 $headline . "\n" . str_repeat('-', strlen($headline)) . "\n",

62 $this->getChangelogs()

63 );

67 {

68 $headline = "\n$version under development\n";

69 $headline .= str_repeat('-', strlen($headline) - 2) . "\n\n";

70 foreach($this->getChangelogs() as $file) {

71 $lines = explode("\n", file_get_contents($file));

200 '/function getVersion\(\)\n \{\n return \'(.+?)\';/',

201 "function getVersion()\n {\n return '$version';",

202 YII2_PATH . '/BaseYii.php');

203 }

204

Row.php (https://github.com/zucchi/zf2.git) PHP · 199 lines

1 <?php

2 /**

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

172 array_sum(array_slice($columnWidths,

173 $colNum));

174 $renderedColumns[] = array(str_repeat(' ', $remainingWidth));

175

176 $this->columnWidths[] = $remainingWidth;

186 $result .= $renderedColumn[$line];

187 } else {

188 $result .= str_repeat(' ', $this->columnWidths[$index]);

189 }

190

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

1 <?php

2

3 if (class_exists('ParagonIE_Sodium_Core32_ChaCha20', false)) {

140 for (;;) {

141 if ($bytes < 64) {

142 $message .= str_repeat("\x00", 64 - $bytes);

143 }

144

339 return self::encryptBytes(

340 new ParagonIE_Sodium_Core32_ChaCha20_Ctx($key, $nonce),

341 str_repeat("\x00", $len)

342 );

343 }

357 return self::encryptBytes(

358 new ParagonIE_Sodium_Core32_ChaCha20_IetfCtx($key, $nonce),

359 str_repeat("\x00", $len)

360 );

361 }

FileCipher.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 374 lines

1 <?php

2 /**

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

261 if ($size <= self::BUFFER_SIZE) {

262 // Write a placeholder for the HMAC and write the IV

263 fwrite($write, str_repeat(0, Hmac::getOutputSize($hashAlgo)));

264 } else {

265 $result = substr($result, $saltSize);

ProjectDuplicationTest.php (https://gitlab.com/x33n/kanboard) PHP · 359 lines

1 <?php

2

3 require_once __DIR__.'/Base.php';

24 $this->assertEquals(50, strlen($pd->getClonedProjectName(str_repeat('a', 50))));

25 $this->assertEquals(str_repeat('a', 42).' (Clone)', $pd->getClonedProjectName(str_repeat('a', 50)));

26

27 $this->assertEquals(50, strlen($pd->getClonedProjectName(str_repeat('a', 60))));

28 $this->assertEquals(str_repeat('a', 42).' (Clone)', $pd->getClonedProjectName(str_repeat('a', 60)));

29 }

30

34 $pd = new ProjectDuplication($this->container);

35

36 $this->assertEquals(1, $p->create(array('name' => str_repeat('a', 50))));

37 $this->assertEquals(2, $pd->duplicate(1));

38

AbstractTokenizerTest.class.php (https://github.com/ghiata/xp-framework.git) PHP · 293 lines

1 <?php namespace net\xp_framework\unittest\text;

2

3 use unittest\TestCase;

282 $input= '';

283 for ($i= 0; $i < 10000; $i++) {

284 $input.= str_repeat('*', rand(0, 76))."\n";

285 }

286

Profile.php (https://github.com/Doap/iCms---intelligent-Content-management-system.git) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

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

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

20 * @version $Id: Profile.php 20851 2010-02-02 21:45:51Z ralph $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

9_ansel_upgrade_sqlng.php (https://github.com/ewandor/horde.git) PHP · 198 lines

1 <?php

2 /**

3 * @author Michael J Rubinsky <mrubinsk@horde.org>

144 }

145 }

146 $sql .= ') VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?' . str_repeat(', ?', $count) . ')';

147

148 foreach ($this->select('SELECT * FROM ansel_shares') as $share) {

184 $count++;

185 }

186 $sql .= ') VALUES (?, ?' . str_repeat(', ?', $count) . ')';

187

188 foreach ($this->select('SELECT * FROM ansel_shares_' . $what . 's') as $share) {

Column.php (https://github.com/praveensingh85/MyEventDashboard1.git) PHP · 243 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: Column.php 20096 2010-01-06 02:05:09Z bkarwin $

20 */

21

23 * @see Zend_Text_Table

24 */

25 require_once 'Zend/Text/Table.php';

26

27 /**

28 * @see Zend_Text_MultiByte

29 */

30 require_once 'Zend/Text/MultiByte.php';

31

32 /**

Node.php (https://gitlab.com/reasonat/test8) PHP · 231 lines

1 <?php

2

3 /*

56 $noderepr = array();

57 foreach (explode("\n", (string) $node) as $line) {

58 $noderepr[] = str_repeat(' ', $len).$line;

59 }

60

exceptionhandler.php (https://gitlab.com/neuser/bitrix-core) PHP · 371 lines

74 *

75 * @return void

76 * @see http://php.net/manual/en/errorfunc.constants.php

77 */

78 public function setHandledErrorsTypes($handledErrorsTypes)

87 *

88 * @return void

89 * @see http://php.net/manual/en/errorfunc.constants.php

90 */

91 public function setAssertionErrorType($assertionErrorType)

112 *

113 * @return void

114 * @see http://php.net/manual/en/errorfunc.constants.php

115 */

116 public function setExceptionErrorsTypes($errorTypesException)

Abstract.php (https://github.com/jon9872/zend-framework.git) PHP · 375 lines

1 <?php

2 /**

3 * Zend Framework

243 {

244 if (is_int($indent)) {

245 $indent = str_repeat(' ', $indent);

246 }

247

259 {

260 if ($this->_captureLock) {

261 require_once 'Zend/View/Helper/Placeholder/Container/Exception.php';

262 throw new Zend_View_Helper_Placeholder_Container_Exception('Cannot nest placeholder captures for the same placeholder');

263 }

331 * Next Index

332 *

333 * as defined by the PHP manual

334 * @return int

335 */

Profile.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 237 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: Profile.php 24593 2012-01-05 20:35:02Z matthew $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

AWSAuthTest.php (https://github.com/isS/Microweber.git) PHP · 237 lines

1 <?php

2

3 require_once 'Sabre/HTTP/ResponseMock.php';

4

5 class Sabre_HTTP_AWSAuthTest extends PHPUnit_Framework_TestCase {

6

7 private $response;

226 $key=pack('H*', sha1($key));

227 $key=str_pad($key,$blocksize,chr(0x00));

228 $ipad=str_repeat(chr(0x36),$blocksize);

229 $opad=str_repeat(chr(0x5c),$blocksize);

Sql.php (https://github.com/ewandor/horde.git) PHP · 191 lines

1 <?php

2 /**

3 * Ulaform_Action_Sql Class provides a Ulaform action driver to submit the

94 $form_params['table'],

95 implode(', ', $columns),

96 str_repeat('?, ', count($values) - 1) . '?');

97

98 try {

OpeningFunctionBraceBsdAllmanSniff.php (https://github.com/squizlabs/PHP_CodeSniffer.git) PHP · 227 lines

50 * Processes this test, when one of its tokens is encountered.

51 *

52 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.

53 * @param int $stackPtr The position of the current token in the

54 * stack passed in $tokens.

124 $phpcsFile->fixer->addNewlineBefore($openingBrace);

125 } else {

126 $phpcsFile->fixer->replaceToken($openingBrace, '');

127 $phpcsFile->fixer->addNewlineBefore($nextLine);

128 $phpcsFile->fixer->addContentBefore($nextLine, '{');

129

130 if ($tokens[$indent]['code'] === T_WHITESPACE) {

131 $phpcsFile->fixer->addContentBefore($nextLine, $tokens[$indent]['content']);

132 }

133 }

ProcessTest.class.php (https://github.com/treuter/xp-framework.git) PHP · 255 lines

1 <?php

2 /* This class is part of the XP framework

3 *

70 public function newInstance() {

71 $p= Runtime::getInstance()->getExecutable()->newInstance(array('-v'));

72 $version= 'PHP '.phpversion();

73 $this->assertEquals($version, $p->out->read(strlen($version)));

74 $p->close();

229 #[@test]

230 public function hugeStdout() {

231 $p= new Process($this->executable(), array('-r', 'fputs(STDOUT, str_repeat("*", 65536));'));

232 $out= '';

233 while (!$p->out->eof()) {

244 #[@test]

245 public function hugeStderr() {

246 $p= new Process($this->executable(), array('-r', 'fputs(STDERR, str_repeat("*", 65536));'));

247 $err= '';

248 while (!$p->err->eof()) {

Operator.php (https://github.com/Koc/core.git) PHP · 222 lines

1 <?php

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

3

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

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

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

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

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

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

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

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

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

24 * @see ____file_see____

96 $location = \Includes\Utils\Converter::removeCRLF($location);

97

98 if ('cli' !== PHP_SAPI) {

99

100 if (headers_sent()) {

ConsumerTest.php (https://gitlab.com/AlexandrSy/magento.xxx) PHP · 193 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

6 namespace Magento\Integration\Test\Unit\Helper\Oauth;

7

8 class ConsumerTest extends \PHPUnit_Framework_TestCase

9 {

10 /** @var \Magento\Store\Model\StoreManagerInterface */

186 {

187 return substr(

188 str_shuffle(str_repeat('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', 5)),

189 0,

190 $length

TestRedis.php (https://github.com/esimionato/phpredis.git) PHP · 1456 lines

1 <?php

2 require_once 'PHPUnit.php';

3

4 echo "Note: these tests might take up to a minute. Don't worry :-)\n";

5

6 class Redis_Test extends PHPUnit_TestCase

7 {

8 const HOST = '127.0.0.1';

617 // );

618 // if(function_exists('proc_open')) {

619 // $env = array('PHPREDIS_key' =>'list', 'PHPREDIS_value' => 'value');

620 // $process = proc_open('php', $params, $pipes, '/tmp', $env);

628 // $r->auth("'.addslashes(self::AUTH).'");

629 // }

630 // $r->lPush($_ENV["PHPREDIS_key"], $_ENV["PHPREDIS_value"]);

631 // ?' . '>');

632 //

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

1 <?php

2 /**

3 * base include file for SimpleTest

10 * include other SimpleTest class files

11 */

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

13 /**#@-*/

14

43 */

44 function _getIndent($offset = 0) {

45 return str_repeat(

46 $this->_indent,

47 count($this->getTestList()) + $offset);

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

1 <?php

2

3 if (class_exists('ParagonIE_Sodium_Core32_Curve25519', false)) {

417 static $zero;

418 if ($zero === null) {

419 $zero = str_repeat("\x00", 32);

420 }

421 /** @var string $str */

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

1 <?php

2

3 if (class_exists('ParagonIE_Sodium_Core_Curve25519', false)) {

369 static $zero;

370 if ($zero === null) {

371 $zero = str_repeat("\x00", 32);

372 }

373 /** @var string $zero */

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

1 <?php

2

3 if (class_exists('ParagonIE_Sodium_Crypto32', false)) {

238 }

239 $state->update($ad);

240 $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf)));

241 $state->update($ciphertext);

242 $state->update(str_repeat("\x00", (0x10 - $clen) & 0xf));

306

307 $state->update($ad);

308 $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf)));

309 $state->update($ciphertext);

310 $state->update(str_repeat("\x00", ((0x10 - $len) & 0xf)));

544 {

545 return ParagonIE_Sodium_Core32_HSalsa20::hsalsa20(

546 str_repeat("\x00", 16),

547 self::scalarmult($sk, $pk)

548 );

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

1 <?php

2

3 if (class_exists('ParagonIE_Sodium_Crypto', false)) {

238 }

239 $state->update($ad);

240 $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf)));

241 $state->update($ciphertext);

242 $state->update(str_repeat("\x00", (0x10 - $clen) & 0xf));

306

307 $state->update($ad);

308 $state->update(str_repeat("\x00", ((0x10 - $adlen) & 0xf)));

309 $state->update($ciphertext);

310 $state->update(str_repeat("\x00", ((0x10 - $len) & 0xf)));

545 {

546 return ParagonIE_Sodium_Core_HSalsa20::hsalsa20(

547 str_repeat("\x00", 16),

548 self::scalarmult($sk, $pk)

549 );

UriResolver.php (https://gitlab.com/suporte.spturis/carnaval2015.spturis.com.br) PHP · 192 lines

1 <?php

2

3 namespace YoastSEO_Vendor\GuzzleHttp\Psr7;

170 }

171 $targetSegments[] = $targetLastSegment;

172 $relativePath = \str_repeat('../', \count($sourceSegments)) . \implode('/', $targetSegments);

173 // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".

174 // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used

FileLockRegionTest.php (https://github.com/jaikdean/doctrine2.git) PHP · 295 lines

1 <?php

2

3 declare(strict_types=1);

22 use function rmdir;

23 use function set_error_handler;

24 use function str_repeat;

25 use function sys_get_temp_dir;

26 use function uniqid;

261

262 $reflectionDirectory->setAccessible(true);

263 $reflectionDirectory->setValue($region, str_repeat('a', 10000));

264

265 set_error_handler(static function () {

sfDoctrineFormFilterGeneratedTemplate.php (https://github.com/frhumanes/PLM.git) PHP · 78 lines

17 <?php if ($column->isPrimaryKey()) continue ?>

18 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => new <?php echo $this->getWidgetClassForColumn($column) ?>(<?php echo $this->getWidgetOptionsForColumn($column) ?>),

19 <?php endforeach; ?>

20 <?php foreach ($this->getManyToManyRelations() as $relation): ?>

21 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>')),

22 <?php endforeach; ?>

27 <?php if ($column->isPrimaryKey()) continue ?>

28 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => <?php echo $this->getValidatorForColumn($column) ?>,

29 <?php endforeach; ?>

30 <?php foreach ($this->getManyToManyRelations() as $relation): ?>

31 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'required' => false)),

32 <?php endforeach; ?>

70 <?php foreach ($this->getColumns() as $column): ?>

71 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => '<?php echo $this->getType($column) ?>',

72 <?php endforeach; ?>

image.php (https://github.com/Certun/ExtJS-Themer.git) PHP · 95 lines

1 <?php

2 /**

3 * Created by JetBrains PhpStorm.

15

16 function getDirectory( $path = '.', $level = 0 ){

17 $ignore = array( 'cgi-bin', '.', '..' ); //<<-------------------// Directories to ignore when listing output. Many hosts will deny PHP access to the cgi-bin.

18 $dh = @opendir( $path ); //<<-----------------------------------// Open the directory to the handle $dh

19 while( false !== ( $file = readdir( $dh ) ) ){ //<<-------------// Loop through the directory

20 if( !in_array( $file, $ignore ) ){ //<<---------------------// Check that this file is not to be ignored

21 $spaces = str_repeat( '&nbsp;', ( $level * 4 ) ); //<<--// Just to add spacing to the list, to better show the directory tree

22 if( is_dir( "$path/$file" ) ){ //<<---------------------// Its a directory, so we need to keep reading down...

23 echo "<br /><strong>$path $file</strong> (DIR)<br />";

72 imagegif($im, $imgname ); // save image as gif

73 imagedestroy($im);

74 header('Location: image.php');

75 }

76 ?>

DocumentWriter.php (https://github.com/grandison/budo16.git) PHP · 214 lines

1 <?php

2 /**

3 * Zend Framework

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

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

20 * @version $Id: DocumentWriter.php 16541 2009-07-07 06:59:03Z bkarwin $

21 */

22

23 /** Zend_Search_Lucene_Analysis_Analyzer */

24 // require_once 'Zend/Search/Lucene/Analysis/Analyzer.php';

25

26 /** Zend_Search_Lucene_Index_SegmentWriter */

27 // require_once 'Zend/Search/Lucene/Index/SegmentWriter.php';

28

29 /**

tokenizer.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 261 lines

1 <?php

2 /**

3 * File containing the ezcDocumentWikiTokenizer

122 $token->content =

123 substr( $token->content, 0, $position ) .

124 str_repeat( ' ', 9 - ( ( $position + $token->position ) % 8 ) ) .

125 substr( $token->content, $position + 1 );

126 }

Profile.php (https://gitlab.com/grayhamster/open-social-media-monitoring) PHP · 237 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: Profile.php 24594 2012-01-05 21:27:01Z matthew $

21 */

22

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

Column.php (https://github.com/basdog22/Qool.git) PHP · 243 lines

1 <?php

2 /**

3 * Zend Framework

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

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

19 * @version $Id: Column.php 24594 2012-01-05 21:27:01Z matthew $

20 */

21

23 * @see Zend_Text_Table

24 */

25 require_once 'Zend/Text/Table.php';

26

27 /**

28 * @see Zend_Text_MultiByte

29 */

30 require_once 'Zend/Text/MultiByte.php';

31

32 /**

custom_nav_walker.php (https://gitlab.com/dhimanbarua/WP-ThemeComet) PHP · 243 lines

1 <?php

2 /**

3 * Navigation Menu template functions

46 */

47 public function start_lvl( &$output, $depth = 0, $args = array() ) {

48 $indent = str_repeat("\t", $depth);

49 $output .= "\n$indent<ul class=\"submenu\">\n";

50 }

62 */

63 public function end_lvl( &$output, $depth = 0, $args = array() ) {

64 $indent = str_repeat("\t", $depth);

65 $output .= "$indent</ul>\n";

66 }

93 }

94 public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {

95 $indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';

96

97 $current_value = get_post_meta($item->ID, '_comet_nav', true);

sfAppRoutesTask.class.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 166 lines

1 <?php

2

3 /*

15 * @subpackage task

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

17 * @version SVN: $Id: sfAppRoutesTask.class.php 23549 2009-11-03 09:10:12Z fabien $

18 */

19 class sfAppRoutesTask extends sfBaseTask

107 foreach ($d as $name => $value)

108 {

109 $defaults .= ($defaults ? "\n".str_repeat(' ', 13) : '').$name.': '.$this->formatValue($value);

110 }

111 $this->log(sprintf('%s %s', $this->formatter->format('Defaults', 'COMMENT'), $defaults));

116 foreach ($r as $name => $value)

117 {

118 $requirements .= ($requirements ? "\n".str_repeat(' ', 13) : '').$name.': '.$this->formatValue($value);

119 }

120 $this->log(sprintf('%s %s', $this->formatter->format('Requirements', 'COMMENT'), $requirements));

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

1 <?php

2 namespace MyPlot;

3

172 $ownerPopup = $this->plugin->getLanguage()->translateString("popup.owner", [$owner]);

173 $paddingSize = floor((strlen($popup) - strlen($ownerPopup)) / 2);

174 $paddingPopup = str_repeat(" ", max(0, -$paddingSize));

175 $paddingOwnerPopup = str_repeat(" ", max(0, $paddingSize));

179 $ownerPopup = $this->plugin->getLanguage()->translateString("popup.available");

180 $paddingSize = floor((strlen($popup) - strlen($ownerPopup)) / 2);

181 $paddingPopup = str_repeat(" ", max(0, -$paddingSize));

182 $paddingOwnerPopup = str_repeat(" ", max(0, $paddingSize));

FileSystem.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 249 lines

1 <?php

2 /**

3 * Copyright © 2016 Magento. All rights reserved.

213 $offset = '';

214 } else {

215 $offset = str_repeat('../', count(explode('/', $toDir)));

216 }

217 return rtrim($offset . dirname($relatedPath), '/');

MultiByte.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 165 lines

1 <?php

2 /**

3 * Zend Framework

147 $lastStringRight = iconv_substr($padString, 0, $lastStringRightLength, $charset);

148

149 $return = str_repeat($padString, $repeatCountLeft) . $lastStringLeft

150 . $input

151 . str_repeat($padString, $repeatCountRight) . $lastStringRight;

154

155 if ($padType === STR_PAD_LEFT) {

156 $return = str_repeat($padString, $repeatCount) . $lastString . $input;

157 } else {

158 $return = $input . str_repeat($padString, $repeatCount) . $lastString;

Self.php (https://github.com/yuya-takeyama/symfony-hackathon-20110924.git) PHP · 116 lines

1 <?php

2 /*

3 * $Id: Self.php 7490 2010-03-29 19:53:27Z jwage $

25 * @package Doctrine

26 * @subpackage Relation

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

28 * @link www.doctrine-project.org

29 * @since 1.0

67 break;

68 case 'collection':

69 $sub = substr(str_repeat('?, ', $count),0,-2);

70 $dql = 'FROM '.$this->definition['refTable']->getComponentName()

71 . '.' . $this->definition['table']->getComponentName()

TypeConversionTest.php (https://github.com/mrtorrent/dbal.git) PHP · 101 lines

1 <?php

2

3 namespace Doctrine\Tests\DBAL\Functional;

5 use Doctrine\DBAL\Types\Type;

6

7 require_once __DIR__ . '/../../TestInit.php';

8

9 class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase

60 array('date', new \DateTime('2010-04-05'), 'DateTime'),

61 array('time', new \DateTime('10:10:10'), 'DateTime'),

62 array('text', str_repeat('foo ', 1000), 'string'),

63 array('array', array('foo' => 'bar'), 'array'),

64 array('object', $obj, 'object'),

86

87 if ($originalValue instanceof \DateTime) {

88 $this->assertInstanceOf($expectedPhpType, $actualDbValue, "The expected type from the conversion to and back from the database should be " . $expectedPhpType);

89 } else {

90 $this->assertInternalType($expectedPhpType, $actualDbValue, "The expected type from the conversion to and back from the database should be " . $expectedPhpType);

PlainContentEncoderTest.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 173 lines

1 <?php

2

3 class Swift_Mime_ContentEncoder_PlainContentEncoderTest extends \SwiftMailerTestCase

88 $encoder->encodeByteStream($os, $is, 0, 50);

89 $this->assertEquals(

90 str_repeat('a ', 25)."\r\n".str_repeat('a ', 25),

91 $collection->content

92 );

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

1 <?php

2 /**

3 * Class for a set of entries for translation and their associated headers

4 *

5 * @version $Id: translations.php 1157 2015-11-20 04:30:11Z dd32 $

6 * @package pomo

7 * @subpackage translations

8 */

9

10 require_once __DIR__ . '/plural-forms.php';

11 require_once __DIR__ . '/entry.php';

233 /**

234 * Adds parentheses to the inner parts of ternary operators in

235 * plural expressions, because PHP evaluates ternary oerators from left to right

236 *

237 * @param string $expression the expression without parentheses

list.php (https://github.com/ButuzGOL/inside_wildflowercms.git) PHP · 307 lines

1 <?php

2 class ListHelper extends AppHelper {

3

123

124 foreach ($data as $i => $node) {

125 $return .= "\n" . str_repeat("\t", $this->_childCount);

126

127 $hasChildren = false;

172 }

173 $return .= '</li>';

174 $return .= "\n" . str_repeat("\t", $this->_childCount) . '</ul>';

175 }

176 $return .= '</li>';

177 }

178 elseif ($node[$model][$right] <> $node[$model][$left] + 1) { // Has some children

179 $return .= "\n" . str_repeat("\t", $this->_childCount) . '<ul>';

180 $this->_childCount++;

181 } else {

class-walker-page.php (https://gitlab.com/VTTE/sitios-vtte) PHP · 236 lines

1 <?php

2 /**

3 * Post API: Walker_Page class

61 $n = '';

62 }

63 $indent = str_repeat( $t, $depth );

64 $output .= "{$n}{$indent}<ul class='children'>{$n}";

65 }

85 $n = '';

86 }

87 $indent = str_repeat( $t, $depth );

88 $output .= "{$indent}</ul>{$n}";

89 }

110 }

111 if ( $depth ) {

112 $indent = str_repeat( $t, $depth );

113 } else {

114 $indent = '';

TextData.php (https://github.com/markn86/moodle.git) PHP · 676 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Calculation;

4

5 use DateTimeInterface;

6 use PhpOffice\PhpSpreadsheet\Shared\Date;

7 use PhpOffice\PhpSpreadsheet\Shared\StringHelper;

8 use PhpOffice\PhpSpreadsheet\Style\NumberFormat;

9

10 class TextData

167 $mask = '$#,##0';

168 if ($decimals > 0) {

169 $mask .= '.' . str_repeat('0', $decimals);

170 } else {

171 $round = 10 ** abs($decimals);

sfDoctrineFormGeneratedTemplate.php (https://github.com/bheneka/gitta.git) PHP · 127 lines

11 * @version SVN: $Id$

12 */

13 abstract class Base<?php echo $this->modelName ?>Form extends <?php echo $this->getFormClassToExtend().PHP_EOL ?>

14 {

15 public function setup()

18 <?php foreach ($this->getColumns() as $column): ?>

19 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => new <?php echo $this->getWidgetClassForColumn($column) ?>(<?php echo $this->getWidgetOptionsForColumn($column) ?>),

20 <?php endforeach; ?>

21 <?php foreach ($this->getManyToManyRelations() as $relation): ?>

22 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>')),

23 <?php endforeach; ?>

27 <?php foreach ($this->getColumns() as $column): ?>

28 '<?php echo $column->getFieldName() ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getFieldName())) ?> => new <?php echo $this->getValidatorClassForColumn($column) ?>(<?php echo $this->getValidatorOptionsForColumn($column) ?>),

29 <?php endforeach; ?>

30 <?php foreach ($this->getManyToManyRelations() as $relation): ?>

31 '<?php echo $this->underscore($relation['alias']) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($relation['alias']).'_list')) ?> => new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $relation['table']->getOption('name') ?>', 'required' => false)),

32 <?php endforeach; ?>

Store.php (https://bitbucket.org/jokusafet/magento2.git) PHP · 508 lines

1 <?php

2 /**

3 * Magento

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

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

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

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

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

22 * @package Mage_Core

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

162 }

163 $values[] = array(

164 'label' => str_repeat($nonEscapableNbspChar, 4) . $store->getName(),

165 'value' => $store->getId()

166 );

AbstractContainer.php (https://github.com/timdev/zf2.git) PHP · 379 lines

1 <?php

2 /**

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

238 {

239 if (is_int($indent)) {

240 $indent = str_repeat(' ', $indent);

241 }

242

273

274 /**

275 * Next Index as defined by the PHP manual

276 *

277 * @return int

Config.php (https://github.com/bobpp/ethna.git) PHP · 198 lines

1 <?php

2 // vim: foldmethod=marker

3 /**

4 * Config.php

5 *

6 * @author Masaki Fujimoto <fujimoto@php.net>

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

8 * @package Ethna

9 * @version $Id: 0ebeba1b7190c9f5f30b6c09704ddb167214b675 $

14 * 設定クラス

15 *

16 * @author Masaki Fujimoto <fujimoto@php.net>

17 * @access public

18 * @package Ethna

SwitchSniff.php (https://github.com/acoulton/coding-standards.git) PHP · 147 lines

10 * @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence

11 * @version CVS: $Id$

12 * @link http://pear.php.net/package/PHP_CodeSniffer

13 */

14

42 * Processes this test, when one of its tokens is encountered.

43 *

44 * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the

45 * document

46 * @param int $stackPtr Position of the current token in the stack passed

48 * @return void

49 */

50 public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)

51 {

52 $tokens = $phpcsFile->getTokens();

sfPropelFormGeneratedTemplate.php (https://github.com/bheneka/gitta.git) PHP · 139 lines

17 <?php foreach ($this->table->getColumns() as $column): ?>

18 '<?php echo $this->translateColumnName($column) ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getName())) ?> => new <?php echo $this->getWidgetClassForColumn($column) ?>(<?php echo $this->getWidgetOptionsForColumn($column) ?>),

19 <?php endforeach; ?>

20 <?php foreach ($this->getManyToManyTables() as $tables): ?>

21 '<?php echo $this->underscore($tables['middleTable']->getClassname()) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($tables['middleTable']->getClassname()).'_list')) ?> => new sfWidgetFormPropelChoice(array('multiple' => true, 'model' => '<?php echo $tables['relatedTable']->getClassname() ?>')),

22 <?php endforeach; ?>

26 <?php foreach ($this->table->getColumns() as $column): ?>

27 '<?php echo $this->translateColumnName($column) ?>'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($column->getName())) ?> => new <?php echo $this->getValidatorClassForColumn($column) ?>(<?php echo $this->getValidatorOptionsForColumn($column) ?>),

28 <?php endforeach; ?>

29 <?php foreach ($this->getManyToManyTables() as $tables): ?>

30 '<?php echo $this->underscore($tables['middleTable']->getClassname()) ?>_list'<?php echo str_repeat(' ', $this->getColumnNameMaxLength() - strlen($this->underscore($tables['middleTable']->getClassname()).'_list')) ?> => new sfValidatorPropelChoice(array('multiple' => true, 'model' => '<?php echo $tables['relatedTable']->getClassname() ?>', 'required' => false)),

31 <?php endforeach; ?>

96 <?php foreach ($this->getManyToManyTables() as $tables): ?>

97 $this->save<?php echo $tables['middleTable']->getPhpName() ?>List($con);

98 <?php endforeach; ?>

string_functions.php (https://github.com/kamarulismail/kamarul-playground.git) PHP · 395 lines

1 <?php

2 /**

3 * File containing the ezcTemplateStringFunctions class

18 {

19 /**

20 * Translates a function used in the Template language to a PHP function call.

21 * The function call is represented by an array with three elements:

22 *

140

141 // str_fill( $s, $len )

142 // str_repeat( $s, $len )

143 case "str_fill": return array( ezcTemplateAstNode::TYPE_VALUE, array( "%string", "%length" ),

144 self::functionCall( "str_repeat", array( "%string", "%length" ) ) );

AdvancedValueBinder.php (https://github.com/sbourget/moodle.git) PHP · 205 lines

1 <?php

2

3 namespace PhpOffice\PhpSpreadsheet\Cell;

4

5 use PhpOffice\PhpSpreadsheet\Calculation\Calculation;

6 use PhpOffice\PhpSpreadsheet\RichText\RichText;

7 use PhpOffice\PhpSpreadsheet\Shared\Date;

8 use PhpOffice\PhpSpreadsheet\Shared\StringHelper;

9 use PhpOffice\PhpSpreadsheet\Style\NumberFormat;

133

134 // Build the number format mask based on the size of the matched values

135 $dividend = str_repeat('?', strlen($matches[3]));

136 $divisor = str_repeat('?', strlen($matches[4]));

Self.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 116 lines

1 <?php

2 /*

3 * $Id: Self.php 48519 2012-02-03 23:18:52Z btowles $

25 * @package Doctrine

26 * @subpackage Relation

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

28 * @link www.doctrine-project.org

29 * @since 1.0

67 break;

68 case 'collection':

69 $sub = substr(str_repeat('?, ', $count),0,-2);

70 $dql = 'FROM '.$this->definition['refTable']->getComponentName()

71 . '.' . $this->definition['table']->getComponentName()

tag.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 246 lines

1 <?php

2 /**

3 * @package Joomla.Libraries

201 {

202 $repeat = (isset($option->level) && $option->level - 1 >= 0) ? $option->level - 1 : 0;

203 $option->text = str_repeat('- ', $repeat) . $option->text;

204 }

205 }

ListTrait.php (https://gitlab.com/Griffolion/Game-Embargo-Tracker) PHP · 182 lines

1 <?php

2 /**

3 * @copyright Copyright (c) 2014 Carsten Brandt

83 if (preg_match($type == 'ol' ? '/^( {0,'.$leadSpace.'})(\d+)\.[ \t]+/' : '/^( {0,'.$leadSpace.'})\\'.$marker.'[ \t]+/', $line, $matches)) {

84 if (($len = substr_count($matches[0], "\t")) > 0) {

85 $indent = str_repeat("\t", $len);

86 $line = substr($line, strlen($matches[0]));

87 } else {

88 $len = strlen($matches[0]);

89 $indent = str_repeat(' ', $len);

90 $line = substr($line, $len);

91 }

EmbeddedPhpSniff.php (https://github.com/squizlabs/PHP_CodeSniffer.git) PHP · 402 lines

47 $closeTag = $phpcsFile->findNext(T_CLOSE_TAG, $stackPtr);

48 if ($closeTag === false || $tokens[$stackPtr]['line'] !== $tokens[$closeTag]['line']) {

49 $this->validateMultilineEmbeddedPhp($phpcsFile, $stackPtr);

50 } else {

51 $this->validateInlineEmbeddedPhp($phpcsFile, $stackPtr);

185 }

186

187 $phpcsFile->fixer->addContentBefore($stackPtr, $phpcsFile->eolChar.str_repeat(' ', $padding));

188 }

189 } else {

291 * Validates embedded PHP that exists on one line.

292 *

293 * @param \PHP_CodeSniffer\Files\File $phpcsFile The file being scanned.

294 * @param int $stackPtr The position of the current token in the

295 * stack passed in $tokens.

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

1 <?php

2

3 /**

28 $this->counter = 1;

29 if (is_null($nonce)) {

30 $nonce = str_repeat("\0", 12);

31 }

32 $this->nonce = str_pad($nonce, 12, "\0", STR_PAD_RIGHT);;

33 $this->_pad = str_repeat("\0", 4);

34 }

35

40 {

41 $this->counter = 1;

42 $this->_pad = str_repeat("\0", 4);

43 return $this;

44 }

parser.php (https://github.com/Yacodo/atoum.git) PHP · 699 lines

1 <?php

2

3 namespace mageekguy\atoum\tests\units\template;

9 ;

10

11 require_once __DIR__ . '/../../runner.php';

12

13 class parser extends atoum\test

36 ;

37

38 $parser = new template\parser($namespace = rand(1, PHP_INT_MAX));

39

40 $this->assert

365 ;

366

367 $adapter->file_get_contents = ($eols = str_repeat("\n", rand(1, 10))) . ($spaces = str_repeat(' ', rand(1, 10))) . ($firstTag = '<' . template\parser::defaultNamespace . ':' . $tag . '>');

368

369 $this->assert

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

1 <?php

2

3 if (class_exists('ParagonIE_Sodium_Core_ChaCha20', false)) {

121 for (;;) {

122 if ($bytes < 64) {

123 $message .= str_repeat("\x00", 64 - $bytes);

124 }

125

334 return self::encryptBytes(

335 new ParagonIE_Sodium_Core_ChaCha20_Ctx($key, $nonce),

336 str_repeat("\x00", $len)

337 );

338 }

352 return self::encryptBytes(

353 new ParagonIE_Sodium_Core_ChaCha20_IetfCtx($key, $nonce),

354 str_repeat("\x00", $len)

355 );

356 }

TokenStream.php (https://gitlab.com/madwanz64/laravel) PHP · 281 lines

1 <?php declare(strict_types=1);

2

3 namespace PhpParser\Internal;

240 // TODO Handle non-space indentation

241 if ($indent < 0) {

242 $result .= str_replace("\n" . str_repeat(" ", -$indent), "\n", $content);

243 } elseif ($indent > 0) {

244 $result .= str_replace("\n", "\n" . str_repeat(" ", $indent), $content);

helpers.php (https://gitlab.com/valced/anchor-cms) PHP · 80 lines

1 <?php

2

3 /**

4 * Nano

5 *

6 * Just another php framework

7 *

8 * @package nano

56 $pool = 'abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';

57

58 return substr(str_shuffle(str_repeat($pool, 3)), 0, $size);

59 }

60

DataFormatter.php (https://bitbucket.org/ndj/piecrust.git) PHP · 317 lines

121

122 // Render the data!

123 echo PHP_EOL . $this->getIndent() . '<div style="' . DataStyles::CSS_DATABLOCK . '">' . PHP_EOL;

124 $this->indent++;

125 // Render any included object methods or properties.

165 if ($classParams['documentation'])

166 {

167 echo $this->getIndent() . '<span style="' . DataStyles::CSS_DOC . '">' . $classParams['documentation'] . '</span>' . PHP_EOL;

168 }

169

170 // Start inspecting the object's methods and properties, and format

171 // them along the way.

172 echo PHP_EOL . $this->getIndent() . '<div style="' . DataStyles::CSS_DATABLOCK . '">' . PHP_EOL;

173 $this->indent++;

174

Row.php (https://github.com/alab1001101/zf2.git) PHP · 217 lines

1 <?php

2 /**

3 * Zend Framework

190 array_sum(array_slice($columnWidths,

191 $colNum));

192 $renderedColumns[] = array(str_repeat(' ', $remainingWidth));

193

194 $this->_columnWidths[] = $remainingWidth;

204 $result .= $renderedColumn[$line];

205 } else {

206 $result .= str_repeat(' ', strlen($renderedColumn[0]));

207 }

208

program.php (https://bitbucket.org/crevillo/enetcall.git) PHP · 298 lines

1 <?php

2 /**

3 * File containing the ezcTemplateProgramSourceToTstParser class

178 $block = $block->parentBlock;

179 --$level;

180 $parents[] = str_repeat( " ", $level ) . "{" . $block->name . "} @ {$block->startCursor->line}:{$block->startCursor->column}:";

181 }

182

CallCenter.php (https://gitlab.com/Japang-Jawara/jawara-penilaian) PHP · 248 lines

1 <?php

2

3 /*

63 {

64 // For efficiency exclude 'args' from the generated backtrace

65 if (PHP_VERSION_ID >= 50400) {

66 // Limit backtrace to last 3 calls as we don't use the rest

67 // Limit argument was introduced in PHP 5.4.0

68 $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);

69 } elseif (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {

70 // DEBUG_BACKTRACE_IGNORE_ARGS was introduced in PHP 5.3.6

71 $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);

72 } else {

222 '/^/m',

223 function () use ($indentationLength) {

224 return str_repeat(' ', $indentationLength);

225 },

226 $arguments

json.php (https://github.com/busaway/FoOlSlide.git) PHP · 220 lines

1 <?php

2

3 /**

132 * Formats a JSON string for readability.

133 *

134 * From @link http://php.net/manual/en/function.json-encode.php

135 *

136 * @param string $json Unformatted JSON

161 if(!$in_string)

162 {

163 $new_json .= $char . "\n" . str_repeat($tab, $indent_level+1);

164 $indent_level++;

165 }

174 {

175 $indent_level--;

176 $new_json .= "\n" . str_repeat($tab, $indent_level) . $char;

177 }

178 else

EntryTest.php (https://github.com/leerbag/zf2.git) PHP · 232 lines

1 <?php

2 /**

3 * Zend Framework

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

36 */

37 class EntryTest extends \PHPUnit_Framework_TestCase

38 {

39

60 {

61 $entry = new Writer\Entry;

62 $entry->setItunesBlock(str_repeat('a', 256));

63 }

64

193 $entry = new Writer\Entry;

194 $words = array(

195 str_repeat('a', 253), str_repeat('b', 2)

196 );

197 $entry->setItunesKeywords($words);

Category.php (https://github.com/charles-marion/itk-migrationfaq.git) PHP · 211 lines

1 <?php

2 /**

3 * Helper class for phpMyFAQ categories

4 *

5 * @package phpMyFAQ

33 * @author Thorsten Rinne <thorsten@phpmyfaq.de>

34 * @since 2009-09-07

35 * @copyright 2009 phpMyFAQ Team

36 */

37 class PMF_Helper_Category extends PMF_Helper

127 $output .= '</li>';

128 }

129 $output .= "\n".str_repeat("\t", $level + 2)."</ul>\n".str_repeat("\t", $level + 1)."</li>\n";

130 } elseif ($level == $open && $y != 0) {

131 $output .= "</li>\n";

DefaultValue.php (https://github.com/eschabell/openshift-zendframework.git) PHP · 325 lines

24 * @see Zend_CodeGenerator_Php_Abstract

25 */

26 require_once 'Zend/CodeGenerator/Php/Abstract.php';

27

28 /**

289 if (count($value) > 1) {

290 $curArrayMultiblock = true;

291 $output .= PHP_EOL . str_repeat($this->_indentation, $this->_arrayDepth+1);

292 }

293 $outputParts = array();

307 $output .= implode(',' . PHP_EOL . str_repeat($this->_indentation, $this->_arrayDepth+1), $outputParts);

308 if ($curArrayMultiblock == true) {

309 $output .= PHP_EOL . str_repeat($this->_indentation, $this->_arrayDepth+1);

310 }

311 $output .= ')';

313 case self::TYPE_OTHER:

314 default:

315 require_once "Zend/CodeGenerator/Php/Exception.php";

316 throw new Zend_CodeGenerator_Php_Exception(

sfServiceContainerDumperXml.php (https://bitbucket.org/khuongduybui/openfisma.git) PHP · 213 lines

1 <?php

2

3 /*

125 protected function convertParameters($parameters, $type='parameter', $depth = 2)

126 {

127 $white = str_repeat(' ', $depth);

128 $xml = '';

129 $withKeys = array_keys($parameters) !== range(0, count($parameters) - 1);

149 }

150

151 $xml .= sprintf("%s<%s%s%s>%s</%s>\n", $white, $type, $key, $attributes, self::phpToXml($value), $type);

152 }

153 }

193 }

194

195 static public function phpToXml($value)

196 {

197 switch (true)

Profile.php (https://github.com/komola/ZendFramework.git) PHP · 237 lines

1 <?php

2 /**

3 * Zend Framework

24 * @see Zend_Tool_Project_Profile_FileParser_Xml

25 */

26 require_once 'Zend/Tool/Project/Profile/FileParser/Xml.php';

27

28 /**

29 * @see Zend_Tool_Project_Profile_Resource_Container

30 */

31 require_once 'Zend/Tool/Project/Profile/Resource/Container.php';

32

33 /**

83 public function getIterator()

84 {

85 require_once 'Zend/Tool/Project/Profile/Iterator/EnabledResourceFilter.php';

86

87 return new RecursiveIteratorIterator(

Column.php (https://github.com/su2921iw/ma3.git) PHP · 243 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: Column.php 16209 2009-06-21 19:20:34Z thomas $

20 */

21

23 * @see Zend_Text_Table

24 */

25 require_once 'Zend/Text/Table.php';

26

27 /**

28 * @see Zend_Text_MultiByte

29 */

30 require_once 'Zend/Text/MultiByte.php';

31

32 /**

PlainContentEncoderTest.php (https://gitlab.com/techniconline/kmc) PHP · 173 lines

1 <?php

2

3 class Swift_Mime_ContentEncoder_PlainContentEncoderTest extends \SwiftMailerTestCase

88 $encoder->encodeByteStream($os, $is, 0, 50);

89 $this->assertEquals(

90 str_repeat('a ', 25) . "\r\n" . str_repeat('a ', 25),

91 $collection->content

92 );