100+ results for 'php gettype'
Not the results you expected?
BinaryTest.php (https://github.com/Exercise/zf2.git) PHP · 352 lines
1 <?php
2 /**
3 * Zend Framework
35 * @group Zend_Measure
36 */
37 class BinaryTest extends \PHPUnit_Framework_TestCase
38 {
39 /**
280 $value = new Measure\Binary('-100',Measure\Binary::STANDARD,'de');
281 $value->setType(Measure\Binary::GIGABYTE);
282 $this->assertEquals(Measure\Binary::GIGABYTE, $value->getType(), 'Zend\Measure\Binary type expected');
283 }
291 $value = new Measure\Binary('-100',Measure\Binary::MEGABYTE,'de');
292 $value->setType(Measure\Binary::TERABYTE);
293 $this->assertEquals(Measure\Binary::TERABYTE, $value->getType(), 'Zend\Measure\Binary type expected');
294 }
Api.php (https://github.com/speedupmate/Magento-CE-Mirror.git) PHP · 329 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_Checkout
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 */
87 if (!empty($errors)) {
88 $this->_fault("add_product_fault", implode(PHP_EOL, $errors));
89 }
Select.php (https://bitbucket.org/dnejedly/eaparts.git) PHP · 316 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
23 * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
312 Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO
313 );
314 return in_array($this->getOption()->getType(), $_single);
315 }
316 }
UserQuery.php (https://github.com/Riges/KawaiViewModel.git) PHP · 355 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: UserQuery.php 24593 2012-01-05 20:35:02Z matthew $
22 */
25 * @see Zend_Gdata_Gapps_Query
26 */
27 require_once('Zend/Gdata/Gapps/Query.php');
29 /**
120 * @return string type
121 */
122 public function getType()
123 {
124 return $this->_type;
Log.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 258 lines
✨ Summary
This Java code generates a log of changes made to a SVN repository. It takes a list of paths, a start and end revision, and prints out the author, date, and log message for each change. Additionally, it displays the changed paths and their type (added, deleted, or modified). The output is printed to the console.
This Java code generates a log of changes made to a SVN repository. It takes a list of paths, a start and end revision, and prints out the author, date, and log message for each change. Additionally, it displays the changed paths and their type (added, deleted, or modified). The output is printed to the console.
commandbuilder.h (https://github.com/SwissCheeseKnife/Protocol-7.git) C Header · 402 lines
213 Vector4D transformation[2];
214 IMaterialVar* pTransformationVar = Param( transformVar );
215 if (pTransformationVar && (pTransformationVar->GetType() == MATERIAL_VAR_TYPE_MATRIX))
216 {
217 const VMatrix &mat = pTransformationVar->GetMatrixValue();
232 Vector4D transformation[2];
233 IMaterialVar* pTransformationVar = Param( transformVar );
234 if (pTransformationVar && (pTransformationVar->GetType() == MATERIAL_VAR_TYPE_MATRIX))
235 {
236 const VMatrix &mat = pTransformationVar->GetMatrixValue();
248 if (pScaleVar)
249 {
250 if (pScaleVar->GetType() == MATERIAL_VAR_TYPE_VECTOR)
251 pScaleVar->GetVecValue( scale.Base(), 2 );
252 else if (pScaleVar->IsDefined())
ConfigListener.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 383 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
280 . 'implement the \Traversable interface, or be an '
281 . 'instance of Zend\Config\Config. %s given.',
282 __CLASS__, __METHOD__, gettype($paths))
283 );
284 }
302 throw new Exception\InvalidArgumentException(
303 sprintf('Parameter to %s::%s() must be a string; %s given.',
304 __CLASS__, __METHOD__, gettype($path))
305 );
306 }
325 sprintf('Config being merged must be an array, '
326 . 'implement the \Traversable interface, or be an '
327 . 'instance of Zend\Config\Config. %s given.', gettype($config))
328 );
329 }
ConfigListener.php (https://bitbucket.org/zbahij/eprojets_app.git) PHP · 383 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
280 . 'implement the Traversable interface, or be an '
281 . 'instance of Zend\Config\Config. %s given.',
282 __CLASS__, __METHOD__, gettype($paths))
283 );
284 }
302 throw new Exception\InvalidArgumentException(
303 sprintf('Parameter to %s::%s() must be a string; %s given.',
304 __CLASS__, __METHOD__, gettype($path))
305 );
306 }
325 sprintf('Config being merged must be an array, '
326 . 'implement the Traversable interface, or be an '
327 . 'instance of Zend\Config\Config. %s given.', gettype($config))
328 );
329 }
InterceptingProxyFactory.cs (https://github.com/lundbeck/n2cms.git) C# · 212 lines
88 var accessor = property.Attribute as IValueAccessor;
89 if (accessor == null)
90 throw new InvalidOperationException("The property '" + propertyName + "' has an attribute '" + property.Attribute.GetType() + "' which specifices PropertyPersistenceLocation.ValueAccessor but the attribute doesn't implement IValueAccessor");
92 yield return (interceptable) => StoreValueAccessorValue(pi, getter, setter, accessor, interceptable);
199 Tuple tuple;
200 if (!types.TryGetValue(instance.GetType().FullName, out tuple))
201 return false;
ExternalVideoEntryConverterTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 237 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
9 use Magento\ProductVideo\Model\Product\Attribute\Media\ExternalVideoEntryConverter;
11 class ExternalVideoEntryConverterTest extends \PHPUnit_Framework_TestCase
12 {
13 /**
14 * @var \PHPUnit_Framework_MockObject_MockObject
15 * |\Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterfaceFactory
16 */
19 /**
20 * @var \PHPUnit_Framework_MockObject_MockObject
21 * |\Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface
22 */
ChoiceFormFieldTest.php (https://github.com/yuchimiri/symfony.git) PHP · 286 lines
42 $field = new ChoiceFormField($node);
44 $this->assertEquals('radio', $field->getType(), '->getType() returns radio for radio buttons');
46 $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name', 'value' => 'foo'));
47 $field = new ChoiceFormField($node);
49 $this->assertEquals('checkbox', $field->getType(), '->getType() returns radio for a checkbox');
51 $node = $this->createNode('select', '');
52 $field = new ChoiceFormField($node);
54 $this->assertEquals('select', $field->getType(), '->getType() returns radio for a select');
55 }
Boolean.php (https://github.com/bruisedlee/zf2.git) PHP · 373 lines
1 <?php
2 /**
3 * Zend Framework
43 const EMPTY_ARRAY = 32;
44 const NULL = 64;
45 const PHP = 127;
46 const FALSE_STRING = 128;
47 const YES = 256;
56 self::EMPTY_ARRAY => 'array',
57 self::NULL => 'null',
58 self::PHP => 'php',
59 self::FALSE_STRING => 'false',
60 self::YES => 'yes',
67 * @var integer
68 */
69 protected $_type = self::PHP;
71 /**
UserQuery.php (https://github.com/praveensingh85/MyEventDashboard1.git) PHP · 355 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: UserQuery.php 20096 2010-01-06 02:05:09Z bkarwin $
22 */
25 * @see Zend_Gdata_Gapps_Query
26 */
27 require_once('Zend/Gdata/Gapps/Query.php');
29 /**
120 * @return string type
121 */
122 public function getType()
123 {
124 return $this->_type;
Clinic.php (https://gitlab.com/jeamar1234/medicloud) PHP · 242 lines
1 <?php
3 use Illuminate\Auth\UserTrait;
76 }
78 public function Nearby1($lat,$lng,$radius,$getType){
79 $clinicData = DB::table('clinic')
80 ->join('clinic_types_detail', 'clinic.ClinicID', '=', 'clinic_types_detail.ClinicID')
92 ->where("clinic_types.Active","=",1)
93 ->where("clinic_types_detail.Active","=",1)
94 ->where("clinic_types_detail.ClinicTypeID","=",$getType)
95 ->having("distance", "<", $radius)
96 ->orderBy("distance","ASC")
99 return $clinicData;
100 }
101 public function Nearby($lat,$lng,$radius,$getType){
102 $clinicData = DB::table('clinic')
103 ->join('clinic_types_detail', 'clinic.ClinicID', '=', 'clinic_types_detail.ClinicID')
Column.php (https://gitlab.com/techniconline/kmc) PHP · 494 lines
Abstract.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 418 lines
_bisect.cs (https://github.com/kumaryu/IronLanguages-main.git) C# · 240 lines
126 // use the 1st index to determine the type - we're assuming lists are
127 // homogeneous
128 return CompilerHelpers.GetType(PythonOps.GetIndex(context, a, 0));
129 }
130 return typeof(object);
135 // use the 1st index to determine the type - we're assuming lists are
136 // homogeneous
137 return CompilerHelpers.GetType(a[0]);
138 }
139 return typeof(object);
VariableUsage.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 112 lines
✨ Summary
This Java class represents a variable usage in a PHP document, containing information such as variable name, declaration source offset, and line/column numbers. It provides methods to access this information, compare variable usages, and determine if one variable is declared before another. The class also overrides the equals
and hashCode
methods for proper object comparison.
This Java class represents a variable usage in a PHP document, containing information such as variable name, declaration source offset, and line/column numbers. It provides methods to access this information, compare variable usages, and determine if one variable is declared before another. The class also overrides the equals
and hashCode
methods for proper object comparison.
1 package net.sourceforge.phpdt.internal.compiler.ast.declarations;
3 import net.sourceforge.phpdt.internal.compiler.ast.Type;
5 /**
6 * A variable usage. This describe a variable declaration in a php document and his starting offset
7 *
8 * @author Matthieu Casanova
102 }
104 public Type getType() {
105 return type;
106 }
PrettyPrinterAbstract.php (https://gitlab.com/x33n/PHP-Parser) PHP · 268 lines
1 <?php
3 namespace PhpParser;
5 use PhpParser\Node\Expr;
6 use PhpParser\Node\Stmt;
106 /**
107 * Pretty prints a file of statements (includes the opening <?php tag if it is required).
108 *
109 * @param Node[] $stmts Array of statements
116 $p = preg_replace('/^\?>\n?/', '', $p, -1, $count);
117 $p = preg_replace('/<\?php$/', '', $p);
119 if (!$count) {
Link.java (https://bitbucket.org/haris_peco/debrief.git) Java · 424 lines
11 *
12 * You can obtain a copy of the LGPL 2.1 license at
13 * http://www.opensource.org/licenses/lgpl-2.1.php
14 *
15 * You can obtain a copy of the CDDL 1.0 license at
16 * http://www.opensource.org/licenses/cddl1.php
17 *
18 * You can obtain a copy of the EPL 1.0 license at
19 * http://www.opensource.org/licenses/eclipse-1.0.php
20 *
21 * See the Licenses for the specific language governing permissions and
ChoiceFormField.php (https://gitlab.com/rocs/Streaming-Safe-for-Kids) PHP · 324 lines
Local.php (https://gitlab.com/dzakiafif/cokelatklasik) PHP · 401 lines
tour_filter.feature (https://github.com/markn86/moodle.git) Gherkin Specification · 229 lines
24 | Name | First tour |
25 | Description | My first tour |
26 | Apply to URL match | /course/view.php% |
27 | Tour is enabled | 1 |
28 | Role | Student,Non-editing teacher |
29 And I add steps to the "First tour" tour:
30 | targettype | Title | Content |
31 | Display in middle of page | Welcome | Welcome to your course tour.|
32 And I log out
65 | Name | First tour |
66 | Description | My first tour |
67 | Apply to URL match | /course/view.php% |
68 | Tour is enabled | 1 |
69 | Category | MainCat |
index.js (https://gitlab.com/skmexyz/SortableCodingChallenge) JavaScript · 258 lines
40 var DEPRECATED_KEYS = /*istanbul ignore next*/exports.DEPRECATED_KEYS = {};
42 function getType(val) {
43 if (Array.isArray(val)) {
44 return "array";
146 var type = _ref2;
148 if (getType(val) === type || t.is(type, val)) {
149 valid = true;
150 break;
164 function assertValueType(type) {
165 function validate(node, key, val) {
166 var valid = getType(val) === type;
168 if (!valid) {
UserQuery.php (https://github.com/basdog22/Qool.git) PHP · 355 lines
1 <?php
3 /**
19 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
21 * @version $Id: UserQuery.php 24594 2012-01-05 21:27:01Z matthew $
22 */
25 * @see Zend_Gdata_Gapps_Query
26 */
27 require_once('Zend/Gdata/Gapps/Query.php');
29 /**
120 * @return string type
121 */
122 public function getType()
123 {
124 return $this->_type;
AbstractWriter.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 353 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
133 'Filter must implement %s\Filter\FilterInterface; received "%s"',
134 __NAMESPACE__,
135 is_object($filter) ? get_class($filter) : gettype($filter)
136 ));
137 }
170 'Writer plugin manager must extend %s\FilterPluginManager; received %s',
171 __NAMESPACE__,
172 is_object($plugins) ? get_class($plugins) : gettype($plugins)
173 ));
174 }
220 'Writer plugin manager must extend %s\FormatterPluginManager; received %s',
221 __NAMESPACE__,
222 is_object($plugins) ? get_class($plugins) : gettype($plugins)
223 )
224 );
DiscriminatorColumnLineParserTest.java (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Java · 209 lines
1 package org.netbeans.modules.php.doctrine2.annotations.orm.parser;
3 import java.util.Map;
4 import org.netbeans.junit.NbTestCase;
5 import org.netbeans.modules.csl.api.OffsetRange;
6 import org.netbeans.modules.php.spi.annotation.AnnotationLineParser;
7 import org.netbeans.modules.php.spi.annotation.AnnotationParsedLine;
8 import org.netbeans.modules.php.spi.annotation.AnnotationParsedLine.ParsedLine;
10 /*
95 assertEquals("DiscriminatorColumn", parsedLine.getName());
96 assertEquals("", parsedLine.getDescription());
97 Map<OffsetRange, String> types = parsedLine.getTypes();
98 for (Map.Entry<OffsetRange, String> entry : types.entrySet()) {
99 OffsetRange offsetRange = entry.getKey();
SafeSQL.php (https://gitlab.com/igorbabko/mindk) PHP · 337 lines
1 <?php
2 /**
3 * File /framework/database/SafeSql.php contains the SafeSql class
4 * which provides secure interaction with database.
5 *
6 * PHP version 5
7 *
8 * @package Framework\Database
299 throw new SafeSqlException(
300 500,
301 "<strong>Internal server error:</strong> number (?n) placeholder expects numeric value, ".gettype(
302 $value
303 )." given"
smpl_Quote_Sample.php (https://gitlab.com/tjaafar/SuiteCRM) PHP · 142 lines
class.cairosvgsurface.html (https://github.com/cue-taro/emacs-setting-files.git) HTML · 189 lines
10 <div class="next" style="text-align: right; float: right;"><a href="cairosvgsurface.construct.html">CairoSvgSurface::__construct</a></div>
11 <div class="up"><a href="book.cairo.html">Cairo</a></div>
12 <div class="home"><a href="index.html">PHP Manual</a></div>
13 </div><hr /><div id="class.cairosvgsurface" class="reference">
105 )</div>
106 <div class="methodsynopsis dc-description">
107 <span class="modifier">public</span> <span class="type">int</span> <span class="methodname"><a href="cairosurface.gettype.html" class="methodname">CairoSurface::getType</a></span>
108 ( <span class="methodparam">void</span>
109 )</div>
186 <div class="next" style="text-align: right; float: right;"><a href="cairosvgsurface.construct.html">CairoSvgSurface::__construct</a></div>
187 <div class="up"><a href="book.cairo.html">Cairo</a></div>
188 <div class="home"><a href="index.html">PHP Manual</a></div>
189 </div></body></html>
Vector.class.php (https://github.com/treuter/xp-framework.git) PHP · 308 lines
1 <?php
2 /* This class is part of the XP framework
3 *
51 * Returns an iterator for use in foreach()
52 *
53 * @see php://language.oop5.iterations
54 * @return php.Iterator
83 $this->add($value);
84 } else {
85 throw new IllegalArgumentException('Incorrect type '.gettype($offset).' for index');
86 }
87 }
TSqlMapGateway.php (https://bitbucket.org/volatileeight/prado.git) PHP · 259 lines
Event.php (https://gitlab.com/aredhel-bazaar/la-taverne-du-hasard) PHP · 466 lines
PressureTest.php (https://github.com/devilsansclue/ZendFramework.git) PHP · 401 lines
1 <?php
2 /**
3 * Zend Framework
25 * Zend_Measure_Pressure
26 */
27 require_once 'Zend/Measure/Pressure.php';
29 /**
35 * @group Zend_Measure
36 */
37 class Zend_Measure_PressureTest extends PHPUnit_Framework_TestCase
38 {
39 /**
311 $value = new Zend_Measure_Pressure('-100',Zend_Measure_Pressure::STANDARD,'de');
312 $value->setType(Zend_Measure_Pressure::TON_PER_SQUARE_FOOT);
313 $this->assertEquals(Zend_Measure_Pressure::TON_PER_SQUARE_FOOT, $value->getType(), 'Zend_Measure_Pressure type expected');
314 }
multipolygon.js (https://gitlab.com/wanderinghogan/cesium-heatmap) JavaScript · 434 lines
mysqli_stmt_affected_rows.php (https://gitlab.com/iranjith4/hhvm) PHP · 231 lines
1 <?php
2 require_once("connect.inc");
22 if (0 !== ($tmp = mysqli_stmt_affected_rows($stmt)))
23 printf("[005] Expecting int/0, got %s/'%s'\n", gettype($tmp), $tmp);
25 mysqli_stmt_close($stmt);
39 if (1 !== ($tmp = mysqli_stmt_affected_rows($stmt)))
40 printf("[008] Expecting int/1, got %s/%s\n", gettype($tmp), $tmp);
42 mysqli_stmt_close($stmt);
50 /* an error occurred: affected rows should return -1 */
51 if (-1 !== ($tmp = mysqli_stmt_affected_rows($stmt)))
52 printf("[010] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp);
54 mysqli_stmt_close($stmt);
PrettyPrinterAbstract.php (https://gitlab.com/xolotsoft/pumasruiz) PHP · 262 lines
118 * Preprocesses the top-level nodes to initialize pretty printer state.
119 *
120 * @param PHPParser_Node[] $nodes Array of nodes
121 */
122 protected function preprocessNodes(array $nodes) {
143 $pNodes[] = $this->pComments($node->getAttribute('comments', array()))
144 . $this->p($node)
145 . ($node instanceof PHPParser_Node_Expr ? ';' : '');
146 }
168 }
170 protected function pInfixOp($type, PHPParser_Node $leftNode, $operatorString, PHPParser_Node $rightNode) {
171 list($precedence, $associativity) = $this->precedenceMap[$type];
TemperatureTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 447 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: TemperatureTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
23 if (!defined('PHPUnit_MAIN_METHOD')) {
24 define('PHPUnit_MAIN_METHOD', 'Zend_Measure_TemperatureTest::main');
28 * Zend_Measure_Temperature
29 */
30 require_once 'Zend/Measure/Temperature.php';
32 /**
FlashMessenger.php (https://github.com/tmccormi/openemr.git) PHP · 353 lines
Indexer.php (https://bitbucket.org/acidel/buykoala.git) PHP · 309 lines
1 <?php
2 /**
3 * Magento
8 * that is bundled with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://opensource.org/licenses/osl-3.0.php
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
22 * @package Mage_Catalog
23 * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
24 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25 */
35 * @method int getAttributeSetId()
36 * @method Mage_Catalog_Model_Product_Flat_Indexer setAttributeSetId(int $value)
37 * @method string getTypeId()
38 * @method Mage_Catalog_Model_Product_Flat_Indexer setTypeId(string $value)
39 * @method string getSku()
FCDAnimation.h (https://bitbucket.org/barakianc/nvidia-physx-and-apex-in-gge.git) C Header · 156 lines
4 Copyright (C) 2005-2007 Sony Computer Entertainment America
6 MIT License: http://www.opensource.org/licenses/mit-license.php
7 */
8 /*
10 Copyright (C) 2005-2006 Feeling Software Inc
11 Copyright (C) 2005-2006 Autodesk Media Entertainment
12 MIT License: http://www.opensource.org/licenses/mit-license.php
13 */
73 This function is a part of the FCDEntity interface.
74 @return The entity class type: ANIMATION. */
75 virtual Type GetType() const { return ANIMATION; }
77 /** Retrieves the parent of the animation structure.
vfsStreamFileTestCase.php (https://github.com/theosp/google_appengine.git) PHP · 278 lines
1 <?php
2 /**
3 * This file is part of vfsStream.
12 * Test for org\bovigo\vfs\vfsStreamFile.
13 */
14 class vfsStreamFileTestCase extends \PHPUnit_Framework_TestCase
15 {
16 /**
36 public function defaultValues()
37 {
38 $this->assertEquals(vfsStreamContent::TYPE_FILE, $this->file->getType());
39 $this->assertEquals('foo', $this->file->getName());
40 $this->assertTrue($this->file->appliesTo('foo'));
NullTest.php (https://github.com/bruisedlee/zf2.git) PHP · 329 lines
Reference.php (https://gitlab.com/devtoannh/cafe) PHP · 303 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: Reference.php 23775 2011-03-01 17:25:24Z ralph $
20 */
23 /** Internally used classes */
24 require_once 'Zend/Pdf/Element/Null.php';
27 /** Zend_Pdf_Element */
28 require_once 'Zend/Pdf/Element.php';
30 /**
Test.php (https://github.com/shin2/concrete5.git) PHP · 238 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Http
17 * @subpackage Client_Adapter
18 * @version $Id: Test.php 23775 2011-03-01 17:25:24Z ralph $
19 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
24 * @see Zend_Uri_Http
25 */
26 require_once 'Zend/Uri/Http.php';
27 /**
28 * @see Zend_Http_Response
29 */
30 require_once 'Zend/Http/Response.php';
31 /**
32 * @see Zend_Http_Client_Adapter_Interface
orderdocument.php (https://gitlab.com/neuser/bitrix-core) PHP · 621 lines
Fault.cs (https://github.com/pruiz/mono.git) C# · 224 lines
ListenerOptions.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 396 lines
dumper.php (https://github.com/nigeldaley/moodle.git) PHP · 360 lines
1 <?php
2 /**
3 * base include file for SimpleTest
27 */
28 function describeValue($value) {
29 $type = $this->getType($value);
30 switch($type) {
31 case "Null":
51 * @access public
52 */
53 function getType($value) {
54 if (! isset($value)) {
55 return "Null";
105 */
106 function _isTypeMatch($first, $second) {
107 return ($this->getType($first) == $this->getType($second));
108 }
AbstractWriter.php (https://bitbucket.org/alexandretaz/maniac_divers.git) PHP · 334 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
135 'Writer must implement %s\Filter\FilterInterface; received "%s"',
136 __NAMESPACE__,
137 is_object($filter) ? get_class($filter) : gettype($filter)
138 ));
139 }
172 'Writer plugin manager must extend %s\FilterPluginManager; received %s',
173 __NAMESPACE__,
174 is_object($plugins) ? get_class($plugins) : gettype($plugins)
175 ));
176 }
221 'Writer plugin manager must extend %s\FormatterPluginManager; received %s',
222 __NAMESPACE__,
223 is_object($plugins) ? get_class($plugins) : gettype($plugins)
224 ));
225 }
Service.php (https://github.com/sendtogeo/Seo-Panel.git) PHP · 287 lines
MappingTest.php (https://bitbucket.org/openplacement/sherlock.git) PHP · 306 lines
1 <?php
2 namespace Sherlock\tests;
6 /**
7 * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-02-07 at 03:12:53.
8 */
9 class MappingTest extends \PHPUnit_Framework_TestCase
91 $mapping = Sherlock::mappingBuilder('testType')->String()->field('testField');
92 $data = $mapping->toJSON();
93 $this->assertEquals("testType", $mapping->getType());
94 $expected = '{"testField":{"type":"string"}}';
95 $this->assertEquals($expected, $data);
Column.php (https://github.com/kimhemsoe/dbal.git) PHP · 487 lines
methodsTest.php (https://github.com/istos/DrupalRooms.git) PHP · 365 lines
2 require_once('../geoPHP.inc');
3 require_once('PHPUnit/Autoload.php');
5 class MethodsTests extends PHPUnit_Framework_TestCase {
15 $format = $parts[1];
16 $value = file_get_contents('./input/'.$file);
17 $geometry = geoPHP::load($value, $format);
19 $methods = array(
291 function _methods_tester_with_geos($geometry) {
292 // Cannot test methods if GEOS is not intstalled
293 if (!geoPHP::geosInstalled()) return;
295 $methods = array(
308 foreach ($methods as $method) {
309 // Turn GEOS on
310 geoPHP::geosInstalled(TRUE);
311 $geos_result = $geometry->$method();
TorqueTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 389 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: TorqueTest.php 24593 2012-01-05 20:35:02Z matthew $
21 */
25 * Zend_Measure_Torque
26 */
27 require_once 'Zend/Measure/Torque.php';
29 /**
35 * @group Zend_Measure
36 */
37 class Zend_Measure_TorqueTest extends PHPUnit_Framework_TestCase
38 {
39 /**
TransformerAbstract.php (https://gitlab.com/Pasantias/pasantiasASLG) PHP · 276 lines
NumberTest.php (https://github.com/leerbag/zf2.git) PHP · 256 lines
1 <?php
2 /**
3 * Zend Framework
34 * @group Zend_Measure
35 */
36 class NumberTest extends \PHPUnit_Framework_TestCase
37 {
38 /**
149 $value = new Measure\Number('-100',Measure\Number::STANDARD,'de');
150 $value->setType(Measure\Number::BINARY);
151 $this->assertEquals(Measure\Number::BINARY, $value->getType(), 'Zend\Measure\Number type expected');
152 $value->setType(Measure\Number::ROMAN);
153 $this->assertEquals(Measure\Number::ROMAN, $value->getType(), 'Zend\Measure\Number type expected');
155 $value = new Measure\Number('1001020',Measure\Number::BINARY,'de');
156 $value->setType(Measure\Number::HEXADECIMAL);
157 $this->assertEquals(Measure\Number::HEXADECIMAL, $value->getType(), 'Zend\Measure\Number type expected');
159 $value = new Measure\Number('MCXVII',Measure\Number::ROMAN,'de');
EntityBodyTest.php (https://gitlab.com/x33n/respond) PHP · 182 lines
1 <?php
3 namespace Guzzle\Tests\Http;
25 $this->assertEquals('data', (string) $body);
26 $this->assertEquals(4, $body->getContentLength());
27 $this->assertEquals('PHP', $body->getWrapper());
28 $this->assertEquals('TEMP', $body->getStreamType());
30 $handle = fopen(__DIR__ . '/../../../../phpunit.xml.dist', 'r');
31 if (!$handle) {
32 $this->fail('Could not open test file');
33 }
34 $body = EntityBody::factory($handle);
35 $this->assertEquals(__DIR__ . '/../../../../phpunit.xml.dist', $body->getUri());
36 $this->assertTrue($body->isLocal());
37 $this->assertEquals(__DIR__ . '/../../../../phpunit.xml.dist', $body->getUri());
MoreLikeThisTest.php (https://gitlab.com/Blueprint-Marketing/solr-power) PHP · 229 lines
1 <?php
2 /**
3 * Copyright 2011 Bas de Nooijer. All rights reserved.
35 use Solarium\QueryType\Select\Query\Query;
37 class MoreLikeThisTest extends \PHPUnit_Framework_TestCase
38 {
39 /**
75 }
77 public function testGetType()
78 {
79 $this->assertEquals(Query::COMPONENT_MORELIKETHIS, $this->mlt->getType());
class.LoggerAppenderScalr.php (https://github.com/kennethjiang/Wolke.git) PHP · 319 lines
1 <?php
3 require_once(LOG4PHP_DIR . '/LoggerAppender.php');
4 require_once(LOG4PHP_DIR . '/helpers/LoggerOptionConverter.php');
103 try
104 {
105 // Reopen new mysql connection (need for php threads)
106 $this->activateOptions();
272 * @return string the type of database to connect to
273 */
274 function getType() {
275 return $this->type;
276 }
DefaultDomTargetDescriptionProvider.java (https://bitbucket.org/nbargnesi/idea.git) Java · 54 lines
42 if (location == UsageViewTypeLocation.INSTANCE) {
43 return presentation.getTypeName();
44 }
45 if (location == UsageViewNodeTextLocation.INSTANCE || location == UsageViewLongNameLocation.INSTANCE) {
46 return presentation.getTypeName() + " " + StringUtil.notNullize(presentation.getElementName(), "''");
47 }
48 if (location instanceof HighlightUsagesDescriptionLocation) {
49 return presentation.getTypeName();
50 }
51 return null;
Grammar.php (https://gitlab.com/jjpa2018/dashboard) PHP · 340 lines
1 <?php
3 namespace Illuminate\Database\Schema\Grammars;
164 // with turning the column definition into its SQL format for this platform
165 // used by the connection. The column's modifiers are compiled and added.
166 $sql = $this->wrap($column).' '.$this->getType($column);
168 $columns[] = $this->addModifiers($sql, $blueprint, $column);
178 * @return string
179 */
180 protected function getType(Fluent $column)
181 {
182 return $this->{'type'.ucfirst($column->type)}($column);
CommitFile.php (https://bitbucket.org/kayahr/gitten.git) PHP · 306 lines
MethodProphecy.php (https://gitlab.com/Laolballs/cbtapp) PHP · 407 lines
1 <?php
3 /*
89 "Either an array or an instance of ArgumentsWildcard expected as\n".
90 'a `MethodProphecy::withArguments()` argument, but got %s.',
91 gettype($arguments)
92 ));
93 }
116 throw new InvalidArgumentException(sprintf(
117 'Expected callable or instance of PromiseInterface, but got %s.',
118 gettype($promise)
119 ));
120 }
182 throw new InvalidArgumentException(sprintf(
183 'Expected callable or instance of PredictionInterface, but got %s.',
184 gettype($prediction)
185 ));
186 }
Test.php (https://github.com/frhumanes/PLM.git) PHP · 238 lines
1 <?php
2 /**
3 * Zend Framework
16 * @package Zend_Http
17 * @subpackage Client_Adapter
18 * @version $Id: Test.php 20096 2010-01-06 02:05:09Z bkarwin $
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
20 * @license http://framework.zend.com/license/new-bsd New BSD License
24 * @see Zend_Uri_Http
25 */
26 require_once 'Zend/Uri/Http.php';
27 /**
28 * @see Zend_Http_Response
29 */
30 require_once 'Zend/Http/Response.php';
31 /**
32 * @see Zend_Http_Client_Adapter_Interface
String.class.php (https://github.com/Gamepay/xp-framework.git) PHP · 346 lines
TorqueTest.php (https://github.com/nbcutech/o3drupal.git) PHP · 389 lines
1 <?php
2 /**
3 * Zend Framework
18 * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: TorqueTest.php 23775 2011-03-01 17:25:24Z ralph $
21 */
25 * Zend_Measure_Torque
26 */
27 require_once 'Zend/Measure/Torque.php';
29 /**
35 * @group Zend_Measure
36 */
37 class Zend_Measure_TorqueTest extends PHPUnit_Framework_TestCase
38 {
39 /**
Feed.php (https://github.com/joomla/joomla-cms.git) PHP · 371 lines
1 <?php
3 /**
87 '%1$s "author" must be an instance of Joomla\\CMS\\Feed\\FeedPerson. %2$s given.',
88 \get_class($this),
89 \gettype($value) === 'object' ? \get_class($value) : \gettype($value)
90 )
91 );
243 '%1$s entries must be an instance of Joomla\\CMS\\Feed\\FeedPerson. %2$s given.',
244 \get_class($this),
245 \gettype($value) === 'object' ? \get_class($value) : \gettype($value)
246 )
247 );
Abstract.php (https://github.com/netweaver/Rediska.git) PHP · 265 lines
1 <?php
3 /**
9 * @version @package_version@
10 * @link http://rediska.geometria-lab.net
11 * @license http://www.opensource.org/licenses/bsd-license.php
12 */
13 abstract class Rediska_Key_Abstract extends Rediska_Options_RediskaInstance
91 * Get key type
92 *
93 * @see Rediska#getType
94 * @return string
95 */
96 public function getType()
97 {
98 return $this->_getRediskaOn()->getType($this->getName());
base.php (https://github.com/PressCrew/infinity.git) PHP · 279 lines
Atom.php (https://github.com/kervin/kyzstudio.git) PHP · 421 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: Atom.php 22662 2010-07-24 17:37:36Z mabe $
20 */
23 * @see Zend_Feed_Reader_FeedAbstract
24 */
25 #require_once 'Zend/Feed/Reader/FeedAbstract.php';
27 /**
28 * @see Zend_Feed_Reader_Extension_Atom_Feed
29 */
30 #require_once 'Zend/Feed/Reader/Extension/Atom/Feed.php';
32 /**
OfflineUserDataJob.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 387 lines
pagetranslation-check-database.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 221 lines
1 <?php
2 /**
3 * Script to check the consistency of the databases of the page translation
16 $dir = dirname( __FILE__ ); $IP = "$dir/../../..";
17 }
18 require_once( "$IP/maintenance/Maintenance.php" );
20 /**
138 array( 'delete tag', 'revtag', array( 'rt_page' => $id, 'rt_type' => $_->rt_type ) );
139 continue;
140 } elseif ( $_->rt_type === RevTag::getType( 'tp:transver' ) ) {
141 $check = $this->checkTransrevRevision( $rev );
142 if ( $check !== true ) {
CurrencyServerWebService.php (https://github.com/pedrocadena/Prueba.git) PHP · 447 lines
1 <?php
3 if (!class_exists("getDataSet")) {
220 class CurrencyServerWebService extends SoapClient {
221 /**
222 * Default class map for wsdl=>php
223 * @access private
224 * @var array
249 */
250 public function __construct($wsdl="http://www.currencyserver.de/webservice/currencyserverwebservice.asmx?WSDL", $options=array()) {
251 foreach(self::$classmap as $wsdlClassName => $phpClassName) {
252 if(!isset($options['classmap'][$wsdlClassName])) {
253 $options['classmap'][$wsdlClassName] = $phpClassName;
267 $variables = "";
268 foreach ($arguments as $arg) {
269 $type = gettype($arg);
270 if ($type == "object") {
271 $type = get_class($arg);
ReflectionFunctionTest.php (https://github.com/zucchi/zf2.git) PHP · 204 lines
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
19 * @group Zend_Server
20 */
21 class ReflectionFunctionTest extends \PHPUnit_Framework_TestCase
22 {
23 public function test__construct()
151 $this->assertTrue(is_array($params));
152 $this->assertEquals(1, count($params));
153 $this->assertEquals('string', $params[0]->getType());
154 }
MachineKeyValidationConverterTest.cs (https://github.com/t-ashula/mono.git) C# · 194 lines
Atom.php (https://bitbucket.org/Sinfin/pawtucket.git) PHP · 421 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: Atom.php 22108 2010-05-05 13:44:11Z padraic $
20 */
23 * @see Zend_Feed_Reader_FeedAbstract
24 */
25 require_once 'Zend/Feed/Reader/FeedAbstract.php';
27 /**
28 * @see Zend_Feed_Reader_Extension_Atom_Feed
29 */
30 require_once 'Zend/Feed/Reader/Extension/Atom/Feed.php';
32 /**
NullTest.php (https://bitbucket.org/Dal-Papa/is-340-publish-base.git) PHP · 292 lines
1 <?php
2 /**
3 * Zend Framework
24 * @see Zend_Filter_Int
25 */
26 require_once 'Zend/Filter/Null.php';
28 /**
34 * @group Zend_Filter
35 */
36 class Zend_Filter_NullTest extends PHPUnit_Framework_TestCase
37 {
38 /**
286 * @return void
287 */
288 public function testGetType()
289 {
290 $this->assertEquals(31, $this->_filter->getType());
BindingsSection.cs (https://github.com/t-ashula/mono.git) C# · 179 lines
AdapterTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 187 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
11 use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
13 class AdapterTest extends \PHPUnit_Framework_TestCase
14 {
15 /**
16 * @var ResponseFactory|\PHPUnit_Framework_MockObject_MockObject
17 */
18 protected $responseFactory;
20 /**
21 * @var \Magento\Framework\DB\Adapter\AdapterInterface|\PHPUnit_Framework_MockObject_MockObject
22 */
23 private $connectionAdapter;
UseOrdinalStringComparison.cs (https://gitlab.com/sharadag/TestProject2) C# · 139 lines
manager.php (https://gitlab.com/alexprowars/bitrix) PHP · 315 lines
ReflectionMemberMapper.php (https://gitlab.com/1of0/php-serializer) PHP · 305 lines
15 use OneOfZero\Json\Mappers\AbstractMemberMapper;
16 use OneOfZero\Json\Mappers\SourceInterface;
17 use OneOfZero\PhpDocReader\PhpDocReader;
18 use ReflectionClass;
19 use ReflectionMethod;
28 {
29 /**
30 * @var PhpDocReader $docReader
31 */
32 protected $docReader;
106 if ($this->getChain()->getTop()->isGetter())
107 {
108 if (version_compare(PHP_VERSION, '7.0.0', '>='))
109 {
110 // If PHP 7, try using the return type declaration
binder.php (https://gitlab.com/alexprowars/bitrix) PHP · 442 lines
1 <?php
3 namespace Bitrix\Main\Engine\AutoWire;
394 );
395 }
396 elseif ($parameter->getType() instanceof \ReflectionNamedType)
397 {
398 /** @var \ReflectionNamedType $reflectionType */
399 $reflectionType = $parameter->getType();
400 $declarationChecker = new TypeDeclarationChecker($reflectionType, $value);
401 if (!$declarationChecker->isSatisfied())
GeneratorPoolTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 179 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
14 use \Magento\Framework\View\Layout\Data\Structure as DataStructure;
16 class GeneratorPoolTest extends \PHPUnit_Framework_TestCase
17 {
18 /**
19 * @var \Magento\Framework\View\Layout\ScheduledStructure\Helper|\PHPUnit_Framework_MockObject_MockObject
20 */
21 protected $helperMock;
23 /**
24 * @var \Magento\Framework\View\Layout\Reader\Context|\PHPUnit_Framework_MockObject_MockObject
25 */
26 protected $readerContextMock;
DefaultValidatorTest.php (https://gitlab.com/crazybutterfly815/magento2) PHP · 163 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
7 namespace Magento\Catalog\Test\Unit\Model\Product\Option\Validator;
9 class DefaultValidatorTest extends \PHPUnit_Framework_TestCase
10 {
11 /**
16 /**
17 * @var \PHPUnit_Framework_MockObject_MockObject
18 */
19 protected $valueMock;
79 public function testIsValidTitle($title, $type, $priceType, $price, $product, $messages, $result)
80 {
81 $methods = ['getTitle', 'getType', 'getPriceType', 'getPrice', '__wakeup', 'getProduct'];
82 $valueMock = $this->getMock(\Magento\Catalog\Model\Product\Option::class, $methods, [], '', false);
83 $valueMock->expects($this->once())->method('getTitle')->will($this->returnValue($title));
Field.php (https://github.com/chromium/chromium.git) PHP · 381 lines
userbudgetpool.php (https://gitlab.com/alexprowars/bitrix) PHP · 328 lines
1 <?php
2 namespace Bitrix\Sale\Internals;
37 /**
38 * @param $sum
39 * @param $budgetType
40 * @param Sale\Order $order
41 * @param Sale\Payment|null $payment
42 * @throws Main\Db\SqlQueryException
43 */
44 public function add($sum, $budgetType, Sale\Order $order, Sale\Payment $payment = null)
45 {
46 if (!$this->isLocked())
57 "SUM" => $sum,
58 "CURRENCY" => $order->getCurrency(),
59 "TYPE" => $budgetType,
60 "ORDER" => $order,
61 ];
PluginTest.php (https://gitlab.com/yousafsyed/easternglamor) PHP · 314 lines
1 <?php
2 /**
3 * Copyright © 2016 Magento. All rights reserved.
6 namespace Magento\ConfigurableProduct\Test\Unit\Controller\Adminhtml\Product\Builder;
8 class PluginTest extends \PHPUnit_Framework_TestCase
9 {
10 /**
15 /**
16 * @var \PHPUnit_Framework_MockObject_MockObject
17 */
18 protected $productFactoryMock;
20 /**
21 * @var \PHPUnit_Framework_MockObject_MockObject
22 */
23 protected $configurableTypeMock;
error_handling.hpp
(http://hadesmem.googlecode.com/svn/trunk/)
C++ Header · 0 lines
✨ Summary
This C++ header file provides a set of error handling policies for mathematical functions, allowing users to customize how errors are handled and reported. It defines various types of errors (e.g., overflow, underflow, denormalization) and provides functions for checking these conditions, as well as functions for raising errors and casting values to specific data types.
This C++ header file provides a set of error handling policies for mathematical functions, allowing users to customize how errors are handled and reported. It defines various types of errors (e.g., overflow, underflow, denormalization) and provides functions for checking these conditions, as well as functions for raising errors and casting values to specific data types.
61 template <class T>
62 T user_evaluation_error(const char* function, const char* message, const T& val);
63 template <class T, class TargetType>
64 T user_rounding_error(const char* function, const char* message, const T& val, const TargetType& t);
382 }
384 template <class T, class TargetType>
385 inline T raise_rounding_error(
386 const char* function,
387 const char* message,
388 const T& val,
389 const TargetType&,
390 const ::boost::math::policies::rounding_error< ::boost::math::policies::throw_on_error>&)
391 {
395 }
397 template <class T, class TargetType>
398 inline T raise_rounding_error(
399 const char* ,
MonitoredResourceDescriptor.php (https://gitlab.com/remyvianne/krowkaramel) PHP · 262 lines
ext_reflection.h (https://gitlab.com/0072016/0072016-PHP.LLC) C Header · 282 lines
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2015 Facebook, Inc. (http://www.facebook.com) |
6 | Copyright (c) 1997-2010 The PHP Group |
7 +----------------------------------------------------------------------+
8 | This source file is subject to version 3.01 of the PHP license, |
9 | that is bundled with this package in the file LICENSE, and is |
10 | available through the world-wide-web at the following url: |
11 | http://www.php.net/license/3_01.txt |
12 | If you did not receive a copy of the PHP license and are unable to |
13 | obtain it through the world-wide-web, please send a note to |
14 | license@php.net so we can mail you a copy immediately. |
15 +----------------------------------------------------------------------+
16 */
SuppFileDAO.inc.php (https://github.com/mcrider/pkpUpgradeTestSuite.git) PHP · 350 lines
1 <?php
3 /**
4 * @file classes/article/SuppFileDAO.inc.php
5 *
6 * Copyright (c) 2003-2009 John Willinsky
14 */
16 // $Id: SuppFileDAO.inc.php,v 1.26 2009/05/12 14:34:53 asmecher Exp $
165 $suppFile->getFileId(),
166 $suppFile->getArticleId(),
167 $suppFile->getType(),
168 $suppFile->getLanguage(),
169 $suppFile->getShowReviewers(),
NameNode.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 65 lines
✨ Summary
This Java class represents a named object in a programming context, such as a package name or static method. It has two constructors: one with no arguments and another that takes a name and type. The getFullyQualifiedTypeName
method returns the fully qualified type name of the node, and the toString
method returns this value.
This Java class represents a named object in a programming context, such as a package name or static method. It has two constructors: one with no arguments and another that takes a name and type. The getFullyQualifiedTypeName
method returns the fully qualified type name of the node, and the toString
method returns this value.
BSHArrayInitializer.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 148 lines
✨ Summary
This Java code defines a class BSHArrayInitializer
that extends SimpleNode
. It is used to initialize arrays in a scripting language, allowing for dynamic array creation with variable dimensions and initializers. The class evaluates an array initializer syntax and creates an array of the specified base type with the given dimensions and initializers.
This Java code defines a class BSHArrayInitializer
that extends SimpleNode
. It is used to initialize arrays in a scripting language, allowing for dynamic array creation with variable dimensions and initializers. The class evaluates an array initializer syntax and creates an array of the specified base type with the given dimensions and initializers.
MyDoggyWindowManager.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 605 lines
✨ Summary
This Java code implements a docking area manager for a graphical user interface (GUI). It manages tool windows, which are floating panels that can be docked to specific areas of the GUI. The code provides methods for showing and hiding tool windows, managing their visibility and activation, and updating their properties based on user preferences.
This Java code implements a docking area manager for a graphical user interface (GUI). It manages tool windows, which are floating panels that can be docked to specific areas of the GUI. The code provides methods for showing and hiding tool windows, managing their visibility and activation, and updating their properties based on user preferences.
118 setLayout(new BorderLayout());
119 wm = new MyDoggyToolWindowManager();
120 wm.getTypeDescriptorTemplate(ToolWindowType.DOCKED).setAnimating(
121 OptionPane.getEnableAnimationsProp());
122 add(wm, BorderLayout.CENTER);
199 EditBus.send(new DockableWindowUpdate(this, DockableWindowUpdate.DEACTIVATED,
200 name));
201 if (tw.getType() == ToolWindowType.DOCKED ||
202 tw.getType() == ToolWindowType.SLIDING)
216 if (tw == null)
217 return false;
218 return (tw.getType() == ToolWindowType.DOCKED);
219 }
362 private void initToolWindowsDescriptors(String name, ToolWindow tw) {
363 tw.getRepresentativeAnchorDescriptor().setTitle(shortTitle(name));
364 tw.getTypeDescriptor(ToolWindowType.DOCKED).setIdVisibleOnTitleBar(false);
365 DockedTypeDescriptor dockedDescriptor = tw.getTypeDescriptor(DockedTypeDescriptor.class);
FLWORArranger.java
(http://xbird.googlecode.com/svn/trunk/)
Java · 1011 lines
✨ Summary
This Java code is part of an XQuery processor, specifically a dependency checker and optimizer. It analyzes an XQuery expression to identify dependencies between variables and clauses, allowing for optimization and simplification of the query. The code uses visitor patterns to traverse the abstract syntax tree of the XQuery expression and detect dependencies, which are then used to optimize the query.
This Java code is part of an XQuery processor, specifically a dependency checker and optimizer. It analyzes an XQuery expression to identify dependencies between variables and clauses, allowing for optimization and simplification of the query. The code uses visitor patterns to traverse the abstract syntax tree of the XQuery expression and detect dependencies, which are then used to optimize the query.
401 if(bindingVar == referent) {
402 XQExpression bindingExpr = bindingVar.getValue();
403 Type type = bindingVar.getType();
404 if(type != Untyped.UNTYPED) {
405 return new TypePromotedExpr(bindingExpr, type);
621 final PathExpr bindingPathExpr = (PathExpr) firstBindingExpr;
622 if(firstBindingVar == referent) {
623 cmpOpr.setLeftOperand(new ContextItemExpr(bindingPathExpr.getType()));
624 bindingPathExpr.addPredicate(cmpOpr);
625 innerModified = true;
670 if(firstBindingExpr instanceof PathExpr) {
671 final PathExpr bindingPathExpr = (PathExpr) firstBindingExpr;
672 if(TypeUtil.subtypeOf(right.getType(), NumericType.getInstance())) {
673 bindingPathExpr.addPredicate(right);
674 } else {
ScriptingCore.cpp (https://bitbucket.org/Tsiannian/cocos2d-x.git) C++ · 882 lines
XmlElementsGroupImpl.java (https://bitbucket.org/nbargnesi/idea.git) Java · 106 lines
BSHAllocationExpression.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 188 lines
✨ Summary
This Java code defines a class BSHAllocationExpression
that handles object and array allocation in BeanShell, a JavaScript-like scripting language for Java. It parses expressions like new MyClass()
or new int[10]
, determines the type of allocation (object or array), and then performs the allocation using reflection or array creation methods.
This Java code defines a class BSHAllocationExpression
that handles object and array allocation in BeanShell, a JavaScript-like scripting language for Java. It parses expressions like new MyClass()
or new int[10]
, determines the type of allocation (object or array), and then performs the allocation using reflection or array creation methods.
InstallPanel.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 1155 lines
✨ Summary
This Java code is part of a plugin manager for an IDE (Integrated Development Environment). It provides functionality to manage plugins, including sorting and filtering plugin information, displaying plugin details in a table, and handling keyboard and mouse events. The code also includes rendering and focus management for the plugin table.
This Java code is part of a plugin manager for an IDE (Integrated Development Environment). It provides functionality to manage plugins, including sorting and filtering plugin information, displaying plugin details in a table, and handling keyboard and mouse events. The code also includes rendering and focus management for the plugin table.
718 public void tableChanged(TableModelEvent e)
719 {
720 if (e.getType() == TableModelEvent.UPDATE)
721 {
722 if(pluginModel.isDownloadingList())
760 setEnabled(pluginModel.getRowCount() != 0);
761 if (e.getType() == TableModelEvent.UPDATE)
762 {
763 int length = pluginModel.getRowCount();
931 return;
933 if (e.getType() == TableModelEvent.UPDATE)
934 {
935 int length = pluginModel.getRowCount();
BSHBinaryExpression.java
(https://jedit.svn.sourceforge.net/svnroot/jedit)
Java · 228 lines
✨ Summary
This Java class implements binary expressions for a scripting language, specifically handling instanceof and boolean operations. It evaluates the left-hand side of an expression, determines its type, and then performs the specified operation on the left-hand side and right-hand side based on their types. The result is returned as a Primitive object.
This Java class implements binary expressions for a scripting language, specifically handling instanceof and boolean operations. It evaluates the left-hand side of an expression, determines its type, and then performs the specified operation on the left-hand side and right-hand side based on their types. The result is returned as a Primitive object.
ReplaceForEachLoopWithIndexedForLoopIntention.java (https://bitbucket.org/nbargnesi/idea.git) Java · 272 lines
47 final PsiParameter iterationParameter =
48 statement.getIterationParameter();
49 final PsiType type = iterationParameter.getType();
50 final PsiType iteratedValueType = iteratedValue.getType();
226 createVariableName(variableNameRoot, iteratedValue);
227 final Project project = context.getProject();
228 final PsiType iteratedValueType = iteratedValue.getType();
229 assert iteratedValueType != null;
230 final PsiElementFactory elementFactory =