Skip to content

Instantly share code, notes, and snippets.

@enterprise-io
Created August 7, 2017 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enterprise-io/706e0cd7f946deaef685026b36bce535 to your computer and use it in GitHub Desktop.
Save enterprise-io/706e0cd7f946deaef685026b36bce535 to your computer and use it in GitHub Desktop.
<?php
/**
* Created by PhpStorm.
* Date: 28/07/2017
* Time: 3:13 PM
*/
/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
class ExampleParentClass
{
/**
* @var string
*/
public $var = '';
/**
* ExampleParentClass constructor.
*/
public function __construct()
{
$this->var = 'Hello';
}
}
/** @noinspection PhpMultipleClassesDeclarationsInOneFile */
class ExampleChildClass extends ExampleParentClass
{
/**
* ExampleChildClass constructor.
*/
public function __construct()
{
parent::__construct();
$this->var = 'Hello World';
}
/**
* Contrary to the function name this function does nothing
*/
public function doSomething()
{
$this->var = 'Okay';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment