Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rule about bitwise operator

Open
#276 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
php
Domain
devtools

Research direction

Start by reviewing the existing numericOperandsInArithmeticOperators rule and the linked phpstan-strict-rules pull request #273. The issue does not name a file or test; the work is done when the maintainers decide whether bitwise operands should be numeric or integer and the corresponding rule is specified and implemented with tests.

Written by the indexing model from the issue text.

Description

Currently the is a numericOperandsInArithmeticOperators but nothing about bitwise operator.

Should we introduce a numericOperandsInBitwiseOperators ?

Should we even be stricter and introduce integerOperandsInBitwiseOperators ?
(Since bitwise works on integer bits).

Your call @ondrejmirtes
I prefer to ask before starting implementing the follow of https://github.com/phpstan/phpstan-strict-rules/pull/273

Dominant language
PHP
Stars
711
Forks
62
Avg merge
35m
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from phpstan/phpstan-strict-rules

All issues in phpstan/phpstan-strict-rules

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.