├── .no-sublime-package ├── CompletePHP.sublime-settings ├── CompletePHPAutocomplete.py ├── CompletePHPInlineDocsHover.py ├── LICENSE ├── README.md ├── html └── README ├── reflect.php ├── reflector.php └── vendor ├── autoload.php ├── composer ├── ClassLoader.php ├── LICENSE ├── autoload_classmap.php ├── autoload_files.php ├── autoload_namespaces.php ├── autoload_psr4.php ├── autoload_real.php ├── autoload_static.php └── installed.json ├── nikic └── php-parser │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── UPGRADE-1.0.md │ ├── bin │ └── php-parse.php │ ├── composer.json │ ├── doc │ ├── 0_Introduction.markdown │ ├── 1_Installation.markdown │ ├── 2_Usage_of_basic_components.markdown │ ├── 3_Other_node_tree_representations.markdown │ ├── 4_Code_generation.markdown │ └── component │ │ ├── Error.markdown │ │ └── Lexer.markdown │ ├── grammar │ ├── README.md │ ├── analyze.php │ ├── kmyacc.php.parser │ ├── rebuildParser.php │ └── zend_language_parser.phpy │ ├── lib │ ├── PhpParser │ │ ├── Autoloader.php │ │ ├── Builder.php │ │ ├── Builder │ │ │ ├── Class_.php │ │ │ ├── Declaration.php │ │ │ ├── FunctionLike.php │ │ │ ├── Function_.php │ │ │ ├── Interface_.php │ │ │ ├── Method.php │ │ │ ├── Namespace_.php │ │ │ ├── Param.php │ │ │ ├── Property.php │ │ │ ├── Trait_.php │ │ │ └── Use_.php │ │ ├── BuilderAbstract.php │ │ ├── BuilderFactory.php │ │ ├── Comment.php │ │ ├── Comment │ │ │ └── Doc.php │ │ ├── Error.php │ │ ├── Lexer.php │ │ ├── Lexer │ │ │ └── Emulative.php │ │ ├── Node.php │ │ ├── Node │ │ │ ├── Arg.php │ │ │ ├── Const_.php │ │ │ ├── Expr.php │ │ │ ├── Expr │ │ │ │ ├── ArrayDimFetch.php │ │ │ │ ├── ArrayItem.php │ │ │ │ ├── Array_.php │ │ │ │ ├── Assign.php │ │ │ │ ├── AssignOp.php │ │ │ │ ├── AssignOp │ │ │ │ │ ├── BitwiseAnd.php │ │ │ │ │ ├── BitwiseOr.php │ │ │ │ │ ├── BitwiseXor.php │ │ │ │ │ ├── Concat.php │ │ │ │ │ ├── Div.php │ │ │ │ │ ├── Minus.php │ │ │ │ │ ├── Mod.php │ │ │ │ │ ├── Mul.php │ │ │ │ │ ├── Plus.php │ │ │ │ │ ├── Pow.php │ │ │ │ │ ├── ShiftLeft.php │ │ │ │ │ └── ShiftRight.php │ │ │ │ ├── AssignRef.php │ │ │ │ ├── BinaryOp.php │ │ │ │ ├── BinaryOp │ │ │ │ │ ├── BitwiseAnd.php │ │ │ │ │ ├── BitwiseOr.php │ │ │ │ │ ├── BitwiseXor.php │ │ │ │ │ ├── BooleanAnd.php │ │ │ │ │ ├── BooleanOr.php │ │ │ │ │ ├── Coalesce.php │ │ │ │ │ ├── Concat.php │ │ │ │ │ ├── Div.php │ │ │ │ │ ├── Equal.php │ │ │ │ │ ├── Greater.php │ │ │ │ │ ├── GreaterOrEqual.php │ │ │ │ │ ├── Identical.php │ │ │ │ │ ├── LogicalAnd.php │ │ │ │ │ ├── LogicalOr.php │ │ │ │ │ ├── LogicalXor.php │ │ │ │ │ ├── Minus.php │ │ │ │ │ ├── Mod.php │ │ │ │ │ ├── Mul.php │ │ │ │ │ ├── NotEqual.php │ │ │ │ │ ├── NotIdentical.php │ │ │ │ │ ├── Plus.php │ │ │ │ │ ├── Pow.php │ │ │ │ │ ├── ShiftLeft.php │ │ │ │ │ ├── ShiftRight.php │ │ │ │ │ ├── Smaller.php │ │ │ │ │ ├── SmallerOrEqual.php │ │ │ │ │ └── Spaceship.php │ │ │ │ ├── BitwiseNot.php │ │ │ │ ├── BooleanNot.php │ │ │ │ ├── Cast.php │ │ │ │ ├── Cast │ │ │ │ │ ├── Array_.php │ │ │ │ │ ├── Bool_.php │ │ │ │ │ ├── Double.php │ │ │ │ │ ├── Int_.php │ │ │ │ │ ├── Object_.php │ │ │ │ │ ├── String_.php │ │ │ │ │ └── Unset_.php │ │ │ │ ├── ClassConstFetch.php │ │ │ │ ├── Clone_.php │ │ │ │ ├── Closure.php │ │ │ │ ├── ClosureUse.php │ │ │ │ ├── ConstFetch.php │ │ │ │ ├── Empty_.php │ │ │ │ ├── ErrorSuppress.php │ │ │ │ ├── Eval_.php │ │ │ │ ├── Exit_.php │ │ │ │ ├── FuncCall.php │ │ │ │ ├── Include_.php │ │ │ │ ├── Instanceof_.php │ │ │ │ ├── Isset_.php │ │ │ │ ├── List_.php │ │ │ │ ├── MethodCall.php │ │ │ │ ├── New_.php │ │ │ │ ├── PostDec.php │ │ │ │ ├── PostInc.php │ │ │ │ ├── PreDec.php │ │ │ │ ├── PreInc.php │ │ │ │ ├── Print_.php │ │ │ │ ├── PropertyFetch.php │ │ │ │ ├── ShellExec.php │ │ │ │ ├── StaticCall.php │ │ │ │ ├── StaticPropertyFetch.php │ │ │ │ ├── Ternary.php │ │ │ │ ├── UnaryMinus.php │ │ │ │ ├── UnaryPlus.php │ │ │ │ ├── Variable.php │ │ │ │ ├── YieldFrom.php │ │ │ │ └── Yield_.php │ │ │ ├── FunctionLike.php │ │ │ ├── Name.php │ │ │ ├── Name │ │ │ │ ├── FullyQualified.php │ │ │ │ └── Relative.php │ │ │ ├── Param.php │ │ │ ├── Scalar.php │ │ │ ├── Scalar │ │ │ │ ├── DNumber.php │ │ │ │ ├── Encapsed.php │ │ │ │ ├── LNumber.php │ │ │ │ ├── MagicConst.php │ │ │ │ ├── MagicConst │ │ │ │ │ ├── Class_.php │ │ │ │ │ ├── Dir.php │ │ │ │ │ ├── File.php │ │ │ │ │ ├── Function_.php │ │ │ │ │ ├── Line.php │ │ │ │ │ ├── Method.php │ │ │ │ │ ├── Namespace_.php │ │ │ │ │ └── Trait_.php │ │ │ │ └── String_.php │ │ │ ├── Stmt.php │ │ │ └── Stmt │ │ │ │ ├── Break_.php │ │ │ │ ├── Case_.php │ │ │ │ ├── Catch_.php │ │ │ │ ├── ClassConst.php │ │ │ │ ├── ClassLike.php │ │ │ │ ├── ClassMethod.php │ │ │ │ ├── Class_.php │ │ │ │ ├── Const_.php │ │ │ │ ├── Continue_.php │ │ │ │ ├── DeclareDeclare.php │ │ │ │ ├── Declare_.php │ │ │ │ ├── Do_.php │ │ │ │ ├── Echo_.php │ │ │ │ ├── ElseIf_.php │ │ │ │ ├── Else_.php │ │ │ │ ├── For_.php │ │ │ │ ├── Foreach_.php │ │ │ │ ├── Function_.php │ │ │ │ ├── Global_.php │ │ │ │ ├── Goto_.php │ │ │ │ ├── HaltCompiler.php │ │ │ │ ├── If_.php │ │ │ │ ├── InlineHTML.php │ │ │ │ ├── Interface_.php │ │ │ │ ├── Label.php │ │ │ │ ├── Namespace_.php │ │ │ │ ├── Property.php │ │ │ │ ├── PropertyProperty.php │ │ │ │ ├── Return_.php │ │ │ │ ├── StaticVar.php │ │ │ │ ├── Static_.php │ │ │ │ ├── Switch_.php │ │ │ │ ├── Throw_.php │ │ │ │ ├── TraitUse.php │ │ │ │ ├── TraitUseAdaptation.php │ │ │ │ ├── TraitUseAdaptation │ │ │ │ ├── Alias.php │ │ │ │ └── Precedence.php │ │ │ │ ├── Trait_.php │ │ │ │ ├── TryCatch.php │ │ │ │ ├── Unset_.php │ │ │ │ ├── UseUse.php │ │ │ │ ├── Use_.php │ │ │ │ └── While_.php │ │ ├── NodeAbstract.php │ │ ├── NodeDumper.php │ │ ├── NodeTraverser.php │ │ ├── NodeTraverserInterface.php │ │ ├── NodeVisitor.php │ │ ├── NodeVisitor │ │ │ └── NameResolver.php │ │ ├── NodeVisitorAbstract.php │ │ ├── Parser.php │ │ ├── ParserAbstract.php │ │ ├── PrettyPrinter │ │ │ └── Standard.php │ │ ├── PrettyPrinterAbstract.php │ │ ├── Serializer.php │ │ ├── Serializer │ │ │ └── XML.php │ │ ├── Unserializer.php │ │ └── Unserializer │ │ │ └── XML.php │ └── bootstrap.php │ └── phpunit.xml.dist └── sublimeAutoComplete.json /.no-sublime-package: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /CompletePHP.sublime-settings: -------------------------------------------------------------------------------- 1 | { 2 | "showInlineDocsOnHover": true, //Show inline documentation for built in functions on hover 3 | "pathToPHPDocs":"Packages/CompletePHP/html/function.{{function}}.html",//PHP documentation, You can download a copy from http://php.net/get/php_manual_en.tar.gz/from/a/mirror 4 | "php_path": "", // Path for PHP executable, e.g. "/usr/lib/php" or "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments 5 | } 6 | -------------------------------------------------------------------------------- /CompletePHPAutocomplete.py: -------------------------------------------------------------------------------- 1 | import sublime, sublime_plugin 2 | import subprocess 3 | import json 4 | 5 | class CompletePHPAutocomplete(sublime_plugin.EventListener): 6 | def on_query_completions(self, view, prefix, locations): 7 | if "PHP" not in view.settings().get('syntax'): 8 | return 9 | region = sublime.Region(int(locations[0]-3),int(locations[0]-1)) 10 | chars = view.substr(region); 11 | if chars != "->": 12 | if chars != "::": 13 | return [] 14 | 15 | opts = [] 16 | settings = sublime.load_settings('CompletePHP.sublime-settings') 17 | php_path = "php" 18 | php_settings = settings.get('php_path') 19 | if (php_settings != ""): 20 | php_path = php_settings 21 | 22 | 23 | cmd = [] 24 | cmd.append(str(php_path)) 25 | cmd.append(sublime.packages_path()+"/CompletePHP/reflect.php") 26 | cmd.append(view.file_name()) 27 | platform = sublime.platform() 28 | 29 | stderr = "" 30 | stdout = "" 31 | try: 32 | if (platform == "windows"): 33 | startupinfo = subprocess.STARTUPINFO() 34 | startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW 35 | startupinfo.wShowWindow = subprocess.SW_HIDE 36 | p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo, shell=False, creationflags=subprocess.SW_HIDE) 37 | else: 38 | p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) 39 | stdout, stderr = p.communicate() 40 | except Exception as e: 41 | stderr = str(e) 42 | print(stderr) 43 | 44 | if (not stderr and not stdout): 45 | stderr = "Error while gethering list of php transformations" 46 | 47 | if len(stderr) == 0 and len(stdout) > 0: 48 | text = stdout.decode('utf-8') 49 | if len(text) == 0: 50 | return []; 51 | data = json.loads(text) 52 | sugs = [] 53 | for k in data.keys(): 54 | 55 | if k.startswith(prefix): 56 | for c in data[k]: 57 | sug = "%s()\t%s" % (k,c['class']) 58 | replacementText = "%s(" % (k) 59 | tab = 1 60 | parts = [] 61 | for p in c['params']: 62 | param = "\$${%s:%s}" % (tab,p) 63 | parts.append(param) 64 | tab += 1 65 | replacementText += ",".join(parts) 66 | replacementText += ");" 67 | sugs.append((sug,replacementText)) 68 | #sugs.append(next( v for k,v in data.items() if k.startswith(prefix))) 69 | #print(sugs) 70 | #sugs = [(x.attrib["data"],) * 2 for x in elements] 71 | #sugs = [("test()\tBluefile","test(\$${1:param},\$${2:param2})"),("test2()\tBlue","test2()")]; 72 | return sugs 73 | 74 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Sean Sullivan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CompletePHP 2 | --- 3 | Sublime Text addon that provides autocomplete for PSR4 compliant PHP classes, and inline docs 4 | 5 | [![Source Code](https://img.shields.io/badge/source-GitHub-blue.svg?style=flat)](https://github.com/desean1625/CompletePHP) 6 | [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/desean1625/CompletePHP/master/LICENSE) 7 | [![GitHub stars](https://img.shields.io/github/stars/desean1625/CompletePHP.svg?style=flat)](https://github.com/desean1625/CompletePHP/stargazers) 8 | 9 | [![Sublime version](https://img.shields.io/badge/sublime-v2|v3-lightgrey.svg?style=flat)](https://sublimetext.com) 10 | [![Latest version](https://img.shields.io/github/tag/desean1625/CompletePHP.svg?label=release&style=flat&maxAge=2592000)](https://github.com/desean1625/CompletePHP/tags) 11 | 12 | ## Overview 13 | 14 | * [Features](#features) 15 | * [Installation](#installation) 16 | * [Contributing](#contributing) 17 | * [License](#license) 18 | 19 | # Features 20 | 21 | CompletePHP finds vendor classes and builds autocompletes for the methods, and provides inline docs for built-in php functions on mouse over. 22 | 23 | ## Installation 24 | 25 | Release to package control is pending. 26 | 27 | Until then you must manually install by downloading the [zip file](https://github.com/desean1625/CompletePHP/archive/master.zip). 28 | 29 | ### Windows 30 | Unzip files to %USERPROFILE%\AppData\Roaming\Sublime Text 3\Packages\CompletePHP 31 | 32 | ### Linux 33 | Unzip files to ~/.Sublime Text 3/Packages/CompletePHP 34 | 35 | #### PHP Docs 36 | For inline documentation you must [download the PHP Manual](http://php.net/get/php_manual_en.tar.gz/from/a/mirror) and unzip to: 37 | * Windows: %USERPROFILE%\AppData\Roaming\Sublime Text 3\Packages\CompletePHP\html 38 | * Linux: ~/.Sublime Text 3/Packages/CompletePHP/html 39 | 40 | %USERPROFILE%\AppData\Roaming\Sublime Text 3\Packages\CompletePHP 41 | ## Contributing 42 | 43 | Your issue reports and pull requests are always welcome. 44 | 45 | ## License 46 | 47 | Released under the [MIT License](LICENSE). 48 | -------------------------------------------------------------------------------- /html/README: -------------------------------------------------------------------------------- 1 | Make sure you download the PHP documentationt to this folder 2 | 3 | You can download a copy from http://php.net/get/php_manual_en.tar.gz/from/a/mirror 4 | -------------------------------------------------------------------------------- /reflector.php: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getMethods(); 12 | foreach ($meths as $key => $value) { 13 | $params = $value->getParameters(); 14 | $meth = ($value->name == "__construct") ? "new" : $value->name; 15 | $classname = array('class' => $class, "params" => array()); 16 | foreach ($params as $index => $param) { 17 | $classname["params"][] = $param->name; 18 | 19 | } 20 | $out[$meth][] = $classname; 21 | } 22 | echo json_encode($out); -------------------------------------------------------------------------------- /vendor/autoload.php: -------------------------------------------------------------------------------- 1 | $vendorDir . '/nikic/php-parser/lib/bootstrap.php', 10 | ); 11 | -------------------------------------------------------------------------------- /vendor/composer/autoload_namespaces.php: -------------------------------------------------------------------------------- 1 | = 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 27 | if ($useStaticLoader) { 28 | require_once __DIR__ . '/autoload_static.php'; 29 | 30 | call_user_func(\Composer\Autoload\ComposerStaticInit67a3b9ba9a7d27acc98f910b2985e9e9::getInitializer($loader)); 31 | } else { 32 | $map = require __DIR__ . '/autoload_namespaces.php'; 33 | foreach ($map as $namespace => $path) { 34 | $loader->set($namespace, $path); 35 | } 36 | 37 | $map = require __DIR__ . '/autoload_psr4.php'; 38 | foreach ($map as $namespace => $path) { 39 | $loader->setPsr4($namespace, $path); 40 | } 41 | 42 | $classMap = require __DIR__ . '/autoload_classmap.php'; 43 | if ($classMap) { 44 | $loader->addClassMap($classMap); 45 | } 46 | } 47 | 48 | $loader->register(true); 49 | 50 | if ($useStaticLoader) { 51 | $includeFiles = Composer\Autoload\ComposerStaticInit67a3b9ba9a7d27acc98f910b2985e9e9::$files; 52 | } else { 53 | $includeFiles = require __DIR__ . '/autoload_files.php'; 54 | } 55 | foreach ($includeFiles as $fileIdentifier => $file) { 56 | composerRequire67a3b9ba9a7d27acc98f910b2985e9e9($fileIdentifier, $file); 57 | } 58 | 59 | return $loader; 60 | } 61 | } 62 | 63 | function composerRequire67a3b9ba9a7d27acc98f910b2985e9e9($fileIdentifier, $file) 64 | { 65 | if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { 66 | require $file; 67 | 68 | $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /vendor/composer/autoload_static.php: -------------------------------------------------------------------------------- 1 | __DIR__ . '/..' . '/nikic/php-parser/lib/bootstrap.php', 11 | ); 12 | 13 | public static function getInitializer(ClassLoader $loader) 14 | { 15 | return \Closure::bind(function () use ($loader) { 16 | 17 | }, null, ClassLoader::class); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/composer/installed.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "nikic/php-parser", 4 | "version": "v1.4.1", 5 | "version_normalized": "1.4.1.0", 6 | "source": { 7 | "type": "git", 8 | "url": "https://github.com/nikic/PHP-Parser.git", 9 | "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51" 10 | }, 11 | "dist": { 12 | "type": "zip", 13 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", 14 | "reference": "f78af2c9c86107aa1a34cd1dbb5bbe9eeb0d9f51", 15 | "shasum": "" 16 | }, 17 | "require": { 18 | "ext-tokenizer": "*", 19 | "php": ">=5.3" 20 | }, 21 | "time": "2015-09-19T14:15:08+00:00", 22 | "type": "library", 23 | "extra": { 24 | "branch-alias": { 25 | "dev-master": "1.4-dev" 26 | } 27 | }, 28 | "installation-source": "dist", 29 | "autoload": { 30 | "files": [ 31 | "lib/bootstrap.php" 32 | ] 33 | }, 34 | "notification-url": "https://packagist.org/downloads/", 35 | "license": [ 36 | "BSD-3-Clause" 37 | ], 38 | "authors": [ 39 | { 40 | "name": "Nikita Popov" 41 | } 42 | ], 43 | "description": "A PHP parser written in PHP", 44 | "keywords": [ 45 | "parser", 46 | "php" 47 | ] 48 | } 49 | ] 50 | -------------------------------------------------------------------------------- /vendor/nikic/php-parser/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.3 5 | - 5.4 6 | - 5.5 7 | - 5.6 8 | - 7.0 9 | - hhvm 10 | 11 | matrix: 12 | allow_failures: 13 | - php: 7.0 14 | fast_finish: true 15 | -------------------------------------------------------------------------------- /vendor/nikic/php-parser/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 by Nikita Popov. 2 | 3 | Some rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above 13 | copyright notice, this list of conditions and the following 14 | disclaimer in the documentation and/or other materials provided 15 | with the distribution. 16 | 17 | * The names of the contributors may not be used to endorse or 18 | promote products derived from this software without specific 19 | prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /vendor/nikic/php-parser/README.md: -------------------------------------------------------------------------------- 1 | PHP Parser 2 | ========== 3 | 4 | This is a PHP 5.2 to PHP 5.6 parser written in PHP. Its purpose is to simplify static code analysis and 5 | manipulation. 6 | 7 | [**Documentation for version 1.x**][doc_1_x] (stable; for running on PHP >= 5.3). 8 | 9 | [Documentation for version 0.9.x][doc_0_9] (unsupported; for running on PHP 5.2). 10 | 11 | In a Nutshell 12 | ------------- 13 | 14 | The parser turns PHP source code into an abstract syntax tree. For example, if you pass the following code into the 15 | parser: 16 | 17 | ```php 18 | =5.3", 14 | "ext-tokenizer": "*" 15 | }, 16 | "autoload": { 17 | "files": ["lib/bootstrap.php"] 18 | }, 19 | "extra": { 20 | "branch-alias": { 21 | "dev-master": "1.4-dev" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/nikic/php-parser/doc/0_Introduction.markdown: -------------------------------------------------------------------------------- 1 | Introduction 2 | ============ 3 | 4 | This project is a PHP 5.2 to PHP 5.6 parser **written in PHP itself**. 5 | 6 | What is this for? 7 | ----------------- 8 | 9 | A parser is useful for [static analysis][0], manipulation of code and basically any other 10 | application dealing with code programmatically. A parser constructs an [Abstract Syntax Tree][1] 11 | (AST) of the code and thus allows dealing with it in an abstract and robust way. 12 | 13 | There are other ways of processing source code. One that PHP supports natively is using the 14 | token stream generated by [`token_get_all`][2]. The token stream is much more low level than 15 | the AST and thus has different applications: It allows to also analyze the exact formatting of 16 | a file. On the other hand the token stream is much harder to deal with for more complex analysis. 17 | For example an AST abstracts away the fact that in PHP variables can be written as `$foo`, but also 18 | as `$$bar`, `${'foobar'}` or even `${!${''}=barfoo()}`. You don't have to worry about recognizing 19 | all the different syntaxes from a stream of tokens. 20 | 21 | Another questions is: Why would I want to have a PHP parser *written in PHP*? Well, PHP might not be 22 | a language especially suited for fast parsing, but processing the AST is much easier in PHP than it 23 | would be in other, faster languages like C. Furthermore the people most probably wanting to do 24 | programmatic PHP code analysis are incidentally PHP developers, not C developers. 25 | 26 | What can it parse? 27 | ------------------ 28 | 29 | The parser uses a PHP 5.6 compliant grammar, which is backwards compatible with all PHP version from PHP 5.2 30 | upwards (and maybe older). 31 | 32 | As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP 33 | version it runs on), additionally a wrapper for emulating new tokens from 5.3, 5.4, 5.5 and 5.6 is provided. 34 | This allows to parse PHP 5.6 source code running on PHP 5.3, for example. This emulation is very hacky and not 35 | perfect, but it should work well on any sane code. 36 | 37 | What output does it produce? 38 | ---------------------------- 39 | 40 | The parser produces an [Abstract Syntax Tree][1] (AST) also known as a node tree. How this looks like 41 | can best be seen in an example. The program `namespace('Name\Space') 20 | ->addStmt($factory->use('Some\Other\Thingy')->as('SomeOtherClass')) 21 | ->addStmt($factory->class('SomeClass') 22 | ->extend('SomeOtherClass') 23 | ->implement('A\Few', '\Interfaces') 24 | ->makeAbstract() // ->makeFinal() 25 | 26 | ->addStmt($factory->method('someMethod') 27 | ->makePublic() 28 | ->makeAbstract() // ->makeFinal() 29 | ->addParam($factory->param('someParam')->setTypeHint('SomeClass')) 30 | ->setDocComment('/** 31 | * This method does something. 32 | * 33 | * @param SomeClass And takes a parameter 34 | */') 35 | ) 36 | 37 | ->addStmt($factory->method('anotherMethod') 38 | ->makeProtected() // ->makePublic() [default], ->makePrivate() 39 | ->addParam($factory->param('someParam')->setDefault('test')) 40 | // it is possible to add manually created nodes 41 | ->addStmt(new PhpParser\Node\Expr\Print_(new PhpParser\Node\Expr\Variable('someParam'))) 42 | ) 43 | 44 | // properties will be correctly reordered above the methods 45 | ->addStmt($factory->property('someProperty')->makeProtected()) 46 | ->addStmt($factory->property('anotherProperty')->makePrivate()->setDefault(array(1, 2, 3))) 47 | ) 48 | 49 | ->getNode() 50 | ; 51 | 52 | $stmts = array($node); 53 | $prettyPrinter = new PhpParser\PrettyPrinter\Standard(); 54 | echo $prettyPrinter->prettyPrintFile($stmts); 55 | ``` 56 | 57 | This will produce the following output with the standard pretty printer: 58 | 59 | ```php 60 | array('comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos'), 19 | )); 20 | $parser = new PhpParser\Parser($lexer); 21 | 22 | try { 23 | $stmts = $parser->parse($code); 24 | // ... 25 | } catch (PhpParser\Error $e) { 26 | // ... 27 | } 28 | ``` 29 | 30 | Before using column information its availability needs to be checked with `$e->hasColumnInfo()`, as the precise 31 | location of an error cannot always be determined. The methods for retrieving column information also have to be passed 32 | the source code of the parsed file. An example for printing an error: 33 | 34 | ```php 35 | if ($e->hasColumnInfo()) { 36 | echo $e->getRawMessage() . ' from ' . $e->getStartLine() . ':' . $e->getStartColumn($code) 37 | . ' to ' . $e->getEndLine() . ':' . $e->getEndColumn($code); 38 | } else { 39 | echo $e->getMessage(); 40 | } 41 | ``` 42 | 43 | Both line numbers and column numbers are 1-based. EOF errors will be located at the position one past the end of the 44 | file. 45 | 46 | Error recovery 47 | -------------- 48 | 49 | > **EXPERIMENTAL** 50 | 51 | By default the parser will throw an exception upon encountering the first error during parsing. An alternative mode is 52 | also supported, in which the parser will remember the error, but try to continue parsing the rest of the source code. 53 | 54 | To enable this mode the `throwOnError` parser option needs to be disabled. Any errors that occurred during parsing can 55 | then be retrieved using `$parser->getErrors()`. The `$parser->parse()` method will either return a partial syntax tree 56 | or `null` if recovery fails. 57 | 58 | A usage example: 59 | 60 | ```php 61 | $parser = new PhpParser\Parser(new PhpParser\Lexer, array( 62 | 'throwOnError' => false, 63 | )); 64 | 65 | $stmts = $parser->parse($code); 66 | $errors = $parser->getErrors(); 67 | 68 | foreach ($errors as $error) { 69 | // $error is an ordinary PhpParser\Error 70 | } 71 | 72 | if (null !== $stmts) { 73 | // $stmts is a best-effort partial AST 74 | } 75 | ``` 76 | 77 | The error recovery implementation is experimental -- it currently won't be able to recover from many types of errors. 78 | -------------------------------------------------------------------------------- /vendor/nikic/php-parser/grammar/README.md: -------------------------------------------------------------------------------- 1 | What do all those files mean? 2 | ============================= 3 | 4 | * `zend_language_parser.phpy`: PHP grammer written in a pseudo language 5 | * `analyze.php`: Analyzes the `.phpy`-grammer and outputs some info about it 6 | * `rebuildParser.php`: Preprocesses the `.phpy`-grammar and builds the parser using `kmyacc` 7 | * `kmyacc.php.parser`: A `kmyacc` parser prototype file for PHP 8 | 9 | .phpy pseudo language 10 | ===================== 11 | 12 | The `.phpy` file is a normal grammer in `kmyacc` (`yacc`) style, with some transformations 13 | applied to it: 14 | 15 | * Nodes are created using the syntax `Name[..., ...]`. This is transformed into 16 | `new Name(..., ..., attributes())` 17 | * Some function-like constructs are resolved (see `rebuildParser.php` for a list) 18 | * Associative arrays are written as `[key: value, ...]`, which is transformed to 19 | `array('key' => value, ...)` 20 | 21 | Building the parser 22 | =================== 23 | 24 | In order to rebuild the parser, you need [moriyoshi's fork of kmyacc](https://github.com/moriyoshi/kmyacc-forked). 25 | After you compiled/installed it, run the `rebuildParser.php` script. 26 | 27 | By default only the `Parser.php` is built. If you want to additionally emit debug symbols and create `y.output`, run the 28 | script with `--debug`. If you want to retain the preprocessed grammar pass `--keep-tmp-grammar`. 29 | -------------------------------------------------------------------------------- /vendor/nikic/php-parser/grammar/analyze.php: -------------------------------------------------------------------------------- 1 | \'[^\\\\\']*+(?:\\\\.[^\\\\\']*+)*+\') 7 | (?"[^\\\\"]*+(?:\\\\.[^\\\\"]*+)*+") 8 | (?(?&singleQuotedString)|(?&doubleQuotedString)) 9 | (?/\*[^*]*+(?:\*(?!/)[^*]*+)*+\*/) 10 | (?\{[^\'"/{}]*+(?:(?:(?&string)|(?&comment)|(?&code)|/)[^\'"/{}]*+)*+}) 11 | )'; 12 | 13 | const RULE_BLOCK = '(?[a-z_]++):(?[^\'"/{};]*+(?:(?:(?&string)|(?&comment)|(?&code)|/|})[^\'"/{};]*+)*+);'; 14 | 15 | $usedTerminals = array_flip(array( 16 | 'T_VARIABLE', 'T_STRING', 'T_INLINE_HTML', 'T_ENCAPSED_AND_WHITESPACE', 17 | 'T_LNUMBER', 'T_DNUMBER', 'T_CONSTANT_ENCAPSED_STRING', 'T_STRING_VARNAME', 'T_NUM_STRING' 18 | )); 19 | $unusedNonterminals = array_flip(array( 20 | 'case_separator', 'optional_comma' 21 | )); 22 | 23 | function regex($regex) { 24 | return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~'; 25 | } 26 | 27 | function magicSplit($regex, $string) { 28 | $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string); 29 | 30 | foreach ($pieces as &$piece) { 31 | $piece = trim($piece); 32 | } 33 | 34 | return array_filter($pieces); 35 | } 36 | 37 | echo '
';
38 | 
39 | ////////////////////
40 | ////////////////////
41 | ////////////////////
42 | 
43 | list($defs, $ruleBlocks) = magicSplit('%%', file_get_contents(GRAMMAR_FILE));
44 | 
45 | if ('' !== trim(preg_replace(regex(RULE_BLOCK), '', $ruleBlocks))) {
46 |     die('Not all rule blocks were properly recognized!');
47 | }
48 | 
49 | preg_match_all(regex(RULE_BLOCK), $ruleBlocks, $ruleBlocksMatches, PREG_SET_ORDER);
50 | foreach ($ruleBlocksMatches as $match) {
51 |     $ruleBlockName = $match['name'];
52 |     $rules = magicSplit('\|', $match['rules']);
53 | 
54 |     foreach ($rules as &$rule) {
55 |         $parts = magicSplit('\s+', $rule);
56 |         $usedParts = array();
57 | 
58 |         foreach ($parts as $part) {
59 |             if ('{' === $part[0]) {
60 |                 preg_match_all('~\$([0-9]+)~', $part, $backReferencesMatches, PREG_SET_ORDER);
61 |                 foreach ($backReferencesMatches as $match) {
62 |                     $usedParts[$match[1]] = true;
63 |                 }
64 |             }
65 |         }
66 | 
67 |         $i = 1;
68 |         foreach ($parts as &$part) {
69 |             if ('/' === $part[0]) {
70 |                 continue;
71 |             }
72 | 
73 |             if (isset($usedParts[$i])) {
74 |                 if ('\'' === $part[0] || '{' === $part[0]
75 |                     || (ctype_upper($part[0]) && !isset($usedTerminals[$part]))
76 |                     || (ctype_lower($part[0]) && isset($unusedNonterminals[$part]))
77 |                 ) {
78 |                     $part = '' . $part . '';
79 |                 } else {
80 |                     $part = '' . $part . '';
81 |                 }
82 |             } elseif ((ctype_upper($part[0]) && isset($usedTerminals[$part]))
83 |                       || (ctype_lower($part[0]) && !isset($unusedNonterminals[$part]))
84 | 
85 |             ) {
86 |                 $part = '' . $part . '';
87 |             }
88 | 
89 |             ++$i;
90 |         }
91 | 
92 |         $rule = implode(' ', $parts);
93 |     }
94 | 
95 |     echo $ruleBlockName, ':', "\n", '      ', implode("\n" . '    | ', $rules), "\n", ';', "\n\n";
96 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/grammar/kmyacc.php.parser:
--------------------------------------------------------------------------------
  1 | semValue
  4 | #semval($,%t) $this->semValue
  5 | #semval(%n) $this->stackPos-(%l-%n)
  6 | #semval(%n,%t) $this->stackPos-(%l-%n)
  7 | 
  8 | namespace PhpParser;
  9 | #include;
 10 | 
 11 | /* This is an automatically GENERATED file, which should not be manually edited.
 12 |  * Instead edit one of the following:
 13 |  *  * the grammar file grammar/zend_language_parser.phpy
 14 |  *  * the skeleton file grammar/kymacc.php.parser
 15 |  *  * the preprocessing script grammar/rebuildParser.php
 16 |  */
 17 | class Parser extends ParserAbstract
 18 | {
 19 |     protected $tokenToSymbolMapSize = #(YYMAXLEX);
 20 |     protected $actionTableSize = #(YYLAST);
 21 |     protected $gotoTableSize = #(YYGLAST);
 22 | 
 23 |     protected $invalidSymbol = #(YYBADCH);
 24 |     protected $errorSymbol = #(YYINTERRTOK);
 25 |     protected $defaultAction = #(YYDEFAULT);
 26 |     protected $unexpectedTokenRule = #(YYUNEXPECTED);
 27 | 
 28 |     protected $YY2TBLSTATE  = #(YY2TBLSTATE);
 29 |     protected $YYNLSTATES   = #(YYNLSTATES);
 30 | 
 31 | #tokenval
 32 |     const %s = %n;
 33 | #endtokenval
 34 | 
 35 |     protected $symbolToName = array(
 36 |         #listvar terminals
 37 |     );
 38 | 
 39 |     protected $tokenToSymbol = array(
 40 |         #listvar yytranslate
 41 |     );
 42 | 
 43 |     protected $action = array(
 44 |         #listvar yyaction
 45 |     );
 46 | 
 47 |     protected $actionCheck = array(
 48 |         #listvar yycheck
 49 |     );
 50 | 
 51 |     protected $actionBase = array(
 52 |         #listvar yybase
 53 |     );
 54 | 
 55 |     protected $actionDefault = array(
 56 |         #listvar yydefault
 57 |     );
 58 | 
 59 |     protected $goto = array(
 60 |         #listvar yygoto
 61 |     );
 62 | 
 63 |     protected $gotoCheck = array(
 64 |         #listvar yygcheck
 65 |     );
 66 | 
 67 |     protected $gotoBase = array(
 68 |         #listvar yygbase
 69 |     );
 70 | 
 71 |     protected $gotoDefault = array(
 72 |         #listvar yygdefault
 73 |     );
 74 | 
 75 |     protected $ruleToNonTerminal = array(
 76 |         #listvar yylhs
 77 |     );
 78 | 
 79 |     protected $ruleToLength = array(
 80 |         #listvar yylen
 81 |     );
 82 | #if -t
 83 | 
 84 |     protected $productions = array(
 85 |         #production-strings;
 86 |     );
 87 | #endif
 88 | #reduce
 89 | 
 90 |     protected function reduceRule%n() {
 91 |         %b
 92 |     }
 93 | #noact
 94 | 
 95 |     protected function reduceRule%n() {
 96 |         $this->semValue = $this->semStack[$this->stackPos];
 97 |     }
 98 | #endreduce
 99 | }
100 | #tailcode;
101 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder.php:
--------------------------------------------------------------------------------
 1 | name = $name;
 29 |     }
 30 | 
 31 |     /**
 32 |      * Extends a class.
 33 |      *
 34 |      * @param Name|string $class Name of class to extend
 35 |      *
 36 |      * @return $this The builder instance (for fluid interface)
 37 |      */
 38 |     public function extend($class) {
 39 |         $this->extends = $this->normalizeName($class);
 40 | 
 41 |         return $this;
 42 |     }
 43 | 
 44 |     /**
 45 |      * Implements one or more interfaces.
 46 |      *
 47 |      * @param Name|string $interface Name of interface to implement
 48 |      * @param Name|string $...       More interfaces to implement
 49 |      *
 50 |      * @return $this The builder instance (for fluid interface)
 51 |      */
 52 |     public function implement() {
 53 |         foreach (func_get_args() as $interface) {
 54 |             $this->implements[] = $this->normalizeName($interface);
 55 |         }
 56 | 
 57 |         return $this;
 58 |     }
 59 | 
 60 |     /**
 61 |      * Makes the class abstract.
 62 |      *
 63 |      * @return $this The builder instance (for fluid interface)
 64 |      */
 65 |     public function makeAbstract() {
 66 |         $this->setModifier(Stmt\Class_::MODIFIER_ABSTRACT);
 67 | 
 68 |         return $this;
 69 |     }
 70 | 
 71 |     /**
 72 |      * Makes the class final.
 73 |      *
 74 |      * @return $this The builder instance (for fluid interface)
 75 |      */
 76 |     public function makeFinal() {
 77 |         $this->setModifier(Stmt\Class_::MODIFIER_FINAL);
 78 | 
 79 |         return $this;
 80 |     }
 81 | 
 82 |     /**
 83 |      * Adds a statement.
 84 |      *
 85 |      * @param Stmt|PhpParser\Builder $stmt The statement to add
 86 |      *
 87 |      * @return $this The builder instance (for fluid interface)
 88 |      */
 89 |     public function addStmt($stmt) {
 90 |         $stmt = $this->normalizeNode($stmt);
 91 | 
 92 |         $targets = array(
 93 |             'Stmt_TraitUse'    => &$this->uses,
 94 |             'Stmt_ClassConst'  => &$this->constants,
 95 |             'Stmt_Property'    => &$this->properties,
 96 |             'Stmt_ClassMethod' => &$this->methods,
 97 |         );
 98 | 
 99 |         $type = $stmt->getType();
100 |         if (!isset($targets[$type])) {
101 |             throw new \LogicException(sprintf('Unexpected node of type "%s"', $type));
102 |         }
103 | 
104 |         $targets[$type][] = $stmt;
105 | 
106 |         return $this;
107 |     }
108 | 
109 |     /**
110 |      * Returns the built class node.
111 |      *
112 |      * @return Stmt\Class_ The built class node
113 |      */
114 |     public function getNode() {
115 |         return new Stmt\Class_($this->name, array(
116 |             'type' => $this->type,
117 |             'extends' => $this->extends,
118 |             'implements' => $this->implements,
119 |             'stmts' => array_merge($this->uses, $this->constants, $this->properties, $this->methods),
120 |         ), $this->attributes);
121 |     }
122 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Declaration.php:
--------------------------------------------------------------------------------
 1 | addStmt($stmt);
25 |         }
26 | 
27 |         return $this;
28 |     }
29 | 
30 |     /**
31 |      * Sets doc comment for the declaration.
32 |      *
33 |      * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
34 |      *
35 |      * @return $this The builder instance (for fluid interface)
36 |      */
37 |     public function setDocComment($docComment) {
38 |         $this->attributes['comments'] = array(
39 |             $this->normalizeDocComment($docComment)
40 |         );
41 | 
42 |         return $this;
43 |     }
44 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php:
--------------------------------------------------------------------------------
 1 | returnByRef = true;
