diff --git a/.drone.jsonnet b/.drone.jsonnet index 1e236fb3..e13974c7 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -25,7 +25,7 @@ local composer(phpversion, params) = { local phpunit(phpversion) = { name: "PHPUnit", image: "joomlaprojects/docker-images:php" + phpversion, - [if phpversion == "8.2" then "failure"]: "ignore", + [if phpversion == "8.3" then "failure"]: "ignore", commands: ["vendor/bin/phpunit"] }; @@ -51,8 +51,7 @@ local pipeline(name, phpversion, params) = { volumes: volumes, commands: [ "php -v", - "composer update", - "composer require phpmd/phpmd phpstan/phpstan" + "composer update" ] }, { @@ -64,16 +63,12 @@ local pipeline(name, phpversion, params) = { ] }, { - name: "phpmd", - image: "joomlaprojects/docker-images:php8.1", + name: "phan", + image: "joomlaprojects/docker-images:php8.1-ast", depends: [ "composer" ], failure: "ignore", commands: [ - "vendor/bin/phpmd src text cleancode", - "vendor/bin/phpmd src text codesize", - "vendor/bin/phpmd src text controversial", - "vendor/bin/phpmd src text design", - "vendor/bin/phpmd src text unusedcode", + "vendor/bin/phan" ] }, { @@ -107,5 +102,5 @@ local pipeline(name, phpversion, params) = { }, pipeline("8.1 lowest", "8.1", "--prefer-stable --prefer-lowest"), pipeline("8.1", "8.1", "--prefer-stable"), - pipeline("8.2", "8.2", "--prefer-stable --ignore-platform-reqs"), + pipeline("8.2", "8.2", "--prefer-stable"), ] diff --git a/.drone.yml b/.drone.yml index 341d9d51..0b8d4d90 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,202 +1,115 @@ --- -{ - "kind": "pipeline", - "name": "Codequality", - "steps": [ - { - "commands": [ - "php -v", - "composer update", - "composer require phpmd/phpmd phpstan/phpstan" - ], - "image": "joomlaprojects/docker-images:php8.1", - "name": "composer", - "volumes": [ - { - "name": "composer-cache", - "path": "/tmp/composer-cache" - } - ] - }, - { - "commands": [ - "vendor/bin/phpcs --standard=ruleset.xml src/" - ], - "depends": [ - "composer" - ], - "image": "joomlaprojects/docker-images:php8.1", - "name": "phpcs" - }, - { - "commands": [ - "vendor/bin/phpmd src text cleancode", - "vendor/bin/phpmd src text codesize", - "vendor/bin/phpmd src text controversial", - "vendor/bin/phpmd src text design", - "vendor/bin/phpmd src text unusedcode" - ], - "depends": [ - "composer" - ], - "failure": "ignore", - "image": "joomlaprojects/docker-images:php8.1", - "name": "phpmd" - }, - { - "commands": [ - "vendor/bin/phpstan analyse src" - ], - "depends": [ - "composer" - ], - "failure": "ignore", - "image": "joomlaprojects/docker-images:php8.1", - "name": "phpstan" - }, - { - "commands": [ - "phploc src" - ], - "depends": [ - "composer" - ], - "failure": "ignore", - "image": "joomlaprojects/docker-images:php8.1", - "name": "phploc" - }, - { - "commands": [ - "phpcpd src" - ], - "depends": [ - "composer" - ], - "failure": "ignore", - "image": "joomlaprojects/docker-images:php8.1", - "name": "phpcpd" - } - ], - "volumes": [ - { - "host": { - "path": "/tmp/composer-cache" - }, - "name": "composer-cache" - } - ] -} +kind: pipeline +name: Codequality +steps: +- commands: + - php -v + - composer update + image: joomlaprojects/docker-images:php8.1 + name: composer + volumes: + - name: composer-cache + path: /tmp/composer-cache +- commands: + - vendor/bin/phpcs --standard=ruleset.xml src/ + depends: + - composer + image: joomlaprojects/docker-images:php8.1 + name: phpcs +- commands: + - vendor/bin/phan + depends: + - composer + failure: ignore + image: joomlaprojects/docker-images:php8.1-ast + name: phan +- commands: + - vendor/bin/phpstan analyse src + depends: + - composer + failure: ignore + image: joomlaprojects/docker-images:php8.1 + name: phpstan +- commands: + - phploc src + depends: + - composer + failure: ignore + image: joomlaprojects/docker-images:php8.1 + name: phploc +- commands: + - phpcpd src + depends: + - composer + failure: ignore + image: joomlaprojects/docker-images:php8.1 + name: phpcpd +volumes: +- host: + path: /tmp/composer-cache + name: composer-cache --- -{ - "kind": "pipeline", - "name": "PHP 8.1 lowest", - "steps": [ - { - "commands": [ - "php -v", - "composer update --prefer-stable --prefer-lowest" - ], - "image": "joomlaprojects/docker-images:php8.1", - "name": "composer", - "volumes": [ - { - "name": "composer-cache", - "path": "/tmp/composer-cache" - } - ] - }, - { - "commands": [ - "vendor/bin/phpunit" - ], - "image": "joomlaprojects/docker-images:php8.1", - "name": "PHPUnit" - } - ], - "volumes": [ - { - "host": { - "path": "/tmp/composer-cache" - }, - "name": "composer-cache" - } - ] -} +kind: pipeline +name: PHP 8.1 lowest +steps: +- commands: + - php -v + - composer update --prefer-stable --prefer-lowest + image: joomlaprojects/docker-images:php8.1 + name: composer + volumes: + - name: composer-cache + path: /tmp/composer-cache +- commands: + - vendor/bin/phpunit + image: joomlaprojects/docker-images:php8.1 + name: PHPUnit +volumes: +- host: + path: /tmp/composer-cache + name: composer-cache --- -{ - "kind": "pipeline", - "name": "PHP 8.1", - "steps": [ - { - "commands": [ - "php -v", - "composer update --prefer-stable" - ], - "image": "joomlaprojects/docker-images:php8.1", - "name": "composer", - "volumes": [ - { - "name": "composer-cache", - "path": "/tmp/composer-cache" - } - ] - }, - { - "commands": [ - "vendor/bin/phpunit" - ], - "image": "joomlaprojects/docker-images:php8.1", - "name": "PHPUnit" - } - ], - "volumes": [ - { - "host": { - "path": "/tmp/composer-cache" - }, - "name": "composer-cache" - } - ] -} +kind: pipeline +name: PHP 8.1 +steps: +- commands: + - php -v + - composer update --prefer-stable + image: joomlaprojects/docker-images:php8.1 + name: composer + volumes: + - name: composer-cache + path: /tmp/composer-cache +- commands: + - vendor/bin/phpunit + image: joomlaprojects/docker-images:php8.1 + name: PHPUnit +volumes: +- host: + path: /tmp/composer-cache + name: composer-cache --- -{ - "kind": "pipeline", - "name": "PHP 8.2", - "steps": [ - { - "commands": [ - "php -v", - "composer update --prefer-stable --ignore-platform-reqs" - ], - "image": "joomlaprojects/docker-images:php8.2", - "name": "composer", - "volumes": [ - { - "name": "composer-cache", - "path": "/tmp/composer-cache" - } - ] - }, - { - "commands": [ - "vendor/bin/phpunit" - ], - "failure": "ignore", - "image": "joomlaprojects/docker-images:php8.2", - "name": "PHPUnit" - } - ], - "volumes": [ - { - "host": { - "path": "/tmp/composer-cache" - }, - "name": "composer-cache" - } - ] -} +kind: pipeline +name: PHP 8.2 +steps: +- commands: + - php -v + - composer update --prefer-stable + image: joomlaprojects/docker-images:php8.2 + name: composer + volumes: + - name: composer-cache + path: /tmp/composer-cache +- commands: + - vendor/bin/phpunit + image: joomlaprojects/docker-images:php8.2 + name: PHPUnit +volumes: +- host: + path: /tmp/composer-cache + name: composer-cache --- kind: signature -hmac: 76b430f45f715002fd687d4ae23425ab479d656bdc36645198e302b6052f070f +hmac: 5e5d25d380c8471aa6a55d802339463ba763c8b2337c8810984e93a0c2f6b6e4 ... diff --git a/.phan/config.php b/.phan/config.php new file mode 100644 index 00000000..7face806 --- /dev/null +++ b/.phan/config.php @@ -0,0 +1,349 @@ + '8.1', + + // If enabled, missing properties will be created when + // they are first seen. If false, we'll report an + // error message if there is an attempt to write + // to a class property that wasn't explicitly + // defined. + 'allow_missing_properties' => true, + + // If enabled, null can be cast to any type and any + // type can be cast to null. Setting this to true + // will cut down on false positives. + 'null_casts_as_any_type' => true, + + // If enabled, allow null to be cast as any array-like type. + // + // This is an incremental step in migrating away from `null_casts_as_any_type`. + // If `null_casts_as_any_type` is true, this has no effect. + 'null_casts_as_array' => true, + + // If enabled, allow any array-like type to be cast to null. + // This is an incremental step in migrating away from `null_casts_as_any_type`. + // If `null_casts_as_any_type` is true, this has no effect. + 'array_casts_as_null' => true, + + // If enabled, scalars (int, float, bool, string, null) + // are treated as if they can cast to each other. + // This does not affect checks of array keys. See `scalar_array_key_cast`. + 'scalar_implicit_cast' => true, + + // If enabled, any scalar array keys (int, string) + // are treated as if they can cast to each other. + // E.g. `array` can cast to `array` and vice versa. + // Normally, a scalar type such as int could only cast to/from int and mixed. + 'scalar_array_key_cast' => true, + + // If this has entries, scalars (int, float, bool, string, null) + // are allowed to perform the casts listed. + // + // E.g. `['int' => ['float', 'string'], 'float' => ['int'], 'string' => ['int'], 'null' => ['string']]` + // allows casting null to a string, but not vice versa. + // (subset of `scalar_implicit_cast`) + 'scalar_implicit_partial' => [], + + // If enabled, Phan will warn if **any** type in a method invocation's object + // is definitely not an object, + // or if **any** type in an invoked expression is not a callable. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_method_checking' => false, + + // If enabled, Phan will warn if **any** type of the object expression for a property access + // does not contain that property. + 'strict_object_checking' => false, + + // If enabled, Phan will warn if **any** type in the argument's union type + // cannot be cast to a type in the parameter's expected union type. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_param_checking' => false, + + // If enabled, Phan will warn if **any** type in a property assignment's union type + // cannot be cast to a type in the property's declared union type. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_property_checking' => false, + + // If enabled, Phan will warn if **any** type in a returned value's union type + // cannot be cast to the declared return type. + // Setting this to true will introduce numerous false positives + // (and reveal some bugs). + 'strict_return_checking' => false, + + // If true, seemingly undeclared variables in the global + // scope will be ignored. + // + // This is useful for projects with complicated cross-file + // globals that you have no hope of fixing. + 'ignore_undeclared_variables_in_global_scope' => true, + + // Set this to false to emit `PhanUndeclaredFunction` issues for internal functions that Phan has signatures for, + // but aren't available in the codebase, or from Reflection. + // (may lead to false positives if an extension isn't loaded) + // + // If this is true(default), then Phan will not warn. + // + // Even when this is false, Phan will still infer return values and check parameters of internal functions + // if Phan has the signatures. + 'ignore_undeclared_functions_with_known_signatures' => true, + + // Backwards Compatibility Checking. This is slow + // and expensive, but you should consider running + // it before upgrading your version of PHP to a + // new version that has backward compatibility + // breaks. + // + // If you are migrating from PHP 5 to PHP 7, + // you should also look into using + // [php7cc (no longer maintained)](https://github.com/sstalle/php7cc) + // and [php7mar](https://github.com/Alexia/php7mar), + // which have different backwards compatibility checks. + // + // If you are still using versions of php older than 5.6, + // `PHP53CompatibilityPlugin` may be worth looking into if you are not running + // syntax checks for php 5.3 through another method such as + // `InvokePHPNativeSyntaxCheckPlugin` (see .phan/plugins/README.md). + 'backward_compatibility_checks' => false, + + // If true, check to make sure the return type declared + // in the doc-block (if any) matches the return type + // declared in the method signature. + 'check_docblock_signature_return_type_match' => true, + + // This setting maps case-insensitive strings to union types. + // + // This is useful if a project uses phpdoc that differs from the phpdoc2 standard. + // + // If the corresponding value is the empty string, + // then Phan will ignore that union type (E.g. can ignore 'the' in `@return the value`) + // + // If the corresponding value is not empty, + // then Phan will act as though it saw the corresponding UnionTypes(s) + // when the keys show up in a UnionType of `@param`, `@return`, `@var`, `@property`, etc. + // + // This matches the **entire string**, not parts of the string. + // (E.g. `@return the|null` will still look for a class with the name `the`, but `@return the` will be ignored with the below setting) + // + // (These are not aliases, this setting is ignored outside of doc comments). + // (Phan does not check if classes with these names exist) + // + // Example setting: `['unknown' => '', 'number' => 'int|float', 'char' => 'string', 'long' => 'int', 'the' => '']` + 'phpdoc_type_mapping' => [], + + // Set to true in order to attempt to detect dead + // (unreferenced) code. Keep in mind that the + // results will only be a guess given that classes, + // properties, constants and methods can be referenced + // as variables (like `$class->$property` or + // `$class->$method()`) in ways that we're unable + // to make sense of. + // + // To more aggressively detect dead code, + // you may want to set `dead_code_detection_prefer_false_negative` to `false`. + 'dead_code_detection' => false, + + // Set to true in order to attempt to detect unused variables. + // `dead_code_detection` will also enable unused variable detection. + // + // This has a few known false positives, e.g. for loops or branches. + 'unused_variable_detection' => false, + + // Set to true in order to attempt to detect redundant and impossible conditions. + // + // This has some false positives involving loops, + // variables set in branches of loops, and global variables. + 'redundant_condition_detection' => false, + + // If enabled, Phan will act as though it's certain of real return types of a subset of internal functions, + // even if those return types aren't available in reflection (real types were taken from php 7.3 or 8.0-dev, depending on target_php_version). + // + // Note that with php 7 and earlier, php would return null or false for many internal functions if the argument types or counts were incorrect. + // As a result, enabling this setting with target_php_version 8.0 may result in false positives for `--redundant-condition-detection` when codebases also support php 7.x. + 'assume_real_types_for_internal_functions' => false, + + // If true, this runs a quick version of checks that takes less + // time at the cost of not running as thorough + // of an analysis. You should consider setting this + // to true only when you wish you had more **undiagnosed** issues + // to fix in your code base. + // + // In quick-mode the scanner doesn't rescan a function + // or a method's code block every time a call is seen. + // This means that the problem here won't be detected: + // + // ```php + // false, + + // Override to hardcode existence and types of (non-builtin) globals in the global scope. + // Class names should be prefixed with `\`. + // + // (E.g. `['_FOO' => '\FooClass', 'page' => '\PageClass', 'userId' => 'int']`) + 'globals_type_map' => [], + + // The minimum severity level to report on. This can be + // set to `Issue::SEVERITY_LOW`, `Issue::SEVERITY_NORMAL` or + // `Issue::SEVERITY_CRITICAL`. Setting it to only + // critical issues is a good place to start on a big + // sloppy mature code base. + 'minimum_severity' => Issue::SEVERITY_NORMAL, + + // Add any issue types (such as `'PhanUndeclaredMethod'`) + // to this list to inhibit them from being reported. + // 'PhanDeprecatedClass', 'PhanUndeclaredConstant','PhanDeprecatedFunction' + 'suppress_issue_types' => [], + + // A regular expression to match files to be excluded + // from parsing and analysis and will not be read at all. + // + // This is useful for excluding groups of test or example + // directories/files, unanalyzable files, or files that + // can't be removed for whatever reason. + // (e.g. `'@Test\.php$@'`, or `'@vendor/.*/(tests|Tests)/@'`) + 'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@', + + // A list of files that will be excluded from parsing and analysis + // and will not be read at all. + // + // This is useful for excluding hopelessly unanalyzable + // files that can't be removed for whatever reason. + 'exclude_file_list' => [ + ], + + // A directory list that defines files that will be excluded + // from static analysis, but whose class and method + // information should be included. + // + // Generally, you'll want to include the directories for + // third-party code (such as "vendor/") in this list. + // + // n.b.: If you'd like to parse but not analyze 3rd + // party code, directories containing that code + // should be added to the `directory_list` as well as + // to `exclude_analysis_directory_list`. + 'exclude_analysis_directory_list' => [ + 'vendor/' + ], + + // Enable this to enable checks of require/include statements referring to valid paths. + // The settings `include_paths` and `warn_about_relative_include_statement` affect the checks. + 'enable_include_path_checks' => false, + + // The number of processes to fork off during the analysis + // phase. + 'processes' => 1, + + // List of case-insensitive file extensions supported by Phan. + // (e.g. `['php', 'html', 'htm']`) + 'analyzed_file_extensions' => [ + 'php', + ], + + // You can put paths to stubs of internal extensions in this config option. + // If the corresponding extension is **not** loaded, then Phan will use the stubs instead. + // Phan will continue using its detailed type annotations, + // but load the constants, classes, functions, and classes (and their Reflection types) + // from these stub files (doubling as valid php files). + // Use a different extension from php to avoid accidentally loading these. + // The `tools/make_stubs` script can be used to generate your own stubs (compatible with php 7.0+ right now) + // + // (e.g. `['xdebug' => '.phan/internal_stubs/xdebug.phan_php']`) + 'autoload_internal_extension_signatures' => [ + ], + + // A list of plugin files to execute. + // + // Plugins which are bundled with Phan can be added here by providing their name (e.g. `'AlwaysReturnPlugin'`) + // + // Documentation about available bundled plugins can be found [here](https://github.com/phan/phan/tree/v4/.phan/plugins). + // + // Alternately, you can pass in the full path to a PHP file with the plugin's implementation (e.g. `'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'`) + 'plugins' => [], + + // A list of directories that should be parsed for class and + // method information. After excluding the directories + // defined in `exclude_analysis_directory_list`, the remaining + // files will be statically analyzed for errors. + // + // Thus, both first-party and third-party code being used by + // your application should be included in this list. + 'directory_list' => [ + 'src', + 'vendor' + ], + + // A list of individual files to include in analysis + // with a path relative to the root directory of the + // project. + 'file_list' => [], +]; diff --git a/composer.json b/composer.json index 2cae4572..b21aa67b 100644 --- a/composer.json +++ b/composer.json @@ -6,14 +6,16 @@ "homepage": "https://github.com/joomla-framework/github-api", "license": "GPL-2.0-or-later", "require": { - "php": "~8.1.0", + "php": "^8.1.0", "joomla/http": "3.0.x-dev", "joomla/registry": "3.0.x-dev", "joomla/uri": "3.0.x-dev" }, "require-dev": { "phpunit/phpunit": "^9.5.28", - "squizlabs/php_codesniffer": "~3.7.1" + "squizlabs/php_codesniffer": "^3.7.2", + "phpstan/phpstan": "^1.10.7", + "phan/phan": "^5.4.2" }, "autoload": { "psr-4": { diff --git a/src/AbstractGithubObject.php b/src/AbstractGithubObject.php index 3c864e4a..b283fce4 100644 --- a/src/AbstractGithubObject.php +++ b/src/AbstractGithubObject.php @@ -83,8 +83,8 @@ abstract class AbstractGithubObject /** * Constructor. * - * @param Registry $options GitHub options object. - * @param BaseHttp $client The HTTP client object. + * @param ?Registry $options GitHub options object. + * @param ?BaseHttp $client The HTTP client object. * * @since 1.0 */ diff --git a/src/AbstractPackage.php b/src/AbstractPackage.php index 4e6b2568..71266b7c 100644 --- a/src/AbstractPackage.php +++ b/src/AbstractPackage.php @@ -22,8 +22,8 @@ abstract class AbstractPackage extends AbstractGithubObject /** * Constructor. * - * @param Registry $options GitHub options object. - * @param Http $client The HTTP client object. + * @param ?Registry $options GitHub options object. + * @param ?Http $client The HTTP client object. * * @since 1.0 */ diff --git a/src/Github.php b/src/Github.php index a6f1c477..632c54e4 100644 --- a/src/Github.php +++ b/src/Github.php @@ -40,7 +40,7 @@ class Github /** * Options for the GitHub object. * - * @var array + * @var Registry * @since 1.0 */ protected $options; @@ -56,8 +56,8 @@ class Github /** * Constructor. * - * @param Registry $options GitHub options object. - * @param Http $client The HTTP client object. + * @param ?Registry $options GitHub options object. + * @param ?Http $client The HTTP client object. * * @since 1.0 */ diff --git a/src/Package/Activity/Notifications.php b/src/Package/Activity/Notifications.php index 333af07c..7b228b2f 100644 --- a/src/Package/Activity/Notifications.php +++ b/src/Package/Activity/Notifications.php @@ -25,10 +25,10 @@ class Notifications extends AbstractPackage * * List all notifications for the current user, grouped by repository. * - * @param boolean $all True to show notifications marked as read. - * @param boolean $participating True to show only notifications in which the user is directly participating or mentioned. - * @param \DateTimeInterface $since Only show notifications updated after the given time. - * @param \DateTimeInterface $before Only show notifications updated before the given time. + * @param boolean $all True to show notifications marked as read. + * @param boolean $participating True to show only notifications in which the user is directly participating or mentioned. + * @param ?\DateTimeInterface $since Only show notifications updated after the given time. + * @param ?\DateTimeInterface $before Only show notifications updated before the given time. * * @return object * @@ -65,12 +65,12 @@ public function getList($all = true, $participating = true, \DateTimeInterface $ * * List all notifications for the current user. * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param boolean $all True to show notifications marked as read. - * @param boolean $participating True to show only notifications in which the user is directly participating or mentioned. - * @param \DateTimeInterface $since Only show notifications updated after the given time. - * @param \DateTimeInterface $before Only show notifications updated before the given time. + * @param string $owner Repository owner. + * @param string $repo Repository name. + * @param boolean $all True to show notifications marked as read. + * @param boolean $participating True to show only notifications in which the user is directly participating or mentioned. + * @param ?\DateTimeInterface $since Only show notifications updated after the given time. + * @param ?\DateTimeInterface $before Only show notifications updated before the given time. * * @return object * @@ -113,9 +113,9 @@ public function getListRepository( * * Marking a notification as “read” removes it from the default view on GitHub.com. * - * @param boolean $unread Changes the unread status of the threads. - * @param boolean $read Inverse of “unread”. - * @param \DateTimeInterface $lastReadAt Describes the last point that notifications were checked. + * @param boolean $unread Changes the unread status of the threads. + * @param boolean $read Inverse of “unread”. + * @param ?\DateTimeInterface $lastReadAt Describes the last point that notifications were checked. * Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format. * * @return object @@ -147,11 +147,11 @@ public function markRead($unread = true, $read = true, \DateTimeInterface $lastR * * Marking all notifications in a repository as “read” removes them from the default view on GitHub.com. * - * @param string $owner Repository owner. - * @param string $repo Repository name. - * @param boolean $unread Changes the unread status of the threads. - * @param boolean $read Inverse of “unread”. - * @param \DateTimeInterface $lastReadAt Describes the last point that notifications were checked. + * @param string $owner Repository owner. + * @param string $repo Repository name. + * @param boolean $unread Changes the unread status of the threads. + * @param boolean $read Inverse of “unread”. + * @param ?\DateTimeInterface $lastReadAt Describes the last point that notifications were checked. * Anything updated since this time will not be updated. Default: Now. Expected in ISO 8601 format. * * @return object diff --git a/src/Package/Data/Refs.php b/src/Package/Data/Refs.php index c98fa143..02111536 100644 --- a/src/Package/Data/Refs.php +++ b/src/Package/Data/Refs.php @@ -110,7 +110,7 @@ public function create($user, $repo, $ref, $sha) * @return object * * @since 1.0 - * @throws DomainException + * @throws \DomainException */ public function edit($user, $repo, $ref, $sha, $force = false) { diff --git a/src/Package/Gists.php b/src/Package/Gists.php index 371b5671..6b4473ba 100644 --- a/src/Package/Gists.php +++ b/src/Package/Gists.php @@ -221,10 +221,10 @@ public function getList($page = 0, $limit = 0) /** * List a user’s gists. * - * @param string $user The name of the GitHub user from which to list gists. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * @param \DateTime $since Only gists updated at or after this time are returned. + * @param string $user The name of the GitHub user from which to list gists. + * @param integer $page The page number from which to get items. + * @param integer $limit The number of items on a page. + * @param ?\DateTime $since Only gists updated at or after this time are returned. * * @return array * @@ -247,9 +247,9 @@ public function getListByUser($user, $page = 0, $limit = 0, \DateTime $since = n /** * List all public gists. * - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * @param \DateTime $since Only gists updated at or after this time are returned. + * @param integer $page The page number from which to get items. + * @param integer $limit The number of items on a page. + * @param ?\DateTime $since Only gists updated at or after this time are returned. * * @return array * @@ -272,9 +272,9 @@ public function getListPublic($page = 0, $limit = 0, \DateTime $since = null) /** * List starred gists. * - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * @param \DateTime $since Only gists updated at or after this time are returned. + * @param integer $page The page number from which to get items. + * @param integer $limit The number of items on a page. + * @param ?\DateTime $since Only gists updated at or after this time are returned. * * @return array * diff --git a/src/Package/Issues.php b/src/Package/Issues.php index 3e7caf96..a82d2235 100644 --- a/src/Package/Issues.php +++ b/src/Package/Issues.php @@ -170,14 +170,14 @@ public function get($user, $repo, $issueId) /** * List issues. * - * @param string $filter The filter type: assigned, created, mentioned, subscribed. - * @param string $state The optional state to filter requests by. [open, closed] - * @param string $labels The list of comma separated Label names. Example: bug,ui,@high. - * @param string $sort The sort order: created, updated, comments, default: created. - * @param string $direction The list direction: asc or desc, default: desc. - * @param \DateTimeInterface $since Only issues updated at or after this time are returned. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. + * @param string $filter The filter type: assigned, created, mentioned, subscribed. + * @param string $state The optional state to filter requests by. [open, closed] + * @param string $labels The list of comma separated Label names. Example: bug,ui,@high. + * @param string $sort The sort order: created, updated, comments, default: created. + * @param string $direction The list direction: asc or desc, default: desc. + * @param ?\DateTimeInterface $since Only issues updated at or after this time are returned. + * @param integer $page The page number from which to get items. + * @param integer $limit The number of items on a page. * * @return object * @@ -228,18 +228,18 @@ public function getList( /** * List issues for a repository. * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $milestone The milestone number, 'none', or *. - * @param string $state The optional state to filter requests by. [open, closed] - * @param string $assignee The assignee name, 'none', or *. - * @param string $mentioned The GitHub user name. - * @param string $labels The list of comma separated Label names. Example: bug,ui,@high. - * @param string $sort The sort order: created, updated, comments, default: created. - * @param string $direction The list direction: asc or desc, default: desc. - * @param \DateTimeInterface $since Only issues updated at or after this time are returned. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. + * @param string $user The name of the owner of the GitHub repository. + * @param string $repo The name of the GitHub repository. + * @param string $milestone The milestone number, 'none', or *. + * @param string $state The optional state to filter requests by. [open, closed] + * @param string $assignee The assignee name, 'none', or *. + * @param string $mentioned The GitHub user name. + * @param string $labels The list of comma separated Label names. Example: bug,ui,@high. + * @param string $sort The sort order: created, updated, comments, default: created. + * @param string $direction The list direction: asc or desc, default: desc. + * @param ?\DateTimeInterface $since Only issues updated at or after this time are returned. + * @param integer $page The page number from which to get items. + * @param integer $limit The number of items on a page. * * @return object * diff --git a/src/Package/Issues/Comments.php b/src/Package/Issues/Comments.php index 8edb9248..81ed9f8c 100644 --- a/src/Package/Issues/Comments.php +++ b/src/Package/Issues/Comments.php @@ -26,12 +26,12 @@ class Comments extends AbstractPackage /** * List comments on an issue. * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param integer $issueId The issue number. - * @param integer $page The page number from which to get items. - * @param integer $limit The number of items on a page. - * @param \DateTimeInterface $since Only comments updated at or after this time are returned. + * @param string $owner The name of the owner of the GitHub repository. + * @param string $repo The name of the GitHub repository. + * @param integer $issueId The issue number. + * @param integer $page The page number from which to get items. + * @param integer $limit The number of items on a page. + * @param ?\DateTimeInterface $since Only comments updated at or after this time are returned. * * @return object * @@ -56,11 +56,11 @@ public function getList($owner, $repo, $issueId, $page = 0, $limit = 0, \DateTim /** * List comments in a repository. * - * @param string $owner The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sort The sort field - created or updated. - * @param string $direction The sort order- asc or desc. Ignored without sort parameter. - * @param \DateTimeInterface $since Only comments updated at or after this time are returned. + * @param string $owner The name of the owner of the GitHub repository. + * @param string $repo The name of the GitHub repository. + * @param string $sort The sort field - created or updated. + * @param string $direction The sort order- asc or desc. Ignored without sort parameter. + * @param ?\DateTimeInterface $since Only comments updated at or after this time are returned. * * @return object * diff --git a/src/Package/Repositories/Commits.php b/src/Package/Repositories/Commits.php index a552a13e..2e1dc50d 100644 --- a/src/Package/Repositories/Commits.php +++ b/src/Package/Repositories/Commits.php @@ -29,13 +29,13 @@ class Commits extends AbstractPackage * Please follow the link headers as outlined in the pagination overview instead of constructing * page links yourself. * - * @param string $user The name of the owner of the GitHub repository. - * @param string $repo The name of the GitHub repository. - * @param string $sha Sha or branch to start listing commits from. - * @param string $path Only commits containing this file path will be returned. - * @param string $author GitHub login, name, or email by which to filter by commit author. - * @param \DateTimeInterface $since ISO 8601 Date - Only commits after this date will be returned. - * @param \DateTimeInterface $until ISO 8601 Date - Only commits before this date will be returned. + * @param string $user The name of the owner of the GitHub repository. + * @param string $repo The name of the GitHub repository. + * @param string $sha Sha or branch to start listing commits from. + * @param string $path Only commits containing this file path will be returned. + * @param string $author GitHub login, name, or email by which to filter by commit author. + * @param ?\DateTimeInterface $since ISO 8601 Date - Only commits after this date will be returned. + * @param ?\DateTimeInterface $until ISO 8601 Date - Only commits before this date will be returned. * * @return object * pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy