1.2.1089. Set Clone Link¶

This command creates a link DEFINITION between a clone call, and its equivalent magic method.

This command may not detect all possible link for the clone. It may be missing information about the nature of the clone object.

<?php

class x {
    // Store an object
    private $a;

    function foo() {
        // This clone is linked to the magic method below
        return clone $this;
    }

    function __clone() {
        $this->a = clone $this->a;
    }
}

// This is not linked to any __clone method, by lack of information
clone $x;

?>

See also Object Cloning.

1.2.1089.1. Connex PHP features¶

  • clone

1.2.1089.1.1. Specs¶

Short name

Complete/SetCloneLink

Rulesets

All, Changed Behavior, NoDoc

Exakat since

1.9.2

PHP Version

All

Severity

Minor

Time To Fix

Quick (30 mins)

Precision

High

Available in

Entreprise Edition, Exakat Cloud

Exakat

Navigation

  • Introduction
  • Release Note

GETTING STARTED

  • Standard installation
  • Docker installation
  • Tutorials

USER GUIDE

  • Overview
  • PHP Version
  • Library & Framework Support
  • Configuration
  • Scoping analysis
  • Rule
  • Report
  • Cobbler

REFERENCE GUIDE

  • 1. Rules
  • 2. Rulesets
  • 3. Reports
  • 4. Cobblers
  • 5. Real Code Cases

ADMINISTRATOR GUIDE

  • Installation
  • Upgrading
  • Configuration
  • Commands

OTHERS

  • Frequently Asked Questions
  • Glossary
  • Annex

Related Topics

  • Documentation overview
    • 1. Rules
      • Previous: 1.2.1088. Set Class Remote Definition With Typehint
      • Next: 1.2.1090. Set Cookie Safe Arguments
©2015-2025, Damien Seguy - Exakat. | Powered by Sphinx 9.0.4 & Alabaster 1.0.0 | Page source