21 | 
22 |         return $this;
23 |     }
24 | 
25 |     /**
26 |      * Adds a parameter.
27 |      *
28 |      * @param Node\Param|Param $param The parameter to add
29 |      *
30 |      * @return $this The builder instance (for fluid interface)
31 |      */
32 |     public function addParam($param) {
33 |         $param = $this->normalizeNode($param);
34 | 
35 |         if (!$param instanceof Node\Param) {
36 |             throw new \LogicException(sprintf('Expected parameter node, got "%s"', $param->getType()));
37 |         }
38 | 
39 |         $this->params[] = $param;
40 | 
41 |         return $this;
42 |     }
43 | 
44 |     /**
45 |      * Adds multiple parameters.
46 |      *
47 |      * @param array $params The parameters to add
48 |      *
49 |      * @return $this The builder instance (for fluid interface)
50 |      */
51 |     public function addParams(array $params) {
52 |         foreach ($params as $param) {
53 |             $this->addParam($param);
54 |         }
55 | 
56 |         return $this;
57 |     }
58 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Function_.php:
--------------------------------------------------------------------------------
 1 | name = $name;
21 |     }
22 | 
23 |     /**
24 |      * Adds a statement.
25 |      *
26 |      * @param Node|PhpParser\Builder $stmt The statement to add
27 |      *
28 |      * @return $this The builder instance (for fluid interface)
29 |      */
30 |     public function addStmt($stmt) {
31 |         $this->stmts[] = $this->normalizeNode($stmt);
32 | 
33 |         return $this;
34 |     }
35 | 
36 |     /**
37 |      * Returns the built function node.
38 |      *
39 |      * @return Stmt\Function_ The built function node
40 |      */
41 |     public function getNode() {
42 |         return new Stmt\Function_($this->name, array(
43 |             'byRef'  => $this->returnByRef,
44 |             'params' => $this->params,
45 |             'stmts'  => $this->stmts,
46 |         ), $this->attributes);
47 |     }
48 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Interface_.php:
--------------------------------------------------------------------------------
 1 | name = $name;
23 |     }
24 | 
25 |     /**
26 |      * Extends one or more interfaces.
27 |      *
28 |      * @param Name|string $interface Name of interface to extend
29 |      * @param Name|string $...       More interfaces to extend
30 |      *
31 |      * @return $this The builder instance (for fluid interface)
32 |      */
33 |     public function extend() {
34 |         foreach (func_get_args() as $interface) {
35 |             $this->extends[] = $this->normalizeName($interface);
36 |         }
37 | 
38 |         return $this;
39 |     }
40 | 
41 |     /**
42 |      * Adds a statement.
43 |      *
44 |      * @param Stmt|PhpParser\Builder $stmt The statement to add
45 |      *
46 |      * @return $this The builder instance (for fluid interface)
47 |      */
48 |     public function addStmt($stmt) {
49 |         $stmt = $this->normalizeNode($stmt);
50 | 
51 |         $type = $stmt->getType();
52 |         switch ($type) {
53 |             case 'Stmt_ClassConst':
54 |                 $this->constants[] = $stmt;
55 |                 break;
56 | 
57 |             case 'Stmt_ClassMethod':
58 |                 // we erase all statements in the body of an interface method
59 |                 $stmt->stmts = null;
60 |                 $this->methods[] = $stmt;
61 |                 break;
62 | 
63 |             default:
64 |                 throw new \LogicException(sprintf('Unexpected node of type "%s"', $type));
65 |         }
66 | 
67 |         return $this;
68 |     }
69 | 
70 |     /**
71 |      * Returns the built interface node.
72 |      *
73 |      * @return Stmt\Interface_ The built interface node
74 |      */
75 |     public function getNode() {
76 |         return new Stmt\Interface_($this->name, array(
77 |             'extends' => $this->extends,
78 |             'stmts' => array_merge($this->constants, $this->methods),
79 |         ), $this->attributes);
80 |     }
81 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Method.php:
--------------------------------------------------------------------------------
  1 | name = $name;
 22 |     }
 23 | 
 24 |     /**
 25 |      * Makes the method public.
 26 |      *
 27 |      * @return $this The builder instance (for fluid interface)
 28 |      */
 29 |     public function makePublic() {
 30 |         $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
 31 | 
 32 |         return $this;
 33 |     }
 34 | 
 35 |     /**
 36 |      * Makes the method protected.
 37 |      *
 38 |      * @return $this The builder instance (for fluid interface)
 39 |      */
 40 |     public function makeProtected() {
 41 |         $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
 42 | 
 43 |         return $this;
 44 |     }
 45 | 
 46 |     /**
 47 |      * Makes the method private.
 48 |      *
 49 |      * @return $this The builder instance (for fluid interface)
 50 |      */
 51 |     public function makePrivate() {
 52 |         $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
 53 | 
 54 |         return $this;
 55 |     }
 56 | 
 57 |     /**
 58 |      * Makes the method static.
 59 |      *
 60 |      * @return $this The builder instance (for fluid interface)
 61 |      */
 62 |     public function makeStatic() {
 63 |         $this->setModifier(Stmt\Class_::MODIFIER_STATIC);
 64 | 
 65 |         return $this;
 66 |     }
 67 | 
 68 |     /**
 69 |      * Makes the method abstract.
 70 |      *
 71 |      * @return $this The builder instance (for fluid interface)
 72 |      */
 73 |     public function makeAbstract() {
 74 |         if (!empty($this->stmts)) {
 75 |             throw new \LogicException('Cannot make method with statements abstract');
 76 |         }
 77 | 
 78 |         $this->setModifier(Stmt\Class_::MODIFIER_ABSTRACT);
 79 |         $this->stmts = null; // abstract methods don't have statements
 80 | 
 81 |         return $this;
 82 |     }
 83 | 
 84 |     /**
 85 |      * Makes the method final.
 86 |      *
 87 |      * @return $this The builder instance (for fluid interface)
 88 |      */
 89 |     public function makeFinal() {
 90 |         $this->setModifier(Stmt\Class_::MODIFIER_FINAL);
 91 | 
 92 |         return $this;
 93 |     }
 94 | 
 95 |     /**
 96 |      * Adds a statement.
 97 |      *
 98 |      * @param Node|PhpParser\Builder $stmt The statement to add
 99 |      *
100 |      * @return $this The builder instance (for fluid interface)
101 |      */
102 |     public function addStmt($stmt) {
103 |         if (null === $this->stmts) {
104 |             throw new \LogicException('Cannot add statements to an abstract method');
105 |         }
106 | 
107 |         $this->stmts[] = $this->normalizeNode($stmt);
108 | 
109 |         return $this;
110 |     }
111 | 
112 |     /**
113 |      * Returns the built method node.
114 |      *
115 |      * @return Stmt\ClassMethod The built method node
116 |      */
117 |     public function getNode() {
118 |         return new Stmt\ClassMethod($this->name, array(
119 |             'type'   => $this->type,
120 |             'byRef'  => $this->returnByRef,
121 |             'params' => $this->params,
122 |             'stmts'  => $this->stmts,
123 |         ), $this->attributes);
124 |     }
125 | }
126 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Namespace_.php:
--------------------------------------------------------------------------------
 1 | name = null !== $name ? $this->normalizeName($name) : null;
21 |     }
22 | 
23 |     /**
24 |      * Adds a statement.
25 |      *
26 |      * @param Node|PhpParser\Builder $stmt The statement to add
27 |      *
28 |      * @return $this The builder instance (for fluid interface)
29 |      */
30 |     public function addStmt($stmt) {
31 |         $this->stmts[] = $this->normalizeNode($stmt);
32 | 
33 |         return $this;
34 |     }
35 | 
36 |     /**
37 |      * Adds multiple statements.
38 |      *
39 |      * @param array $stmts The statements to add
40 |      *
41 |      * @return $this The builder instance (for fluid interface)
42 |      */
43 |     public function addStmts(array $stmts) {
44 |         foreach ($stmts as $stmt) {
45 |             $this->addStmt($stmt);
46 |         }
47 | 
48 |         return $this;
49 |     }
50 | 
51 |     /**
52 |      * Returns the built node.
53 |      *
54 |      * @return Node The built node
55 |      */
56 |     public function getNode() {
57 |         return new Stmt\Namespace_($this->name, $this->stmts);
58 |     }
59 | }
60 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php:
--------------------------------------------------------------------------------
 1 | name = $name;
23 |     }
24 | 
25 |     /**
26 |      * Sets default value for the parameter.
27 |      *
28 |      * @param mixed $value Default value to use
29 |      *
30 |      * @return $this The builder instance (for fluid interface)
31 |      */
32 |     public function setDefault($value) {
33 |         $this->default = $this->normalizeValue($value);
34 | 
35 |         return $this;
36 |     }
37 | 
38 |     /**
39 |      * Sets type hint for the parameter.
40 |      *
41 |      * @param string|Node\Name $type Type hint to use
42 |      *
43 |      * @return $this The builder instance (for fluid interface)
44 |      */
45 |     public function setTypeHint($type) {
46 |         if ($type === 'array' || $type === 'callable') {
47 |             $this->type = $type;
48 |         } else {
49 |             $this->type = $this->normalizeName($type);
50 |         }
51 | 
52 |         return $this;
53 |     }
54 | 
55 |     /**
56 |      * Make the parameter accept the value by reference.
57 |      *
58 |      * @return $this The builder instance (for fluid interface)
59 |      */
60 |     public function makeByRef() {
61 |         $this->byRef = true;
62 | 
63 |         return $this;
64 |     }
65 | 
66 |     /**
67 |      * Returns the built parameter node.
68 |      *
69 |      * @return Node\Param The built parameter node
70 |      */
71 |     public function getNode() {
72 |         return new Node\Param(
73 |             $this->name, $this->default, $this->type, $this->byRef
74 |         );
75 |     }
76 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php:
--------------------------------------------------------------------------------
  1 | name = $name;
 23 |     }
 24 | 
 25 |     /**
 26 |      * Makes the property public.
 27 |      *
 28 |      * @return $this The builder instance (for fluid interface)
 29 |      */
 30 |     public function makePublic() {
 31 |         $this->setModifier(Stmt\Class_::MODIFIER_PUBLIC);
 32 | 
 33 |         return $this;
 34 |     }
 35 | 
 36 |     /**
 37 |      * Makes the property protected.
 38 |      *
 39 |      * @return $this The builder instance (for fluid interface)
 40 |      */
 41 |     public function makeProtected() {
 42 |         $this->setModifier(Stmt\Class_::MODIFIER_PROTECTED);
 43 | 
 44 |         return $this;
 45 |     }
 46 | 
 47 |     /**
 48 |      * Makes the property private.
 49 |      *
 50 |      * @return $this The builder instance (for fluid interface)
 51 |      */
 52 |     public function makePrivate() {
 53 |         $this->setModifier(Stmt\Class_::MODIFIER_PRIVATE);
 54 | 
 55 |         return $this;
 56 |     }
 57 | 
 58 |     /**
 59 |      * Makes the property static.
 60 |      *
 61 |      * @return $this The builder instance (for fluid interface)
 62 |      */
 63 |     public function makeStatic() {
 64 |         $this->setModifier(Stmt\Class_::MODIFIER_STATIC);
 65 | 
 66 |         return $this;
 67 |     }
 68 | 
 69 |     /**
 70 |      * Sets default value for the property.
 71 |      *
 72 |      * @param mixed $value Default value to use
 73 |      *
 74 |      * @return $this The builder instance (for fluid interface)
 75 |      */
 76 |     public function setDefault($value) {
 77 |         $this->default = $this->normalizeValue($value);
 78 | 
 79 |         return $this;
 80 |     }
 81 | 
 82 |     /**
 83 |      * Sets doc comment for the property.
 84 |      *
 85 |      * @param PhpParser\Comment\Doc|string $docComment Doc comment to set
 86 |      *
 87 |      * @return $this The builder instance (for fluid interface)
 88 |      */
 89 |     public function setDocComment($docComment) {
 90 |         $this->attributes = array(
 91 |             'comments' => array($this->normalizeDocComment($docComment))
 92 |         );
 93 | 
 94 |         return $this;
 95 |     }
 96 | 
 97 |     /**
 98 |      * Returns the built class node.
 99 |      *
100 |      * @return Stmt\Property The built property node
101 |      */
102 |     public function getNode() {
103 |         return new Stmt\Property(
104 |             $this->type !== 0 ? $this->type : Stmt\Class_::MODIFIER_PUBLIC,
105 |             array(
106 |                 new Stmt\PropertyProperty($this->name, $this->default)
107 |             ),
108 |             $this->attributes
109 |         );
110 |     }
111 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Trait_.php:
--------------------------------------------------------------------------------
 1 | name = $name;
