repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/ReCaptcha/RequestParametersTest.php
Tests/ReCaptcha/RequestParametersTest.php
<?php declare(strict_types=1); /** * This is a PHP library that handles calling reCAPTCHA. * * BSD 3-Clause License * @copyright (c) 2019, Google Inc. * @link https://www.google.com/recaptcha * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are perm...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/ReCaptcha/ReCaptchaTest.php
Tests/ReCaptcha/ReCaptchaTest.php
<?php declare(strict_types=1); /** * This is a PHP library that handles calling reCAPTCHA. * * BSD 3-Clause License * @copyright (c) 2019, Google Inc. * @link https://www.google.com/recaptcha * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are perm...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/ReCaptcha/RequestMethod/SocketPostTest.php
Tests/ReCaptcha/RequestMethod/SocketPostTest.php
<?php declare(strict_types=1); /** * This is a PHP library that handles calling reCAPTCHA. * * BSD 3-Clause License * @copyright (c) 2019, Google Inc. * @link https://www.google.com/recaptcha * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are perm...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/ReCaptcha/RequestMethod/CurlPostTest.php
Tests/ReCaptcha/RequestMethod/CurlPostTest.php
<?php declare(strict_types=1); /** * This is a PHP library that handles calling reCAPTCHA. * * BSD 3-Clause License * @copyright (c) 2019, Google Inc. * @link https://www.google.com/recaptcha * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are perm...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/ReCaptcha/RequestMethod/PostTest.php
Tests/ReCaptcha/RequestMethod/PostTest.php
<?php declare(strict_types=1); /** * This is a PHP library that handles calling reCAPTCHA. * * BSD 3-Clause License * @copyright (c) 2019, Google Inc. * @link https://www.google.com/recaptcha * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are perm...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/Services/HostProviderTest.php
Tests/Services/HostProviderTest.php
<?php namespace Services; use Karser\Recaptcha3Bundle\Services\HostProvider; use PHPUnit\Framework\TestCase; class HostProviderTest extends TestCase { public function test__construct() { $hostProvider = new HostProvider('www.a-domain.tld'); self::assertSame('www.a-domain.tld', $hostProvider-...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/Services/IpResolverTest.php
Tests/Services/IpResolverTest.php
<?php declare(strict_types=1); namespace Karser\Recaptcha3Bundle\Tests\Services; use Karser\Recaptcha3Bundle\Services\IpResolver; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; class IpResolverTest extends TestCase { public functio...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/DependencyInjection/ConfigurationTest.php
Tests/DependencyInjection/ConfigurationTest.php
<?php declare(strict_types=1); namespace Karser\Recaptcha3Bundle\Tests\DependencyInjection; use Karser\Recaptcha3Bundle\DependencyInjection\Configuration; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Processor; class ConfigurationTest extends TestCase { /** * @dataProvider dataFor...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Tests/Validator/Constraints/Recaptcha3ValidatorTest.php
Tests/Validator/Constraints/Recaptcha3ValidatorTest.php
<?php declare(strict_types=1); namespace Karser\Recaptcha3Bundle\Tests\Validator\Constraints; use Karser\Recaptcha3Bundle\Services\IpResolverInterface; use Karser\Recaptcha3Bundle\Tests\fixtures\RecaptchaMock; use Karser\Recaptcha3Bundle\Validator\Constraints\Recaptcha3; use Karser\Recaptcha3Bundle\Validator\Constrai...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Validator/Constraints/Recaptcha3Validator.php
Validator/Constraints/Recaptcha3Validator.php
<?php declare(strict_types=1); namespace Karser\Recaptcha3Bundle\Validator\Constraints; use Karser\Recaptcha3Bundle\Services\IpResolverInterface; use Karser\Recaptcha3Bundle\ReCaptcha\ReCaptcha; use Karser\Recaptcha3Bundle\ReCaptcha\Response; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
karser/KarserRecaptcha3Bundle
https://github.com/karser/KarserRecaptcha3Bundle/blob/3d194dab4c31115bebc073c866ff55afaaa9e276/Validator/Constraints/Recaptcha3.php
Validator/Constraints/Recaptcha3.php
<?php declare(strict_types=1); namespace Karser\Recaptcha3Bundle\Validator\Constraints; use Symfony\Component\Validator\Constraint; /** * @Annotation * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] final class Re...
php
MIT
3d194dab4c31115bebc073c866ff55afaaa9e276
2026-01-05T03:03:06.678663Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceBitBucket/SourceBitBucket.php
SourceBitBucket/SourceBitBucket.php
<?php # Copyright (c) 2014 Sergey Marchenko # Licensed under the MIT license /** @noinspection PhpMissingReturnTypeInspection */ if( false === include_once(config_get( 'plugin_path' ) . 'Source/MantisSourceGitBasePlugin.class.php') ) { return; } class SourceBitBucketPlugin extends MantisSourceGitBasePlugin { con...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceCgit/SourceCgitTest.php
SourceCgit/SourceCgitTest.php
<?php # Copyright (c) 2011 asm89 # Licensed under the MIT license /** * This simple test fetches the specified url and outputs the parsed content. * This output can be compared with the content of the webpage to verify that * the cgit parser works. * * Usage: php SourceCgitTest.php */ // Url pointing to a com...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceCgit/SourceCgit.php
SourceCgit/SourceCgit.php
<?php /** * This script assumes cgit's virtual-root option is set */ # Copyright (c) 2011 asm89 # Licensed under the MIT license if ( !defined('testing') ) { if ( false === include_once( config_get( 'plugin_path' ) . 'Source/MantisSourceGitBasePlugin.class.php' ) ) { return; } require_once( config_get( 'core_...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceWebSVN/SourceWebSVN.php
SourceWebSVN/SourceWebSVN.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license if ( false === include_once( config_get( 'plugin_path' ) . 'SourceSVN/SourceSVN.php' ) ) { return; } class SourceWebSVNPlugin extends SourceSVNPlugin { const PLUGIN_VERSION = '2.1.2'; const FRAMEWORK_VERSION_REQUIRED = '2.5.0'; const SOURCES...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/tools/bump-version.php
tools/bump-version.php
#!/usr/bin/php <?php /** * Helper script to increase Source Integration versions * * Command-line options: * * -v [version] Set Framework version (in Source/MantisSourceBase.class.php) * and generate a bump commit; if version is not specified, * or the framework is already at that versi...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/Source.ViewAPI.php
Source/Source.ViewAPI.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license /** * Display a list of changeset objects in tabular format. * * Assumes that a table with four columns has already been defined. * * @param SourceChangeset[] $p_changesets * @param array|SourceRepo $p_repos List of repositories, if nu...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/Source.FilterAPI.php
Source/Source.FilterAPI.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license define( 'SOURCE_ANY', 0 ); define( 'SOURCE_NONE', 1 ); function Source_Twomap( $func, $list ) { $new_list2 = array(); $new_list = array(); foreach( $list as $key => $item ) { list( $new_list[$key], $new_list2[$key] ) = call_u...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/MantisSourceGitBasePlugin.class.php
Source/MantisSourceGitBasePlugin.class.php
<?php # Copyright (c) 2017 Damien Regad # Licensed under the MIT license require_once( 'MantisSourcePlugin.class.php' ); /** * Class MantisSourceGitBasePlugin * * Base class providing common methods for all git-based Source Integration * Plugin classes. * */ abstract class MantisSourceGitBasePlugin extends Man...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/MantisSourceBase.class.php
Source/MantisSourceBase.class.php
<?php # Copyright (c) 2017 Damien Regad # Licensed under the MIT license require_once( config_get_global( 'class_path' ) . 'MantisPlugin.class.php' ); /** * Class MantisSourceBase * * Base class for all Source Integration Plugin classes */ abstract class MantisSourceBase extends MantisPlugin { /** * Source In...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/SourceIntegration.php
Source/SourceIntegration.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license /** * @noinspection PhpUnused, * PhpMissingReturnTypeInspection, PhpMissingParamTypeInspection */ use Mantis\Exceptions\ClientException; /** * Class SourceIntegrationPlugin * * Child plugin handling the framework's integratio...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/Source.php
Source/Source.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license require_once( 'MantisSourceBase.class.php' ); /** * Creates an extensible API for integrating source control applications * with the Mantis bug tracker software. */ class SourcePlugin extends MantisSourceBase { static $cache = array(); con...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/Source.API.php
Source/Source.API.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license /** @noinspection SqlResolve */ require_once( 'MantisSourcePlugin.class.php' ); /** * General source control integration API. * @author John Reese */ # branch mapping strategies define( 'SOURCE_EXPLICIT', 1 ); define( 'SOURCE_NEAR', 2 ); ...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
true
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/MantisSourcePlugin.class.php
Source/MantisSourcePlugin.class.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license require_once( 'MantisSourceBase.class.php' ); /** * Abstract class for simplifying creation of source control plugins. * @author John Reese */ abstract class MantisSourcePlugin extends MantisSourceBase { /** * @var string Plugin Version st...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_manage_page.php
Source/pages/repo_manage_page.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_repo_id = gpc_get_int( 'id' ); $t_repo = SourceRepo::load( $f_repo_id ); $t_vcs = SourceVCS::repo( $t_repo ); $t_type = SourceType($t_repo->type); $t_mappings = $t_repo->...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_update.php
Source/pages/repo_update.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_repo_update' ); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_repo_id = gpc_get_int( 'repo_id' ); $f_repo_name = gpc_get_string( 'repo_name' ); $f_repo_url = gpc_get_string( 'repo...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/manage_config.php
Source/pages/manage_config.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_manage_config' ); auth_reauthenticate(); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_view_threshold = gpc_get_int( 'view_threshold' ); $f_update_threshold = gpc_get_int( 'update...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_import_full.php
Source/pages/repo_import_full.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_repo_import_full' ); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_repo_id = gpc_get_string( 'id' ); $t_repo = SourceRepo::load( $f_repo_id ); $t_vcs = SourceVCS::repo( $t_repo )...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/list.php
Source/pages/list.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license /** @noinspection PhpIncludeInspection */ require_once( config_get( 'plugin_path' ) . 'Source/Source.ViewAPI.php' ); access_ensure_global_level( plugin_config_get( 'view_threshold' ) ); $f_repo_id = gpc_get_int( 'id' ); $f_offset = gpc_get_int( ...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/detach.php
Source/pages/detach.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_detach' ); access_ensure_global_level( plugin_config_get( 'update_threshold' ) ); $f_changeset_id = gpc_get_int( 'id' ); $f_bug_id = gpc_get_int( 'bug_id' ); access_ensure_bug_level( config_get('view_bug_th...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/search.php
Source/pages/search.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license require_once( config_get( 'plugin_path' ) . 'Source/Source.ViewAPI.php' ); access_ensure_global_level( plugin_config_get( 'view_threshold' ) ); $f_offset = gpc_get_int( 'offset', 1 ); $f_perpage = 25; require_once( config_get( 'plugin_path' ) ....
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/attach.php
Source/pages/attach.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_attach' ); access_ensure_global_level( plugin_config_get( 'update_threshold' ) ); $f_changeset_id = gpc_get_int( 'id' ); $f_bug_ids = gpc_get_string( 'bug_ids' ); $f_redirect = gpc_get_string( 'redirect', ''...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/view.php
Source/pages/view.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license access_ensure_global_level( plugin_config_get( 'view_threshold' ) ); $t_can_update = access_has_global_level( plugin_config_get( 'update_threshold' ) ); require_once( config_get( 'plugin_path' ) . 'Source/Source.ViewAPI.php' ); $f_changeset_id =...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_delete.php
Source/pages/repo_delete.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_repo_delete' ); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_repo_id = gpc_get_string( 'id' ); $t_repo = SourceRepo::load( $f_repo_id ); $t_message = sprintf( plugin_lang_get( ...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/edit.php
Source/pages/edit.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_edit' ); access_ensure_global_level( plugin_config_get( 'update_threshold' ) ); $f_changeset_id = gpc_get_int( 'id' ); $f_offset = gpc_get_int( 'offset', 0 ); $f_user_id = gpc_get_int( 'user_id' ); $f_commi...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/index.php
Source/pages/index.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license access_ensure_global_level( plugin_config_get( 'view_threshold' ) ); $t_can_manage = access_has_global_level( plugin_config_get( 'manage_threshold' ) ); $t_show_stats = plugin_config_get( 'show_repo_stats' ); $t_show_file_stats = plugin_config_ge...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/edit_page.php
Source/pages/edit_page.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license access_ensure_global_level( plugin_config_get( 'update_threshold' ) ); require_once( config_get( 'plugin_path' ) . 'Source/Source.ViewAPI.php' ); $f_changeset_id = gpc_get_int( 'id' ); $f_offset = gpc_get_int( 'offset', 0 ); $t_changeset = Sourc...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/checkin.php
Source/pages/checkin.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license $t_address = $_SERVER['REMOTE_ADDR']; $t_valid = false; # Always allow the same machine to check-in if ( '127.0.0.1' == $t_address || '127.0.1.1' == $t_address || 'localhost' == $t_address || '::1' == $t_address ) { $t_valid = true; } # Ch...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/update.php
Source/pages/update.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license access_ensure_project_level( plugin_config_get( 'update_threshold' ) ); $f_changeset_id = gpc_get_int( 'id' ); $t_changeset = SourceChangeset::load( $f_changeset_id ); $t_repos = SourceRepo::load_by_changesets( $t_changeset ); if ( count( $t_rep...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/search_page.php
Source/pages/search_page.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license access_ensure_global_level( plugin_config_get( 'view_threshold' ) ); require_once( config_get( 'plugin_path' ) . 'Source/Source.FilterAPI.php' ); list( $t_filter, $t_permalink ) = Source_Generate_Filter(); $t_date_start = ( is_null( $t_filter->...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/import.php
Source/pages/import.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license $t_address = $_SERVER['REMOTE_ADDR']; $t_valid = false; helper_begin_long_process(); # Always allow the same machine to import if ( '127.0.0.1' == $t_address || '127.0.1.1' == $t_address || 'localhost' == $t_address || '::1' == $t_address )...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_create.php
Source/pages/repo_create.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_repo_create' ); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_repo_name = gpc_get_string( 'repo_name' ); $f_repo_type = gpc_get_string( 'repo_type' ); $t_repo = new SourceRepo( $...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_update_mappings.php
Source/pages/repo_update_mappings.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license form_security_validate( 'plugin_Source_repo_update_mappings' ); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_repo_id = gpc_get_int( 'id' ); $t_repo = SourceRepo::load( $f_repo_id ); $t_type = SourceType($t_repo->type...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_import_latest.php
Source/pages/repo_import_latest.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license helper_begin_long_process(); form_security_validate( 'plugin_Source_repo_import_latest' ); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); helper_ensure_confirmed( plugin_lang_get( 'ensure_import_latest' ), plugin_lang_get(...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/repo_update_page.php
Source/pages/repo_update_page.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); $f_repo_id = gpc_get_int( 'id' ); $f_status = gpc_get_int( 'status', null ); $t_repo = SourceRepo::load( $f_repo_id ); $t_vcs = SourceVCS::repo( $t_repo ); $t_type = SourceTy...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/pages/manage_config_page.php
Source/pages/manage_config_page.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license /** @noinspection PhpUndefinedFunctionInspection */ auth_reauthenticate(); access_ensure_global_level( plugin_config_get( 'manage_threshold' ) ); layout_page_header( plugin_lang_get( 'title' ) ); layout_page_begin(); print_manage_menu(); $t_rem...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/Source/classes/RelatedChangesetsColumn.class.php
Source/classes/RelatedChangesetsColumn.class.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license class SourceRelatedChangesetsColumn extends MantisColumn { public $column = "related_changesets"; public $sortable = false; private $changeset_cache = array(); public function __construct() { plugin_push_current( 'Source' ); $this->tit...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceVisualSVNServer/SourceVisualSVNServer.php
SourceVisualSVNServer/SourceVisualSVNServer.php
<?php # Copyright (c) 2019 David Hopkins, FBR Ltd # Copyright (c) 2015 John Bailey # Copyright (c) 2012 John Reese # Licensed under the MIT license if ( false === include_once( config_get( 'plugin_path' ) . 'SourceSVN/SourceSVN.php' ) ) { return; } class SourceVisualSVNServerPlugin extends SourceSVNPlugin { const...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceGitea/SourceGitea.php
SourceGitea/SourceGitea.php
<?php # Copyright (c) 2024 Pasquale Pizzuti # Licensed under the MIT license /** @noinspection SqlResolve, PhpIncludeInspection */ if ( false === include_once( config_get( 'plugin_path' ) . 'Source/MantisSourceGitBasePlugin.class.php' ) ) { return; } require_once( config_get( 'core_path' ) . 'url_api.php' ); requi...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceViewVC/SourceViewVC.php
SourceViewVC/SourceViewVC.php
<?php # Copyright (c) 2015 John Bailey # Copyright (c) 2012 John Reese # Licensed under the MIT license if ( false === include_once( config_get( 'plugin_path' ) . 'SourceSVN/SourceSVN.php' ) ) { return; } class SourceViewVCPlugin extends SourceSVNPlugin { const PLUGIN_VERSION = '2.1.2'; const FRAMEWORK_VERSION_R...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceGitlab/SourceGitlab.php
SourceGitlab/SourceGitlab.php
<?php # Copyright (c) 2014 Johannes Goehr # Copyright (c) 2014 Bob Clough # Licensed under the MIT license /** @noinspection SqlResolve, PhpIncludeInspection */ if ( false === include_once( config_get( 'plugin_path' ) . 'Source/MantisSourceGitBasePlugin.class.php' ) ) { return; } require_once( config_get( 'core_pa...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceGithub/SourceGithub.php
SourceGithub/SourceGithub.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license /** @noinspection PhpFullyQualifiedNameUsageInspection */ /** @noinspection PhpMissingParamTypeInspection PhpMissingReturnTypeInspection */ use GuzzleHttp\RequestOptions; /** @noinspection PhpIncludeInspection */ if ( false === include_once( con...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceGithub/pages/oauth_authorize.php
SourceGithub/pages/oauth_authorize.php
<?php # Copyright (c) 2012 Morgan Aldridge # Copyright (c) 2019 Damien Regad # Licensed under the MIT license auth_reauthenticate(); $f_repo_id = gpc_get_int( 'id' ); $f_code = gpc_get_string( 'code' ); $t_repo = SourceRepo::load( $f_repo_id ); $t_authorized = SourceGithubPlugin::oauth_get_access_token( $t_repo, $f_...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceGitphp/SourceGitphp.php
SourceGitphp/SourceGitphp.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license if ( false === include_once( config_get( 'plugin_path' ) . 'Source/MantisSourceGitBasePlugin.class.php' ) ) { return; } require_once( config_get( 'core_path' ) . 'url_api.php' ); class SourceGitphpPlugin extends MantisSourceGitBasePlugin { co...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceHgWeb/SourceHgWeb.php
SourceHgWeb/SourceHgWeb.php
<?php # Copyright (C) 2010 David Hicks, Ton Plomp, Marcel Bennett # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceAzureDevOps/SourceAzureDevOps.php
SourceAzureDevOps/SourceAzureDevOps.php
<?php # Copyright (c) 2020 Stefan Gross # Licensed under the MIT license use GuzzleHttp\RequestOptions; if ( false === include_once( config_get( 'plugin_path' ) . 'Source/MantisSourceGitBasePlugin.class.php' ) ) { return; } require_once( config_get( 'core_path' ) . 'url_api.php' ); class SourceAzureDevOpsPlugin e...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceSVN/SourceSVN.php
SourceSVN/SourceSVN.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license if ( false === include_once( config_get( 'plugin_path' ) . 'Source/MantisSourcePlugin.class.php' ) ) { return; } class SourceSVNPlugin extends MantisSourcePlugin { const PLUGIN_VERSION = '2.4.1'; const FRAMEWORK_VERSION_REQUIRED = '2.5.0'; ...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceGitweb/SourceGitweb.php
SourceGitweb/SourceGitweb.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license if ( false === include_once( config_get( 'plugin_path' ) . 'Source/MantisSourceGitBasePlugin.class.php' ) ) { return; } require_once( config_get( 'core_path' ) . 'url_api.php' ); class SourceGitwebPlugin extends MantisSourceGitBasePlugin { co...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
mantisbt-plugins/source-integration
https://github.com/mantisbt-plugins/source-integration/blob/efeeba93e20ff1987edab6f4ccec89aa19ecf2f2/SourceSFSVN/SourceSFSVN.php
SourceSFSVN/SourceSFSVN.php
<?php # Copyright (c) 2012 John Reese # Licensed under the MIT license if ( false === include_once( config_get( 'plugin_path' ) . 'SourceSVN/SourceSVN.php' ) ) { return; } class SourceSFSVNPlugin extends SourceSVNPlugin { const PLUGIN_VERSION = '2.1.2'; const FRAMEWORK_VERSION_REQUIRED = '2.5.0'; const SOURCESV...
php
MIT
efeeba93e20ff1987edab6f4ccec89aa19ecf2f2
2026-01-05T03:03:15.939107Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/.php-cs-fixer.dist.php
.php-cs-fixer.dist.php
<?php $config = new Amp\CodeStyle\Config; $config->getFinder() ->in(__DIR__ . '/examples') ->in(__DIR__ . '/src') ->in(__DIR__ . '/test'); $config->setCacheFile(__DIR__ . '/.php_cs.cache'); return $config;
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/SyncException.php
src/SyncException.php
<?php declare(strict_types=1); namespace Amp\Sync; class SyncException extends \Exception { }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/StaticKeySemaphore.php
src/StaticKeySemaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class StaticKeySemaphore implements Mutex { use ForbidCloning; use ForbidSerialization; public function __construct( private readonly KeyedSemaphore $semaphore, private readonly s...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/PriorityQueue.php
src/PriorityQueue.php
<?php declare(strict_types=1); namespace Amp\Sync; /** * Uses a binary tree stored in an array to implement a heap. * * @template T of int|string */ final class PriorityQueue { /** @var array<int, object{key: T, priority: int}> */ private array $data = []; /** @var array<T, int> */ private array ...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/LocalParcel.php
src/LocalParcel.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; /** * @template T * @template-implements Parcel<T> */ final class LocalParcel implements Parcel { use ForbidCloning; use ForbidSerialization; /** * @param T $value */ public function _...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/Parcel.php
src/Parcel.php
<?php declare(strict_types=1); namespace Amp\Sync; /** * @template T * * A parcel object for sharing data across execution contexts. * * A parcel is an object that stores a value in a safe way that can be shared * between different threads or processes. Different handles to the same parcel * will access the sa...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/PosixSemaphore.php
src/PosixSemaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; use function Amp\delay; /** * A non-blocking, inter-process POSIX semaphore. * * Uses a POSIX message queue to store a queue of permits in a lock-free data structure. This semaphore implementation * is preferre...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/StaticKeyMutex.php
src/StaticKeyMutex.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class StaticKeyMutex implements Mutex { use ForbidCloning; use ForbidSerialization; public function __construct( private readonly KeyedMutex $mutex, private readonly string $key, ...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/Channel.php
src/Channel.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\Cancellation; use Amp\Closable; use Amp\Serialization\SerializationException; /** * Interface for sending messages between execution contexts, such as two coroutines or two processes. * * @template-covariant TReceive * @template TSend */ interface Chann...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/PrefixedKeyedSemaphore.php
src/PrefixedKeyedSemaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class PrefixedKeyedSemaphore implements KeyedSemaphore { use ForbidCloning; use ForbidSerialization; public function __construct( private readonly KeyedSemaphore $semaphore, priva...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/LocalKeyedSemaphore.php
src/LocalKeyedSemaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class LocalKeyedSemaphore implements KeyedSemaphore { use ForbidCloning; use ForbidSerialization; /** @var LocalSemaphore[] */ private array $semaphore = []; /** @var int[] */ privat...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/LocalKeyedMutex.php
src/LocalKeyedMutex.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class LocalKeyedMutex implements KeyedMutex { use ForbidCloning; use ForbidSerialization; private readonly LocalKeyedSemaphore $semaphore; public function __construct() { $this->...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/Lock.php
src/Lock.php
<?php declare(strict_types=1); namespace Amp\Sync; use SplObjectStorage; use function Amp\async; use function Amp\Future\awaitAll; /** * A handle on an acquired lock from a synchronization object. * * This object is not thread-safe; after acquiring a lock from a mutex or semaphore, the lock should reside in the s...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/Barrier.php
src/Barrier.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\Cancellation; use Amp\DeferredFuture; use Amp\ForbidCloning; use Amp\ForbidSerialization; /** * A barrier is a synchronization primitive. * * The barrier is initialized with a certain count, which can be increased and decreased until it reaches zero. * ...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/KeyedMutex.php
src/KeyedMutex.php
<?php declare(strict_types=1); namespace Amp\Sync; /** * A synchronization primitive that can be used for mutual exclusion across contexts based on keys. * * Objects that implement this interface should guarantee that all operations are atomic. Implementations do not have to * guarantee that acquiring a lock is f...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/functions.php
src/functions.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\Pipeline\Queue; use Amp\Sync\Internal\ConcurrentIteratorChannel; use Revolt\EventLoop\FiberLocal; /** * Invokes the given Closure while maintaining a lock from the provided mutex. * * The lock is automatically released after the Closure returns. * * @te...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/Semaphore.php
src/Semaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; /** * A counting semaphore. * * Objects that implement this interface should guarantee that all operations are atomic. Implementations do not have to * guarantee that acquiring a lock is first-come, first serve. */ interface Semaphore { /** * Acquires a...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/PrefixedKeyedMutex.php
src/PrefixedKeyedMutex.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class PrefixedKeyedMutex implements KeyedMutex { use ForbidCloning; use ForbidSerialization; public function __construct( private readonly KeyedMutex $mutex, private readonly stri...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/KeyedSemaphore.php
src/KeyedSemaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; /** * A counting semaphore based on keys. * * Objects that implement this interface should guarantee that all operations are atomic. Implementations do not have to * guarantee that acquiring a lock is first-come, first serve. */ interface KeyedSemaphore { /*...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/Mutex.php
src/Mutex.php
<?php declare(strict_types=1); namespace Amp\Sync; /** * A synchronization primitive that can be used for mutual exclusion across contexts. * * Objects that implement this interface should guarantee that all operations are atomic. Implementations do not have to * guarantee that acquiring a lock is first-come, fir...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/SharedMemoryParcel.php
src/SharedMemoryParcel.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; use Amp\Serialization\NativeSerializer; use Amp\Serialization\SerializationException; use Amp\Serialization\Serializer; /** * A container object for sharing a value across contexts. * * A shared object is a cont...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/LocalMutex.php
src/LocalMutex.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class LocalMutex implements Mutex { use ForbidCloning; use ForbidSerialization; private readonly LocalSemaphore $semaphore; public function __construct() { $this->semaphore = new...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/SemaphoreMutex.php
src/SemaphoreMutex.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; final class SemaphoreMutex implements Mutex { use ForbidCloning; use ForbidSerialization; private bool $locked = false; /** * @param Semaphore $semaphore A semaphore with a single lock. ...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/ChannelException.php
src/ChannelException.php
<?php declare(strict_types=1); namespace Amp\Sync; class ChannelException extends \Exception { }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/RateLimitingSemaphore.php
src/RateLimitingSemaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; use Revolt\EventLoop; /** * When a locked is released from this semaphore, it does not become available to be acquired again until * the given lock-period has elapsed. This is useful when a number of operations o...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/ParcelException.php
src/ParcelException.php
<?php declare(strict_types=1); namespace Amp\Sync; class ParcelException extends \Exception { }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/LocalSemaphore.php
src/LocalSemaphore.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\ForbidCloning; use Amp\ForbidSerialization; use Revolt\EventLoop; use Revolt\EventLoop\Suspension; final class LocalSemaphore implements Semaphore { use ForbidCloning; use ForbidSerialization; private int $locks = 0; /** @var \SplQueue<Susp...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/src/Internal/ConcurrentIteratorChannel.php
src/Internal/ConcurrentIteratorChannel.php
<?php declare(strict_types=1); namespace Amp\Sync\Internal; use Amp\Cancellation; use Amp\DeferredFuture; use Amp\ForbidCloning; use Amp\ForbidSerialization; use Amp\Pipeline\ConcurrentIterator; use Amp\Pipeline\Queue; use Amp\Sync\Channel; use Amp\Sync\ChannelException; /** * Creates a Channel from a ConcurrentIte...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/SemaphoreMutexTest.php
test/SemaphoreMutexTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class SemaphoreMutexTest extends AbstractMutexTest { const ID = __CLASS__; public function createMutex(): Mutex { return new SemaphoreMutex(new LocalSemaphore(1)); } public function testSemaphoreWithMultipleLocks(): void { $t...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/LocalMutexTest.php
test/LocalMutexTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class LocalMutexTest extends AbstractMutexTest { public function createMutex(): Mutex { return new LocalMutex; } }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/BarrierTest.php
test/BarrierTest.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\PHPUnit\AsyncTestCase; final class BarrierTest extends AsyncTestCase { private Barrier $barrier; public function setUp(): void { parent::setUp(); $this->barrier = new Barrier(2); } public function testArriveBeforeAwait(...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/LockTest.php
test/LockTest.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\PHPUnit\AsyncTestCase; class LockTest extends AsyncTestCase { public function testIsReleased(): void { $lock = new Lock($this->createCallback(1)); self::assertFalse($lock->isReleased()); $lock->release(); self::assertT...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/RateLimitingSemaphoreTest.php
test/RateLimitingSemaphoreTest.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\PHPUnit\AsyncTestCase; use Amp\Pipeline\Pipeline; class RateLimitingSemaphoreTest extends AsyncTestCase { public function providePeriods(): iterable { yield 'one-lock-no-delay' => [0.1, 0, 3, 1]; yield 'one-lock-with-delay' => [0.1, 0...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/LocalSemaphoreTest.php
test/LocalSemaphoreTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class LocalSemaphoreTest extends AbstractSemaphoreTest { public function createSemaphore(int $locks): Semaphore { return new LocalSemaphore($locks); } }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/LocalKeyedMutexTest.php
test/LocalKeyedMutexTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class LocalKeyedMutexTest extends AbstractKeyedMutexTest { public function createMutex(): KeyedMutex { return new LocalKeyedMutex(); } }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/PrefixedKeyedMutexTest.php
test/PrefixedKeyedMutexTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class PrefixedKeyedMutexTest extends AbstractKeyedMutexTest { public function createMutex(): KeyedMutex { return new PrefixedKeyedMutex(new LocalKeyedMutex, 'prefix.'); } }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/StaticKeyMutexTest.php
test/StaticKeyMutexTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class StaticKeyMutexTest extends AbstractMutexTest { public function createMutex(): Mutex { return new StaticKeyMutex(new LocalKeyedMutex(), 'key'); } }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/StaticKeySemaphoreTest.php
test/StaticKeySemaphoreTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class StaticKeySemaphoreTest extends AbstractSemaphoreTest { public function createSemaphore(int $locks): Semaphore { return new StaticKeySemaphore(new LocalKeyedSemaphore($locks), 'key'); } }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/AbstractSemaphoreTest.php
test/AbstractSemaphoreTest.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\PHPUnit\AsyncTestCase; use Revolt\EventLoop; use function Amp\async; use function Amp\delay; abstract class AbstractSemaphoreTest extends AsyncTestCase { protected ?Semaphore $semaphore; /** * @param int $locks Number of locks in the semaphore....
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/AbstractMutexTest.php
test/AbstractMutexTest.php
<?php declare(strict_types=1); namespace Amp\Sync; use Amp\PHPUnit\AsyncTestCase; use Revolt\EventLoop; use function Amp\delay; abstract class AbstractMutexTest extends AsyncTestCase { abstract public function createMutex(): Mutex; public function testAcquire(): void { $mutex = $this->createMute...
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false
amphp/sync
https://github.com/amphp/sync/blob/217097b785130d77cfcc58ff583cf26cd1770bf1/test/PrefixedKeyedSemaphoreTest.php
test/PrefixedKeyedSemaphoreTest.php
<?php declare(strict_types=1); namespace Amp\Sync; class PrefixedKeyedSemaphoreTest extends AbstractKeyedSemaphoreTest { public function createSemaphore(int $size): KeyedSemaphore { return new PrefixedKeyedSemaphore(new LocalKeyedSemaphore($size), 'prefix.'); } }
php
MIT
217097b785130d77cfcc58ff583cf26cd1770bf1
2026-01-05T03:03:36.322098Z
false