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
blopa/Magento-Chatbot
https://github.com/blopa/Magento-Chatbot/blob/63684fa561c353ed52fce661e9fde72b162da8e5/Magento1_deprecated/app/code/community/Werules/Chatbot/controllers/IndexController.php
Magento1_deprecated/app/code/community/Werules/Chatbot/controllers/IndexController.php
<?php class Werules_Chatbot_IndexController extends Mage_Core_Controller_Front_Action { // public function indexAction() // { // $this->loadLayout(); // $this->renderLayout(); // } }
php
MIT
63684fa561c353ed52fce661e9fde72b162da8e5
2026-01-05T03:14:24.679841Z
false
blopa/Magento-Chatbot
https://github.com/blopa/Magento-Chatbot/blob/63684fa561c353ed52fce661e9fde72b162da8e5/Magento1_deprecated/app/code/community/Werules/Chatbot/controllers/SettingsController.php
Magento1_deprecated/app/code/community/Werules/Chatbot/controllers/SettingsController.php
<?php // settings controller, used to save all data from customer configurations // and also "links" a chatbot to the customer in the function loginFromChatbot class Werules_Chatbot_SettingsController extends Mage_Core_Controller_Front_Action { // function that makes the settings page only available when the user is l...
php
MIT
63684fa561c353ed52fce661e9fde72b162da8e5
2026-01-05T03:14:24.679841Z
false
blopa/Magento-Chatbot
https://github.com/blopa/Magento-Chatbot/blob/63684fa561c353ed52fce661e9fde72b162da8e5/Magento1_deprecated/app/code/community/Werules/Chatbot/controllers/ChatdataController.php
Magento1_deprecated/app/code/community/Werules/Chatbot/controllers/ChatdataController.php
<?php class Werules_Chatbot_ChatdataController extends Mage_Core_Controller_Front_Action { public function indexAction() { $this->loadLayout(); $this->getLayout()->getBlock('root')->setTemplate("werules_chatbot_view.phtml"); // use root block to output pure values without html tags $this->renderLayout(); } p...
php
MIT
63684fa561c353ed52fce661e9fde72b162da8e5
2026-01-05T03:14:24.679841Z
false
blopa/Magento-Chatbot
https://github.com/blopa/Magento-Chatbot/blob/63684fa561c353ed52fce661e9fde72b162da8e5/Magento1_deprecated/app/code/community/Werules/Chatbot/Helper/Data.php
Magento1_deprecated/app/code/community/Werules/Chatbot/Helper/Data.php
<?php // this is the helper class of the module // it contains all the constans and most of the generic functions // and some parts of the bussiness logic class Werules_Chatbot_Helper_Data extends Mage_Core_Helper_Abstract { // ----- CONSTANTS ---------- // STRINGS public $_tgBot = "telegram"; public $_fbBot = "fa...
php
MIT
63684fa561c353ed52fce661e9fde72b162da8e5
2026-01-05T03:14:24.679841Z
false
blopa/Magento-Chatbot
https://github.com/blopa/Magento-Chatbot/blob/63684fa561c353ed52fce661e9fde72b162da8e5/Magento1_deprecated/app/code/community/Werules/Chatbot/sql/chatbot_setup/mysql4-install-0.0.16.php
Magento1_deprecated/app/code/community/Werules/Chatbot/sql/chatbot_setup/mysql4-install-0.0.16.php
<?php $table = 'wr_chatbot'; $installer = $this; $installer->startSetup(); //db installation $installer->run(" -- DROP TABLE IF EXISTS {$this->getTable($table)}; CREATE TABLE {$this->getTable($table)} ( `entity_id` int(11) unsigned NOT NULL auto_increment, `created_at` timestamp NULL, `updated_at` timestam...
php
MIT
63684fa561c353ed52fce661e9fde72b162da8e5
2026-01-05T03:14:24.679841Z
false
blopa/Magento-Chatbot
https://github.com/blopa/Magento-Chatbot/blob/63684fa561c353ed52fce661e9fde72b162da8e5/Magento1_deprecated/app/code/community/Werules/Chatbot/sql/chatbot_setup/mysql4-upgrade-0.0.9-0.0.16.php
Magento1_deprecated/app/code/community/Werules/Chatbot/sql/chatbot_setup/mysql4-upgrade-0.0.9-0.0.16.php
<?php $table = 'wr_chatbot'; $installer = $this; $installer->startSetup(); //db update $installer->run(" ALTER TABLE {$this->getTable($table)} ADD COLUMN `enable_promotional_messages` smallint(1) NOT NULL default '1' AFTER `is_logged`, ADD COLUMN `enable_telegram_admin` smallint(1) NOT NULL default '1' AFTER `last...
php
MIT
63684fa561c353ed52fce661e9fde72b162da8e5
2026-01-05T03:14:24.679841Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/build-phar.php
build-phar.php
<?php /** * Generate standalone PHAR-archive * * @category Misc * @package Phpcf * @author Sergey Aksenov <sergeax@gmail.com> * @license MIT https://opensource.org/licenses/MIT * @link https://github.com/badoo/phpcf */ $pharFile = 'build/phpcf.phar'; $pharName = basename($pharFile); if (file_exists($...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/phpcf.php
phpcf-src/phpcf.php
<?php /** * CLI interface for PHPCF * @maintainer Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ require_once __DIR__ . '/src/init.php'; try { exit(Phpcf\Cli\Handler::create()->handle($argv)); } catch (\Exception $Error) { fwrite(STDERR, $Error->getMessage() . PHP_EOL); exit(1); }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/styles/default/context-rules.php
phpcf-src/styles/default/context-rules.php
<?php $fsm_nl_tokens = '._NL T_OBJECT_OPERATOR_NL T_BOOLEAN_AND_NL T_BOOLEAN_OR_NL T_LOGICAL_AND_NL T_LOGICAL_OR_NL'; $fsm_parenthesis_rules = [ '( (_LONG' => ['CTX_GENERIC_PARENTHESIS'], '(_EMPTY' => ['CTX_EMPTY_BLOCK_END'], ]; $fsm_inline_rules = $fsm_parenthesis_rules + [ '?' => ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/styles/default/formatting-rules.php
phpcf-src/styles/default/formatting-rules.php
<?php $casts = 'T_INT_CAST T_DOUBLE_CAST T_BOOL_CAST T_STRING_CAST T_ARRAY_CAST T_OBJECT_CAST T_UNSET_CAST'; $binary_operators = 'T_AND_EQUAL T_CONCAT_EQUAL T_DIV_EQUAL T_IS_EQUAL T_IS_GREATER_OR_EQUAL ' . 'T_IS_NOT_EQUAL T_IS_SMALLER_OR_EQUAL T_MINUS_EQUAL T_MOD_EQUAL T_MUL_EQUAL ' . 'T_OR_EQUAL T_PLUS_EQUAL T...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
true
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/styles/example/context-rules.php
phpcf-src/styles/example/context-rules.php
<?php // you need to modify $fsm_context_rules that is presented as array( CTX_NAME => array( TOKEN_NAME => RULE ) ) // we will add context "CTX_NAMESPACE_D" for namespace definition // add CTX_NAMESPACE_D to stack when see token T_NAMESPACE in CTX_PHP (default PHP code context) $fsm_context_rules['CTX_PHP']['T_NAMESP...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/styles/example/phpcf-class.php
phpcf-src/styles/example/phpcf-class.php
<?php /* Class must be named as PHPCF_<Style> */ namespace Phpcf\Impl; class PHPCF_Example extends Formatter { protected function init() { parent::init(); // add our custom hook for T_NAMESPACE: we will just echo it :) $this->token_hook_callbacks[T_NAMESPACE] = 'tokenHookNamespace'; ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/styles/example/formatting-rules.php
phpcf-src/styles/example/formatting-rules.php
<?php // in this example we will add rule about namespaces: // - there must be only 1 namespace per line (check for new line before "namespace") // - there must be strictly one space after "namespace" // - there must be no spaces before ";" in namespace definition // - there must be no spaces in namespace name:...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/styles/example/test-in.php
phpcf-src/styles/example/test-in.php
<?php // this file has namespace definition that needs to be formatted correctly: namespace \ Some\Weird \Thing ;
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/styles/example/test-out.php
phpcf-src/styles/example/test-out.php
<?php // this file has namespace definition that needs to be formatted correctly: namespace \Some\Weird\Thing;
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/Options.php
phpcf-src/src/Options.php
<?php /** * Options for * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf; class Options { private $tab_sequence = " "; private $max_line_length = 120; private $quiet = false; private $debug = false; private $sniff = false; private $emacs_style ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/defines.php
phpcf-src/src/defines.php
<?php /** * @author Yuriy Nasretdinov <y.nasretdinov@corp.badoo.com> */ if (!defined('PHPCF_DEFINED')) { define('PHPCF_VERSION', "1.0.0"); define('PHPCF_DEFINED', 1); define('PHPCF_MAX_SNIFF_LINES', 15); define('PHPCF_FLAG_DEBUG', 1); define('PHPCF_FLAG_QUIET', 2); define('PHPCF_F...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/Helper.php
phpcf-src/src/Helper.php
<?php namespace Phpcf; class Helper { /** * @param $library * @throws \RuntimeException */ public static function loadExtension($library) { if (!extension_loaded($library)) { if (!is_callable('dl')) { throw new \RuntimeException("Failed to load extension ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/IFormatter.php
phpcf-src/src/IFormatter.php
<?php /** * Formatter facade * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf; interface IFormatter { /** * Execute formatting * @param string $content * @param array $user_lines * @return string */ public function format($content, array $user_...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/Formatter.php
phpcf-src/src/Formatter.php
<?php /** * Formatter facade * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf; class Formatter { /** * @var Options */ private $Options; /** * @var IFormatter */ private $Implementation; const IMPL_CLASS = "\\Phpcf\\Impl\\Formatter"; ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/ExecStat.php
phpcf-src/src/ExecStat.php
<?php /** * Collector for messages and debug * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf; class ExecStat { private $issues = []; private $debug = []; private $callback_invoked = false; private $callback; /** * @return array */ public ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/FormattingResult.php
phpcf-src/src/FormattingResult.php
<?php /** * Retval for Formatter * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf; class FormattingResult { /** * @var string */ private $content; /** * @var float */ private $time_exec; /** * @var \Exception */ private $...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/init.php
phpcf-src/src/init.php
<?php require_once __DIR__ . '/defines.php'; require_once __DIR__ . '/ClassLoader.php'; \Phpcf\ClassLoader::register();
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/ClassLoader.php
phpcf-src/src/ClassLoader.php
<?php /** * Class loader for PHPCF * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf; class ClassLoader { const NS = "Phpcf"; private $_fileExtension = '.php'; private $path; private $_namespaceSeparator = '\\'; /** * @var self */ private stat...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/filter/StringAsciiMap.php
phpcf-src/src/filter/StringAsciiMap.php
<?php /** * Base class for string-ascification table prividers * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Filter; abstract class StringAsciiMap { /** * @var array replace table, key => character to replace, value => ascii character */ protected $convert...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/filter/StringAscii.php
phpcf-src/src/filter/StringAscii.php
<?php /** * Filter, that replace any symbols to their ascii equivalent * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Filter; class StringAscii { /** @var array symbols to be replaced */ private $from = []; /** @var array symbols replacement */ private $to =...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/filter/StringAsciiMapCyr.php
phpcf-src/src/filter/StringAsciiMapCyr.php
<?php /** * Cyrillic conversion table * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Filter; class StringAsciiMapCyr extends StringAsciiMap { /** * @inheritdoc */ protected $convert_map = [ 'а' => 'a', 'с' => 'c', 'е' => 'e', ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/impl/Formatter.php
phpcf-src/src/impl/Formatter.php
<?php /** * PHP implementation for formatter * @author Yuriy Nasretdinov <y.nasretdinov@corp.badoo.com> */ namespace Phpcf\Impl; class Formatter implements \Phpcf\IFormatter { const DEBUG_WIDTH_LINE = 10; const DEBUG_WIDTH_CODE = 30; const DEBUG_WIDTH_TEXT = 30; /** * @var Fsm */ priv...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
true
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/impl/Fsm.php
phpcf-src/src/impl/Fsm.php
<?php /** * Formatter's FSM * @author Yuriy Nasretdinov <y.nasretdinov@corp.badoo.com> */ namespace Phpcf\Impl; class Fsm { public $rules = []; public $state = null; public $state_stack = []; public $old_state = null; public $prev_code = null; public $current_rules = [/* state, code_key, rul...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/AbstractAction.php
phpcf-src/src/cli/AbstractAction.php
<?php /** * Base class for actions * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; abstract class AbstractAction implements IAction { /** * @var \Phpcf\Formatter */ protected $Formatter; protected $description; const MAX_LINES = 15; /** ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/ActionApply.php
phpcf-src/src/cli/ActionApply.php
<?php /** * Format files and re-write them * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; class ActionApply extends AbstractAction { protected $description = "format file, overwrite it and print report"; /** * @inheritdoc */ protected function han...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/Handler.php
phpcf-src/src/cli/Handler.php
<?php /** * CLI for phpcf * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; class Handler { /** * Registry of actions * @var IAction[] */ private $registry = []; private $callbacks = []; private $flags = [ ['debug', 'd', true,...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/ActionPreview.php
phpcf-src/src/cli/ActionPreview.php
<?php /** * Preview for formatting * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; class ActionPreview extends AbstractAction { /** * @var string */ private $diff_cmd = "diff -u"; /** * @var string */ private $cdiff_cmd; protecte...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/ActionStdin.php
phpcf-src/src/cli/ActionStdin.php
<?php /** * Format files and re-write them * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; class ActionStdin extends AbstractAction { protected $description = "format contents from STDIN and outputs the result"; /** * @inheritdoc */ protected funct...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/ActionCheck.php
phpcf-src/src/cli/ActionCheck.php
<?php /** * Checker * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; class ActionCheck extends AbstractAction { protected $description = "just check a file and report about problems with non-zero exit code"; /** * @inheritdoc */ protected function h...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/IAction.php
phpcf-src/src/cli/IAction.php
<?php /** * Interface for cli actions of PHPCF * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; interface IAction { /** * Description, what this action do * @return string */ public function getDescription(); /** * @param \Phpcf\Formatter ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/Ctx.php
phpcf-src/src/cli/Ctx.php
<?php /** * Context for CLI call * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli; class Ctx { private $files = []; /** * @param string $file */ public function addFile($file) { $this->files[$file] = true; } /** * @return st...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/git/ActionApply.php
phpcf-src/src/cli/git/ActionApply.php
<?php /** * Check only changed lines * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli\Git; class ActionApply extends \Phpcf\Cli\ActionApply { protected $description = "format changes to be pushed"; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/git/Helper.php
phpcf-src/src/cli/git/Helper.php
<?php /** * Collector for messages and debug * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli\Git; abstract class Helper { const DEBUG = false; const INVALID_STATUS = -1; /** * @throws \RuntimeException * @return string */ public static func...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/git/GitCallback.php
phpcf-src/src/cli/git/GitCallback.php
<?php /** * Base action for git integration * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli\Git; class GitCallback { /** * @var string */ private $branch; public function __invoke() { return $this->handleInternal(func_get_arg(0), func_ge...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/git/ActionPreview.php
phpcf-src/src/cli/git/ActionPreview.php
<?php /** * Check only changed lines * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli\Git; class ActionPreview extends \Phpcf\Cli\ActionCheck { protected $description = "show diff for changes to be pushed"; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/src/cli/git/ActionCheck.php
phpcf-src/src/cli/git/ActionCheck.php
<?php /** * Check only changed lines * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ namespace Phpcf\Cli\Git; class ActionCheck extends \Phpcf\Cli\ActionCheck { protected $description = "check changes to be pushed"; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/PhpCfFunctional.php
phpcf-src/test/PhpCfFunctional.php
<?php /** * Functional test runner * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ require_once __DIR__ . '/../src/init.php'; class PhpCfFunctional extends \PHPUnit\Framework\TestCase { const ORIGINAL = "/original/"; const EXPECTED = "/expected/"; private static $debug = false; ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/PhpCfTest.php
phpcf-src/test/PhpCfTest.php
<?php /** * Formatter test suite * @author Alexander Krasheninnikov <a.krasheninnikov@corp.badoo.com> */ require_once __DIR__ . '/../src/init.php'; class PHPCFTest extends \PHPUnit\Framework\TestCase { private $Formatters = []; private static $debug = false; const ORIGINAL = "/original/"; const EXP...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/several-times-apply.php
phpcf-src/test/expected/several-times-apply.php
<?php if ($a) echo "Hello"; else echo "World!";
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/switch-short-if.php
phpcf-src/test/expected/switch-short-if.php
<?php switch ($a) { case '1'; if ($b) die; echo "no more tabs here"; break; case '2': if ($b) die; echo "no more tabs here"; break; default: if ($b) die; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/const-array-plain.php
phpcf-src/test/expected/const-array-plain.php
<?php const SMTH = [ 'ONE' => 1, ]; class Test { const SMTH = [ 'ONE' => 1, ]; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/empty-call.php
phpcf-src/test/expected/empty-call.php
<?php /** * Test for formatting function call without arguments */ $a = array(); function definition() {} class ClassDef { private function emptyFunction() {} } functionCall(); $a = function() {};
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/longdef.php
phpcf-src/test/expected/longdef.php
<?php function shortdef($a, $b, $c) {} function longdef( array $a = array(), Something $b, OtherThing $c ) { echo "Very nasty formatting for function definition"; } function longparams( $aaaaaaaaaaaaaaa, $bbbbbbbbbbbbbbbbbbb, $cccccccccccccccccc, $ddddddddddddddddddd, $eeeeeeeeeeee...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/short-array.php
phpcf-src/test/expected/short-array.php
<?php // simple $a = []; // next line $b = []; // no spaces $c = [1, 2, 3]; // extra spaces $d = [1, 2, 3]; // dereferenced call $e = [1, 2, 3][2]; // passed as param in function $f = functionCall([1, 2, 3], [4]); // simply somewhere [1, 2, 3345]; // nested [[1, 2, 3], [4, 5, 6]]; if (true) { [123, 456]; }...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/opentag-internal.php
phpcf-src/test/expected/opentag-internal.php
<?php class Something {} ?> inline html <?= "string1" ?> <?= "string2" ?> <?php echo 1;
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-return-type-declarations-long.php
phpcf-src/test/expected/7-return-type-declarations-long.php
<?php /** * Test for return type declarations */ function one( $a, $b ) : \DateTime { date(); } function two( $a, $b ) : \DateTime { date(); } function oneEmpty( $a, $b ) : \DateTime {} function returnArray( $a, $b ) : array {} function returnInt( $a, $b ) : int {}...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/long-arr.php
phpcf-src/test/expected/long-arr.php
<?php $arr = array( 'something', 'other thing1', 'other thing2', 'other thing3', 'other thing4', 'other thing5', 'other thing6', 'other thing7', 'other thing8', 'other thing6', 'other thing7', 'other thing8', 'other thing6', 'other thing7', 'other thing8', 'other thing6', 'other thing7', 'other thing8', 'ot...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/opentag-no-spaces-before.php
phpcf-src/test/expected/opentag-no-spaces-before.php
<?php echo 1;
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/if-comment.php
phpcf-src/test/expected/if-comment.php
<?php assertTrue( true // comment || false );
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/multiline-concat.php
phpcf-src/test/expected/multiline-concat.php
<?php $str = 'Something' . PHP_EOL . 'Other thing' . PHP_EOL . 'Something really other'; echo "$str is very important ;)";
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/71-void-functions.php
phpcf-src/test/expected/71-void-functions.php
<?php /** * Test for void functions declarations */ function returnFloat() : void {} class Test { function returnFloat() : void {} } trait TestTrait { public function returnFloat( $a, $b ) : void { echo $a + $b; return; } } interface TestInterface { function...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/instanceof.php
phpcf-src/test/expected/instanceof.php
<?php /** * Test formatting instanceof token */ $a instanceof Test; function check($a) { if ($a instanceof DateTime) {} }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/end-space.php
phpcf-src/test/expected/end-space.php
<?php echo "Hello world!";
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/trait.php
phpcf-src/test/expected/trait.php
<?php trait SampleTrait { /** * @var int this is trait variable */ protected $trait_variable = 1; public function test($a, $b) { $b = 10; // test } } trait TraitTwo {} trait TraitThree { public function test($a, $b) { $b = 20; } } class Impl { use Sample...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/expression-static-call.php
phpcf-src/test/expected/expression-static-call.php
<?php /** * Test for formatting ClassName::{expr}() */ $a = "methodName"; ClassName::{$a}();
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/ma-inst.php
phpcf-src/test/expected/ma-inst.php
<?php /** * Test for formatting new instance member access * (new Class)->test(); */ (new Test)->run(); // this comment needed to prevent space-alignment hack (eliminate line mutual dependency) (new Test($a, $b))->run();
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/switch-dot.php
phpcf-src/test/expected/switch-dot.php
<?php /** * Test for switch, using ';' instead of ':' */ switch ($a) { case 'a'; $b = 10; break; default; $a = 5; break; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/comments.php
phpcf-src/test/expected/comments.php
<?php // forbidden comment starting with '#' // single-line comment with indentation level 0 echo 'Hello world 1!'; echo 'Hello world 2!'; // single-line comment after a statement with indentation level 0 if ($hello) { // another single-line comment with indent level 0 and spaces after it // single-line comment...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/increment.php
phpcf-src/test/expected/increment.php
<?php for ($i = 0; $i < 100; $i++) { echo "$i\n"; } for ($i = 100; $i >= 0; $i--) { echo "$i\n"; } for ($i = 0; $i < 100; ++$i) { echo "$i\n"; } for ($i = 100; $i >= 0; --$i) { echo "$i\n"; } $j -= ++$i;
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/close-tag-safe1.php
phpcf-src/test/expected/close-tag-safe1.php
<?php echo 'Hello world';
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/long-expr.php
phpcf-src/test/expected/long-expr.php
<?php if ($a && $b) { echo "Hello world!\n"; } self::doSomething(); call_my_func(MY_CONST); $this ->callOneThing() ->callAnotherThing(); $this->callSomething()->callOtherSomething(); array_map(function($arg) { return $arg[1]; }, array('11', '22'));
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/cyrillic.php
phpcf-src/test/expected/cyrillic.php
<?php /** * This class contains кириллические symbols */ class ContainsCyrillicSymbols { public function meToo() {} }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/implements.php
phpcf-src/test/expected/implements.php
<?php /** * Test, that interfaces will be separated with comma and space */ class Test extends One implements Two, Three { private $a = 10; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/yield.php
phpcf-src/test/expected/yield.php
<?php /** * Test formatting for "yield" keyword */ function generator() { for ($i = 0; $i < 10; $i++) { yield $i; } }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-spaceship.php
phpcf-src/test/expected/7-spaceship.php
<?php /** * Spaceship operator */ echo $a <=> $b; echo $a <=> $b;
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/const-keywords-3.php
phpcf-src/test/expected/const-keywords-3.php
<?php class A { const FUNCTION = 3; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/if.php
phpcf-src/test/expected/if.php
<?php if ($a && $b && $c) { echo 'd'; } if ($a) break; elseif ($b) do_something_else(); else if ($c) define('true', false); else continue; if ($a and $b) {} class MyTest { public function find(array $filter = array(), array $options = array()) { $local_cache = parent::find($filter, $optio...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/71-multi-catch.php
phpcf-src/test/expected/71-multi-catch.php
<?php try { // some code } catch (FirstException | SecondException $e) { // handle first and second exceptions }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/finally.php
phpcf-src/test/expected/finally.php
<?php /** * check for finally keyword correct format */ try { throw new InvalidArgumentException("Catch me, if you can"); } catch (InvalidArgumentException $e) { echo "got you!"; } finally { echo "OLOLO"; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/71-nullable-types.php
phpcf-src/test/expected/71-nullable-types.php
<?php /** * Test for nullable return type declarations */ function returnFloat(?int $a) : ?float {} class Test { function returnFloat(?int $a) : ?float {} } trait TestTrait { public function returnFloat( ?int $a, $b ) : ?float { return $a + $b; } } interface TestInterfa...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/71-iterable.php
phpcf-src/test/expected/71-iterable.php
<?php function testIterable(iterable $A, iterable ...$B) : iterable { echo "Something"; return $B[0]; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/doc-comment-class.php
phpcf-src/test/expected/doc-comment-class.php
<?php /** * Class OK */ class DocOkClass { public function __construct() { /** @var int $var - there can be empty strings */ $var = 5; } } /** * Class with several empty strings after */ class DocEmptyClass { public function __construct() {} } /** * Class on the same line */ cla...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/alignment.php
phpcf-src/test/expected/alignment.php
<?php define('QUERY_SOMETHING', 'SELECT * FROM table'); define('QUERY_OTHER_THING', 'SELECT * FROM table'); define('QUERY_SOMETHING', 'SELECT * FROM table'); define('QUERY_OTHER_THING', 'SELECT * FROM table'); $arr = array( 'some-test' => true, 'other-test' => false, 'slight-misalign' ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/const-nl.php
phpcf-src/test/expected/const-nl.php
<?php class a { const A = 'a', // a B = 'b', C = 'c'; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-yield-from.php
phpcf-src/test/expected/7-yield-from.php
<?php function gen() { yield 1; yield 2; yield from gen2(); } class One { public function test() { yield from test(); } } $a = function() { yield from test(); };
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/long-params.php
phpcf-src/test/expected/long-params.php
<?php function findInner(array $filter, array $options) { $message = sprintf( 'Instantiating aggregator %s (%d) in country %s (%d) on flow %s (%d) ' . "at version %s with unsupported operator %s (%d)\n%s", $this->getAggregatorClass($id) ); } error_log( $a . $b, 3 ); ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-anon-class-not-empty.php
phpcf-src/test/expected/7-anon-class-not-empty.php
<?php /** * Test for empty anon class declaration in any places */ $a = new class(10, 20, new \DateTime()) extends \Test\Me implements \I { const TEST = 10; protected $property = 10; public function hello() { echo "hello"; } }; function test() { $a = new class(10, 20, new \DateTime())...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-anon-class-call.php
phpcf-src/test/expected/7-anon-class-call.php
<?php /** * Support for anon class, passed as argument */ call( new class extends \DateTime { protected $property = 10; function hello() { return "hello"; } }, new class extends \DateTime { protected $property = 10; function hello() { ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/long-classdef.php
phpcf-src/test/expected/long-classdef.php
<?php abstract class Something extends OtherThing { const C1 = "Something", C2 = "Other things"; private static $hello = "Hello"; abstract function someThing(); } class SomethingTwo extends OtherThing { const C1 = "Something", C2 = "Another thing"; private static $helloo = ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/empty-while-foreach.php
phpcf-src/test/expected/empty-while-foreach.php
<?php while ($iterations-- && isset($ids[$id = rand(1, 0x7fffffff)])) {} foreach (array() as $a) {}
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/const-comment.php
phpcf-src/test/expected/const-comment.php
<?php /** * Test check formatting of multiple constants, with single 'const' word before */ class Test { const ONE = 1, TWO = 2; //duo }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/classref-function.php
phpcf-src/test/expected/classref-function.php
<?php /** * Test for class reference inside arrays */ class Test { public static function provider_42h() { $a = MimeMails_TheyCanNotSendYouAMessages::class; return array( array(Partner::ID_DEFAULT, MimeMails_TheyCanNotSendYouAMessages::class), array( Par...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/binary-operators.php
phpcf-src/test/expected/binary-operators.php
<?php $a = $b << ($c + 1); $a = $b >> ($c + 1);
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/doc-comment-trait-interface.php
phpcf-src/test/expected/doc-comment-trait-interface.php
<?php /** * Trait OK */ trait DocOkTrait { protected static $a = 'a'; } /** * Trait with several empty strings after */ trait DocEmptyTrait { protected static $a = 'a'; } /** * Interface OK */ interface DocOkInterface { public function a(); } /** * Interface with several empty strings after */ in...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/switch-premature-break.php
phpcf-src/test/expected/switch-premature-break.php
<?php switch ($a) { case 'A': if (!$value) break; $a = 10; break; default: if (!$value) break; $a = 10; break; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/74-features.php
phpcf-src/test/expected/74-features.php
<?php namespace Acme\User; // Typed properties class User { public int $id; protected static string $name; private \Acme\User\User $UserA; private \Acme\User\User $UserB; } class Multiple { public int $a = 1, $b = 2; public \Acme\User\User ...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-null-coalesce.php
phpcf-src/test/expected/7-null-coalesce.php
<?php /** * Test for null-coalescing expressions */ $a = $_GET['user'] ?? 'one' ?? 'two'; $a = $_GET['user'] ?? 'one'; $a = $_GET['user'] ?? 'one' ?? 'two'; $a = $_GET['user'] ?? 'user' ? 'one' : 'two'; $a = $_GET['user'] ?? 'user' ? : 'two'; $a = $_GET['user'] ?? 'user' ?: 'two';
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/class-comm.php
phpcf-src/test/expected/class-comm.php
<?php /** * Class with constants, check alignment, if comment is present * THE EXPECTED FILE MUST BE LIKE THIS */ class Constants { const LOAD_RESULT_SUCCESS = 0; // code const LOAD_RESULT_SH = 6; // ok -> finalize const LOAD_RESULT_OTHER = 0; // code const LOAD_RESULT_SUCC...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/71-class-constants-visibility.php
phpcf-src/test/expected/71-class-constants-visibility.php
<?php class ConstDemo { const PUBLIC_CONST_A = 1; public const PUBLIC_CONST_B = 2; protected const PROTECTED_CONST = 3; private const PRIVATE_CONST = 4; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-anon-class-empty.php
phpcf-src/test/expected/7-anon-class-empty.php
<?php /** * Test for empty anon class declaration in any places */ $a = new class(10, 20, new \DateTime()) extends \Test {}; $b = new class(10, 20, new \DateTime()) implements \Test {}; function test() { $a = new class(10, 20, new \DateTime()) extends \Test {}; $b = new class(10, 20, new \DateTime()) imple...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/7-constant-expr.php
phpcf-src/test/expected/7-constant-expr.php
<?php /** * Test for expressions in constant definitions */ class One { const TEST = [ 'one', 'two', 'three' ]; const TEST_FUNC = 1 + PHP_MAJOR_VERSION; const TEST_2 = 10 + 10; const A = [ 'test' ], B = 10 + 10; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/const-keywords-1.php
phpcf-src/test/expected/const-keywords-1.php
<?php class A { const ARRAY = 1; const FUNCTION = 1; const LIST = 1; } class B { const FUNCTION = 1; } class C { const INCLUDE = 1; const DEFAULT = 2; }
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/short-array-ml.php
phpcf-src/test/expected/short-array-ml.php
<?php /** * Test to explode long short-syntax array into multiple lines */ $arr = [ 'something', 'other thing1', 'other thing2', 'other thing3', 'other thing4', 'other thing5', 'other thing6', 'other thing7', 'other thing8', 'other thing6', 'other thing7', 'other thing8', 'other thing6', 'other thing7', '...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false
badoo/phpcf
https://github.com/badoo/phpcf/blob/b0a23b64f48a2f1f42418b3d506b13cfde6d494e/phpcf-src/test/expected/const-keywords-2.php
phpcf-src/test/expected/const-keywords-2.php
<?php class A { const B = 1; const ARRAY = 2; const FUNCTION = 3; const LIST = 4; function foo() { echo "IN FOO\n"; } } class B { const ARRAY = 2, FUNCTION = 3, LIST = 4; function bar() { echo "IN BAR\...
php
MIT
b0a23b64f48a2f1f42418b3d506b13cfde6d494e
2026-01-05T03:14:46.350638Z
false