22 |     }
23 | 
24 |     /**
25 |      * Adds a statement.
26 |      *
27 |      * @param Stmt|PhpParser\Builder $stmt The statement to add
28 |      *
29 |      * @return $this The builder instance (for fluid interface)
30 |      */
31 |     public function addStmt($stmt) {
32 |         $stmt = $this->normalizeNode($stmt);
33 | 
34 |         if ($stmt instanceof Stmt\Property) {
35 |             $this->properties[] = $stmt;
36 |         } else if ($stmt instanceof Stmt\ClassMethod) {
37 |             $this->methods[] = $stmt;
38 |         } else {
39 |             throw new \LogicException(sprintf('Unexpected node of type "%s"', $stmt->getType()));
40 |         }
41 | 
42 |         return $this;
43 |     }
44 | 
45 |     /**
46 |      * Returns the built trait node.
47 |      *
48 |      * @return Stmt\Trait_ The built interface node
49 |      */
50 |     public function getNode() {
51 |         return new Stmt\Trait_(
52 |             $this->name, array_merge($this->properties, $this->methods), $this->attributes
53 |         );
54 |     }
55 | }
56 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Builder/Use_.php:
--------------------------------------------------------------------------------
 1 | name = $this->normalizeName($name);
25 |         $this->type = $type;
26 |     }
27 | 
28 |     /**
29 |      * Sets alias for used name.
30 |      *
31 |      * @param string $alias Alias to use (last component of full name by default)
32 |      *
33 |      * @return $this The builder instance (for fluid interface)
34 |      */
35 |     protected function as_($alias) {
36 |         $this->alias = $alias;
37 |         return $this;
38 |     }
39 |     public function __call($name, $args) {
40 |         if (method_exists($this, $name . '_')) {
41 |             return call_user_func_array(array($this, $name . '_'), $args);
42 |         }
43 | 
44 |         throw new \LogicException(sprintf('Method "%s" does not exist', $name));
45 |     }
46 | 
47 |     /**
48 |      * Returns the built node.
49 |      *
50 |      * @return Node The built node
51 |      */
52 |     public function getNode() {
53 |         $alias = null !== $this->alias ? $this->alias : $this->name->getLast();
54 |         return new Stmt\Use_(array(
55 |             new Stmt\UseUse($this->name, $alias)
56 |         ), $this->type);
57 |     }
58 | }
59 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/BuilderFactory.php:
--------------------------------------------------------------------------------
  1 | text = $text;
 18 |         $this->line = $line;
 19 |     }
 20 | 
 21 |     /**
 22 |      * Gets the comment text.
 23 |      *
 24 |      * @return string The comment text (including comment delimiters like /*)
 25 |      */
 26 |     public function getText() {
 27 |         return $this->text;
 28 |     }
 29 | 
 30 |     /**
 31 |      * Sets the comment text.
 32 |      *
 33 |      * @param string $text The comment text (including comment delimiters like /*)
 34 |      */
 35 |     public function setText($text) {
 36 |         $this->text = $text;
 37 |     }
 38 | 
 39 |     /**
 40 |      * Gets the line number the comment started on.
 41 |      *
 42 |      * @return int Line number
 43 |      */
 44 |     public function getLine() {
 45 |         return $this->line;
 46 |     }
 47 | 
 48 |     /**
 49 |      * Sets the line number the comment started on.
 50 |      *
 51 |      * @param int $line Line number
 52 |      */
 53 |     public function setLine($line) {
 54 |         $this->line = $line;
 55 |     }
 56 | 
 57 |     /**
 58 |      * Gets the comment text.
 59 |      *
 60 |      * @return string The comment text (including comment delimiters like /*)
 61 |      */
 62 |     public function __toString() {
 63 |         return $this->text;
 64 |     }
 65 | 
 66 |     /**
 67 |      * Gets the reformatted comment text.
 68 |      *
 69 |      * "Reformatted" here means that we try to clean up the whitespace at the
 70 |      * starts of the lines. This is necessary because we receive the comments
 71 |      * without trailing whitespace on the first line, but with trailing whitespace
 72 |      * on all subsequent lines.
 73 |      *
 74 |      * @return mixed|string
 75 |      */
 76 |     public function getReformattedText() {
 77 |         $text = trim($this->text);
 78 |         if (false === strpos($text, "\n")) {
 79 |             // Single line comments don't need further processing
 80 |             return $text;
 81 |         } elseif (preg_match('((*BSR_ANYCRLF)(*ANYCRLF)^.*(?:\R\s+\*.*)+$)', $text)) {
 82 |             // Multi line comment of the type
 83 |             //
 84 |             //     /*
 85 |             //      * Some text.
 86 |             //      * Some more text.
 87 |             //      */
 88 |             //
 89 |             // is handled by replacing the whitespace sequences before the * by a single space
 90 |             return preg_replace('(^\s+\*)m', ' *', $this->text);
 91 |         } elseif (preg_match('(^/\*\*?\s*[\r\n])', $text) && preg_match('(\n(\s*)\*/$)', $text, $matches)) {
 92 |             // Multi line comment of the type
 93 |             //
 94 |             //    /*
 95 |             //        Some text.
 96 |             //        Some more text.
 97 |             //    */
 98 |             //
 99 |             // is handled by removing the whitespace sequence on the line before the closing
100 |             // */ on all lines. So if the last line is "    */", then "    " is removed at the
101 |             // start of all lines.
102 |             return preg_replace('(^' . preg_quote($matches[1]) . ')m', '', $text);
103 |         } elseif (preg_match('(^/\*\*?\s*(?!\s))', $text, $matches)) {
104 |             // Multi line comment of the type
105 |             //
106 |             //     /* Some text.
107 |             //        Some more text.
108 |             //        Even more text. */
109 |             //
110 |             // is handled by taking the length of the "/* " segment and leaving only that
111 |             // many space characters before the lines. Thus in the above example only three
112 |             // space characters are left at the start of every line.
113 |             return preg_replace('(^\s*(?= {' . strlen($matches[0]) . '}(?!\s)))m', '', $text);
114 |         }
115 | 
116 |         // No idea how to format this comment, so simply return as is
117 |         return $text;
118 |     }
119 | }


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Comment/Doc.php:
--------------------------------------------------------------------------------
1 | value = $value;
27 |         $this->byRef = $byRef;
28 |         $this->unpack = $unpack;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('value', 'byRef', 'unpack');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Const_.php:
--------------------------------------------------------------------------------
 1 | name = $name;
24 |         $this->value = $value;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('name', 'value');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr.php:
--------------------------------------------------------------------------------
1 | var = $var;
24 |         $this->dim = $dim;
25 |     }
26 | 
27 |     public function getSubnodeNames() {
28 |         return array('var', 'dim');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php:
--------------------------------------------------------------------------------
 1 | key = $key;
27 |         $this->value = $value;
28 |         $this->byRef = $byRef;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('key', 'value', 'byRef');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php:
--------------------------------------------------------------------------------
 1 | items = $items;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('items');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php:
--------------------------------------------------------------------------------
 1 | var = $var;
24 |         $this->expr = $expr;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('var', 'expr');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php:
--------------------------------------------------------------------------------
 1 | var = $var;
28 |         $this->expr = $expr;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('var', 'expr');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php:
--------------------------------------------------------------------------------
1 | var = $var;
28 |         $this->expr = $expr;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('var', 'expr');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php:
--------------------------------------------------------------------------------
 1 | left = $left;
24 |         $this->right = $right;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('left', 'right');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp/BitwiseAnd.php:
--------------------------------------------------------------------------------
1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BooleanNot.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php:
--------------------------------------------------------------------------------
1 | class = $class;
25 |         $this->name = $name;
26 |     }
27 | 
28 |     public function getSubNodeNames() {
29 |         return array('class', 'name');
30 |     }
31 | }
32 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Clone_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Closure.php:
--------------------------------------------------------------------------------
 1 |  false  : Whether the closure is static
29 |      *                          'byRef'      => false  : Whether to return by reference
30 |      *                          'params'     => array(): Parameters
31 |      *                          'uses'       => array(): use()s
32 |      *                          'returnType' => null   : Return type
33 |      *                          'stmts'      => array(): Statements
34 |      * @param array $attributes Additional attributes
35 |      */
36 |     public function __construct(array $subNodes = array(), array $attributes = array()) {
37 |         parent::__construct(null, $attributes);
38 |         $this->static = isset($subNodes['static']) ? $subNodes['static'] : false;
39 |         $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
40 |         $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
41 |         $this->uses = isset($subNodes['uses']) ? $subNodes['uses'] : array();
42 |         $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
43 |         $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
44 |     }
45 | 
46 |     public function getSubNodeNames() {
47 |         return array('static', 'byRef', 'params', 'uses', 'returnType', 'stmts');
48 |     }
49 | 
50 |     public function returnsByRef() {
51 |         return $this->byRef;
52 |     }
53 | 
54 |     public function getParams() {
55 |         return $this->params;
56 |     }
57 | 
58 |     public function getReturnType() {
59 |         return $this->returnType;
60 |     }
61 | 
62 |     public function getStmts() {
63 |         return $this->stmts;
64 |     }
65 | }
66 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClosureUse.php:
--------------------------------------------------------------------------------
 1 | var = $var;
24 |         $this->byRef = $byRef;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('var', 'byRef');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ConstFetch.php:
--------------------------------------------------------------------------------
 1 | name = $name;
22 |     }
23 | 
24 |     public function getSubNodeNames() {
25 |         return array('name');
26 |     }
27 | }
28 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Empty_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ErrorSuppress.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Eval_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Exit_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/FuncCall.php:
--------------------------------------------------------------------------------
 1 | name = $name;
25 |         $this->args = $args;
26 |     }
27 | 
28 |     public function getSubNodeNames() {
29 |         return array('name', 'args');
30 |     }
31 | }
32 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Include_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
29 |         $this->type = $type;
30 |     }
31 | 
32 |     public function getSubNodeNames() {
33 |         return array('expr', 'type');
34 |     }
35 | }
36 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Instanceof_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
25 |         $this->class = $class;
26 |     }
27 | 
28 |     public function getSubNodeNames() {
29 |         return array('expr', 'class');
30 |     }
31 | }
32 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Isset_.php:
--------------------------------------------------------------------------------
 1 | vars = $vars;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('vars');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/List_.php:
--------------------------------------------------------------------------------
 1 | vars = $vars;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('vars');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php:
--------------------------------------------------------------------------------
 1 | var = $var;
28 |         $this->name = $name;
29 |         $this->args = $args;
30 |     }
31 | 
32 |     public function getSubNodeNames() {
33 |         return array('var', 'name', 'args');
34 |     }
35 | }
36 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/New_.php:
--------------------------------------------------------------------------------
 1 | class = $class;
25 |         $this->args = $args;
26 |     }
27 | 
28 |     public function getSubNodeNames() {
29 |         return array('class', 'args');
30 |     }
31 | }
32 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostDec.php:
--------------------------------------------------------------------------------
 1 | var = $var;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('var');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PostInc.php:
--------------------------------------------------------------------------------
 1 | var = $var;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('var');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreDec.php:
--------------------------------------------------------------------------------
 1 | var = $var;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('var');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PreInc.php:
--------------------------------------------------------------------------------
 1 | var = $var;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('var');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Print_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/PropertyFetch.php:
--------------------------------------------------------------------------------
 1 | var = $var;
24 |         $this->name = $name;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('var', 'name');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ShellExec.php:
--------------------------------------------------------------------------------
 1 | parts = $parts;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('parts');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticCall.php:
--------------------------------------------------------------------------------
 1 | class = $class;
28 |         $this->name = $name;
29 |         $this->args = $args;
30 |     }
31 | 
32 |     public function getSubNodeNames() {
33 |         return array('class', 'name', 'args');
34 |     }
35 | }
36 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.php:
--------------------------------------------------------------------------------
 1 | class = $class;
25 |         $this->name = $name;
26 |     }
27 | 
28 |     public function getSubNodeNames() {
29 |         return array('class', 'name');
30 |     }
31 | }
32 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php:
--------------------------------------------------------------------------------
 1 | cond = $cond;
27 |         $this->if = $if;
28 |         $this->else = $else;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('cond', 'if', 'else');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryMinus.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/UnaryPlus.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Variable.php:
--------------------------------------------------------------------------------
 1 | name = $name;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('name');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/YieldFrom.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Yield_.php:
--------------------------------------------------------------------------------
 1 | key = $key;
24 |         $this->value = $value;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('key', 'value');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/FunctionLike.php:
--------------------------------------------------------------------------------
 1 | type = $type;
34 |         $this->byRef = $byRef;
35 |         $this->variadic = $variadic;
36 |         $this->name = $name;
37 |         $this->default = $default;
38 | 
39 |         if ($variadic && null !== $default) {
40 |             throw new Error('Variadic parameter cannot have a default value', $default->getAttributes());
41 |         }
42 |     }
43 | 
44 |     public function getSubNodeNames() {
45 |         return array('type', 'byRef', 'variadic', 'name', 'default');
46 |     }
47 | }
48 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar.php:
--------------------------------------------------------------------------------
1 | value = $value;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('value');
25 |     }
26 | 
27 |     /**
28 |      * @internal
29 |      *
30 |      * Parses a DNUMBER token like PHP would.
31 |      *
32 |      * @param string $str A string number
33 |      *
34 |      * @return float The parsed number
35 |      */
36 |     public static function parse($str) {
37 |         // if string contains any of .eE just cast it to float
38 |         if (false !== strpbrk($str, '.eE')) {
39 |             return (float) $str;
40 |         }
41 | 
42 |         // otherwise it's an integer notation that overflowed into a float
43 |         // if it starts with 0 it's one of the special integer notations
44 |         if ('0' === $str[0]) {
45 |             // hex
46 |             if ('x' === $str[1] || 'X' === $str[1]) {
47 |                 return hexdec($str);
48 |             }
49 | 
50 |             // bin
51 |             if ('b' === $str[1] || 'B' === $str[1]) {
52 |                 return bindec($str);
53 |             }
54 | 
55 |             // oct
56 |             // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit (8 or 9)
57 |             // so that only the digits before that are used
58 |             return octdec(substr($str, 0, strcspn($str, '89')));
59 |         }
60 | 
61 |         // dec
62 |         return (float) $str;
63 |     }
64 | }
65 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/Encapsed.php:
--------------------------------------------------------------------------------
 1 | parts = $parts;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('parts');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/LNumber.php:
--------------------------------------------------------------------------------
 1 | value = $value;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('value');
25 |     }
26 | 
27 |     /**
28 |      * @internal
29 |      *
30 |      * Parses an LNUMBER token (dec, hex, oct and bin notations) like PHP would.
31 |      *
32 |      * @param string $str A string number
33 |      *
34 |      * @return int The parsed number
35 |      */
36 |     public static function parse($str) {
37 |         // handle plain 0 specially
38 |         if ('0' === $str) {
39 |             return 0;
40 |         }
41 | 
42 |         // if first char is 0 (and number isn't 0) it's a special syntax
43 |         if ('0' === $str[0]) {
44 |             // hex
45 |             if ('x' === $str[1] || 'X' === $str[1]) {
46 |                 return hexdec($str);
47 |             }
48 | 
49 |             // bin
50 |             if ('b' === $str[1] || 'B' === $str[1]) {
51 |                 return bindec($str);
52 |             }
53 | 
54 |             // oct (intval instead of octdec to get proper cutting behavior with malformed numbers)
55 |             return intval($str, 8);
56 |         }
57 | 
58 |         // dec
59 |         return (int) $str;
60 |     }
61 | }
62 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst.php:
--------------------------------------------------------------------------------
 1 |  '\\',
 14 |         '$'  =>  '$',
 15 |         'n'  => "\n",
 16 |         'r'  => "\r",
 17 |         't'  => "\t",
 18 |         'f'  => "\f",
 19 |         'v'  => "\v",
 20 |         'e'  => "\x1B",
 21 |     );
 22 | 
 23 |     /**
 24 |      * Constructs a string scalar node.
 25 |      *
 26 |      * @param string $value      Value of the string
 27 |      * @param array  $attributes Additional attributes
 28 |      */
 29 |     public function __construct($value = '', array $attributes = array()) {
 30 |         parent::__construct(null, $attributes);
 31 |         $this->value = $value;
 32 |     }
 33 | 
 34 |     public function getSubNodeNames() {
 35 |         return array('value');
 36 |     }
 37 | 
 38 |     /**
 39 |      * @internal
 40 |      *
 41 |      * Parses a string token.
 42 |      *
 43 |      * @param string $str String token content
 44 |      *
 45 |      * @return string The parsed string
 46 |      */
 47 |     public static function parse($str) {
 48 |         $bLength = 0;
 49 |         if ('b' === $str[0]) {
 50 |             $bLength = 1;
 51 |         }
 52 | 
 53 |         if ('\'' === $str[$bLength]) {
 54 |             return str_replace(
 55 |                 array('\\\\', '\\\''),
 56 |                 array(  '\\',   '\''),
 57 |                 substr($str, $bLength + 1, -1)
 58 |             );
 59 |         } else {
 60 |             return self::parseEscapeSequences(substr($str, $bLength + 1, -1), '"');
 61 |         }
 62 |     }
 63 | 
 64 |     /**
 65 |      * @internal
 66 |      *
 67 |      * Parses escape sequences in strings (all string types apart from single quoted).
 68 |      *
 69 |      * @param string      $str   String without quotes
 70 |      * @param null|string $quote Quote type
 71 |      *
 72 |      * @return string String with escape sequences parsed
 73 |      */
 74 |     public static function parseEscapeSequences($str, $quote) {
 75 |         if (null !== $quote) {
 76 |             $str = str_replace('\\' . $quote, $quote, $str);
 77 |         }
 78 | 
 79 |         return preg_replace_callback(
 80 |             '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3})~',
 81 |             array(__CLASS__, 'parseCallback'),
 82 |             $str
 83 |         );
 84 |     }
 85 | 
 86 |     private static function parseCallback($matches) {
 87 |         $str = $matches[1];
 88 | 
 89 |         if (isset(self::$replacements[$str])) {
 90 |             return self::$replacements[$str];
 91 |         } elseif ('x' === $str[0] || 'X' === $str[0]) {
 92 |             return chr(hexdec($str));
 93 |         } else {
 94 |             return chr(octdec($str));
 95 |         }
 96 |     }
 97 | 
 98 |     /**
 99 |      * @internal
100 |      *
101 |      * Parses a constant doc string.
102 |      *
103 |      * @param string $startToken Doc string start token content (<<num = $num;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('num');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php:
--------------------------------------------------------------------------------
 1 | cond = $cond;
24 |         $this->stmts = $stmts;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('cond', 'stmts');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php:
--------------------------------------------------------------------------------
 1 | type = $type;
27 |         $this->var = $var;
28 |         $this->stmts = $stmts;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('type', 'var', 'stmts');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassConst.php:
--------------------------------------------------------------------------------
 1 | consts = $consts;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('consts');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassLike.php:
--------------------------------------------------------------------------------
 1 | stmts as $stmt) {
21 |             if ($stmt instanceof ClassMethod) {
22 |                 $methods[] = $stmt;
23 |             }
24 |         }
25 |         return $methods;
26 |     }
27 | 
28 |     /**
29 |      * Gets method with the given name defined directly in this class/interface/trait.
30 |      *
31 |      * @param string $name Name of the method (compared case-insensitively)
32 |      *
33 |      * @return ClassMethod|null Method node or null if the method does not exist
34 |      */
35 |     public function getMethod($name) {
36 |         $lowerName = strtolower($name);
37 |         foreach ($this->stmts as $stmt) {
38 |             if ($stmt instanceof ClassMethod && $lowerName === strtolower($stmt->name)) {
39 |                 return $stmt;
40 |             }
41 |         }
42 |         return null;
43 |     }
44 | }
45 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ClassMethod.php:
--------------------------------------------------------------------------------
  1 |  MODIFIER_PUBLIC: Type
 30 |      *                                'byRef'      => false          : Whether to return by reference
 31 |      *                                'params'     => array()        : Parameters
 32 |      *                                'returnType' => null           : Return type
 33 |      *                                'stmts'      => array()        : Statements
 34 |      * @param array       $attributes Additional attributes
 35 |      */
 36 |     public function __construct($name, array $subNodes = array(), array $attributes = array()) {
 37 |         parent::__construct(null, $attributes);
 38 |         $this->type = isset($subNodes['type']) ? $subNodes['type'] : 0;
 39 |         $this->byRef = isset($subNodes['byRef'])  ? $subNodes['byRef']  : false;
 40 |         $this->name = $name;
 41 |         $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
 42 |         $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
 43 |         $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : array();
 44 | 
 45 |         if ($this->type & Class_::MODIFIER_STATIC) {
 46 |             switch (strtolower($this->name)) {
 47 |                 case '__construct':
 48 |                     throw new Error(sprintf('Constructor %s() cannot be static', $this->name));
 49 |                 case '__destruct':
 50 |                     throw new Error(sprintf('Destructor %s() cannot be static', $this->name));
 51 |                 case '__clone':
 52 |                     throw new Error(sprintf('Clone method %s() cannot be static', $this->name));
 53 |             }
 54 |         }
 55 |     }
 56 | 
 57 |     public function getSubNodeNames() {
 58 |         return array('type', 'byRef', 'name', 'params', 'returnType', 'stmts');
 59 |     }
 60 | 
 61 |     public function returnsByRef() {
 62 |         return $this->byRef;
 63 |     }
 64 | 
 65 |     public function getParams() {
 66 |         return $this->params;
 67 |     }
 68 | 
 69 |     public function getReturnType() {
 70 |         return $this->returnType;
 71 |     }
 72 | 
 73 |     public function getStmts() {
 74 |         return $this->stmts;
 75 |     }
 76 | 
 77 |     public function isPublic() {
 78 |         return ($this->type & Class_::MODIFIER_PUBLIC) !== 0
 79 |             || ($this->type & Class_::VISIBILITY_MODIFER_MASK) === 0;
 80 |     }
 81 | 
 82 |     public function isProtected() {
 83 |         return (bool) ($this->type & Class_::MODIFIER_PROTECTED);
 84 |     }
 85 | 
 86 |     public function isPrivate() {
 87 |         return (bool) ($this->type & Class_::MODIFIER_PRIVATE);
 88 |     }
 89 | 
 90 |     public function isAbstract() {
 91 |         return (bool) ($this->type & Class_::MODIFIER_ABSTRACT);
 92 |     }
 93 | 
 94 |     public function isFinal() {
 95 |         return (bool) ($this->type & Class_::MODIFIER_FINAL);
 96 |     }
 97 | 
 98 |     public function isStatic() {
 99 |         return (bool) ($this->type & Class_::MODIFIER_STATIC);
100 |     }
101 | }
102 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Class_.php:
--------------------------------------------------------------------------------
  1 |  true,
 28 |         'parent' => true,
 29 |         'static' => true,
 30 |     );
 31 | 
 32 |     /**
 33 |      * Constructs a class node.
 34 |      *
 35 |      * @param string|null $name       Name
 36 |      * @param array       $subNodes   Array of the following optional subnodes:
 37 |      *                                'type'       => 0      : Type
 38 |      *                                'extends'    => null   : Name of extended class
 39 |      *                                'implements' => array(): Names of implemented interfaces
 40 |      *                                'stmts'      => array(): Statements
 41 |      * @param array       $attributes Additional attributes
 42 |      */
 43 |     public function __construct($name, array $subNodes = array(), array $attributes = array()) {
 44 |         parent::__construct(null, $attributes);
 45 |         $this->type = isset($subNodes['type']) ? $subNodes['type'] : 0;
 46 |         $this->name = $name;
 47 |         $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : null;
 48 |         $this->implements = isset($subNodes['implements']) ? $subNodes['implements'] : array();
 49 |         $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
 50 | 
 51 |         if (null !== $this->name && isset(self::$specialNames[strtolower($this->name)])) {
 52 |             throw new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $this->name));
 53 |         }
 54 | 
 55 |         if (isset(self::$specialNames[strtolower($this->extends)])) {
 56 |             throw new Error(
 57 |                 sprintf('Cannot use \'%s\' as class name as it is reserved', $this->extends),
 58 |                 $this->extends->getAttributes()
 59 |             );
 60 |         }
 61 | 
 62 |         foreach ($this->implements as $interface) {
 63 |             if (isset(self::$specialNames[strtolower($interface)])) {
 64 |                 throw new Error(
 65 |                     sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface),
 66 |                     $interface->getAttributes()
 67 |                 );
 68 |             }
 69 |         }
 70 |     }
 71 | 
 72 |     public function getSubNodeNames() {
 73 |         return array('type', 'name', 'extends', 'implements', 'stmts');
 74 |     }
 75 | 
 76 |     public function isAbstract() {
 77 |         return (bool) ($this->type & self::MODIFIER_ABSTRACT);
 78 |     }
 79 | 
 80 |     public function isFinal() {
 81 |         return (bool) ($this->type & self::MODIFIER_FINAL);
 82 |     }
 83 | 
 84 |     public function isAnonymous() {
 85 |         return null === $this->name;
 86 |     }
 87 | 
 88 |     /**
 89 |      * @internal
 90 |      */
 91 |     public static function verifyModifier($a, $b) {
 92 |         if ($a & self::VISIBILITY_MODIFER_MASK && $b & self::VISIBILITY_MODIFER_MASK) {
 93 |             throw new Error('Multiple access type modifiers are not allowed');
 94 |         }
 95 | 
 96 |         if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) {
 97 |             throw new Error('Multiple abstract modifiers are not allowed');
 98 |         }
 99 | 
100 |         if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) {
101 |             throw new Error('Multiple static modifiers are not allowed');
102 |         }
103 | 
104 |         if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) {
105 |             throw new Error('Multiple final modifiers are not allowed');
106 |         }
107 | 
108 |         if ($a & 48 && $b & 48) {
109 |             throw new Error('Cannot use the final modifier on an abstract class member');
110 |         }
111 |     }
112 | }
113 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Const_.php:
--------------------------------------------------------------------------------
 1 | consts = $consts;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('consts');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Continue_.php:
--------------------------------------------------------------------------------
 1 | num = $num;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('num');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/DeclareDeclare.php:
--------------------------------------------------------------------------------
 1 | value pair node.
16 |      *
17 |      * @param string    $key        Key
18 |      * @param Node\Expr $value      Value
19 |      * @param array     $attributes Additional attributes
20 |      */
21 |     public function __construct($key, Node\Expr $value, array $attributes = array()) {
22 |         parent::__construct(null, $attributes);
23 |         $this->key = $key;
24 |         $this->value = $value;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('key', 'value');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Declare_.php:
--------------------------------------------------------------------------------
 1 | declares = $declares;
23 |         $this->stmts = $stmts;
24 |     }
25 | 
26 |     public function getSubNodeNames() {
27 |         return array('declares', 'stmts');
28 |     }
29 | }
30 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Do_.php:
--------------------------------------------------------------------------------
 1 | cond = $cond;
24 |         $this->stmts = $stmts;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('cond', 'stmts');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Echo_.php:
--------------------------------------------------------------------------------
 1 | exprs = $exprs;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('exprs');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/ElseIf_.php:
--------------------------------------------------------------------------------
 1 | cond = $cond;
24 |         $this->stmts = $stmts;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('cond', 'stmts');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Else_.php:
--------------------------------------------------------------------------------
 1 | stmts = $stmts;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('stmts');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/For_.php:
--------------------------------------------------------------------------------
 1 |  array(): Init expressions
23 |      *                          'cond'  => array(): Loop conditions
24 |      *                          'loop'  => array(): Loop expressions
25 |      *                          'stmts' => array(): Statements
26 |      * @param array $attributes Additional attributes
27 |      */
28 |     public function __construct(array $subNodes = array(), array $attributes = array()) {
29 |         parent::__construct(null, $attributes);
30 |         $this->init = isset($subNodes['init']) ? $subNodes['init'] : array();
31 |         $this->cond = isset($subNodes['cond']) ? $subNodes['cond'] : array();
32 |         $this->loop = isset($subNodes['loop']) ? $subNodes['loop'] : array();
33 |         $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
34 |     }
35 | 
36 |     public function getSubNodeNames() {
37 |         return array('init', 'cond', 'loop', 'stmts');
38 |     }
39 | }
40 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Foreach_.php:
--------------------------------------------------------------------------------
 1 |  null   : Variable to assign key to
27 |      *                              'byRef'  => false  : Whether to assign value by reference
28 |      *                              'stmts'  => array(): Statements
29 |      * @param array     $attributes Additional attributes
30 |      */
31 |     public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = array(), array $attributes = array()) {
32 |         parent::__construct(null, $attributes);
33 |         $this->expr = $expr;
34 |         $this->keyVar = isset($subNodes['keyVar']) ? $subNodes['keyVar'] : null;
35 |         $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
36 |         $this->valueVar = $valueVar;
37 |         $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
38 |     }
39 | 
40 |     public function getSubNodeNames() {
41 |         return array('expr', 'keyVar', 'byRef', 'valueVar', 'stmts');
42 |     }
43 | }
44 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Function_.php:
--------------------------------------------------------------------------------
 1 |  false  : Whether to return by reference
27 |      *                           'params'     => array(): Parameters
28 |      *                           'returnType' => null   : Return type
29 |      *                           'stmts'      => array(): Statements
30 |      * @param array  $attributes Additional attributes
31 |      */
32 |     public function __construct($name, array $subNodes = array(), array $attributes = array()) {
33 |         parent::__construct(null, $attributes);
34 |         $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
35 |         $this->name = $name;
36 |         $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
37 |         $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
38 |         $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
39 |     }
40 | 
41 |     public function getSubNodeNames() {
42 |         return array('byRef', 'name', 'params', 'returnType', 'stmts');
43 |     }
44 | 
45 |     public function returnsByRef() {
46 |         return $this->byRef;
47 |     }
48 | 
49 |     public function getParams() {
50 |         return $this->params;
51 |     }
52 | 
53 |     public function getReturnType() {
54 |         return $this->returnType;
55 |     }
56 | 
57 |     public function getStmts() {
58 |         return $this->stmts;
59 |     }
60 | }
61 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Global_.php:
--------------------------------------------------------------------------------
 1 | vars = $vars;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('vars');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Goto_.php:
--------------------------------------------------------------------------------
 1 | name = $name;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('name');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/HaltCompiler.php:
--------------------------------------------------------------------------------
 1 | remaining = $remaining;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('remaining');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php:
--------------------------------------------------------------------------------
 1 |  array(): Statements
24 |      *                              'elseifs' => array(): Elseif clauses
25 |      *                              'else'    => null   : Else clause
26 |      * @param array     $attributes Additional attributes
27 |      */
28 |     public function __construct(Node\Expr $cond, array $subNodes = array(), array $attributes = array()) {
29 |         parent::__construct(null, $attributes);
30 |         $this->cond = $cond;
31 |         $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
32 |         $this->elseifs = isset($subNodes['elseifs']) ? $subNodes['elseifs'] : array();
33 |         $this->else = isset($subNodes['else']) ? $subNodes['else'] : null;
34 |     }
35 | 
36 |     public function getSubNodeNames() {
37 |         return array('cond', 'stmts', 'elseifs', 'else');
38 |     }
39 | }
40 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/InlineHTML.php:
--------------------------------------------------------------------------------
 1 | value = $value;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('value');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Interface_.php:
--------------------------------------------------------------------------------
 1 |  true,
15 |         'parent' => true,
16 |         'static' => true,
17 |     );
18 | 
19 |     /**
20 |      * Constructs a class node.
21 |      *
22 |      * @param string $name       Name
23 |      * @param array  $subNodes   Array of the following optional subnodes:
24 |      *                           'extends' => array(): Name of extended interfaces
25 |      *                           'stmts'   => array(): Statements
26 |      * @param array  $attributes Additional attributes
27 |      */
28 |     public function __construct($name, array $subNodes = array(), array $attributes = array()) {
29 |         parent::__construct(null, $attributes);
30 |         $this->name = $name;
31 |         $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : array();
32 |         $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
33 | 
34 |         if (isset(self::$specialNames[strtolower($this->name)])) {
35 |             throw new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $this->name));
36 |         }
37 | 
38 |         foreach ($this->extends as $interface) {
39 |             if (isset(self::$specialNames[strtolower($interface)])) {
40 |                 throw new Error(
41 |                     sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface),
42 |                     $interface->getAttributes()
43 |                 );
44 |             }
45 |         }
46 |     }
47 | 
48 |     public function getSubNodeNames() {
49 |         return array('name', 'extends', 'stmts');
50 |     }
51 | }
52 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Label.php:
--------------------------------------------------------------------------------
 1 | name = $name;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('name');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php:
--------------------------------------------------------------------------------
 1 |  true,
17 |         'parent' => true,
18 |         'static' => true,
19 |     );
20 | 
21 |     /**
22 |      * Constructs a namespace node.
23 |      *
24 |      * @param null|Node\Name $name       Name
25 |      * @param null|Node[]    $stmts      Statements
26 |      * @param array          $attributes Additional attributes
27 |      */
28 |     public function __construct(Node\Name $name = null, $stmts = array(), array $attributes = array()) {
29 |         parent::__construct(null, $attributes);
30 |         $this->name = $name;
31 |         $this->stmts = $stmts;
32 | 
33 |         if (isset(self::$specialNames[strtolower($this->name)])) {
34 |             throw new Error(
35 |                 sprintf('Cannot use \'%s\' as namespace name', $this->name),
36 |                 $this->name->getAttributes()
37 |             );
38 |         }
39 | 
40 |         if (null !== $this->stmts) {
41 |             foreach ($this->stmts as $stmt) {
42 |                 if ($stmt instanceof self) {
43 |                     throw new Error('Namespace declarations cannot be nested', $stmt->getAttributes());
44 |                 }
45 |             }
46 |         }
47 |     }
48 | 
49 |     public function getSubNodeNames() {
50 |         return array('name', 'stmts');
51 |     }
52 | }
53 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php:
--------------------------------------------------------------------------------
 1 | type = $type;
33 |         $this->props = $props;
34 |     }
35 | 
36 |     public function getSubNodeNames() {
37 |         return array('type', 'props');
38 |     }
39 | 
40 |     public function isPublic() {
41 |         return ($this->type & Class_::MODIFIER_PUBLIC) !== 0
42 |             || ($this->type & Class_::VISIBILITY_MODIFER_MASK) === 0;
43 |     }
44 | 
45 |     public function isProtected() {
46 |         return (bool) ($this->type & Class_::MODIFIER_PROTECTED);
47 |     }
48 | 
49 |     public function isPrivate() {
50 |         return (bool) ($this->type & Class_::MODIFIER_PRIVATE);
51 |     }
52 | 
53 |     public function isStatic() {
54 |         return (bool) ($this->type & Class_::MODIFIER_STATIC);
55 |     }
56 | }
57 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/PropertyProperty.php:
--------------------------------------------------------------------------------
 1 | name = $name;
24 |         $this->default = $default;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('name', 'default');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Return_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/StaticVar.php:
--------------------------------------------------------------------------------
 1 | name = $name;
24 |         $this->default = $default;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('name', 'default');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Static_.php:
--------------------------------------------------------------------------------
 1 | vars = $vars;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('vars');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Switch_.php:
--------------------------------------------------------------------------------
 1 | cond = $cond;
24 |         $this->cases = $cases;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('cond', 'cases');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Throw_.php:
--------------------------------------------------------------------------------
 1 | expr = $expr;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('expr');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUse.php:
--------------------------------------------------------------------------------
 1 | traits = $traits;
25 |         $this->adaptations = $adaptations;
26 |     }
27 | 
28 |     public function getSubNodeNames() {
29 |         return array('traits', 'adaptations');
30 |     }
31 | }
32 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation.php:
--------------------------------------------------------------------------------
 1 | trait = $trait;
26 |         $this->method = $method;
27 |         $this->newModifier = $newModifier;
28 |         $this->newName = $newName;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('trait', 'method', 'newModifier', 'newName');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php:
--------------------------------------------------------------------------------
 1 | trait = $trait;
23 |         $this->method = $method;
24 |         $this->insteadof = $insteadof;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('trait', 'method', 'insteadof');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Trait_.php:
--------------------------------------------------------------------------------
 1 | name = $name;
19 |         $this->stmts = $stmts;
20 |     }
21 | 
22 |     public function getSubNodeNames() {
23 |         return array('name', 'stmts');
24 |     }
25 | }
26 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TryCatch.php:
--------------------------------------------------------------------------------
 1 | stmts = $stmts;
32 |         $this->catches = $catches;
33 |         $this->finallyStmts = $finallyStmts;
34 |     }
35 | 
36 |     public function getSubNodeNames() {
37 |         return array('stmts', 'catches', 'finallyStmts');
38 |     }
39 | }
40 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Unset_.php:
--------------------------------------------------------------------------------
 1 | vars = $vars;
21 |     }
22 | 
23 |     public function getSubNodeNames() {
24 |         return array('vars');
25 |     }
26 | }
27 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/UseUse.php:
--------------------------------------------------------------------------------
 1 | getLast();
25 |         }
26 | 
27 |         if ('self' == strtolower($alias) || 'parent' == strtolower($alias)) {
28 |             throw new Error(sprintf(
29 |                 'Cannot use %s as %s because \'%2$s\' is a special class name',
30 |                 $name, $alias
31 |             ));
32 |         }
33 | 
34 |         parent::__construct(null, $attributes);
35 |         $this->name = $name;
36 |         $this->alias = $alias;
37 |     }
38 | 
39 |     public function getSubNodeNames() {
40 |         return array('name', 'alias');
41 |     }
42 | }
43 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Use_.php:
--------------------------------------------------------------------------------
 1 | type = $type;
28 |         $this->uses = $uses;
29 |     }
30 | 
31 |     public function getSubNodeNames() {
32 |         return array('type', 'uses');
33 |     }
34 | }
35 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php:
--------------------------------------------------------------------------------
 1 | cond = $cond;
24 |         $this->stmts = $stmts;
25 |     }
26 | 
27 |     public function getSubNodeNames() {
28 |         return array('cond', 'stmts');
29 |     }
30 | }
31 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php:
--------------------------------------------------------------------------------
  1 | attributes = $attributes;
 24 | 
 25 |         if (null !== $subNodes) {
 26 |             foreach ($subNodes as $name => $value) {
 27 |                 $this->$name = $value;
 28 |             }
 29 |             $this->subNodeNames = array_keys($subNodes);
 30 |         }
 31 |     }
 32 | 
 33 |     /**
 34 |      * Gets the type of the node.
 35 |      *
 36 |      * @return string Type of the node
 37 |      */
 38 |     public function getType() {
 39 |         return strtr(substr(rtrim(get_class($this), '_'), 15), '\\', '_');
 40 |     }
 41 | 
 42 |     /**
 43 |      * Gets the names of the sub nodes.
 44 |      *
 45 |      * @return array Names of sub nodes
 46 |      */
 47 |     public function getSubNodeNames() {
 48 |         return $this->subNodeNames;
 49 |     }
 50 | 
 51 |     /**
 52 |      * Gets line the node started in.
 53 |      *
 54 |      * @return int Line
 55 |      */
 56 |     public function getLine() {
 57 |         return $this->getAttribute('startLine', -1);
 58 |     }
 59 | 
 60 |     /**
 61 |      * Sets line the node started in.
 62 |      *
 63 |      * @param int $line Line
 64 |      */
 65 |     public function setLine($line) {
 66 |         $this->setAttribute('startLine', (int) $line);
 67 |     }
 68 | 
 69 |     /**
 70 |      * Gets the doc comment of the node.
 71 |      *
 72 |      * The doc comment has to be the last comment associated with the node.
 73 |      *
 74 |      * @return null|Comment\Doc Doc comment object or null
 75 |      */
 76 |     public function getDocComment() {
 77 |         $comments = $this->getAttribute('comments');
 78 |         if (!$comments) {
 79 |             return null;
 80 |         }
 81 | 
 82 |         $lastComment = $comments[count($comments) - 1];
 83 |         if (!$lastComment instanceof Comment\Doc) {
 84 |             return null;
 85 |         }
 86 | 
 87 |         return $lastComment;
 88 |     }
 89 | 
 90 |     /**
 91 |      * {@inheritDoc}
 92 |      */
 93 |     public function setAttribute($key, $value) {
 94 |         $this->attributes[$key] = $value;
 95 |     }
 96 | 
 97 |     /**
 98 |      * {@inheritDoc}
 99 |      */
100 |     public function hasAttribute($key) {
101 |         return array_key_exists($key, $this->attributes);
102 |     }
103 | 
104 |     /**
105 |      * {@inheritDoc}
106 |      */
107 |     public function &getAttribute($key, $default = null) {
108 |         if (!array_key_exists($key, $this->attributes)) {
109 |             return $default;
110 |         } else {
111 |             return $this->attributes[$key];
112 |         }
113 |     }
114 | 
115 |     /**
116 |      * {@inheritDoc}
117 |      */
118 |     public function getAttributes() {
119 |         return $this->attributes;
120 |     }
121 | }
122 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/NodeDumper.php:
--------------------------------------------------------------------------------
 1 | getType() . '(';
17 | 
18 |             foreach ($node->getSubNodeNames() as $key) {
19 |                 $r .= "\n    " . $key . ': ';
20 | 
21 |                 $value = $node->$key;
22 |                 if (null === $value) {
23 |                     $r .= 'null';
24 |                 } elseif (false === $value) {
25 |                     $r .= 'false';
26 |                 } elseif (true === $value) {
27 |                     $r .= 'true';
28 |                 } elseif (is_scalar($value)) {
29 |                     $r .= $value;
30 |                 } else {
31 |                     $r .= str_replace("\n", "\n    ", $this->dump($value));
32 |                 }
33 |             }
34 |         } elseif (is_array($node)) {
35 |             $r = 'array(';
36 | 
37 |             foreach ($node as $key => $value) {
38 |                 $r .= "\n    " . $key . ': ';
39 | 
40 |                 if (null === $value) {
41 |                     $r .= 'null';
42 |                 } elseif (false === $value) {
43 |                     $r .= 'false';
44 |                 } elseif (true === $value) {
45 |                     $r .= 'true';
46 |                 } elseif (is_scalar($value)) {
47 |                     $r .= $value;
48 |                 } else {
49 |                     $r .= str_replace("\n", "\n    ", $this->dump($value));
50 |                 }
51 |             }
52 |         } else {
53 |             throw new \InvalidArgumentException('Can only dump nodes and arrays.');
54 |         }
55 | 
56 |         return $r . "\n)";
57 |     }
58 | }
59 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/NodeTraverserInterface.php:
--------------------------------------------------------------------------------
 1 | writer = new XMLWriter;
19 |         $this->writer->openMemory();
20 |         $this->writer->setIndent(true);
21 |     }
22 | 
23 |     public function serialize(array $nodes) {
24 |         $this->writer->flush();
25 |         $this->writer->startDocument('1.0', 'UTF-8');
26 | 
27 |         $this->writer->startElement('AST');
28 |         $this->writer->writeAttribute('xmlns:node',      'http://nikic.github.com/PHPParser/XML/node');
29 |         $this->writer->writeAttribute('xmlns:subNode',   'http://nikic.github.com/PHPParser/XML/subNode');
30 |         $this->writer->writeAttribute('xmlns:attribute', 'http://nikic.github.com/PHPParser/XML/attribute');
31 |         $this->writer->writeAttribute('xmlns:scalar',    'http://nikic.github.com/PHPParser/XML/scalar');
32 | 
33 |         $this->_serialize($nodes);
34 | 
35 |         $this->writer->endElement();
36 | 
37 |         return $this->writer->outputMemory();
38 |     }
39 | 
40 |     protected function _serialize($node) {
41 |         if ($node instanceof Node) {
42 |             $this->writer->startElement('node:' . $node->getType());
43 | 
44 |             foreach ($node->getAttributes() as $name => $value) {
45 |                 $this->writer->startElement('attribute:' . $name);
46 |                 $this->_serialize($value);
47 |                 $this->writer->endElement();
48 |             }
49 | 
50 |             foreach ($node as $name => $subNode) {
51 |                 $this->writer->startElement('subNode:' . $name);
52 |                 $this->_serialize($subNode);
53 |                 $this->writer->endElement();
54 |             }
55 | 
56 |             $this->writer->endElement();
57 |         } elseif ($node instanceof Comment) {
58 |             $this->writer->startElement('comment');
59 |             $this->writer->writeAttribute('isDocComment', $node instanceof Comment\Doc ? 'true' : 'false');
60 |             $this->writer->writeAttribute('line', (string) $node->getLine());
61 |             $this->writer->text($node->getText());
62 |             $this->writer->endElement();
63 |         } elseif (is_array($node)) {
64 |             $this->writer->startElement('scalar:array');
65 |             foreach ($node as $subNode) {
66 |                 $this->_serialize($subNode);
67 |             }
68 |             $this->writer->endElement();
69 |         } elseif (is_string($node)) {
70 |             $this->writer->writeElement('scalar:string', $node);
71 |         } elseif (is_int($node)) {
72 |             $this->writer->writeElement('scalar:int', (string) $node);
73 |         } elseif (is_float($node)) {
74 |             // TODO Higher precision conversion?
75 |             $this->writer->writeElement('scalar:float', (string) $node);
76 |         } elseif (true === $node) {
77 |             $this->writer->writeElement('scalar:true');
78 |         } elseif (false === $node) {
79 |             $this->writer->writeElement('scalar:false');
80 |         } elseif (null === $node) {
81 |             $this->writer->writeElement('scalar:null');
82 |         } else {
83 |             throw new \InvalidArgumentException('Unexpected node type');
84 |         }
85 |     }
86 | }
87 | 


--------------------------------------------------------------------------------
/vendor/nikic/php-parser/lib/PhpParser/Unserializer.php:
--------------------------------------------------------------------------------
 1 | 
 2 | 
 3 | 
13 |     
14 |         
15 |             ./test/
16 |         
17 |     
18 | 
19 |     
20 |         
21 |             ./lib/PhpParser/
22 |         
23 |     
24 | 


--------------------------------------------------------------------------------
/vendor/sublimeAutoComplete.json:
--------------------------------------------------------------------------------
1 | []


--------------------------------------------------------------------------------